diff --git a/.gitignore b/.gitignore index 68b98246..9e04aab3 100644 --- a/.gitignore +++ b/.gitignore @@ -114,3 +114,7 @@ eslint-typegen.d.ts # Systematic skill scratch artifacts (ce:review, deepen-plan, etc.) .context/ + +# Workspace package build output +packages/runtime/dist/ +apps/action/dist/ diff --git a/apps/action/package.json b/apps/action/package.json new file mode 100644 index 00000000..dbb26a6a --- /dev/null +++ b/apps/action/package.json @@ -0,0 +1,18 @@ +{ + "name": "@fro-bot/action", + "version": "0.0.0-development", + "private": true, + "type": "module", + "main": "dist/main.js", + "module": "dist/main.js", + "scripts": { + "build": "pnpm --dir ../.. exec tsc --noEmit && pnpm --dir ../.. exec tsdown -c apps/action/tsdown.config.ts", + "check-types": "pnpm --dir ../.. exec tsc --noEmit", + "fix": "pnpm --dir ../.. exec eslint --fix src tsdown.config.ts eslint.config.ts", + "lint": "pnpm --dir ../.. exec eslint src tsdown.config.ts eslint.config.ts", + "test": "pnpm --dir ../.. exec vitest run" + }, + "dependencies": { + "@fro-bot/runtime": "workspace:*" + } +} diff --git a/apps/action/src/main.ts b/apps/action/src/main.ts new file mode 100644 index 00000000..c30f7dbb --- /dev/null +++ b/apps/action/src/main.ts @@ -0,0 +1 @@ +import '../../../src/main.js' diff --git a/apps/action/src/post.ts b/apps/action/src/post.ts new file mode 100644 index 00000000..6df60ee2 --- /dev/null +++ b/apps/action/src/post.ts @@ -0,0 +1 @@ +import '../../../src/post.js' diff --git a/apps/action/tsconfig.json b/apps/action/tsconfig.json new file mode 100644 index 00000000..881af083 --- /dev/null +++ b/apps/action/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "tsBuildInfoFile": "./node_modules/.cache/tsconfig.tsbuildinfo", + "rootDir": "../../src", + "noEmit": true + }, + "references": [{"path": "../../packages/runtime"}], + "include": ["../../src/**/*.ts", "../../tsdown.config.ts", "../../eslint.config.ts"], + "exclude": ["../../dist", "../../node_modules"] +} diff --git a/dist/artifact-BxOB70uM.js b/dist/artifact-B5YYOsMW.js similarity index 69% rename from dist/artifact-BxOB70uM.js rename to dist/artifact-B5YYOsMW.js index e30199e6..c229ee34 100644 --- a/dist/artifact-BxOB70uM.js +++ b/dist/artifact-B5YYOsMW.js @@ -1,96 +1,177 @@ -import{a as e,i as t,o as n,r,t as i}from"./chunk-Bdh3yLIe.js";import{t as a}from"./dist-cjs-BU-OH1DU.js";import{n as o,t as s}from"./client-D8hez-QA.js";import{r as c,t as l}from"./dist-cjs-BKjtSutv.js";import{B as u,E as d,F as f,I as p,L as m,N as h,P as g,R as v,T as y,t as b}from"./dist-cjs-CHwZlzSt.js";import{D as x,E as S,M as C,N as w,O as T,T as E,_ as D,a as O,b as k,d as A,f as j,g as M,h as N,i as P,j as F,m as I,n as L,o as R,p as z,r as ee,s as B,t as te,v as V,y as ne}from"./dist-cjs-vGYnjJIN.js";import{t as re}from"./dist-cjs-BLKf4vef.js";import{t as H}from"./dist-cjs-DJKA3UWR.js";import{t as ie}from"./dist-cjs-Dia4jG8x.js";import{t as ae}from"./dist-cjs-DHscMTSt.js";import{t as oe}from"./dist-cjs-B8H8-RPI.js";import se from"node:process";import*as ce from"os";import le,{EOL as ue}from"os";import*as de from"crypto";import*as fe from"fs";import{constants as pe,existsSync as me,promises as he,readFileSync as ge,writeFileSync as _e}from"fs";import*as U from"path";import{normalize as ve,resolve as ye}from"path";import*as be from"http";import*as xe from"https";import*as Se from"events";import{EventEmitter as Ce}from"events";import we,{ok as Te}from"assert";import*as Ee from"util";import*as De from"node:net";import Oe from"node:http";import{Readable as W,Transform as ke}from"node:stream";import Ae from"node:buffer";import je,{inspect as Me}from"node:util";import Ne from"node:zlib";import{createHmac as Pe}from"node:crypto";import{StringDecoder as Fe}from"string_decoder";import*as Ie from"child_process";import{setTimeout as Le}from"timers";import*as Re from"node:fs/promises";import*as ze from"node:path";import*as Be from"node:os";import Ve,{EOL as He}from"node:os";import*as Ue from"stream";import{Readable as We}from"stream";import{URL as Ge}from"url";import Ke from"node:https";import*as qe from"buffer";import{Buffer as Je}from"buffer";import*as G from"node:fs";import Ye from"node:fs";import{pipeline as Xe}from"node:stream/promises";import Ze,{realpath as Qe}from"fs/promises";function $e(e){return e==null?``:typeof e==`string`||e instanceof String?e:JSON.stringify(e)}function et(e){return Object.keys(e).length?{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}:{}}function tt(e,t,n){let r=new nt(e,t,n);process.stdout.write(r.toString()+ce.EOL)}var nt=class{constructor(e,t,n){e||=`missing.command`,this.command=e,this.properties=t,this.message=n}toString(){let e=`::`+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=` `;let t=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let r=this.properties[n];r&&(t?t=!1:e+=`,`,e+=`${n}=${it(r)}`)}}return e+=`::${rt(this.message)}`,e}};function rt(e){return $e(e).replace(/%/g,`%25`).replace(/\r/g,`%0D`).replace(/\n/g,`%0A`)}function it(e){return $e(e).replace(/%/g,`%25`).replace(/\r/g,`%0D`).replace(/\n/g,`%0A`).replace(/:/g,`%3A`).replace(/,/g,`%2C`)}function at(e,t){let n=process.env[`GITHUB_${e}`];if(!n)throw Error(`Unable to find environment variable for file command ${e}`);if(!fe.existsSync(n))throw Error(`Missing file at path: ${n}`);fe.appendFileSync(n,`${$e(t)}${ce.EOL}`,{encoding:`utf8`})}function ot(e,t){let n=`ghadelimiter_${de.randomUUID()}`,r=$e(t);if(e.includes(n))throw Error(`Unexpected input: name should not contain the delimiter "${n}"`);if(r.includes(n))throw Error(`Unexpected input: value should not contain the delimiter "${n}"`);return`${e}<<${n}${ce.EOL}${r}${ce.EOL}${n}`}function st(e){let t=e.protocol===`https:`;if(ct(e))return;let n=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(n)try{return new ut(n)}catch{if(!n.startsWith(`http://`)&&!n.startsWith(`https://`))return new ut(`http://${n}`)}else return}function ct(e){if(!e.hostname)return!1;let t=e.hostname;if(lt(t))return!0;let n=process.env.no_proxy||process.env.NO_PROXY||``;if(!n)return!1;let r;e.port?r=Number(e.port):e.protocol===`http:`?r=80:e.protocol===`https:`&&(r=443);let i=[e.hostname.toUpperCase()];typeof r==`number`&&i.push(`${i[0]}:${r}`);for(let e of n.split(`,`).map(e=>e.trim().toUpperCase()).filter(e=>e))if(e===`*`||i.some(t=>t===e||t.endsWith(`.${e}`)||e.startsWith(`.`)&&t.endsWith(`${e}`)))return!0;return!1}function lt(e){let t=e.toLowerCase();return t===`localhost`||t.startsWith(`127.`)||t.startsWith(`[::1]`)||t.startsWith(`[0:0:0:0:0:0:0:1]`)}var ut=class extends URL{constructor(e,t){super(e,t),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}},dt=i((e=>{t(`net`);var n=t(`tls`),r=t(`http`),i=t(`https`),a=t(`events`);t(`assert`);var o=t(`util`);e.httpOverHttp=s,e.httpsOverHttp=c,e.httpOverHttps=l,e.httpsOverHttps=u;function s(e){var t=new d(e);return t.request=r.request,t}function c(e){var t=new d(e);return t.request=r.request,t.createSocket=f,t.defaultPort=443,t}function l(e){var t=new d(e);return t.request=i.request,t}function u(e){var t=new d(e);return t.request=i.request,t.createSocket=f,t.defaultPort=443,t}function d(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||r.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on(`free`,function(e,n,r,i){for(var a=p(n,r,i),o=0,s=t.requests.length;o=this.maxSockets){i.requests.push(a);return}i.createSocket(a,function(t){t.on(`free`,n),t.on(`close`,r),t.on(`agentRemove`,r),e.onSocket(t);function n(){i.emit(`free`,t,a)}function r(e){i.removeSocket(t),t.removeListener(`free`,n),t.removeListener(`close`,r),t.removeListener(`agentRemove`,r)}})},d.prototype.createSocket=function(e,t){var n=this,r={};n.sockets.push(r);var i=m({},n.proxyOptions,{method:`CONNECT`,path:e.host+`:`+e.port,agent:!1,headers:{host:e.host+`:`+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers[`Proxy-Authorization`]=`Basic `+new Buffer(i.proxyAuth).toString(`base64`)),h(`making CONNECT request`);var a=n.request(i);a.useChunkedEncodingByDefault=!1,a.once(`response`,o),a.once(`upgrade`,s),a.once(`connect`,c),a.once(`error`,l),a.end();function o(e){e.upgrade=!0}function s(e,t,n){process.nextTick(function(){c(e,t,n)})}function c(i,o,s){if(a.removeAllListeners(),o.removeAllListeners(),i.statusCode!==200){h(`tunneling socket could not be established, statusCode=%d`,i.statusCode),o.destroy();var c=Error(`tunneling socket could not be established, statusCode=`+i.statusCode);c.code=`ECONNRESET`,e.request.emit(`error`,c),n.removeSocket(r);return}if(s.length>0){h(`got illegal response body from proxy`),o.destroy();var c=Error(`got illegal response body from proxy`);c.code=`ECONNRESET`,e.request.emit(`error`,c),n.removeSocket(r);return}return h(`tunneling connection has established`),n.sockets[n.sockets.indexOf(r)]=o,t(o)}function l(t){a.removeAllListeners(),h(`tunneling socket could not be established, cause=%s -`,t.message,t.stack);var i=Error(`tunneling socket could not be established, cause=`+t.message);i.code=`ECONNRESET`,e.request.emit(`error`,i),n.removeSocket(r)}},d.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(t!==-1){this.sockets.splice(t,1);var n=this.requests.shift();n&&this.createSocket(n,function(e){n.request.onSocket(e)})}};function f(e,t){var r=this;d.prototype.createSocket.call(r,e,function(i){var a=e.request.getHeader(`host`),o=m({},r.options,{socket:i,servername:a?a.replace(/:.*$/,``):e.host}),s=n.connect(0,o);r.sockets[r.sockets.indexOf(i)]=s,t(s)})}function p(e,t,n){return typeof e==`string`?{host:e,port:t,localAddress:n}:e}function m(e){for(var t=1,n=arguments.length;t{t.exports=dt()})),pt=i(((e,t)=>{t.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`)}})),mt=i(((e,t)=>{let n=Symbol.for(`undici.error.UND_ERR`);var r=class extends Error{constructor(e){super(e),this.name=`UndiciError`,this.code=`UND_ERR`}static[Symbol.hasInstance](e){return e&&e[n]===!0}[n]=!0};let i=Symbol.for(`undici.error.UND_ERR_CONNECT_TIMEOUT`);var a=class extends r{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[i]===!0}[i]=!0};let o=Symbol.for(`undici.error.UND_ERR_HEADERS_TIMEOUT`);var s=class extends r{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[o]===!0}[o]=!0};let c=Symbol.for(`undici.error.UND_ERR_HEADERS_OVERFLOW`);var l=class extends r{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[c]===!0}[c]=!0};let u=Symbol.for(`undici.error.UND_ERR_BODY_TIMEOUT`);var d=class extends r{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[u]===!0}[u]=!0};let f=Symbol.for(`undici.error.UND_ERR_RESPONSE_STATUS_CODE`);var p=class extends r{constructor(e,t,n,r){super(e),this.name=`ResponseStatusCodeError`,this.message=e||`Response Status Code Error`,this.code=`UND_ERR_RESPONSE_STATUS_CODE`,this.body=r,this.status=t,this.statusCode=t,this.headers=n}static[Symbol.hasInstance](e){return e&&e[f]===!0}[f]=!0};let m=Symbol.for(`undici.error.UND_ERR_INVALID_ARG`);var h=class extends r{constructor(e){super(e),this.name=`InvalidArgumentError`,this.message=e||`Invalid Argument Error`,this.code=`UND_ERR_INVALID_ARG`}static[Symbol.hasInstance](e){return e&&e[m]===!0}[m]=!0};let g=Symbol.for(`undici.error.UND_ERR_INVALID_RETURN_VALUE`);var v=class extends r{constructor(e){super(e),this.name=`InvalidReturnValueError`,this.message=e||`Invalid Return Value Error`,this.code=`UND_ERR_INVALID_RETURN_VALUE`}static[Symbol.hasInstance](e){return e&&e[g]===!0}[g]=!0};let y=Symbol.for(`undici.error.UND_ERR_ABORT`);var b=class extends r{constructor(e){super(e),this.name=`AbortError`,this.message=e||`The operation was aborted`,this.code=`UND_ERR_ABORT`}static[Symbol.hasInstance](e){return e&&e[y]===!0}[y]=!0};let x=Symbol.for(`undici.error.UND_ERR_ABORTED`);var S=class extends b{constructor(e){super(e),this.name=`AbortError`,this.message=e||`Request aborted`,this.code=`UND_ERR_ABORTED`}static[Symbol.hasInstance](e){return e&&e[x]===!0}[x]=!0};let C=Symbol.for(`undici.error.UND_ERR_INFO`);var w=class extends r{constructor(e){super(e),this.name=`InformationalError`,this.message=e||`Request information`,this.code=`UND_ERR_INFO`}static[Symbol.hasInstance](e){return e&&e[C]===!0}[C]=!0};let T=Symbol.for(`undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH`);var E=class extends r{constructor(e){super(e),this.name=`RequestContentLengthMismatchError`,this.message=e||`Request body length does not match content-length header`,this.code=`UND_ERR_REQ_CONTENT_LENGTH_MISMATCH`}static[Symbol.hasInstance](e){return e&&e[T]===!0}[T]=!0};let D=Symbol.for(`undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH`);var O=class extends r{constructor(e){super(e),this.name=`ResponseContentLengthMismatchError`,this.message=e||`Response body length does not match content-length header`,this.code=`UND_ERR_RES_CONTENT_LENGTH_MISMATCH`}static[Symbol.hasInstance](e){return e&&e[D]===!0}[D]=!0};let k=Symbol.for(`undici.error.UND_ERR_DESTROYED`);var A=class extends r{constructor(e){super(e),this.name=`ClientDestroyedError`,this.message=e||`The client is destroyed`,this.code=`UND_ERR_DESTROYED`}static[Symbol.hasInstance](e){return e&&e[k]===!0}[k]=!0};let j=Symbol.for(`undici.error.UND_ERR_CLOSED`);var M=class extends r{constructor(e){super(e),this.name=`ClientClosedError`,this.message=e||`The client is closed`,this.code=`UND_ERR_CLOSED`}static[Symbol.hasInstance](e){return e&&e[j]===!0}[j]=!0};let N=Symbol.for(`undici.error.UND_ERR_SOCKET`);var P=class extends r{constructor(e,t){super(e),this.name=`SocketError`,this.message=e||`Socket error`,this.code=`UND_ERR_SOCKET`,this.socket=t}static[Symbol.hasInstance](e){return e&&e[N]===!0}[N]=!0};let F=Symbol.for(`undici.error.UND_ERR_NOT_SUPPORTED`);var I=class extends r{constructor(e){super(e),this.name=`NotSupportedError`,this.message=e||`Not supported error`,this.code=`UND_ERR_NOT_SUPPORTED`}static[Symbol.hasInstance](e){return e&&e[F]===!0}[F]=!0};let L=Symbol.for(`undici.error.UND_ERR_BPL_MISSING_UPSTREAM`);var R=class extends r{constructor(e){super(e),this.name=`MissingUpstreamError`,this.message=e||`No upstream has been added to the BalancedPool`,this.code=`UND_ERR_BPL_MISSING_UPSTREAM`}static[Symbol.hasInstance](e){return e&&e[L]===!0}[L]=!0};let z=Symbol.for(`undici.error.UND_ERR_HTTP_PARSER`);var ee=class extends Error{constructor(e,t,n){super(e),this.name=`HTTPParserError`,this.code=t?`HPE_${t}`:void 0,this.data=n?n.toString():void 0}static[Symbol.hasInstance](e){return e&&e[z]===!0}[z]=!0};let B=Symbol.for(`undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE`);var te=class extends r{constructor(e){super(e),this.name=`ResponseExceededMaxSizeError`,this.message=e||`Response content exceeded max size`,this.code=`UND_ERR_RES_EXCEEDED_MAX_SIZE`}static[Symbol.hasInstance](e){return e&&e[B]===!0}[B]=!0};let V=Symbol.for(`undici.error.UND_ERR_REQ_RETRY`);var ne=class extends r{constructor(e,t,{headers:n,data:r}){super(e),this.name=`RequestRetryError`,this.message=e||`Request retry error`,this.code=`UND_ERR_REQ_RETRY`,this.statusCode=t,this.data=r,this.headers=n}static[Symbol.hasInstance](e){return e&&e[V]===!0}[V]=!0};let re=Symbol.for(`undici.error.UND_ERR_RESPONSE`);var H=class extends r{constructor(e,t,{headers:n,data:r}){super(e),this.name=`ResponseError`,this.message=e||`Response error`,this.code=`UND_ERR_RESPONSE`,this.statusCode=t,this.data=r,this.headers=n}static[Symbol.hasInstance](e){return e&&e[re]===!0}[re]=!0};let ie=Symbol.for(`undici.error.UND_ERR_PRX_TLS`);var ae=class extends r{constructor(e,t,n){super(t,{cause:e,...n??{}}),this.name=`SecureProxyConnectionError`,this.message=t||`Secure Proxy Connection failed`,this.code=`UND_ERR_PRX_TLS`,this.cause=e}static[Symbol.hasInstance](e){return e&&e[ie]===!0}[ie]=!0};let oe=Symbol.for(`undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED`);t.exports={AbortError:b,HTTPParserError:ee,UndiciError:r,HeadersTimeoutError:s,HeadersOverflowError:l,BodyTimeoutError:d,RequestContentLengthMismatchError:E,ConnectTimeoutError:a,ResponseStatusCodeError:p,InvalidArgumentError:h,InvalidReturnValueError:v,RequestAbortedError:S,ClientDestroyedError:A,ClientClosedError:M,InformationalError:w,SocketError:P,NotSupportedError:I,ResponseContentLengthMismatchError:O,BalancedPoolMissingUpstreamError:R,ResponseExceededMaxSizeError:te,RequestRetryError:ne,ResponseError:H,SecureProxyConnectionError:ae,MessageSizeExceededError:class extends r{constructor(e){super(e),this.name=`MessageSizeExceededError`,this.message=e||`Max decompressed message size exceeded`,this.code=`UND_ERR_WS_MESSAGE_SIZE_EXCEEDED`}static[Symbol.hasInstance](e){return e&&e[oe]===!0}get[oe](){return!0}}}})),ht=i(((e,t)=>{let n={},r=`Accept.Accept-Encoding.Accept-Language.Accept-Ranges.Access-Control-Allow-Credentials.Access-Control-Allow-Headers.Access-Control-Allow-Methods.Access-Control-Allow-Origin.Access-Control-Expose-Headers.Access-Control-Max-Age.Access-Control-Request-Headers.Access-Control-Request-Method.Age.Allow.Alt-Svc.Alt-Used.Authorization.Cache-Control.Clear-Site-Data.Connection.Content-Disposition.Content-Encoding.Content-Language.Content-Length.Content-Location.Content-Range.Content-Security-Policy.Content-Security-Policy-Report-Only.Content-Type.Cookie.Cross-Origin-Embedder-Policy.Cross-Origin-Opener-Policy.Cross-Origin-Resource-Policy.Date.Device-Memory.Downlink.ECT.ETag.Expect.Expect-CT.Expires.Forwarded.From.Host.If-Match.If-Modified-Since.If-None-Match.If-Range.If-Unmodified-Since.Keep-Alive.Last-Modified.Link.Location.Max-Forwards.Origin.Permissions-Policy.Pragma.Proxy-Authenticate.Proxy-Authorization.RTT.Range.Referer.Referrer-Policy.Refresh.Retry-After.Sec-WebSocket-Accept.Sec-WebSocket-Extensions.Sec-WebSocket-Key.Sec-WebSocket-Protocol.Sec-WebSocket-Version.Server.Server-Timing.Service-Worker-Allowed.Service-Worker-Navigation-Preload.Set-Cookie.SourceMap.Strict-Transport-Security.Supports-Loading-Mode.TE.Timing-Allow-Origin.Trailer.Transfer-Encoding.Upgrade.Upgrade-Insecure-Requests.User-Agent.Vary.Via.WWW-Authenticate.X-Content-Type-Options.X-DNS-Prefetch-Control.X-Frame-Options.X-Permitted-Cross-Domain-Policies.X-Powered-By.X-Requested-With.X-XSS-Protection`.split(`.`);for(let e=0;e{let{wellknownHeaderNames:n,headerNameLowerCasedRecord:r}=ht();var i=class e{value=null;left=null;middle=null;right=null;code;constructor(t,n,r){if(r===void 0||r>=t.length)throw TypeError(`Unreachable`);if((this.code=t.charCodeAt(r))>127)throw TypeError(`key must be ascii string`);t.length===++r?this.value=n:this.middle=new e(t,n,r)}add(t,n){let r=t.length;if(r===0)throw TypeError(`Unreachable`);let i=0,a=this;for(;;){let o=t.charCodeAt(i);if(o>127)throw TypeError(`key must be ascii string`);if(a.code===o)if(r===++i){a.value=n;break}else if(a.middle!==null)a=a.middle;else{a.middle=new e(t,n,i);break}else if(a.code=65&&(i|=32);r!==null;){if(i===r.code){if(t===++n)return r;r=r.middle;break}r=r.code{let r=t(`node:assert`),{kDestroyed:i,kBodyUsed:a,kListeners:o,kBody:s}=pt(),{IncomingMessage:c}=t(`node:http`),l=t(`node:stream`),u=t(`node:net`),{Blob:d}=t(`node:buffer`),f=t(`node:util`),{stringify:p}=t(`node:querystring`),{EventEmitter:m}=t(`node:events`),{InvalidArgumentError:h}=mt(),{headerNameLowerCasedRecord:g}=ht(),{tree:v}=gt(),[y,b]=process.versions.node.split(`.`).map(e=>Number(e));var x=class{constructor(e){this[s]=e,this[a]=!1}async*[Symbol.asyncIterator](){r(!this[a],`disturbed`),this[a]=!0,yield*this[s]}};function S(e){return w(e)?(I(e)===0&&e.on(`data`,function(){r(!1)}),typeof e.readableDidRead!=`boolean`&&(e[a]=!1,m.prototype.on.call(e,`data`,function(){this[a]=!0})),e):e&&typeof e.pipeTo==`function`||e&&typeof e!=`string`&&!ArrayBuffer.isView(e)&&F(e)?new x(e):e}function C(){}function w(e){return e&&typeof e==`object`&&typeof e.pipe==`function`&&typeof e.on==`function`}function T(e){if(e===null)return!1;if(e instanceof d)return!0;if(typeof e!=`object`)return!1;{let t=e[Symbol.toStringTag];return(t===`Blob`||t===`File`)&&(`stream`in e&&typeof e.stream==`function`||`arrayBuffer`in e&&typeof e.arrayBuffer==`function`)}}function E(e,t){if(e.includes(`?`)||e.includes(`#`))throw Error(`Query params cannot be passed when url already contains "?" or "#".`);let n=p(t);return n&&(e+=`?`+n),e}function D(e){let t=parseInt(e,10);return t===Number(e)&&t>=0&&t<=65535}function O(e){return e!=null&&e[0]===`h`&&e[1]===`t`&&e[2]===`t`&&e[3]===`p`&&(e[4]===`:`||e[4]===`s`&&e[5]===`:`)}function k(e){if(typeof e==`string`){if(e=new URL(e),!O(e.origin||e.protocol))throw new h("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}if(!e||typeof e!=`object`)throw new h(`Invalid URL: The URL argument must be a non-null object.`);if(!(e instanceof URL)){if(e.port!=null&&e.port!==``&&D(e.port)===!1)throw new h(`Invalid URL: port must be a valid integer or a string representation of an integer.`);if(e.path!=null&&typeof e.path!=`string`)throw new h(`Invalid URL path: the path must be a string or null/undefined.`);if(e.pathname!=null&&typeof e.pathname!=`string`)throw new h(`Invalid URL pathname: the pathname must be a string or null/undefined.`);if(e.hostname!=null&&typeof e.hostname!=`string`)throw new h(`Invalid URL hostname: the hostname must be a string or null/undefined.`);if(e.origin!=null&&typeof e.origin!=`string`)throw new h(`Invalid URL origin: the origin must be a string or null/undefined.`);if(!O(e.origin||e.protocol))throw new h("Invalid URL protocol: the URL must start with `http:` or `https:`.");let t=e.port==null?e.protocol===`https:`?443:80:e.port,n=e.origin==null?`${e.protocol||``}//${e.hostname||``}:${t}`:e.origin,r=e.path==null?`${e.pathname||``}${e.search||``}`:e.path;return n[n.length-1]===`/`&&(n=n.slice(0,n.length-1)),r&&r[0]!==`/`&&(r=`/${r}`),new URL(`${n}${r}`)}if(!O(e.origin||e.protocol))throw new h("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}function A(e){if(e=k(e),e.pathname!==`/`||e.search||e.hash)throw new h(`invalid url`);return e}function j(e){if(e[0]===`[`){let t=e.indexOf(`]`);return r(t!==-1),e.substring(1,t)}let t=e.indexOf(`:`);return t===-1?e:e.substring(0,t)}function M(e){if(!e)return null;r(typeof e==`string`);let t=j(e);return u.isIP(t)?``:t}function N(e){return JSON.parse(JSON.stringify(e))}function P(e){return e!=null&&typeof e[Symbol.asyncIterator]==`function`}function F(e){return e!=null&&(typeof e[Symbol.iterator]==`function`||typeof e[Symbol.asyncIterator]==`function`)}function I(e){if(e==null)return 0;if(w(e)){let t=e._readableState;return t&&t.objectMode===!1&&t.ended===!0&&Number.isFinite(t.length)?t.length:null}else if(T(e))return e.size==null?null:e.size;else if(re(e))return e.byteLength;return null}function L(e){return e&&!!(e.destroyed||e[i]||l.isDestroyed?.(e))}function R(e,t){e==null||!w(e)||L(e)||(typeof e.destroy==`function`?(Object.getPrototypeOf(e).constructor===c&&(e.socket=null),e.destroy(t)):t&&queueMicrotask(()=>{e.emit(`error`,t)}),e.destroyed!==!0&&(e[i]=!0))}let z=/timeout=(\d+)/;function ee(e){let t=e.toString().match(z);return t?parseInt(t[1],10)*1e3:null}function B(e){return typeof e==`string`?g[e]??e.toLowerCase():v.lookup(e)??e.toString(`latin1`).toLowerCase()}function te(e){return v.lookup(e)??e.toString(`latin1`).toLowerCase()}function V(e,t){t===void 0&&(t={});for(let n=0;ne.toString(`utf8`)):i.toString(`utf8`)}}return`content-length`in t&&`content-disposition`in t&&(t[`content-disposition`]=Buffer.from(t[`content-disposition`]).toString(`latin1`)),t}function ne(e){let t=e.length,n=Array(t),r=!1,i=-1,a,o,s=0;for(let t=0;t{e.close(),e.byobRequest?.respond(0)});else{let t=Buffer.isBuffer(r)?r:Buffer.from(r);t.byteLength&&e.enqueue(new Uint8Array(t))}return e.desiredSize>0},async cancel(e){await t.return()},type:`bytes`})}function le(e){return e&&typeof e==`object`&&typeof e.append==`function`&&typeof e.delete==`function`&&typeof e.get==`function`&&typeof e.getAll==`function`&&typeof e.has==`function`&&typeof e.set==`function`&&e[Symbol.toStringTag]===`FormData`}function ue(e,t){return`addEventListener`in e?(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)):(e.addListener(`abort`,t),()=>e.removeListener(`abort`,t))}let de=typeof String.prototype.toWellFormed==`function`,fe=typeof String.prototype.isWellFormed==`function`;function pe(e){return de?`${e}`.toWellFormed():f.toUSVString(e)}function me(e){return fe?`${e}`.isWellFormed():pe(e)===`${e}`}function he(e){switch(e){case 34:case 40:case 41:case 44:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 123:case 125:return!1;default:return e>=33&&e<=126}}function ge(e){if(e.length===0)return!1;for(let t=0;t{let r=t(`node:diagnostics_channel`),i=t(`node:util`),a=i.debuglog(`undici`),o=i.debuglog(`fetch`),s=i.debuglog(`websocket`),c=!1,l={beforeConnect:r.channel(`undici:client:beforeConnect`),connected:r.channel(`undici:client:connected`),connectError:r.channel(`undici:client:connectError`),sendHeaders:r.channel(`undici:client:sendHeaders`),create:r.channel(`undici:request:create`),bodySent:r.channel(`undici:request:bodySent`),headers:r.channel(`undici:request:headers`),trailers:r.channel(`undici:request:trailers`),error:r.channel(`undici:request:error`),open:r.channel(`undici:websocket:open`),close:r.channel(`undici:websocket:close`),socketError:r.channel(`undici:websocket:socket_error`),ping:r.channel(`undici:websocket:ping`),pong:r.channel(`undici:websocket:pong`)};if(a.enabled||o.enabled){let e=o.enabled?o:a;r.channel(`undici:client:beforeConnect`).subscribe(t=>{let{connectParams:{version:n,protocol:r,port:i,host:a}}=t;e(`connecting to %s using %s%s`,`${a}${i?`:${i}`:``}`,r,n)}),r.channel(`undici:client:connected`).subscribe(t=>{let{connectParams:{version:n,protocol:r,port:i,host:a}}=t;e(`connected to %s using %s%s`,`${a}${i?`:${i}`:``}`,r,n)}),r.channel(`undici:client:connectError`).subscribe(t=>{let{connectParams:{version:n,protocol:r,port:i,host:a},error:o}=t;e(`connection to %s using %s%s errored - %s`,`${a}${i?`:${i}`:``}`,r,n,o.message)}),r.channel(`undici:client:sendHeaders`).subscribe(t=>{let{request:{method:n,path:r,origin:i}}=t;e(`sending request to %s %s/%s`,n,i,r)}),r.channel(`undici:request:headers`).subscribe(t=>{let{request:{method:n,path:r,origin:i},response:{statusCode:a}}=t;e(`received response to %s %s/%s - HTTP %d`,n,i,r,a)}),r.channel(`undici:request:trailers`).subscribe(t=>{let{request:{method:n,path:r,origin:i}}=t;e(`trailers received from %s %s/%s`,n,i,r)}),r.channel(`undici:request:error`).subscribe(t=>{let{request:{method:n,path:r,origin:i},error:a}=t;e(`request to %s %s/%s errored - %s`,n,i,r,a.message)}),c=!0}if(s.enabled){if(!c){let e=a.enabled?a:s;r.channel(`undici:client:beforeConnect`).subscribe(t=>{let{connectParams:{version:n,protocol:r,port:i,host:a}}=t;e(`connecting to %s%s using %s%s`,a,i?`:${i}`:``,r,n)}),r.channel(`undici:client:connected`).subscribe(t=>{let{connectParams:{version:n,protocol:r,port:i,host:a}}=t;e(`connected to %s%s using %s%s`,a,i?`:${i}`:``,r,n)}),r.channel(`undici:client:connectError`).subscribe(t=>{let{connectParams:{version:n,protocol:r,port:i,host:a},error:o}=t;e(`connection to %s%s using %s%s errored - %s`,a,i?`:${i}`:``,r,n,o.message)}),r.channel(`undici:client:sendHeaders`).subscribe(t=>{let{request:{method:n,path:r,origin:i}}=t;e(`sending request to %s %s/%s`,n,i,r)})}r.channel(`undici:websocket:open`).subscribe(e=>{let{address:{address:t,port:n}}=e;s(`connection opened %s%s`,t,n?`:${n}`:``)}),r.channel(`undici:websocket:close`).subscribe(e=>{let{websocket:t,code:n,reason:r}=e;s(`closed connection to %s - %s %s`,t.url,n,r)}),r.channel(`undici:websocket:socket_error`).subscribe(e=>{s(`connection errored - %s`,e.message)}),r.channel(`undici:websocket:ping`).subscribe(e=>{s(`ping received`)}),r.channel(`undici:websocket:pong`).subscribe(e=>{s(`pong received`)})}n.exports={channels:l}})),yt=i(((e,n)=>{let{InvalidArgumentError:r,NotSupportedError:i}=mt(),a=t(`node:assert`),{isValidHTTPToken:o,isValidHeaderValue:s,isStream:c,destroy:l,isBuffer:u,isFormDataLike:d,isIterable:f,isBlobLike:p,buildURL:m,validateHandler:h,getServerName:g,normalizedMethodRecords:v}=_t(),{channels:y}=vt(),{headerNameLowerCasedRecord:b}=ht(),x=/[^\u0021-\u00ff]/,S=Symbol(`handler`);var C=class{constructor(e,{path:t,method:n,body:i,headers:a,query:b,idempotent:C,blocking:T,upgrade:E,headersTimeout:D,bodyTimeout:O,reset:k,throwOnError:A,expectContinue:j,servername:M},N){if(typeof t!=`string`)throw new r(`path must be a string`);if(t[0]!==`/`&&!(t.startsWith(`http://`)||t.startsWith(`https://`))&&n!==`CONNECT`)throw new r(`path must be an absolute URL or start with a slash`);if(x.test(t))throw new r(`invalid request path`);if(typeof n!=`string`)throw new r(`method must be a string`);if(v[n]===void 0&&!o(n))throw new r(`invalid request method`);if(E&&typeof E!=`string`)throw new r(`upgrade must be a string`);if(E&&!s(E))throw new r(`invalid upgrade header`);if(D!=null&&(!Number.isFinite(D)||D<0))throw new r(`invalid headersTimeout`);if(O!=null&&(!Number.isFinite(O)||O<0))throw new r(`invalid bodyTimeout`);if(k!=null&&typeof k!=`boolean`)throw new r(`invalid reset`);if(j!=null&&typeof j!=`boolean`)throw new r(`invalid expectContinue`);if(this.headersTimeout=D,this.bodyTimeout=O,this.throwOnError=A===!0,this.method=n,this.abort=null,i==null)this.body=null;else if(c(i)){this.body=i;let e=this.body._readableState;(!e||!e.autoDestroy)&&(this.endHandler=function(){l(this)},this.body.on(`end`,this.endHandler)),this.errorHandler=e=>{this.abort?this.abort(e):this.error=e},this.body.on(`error`,this.errorHandler)}else if(u(i))this.body=i.byteLength?i:null;else if(ArrayBuffer.isView(i))this.body=i.buffer.byteLength?Buffer.from(i.buffer,i.byteOffset,i.byteLength):null;else if(i instanceof ArrayBuffer)this.body=i.byteLength?Buffer.from(i):null;else if(typeof i==`string`)this.body=i.length?Buffer.from(i):null;else if(d(i)||f(i)||p(i))this.body=i;else throw new r(`body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable`);if(this.completed=!1,this.aborted=!1,this.upgrade=E||null,this.path=b?m(t,b):t,this.origin=e,this.idempotent=C??(n===`HEAD`||n===`GET`),this.blocking=T??!1,this.reset=k??null,this.host=null,this.contentLength=null,this.contentType=null,this.headers=[],this.expectContinue=j??!1,Array.isArray(a)){if(a.length%2!=0)throw new r(`headers array must be even`);for(let e=0;e{let r=t(`node:events`);var i=class extends r{dispatch(){throw Error(`not implemented`)}close(){throw Error(`not implemented`)}destroy(){throw Error(`not implemented`)}compose(...e){let t=Array.isArray(e[0])?e[0]:e,n=this.dispatch.bind(this);for(let e of t)if(e!=null){if(typeof e!=`function`)throw TypeError(`invalid interceptor, expected function received ${typeof e}`);if(n=e(n),n==null||typeof n!=`function`||n.length!==2)throw TypeError(`invalid interceptor`)}return new a(this,n)}},a=class extends i{#e=null;#t=null;constructor(e,t){super(),this.#e=e,this.#t=t}dispatch(...e){this.#t(...e)}close(...e){return this.#e.close(...e)}destroy(...e){return this.#e.destroy(...e)}};n.exports=i})),xt=i(((e,t)=>{let n=bt(),{ClientDestroyedError:r,ClientClosedError:i,InvalidArgumentError:a}=mt(),{kDestroy:o,kClose:s,kClosed:c,kDestroyed:l,kDispatch:u,kInterceptors:d}=pt(),f=Symbol(`onDestroyed`),p=Symbol(`onClosed`),m=Symbol(`Intercepted Dispatch`);t.exports=class extends n{constructor(){super(),this[l]=!1,this[f]=null,this[c]=!1,this[p]=[]}get destroyed(){return this[l]}get closed(){return this[c]}get interceptors(){return this[d]}set interceptors(e){if(e){for(let t=e.length-1;t>=0;t--)if(typeof this[d][t]!=`function`)throw new a(`interceptor must be an function`)}this[d]=e}close(e){if(e===void 0)return new Promise((e,t)=>{this.close((n,r)=>n?t(n):e(r))});if(typeof e!=`function`)throw new a(`invalid callback`);if(this[l]){queueMicrotask(()=>e(new r,null));return}if(this[c]){this[p]?this[p].push(e):queueMicrotask(()=>e(null,null));return}this[c]=!0,this[p].push(e);let t=()=>{let e=this[p];this[p]=null;for(let t=0;tthis.destroy()).then(()=>{queueMicrotask(t)})}destroy(e,t){if(typeof e==`function`&&(t=e,e=null),t===void 0)return new Promise((t,n)=>{this.destroy(e,(e,r)=>e?n(e):t(r))});if(typeof t!=`function`)throw new a(`invalid callback`);if(this[l]){this[f]?this[f].push(t):queueMicrotask(()=>t(null,null));return}e||=new r,this[l]=!0,this[f]=this[f]||[],this[f].push(t);let n=()=>{let e=this[f];this[f]=null;for(let t=0;t{queueMicrotask(n)})}[m](e,t){if(!this[d]||this[d].length===0)return this[m]=this[u],this[u](e,t);let n=this[u].bind(this);for(let e=this[d].length-1;e>=0;e--)n=this[d][e](n);return this[m]=n,n(e,t)}dispatch(e,t){if(!t||typeof t!=`object`)throw new a(`handler must be an object`);try{if(!e||typeof e!=`object`)throw new a(`opts must be an object.`);if(this[l]||this[f])throw new r;if(this[c])throw new i;return this[m](e,t)}catch(e){if(typeof t.onError!=`function`)throw new a(`invalid onError method`);return t.onError(e),!1}}}})),St=i(((e,t)=>{let n=0,r=1e3;(r>>1)-1;let i,a=Symbol(`kFastTimer`),o=[];function s(){n+=499;let e=0,t=o.length;for(;e=r._idleStart+r._idleTimeout&&(r._state=-1,r._idleStart=-1,r._onTimeout(r._timerArg)),r._state===-1?(r._state=-2,--t!==0&&(o[e]=o[t])):++e}o.length=t,o.length!==0&&c()}function c(){i?i.refresh():(clearTimeout(i),i=setTimeout(s,499),i.unref&&i.unref())}var l=class{[a]=!0;_state=-2;_idleTimeout=-1;_idleStart=-1;_onTimeout;_timerArg;constructor(e,t,n){this._onTimeout=e,this._idleTimeout=t,this._timerArg=n,this.refresh()}refresh(){this._state===-2&&o.push(this),(!i||o.length===1)&&c(),this._state=0}clear(){this._state=-1,this._idleStart=-1}};t.exports={setTimeout(e,t,n){return t<=r?setTimeout(e,t,n):new l(e,t,n)},clearTimeout(e){e[a]?e.clear():clearTimeout(e)},setFastTimeout(e,t,n){return new l(e,t,n)},clearFastTimeout(e){e.clear()},now(){return n},tick(e=0){n+=e-r+1,s(),s()},reset(){n=0,o.length=0,clearTimeout(i),i=null},kFastTimer:a}})),Ct=i(((e,n)=>{let r=t(`node:net`),i=t(`node:assert`),a=_t(),{InvalidArgumentError:o,ConnectTimeoutError:s}=mt(),c=St();function l(){}let u,d;d=global.FinalizationRegistry&&!(process.env.NODE_V8_COVERAGE||process.env.UNDICI_NO_FG)?class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(e=>{if(this._sessionCache.size=this._maxCachedSessions){let{value:e}=this._sessionCache.keys().next();this._sessionCache.delete(e)}this._sessionCache.set(e,t)}}};function f({allowH2:e,maxCachedSessions:n,socketPath:s,timeout:c,session:l,...f}){if(n!=null&&(!Number.isInteger(n)||n<0))throw new o(`maxCachedSessions must be a positive integer or zero`);let m={path:s,...f},h=new d(n??100);return c??=1e4,e??=!1,function({hostname:n,host:o,protocol:s,port:d,servername:f,localAddress:g,httpSocket:v},y){let b;if(s===`https:`){u||=t(`node:tls`),f=f||m.servername||a.getServerName(o)||null;let r=f||n;i(r);let s=l||h.get(r)||null;d||=443,b=u.connect({highWaterMark:16384,...m,servername:f,session:s,localAddress:g,ALPNProtocols:e?[`http/1.1`,`h2`]:[`http/1.1`],socket:v,port:d,host:n}),b.on(`session`,function(e){h.set(r,e)})}else i(!v,`httpSocket can only be sent on TLS update`),d||=80,b=r.connect({highWaterMark:64*1024,...m,localAddress:g,port:d,host:n});if(m.keepAlive==null||m.keepAlive){let e=m.keepAliveInitialDelay===void 0?6e4:m.keepAliveInitialDelay;b.setKeepAlive(!0,e)}let x=p(new WeakRef(b),{timeout:c,hostname:n,port:d});return b.setNoDelay(!0).once(s===`https:`?`secureConnect`:`connect`,function(){if(queueMicrotask(x),y){let e=y;y=null,e(null,this)}}).on(`error`,function(e){if(queueMicrotask(x),y){let t=y;y=null,t(e)}}),b}}let p=process.platform===`win32`?(e,t)=>{if(!t.timeout)return l;let n=null,r=null,i=c.setFastTimeout(()=>{n=setImmediate(()=>{r=setImmediate(()=>m(e.deref(),t))})},t.timeout);return()=>{c.clearFastTimeout(i),clearImmediate(n),clearImmediate(r)}}:(e,t)=>{if(!t.timeout)return l;let n=null,r=c.setFastTimeout(()=>{n=setImmediate(()=>{m(e.deref(),t)})},t.timeout);return()=>{c.clearFastTimeout(r),clearImmediate(n)}};function m(e,t){if(e==null)return;let n=`Connect Timeout Error`;Array.isArray(e.autoSelectFamilyAttemptedAddresses)?n+=` (attempted addresses: ${e.autoSelectFamilyAttemptedAddresses.join(`, `)},`:n+=` (attempted address: ${t.hostname}:${t.port},`,n+=` timeout: ${t.timeout}ms)`,a.destroy(e,new s(n))}n.exports=f})),wt=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.enumToMap=void 0;function t(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];typeof r==`number`&&(t[n]=r)}),t}e.enumToMap=t})),Tt=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SPECIAL_HEADERS=e.HEADER_STATE=e.MINOR=e.MAJOR=e.CONNECTION_TOKEN_CHARS=e.HEADER_CHARS=e.TOKEN=e.STRICT_TOKEN=e.HEX=e.URL_CHAR=e.STRICT_URL_CHAR=e.USERINFO_CHARS=e.MARK=e.ALPHANUM=e.NUM=e.HEX_MAP=e.NUM_MAP=e.ALPHA=e.FINISH=e.H_METHOD_MAP=e.METHOD_MAP=e.METHODS_RTSP=e.METHODS_ICE=e.METHODS_HTTP=e.METHODS=e.LENIENT_FLAGS=e.FLAGS=e.TYPE=e.ERROR=void 0;let t=wt();(function(e){e[e.OK=0]=`OK`,e[e.INTERNAL=1]=`INTERNAL`,e[e.STRICT=2]=`STRICT`,e[e.LF_EXPECTED=3]=`LF_EXPECTED`,e[e.UNEXPECTED_CONTENT_LENGTH=4]=`UNEXPECTED_CONTENT_LENGTH`,e[e.CLOSED_CONNECTION=5]=`CLOSED_CONNECTION`,e[e.INVALID_METHOD=6]=`INVALID_METHOD`,e[e.INVALID_URL=7]=`INVALID_URL`,e[e.INVALID_CONSTANT=8]=`INVALID_CONSTANT`,e[e.INVALID_VERSION=9]=`INVALID_VERSION`,e[e.INVALID_HEADER_TOKEN=10]=`INVALID_HEADER_TOKEN`,e[e.INVALID_CONTENT_LENGTH=11]=`INVALID_CONTENT_LENGTH`,e[e.INVALID_CHUNK_SIZE=12]=`INVALID_CHUNK_SIZE`,e[e.INVALID_STATUS=13]=`INVALID_STATUS`,e[e.INVALID_EOF_STATE=14]=`INVALID_EOF_STATE`,e[e.INVALID_TRANSFER_ENCODING=15]=`INVALID_TRANSFER_ENCODING`,e[e.CB_MESSAGE_BEGIN=16]=`CB_MESSAGE_BEGIN`,e[e.CB_HEADERS_COMPLETE=17]=`CB_HEADERS_COMPLETE`,e[e.CB_MESSAGE_COMPLETE=18]=`CB_MESSAGE_COMPLETE`,e[e.CB_CHUNK_HEADER=19]=`CB_CHUNK_HEADER`,e[e.CB_CHUNK_COMPLETE=20]=`CB_CHUNK_COMPLETE`,e[e.PAUSED=21]=`PAUSED`,e[e.PAUSED_UPGRADE=22]=`PAUSED_UPGRADE`,e[e.PAUSED_H2_UPGRADE=23]=`PAUSED_H2_UPGRADE`,e[e.USER=24]=`USER`})(e.ERROR||={}),(function(e){e[e.BOTH=0]=`BOTH`,e[e.REQUEST=1]=`REQUEST`,e[e.RESPONSE=2]=`RESPONSE`})(e.TYPE||={}),(function(e){e[e.CONNECTION_KEEP_ALIVE=1]=`CONNECTION_KEEP_ALIVE`,e[e.CONNECTION_CLOSE=2]=`CONNECTION_CLOSE`,e[e.CONNECTION_UPGRADE=4]=`CONNECTION_UPGRADE`,e[e.CHUNKED=8]=`CHUNKED`,e[e.UPGRADE=16]=`UPGRADE`,e[e.CONTENT_LENGTH=32]=`CONTENT_LENGTH`,e[e.SKIPBODY=64]=`SKIPBODY`,e[e.TRAILING=128]=`TRAILING`,e[e.TRANSFER_ENCODING=512]=`TRANSFER_ENCODING`})(e.FLAGS||={}),(function(e){e[e.HEADERS=1]=`HEADERS`,e[e.CHUNKED_LENGTH=2]=`CHUNKED_LENGTH`,e[e.KEEP_ALIVE=4]=`KEEP_ALIVE`})(e.LENIENT_FLAGS||={});var n;(function(e){e[e.DELETE=0]=`DELETE`,e[e.GET=1]=`GET`,e[e.HEAD=2]=`HEAD`,e[e.POST=3]=`POST`,e[e.PUT=4]=`PUT`,e[e.CONNECT=5]=`CONNECT`,e[e.OPTIONS=6]=`OPTIONS`,e[e.TRACE=7]=`TRACE`,e[e.COPY=8]=`COPY`,e[e.LOCK=9]=`LOCK`,e[e.MKCOL=10]=`MKCOL`,e[e.MOVE=11]=`MOVE`,e[e.PROPFIND=12]=`PROPFIND`,e[e.PROPPATCH=13]=`PROPPATCH`,e[e.SEARCH=14]=`SEARCH`,e[e.UNLOCK=15]=`UNLOCK`,e[e.BIND=16]=`BIND`,e[e.REBIND=17]=`REBIND`,e[e.UNBIND=18]=`UNBIND`,e[e.ACL=19]=`ACL`,e[e.REPORT=20]=`REPORT`,e[e.MKACTIVITY=21]=`MKACTIVITY`,e[e.CHECKOUT=22]=`CHECKOUT`,e[e.MERGE=23]=`MERGE`,e[e[`M-SEARCH`]=24]=`M-SEARCH`,e[e.NOTIFY=25]=`NOTIFY`,e[e.SUBSCRIBE=26]=`SUBSCRIBE`,e[e.UNSUBSCRIBE=27]=`UNSUBSCRIBE`,e[e.PATCH=28]=`PATCH`,e[e.PURGE=29]=`PURGE`,e[e.MKCALENDAR=30]=`MKCALENDAR`,e[e.LINK=31]=`LINK`,e[e.UNLINK=32]=`UNLINK`,e[e.SOURCE=33]=`SOURCE`,e[e.PRI=34]=`PRI`,e[e.DESCRIBE=35]=`DESCRIBE`,e[e.ANNOUNCE=36]=`ANNOUNCE`,e[e.SETUP=37]=`SETUP`,e[e.PLAY=38]=`PLAY`,e[e.PAUSE=39]=`PAUSE`,e[e.TEARDOWN=40]=`TEARDOWN`,e[e.GET_PARAMETER=41]=`GET_PARAMETER`,e[e.SET_PARAMETER=42]=`SET_PARAMETER`,e[e.REDIRECT=43]=`REDIRECT`,e[e.RECORD=44]=`RECORD`,e[e.FLUSH=45]=`FLUSH`})(n=e.METHODS||={}),e.METHODS_HTTP=[n.DELETE,n.GET,n.HEAD,n.POST,n.PUT,n.CONNECT,n.OPTIONS,n.TRACE,n.COPY,n.LOCK,n.MKCOL,n.MOVE,n.PROPFIND,n.PROPPATCH,n.SEARCH,n.UNLOCK,n.BIND,n.REBIND,n.UNBIND,n.ACL,n.REPORT,n.MKACTIVITY,n.CHECKOUT,n.MERGE,n[`M-SEARCH`],n.NOTIFY,n.SUBSCRIBE,n.UNSUBSCRIBE,n.PATCH,n.PURGE,n.MKCALENDAR,n.LINK,n.UNLINK,n.PRI,n.SOURCE],e.METHODS_ICE=[n.SOURCE],e.METHODS_RTSP=[n.OPTIONS,n.DESCRIBE,n.ANNOUNCE,n.SETUP,n.PLAY,n.PAUSE,n.TEARDOWN,n.GET_PARAMETER,n.SET_PARAMETER,n.REDIRECT,n.RECORD,n.FLUSH,n.GET,n.POST],e.METHOD_MAP=t.enumToMap(n),e.H_METHOD_MAP={},Object.keys(e.METHOD_MAP).forEach(t=>{/^H/.test(t)&&(e.H_METHOD_MAP[t]=e.METHOD_MAP[t])}),(function(e){e[e.SAFE=0]=`SAFE`,e[e.SAFE_WITH_CB=1]=`SAFE_WITH_CB`,e[e.UNSAFE=2]=`UNSAFE`})(e.FINISH||={}),e.ALPHA=[];for(let t=65;t<=90;t++)e.ALPHA.push(String.fromCharCode(t)),e.ALPHA.push(String.fromCharCode(t+32));e.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9},e.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},e.NUM=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],e.ALPHANUM=e.ALPHA.concat(e.NUM),e.MARK=[`-`,`_`,`.`,`!`,`~`,`*`,`'`,`(`,`)`],e.USERINFO_CHARS=e.ALPHANUM.concat(e.MARK).concat([`%`,`;`,`:`,`&`,`=`,`+`,`$`,`,`]),e.STRICT_URL_CHAR=`!"$%&'()*+,-./:;<=>@[\\]^_\`{|}~`.split(``).concat(e.ALPHANUM),e.URL_CHAR=e.STRICT_URL_CHAR.concat([` `,`\f`]);for(let t=128;t<=255;t++)e.URL_CHAR.push(t);e.HEX=e.NUM.concat([`a`,`b`,`c`,`d`,`e`,`f`,`A`,`B`,`C`,`D`,`E`,`F`]),e.STRICT_TOKEN=[`!`,`#`,`$`,`%`,`&`,`'`,`*`,`+`,`-`,`.`,`^`,`_`,"`",`|`,`~`].concat(e.ALPHANUM),e.TOKEN=e.STRICT_TOKEN.concat([` `]),e.HEADER_CHARS=[` `];for(let t=32;t<=255;t++)t!==127&&e.HEADER_CHARS.push(t);e.CONNECTION_TOKEN_CHARS=e.HEADER_CHARS.filter(e=>e!==44),e.MAJOR=e.NUM_MAP,e.MINOR=e.MAJOR;var r;(function(e){e[e.GENERAL=0]=`GENERAL`,e[e.CONNECTION=1]=`CONNECTION`,e[e.CONTENT_LENGTH=2]=`CONTENT_LENGTH`,e[e.TRANSFER_ENCODING=3]=`TRANSFER_ENCODING`,e[e.UPGRADE=4]=`UPGRADE`,e[e.CONNECTION_KEEP_ALIVE=5]=`CONNECTION_KEEP_ALIVE`,e[e.CONNECTION_CLOSE=6]=`CONNECTION_CLOSE`,e[e.CONNECTION_UPGRADE=7]=`CONNECTION_UPGRADE`,e[e.TRANSFER_ENCODING_CHUNKED=8]=`TRANSFER_ENCODING_CHUNKED`})(r=e.HEADER_STATE||={}),e.SPECIAL_HEADERS={connection:r.CONNECTION,"content-length":r.CONTENT_LENGTH,"proxy-connection":r.CONNECTION,"transfer-encoding":r.TRANSFER_ENCODING,upgrade:r.UPGRADE}})),Et=i(((e,n)=>{let{Buffer:r}=t(`node:buffer`);n.exports=r.from(`AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAZEGxsaHR0cF9nZXRfZXJybm8AGhdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAbF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uABwUbGxodHRwX2dldF9lcnJvcl9wb3MAHRFsbGh0dHBfZXJybm9fbmFtZQAeEmxsaHR0cF9tZXRob2RfbmFtZQAfEmxsaHR0cF9zdGF0dXNfbmFtZQAgGmxsaHR0cF9zZXRfbGVuaWVudF9oZWFkZXJzACEhbGxodHRwX3NldF9sZW5pZW50X2NodW5rZWRfbGVuZ3RoACIdbGxodHRwX3NldF9sZW5pZW50X2tlZXBfYWxpdmUAIyRsbGh0dHBfc2V0X2xlbmllbnRfdHJhbnNmZXJfZW5jb2RpbmcAJBhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YALgkXAQBBAQsRAQIDBAUKBgcrLSwqKSglJyYK07MCLBYAQYjQACgCAARAAAtBiNAAQQE2AgALFAAgABAwIAAgAjYCOCAAIAE6ACgLFAAgACAALwEyIAAtAC4gABAvEAALHgEBf0HAABAyIgEQMCABQYAINgI4IAEgADoAKCABC48MAQd/AkAgAEUNACAAQQhrIgEgAEEEaygCACIAQXhxIgRqIQUCQCAAQQFxDQAgAEEDcUUNASABIAEoAgAiAGsiAUGc0AAoAgBJDQEgACAEaiEEAkACQEGg0AAoAgAgAUcEQCAAQf8BTQRAIABBA3YhAyABKAIIIgAgASgCDCICRgRAQYzQAEGM0AAoAgBBfiADd3E2AgAMBQsgAiAANgIIIAAgAjYCDAwECyABKAIYIQYgASABKAIMIgBHBEAgACABKAIIIgI2AgggAiAANgIMDAMLIAFBFGoiAygCACICRQRAIAEoAhAiAkUNAiABQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFKAIEIgBBA3FBA0cNAiAFIABBfnE2AgRBlNAAIAQ2AgAgBSAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCABKAIcIgJBAnRBvNIAaiIDKAIAIAFGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgAUYbaiAANgIAIABFDQELIAAgBjYCGCABKAIQIgIEQCAAIAI2AhAgAiAANgIYCyABQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAFTw0AIAUoAgQiAEEBcUUNAAJAAkACQAJAIABBAnFFBEBBpNAAKAIAIAVGBEBBpNAAIAE2AgBBmNAAQZjQACgCACAEaiIANgIAIAEgAEEBcjYCBCABQaDQACgCAEcNBkGU0ABBADYCAEGg0ABBADYCAAwGC0Gg0AAoAgAgBUYEQEGg0AAgATYCAEGU0ABBlNAAKAIAIARqIgA2AgAgASAAQQFyNgIEIAAgAWogADYCAAwGCyAAQXhxIARqIQQgAEH/AU0EQCAAQQN2IQMgBSgCCCIAIAUoAgwiAkYEQEGM0ABBjNAAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgBSgCGCEGIAUgBSgCDCIARwRAQZzQACgCABogACAFKAIIIgI2AgggAiAANgIMDAMLIAVBFGoiAygCACICRQRAIAUoAhAiAkUNAiAFQRBqIQMLA0AgAyEHIAIiAEEUaiIDKAIAIgINACAAQRBqIQMgACgCECICDQALIAdBADYCAAwCCyAFIABBfnE2AgQgASAEaiAENgIAIAEgBEEBcjYCBAwDC0EAIQALIAZFDQACQCAFKAIcIgJBAnRBvNIAaiIDKAIAIAVGBEAgAyAANgIAIAANAUGQ0ABBkNAAKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgBUYbaiAANgIAIABFDQELIAAgBjYCGCAFKAIQIgIEQCAAIAI2AhAgAiAANgIYCyAFQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAEaiAENgIAIAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJSs8BzgFLzQFMzAFNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBywHKAbgByQG5AcgBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgEA3AELQQAMxgELQQ4MxQELQQ0MxAELQQ8MwwELQRAMwgELQRMMwQELQRQMwAELQRUMvwELQRYMvgELQRgMvQELQRkMvAELQRoMuwELQRsMugELQRwMuQELQR0MuAELQQgMtwELQR4MtgELQSAMtQELQR8MtAELQQcMswELQSEMsgELQSIMsQELQSMMsAELQSQMrwELQRIMrgELQREMrQELQSUMrAELQSYMqwELQScMqgELQSgMqQELQcMBDKgBC0EqDKcBC0ErDKYBC0EsDKUBC0EtDKQBC0EuDKMBC0EvDKIBC0HEAQyhAQtBMAygAQtBNAyfAQtBDAyeAQtBMQydAQtBMgycAQtBMwybAQtBOQyaAQtBNQyZAQtBxQEMmAELQQsMlwELQToMlgELQTYMlQELQQoMlAELQTcMkwELQTgMkgELQTwMkQELQTsMkAELQT0MjwELQQkMjgELQSkMjQELQT4MjAELQT8MiwELQcAADIoBC0HBAAyJAQtBwgAMiAELQcMADIcBC0HEAAyGAQtBxQAMhQELQcYADIQBC0EXDIMBC0HHAAyCAQtByAAMgQELQckADIABC0HKAAx/C0HLAAx+C0HNAAx9C0HMAAx8C0HOAAx7C0HPAAx6C0HQAAx5C0HRAAx4C0HSAAx3C0HTAAx2C0HUAAx1C0HWAAx0C0HVAAxzC0EGDHILQdcADHELQQUMcAtB2AAMbwtBBAxuC0HZAAxtC0HaAAxsC0HbAAxrC0HcAAxqC0EDDGkLQd0ADGgLQd4ADGcLQd8ADGYLQeEADGULQeAADGQLQeIADGMLQeMADGILQQIMYQtB5AAMYAtB5QAMXwtB5gAMXgtB5wAMXQtB6AAMXAtB6QAMWwtB6gAMWgtB6wAMWQtB7AAMWAtB7QAMVwtB7gAMVgtB7wAMVQtB8AAMVAtB8QAMUwtB8gAMUgtB8wAMUQtB9AAMUAtB9QAMTwtB9gAMTgtB9wAMTQtB+AAMTAtB+QAMSwtB+gAMSgtB+wAMSQtB/AAMSAtB/QAMRwtB/gAMRgtB/wAMRQtBgAEMRAtBgQEMQwtBggEMQgtBgwEMQQtBhAEMQAtBhQEMPwtBhgEMPgtBhwEMPQtBiAEMPAtBiQEMOwtBigEMOgtBiwEMOQtBjAEMOAtBjQEMNwtBjgEMNgtBjwEMNQtBkAEMNAtBkQEMMwtBkgEMMgtBkwEMMQtBlAEMMAtBlQEMLwtBlgEMLgtBlwEMLQtBmAEMLAtBmQEMKwtBmgEMKgtBmwEMKQtBnAEMKAtBnQEMJwtBngEMJgtBnwEMJQtBoAEMJAtBoQEMIwtBogEMIgtBowEMIQtBpAEMIAtBpQEMHwtBpgEMHgtBpwEMHQtBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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iQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEV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JSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNgIUIAJB0wk2AhAgAkEINgIMQQAhAwycAQtB0QAhAwyCAQsgAS0AAEEwayIAQf8BcUEKSQRAIAIgADoAKiABQQFqIQFBzwAhAwyCAQsgAigCBCEAIAJBADYCBCACIAAgARAoIgBFDYYBIAJB3gA2AhwgAiABNgIUIAIgADYCDEEAIQMMmgELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ2GASACQdwANgIcIAIgATYCFCACIAA2AgxBACEDDJkBCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMhwELIAJB2gA2AhwgAiAFNgIUIAIgADYCDAyYAQtBACEBQQEhAwsgAiADOgArIAVBAWohAwJAAkACQCACLQAtQRBxDQACQAJAAkAgAi0AKg4DAQACBAsgBkUNAwwCCyAADQEMAgsgAUUNAQsgAigCBCEAIAJBADYCBCACIAAgAxAoIgBFBEAgAyEBDAILIAJB2AA2AhwgAiADNgIUIAIgADYCDEEAIQMMmAELIAIoAgQhACACQQA2AgQgAiAAIAMQKCIARQRAIAMhAQyHAQsgAkHZADYCHCACIAM2AhQgAiAANgIMQQAhAwyXAQtBzAAhAwx9CyAAQRVHBEAgAkEANgIcIAIgATYCFCACQZQNNgIQIAJBITYCDEEAIQMMlgELIAJB1wA2AhwgAiABNgIUIAJByRc2AhAgAkEVNgIMQQAhAwyVAQtBACEDIAJBADYCHCACIAE2AhQgAkGAETYCECACQQk2AgwMlAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0AIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIUBCyACKAIEIQBBACEDIAJBADYCBCACIAAgAUEBaiIBECoiAA0MDHcLQTkhAwyDAQsgAi0AMEEgcQ0GQcUBIQMMaQtBACEDIAJBADYCBCACIAEgARAqIgBFDQQgAkE6NgIcIAIgADYCDCACIAFBAWo2AhQMgQELIAItAChBAUcNACACLQAtQQhxRQ0BC0E3IQMMZgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIABEAgAkE7NgIcIAIgADYCDCACIAFBAWo2AhQMfwsgAUEBaiEBDG4LIAJBCDoALAwECyABQQFqIQEMbQtBACEDIAJBADYCHCACIAE2AhQgAkHkEjYCECACQQQ2AgwMewsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ1sIAJBNzYCHCACIAE2AhQgAiAANgIMDHoLIAIgAi8BMEEgcjsBMAtBMCEDDF8LIAJBNjYCHCACIAE2AhQgAiAANgIMDHcLIABBLEcNASABQQFqIQBBASEBAkACQAJAAkACQCACLQAsQQVrDgQDAQIEAAsgACEBDAQLQQIhAQwBC0EEIQELIAJBAToALCACIAIvATAgAXI7ATAgACEBDAELIAIgAi8BMEEIcjsBMCAAIQELQTkhAwxcCyACQQA6ACwLQTQhAwxaCyABIARGBEBBLSEDDHMLAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0EtIQMMdAsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIARQ0CIAJBLDYCHCACIAE2AhQgAiAANgIMDHMLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAS0AAEENRgRAIAIoAgQhAEEAIQMgAkEANgIEIAIgACABECoiAEUEQCABQQFqIQEMAgsgAkEsNgIcIAIgADYCDCACIAFBAWo2AhQMcgsgAi0ALUEBcQRAQcQBIQMMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKiIADQEMZQtBLyEDDFcLIAJBLjYCHCACIAE2AhQgAiAANgIMDG8LQQAhAyACQQA2AhwgAiABNgIUIAJB8BQ2AhAgAkEDNgIMDG4LQQEhAwJAAkACQAJAIAItACxBBWsOBAMBAgAECyACIAIvATBBCHI7ATAMAwtBAiEDDAELQQQhAwsgAkEBOgAsIAIgAi8BMCADcjsBMAtBKiEDDFMLQQAhAyACQQA2AhwgAiABNgIUIAJB4Q82AhAgAkEKNgIMDGsLQQEhAwJAAkACQAJAAkACQCACLQAsQQJrDgcFBAQDAQIABAsgAiACLwEwQQhyOwEwDAMLQQIhAwwBC0EEIQMLIAJBAToALCACIAIvATAgA3I7ATALQSshAwxSC0EAIQMgAkEANgIcIAIgATYCFCACQasSNgIQIAJBCzYCDAxqC0EAIQMgAkEANgIcIAIgATYCFCACQf0NNgIQIAJBHTYCDAxpCyABIARHBEADQCABLQAAQSBHDUggBCABQQFqIgFHDQALQSUhAwxpC0ElIQMMaAsgAi0ALUEBcQRAQcMBIQMMTwsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQKSIABEAgAkEmNgIcIAIgADYCDCACIAFBAWo2AhQMaAsgAUEBaiEBDFwLIAFBAWohASACLwEwIgBBgAFxBEBBACEAAkAgAigCOCIDRQ0AIAMoAlQiA0UNACACIAMRAAAhAAsgAEUNBiAAQRVHDR8gAkEFNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMZwsCQCAAQaAEcUGgBEcNACACLQAtQQJxDQBBACEDIAJBADYCHCACIAE2AhQgAkGWEzYCECACQQQ2AgwMZwsgAgJ/IAIvATBBFHFBFEYEQEEBIAItAChBAUYNARogAi8BMkHlAEYMAQsgAi0AKUEFRgs6AC5BACEAAkAgAigCOCIDRQ0AIAMoAiQiA0UNACACIAMRAAAhAAsCQAJAAkACQAJAIAAOFgIBAAQEBAQEBAQEBAQEBAQEBAQEBAMECyACQQE6AC4LIAIgAi8BMEHAAHI7ATALQSchAwxPCyACQSM2AhwgAiABNgIUIAJBpRY2AhAgAkEVNgIMQQAhAwxnC0EAIQMgAkEANgIcIAIgATYCFCACQdULNgIQIAJBETYCDAxmC0EAIQACQCACKAI4IgNFDQAgAygCLCIDRQ0AIAIgAxEAACEACyAADQELQQ4hAwxLCyAAQRVGBEAgAkECNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMZAtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMYwtBACEDIAJBADYCHCACIAE2AhQgAkGqHDYCECACQQ82AgwMYgsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEgCqdqIgEQKyIARQ0AIAJBBTYCHCACIAE2AhQgAiAANgIMDGELQQ8hAwxHC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxfC0IBIQoLIAFBAWohAQJAIAIpAyAiC0L//////////w9YBEAgAiALQgSGIAqENwMgDAELQQAhAyACQQA2AhwgAiABNgIUIAJBrQk2AhAgAkEMNgIMDF4LQSQhAwxEC0EAIQMgAkEANgIcIAIgATYCFCACQc0TNgIQIAJBDDYCDAxcCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAsIgBFBEAgAUEBaiEBDFILIAJBFzYCHCACIAA2AgwgAiABQQFqNgIUDFsLIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQRY2AhwgAiAANgIMIAIgAUEBajYCFAxbC0EfIQMMQQtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMWQsgAigCBCEAQQAhAyACQQA2AgQgAiAAIAEQLSIARQRAIAFBAWohAQxQCyACQRQ2AhwgAiAANgIMIAIgAUEBajYCFAxYCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABEC0iAEUEQCABQQFqIQEMAQsgAkETNgIcIAIgADYCDCACIAFBAWo2AhQMWAtBHiEDDD4LQQAhAyACQQA2AhwgAiABNgIUIAJBxgw2AhAgAkEjNgIMDFYLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABEC0iAEUEQCABQQFqIQEMTgsgAkERNgIcIAIgADYCDCACIAFBAWo2AhQMVQsgAkEQNgIcIAIgATYCFCACIAA2AgwMVAtBACEDIAJBADYCHCACIAE2AhQgAkHGDDYCECACQSM2AgwMUwtBACEDIAJBADYCHCACIAE2AhQgAkHAFTYCECACQQI2AgwMUgsgAigCBCEAQQAhAyACQQA2AgQCQCACIAAgARAtIgBFBEAgAUEBaiEBDAELIAJBDjYCHCACIAA2AgwgAiABQQFqNgIUDFILQRshAww4C0EAIQMgAkEANgIcIAIgATYCFCACQcYMNgIQIAJBIzYCDAxQCyACKAIEIQBBACEDIAJBADYCBAJAIAIgACABECwiAEUEQCABQQFqIQEMAQsgAkENNgIcIAIgADYCDCACIAFBAWo2AhQMUAtBGiEDDDYLQQAhAyACQQA2AhwgAiABNgIUIAJBmg82AhAgAkEiNgIMDE4LIAIoAgQhAEEAIQMgAkEANgIEAkAgAiAAIAEQLCIARQRAIAFBAWohAQwBCyACQQw2AhwgAiAANgIMIAIgAUEBajYCFAxOC0EZIQMMNAtBACEDIAJBADYCHCACIAE2AhQgAkGaDzYCECACQSI2AgwMTAsgAEEVRwRAQQAhAyACQQA2AhwgAiABNgIUIAJBgww2AhAgAkETNgIMDEwLIAJBCjYCHCACIAE2AhQgAkHkFjYCECACQRU2AgxBACEDDEsLIAIoAgQhAEEAIQMgAkEANgIEIAIgACABIAqnaiIBECsiAARAIAJBBzYCHCACIAE2AhQgAiAANgIMDEsLQRMhAwwxCyAAQRVHBEBBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMSgsgAkEeNgIcIAIgATYCFCACQfkXNgIQIAJBFTYCDEEAIQMMSQtBACEAAkAgAigCOCIDRQ0AIAMoAiwiA0UNACACIAMRAAAhAAsgAEUNQSAAQRVGBEAgAkEDNgIcIAIgATYCFCACQbAYNgIQIAJBFTYCDEEAIQMMSQtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMSAtBACEDIAJBADYCHCACIAE2AhQgAkHaDTYCECACQRQ2AgwMRwtBACEDIAJBADYCHCACIAE2AhQgAkGnDjYCECACQRI2AgwMRgsgAkEAOgAvIAItAC1BBHFFDT8LIAJBADoALyACQQE6ADRBACEDDCsLQQAhAyACQQA2AhwgAkHkETYCECACQQc2AgwgAiABQQFqNgIUDEMLAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB3QEhAwxDCwJAAkAgAi0ANEEBRw0AQQAhAAJAIAIoAjgiA0UNACADKAJYIgNFDQAgAiADEQAAIQALIABFDQAgAEEVRw0BIAJB3AE2AhwgAiABNgIUIAJB1RY2AhAgAkEVNgIMQQAhAwxEC0HBASEDDCoLIAJBADYCHCACIAE2AhQgAkHpCzYCECACQR82AgxBACEDDEILAkACQCACLQAoQQFrDgIEAQALQcABIQMMKQtBuQEhAwwoCyACQQI6AC9BACEAAkAgAigCOCIDRQ0AIAMoAgAiA0UNACACIAMRAAAhAAsgAEUEQEHCASEDDCgLIABBFUcEQCACQQA2AhwgAiABNgIUIAJBpAw2AhAgAkEQNgIMQQAhAwxBCyACQdsBNgIcIAIgATYCFCACQfoWNgIQIAJBFTYCDEEAIQMMQAsgASAERgRAQdoBIQMMQAsgAS0AAEHIAEYNASACQQE6ACgLQawBIQMMJQtBvwEhAwwkCyABIARHBEAgAkEQNgIIIAIgATYCBEG+ASEDDCQLQdkBIQMMPAsgASAERgRAQdgBIQMMPAsgAS0AAEHIAEcNBCABQQFqIQFBvQEhAwwiCyABIARGBEBB1wEhAww7CwJAAkAgAS0AAEHFAGsOEAAFBQUFBQUFBQUFBQUFBQEFCyABQQFqIQFBuwEhAwwiCyABQQFqIQFBvAEhAwwhC0HWASEDIAEgBEYNOSACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGD0ABqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw6CyACKAIEIQAgAkIANwMAIAIgACAGQQFqIgEQJyIARQRAQcYBIQMMIQsgAkHVATYCHCACIAE2AhQgAiAANgIMQQAhAww5C0HUASEDIAEgBEYNOCACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGB0ABqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAw5CyACQYEEOwEoIAIoAgQhACACQgA3AwAgAiAAIAZBAWoiARAnIgANAwwCCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB2Bs2AhAgAkEINgIMDDYLQboBIQMMHAsgAkHTATYCHCACIAE2AhQgAiAANgIMQQAhAww0C0EAIQACQCACKAI4IgNFDQAgAygCOCIDRQ0AIAIgAxEAACEACyAARQ0AIABBFUYNASACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwwzC0HkACEDDBkLIAJB+AA2AhwgAiABNgIUIAJByhg2AhAgAkEVNgIMQQAhAwwxC0HSASEDIAQgASIARg0wIAQgAWsgAigCACIBaiEFIAAgAWtBBGohBgJAA0AgAC0AACABQfzPAGotAABHDQEgAUEERg0DIAFBAWohASAEIABBAWoiAEcNAAsgAiAFNgIADDELIAJBADYCHCACIAA2AhQgAkGQMzYCECACQQg2AgwgAkEANgIAQQAhAwwwCyABIARHBEAgAkEONgIIIAIgATYCBEG3ASEDDBcLQdEBIQMMLwsgAkEANgIAIAZBAWohAQtBuAEhAwwUCyABIARGBEBB0AEhAwwtCyABLQAAQTBrIgBB/wFxQQpJBEAgAiAAOgAqIAFBAWohAUG2ASEDDBQLIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0UIAJBzwE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAsgASAERgRAQc4BIQMMLAsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAIoAgQhACACQQA2AgQgAiAAIAEQKCIARQ0VIAJBzQE2AhwgAiABNgIUIAIgADYCDEEAIQMMLAtBtQEhAwwSCyAEIAEiBUYEQEHMASEDDCsLQQAhAEEBIQFBASEGQQAhAwJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAUtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyEDQQAhAUEAIQYMAgtBCSEDQQEhAEEAIQFBACEGDAELQQAhAUEBIQMLIAIgAzoAKyAFQQFqIQMCQAJAIAItAC1BEHENAAJAAkACQCACLQAqDgMBAAIECyAGRQ0DDAILIAANAQwCCyABRQ0BCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMAwsgAkHJATYCHCACIAM2AhQgAiAANgIMQQAhAwwtCyACKAIEIQAgAkEANgIEIAIgACADECgiAEUEQCADIQEMGAsgAkHKATYCHCACIAM2AhQgAiAANgIMQQAhAwwsCyACKAIEIQAgAkEANgIEIAIgACAFECgiAEUEQCAFIQEMFgsgAkHLATYCHCACIAU2AhQgAiAANgIMDCsLQbQBIQMMEQtBACEAAkAgAigCOCIDRQ0AIAMoAjwiA0UNACACIAMRAAAhAAsCQCAABEAgAEEVRg0BIAJBADYCHCACIAE2AhQgAkGUDTYCECACQSE2AgxBACEDDCsLQbIBIQMMEQsgAkHIATYCHCACIAE2AhQgAkHJFzYCECACQRU2AgxBACEDDCkLIAJBADYCACAGQQFqIQFB9QAhAwwPCyACLQApQQVGBEBB4wAhAwwPC0HiACEDDA4LIAAhASACQQA2AgALIAJBADoALEEJIQMMDAsgAkEANgIAIAdBAWohAUHAACEDDAsLQQELOgAsIAJBADYCACAGQQFqIQELQSkhAwwIC0E4IQMMBwsCQCABIARHBEADQCABLQAAQYA+ai0AACIAQQFHBEAgAEECRw0DIAFBAWohAQwFCyAEIAFBAWoiAUcNAAtBPiEDDCELQT4hAwwgCwsgAkEAOgAsDAELQQshAwwEC0E6IQMMAwsgAUEBaiEBQS0hAwwCCyACIAE6ACwgAkEANgIAIAZBAWohAUEMIQMMAQsgAkEANgIAIAZBAWohAUEKIQMMAAsAC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwXC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwWC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwVC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwUC0EAIQMgAkEANgIcIAIgATYCFCACQc0QNgIQIAJBCTYCDAwTC0EAIQMgAkEANgIcIAIgATYCFCACQekKNgIQIAJBCTYCDAwSC0EAIQMgAkEANgIcIAIgATYCFCACQbcQNgIQIAJBCTYCDAwRC0EAIQMgAkEANgIcIAIgATYCFCACQZwRNgIQIAJBCTYCDAwQC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwPC0EAIQMgAkEANgIcIAIgATYCFCACQZcVNgIQIAJBDzYCDAwOC0EAIQMgAkEANgIcIAIgATYCFCACQcASNgIQIAJBCzYCDAwNC0EAIQMgAkEANgIcIAIgATYCFCACQZUJNgIQIAJBCzYCDAwMC0EAIQMgAkEANgIcIAIgATYCFCACQeEPNgIQIAJBCjYCDAwLC0EAIQMgAkEANgIcIAIgATYCFCACQfsPNgIQIAJBCjYCDAwKC0EAIQMgAkEANgIcIAIgATYCFCACQfEZNgIQIAJBAjYCDAwJC0EAIQMgAkEANgIcIAIgATYCFCACQcQUNgIQIAJBAjYCDAwIC0EAIQMgAkEANgIcIAIgATYCFCACQfIVNgIQIAJBAjYCDAwHCyACQQI2AhwgAiABNgIUIAJBnBo2AhAgAkEWNgIMQQAhAwwGC0EBIQMMBQtB1AAhAyABIARGDQQgCEEIaiEJIAIoAgAhBQJAAkAgASAERwRAIAVB2MIAaiEHIAQgBWogAWshACAFQX9zQQpqIgUgAWohBgNAIAEtAAAgBy0AAEcEQEECIQcMAwsgBUUEQEEAIQcgBiEBDAMLIAVBAWshBSAHQQFqIQcgBCABQQFqIgFHDQALIAAhBSAEIQELIAlBATYCACACIAU2AgAMAQsgAkEANgIAIAkgBzYCAAsgCSABNgIEIAgoAgwhACAIKAIIDgMBBAIACwALIAJBADYCHCACQbUaNgIQIAJBFzYCDCACIABBAWo2AhRBACEDDAILIAJBADYCHCACIAA2AhQgAkHKGjYCECACQQk2AgxBACEDDAELIAEgBEYEQEEiIQMMAQsgAkEJNgIIIAIgATYCBEEhIQMLIAhBEGokACADRQRAIAIoAgwhAAwBCyACIAM2AhxBACEAIAIoAgQiAUUNACACIAEgBCACKAIIEQEAIgFFDQAgAiAENgIUIAIgATYCDCABIQALIAALvgIBAn8gAEEAOgAAIABB3ABqIgFBAWtBADoAACAAQQA6AAIgAEEAOgABIAFBA2tBADoAACABQQJrQQA6AAAgAEEAOgADIAFBBGtBADoAAEEAIABrQQNxIgEgAGoiAEEANgIAQdwAIAFrQXxxIgIgAGoiAUEEa0EANgIAAkAgAkEJSQ0AIABBADYCCCAAQQA2AgQgAUEIa0EANgIAIAFBDGtBADYCACACQRlJDQAgAEEANgIYIABBADYCFCAAQQA2AhAgAEEANgIMIAFBEGtBADYCACABQRRrQQA2AgAgAUEYa0EANgIAIAFBHGtBADYCACACIABBBHFBGHIiAmsiAUEgSQ0AIAAgAmohAANAIABCADcDGCAAQgA3AxAgAEIANwMIIABCADcDACAAQSBqIQAgAUEgayIBQR9LDQALCwtWAQF/AkAgACgCDA0AAkACQAJAAkAgAC0ALw4DAQADAgsgACgCOCIBRQ0AIAEoAiwiAUUNACAAIAERAAAiAQ0DC0EADwsACyAAQcMWNgIQQQ4hAQsgAQsaACAAKAIMRQRAIABB0Rs2AhAgAEEVNgIMCwsUACAAKAIMQRVGBEAgAEEANgIMCwsUACAAKAIMQRZGBEAgAEEANgIMCwsHACAAKAIMCwcAIAAoAhALCQAgACABNgIQCwcAIAAoAhQLFwAgAEEkTwRAAAsgAEECdEGgM2ooAgALFwAgAEEuTwRAAAsgAEECdEGwNGooAgALvwkBAX9B6yghAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HhJw8LQaQhDwtByywPC0H+MQ8LQcAkDwtBqyQPC0GNKA8LQeImDwtBgDAPC0G5Lw8LQdckDwtB7x8PC0HhHw8LQfofDwtB8iAPC0GoLw8LQa4yDwtBiDAPC0HsJw8LQYIiDwtBjh0PC0HQLg8LQcojDwtBxTIPC0HfHA8LQdIcDwtBxCAPC0HXIA8LQaIfDwtB7S4PC0GrMA8LQdQlDwtBzC4PC0H6Lg8LQfwrDwtB0jAPC0HxHQ8LQbsgDwtB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CABB3AgLii1JbnZhbGlkIGNoYXIgaW4gdXJsIHF1ZXJ5AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fYm9keQBDb250ZW50LUxlbmd0aCBvdmVyZmxvdwBDaHVuayBzaXplIG92ZXJmbG93AFJlc3BvbnNlIG92ZXJmbG93AEludmFsaWQgbWV0aG9kIGZvciBIVFRQL3gueCByZXF1ZXN0AEludmFsaWQgbWV0aG9kIGZvciBSVFNQL3gueCByZXF1ZXN0AEV4cGVjdGVkIFNPVVJDRSBtZXRob2QgZm9yIElDRS94LnggcmVxdWVzdABJbnZhbGlkIGNoYXIgaW4gdXJsIGZyYWdtZW50IHN0YXJ0AEV4cGVjdGVkIGRvdABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3N0YXR1cwBJbnZhbGlkIHJlc3BvbnNlIHN0YXR1cwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zAFVzZXIgY2FsbGJhY2sgZXJyb3IAYG9uX3Jlc2V0YCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfaGVhZGVyYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9iZWdpbmAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3N0YXR1c19jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3ZlcnNpb25fY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl91cmxfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl92YWx1ZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXRob2RfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfZmllbGRfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fbmFtZWAgY2FsbGJhY2sgZXJyb3IAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzZXJ2ZXIASW52YWxpZCBoZWFkZXIgdmFsdWUgY2hhcgBJbnZhbGlkIGhlYWRlciBmaWVsZCBjaGFyAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fdmVyc2lvbgBJbnZhbGlkIG1pbm9yIHZlcnNpb24ASW52YWxpZCBtYWpvciB2ZXJzaW9uAEV4cGVjdGVkIHNwYWNlIGFmdGVyIHZlcnNpb24ARXhwZWN0ZWQgQ1JMRiBhZnRlciB2ZXJzaW9uAEludmFsaWQgSFRUUCB2ZXJzaW9uAEludmFsaWQgaGVhZGVyIHRva2VuAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fdXJsAEludmFsaWQgY2hhcmFjdGVycyBpbiB1cmwAVW5leHBlY3RlZCBzdGFydCBjaGFyIGluIHVybABEb3VibGUgQCBpbiB1cmwARW1wdHkgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyYWN0ZXIgaW4gQ29udGVudC1MZW5ndGgARHVwbGljYXRlIENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhciBpbiB1cmwgcGF0aABDb250ZW50LUxlbmd0aCBjYW4ndCBiZSBwcmVzZW50IHdpdGggVHJhbnNmZXItRW5jb2RpbmcASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgc2l6ZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl92YWx1ZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZSB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlZCB2YWx1ZQBQYXVzZWQgYnkgb25faGVhZGVyc19jb21wbGV0ZQBJbnZhbGlkIEVPRiBzdGF0ZQBvbl9yZXNldCBwYXVzZQBvbl9jaHVua19oZWFkZXIgcGF1c2UAb25fbWVzc2FnZV9iZWdpbiBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fdmFsdWUgcGF1c2UAb25fc3RhdHVzX2NvbXBsZXRlIHBhdXNlAG9uX3ZlcnNpb25fY29tcGxldGUgcGF1c2UAb25fdXJsX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl92YWx1ZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXNzYWdlX2NvbXBsZXRlIHBhdXNlAG9uX21ldGhvZF9jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfZmllbGRfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUgcGF1c2UAVW5leHBlY3RlZCBzcGFjZSBhZnRlciBzdGFydCBsaW5lAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBuYW1lAFBhdXNlIG9uIENPTk5FQ1QvVXBncmFkZQBQYXVzZSBvbiBQUkkvVXBncmFkZQBFeHBlY3RlZCBIVFRQLzIgQ29ubmVjdGlvbiBQcmVmYWNlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fbWV0aG9kAEV4cGVjdGVkIHNwYWNlIGFmdGVyIG1ldGhvZABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl9maWVsZABQYXVzZWQASW52YWxpZCB3b3JkIGVuY291bnRlcmVkAEludmFsaWQgbWV0aG9kIGVuY291bnRlcmVkAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2NoZW1hAFJlcXVlc3QgaGFzIGludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYABTV0lUQ0hfUFJPWFkAVVNFX1BST1hZAE1LQUNUSVZJVFkAVU5QUk9DRVNTQUJMRV9FTlRJVFkAQ09QWQBNT1ZFRF9QRVJNQU5FTlRMWQBUT09fRUFSTFkATk9USUZZAEZBSUxFRF9ERVBFTkRFTkNZAEJBRF9HQVRFV0FZAFBMQVkAUFVUAENIRUNLT1VUAEdBVEVXQVlfVElNRU9VVABSRVFVRVNUX1RJTUVPVVQATkVUV09SS19DT05ORUNUX1RJTUVPVVQAQ09OTkVDVElPTl9USU1FT1VUAExPR0lOX1RJTUVPVVQATkVUV09SS19SRUFEX1RJTUVPVVQAUE9TVABNSVNESVJFQ1RFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX0xPQURfQkFMQU5DRURfUkVRVUVTVABCQURfUkVRVUVTVABIVFRQX1JFUVVFU1RfU0VOVF9UT19IVFRQU19QT1JUAFJFUE9SVABJTV9BX1RFQVBPVABSRVNFVF9DT05URU5UAE5PX0NPTlRFTlQAUEFSVElBTF9DT05URU5UAEhQRV9JTlZBTElEX0NPTlNUQU5UAEhQRV9DQl9SRVNFVABHRVQASFBFX1NUUklDVABDT05GTElDVABURU1QT1JBUllfUkVESVJFQ1QAUEVSTUFORU5UX1JFRElSRUNUAENPTk5FQ1QATVVMVElfU1RBVFVTAEhQRV9JTlZBTElEX1NUQVRVUwBUT09fTUFOWV9SRVFVRVNUUwBFQVJMWV9ISU5UUwBVTkFWQUlMQUJMRV9GT1JfTEVHQUxfUkVBU09OUwBPUFRJT05TAFNXSVRDSElOR19QUk9UT0NPTFMAVkFSSUFOVF9BTFNPX05FR09USUFURVMATVVMVElQTEVfQ0hPSUNFUwBJTlRFUk5BTF9TRVJWRVJfRVJST1IAV0VCX1NFUlZFUl9VTktOT1dOX0VSUk9SAFJBSUxHVU5fRVJST1IASURFTlRJVFlfUFJPVklERVJfQVVUSEVOVElDQVRJT05fRVJST1IAU1NMX0NFUlRJRklDQVRFX0VSUk9SAElOVkFMSURfWF9GT1JXQVJERURfRk9SAFNFVF9QQVJBTUVURVIAR0VUX1BBUkFNRVRFUgBIUEVfVVNFUgBTRUVfT1RIRVIASFBFX0NCX0NIVU5LX0hFQURFUgBNS0NBTEVOREFSAFNFVFVQAFdFQl9TRVJWRVJfSVNfRE9XTgBURUFSRE9XTgBIUEVfQ0xPU0VEX0NPTk5FQ1RJT04ASEVVUklTVElDX0VYUElSQVRJT04ARElTQ09OTkVDVEVEX09QRVJBVElPTgBOT05fQVVUSE9SSVRBVElWRV9JTkZPUk1BVElPTgBIUEVfSU5WQUxJRF9WRVJTSU9OAEhQRV9DQl9NRVNTQUdFX0JFR0lOAFNJVEVfSVNfRlJPWkVOAEhQRV9JTlZBTElEX0hFQURFUl9UT0tFTgBJTlZBTElEX1RPS0VOAEZPUkJJRERFTgBFTkhBTkNFX1lPVVJfQ0FMTQBIUEVfSU5WQUxJRF9VUkwAQkxPQ0tFRF9CWV9QQVJFTlRBTF9DT05UUk9MAE1LQ09MAEFDTABIUEVfSU5URVJOQUwAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRV9VTk9GRklDSUFMAEhQRV9PSwBVTkxJTksAVU5MT0NLAFBSSQBSRVRSWV9XSVRIAEhQRV9JTlZBTElEX0NPTlRFTlRfTEVOR1RIAEhQRV9VTkVYUEVDVEVEX0NPTlRFTlRfTEVOR1RIAEZMVVNIAFBST1BQQVRDSABNLVNFQVJDSABVUklfVE9PX0xPTkcAUFJPQ0VTU0lORwBNSVNDRUxMQU5FT1VTX1BFUlNJU1RFTlRfV0FSTklORwBNSVNDRUxMQU5FT1VTX1dBUk5JTkcASFBFX0lOVkFMSURfVFJBTlNGRVJfRU5DT0RJTkcARXhwZWN0ZWQgQ1JMRgBIUEVfSU5WQUxJRF9DSFVOS19TSVpFAE1PVkUAQ09OVElOVUUASFBFX0NCX1NUQVRVU19DT01QTEVURQBIUEVfQ0JfSEVBREVSU19DT01QTEVURQBIUEVfQ0JfVkVSU0lPTl9DT01QTEVURQBIUEVfQ0JfVVJMX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19DT01QTEVURQBIUEVfQ0JfSEVBREVSX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9OQU1FX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAEhQRV9DQl9NRVRIT0RfQ09NUExFVEUASFBFX0NCX0hFQURFUl9GSUVMRF9DT01QTEVURQBERUxFVEUASFBFX0lOVkFMSURfRU9GX1NUQVRFAElOVkFMSURfU1NMX0NFUlRJRklDQVRFAFBBVVNFAE5PX1JFU1BPTlNFAFVOU1VQUE9SVEVEX01FRElBX1RZUEUAR09ORQBOT1RfQUNDRVBUQUJMRQBTRVJWSUNFX1VOQVZBSUxBQkxFAFJBTkdFX05PVF9TQVRJU0ZJQUJMRQBPUklHSU5fSVNfVU5SRUFDSEFCTEUAUkVTUE9OU0VfSVNfU1RBTEUAUFVSR0UATUVSR0UAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRQBSRVFVRVNUX0hFQURFUl9UT09fTEFSR0UAUEFZTE9BRF9UT09fTEFSR0UASU5TVUZGSUNJRU5UX1NUT1JBR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UASFBFX1VORVhQRUNURURfU1BBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABOT1RfRk9VTkQAUFJPUEZJTkQAVU5CSU5EAFJFQklORABVTkFVVEhPUklaRUQATUVUSE9EX05PVF9BTExPV0VEAEhUVFBfVkVSU0lPTl9OT1RfU1VQUE9SVEVEAEFMUkVBRFlfUkVQT1JURUQAQUNDRVBURUQATk9UX0lNUExFTUVOVEVEAExPT1BfREVURUNURUQASFBFX0NSX0VYUEVDVEVEAEhQRV9MRl9FWFBFQ1RFRABDUkVBVEVEAElNX1VTRUQASFBFX1BBVVNFRABUSU1FT1VUX09DQ1VSRUQAUEFZTUVOVF9SRVFVSVJFRABQUkVDT05ESVRJT05fUkVRVUlSRUQAUFJPWFlfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATkVUV09SS19BVVRIRU5USUNBVElPTl9SRVFVSVJFRABMRU5HVEhfUkVRVUlSRUQAU1NMX0NFUlRJRklDQVRFX1JFUVVJUkVEAFVQR1JBREVfUkVRVUlSRUQAUEFHRV9FWFBJUkVEAFBSRUNPTkRJVElPTl9GQUlMRUQARVhQRUNUQVRJT05fRkFJTEVEAFJFVkFMSURBVElPTl9GQUlMRUQAU1NMX0hBTkRTSEFLRV9GQUlMRUQATE9DS0VEAFRSQU5TRk9STUFUSU9OX0FQUExJRUQATk9UX01PRElGSUVEAE5PVF9FWFRFTkRFRABCQU5EV0lEVEhfTElNSVRfRVhDRUVERUQAU0lURV9JU19PVkVSTE9BREVEAEhFQUQARXhwZWN0ZWQgSFRUUC8AAF4TAAAmEwAAMBAAAPAXAACdEwAAFRIAADkXAADwEgAAChAAAHUSAACtEgAAghMAAE8UAAB/EAAAoBUAACMUAACJEgAAixQAAE0VAADUEQAAzxQAABAYAADJFgAA3BYAAMERAADgFwAAuxQAAHQUAAB8FQAA5RQAAAgXAAAfEAAAZRUAAKMUAAAoFQAAAhUAAJkVAAAsEAAAixkAAE8PAADUDgAAahAAAM4QAAACFwAAiQ4AAG4TAAAcEwAAZhQAAFYXAADBEwAAzRMAAGwTAABoFwAAZhcAAF8XAAAiEwAAzg8AAGkOAADYDgAAYxYAAMsTAACqDgAAKBcAACYXAADFEwAAXRYAAOgRAABnEwAAZRMAAPIWAABzEwAAHRcAAPkWAADzEQAAzw4AAM4VAAAMEgAAsxEAAKURAABhEAAAMhcAALsTAEH5NQsBAQBBkDYL4AEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB/TcLAQEAQZE4C14CAwICAgICAAACAgACAgACAgICAgICAgICAAQAAAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAEH9OQsBAQBBkToLXgIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAQfA7Cw1sb3NlZWVwLWFsaXZlAEGJPAsBAQBBoDwL4AEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBiT4LAQEAQaA+C+cBAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAEGwwAALXwEBAAEBAQEBAAABAQABAQABAQEBAQEBAQEBAAAAAAAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAEGQwgALIWVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgBBwMIACy1yYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AQfnCAAsFAQIAAQMAQZDDAAvgAQQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH5xAALBQECAAEDAEGQxQAL4AEEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+cYACwQBAAABAEGRxwAL3wEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv`,`base64`)})),Dt=i(((e,n)=>{let{Buffer:r}=t(`node:buffer`);n.exports=r.from(`AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAZEGxsaHR0cF9nZXRfZXJybm8AGhdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAbF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uABwUbGxodHRwX2dldF9lcnJvcl9wb3MAHRFsbGh0dHBfZXJybm9fbmFtZQAeEmxsaHR0cF9tZXRob2RfbmFtZQAfEmxsaHR0cF9zdGF0dXNfbmFtZQAgGmxsaHR0cF9zZXRfbGVu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PgtBhwEMPQtBiAEMPAtBiQEMOwtBigEMOgtBiwEMOQtBjAEMOAtBjQEMNwtBjgEMNgtBjwEMNQtBkAEMNAtBkQEMMwtBkgEMMgtBkwEMMQtBlAEMMAtBlQEMLwtBlgEMLgtBlwEMLQtBmAEMLAtBmQEMKwtBmgEMKgtBmwEMKQtBnAEMKAtBnQEMJwtBngEMJgtBnwEMJQtBoAEMJAtBoQEMIwtBogEMIgtBowEMIQtBpAEMIAtBpQEMHwtBpgEMHgtBpwEMHQtBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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iQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEV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JSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxB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AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HhJw8LQaQhDwtByywPC0H+MQ8LQcAkDwtBqyQPC0GNKA8LQeImDwtBgDAPC0G5Lw8LQdckDwtB7x8PC0HhHw8LQfofDwtB8iAPC0GoLw8LQa4yDwtBiDAPC0HsJw8LQYIiDwtBjh0PC0HQLg8LQcojDwtBxTIPC0HfHA8LQdIcDwtBxCAPC0HXIA8LQaIfDwtB7S4PC0GrMA8LQdQlDwtBzC4PC0H6Lg8LQfwrDwtB0jAPC0HxHQ8LQbsgDwtB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AAADAEGUCAsFBAAAAAUAQaQICwkGAAAABwAAAAgAQdwIC4otSW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwBB+TULAQEAQZA2C+ABAQECAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQf03CwEBAEGROAteAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgBB/TkLAQEAQZE6C14CAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAEHwOwsNbG9zZWVlcC1hbGl2ZQBBiTwLAQEAQaA8C+ABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQYk+CwEBAEGgPgvnAQEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZABBsMAAC18BAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQBBkMIACyFlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AQcDCAAstcmFuc2Zlci1lbmNvZGluZ3BncmFkZQ0KDQoNClNNDQoNClRUUC9DRS9UU1AvAEH5wgALBQECAAEDAEGQwwAL4AEEAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+cQACwUBAgABAwBBkMUAC+ABBAEBBQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQfnGAAsEAQAAAQBBkccAC98BAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==`,`base64`)})),Ot=i(((e,t)=>{let n=[`GET`,`HEAD`,`POST`],r=new Set(n),i=[101,204,205,304],a=[301,302,303,307,308],o=new Set(a),s=`1.7.9.11.13.15.17.19.20.21.22.23.25.37.42.43.53.69.77.79.87.95.101.102.103.104.109.110.111.113.115.117.119.123.135.137.139.143.161.179.389.427.465.512.513.514.515.526.530.531.532.540.548.554.556.563.587.601.636.989.990.993.995.1719.1720.1723.2049.3659.4045.4190.5060.5061.6000.6566.6665.6666.6667.6668.6669.6679.6697.10080`.split(`.`),c=new Set(s),l=[``,`no-referrer`,`no-referrer-when-downgrade`,`same-origin`,`origin`,`strict-origin`,`origin-when-cross-origin`,`strict-origin-when-cross-origin`,`unsafe-url`],u=new Set(l),d=[`follow`,`manual`,`error`],f=[`GET`,`HEAD`,`OPTIONS`,`TRACE`],p=new Set(f),m=[`navigate`,`same-origin`,`no-cors`,`cors`],h=[`omit`,`same-origin`,`include`],g=[`default`,`no-store`,`reload`,`no-cache`,`force-cache`,`only-if-cached`],v=[`content-encoding`,`content-language`,`content-location`,`content-type`,`content-length`],y=[`half`],b=[`CONNECT`,`TRACE`,`TRACK`],x=new Set(b),S=[`audio`,`audioworklet`,`font`,`image`,`manifest`,`paintworklet`,`script`,`style`,`track`,`video`,`xslt`,``];t.exports={subresource:S,forbiddenMethods:b,requestBodyHeader:v,referrerPolicy:l,requestRedirect:d,requestMode:m,requestCredentials:h,requestCache:g,redirectStatus:a,corsSafeListedMethods:n,nullBodyStatus:i,safeMethods:f,badPorts:s,requestDuplex:y,subresourceSet:new Set(S),badPortsSet:c,redirectStatusSet:o,corsSafeListedMethodsSet:r,safeMethodsSet:p,forbiddenMethodsSet:x,referrerPolicySet:u}})),kt=i(((e,t)=>{let n=Symbol.for(`undici.globalOrigin.1`);function r(){return globalThis[n]}function i(e){if(e===void 0){Object.defineProperty(globalThis,n,{value:void 0,writable:!0,enumerable:!1,configurable:!1});return}let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw TypeError(`Only http & https urls are allowed, received ${t.protocol}`);Object.defineProperty(globalThis,n,{value:t,writable:!0,enumerable:!1,configurable:!1})}t.exports={getGlobalOrigin:r,setGlobalOrigin:i}})),At=i(((e,n)=>{let r=t(`node:assert`),i=new TextEncoder,a=/^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/,o=/[\u000A\u000D\u0009\u0020]/,s=/[\u0009\u000A\u000C\u000D\u0020]/g,c=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function l(e){r(e.protocol===`data:`);let t=u(e,!0);t=t.slice(5);let n={position:0},i=f(`,`,t,n),a=i.length;if(i=T(i,!0,!0),n.position>=t.length)return`failure`;n.position++;let o=p(t.slice(a+1));if(/;(\u0020){0,}base64$/i.test(i)){if(o=y(D(o)),o===`failure`)return`failure`;i=i.slice(0,-6),i=i.replace(/(\u0020)+$/,``),i=i.slice(0,-1)}i.startsWith(`;`)&&(i=`text/plain`+i);let s=v(i);return s===`failure`&&(s=v(`text/plain;charset=US-ASCII`)),{mimeType:s,body:o}}function u(e,t=!1){if(!t)return e.href;let n=e.href,r=e.hash.length,i=r===0?n:n.substring(0,n.length-r);return!r&&n.endsWith(`#`)?i.slice(0,-1):i}function d(e,t,n){let r=``;for(;n.position=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function h(e){return e>=48&&e<=57?e-48:(e&223)-55}function g(e){let t=e.length,n=new Uint8Array(t),r=0;for(let i=0;ie.length)return`failure`;t.position++;let r=f(`;`,e,t);if(r=C(r,!1,!0),r.length===0||!a.test(r))return`failure`;let i=n.toLowerCase(),s=r.toLowerCase(),l={type:i,subtype:s,parameters:new Map,essence:`${i}/${s}`};for(;t.positiono.test(e),e,t);let n=d(e=>e!==`;`&&e!==`=`,e,t);if(n=n.toLowerCase(),t.positione.length)break;let r=null;if(e[t.position]===`"`)r=b(e,t,!0),f(`;`,e,t);else if(r=f(`;`,e,t),r=C(r,!1,!0),r.length===0)continue;n.length!==0&&a.test(n)&&(r.length===0||c.test(r))&&!l.parameters.has(n)&&l.parameters.set(n,r)}return l}function y(e){e=e.replace(s,``);let t=e.length;if(t%4==0&&e.charCodeAt(t-1)===61&&(--t,e.charCodeAt(t-1)===61&&--t),t%4==1||/[^+/0-9A-Za-z]/.test(e.length===t?e:e.substring(0,t)))return`failure`;let n=Buffer.from(e,`base64`);return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}function b(e,t,n){let i=t.position,a=``;for(r(e[t.position]===`"`),t.position++;a+=d(e=>e!==`"`&&e!==`\\`,e,t),!(t.position>=e.length);){let n=e[t.position];if(t.position++,n===`\\`){if(t.position>=e.length){a+=`\\`;break}a+=e[t.position],t.position++}else{r(n===`"`);break}}return n?a:e.slice(i,t.position)}function x(e){r(e!==`failure`);let{parameters:t,essence:n}=e,i=n;for(let[e,n]of t.entries())i+=`;`,i+=e,i+=`=`,a.test(n)||(n=n.replace(/(\\|")/g,`\\$1`),n=`"`+n,n+=`"`),i+=n;return i}function S(e){return e===13||e===10||e===9||e===32}function C(e,t=!0,n=!0){return E(e,t,n,S)}function w(e){return e===13||e===10||e===9||e===12||e===32}function T(e,t=!0,n=!0){return E(e,t,n,w)}function E(e,t,n,r){let i=0,a=e.length-1;if(t)for(;i0&&r(e.charCodeAt(a));)a--;return i===0&&a===e.length-1?e:e.slice(i,a+1)}function D(e){let t=e.length;if(65535>t)return String.fromCharCode.apply(null,e);let n=``,r=0,i=65535;for(;rt&&(i=t-r),n+=String.fromCharCode.apply(null,e.subarray(r,r+=i));return n}function O(e){switch(e.essence){case`application/ecmascript`:case`application/javascript`:case`application/x-ecmascript`:case`application/x-javascript`:case`text/ecmascript`:case`text/javascript`:case`text/javascript1.0`:case`text/javascript1.1`:case`text/javascript1.2`:case`text/javascript1.3`:case`text/javascript1.4`:case`text/javascript1.5`:case`text/jscript`:case`text/livescript`:case`text/x-ecmascript`:case`text/x-javascript`:return`text/javascript`;case`application/json`:case`text/json`:return`application/json`;case`image/svg+xml`:return`image/svg+xml`;case`text/xml`:case`application/xml`:return`application/xml`}return e.subtype.endsWith(`+json`)?`application/json`:e.subtype.endsWith(`+xml`)?`application/xml`:``}n.exports={dataURLProcessor:l,URLSerializer:u,collectASequenceOfCodePoints:d,collectASequenceOfCodePointsFast:f,stringPercentDecode:p,parseMIMEType:v,collectAnHTTPQuotedString:b,serializeAMimeType:x,removeChars:E,removeHTTPWhitespace:C,minimizeSupportedMimeType:O,HTTP_TOKEN_CODEPOINTS:a,isomorphicDecode:D}})),jt=i(((e,n)=>{let{types:r,inspect:i}=t(`node:util`),{markAsUncloneable:a}=t(`node:worker_threads`),{toUSVString:o}=_t(),s={};s.converters={},s.util={},s.errors={},s.errors.exception=function(e){return TypeError(`${e.header}: ${e.message}`)},s.errors.conversionFailed=function(e){let t=e.types.length===1?``:` one of`,n=`${e.argument} could not be converted to${t}: ${e.types.join(`, `)}.`;return s.errors.exception({header:e.prefix,message:n})},s.errors.invalidArgument=function(e){return s.errors.exception({header:e.prefix,message:`"${e.value}" is an invalid ${e.type}.`})},s.brandCheck=function(e,t,n){if(n?.strict!==!1){if(!(e instanceof t)){let e=TypeError(`Illegal invocation`);throw e.code=`ERR_INVALID_THIS`,e}}else if(e?.[Symbol.toStringTag]!==t.prototype[Symbol.toStringTag]){let e=TypeError(`Illegal invocation`);throw e.code=`ERR_INVALID_THIS`,e}},s.argumentLengthCheck=function({length:e},t,n){if(e{}),s.util.ConvertToInt=function(e,t,n,r){let i,a;t===64?(i=2**53-1,a=n===`unsigned`?0:-9007199254740991):n===`unsigned`?(a=0,i=2**t-1):(a=(-2)**t-1,i=2**(t-1)-1);let o=Number(e);if(o===0&&(o=0),r?.enforceRange===!0){if(Number.isNaN(o)||o===1/0||o===-1/0)throw s.errors.exception({header:`Integer conversion`,message:`Could not convert ${s.util.Stringify(e)} to an integer.`});if(o=s.util.IntegerPart(o),oi)throw s.errors.exception({header:`Integer conversion`,message:`Value must be between ${a}-${i}, got ${o}.`});return o}return!Number.isNaN(o)&&r?.clamp===!0?(o=Math.min(Math.max(o,a),i),o=Math.floor(o)%2==0?Math.floor(o):Math.ceil(o),o):Number.isNaN(o)||o===0&&Object.is(0,o)||o===1/0||o===-1/0?0:(o=s.util.IntegerPart(o),o%=2**t,n===`signed`&&o>=2**t-1?o-2**t:o)},s.util.IntegerPart=function(e){let t=Math.floor(Math.abs(e));return e<0?-1*t:t},s.util.Stringify=function(e){switch(s.util.Type(e)){case`Symbol`:return`Symbol(${e.description})`;case`Object`:return i(e);case`String`:return`"${e}"`;default:return`${e}`}},s.sequenceConverter=function(e){return(t,n,r,i)=>{if(s.util.Type(t)!==`Object`)throw s.errors.exception({header:n,message:`${r} (${s.util.Stringify(t)}) is not iterable.`});let a=typeof i==`function`?i():t?.[Symbol.iterator]?.(),o=[],c=0;if(a===void 0||typeof a.next!=`function`)throw s.errors.exception({header:n,message:`${r} is not iterable.`});for(;;){let{done:t,value:i}=a.next();if(t)break;o.push(e(i,n,`${r}[${c++}]`))}return o}},s.recordConverter=function(e,t){return(n,i,a)=>{if(s.util.Type(n)!==`Object`)throw s.errors.exception({header:i,message:`${a} ("${s.util.Type(n)}") is not an Object.`});let o={};if(!r.isProxy(n)){let r=[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)];for(let s of r){let r=e(s,i,a);o[r]=t(n[s],i,a)}return o}let c=Reflect.ownKeys(n);for(let r of c)if(Reflect.getOwnPropertyDescriptor(n,r)?.enumerable){let s=e(r,i,a);o[s]=t(n[r],i,a)}return o}},s.interfaceConverter=function(e){return(t,n,r,i)=>{if(i?.strict!==!1&&!(t instanceof e))throw s.errors.exception({header:n,message:`Expected ${r} ("${s.util.Stringify(t)}") to be an instance of ${e.name}.`});return t}},s.dictionaryConverter=function(e){return(t,n,r)=>{let i=s.util.Type(t),a={};if(i===`Null`||i===`Undefined`)return a;if(i!==`Object`)throw s.errors.exception({header:n,message:`Expected ${t} to be one of: Null, Undefined, Object.`});for(let i of e){let{key:e,defaultValue:o,required:c,converter:l}=i;if(c===!0&&!Object.hasOwn(t,e))throw s.errors.exception({header:n,message:`Missing required key "${e}".`});let u=t[e],d=Object.hasOwn(i,`defaultValue`);if(d&&u!==null&&(u??=o()),c||d||u!==void 0){if(u=l(u,n,`${r}.${e}`),i.allowedValues&&!i.allowedValues.includes(u))throw s.errors.exception({header:n,message:`${u} is not an accepted type. Expected one of ${i.allowedValues.join(`, `)}.`});a[e]=u}}return a}},s.nullableConverter=function(e){return(t,n,r)=>t===null?t:e(t,n,r)},s.converters.DOMString=function(e,t,n,r){if(e===null&&r?.legacyNullToEmptyString)return``;if(typeof e==`symbol`)throw s.errors.exception({header:t,message:`${n} is a symbol, which cannot be converted to a DOMString.`});return String(e)},s.converters.ByteString=function(e,t,n){let r=s.converters.DOMString(e,t,n);for(let e=0;e255)throw TypeError(`Cannot convert argument to a ByteString because the character at index ${e} has a value of ${r.charCodeAt(e)} which is greater than 255.`);return r},s.converters.USVString=o,s.converters.boolean=function(e){return!!e},s.converters.any=function(e){return e},s.converters[`long long`]=function(e,t,n){return s.util.ConvertToInt(e,64,`signed`,void 0,t,n)},s.converters[`unsigned long long`]=function(e,t,n){return s.util.ConvertToInt(e,64,`unsigned`,void 0,t,n)},s.converters[`unsigned long`]=function(e,t,n){return s.util.ConvertToInt(e,32,`unsigned`,void 0,t,n)},s.converters[`unsigned short`]=function(e,t,n,r){return s.util.ConvertToInt(e,16,`unsigned`,r,t,n)},s.converters.ArrayBuffer=function(e,t,n,i){if(s.util.Type(e)!==`Object`||!r.isAnyArrayBuffer(e))throw s.errors.conversionFailed({prefix:t,argument:`${n} ("${s.util.Stringify(e)}")`,types:[`ArrayBuffer`]});if(i?.allowShared===!1&&r.isSharedArrayBuffer(e))throw s.errors.exception({header:`ArrayBuffer`,message:`SharedArrayBuffer is not allowed.`});if(e.resizable||e.growable)throw s.errors.exception({header:`ArrayBuffer`,message:`Received a resizable ArrayBuffer.`});return e},s.converters.TypedArray=function(e,t,n,i,a){if(s.util.Type(e)!==`Object`||!r.isTypedArray(e)||e.constructor.name!==t.name)throw s.errors.conversionFailed({prefix:n,argument:`${i} ("${s.util.Stringify(e)}")`,types:[t.name]});if(a?.allowShared===!1&&r.isSharedArrayBuffer(e.buffer))throw s.errors.exception({header:`ArrayBuffer`,message:`SharedArrayBuffer is not allowed.`});if(e.buffer.resizable||e.buffer.growable)throw s.errors.exception({header:`ArrayBuffer`,message:`Received a resizable ArrayBuffer.`});return e},s.converters.DataView=function(e,t,n,i){if(s.util.Type(e)!==`Object`||!r.isDataView(e))throw s.errors.exception({header:t,message:`${n} is not a DataView.`});if(i?.allowShared===!1&&r.isSharedArrayBuffer(e.buffer))throw s.errors.exception({header:`ArrayBuffer`,message:`SharedArrayBuffer is not allowed.`});if(e.buffer.resizable||e.buffer.growable)throw s.errors.exception({header:`ArrayBuffer`,message:`Received a resizable ArrayBuffer.`});return e},s.converters.BufferSource=function(e,t,n,i){if(r.isAnyArrayBuffer(e))return s.converters.ArrayBuffer(e,t,n,{...i,allowShared:!1});if(r.isTypedArray(e))return s.converters.TypedArray(e,e.constructor,t,n,{...i,allowShared:!1});if(r.isDataView(e))return s.converters.DataView(e,t,n,{...i,allowShared:!1});throw s.errors.conversionFailed({prefix:t,argument:`${n} ("${s.util.Stringify(e)}")`,types:[`BufferSource`]})},s.converters[`sequence`]=s.sequenceConverter(s.converters.ByteString),s.converters[`sequence>`]=s.sequenceConverter(s.converters[`sequence`]),s.converters[`record`]=s.recordConverter(s.converters.ByteString,s.converters.ByteString),n.exports={webidl:s}})),Mt=i(((e,n)=>{let{Transform:r}=t(`node:stream`),i=t(`node:zlib`),{redirectStatusSet:a,referrerPolicySet:o,badPortsSet:s}=Ot(),{getGlobalOrigin:c}=kt(),{collectASequenceOfCodePoints:l,collectAnHTTPQuotedString:u,removeChars:d,parseMIMEType:f}=At(),{performance:p}=t(`node:perf_hooks`),{isBlobLike:m,ReadableStreamFrom:h,isValidHTTPToken:g,normalizedMethodRecordsBase:v}=_t(),y=t(`node:assert`),{isUint8Array:b}=t(`node:util/types`),{webidl:x}=jt(),S=[],C;try{C=t(`node:crypto`);let e=[`sha256`,`sha384`,`sha512`];S=C.getHashes().filter(t=>e.includes(t))}catch{}function w(e){let t=e.urlList,n=t.length;return n===0?null:t[n-1].toString()}function T(e,t){if(!a.has(e.status))return null;let n=e.headersList.get(`location`,!0);return n!==null&&N(n)&&(E(n)||(n=D(n)),n=new URL(n,w(e))),n&&!n.hash&&(n.hash=t),n}function E(e){for(let t=0;t126||n<32)return!1}return!0}function D(e){return Buffer.from(e,`binary`).toString(`utf8`)}function O(e){return e.urlList[e.urlList.length-1]}function k(e){let t=O(e);return W(t)&&s.has(t.port)?`blocked`:`allowed`}function A(e){return e instanceof Error||e?.constructor?.name===`Error`||e?.constructor?.name===`DOMException`}function j(e){for(let t=0;t=32&&n<=126||n>=128&&n<=255))return!1}return!0}let M=g;function N(e){return(e[0]===` `||e[0]===` `||e[e.length-1]===` `||e[e.length-1]===` `||e.includes(` -`)||e.includes(`\r`)||e.includes(`\0`))===!1}function P(e,t){let{headersList:n}=t,r=(n.get(`referrer-policy`,!0)??``).split(`,`),i=``;if(r.length>0)for(let e=r.length;e!==0;e--){let t=r[e-1].trim();if(o.has(t)){i=t;break}}i!==``&&(e.referrerPolicy=i)}function F(){return`allowed`}function I(){return`success`}function L(){return`success`}function R(e){let t=null;t=e.mode,e.headersList.set(`sec-fetch-mode`,t,!0)}function z(e){let t=e.origin;if(!(t===`client`||t===void 0)){if(e.responseTainting===`cors`||e.mode===`websocket`)e.headersList.append(`origin`,t,!0);else if(e.method!==`GET`&&e.method!==`HEAD`){switch(e.referrerPolicy){case`no-referrer`:t=null;break;case`no-referrer-when-downgrade`:case`strict-origin`:case`strict-origin-when-cross-origin`:e.origin&&Oe(e.origin)&&!Oe(O(e))&&(t=null);break;case`same-origin`:pe(e,O(e))||(t=null);break;default:}e.headersList.append(`origin`,t,!0)}}}function ee(e,t){return e}function B(e,t,n){return!e?.startTime||e.startTime4096&&(r=i);let a=pe(e,r),o=ae(r)&&!ae(e.url);switch(t){case`origin`:return i??ie(n,!0);case`unsafe-url`:return r;case`same-origin`:return a?i:`no-referrer`;case`origin-when-cross-origin`:return a?r:i;case`strict-origin-when-cross-origin`:{let t=O(e);return pe(r,t)?r:ae(r)&&!ae(t)?`no-referrer`:i}default:return o?`no-referrer`:i}}function ie(e,t){return y(e instanceof URL),e=new URL(e),e.protocol===`file:`||e.protocol===`about:`||e.protocol===`blank:`?`no-referrer`:(e.username=``,e.password=``,e.hash=``,t&&(e.pathname=``,e.search=``),e)}function ae(e){if(!(e instanceof URL))return!1;if(e.href===`about:blank`||e.href===`about:srcdoc`||e.protocol===`data:`||e.protocol===`file:`)return!0;return t(e.origin);function t(e){if(e==null||e===`null`)return!1;let t=new URL(e);return!!(t.protocol===`https:`||t.protocol===`wss:`||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(t.hostname)||t.hostname===`localhost`||t.hostname.includes(`localhost.`)||t.hostname.endsWith(`.localhost`))}}function oe(e,t){if(C===void 0)return!0;let n=ce(t);if(n===`no metadata`||n.length===0)return!0;let r=ue(n,le(n));for(let t of r){let n=t.algo,r=t.hash,i=C.createHash(n).update(e).digest(`base64`);if(i[i.length-1]===`=`&&(i=i[i.length-2]===`=`?i.slice(0,-2):i.slice(0,-1)),de(i,r))return!0}return!1}let se=/(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function ce(e){let t=[],n=!0;for(let r of e.split(` `)){n=!1;let e=se.exec(r);if(e===null||e.groups===void 0||e.groups.algo===void 0)continue;let i=e.groups.algo.toLowerCase();S.includes(i)&&t.push(e.groups)}return n===!0?`no metadata`:t}function le(e){let t=e[0].algo;if(t[3]===`5`)return t;for(let n=1;n{e=n,t=r}),resolve:e,reject:t}}function he(e){return e.controller.state===`aborted`}function ge(e){return e.controller.state===`aborted`||e.controller.state===`terminated`}function _e(e){return v[e.toLowerCase()]??e}function U(e){let t=JSON.stringify(e);if(t===void 0)throw TypeError(`Value is not JSON serializable`);return y(typeof t==`string`),t}let ve=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function ye(e,t,n=0,r=1){class i{#e;#t;#n;constructor(e,t){this.#e=e,this.#t=t,this.#n=0}next(){if(typeof this!=`object`||this===null||!(#e in this))throw TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`);let i=this.#n,a=this.#e[t];if(i>=a.length)return{value:void 0,done:!0};let{[n]:o,[r]:s}=a[i];this.#n=i+1;let c;switch(this.#t){case`key`:c=o;break;case`value`:c=s;break;case`key+value`:c=[o,s];break}return{value:c,done:!1}}}return delete i.prototype.constructor,Object.setPrototypeOf(i.prototype,ve),Object.defineProperties(i.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${e} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(e,t){return new i(e,t)}}function be(e,t,n,r=0,i=1){let a=ye(e,n,r,i),o={keys:{writable:!0,enumerable:!0,configurable:!0,value:function(){return x.brandCheck(this,t),a(this,`key`)}},values:{writable:!0,enumerable:!0,configurable:!0,value:function(){return x.brandCheck(this,t),a(this,`value`)}},entries:{writable:!0,enumerable:!0,configurable:!0,value:function(){return x.brandCheck(this,t),a(this,`key+value`)}},forEach:{writable:!0,enumerable:!0,configurable:!0,value:function(n,r=globalThis){if(x.brandCheck(this,t),x.argumentLengthCheck(arguments,1,`${e}.forEach`),typeof n!=`function`)throw TypeError(`Failed to execute 'forEach' on '${e}': parameter 1 is not of type 'Function'.`);for(let{0:e,1:t}of a(this,`key+value`))n.call(r,t,e,this)}}};return Object.defineProperties(t.prototype,{...o,[Symbol.iterator]:{writable:!0,enumerable:!1,configurable:!0,value:o.entries.value}})}async function xe(e,t,n){let r=t,i=n,a;try{a=e.stream.getReader()}catch(e){i(e);return}try{r(await Ee(a))}catch(e){i(e)}}function Se(e){return e instanceof ReadableStream||e[Symbol.toStringTag]===`ReadableStream`&&typeof e.tee==`function`}function Ce(e){try{e.close(),e.byobRequest?.respond(0)}catch(e){if(!e.message.includes(`Controller is already closed`)&&!e.message.includes(`ReadableStream is already closed`))throw e}}let we=/[^\x00-\xFF]/;function Te(e){return y(!we.test(e)),e}async function Ee(e){let t=[],n=0;for(;;){let{done:r,value:i}=await e.read();if(r)return Buffer.concat(t,n);if(!b(i))throw TypeError(`Received non-Uint8Array chunk`);t.push(i),n+=i.length}}function De(e){y(`protocol`in e);let t=e.protocol;return t===`about:`||t===`blob:`||t===`data:`}function Oe(e){return typeof e==`string`&&e[5]===`:`&&e[0]===`h`&&e[1]===`t`&&e[2]===`t`&&e[3]===`p`&&e[4]===`s`||e.protocol===`https:`}function W(e){y(`protocol`in e);let t=e.protocol;return t===`http:`||t===`https:`}function ke(e,t){let n=e;if(!n.startsWith(`bytes`))return`failure`;let r={position:5};if(t&&l(e=>e===` `||e===` `,n,r),n.charCodeAt(r.position)!==61)return`failure`;r.position++,t&&l(e=>e===` `||e===` `,n,r);let i=l(e=>{let t=e.charCodeAt(0);return t>=48&&t<=57},n,r),a=i.length?Number(i):null;if(t&&l(e=>e===` `||e===` `,n,r),n.charCodeAt(r.position)!==45)return`failure`;r.position++,t&&l(e=>e===` `||e===` `,n,r);let o=l(e=>{let t=e.charCodeAt(0);return t>=48&&t<=57},n,r),s=o.length?Number(o):null;return r.positions?`failure`:{rangeStartValue:a,rangeEndValue:s}}function Ae(e,t,n){let r=`bytes `;return r+=Te(`${e}`),r+=`-`,r+=Te(`${t}`),r+=`/`,r+=Te(`${n}`),r}var je=class extends r{#e;constructor(e){super(),this.#e=e}_transform(e,t,n){if(!this._inflateStream){if(e.length===0){n();return}this._inflateStream=(e[0]&15)==8?i.createInflate(this.#e):i.createInflateRaw(this.#e),this._inflateStream.on(`data`,this.push.bind(this)),this._inflateStream.on(`end`,()=>this.push(null)),this._inflateStream.on(`error`,e=>this.destroy(e))}this._inflateStream.write(e,t,n)}_final(e){this._inflateStream&&=(this._inflateStream.end(),null),e()}};function Me(e){return new je(e)}function Ne(e){let t=null,n=null,r=null,i=Fe(`content-type`,e);if(i===null)return`failure`;for(let e of i){let i=f(e);i===`failure`||i.essence===`*/*`||(r=i,r.essence===n?!r.parameters.has(`charset`)&&t!==null&&r.parameters.set(`charset`,t):(t=null,r.parameters.has(`charset`)&&(t=r.parameters.get(`charset`)),n=r.essence))}return r??`failure`}function Pe(e){let t=e,n={position:0},r=[],i=``;for(;n.positione!==`"`&&e!==`,`,t,n),n.positione===9||e===32),r.push(i),i=``}return r}function Fe(e,t){let n=t.get(e,!0);return n===null?null:Pe(n)}let Ie=new TextDecoder;function Le(e){return e.length===0?``:(e[0]===239&&e[1]===187&&e[2]===191&&(e=e.subarray(3)),Ie.decode(e))}var Re=class{get baseUrl(){return c()}get origin(){return this.baseUrl?.origin}policyContainer=ne()};n.exports={isAborted:he,isCancelled:ge,isValidEncodedURL:E,createDeferredPromise:me,ReadableStreamFrom:h,tryUpgradeRequestToAPotentiallyTrustworthyURL:fe,clampAndCoarsenConnectionTimingInfo:B,coarsenedSharedCurrentTime:te,determineRequestsReferrer:H,makePolicyContainer:ne,clonePolicyContainer:re,appendFetchMetadata:R,appendRequestOriginHeader:z,TAOCheck:L,corsCheck:I,crossOriginResourcePolicyCheck:F,createOpaqueTimingInfo:V,setRequestReferrerPolicyOnRedirect:P,isValidHTTPToken:g,requestBadPort:k,requestCurrentURL:O,responseURL:w,responseLocationURL:T,isBlobLike:m,isURLPotentiallyTrustworthy:ae,isValidReasonPhrase:j,sameOrigin:pe,normalizeMethod:_e,serializeJavascriptValueToJSONString:U,iteratorMixin:be,createIterator:ye,isValidHeaderName:M,isValidHeaderValue:N,isErrorLike:A,fullyReadBody:xe,bytesMatch:oe,isReadableStreamLike:Se,readableStreamClose:Ce,isomorphicEncode:Te,urlIsLocal:De,urlHasHttpsScheme:Oe,urlIsHttpHttpsScheme:W,readAllBytes:Ee,simpleRangeHeaderValue:ke,buildContentRange:Ae,parseMetadata:ce,createInflate:Me,extractMimeType:Ne,getDecodeSplit:Fe,utf8DecodeBytes:Le,environmentSettingsObject:new class{settingsObject=new Re}}})),Nt=i(((e,t)=>{t.exports={kUrl:Symbol(`url`),kHeaders:Symbol(`headers`),kSignal:Symbol(`signal`),kState:Symbol(`state`),kDispatcher:Symbol(`dispatcher`)}})),Pt=i(((e,n)=>{let{Blob:r,File:i}=t(`node:buffer`),{kState:a}=Nt(),{webidl:o}=jt();var s=class e{constructor(e,t,n={}){let r=t,i=n.type,o=n.lastModified??Date.now();this[a]={blobLike:e,name:r,type:i,lastModified:o}}stream(...t){return o.brandCheck(this,e),this[a].blobLike.stream(...t)}arrayBuffer(...t){return o.brandCheck(this,e),this[a].blobLike.arrayBuffer(...t)}slice(...t){return o.brandCheck(this,e),this[a].blobLike.slice(...t)}text(...t){return o.brandCheck(this,e),this[a].blobLike.text(...t)}get size(){return o.brandCheck(this,e),this[a].blobLike.size}get type(){return o.brandCheck(this,e),this[a].blobLike.type}get name(){return o.brandCheck(this,e),this[a].name}get lastModified(){return o.brandCheck(this,e),this[a].lastModified}get[Symbol.toStringTag](){return`File`}};o.converters.Blob=o.interfaceConverter(r);function c(e){return e instanceof i||e&&(typeof e.stream==`function`||typeof e.arrayBuffer==`function`)&&e[Symbol.toStringTag]===`File`}n.exports={FileLike:s,isFileLike:c}})),Ft=i(((e,n)=>{let{isBlobLike:r,iteratorMixin:i}=Mt(),{kState:a}=Nt(),{kEnumerableProperty:o}=_t(),{FileLike:s,isFileLike:c}=Pt(),{webidl:l}=jt(),{File:u}=t(`node:buffer`),d=t(`node:util`),f=globalThis.File??u;var p=class e{constructor(e){if(l.util.markAsUncloneable(this),e!==void 0)throw l.errors.conversionFailed({prefix:`FormData constructor`,argument:`Argument 1`,types:[`undefined`]});this[a]=[]}append(t,n,i=void 0){l.brandCheck(this,e);let o=`FormData.append`;if(l.argumentLengthCheck(arguments,2,o),arguments.length===3&&!r(n))throw TypeError(`Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'`);t=l.converters.USVString(t,o,`name`),n=r(n)?l.converters.Blob(n,o,`value`,{strict:!1}):l.converters.USVString(n,o,`value`),i=arguments.length===3?l.converters.USVString(i,o,`filename`):void 0;let s=m(t,n,i);this[a].push(s)}delete(t){l.brandCheck(this,e);let n=`FormData.delete`;l.argumentLengthCheck(arguments,1,n),t=l.converters.USVString(t,n,`name`),this[a]=this[a].filter(e=>e.name!==t)}get(t){l.brandCheck(this,e);let n=`FormData.get`;l.argumentLengthCheck(arguments,1,n),t=l.converters.USVString(t,n,`name`);let r=this[a].findIndex(e=>e.name===t);return r===-1?null:this[a][r].value}getAll(t){l.brandCheck(this,e);let n=`FormData.getAll`;return l.argumentLengthCheck(arguments,1,n),t=l.converters.USVString(t,n,`name`),this[a].filter(e=>e.name===t).map(e=>e.value)}has(t){l.brandCheck(this,e);let n=`FormData.has`;return l.argumentLengthCheck(arguments,1,n),t=l.converters.USVString(t,n,`name`),this[a].findIndex(e=>e.name===t)!==-1}set(t,n,i=void 0){l.brandCheck(this,e);let o=`FormData.set`;if(l.argumentLengthCheck(arguments,2,o),arguments.length===3&&!r(n))throw TypeError(`Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'`);t=l.converters.USVString(t,o,`name`),n=r(n)?l.converters.Blob(n,o,`name`,{strict:!1}):l.converters.USVString(n,o,`name`),i=arguments.length===3?l.converters.USVString(i,o,`name`):void 0;let s=m(t,n,i),c=this[a].findIndex(e=>e.name===t);c===-1?this[a].push(s):this[a]=[...this[a].slice(0,c),s,...this[a].slice(c+1).filter(e=>e.name!==t)]}[d.inspect.custom](e,t){let n=this[a].reduce((e,t)=>(e[t.name]?Array.isArray(e[t.name])?e[t.name].push(t.value):e[t.name]=[e[t.name],t.value]:e[t.name]=t.value,e),{__proto__:null});t.depth??=e,t.colors??=!0;let r=d.formatWithOptions(t,n);return`FormData ${r.slice(r.indexOf(`]`)+2)}`}};i(`FormData`,p,a,`name`,`value`),Object.defineProperties(p.prototype,{append:o,delete:o,get:o,getAll:o,has:o,set:o,[Symbol.toStringTag]:{value:`FormData`,configurable:!0}});function m(e,t,n){if(typeof t!=`string`&&(c(t)||(t=t instanceof Blob?new f([t],`blob`,{type:t.type}):new s(t,`blob`,{type:t.type})),n!==void 0)){let e={type:t.type,lastModified:t.lastModified};t=t instanceof u?new f([t],n,e):new s(t,n,e)}return{name:e,value:t}}n.exports={FormData:p,makeEntry:m}})),It=i(((e,n)=>{let{isUSVString:r,bufferToLowerCasedHeaderName:i}=_t(),{utf8DecodeBytes:a}=Mt(),{HTTP_TOKEN_CODEPOINTS:o,isomorphicDecode:s}=At(),{isFileLike:c}=Pt(),{makeEntry:l}=Ft(),u=t(`node:assert`),{File:d}=t(`node:buffer`),f=globalThis.File??d,p=Buffer.from(`form-data; name="`),m=Buffer.from(`; filename`),h=Buffer.from(`--`),g=Buffer.from(`--\r +import{a as e,i as t,o as n,r,t as i}from"./chunk-Bdh3yLIe.js";import{t as a}from"./dist-cjs-BU-OH1DU.js";import{n as o,t as s}from"./client-D8hez-QA.js";import{r as c,t as l}from"./dist-cjs-BKjtSutv.js";import{B as u,E as d,F as f,I as p,L as m,N as h,P as g,R as v,T as y,t as b}from"./dist-cjs-CHwZlzSt.js";import{D as x,E as S,M as C,N as w,O as T,T as E,_ as D,a as O,b as k,d as A,f as j,g as M,h as N,i as P,j as F,m as I,n as L,o as R,p as z,r as ee,s as B,t as te,v as V,y as ne}from"./dist-cjs-DAPjxWOj.js";import{t as re}from"./dist-cjs-BLKf4vef.js";import{t as H}from"./dist-cjs-DJKA3UWR.js";import{t as ie}from"./dist-cjs-Dia4jG8x.js";import{t as ae}from"./dist-cjs-DHscMTSt.js";import{t as oe}from"./dist-cjs-B8H8-RPI.js";import se from"node:process";import*as ce from"os";import le,{EOL as ue}from"os";import*as de from"crypto";import*as fe from"fs";import{constants as pe,existsSync as me,promises as he,readFileSync as ge,writeFileSync as _e}from"fs";import*as U from"path";import{normalize as ve,resolve as ye}from"path";import*as be from"http";import*as xe from"https";import*as Se from"events";import{EventEmitter as Ce}from"events";import we,{ok as Te}from"assert";import*as Ee from"util";import*as De from"node:net";import Oe from"node:http";import{Readable as W,Transform as ke}from"node:stream";import Ae from"node:buffer";import je,{inspect as Me}from"node:util";import Ne from"node:zlib";import{createHmac as Pe}from"node:crypto";import{pathToFileURL as Fe}from"node:url";import{StringDecoder as Ie}from"string_decoder";import*as Le from"child_process";import{setTimeout as Re}from"timers";import*as ze from"node:fs/promises";import*as Be from"node:path";import{spawnSync as Ve}from"node:child_process";import*as He from"node:os";import Ue,{EOL as We}from"node:os";import*as Ge from"node:fs";import Ke from"node:fs";import{pipeline as qe}from"node:stream/promises";import*as Je from"buffer";import{Buffer as G}from"buffer";import*as Ye from"stream";import{Readable as Xe}from"stream";import Ze from"node:https";import Qe,{realpath as $e}from"fs/promises";import{URL as et}from"url";function tt(e){return e==null?``:typeof e==`string`||e instanceof String?e:JSON.stringify(e)}function nt(e){return Object.keys(e).length?{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}:{}}function rt(e,t,n){let r=new it(e,t,n);process.stdout.write(r.toString()+ce.EOL)}var it=class{constructor(e,t,n){e||=`missing.command`,this.command=e,this.properties=t,this.message=n}toString(){let e=`::`+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=` `;let t=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let r=this.properties[n];r&&(t?t=!1:e+=`,`,e+=`${n}=${ot(r)}`)}}return e+=`::${at(this.message)}`,e}};function at(e){return tt(e).replace(/%/g,`%25`).replace(/\r/g,`%0D`).replace(/\n/g,`%0A`)}function ot(e){return tt(e).replace(/%/g,`%25`).replace(/\r/g,`%0D`).replace(/\n/g,`%0A`).replace(/:/g,`%3A`).replace(/,/g,`%2C`)}function st(e,t){let n=process.env[`GITHUB_${e}`];if(!n)throw Error(`Unable to find environment variable for file command ${e}`);if(!fe.existsSync(n))throw Error(`Missing file at path: ${n}`);fe.appendFileSync(n,`${tt(t)}${ce.EOL}`,{encoding:`utf8`})}function ct(e,t){let n=`ghadelimiter_${de.randomUUID()}`,r=tt(t);if(e.includes(n))throw Error(`Unexpected input: name should not contain the delimiter "${n}"`);if(r.includes(n))throw Error(`Unexpected input: value should not contain the delimiter "${n}"`);return`${e}<<${n}${ce.EOL}${r}${ce.EOL}${n}`}function lt(e){let t=e.protocol===`https:`;if(ut(e))return;let n=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(n)try{return new ft(n)}catch{if(!n.startsWith(`http://`)&&!n.startsWith(`https://`))return new ft(`http://${n}`)}else return}function ut(e){if(!e.hostname)return!1;let t=e.hostname;if(dt(t))return!0;let n=process.env.no_proxy||process.env.NO_PROXY||``;if(!n)return!1;let r;e.port?r=Number(e.port):e.protocol===`http:`?r=80:e.protocol===`https:`&&(r=443);let i=[e.hostname.toUpperCase()];typeof r==`number`&&i.push(`${i[0]}:${r}`);for(let e of n.split(`,`).map(e=>e.trim().toUpperCase()).filter(e=>e))if(e===`*`||i.some(t=>t===e||t.endsWith(`.${e}`)||e.startsWith(`.`)&&t.endsWith(`${e}`)))return!0;return!1}function dt(e){let t=e.toLowerCase();return t===`localhost`||t.startsWith(`127.`)||t.startsWith(`[::1]`)||t.startsWith(`[0:0:0:0:0:0:0:1]`)}var ft=class extends URL{constructor(e,t){super(e,t),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}},pt=i((e=>{t(`net`);var n=t(`tls`),r=t(`http`),i=t(`https`),a=t(`events`);t(`assert`);var o=t(`util`);e.httpOverHttp=s,e.httpsOverHttp=c,e.httpOverHttps=l,e.httpsOverHttps=u;function s(e){var t=new d(e);return t.request=r.request,t}function c(e){var t=new d(e);return t.request=r.request,t.createSocket=f,t.defaultPort=443,t}function l(e){var t=new d(e);return t.request=i.request,t}function u(e){var t=new d(e);return t.request=i.request,t.createSocket=f,t.defaultPort=443,t}function d(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||r.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on(`free`,function(e,n,r,i){for(var a=p(n,r,i),o=0,s=t.requests.length;o=this.maxSockets){i.requests.push(a);return}i.createSocket(a,function(t){t.on(`free`,n),t.on(`close`,r),t.on(`agentRemove`,r),e.onSocket(t);function n(){i.emit(`free`,t,a)}function r(e){i.removeSocket(t),t.removeListener(`free`,n),t.removeListener(`close`,r),t.removeListener(`agentRemove`,r)}})},d.prototype.createSocket=function(e,t){var n=this,r={};n.sockets.push(r);var i=m({},n.proxyOptions,{method:`CONNECT`,path:e.host+`:`+e.port,agent:!1,headers:{host:e.host+`:`+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers[`Proxy-Authorization`]=`Basic `+new Buffer(i.proxyAuth).toString(`base64`)),h(`making CONNECT request`);var a=n.request(i);a.useChunkedEncodingByDefault=!1,a.once(`response`,o),a.once(`upgrade`,s),a.once(`connect`,c),a.once(`error`,l),a.end();function o(e){e.upgrade=!0}function s(e,t,n){process.nextTick(function(){c(e,t,n)})}function c(i,o,s){if(a.removeAllListeners(),o.removeAllListeners(),i.statusCode!==200){h(`tunneling socket could not be established, statusCode=%d`,i.statusCode),o.destroy();var c=Error(`tunneling socket could not be established, statusCode=`+i.statusCode);c.code=`ECONNRESET`,e.request.emit(`error`,c),n.removeSocket(r);return}if(s.length>0){h(`got illegal response body from proxy`),o.destroy();var c=Error(`got illegal response body from proxy`);c.code=`ECONNRESET`,e.request.emit(`error`,c),n.removeSocket(r);return}return h(`tunneling connection has established`),n.sockets[n.sockets.indexOf(r)]=o,t(o)}function l(t){a.removeAllListeners(),h(`tunneling socket could not be established, cause=%s +`,t.message,t.stack);var i=Error(`tunneling socket could not be established, cause=`+t.message);i.code=`ECONNRESET`,e.request.emit(`error`,i),n.removeSocket(r)}},d.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(t!==-1){this.sockets.splice(t,1);var n=this.requests.shift();n&&this.createSocket(n,function(e){n.request.onSocket(e)})}};function f(e,t){var r=this;d.prototype.createSocket.call(r,e,function(i){var a=e.request.getHeader(`host`),o=m({},r.options,{socket:i,servername:a?a.replace(/:.*$/,``):e.host}),s=n.connect(0,o);r.sockets[r.sockets.indexOf(i)]=s,t(s)})}function p(e,t,n){return typeof e==`string`?{host:e,port:t,localAddress:n}:e}function m(e){for(var t=1,n=arguments.length;t{t.exports=pt()})),ht=i(((e,t)=>{t.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`)}})),gt=i(((e,t)=>{let n=Symbol.for(`undici.error.UND_ERR`);var r=class extends Error{constructor(e){super(e),this.name=`UndiciError`,this.code=`UND_ERR`}static[Symbol.hasInstance](e){return e&&e[n]===!0}[n]=!0};let i=Symbol.for(`undici.error.UND_ERR_CONNECT_TIMEOUT`);var a=class extends r{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[i]===!0}[i]=!0};let o=Symbol.for(`undici.error.UND_ERR_HEADERS_TIMEOUT`);var s=class extends r{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[o]===!0}[o]=!0};let c=Symbol.for(`undici.error.UND_ERR_HEADERS_OVERFLOW`);var l=class extends r{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[c]===!0}[c]=!0};let u=Symbol.for(`undici.error.UND_ERR_BODY_TIMEOUT`);var d=class extends r{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[u]===!0}[u]=!0};let f=Symbol.for(`undici.error.UND_ERR_RESPONSE_STATUS_CODE`);var p=class extends r{constructor(e,t,n,r){super(e),this.name=`ResponseStatusCodeError`,this.message=e||`Response Status Code Error`,this.code=`UND_ERR_RESPONSE_STATUS_CODE`,this.body=r,this.status=t,this.statusCode=t,this.headers=n}static[Symbol.hasInstance](e){return e&&e[f]===!0}[f]=!0};let m=Symbol.for(`undici.error.UND_ERR_INVALID_ARG`);var h=class extends r{constructor(e){super(e),this.name=`InvalidArgumentError`,this.message=e||`Invalid Argument Error`,this.code=`UND_ERR_INVALID_ARG`}static[Symbol.hasInstance](e){return e&&e[m]===!0}[m]=!0};let g=Symbol.for(`undici.error.UND_ERR_INVALID_RETURN_VALUE`);var v=class extends r{constructor(e){super(e),this.name=`InvalidReturnValueError`,this.message=e||`Invalid Return Value Error`,this.code=`UND_ERR_INVALID_RETURN_VALUE`}static[Symbol.hasInstance](e){return e&&e[g]===!0}[g]=!0};let y=Symbol.for(`undici.error.UND_ERR_ABORT`);var b=class extends r{constructor(e){super(e),this.name=`AbortError`,this.message=e||`The operation was aborted`,this.code=`UND_ERR_ABORT`}static[Symbol.hasInstance](e){return e&&e[y]===!0}[y]=!0};let x=Symbol.for(`undici.error.UND_ERR_ABORTED`);var S=class extends b{constructor(e){super(e),this.name=`AbortError`,this.message=e||`Request aborted`,this.code=`UND_ERR_ABORTED`}static[Symbol.hasInstance](e){return e&&e[x]===!0}[x]=!0};let C=Symbol.for(`undici.error.UND_ERR_INFO`);var w=class extends r{constructor(e){super(e),this.name=`InformationalError`,this.message=e||`Request information`,this.code=`UND_ERR_INFO`}static[Symbol.hasInstance](e){return e&&e[C]===!0}[C]=!0};let T=Symbol.for(`undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH`);var E=class extends r{constructor(e){super(e),this.name=`RequestContentLengthMismatchError`,this.message=e||`Request body length does not match content-length header`,this.code=`UND_ERR_REQ_CONTENT_LENGTH_MISMATCH`}static[Symbol.hasInstance](e){return e&&e[T]===!0}[T]=!0};let D=Symbol.for(`undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH`);var O=class extends r{constructor(e){super(e),this.name=`ResponseContentLengthMismatchError`,this.message=e||`Response body length does not match content-length header`,this.code=`UND_ERR_RES_CONTENT_LENGTH_MISMATCH`}static[Symbol.hasInstance](e){return e&&e[D]===!0}[D]=!0};let k=Symbol.for(`undici.error.UND_ERR_DESTROYED`);var A=class extends r{constructor(e){super(e),this.name=`ClientDestroyedError`,this.message=e||`The client is destroyed`,this.code=`UND_ERR_DESTROYED`}static[Symbol.hasInstance](e){return e&&e[k]===!0}[k]=!0};let j=Symbol.for(`undici.error.UND_ERR_CLOSED`);var M=class extends r{constructor(e){super(e),this.name=`ClientClosedError`,this.message=e||`The client is closed`,this.code=`UND_ERR_CLOSED`}static[Symbol.hasInstance](e){return e&&e[j]===!0}[j]=!0};let N=Symbol.for(`undici.error.UND_ERR_SOCKET`);var P=class extends r{constructor(e,t){super(e),this.name=`SocketError`,this.message=e||`Socket error`,this.code=`UND_ERR_SOCKET`,this.socket=t}static[Symbol.hasInstance](e){return e&&e[N]===!0}[N]=!0};let F=Symbol.for(`undici.error.UND_ERR_NOT_SUPPORTED`);var I=class extends r{constructor(e){super(e),this.name=`NotSupportedError`,this.message=e||`Not supported error`,this.code=`UND_ERR_NOT_SUPPORTED`}static[Symbol.hasInstance](e){return e&&e[F]===!0}[F]=!0};let L=Symbol.for(`undici.error.UND_ERR_BPL_MISSING_UPSTREAM`);var R=class extends r{constructor(e){super(e),this.name=`MissingUpstreamError`,this.message=e||`No upstream has been added to the BalancedPool`,this.code=`UND_ERR_BPL_MISSING_UPSTREAM`}static[Symbol.hasInstance](e){return e&&e[L]===!0}[L]=!0};let z=Symbol.for(`undici.error.UND_ERR_HTTP_PARSER`);var ee=class extends Error{constructor(e,t,n){super(e),this.name=`HTTPParserError`,this.code=t?`HPE_${t}`:void 0,this.data=n?n.toString():void 0}static[Symbol.hasInstance](e){return e&&e[z]===!0}[z]=!0};let B=Symbol.for(`undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE`);var te=class extends r{constructor(e){super(e),this.name=`ResponseExceededMaxSizeError`,this.message=e||`Response content exceeded max size`,this.code=`UND_ERR_RES_EXCEEDED_MAX_SIZE`}static[Symbol.hasInstance](e){return e&&e[B]===!0}[B]=!0};let V=Symbol.for(`undici.error.UND_ERR_REQ_RETRY`);var ne=class extends r{constructor(e,t,{headers:n,data:r}){super(e),this.name=`RequestRetryError`,this.message=e||`Request retry error`,this.code=`UND_ERR_REQ_RETRY`,this.statusCode=t,this.data=r,this.headers=n}static[Symbol.hasInstance](e){return e&&e[V]===!0}[V]=!0};let re=Symbol.for(`undici.error.UND_ERR_RESPONSE`);var H=class extends r{constructor(e,t,{headers:n,data:r}){super(e),this.name=`ResponseError`,this.message=e||`Response error`,this.code=`UND_ERR_RESPONSE`,this.statusCode=t,this.data=r,this.headers=n}static[Symbol.hasInstance](e){return e&&e[re]===!0}[re]=!0};let ie=Symbol.for(`undici.error.UND_ERR_PRX_TLS`);var ae=class extends r{constructor(e,t,n){super(t,{cause:e,...n??{}}),this.name=`SecureProxyConnectionError`,this.message=t||`Secure Proxy Connection failed`,this.code=`UND_ERR_PRX_TLS`,this.cause=e}static[Symbol.hasInstance](e){return e&&e[ie]===!0}[ie]=!0};let oe=Symbol.for(`undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED`);t.exports={AbortError:b,HTTPParserError:ee,UndiciError:r,HeadersTimeoutError:s,HeadersOverflowError:l,BodyTimeoutError:d,RequestContentLengthMismatchError:E,ConnectTimeoutError:a,ResponseStatusCodeError:p,InvalidArgumentError:h,InvalidReturnValueError:v,RequestAbortedError:S,ClientDestroyedError:A,ClientClosedError:M,InformationalError:w,SocketError:P,NotSupportedError:I,ResponseContentLengthMismatchError:O,BalancedPoolMissingUpstreamError:R,ResponseExceededMaxSizeError:te,RequestRetryError:ne,ResponseError:H,SecureProxyConnectionError:ae,MessageSizeExceededError:class extends r{constructor(e){super(e),this.name=`MessageSizeExceededError`,this.message=e||`Max decompressed message size exceeded`,this.code=`UND_ERR_WS_MESSAGE_SIZE_EXCEEDED`}static[Symbol.hasInstance](e){return e&&e[oe]===!0}get[oe](){return!0}}}})),_t=i(((e,t)=>{let n={},r=`Accept.Accept-Encoding.Accept-Language.Accept-Ranges.Access-Control-Allow-Credentials.Access-Control-Allow-Headers.Access-Control-Allow-Methods.Access-Control-Allow-Origin.Access-Control-Expose-Headers.Access-Control-Max-Age.Access-Control-Request-Headers.Access-Control-Request-Method.Age.Allow.Alt-Svc.Alt-Used.Authorization.Cache-Control.Clear-Site-Data.Connection.Content-Disposition.Content-Encoding.Content-Language.Content-Length.Content-Location.Content-Range.Content-Security-Policy.Content-Security-Policy-Report-Only.Content-Type.Cookie.Cross-Origin-Embedder-Policy.Cross-Origin-Opener-Policy.Cross-Origin-Resource-Policy.Date.Device-Memory.Downlink.ECT.ETag.Expect.Expect-CT.Expires.Forwarded.From.Host.If-Match.If-Modified-Since.If-None-Match.If-Range.If-Unmodified-Since.Keep-Alive.Last-Modified.Link.Location.Max-Forwards.Origin.Permissions-Policy.Pragma.Proxy-Authenticate.Proxy-Authorization.RTT.Range.Referer.Referrer-Policy.Refresh.Retry-After.Sec-WebSocket-Accept.Sec-WebSocket-Extensions.Sec-WebSocket-Key.Sec-WebSocket-Protocol.Sec-WebSocket-Version.Server.Server-Timing.Service-Worker-Allowed.Service-Worker-Navigation-Preload.Set-Cookie.SourceMap.Strict-Transport-Security.Supports-Loading-Mode.TE.Timing-Allow-Origin.Trailer.Transfer-Encoding.Upgrade.Upgrade-Insecure-Requests.User-Agent.Vary.Via.WWW-Authenticate.X-Content-Type-Options.X-DNS-Prefetch-Control.X-Frame-Options.X-Permitted-Cross-Domain-Policies.X-Powered-By.X-Requested-With.X-XSS-Protection`.split(`.`);for(let e=0;e{let{wellknownHeaderNames:n,headerNameLowerCasedRecord:r}=_t();var i=class e{value=null;left=null;middle=null;right=null;code;constructor(t,n,r){if(r===void 0||r>=t.length)throw TypeError(`Unreachable`);if((this.code=t.charCodeAt(r))>127)throw TypeError(`key must be ascii string`);t.length===++r?this.value=n:this.middle=new e(t,n,r)}add(t,n){let r=t.length;if(r===0)throw TypeError(`Unreachable`);let i=0,a=this;for(;;){let o=t.charCodeAt(i);if(o>127)throw TypeError(`key must be ascii string`);if(a.code===o)if(r===++i){a.value=n;break}else if(a.middle!==null)a=a.middle;else{a.middle=new e(t,n,i);break}else if(a.code=65&&(i|=32);r!==null;){if(i===r.code){if(t===++n)return r;r=r.middle;break}r=r.code{let r=t(`node:assert`),{kDestroyed:i,kBodyUsed:a,kListeners:o,kBody:s}=ht(),{IncomingMessage:c}=t(`node:http`),l=t(`node:stream`),u=t(`node:net`),{Blob:d}=t(`node:buffer`),f=t(`node:util`),{stringify:p}=t(`node:querystring`),{EventEmitter:m}=t(`node:events`),{InvalidArgumentError:h}=gt(),{headerNameLowerCasedRecord:g}=_t(),{tree:v}=vt(),[y,b]=process.versions.node.split(`.`).map(e=>Number(e));var x=class{constructor(e){this[s]=e,this[a]=!1}async*[Symbol.asyncIterator](){r(!this[a],`disturbed`),this[a]=!0,yield*this[s]}};function S(e){return w(e)?(I(e)===0&&e.on(`data`,function(){r(!1)}),typeof e.readableDidRead!=`boolean`&&(e[a]=!1,m.prototype.on.call(e,`data`,function(){this[a]=!0})),e):e&&typeof e.pipeTo==`function`||e&&typeof e!=`string`&&!ArrayBuffer.isView(e)&&F(e)?new x(e):e}function C(){}function w(e){return e&&typeof e==`object`&&typeof e.pipe==`function`&&typeof e.on==`function`}function T(e){if(e===null)return!1;if(e instanceof d)return!0;if(typeof e!=`object`)return!1;{let t=e[Symbol.toStringTag];return(t===`Blob`||t===`File`)&&(`stream`in e&&typeof e.stream==`function`||`arrayBuffer`in e&&typeof e.arrayBuffer==`function`)}}function E(e,t){if(e.includes(`?`)||e.includes(`#`))throw Error(`Query params cannot be passed when url already contains "?" or "#".`);let n=p(t);return n&&(e+=`?`+n),e}function D(e){let t=parseInt(e,10);return t===Number(e)&&t>=0&&t<=65535}function O(e){return e!=null&&e[0]===`h`&&e[1]===`t`&&e[2]===`t`&&e[3]===`p`&&(e[4]===`:`||e[4]===`s`&&e[5]===`:`)}function k(e){if(typeof e==`string`){if(e=new URL(e),!O(e.origin||e.protocol))throw new h("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}if(!e||typeof e!=`object`)throw new h(`Invalid URL: The URL argument must be a non-null object.`);if(!(e instanceof URL)){if(e.port!=null&&e.port!==``&&D(e.port)===!1)throw new h(`Invalid URL: port must be a valid integer or a string representation of an integer.`);if(e.path!=null&&typeof e.path!=`string`)throw new h(`Invalid URL path: the path must be a string or null/undefined.`);if(e.pathname!=null&&typeof e.pathname!=`string`)throw new h(`Invalid URL pathname: the pathname must be a string or null/undefined.`);if(e.hostname!=null&&typeof e.hostname!=`string`)throw new h(`Invalid URL hostname: the hostname must be a string or null/undefined.`);if(e.origin!=null&&typeof e.origin!=`string`)throw new h(`Invalid URL origin: the origin must be a string or null/undefined.`);if(!O(e.origin||e.protocol))throw new h("Invalid URL protocol: the URL must start with `http:` or `https:`.");let t=e.port==null?e.protocol===`https:`?443:80:e.port,n=e.origin==null?`${e.protocol||``}//${e.hostname||``}:${t}`:e.origin,r=e.path==null?`${e.pathname||``}${e.search||``}`:e.path;return n[n.length-1]===`/`&&(n=n.slice(0,n.length-1)),r&&r[0]!==`/`&&(r=`/${r}`),new URL(`${n}${r}`)}if(!O(e.origin||e.protocol))throw new h("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}function A(e){if(e=k(e),e.pathname!==`/`||e.search||e.hash)throw new h(`invalid url`);return e}function j(e){if(e[0]===`[`){let t=e.indexOf(`]`);return r(t!==-1),e.substring(1,t)}let t=e.indexOf(`:`);return t===-1?e:e.substring(0,t)}function M(e){if(!e)return null;r(typeof e==`string`);let t=j(e);return u.isIP(t)?``:t}function N(e){return JSON.parse(JSON.stringify(e))}function P(e){return e!=null&&typeof e[Symbol.asyncIterator]==`function`}function F(e){return e!=null&&(typeof e[Symbol.iterator]==`function`||typeof e[Symbol.asyncIterator]==`function`)}function I(e){if(e==null)return 0;if(w(e)){let t=e._readableState;return t&&t.objectMode===!1&&t.ended===!0&&Number.isFinite(t.length)?t.length:null}else if(T(e))return e.size==null?null:e.size;else if(re(e))return e.byteLength;return null}function L(e){return e&&!!(e.destroyed||e[i]||l.isDestroyed?.(e))}function R(e,t){e==null||!w(e)||L(e)||(typeof e.destroy==`function`?(Object.getPrototypeOf(e).constructor===c&&(e.socket=null),e.destroy(t)):t&&queueMicrotask(()=>{e.emit(`error`,t)}),e.destroyed!==!0&&(e[i]=!0))}let z=/timeout=(\d+)/;function ee(e){let t=e.toString().match(z);return t?parseInt(t[1],10)*1e3:null}function B(e){return typeof e==`string`?g[e]??e.toLowerCase():v.lookup(e)??e.toString(`latin1`).toLowerCase()}function te(e){return v.lookup(e)??e.toString(`latin1`).toLowerCase()}function V(e,t){t===void 0&&(t={});for(let n=0;ne.toString(`utf8`)):i.toString(`utf8`)}}return`content-length`in t&&`content-disposition`in t&&(t[`content-disposition`]=Buffer.from(t[`content-disposition`]).toString(`latin1`)),t}function ne(e){let t=e.length,n=Array(t),r=!1,i=-1,a,o,s=0;for(let t=0;t{e.close(),e.byobRequest?.respond(0)});else{let t=Buffer.isBuffer(r)?r:Buffer.from(r);t.byteLength&&e.enqueue(new Uint8Array(t))}return e.desiredSize>0},async cancel(e){await t.return()},type:`bytes`})}function le(e){return e&&typeof e==`object`&&typeof e.append==`function`&&typeof e.delete==`function`&&typeof e.get==`function`&&typeof e.getAll==`function`&&typeof e.has==`function`&&typeof e.set==`function`&&e[Symbol.toStringTag]===`FormData`}function ue(e,t){return`addEventListener`in e?(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)):(e.addListener(`abort`,t),()=>e.removeListener(`abort`,t))}let de=typeof String.prototype.toWellFormed==`function`,fe=typeof String.prototype.isWellFormed==`function`;function pe(e){return de?`${e}`.toWellFormed():f.toUSVString(e)}function me(e){return fe?`${e}`.isWellFormed():pe(e)===`${e}`}function he(e){switch(e){case 34:case 40:case 41:case 44:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 123:case 125:return!1;default:return e>=33&&e<=126}}function ge(e){if(e.length===0)return!1;for(let t=0;t{let r=t(`node:diagnostics_channel`),i=t(`node:util`),a=i.debuglog(`undici`),o=i.debuglog(`fetch`),s=i.debuglog(`websocket`),c=!1,l={beforeConnect:r.channel(`undici:client:beforeConnect`),connected:r.channel(`undici:client:connected`),connectError:r.channel(`undici:client:connectError`),sendHeaders:r.channel(`undici:client:sendHeaders`),create:r.channel(`undici:request:create`),bodySent:r.channel(`undici:request:bodySent`),headers:r.channel(`undici:request:headers`),trailers:r.channel(`undici:request:trailers`),error:r.channel(`undici:request:error`),open:r.channel(`undici:websocket:open`),close:r.channel(`undici:websocket:close`),socketError:r.channel(`undici:websocket:socket_error`),ping:r.channel(`undici:websocket:ping`),pong:r.channel(`undici:websocket:pong`)};if(a.enabled||o.enabled){let e=o.enabled?o:a;r.channel(`undici:client:beforeConnect`).subscribe(t=>{let{connectParams:{version:n,protocol:r,port:i,host:a}}=t;e(`connecting to %s using %s%s`,`${a}${i?`:${i}`:``}`,r,n)}),r.channel(`undici:client:connected`).subscribe(t=>{let{connectParams:{version:n,protocol:r,port:i,host:a}}=t;e(`connected to %s using %s%s`,`${a}${i?`:${i}`:``}`,r,n)}),r.channel(`undici:client:connectError`).subscribe(t=>{let{connectParams:{version:n,protocol:r,port:i,host:a},error:o}=t;e(`connection to %s using %s%s errored - %s`,`${a}${i?`:${i}`:``}`,r,n,o.message)}),r.channel(`undici:client:sendHeaders`).subscribe(t=>{let{request:{method:n,path:r,origin:i}}=t;e(`sending request to %s %s/%s`,n,i,r)}),r.channel(`undici:request:headers`).subscribe(t=>{let{request:{method:n,path:r,origin:i},response:{statusCode:a}}=t;e(`received response to %s %s/%s - HTTP %d`,n,i,r,a)}),r.channel(`undici:request:trailers`).subscribe(t=>{let{request:{method:n,path:r,origin:i}}=t;e(`trailers received from %s %s/%s`,n,i,r)}),r.channel(`undici:request:error`).subscribe(t=>{let{request:{method:n,path:r,origin:i},error:a}=t;e(`request to %s %s/%s errored - %s`,n,i,r,a.message)}),c=!0}if(s.enabled){if(!c){let e=a.enabled?a:s;r.channel(`undici:client:beforeConnect`).subscribe(t=>{let{connectParams:{version:n,protocol:r,port:i,host:a}}=t;e(`connecting to %s%s using %s%s`,a,i?`:${i}`:``,r,n)}),r.channel(`undici:client:connected`).subscribe(t=>{let{connectParams:{version:n,protocol:r,port:i,host:a}}=t;e(`connected to %s%s using %s%s`,a,i?`:${i}`:``,r,n)}),r.channel(`undici:client:connectError`).subscribe(t=>{let{connectParams:{version:n,protocol:r,port:i,host:a},error:o}=t;e(`connection to %s%s using %s%s errored - %s`,a,i?`:${i}`:``,r,n,o.message)}),r.channel(`undici:client:sendHeaders`).subscribe(t=>{let{request:{method:n,path:r,origin:i}}=t;e(`sending request to %s %s/%s`,n,i,r)})}r.channel(`undici:websocket:open`).subscribe(e=>{let{address:{address:t,port:n}}=e;s(`connection opened %s%s`,t,n?`:${n}`:``)}),r.channel(`undici:websocket:close`).subscribe(e=>{let{websocket:t,code:n,reason:r}=e;s(`closed connection to %s - %s %s`,t.url,n,r)}),r.channel(`undici:websocket:socket_error`).subscribe(e=>{s(`connection errored - %s`,e.message)}),r.channel(`undici:websocket:ping`).subscribe(e=>{s(`ping received`)}),r.channel(`undici:websocket:pong`).subscribe(e=>{s(`pong received`)})}n.exports={channels:l}})),xt=i(((e,n)=>{let{InvalidArgumentError:r,NotSupportedError:i}=gt(),a=t(`node:assert`),{isValidHTTPToken:o,isValidHeaderValue:s,isStream:c,destroy:l,isBuffer:u,isFormDataLike:d,isIterable:f,isBlobLike:p,buildURL:m,validateHandler:h,getServerName:g,normalizedMethodRecords:v}=yt(),{channels:y}=bt(),{headerNameLowerCasedRecord:b}=_t(),x=/[^\u0021-\u00ff]/,S=Symbol(`handler`);var C=class{constructor(e,{path:t,method:n,body:i,headers:a,query:b,idempotent:C,blocking:T,upgrade:E,headersTimeout:D,bodyTimeout:O,reset:k,throwOnError:A,expectContinue:j,servername:M},N){if(typeof t!=`string`)throw new r(`path must be a string`);if(t[0]!==`/`&&!(t.startsWith(`http://`)||t.startsWith(`https://`))&&n!==`CONNECT`)throw new r(`path must be an absolute URL or start with a slash`);if(x.test(t))throw new r(`invalid request path`);if(typeof n!=`string`)throw new r(`method must be a string`);if(v[n]===void 0&&!o(n))throw new r(`invalid request method`);if(E&&typeof E!=`string`)throw new r(`upgrade must be a string`);if(E&&!s(E))throw new r(`invalid upgrade header`);if(D!=null&&(!Number.isFinite(D)||D<0))throw new r(`invalid headersTimeout`);if(O!=null&&(!Number.isFinite(O)||O<0))throw new r(`invalid bodyTimeout`);if(k!=null&&typeof k!=`boolean`)throw new r(`invalid reset`);if(j!=null&&typeof j!=`boolean`)throw new r(`invalid expectContinue`);if(this.headersTimeout=D,this.bodyTimeout=O,this.throwOnError=A===!0,this.method=n,this.abort=null,i==null)this.body=null;else if(c(i)){this.body=i;let e=this.body._readableState;(!e||!e.autoDestroy)&&(this.endHandler=function(){l(this)},this.body.on(`end`,this.endHandler)),this.errorHandler=e=>{this.abort?this.abort(e):this.error=e},this.body.on(`error`,this.errorHandler)}else if(u(i))this.body=i.byteLength?i:null;else if(ArrayBuffer.isView(i))this.body=i.buffer.byteLength?Buffer.from(i.buffer,i.byteOffset,i.byteLength):null;else if(i instanceof ArrayBuffer)this.body=i.byteLength?Buffer.from(i):null;else if(typeof i==`string`)this.body=i.length?Buffer.from(i):null;else if(d(i)||f(i)||p(i))this.body=i;else throw new r(`body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable`);if(this.completed=!1,this.aborted=!1,this.upgrade=E||null,this.path=b?m(t,b):t,this.origin=e,this.idempotent=C??(n===`HEAD`||n===`GET`),this.blocking=T??!1,this.reset=k??null,this.host=null,this.contentLength=null,this.contentType=null,this.headers=[],this.expectContinue=j??!1,Array.isArray(a)){if(a.length%2!=0)throw new r(`headers array must be even`);for(let e=0;e{let r=t(`node:events`);var i=class extends r{dispatch(){throw Error(`not implemented`)}close(){throw Error(`not implemented`)}destroy(){throw Error(`not implemented`)}compose(...e){let t=Array.isArray(e[0])?e[0]:e,n=this.dispatch.bind(this);for(let e of t)if(e!=null){if(typeof e!=`function`)throw TypeError(`invalid interceptor, expected function received ${typeof e}`);if(n=e(n),n==null||typeof n!=`function`||n.length!==2)throw TypeError(`invalid interceptor`)}return new a(this,n)}},a=class extends i{#e=null;#t=null;constructor(e,t){super(),this.#e=e,this.#t=t}dispatch(...e){this.#t(...e)}close(...e){return this.#e.close(...e)}destroy(...e){return this.#e.destroy(...e)}};n.exports=i})),Ct=i(((e,t)=>{let n=St(),{ClientDestroyedError:r,ClientClosedError:i,InvalidArgumentError:a}=gt(),{kDestroy:o,kClose:s,kClosed:c,kDestroyed:l,kDispatch:u,kInterceptors:d}=ht(),f=Symbol(`onDestroyed`),p=Symbol(`onClosed`),m=Symbol(`Intercepted Dispatch`);t.exports=class extends n{constructor(){super(),this[l]=!1,this[f]=null,this[c]=!1,this[p]=[]}get destroyed(){return this[l]}get closed(){return this[c]}get interceptors(){return this[d]}set interceptors(e){if(e){for(let t=e.length-1;t>=0;t--)if(typeof this[d][t]!=`function`)throw new a(`interceptor must be an function`)}this[d]=e}close(e){if(e===void 0)return new Promise((e,t)=>{this.close((n,r)=>n?t(n):e(r))});if(typeof e!=`function`)throw new a(`invalid callback`);if(this[l]){queueMicrotask(()=>e(new r,null));return}if(this[c]){this[p]?this[p].push(e):queueMicrotask(()=>e(null,null));return}this[c]=!0,this[p].push(e);let t=()=>{let e=this[p];this[p]=null;for(let t=0;tthis.destroy()).then(()=>{queueMicrotask(t)})}destroy(e,t){if(typeof e==`function`&&(t=e,e=null),t===void 0)return new Promise((t,n)=>{this.destroy(e,(e,r)=>e?n(e):t(r))});if(typeof t!=`function`)throw new a(`invalid callback`);if(this[l]){this[f]?this[f].push(t):queueMicrotask(()=>t(null,null));return}e||=new r,this[l]=!0,this[f]=this[f]||[],this[f].push(t);let n=()=>{let e=this[f];this[f]=null;for(let t=0;t{queueMicrotask(n)})}[m](e,t){if(!this[d]||this[d].length===0)return this[m]=this[u],this[u](e,t);let n=this[u].bind(this);for(let e=this[d].length-1;e>=0;e--)n=this[d][e](n);return this[m]=n,n(e,t)}dispatch(e,t){if(!t||typeof t!=`object`)throw new a(`handler must be an object`);try{if(!e||typeof e!=`object`)throw new a(`opts must be an object.`);if(this[l]||this[f])throw new r;if(this[c])throw new i;return this[m](e,t)}catch(e){if(typeof t.onError!=`function`)throw new a(`invalid onError method`);return t.onError(e),!1}}}})),wt=i(((e,t)=>{let n=0,r=1e3;(r>>1)-1;let i,a=Symbol(`kFastTimer`),o=[];function s(){n+=499;let e=0,t=o.length;for(;e=r._idleStart+r._idleTimeout&&(r._state=-1,r._idleStart=-1,r._onTimeout(r._timerArg)),r._state===-1?(r._state=-2,--t!==0&&(o[e]=o[t])):++e}o.length=t,o.length!==0&&c()}function c(){i?i.refresh():(clearTimeout(i),i=setTimeout(s,499),i.unref&&i.unref())}var l=class{[a]=!0;_state=-2;_idleTimeout=-1;_idleStart=-1;_onTimeout;_timerArg;constructor(e,t,n){this._onTimeout=e,this._idleTimeout=t,this._timerArg=n,this.refresh()}refresh(){this._state===-2&&o.push(this),(!i||o.length===1)&&c(),this._state=0}clear(){this._state=-1,this._idleStart=-1}};t.exports={setTimeout(e,t,n){return t<=r?setTimeout(e,t,n):new l(e,t,n)},clearTimeout(e){e[a]?e.clear():clearTimeout(e)},setFastTimeout(e,t,n){return new l(e,t,n)},clearFastTimeout(e){e.clear()},now(){return n},tick(e=0){n+=e-r+1,s(),s()},reset(){n=0,o.length=0,clearTimeout(i),i=null},kFastTimer:a}})),Tt=i(((e,n)=>{let r=t(`node:net`),i=t(`node:assert`),a=yt(),{InvalidArgumentError:o,ConnectTimeoutError:s}=gt(),c=wt();function l(){}let u,d;d=global.FinalizationRegistry&&!(process.env.NODE_V8_COVERAGE||process.env.UNDICI_NO_FG)?class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(e=>{if(this._sessionCache.size=this._maxCachedSessions){let{value:e}=this._sessionCache.keys().next();this._sessionCache.delete(e)}this._sessionCache.set(e,t)}}};function f({allowH2:e,maxCachedSessions:n,socketPath:s,timeout:c,session:l,...f}){if(n!=null&&(!Number.isInteger(n)||n<0))throw new o(`maxCachedSessions must be a positive integer or zero`);let m={path:s,...f},h=new d(n??100);return c??=1e4,e??=!1,function({hostname:n,host:o,protocol:s,port:d,servername:f,localAddress:g,httpSocket:v},y){let b;if(s===`https:`){u||=t(`node:tls`),f=f||m.servername||a.getServerName(o)||null;let r=f||n;i(r);let s=l||h.get(r)||null;d||=443,b=u.connect({highWaterMark:16384,...m,servername:f,session:s,localAddress:g,ALPNProtocols:e?[`http/1.1`,`h2`]:[`http/1.1`],socket:v,port:d,host:n}),b.on(`session`,function(e){h.set(r,e)})}else i(!v,`httpSocket can only be sent on TLS update`),d||=80,b=r.connect({highWaterMark:64*1024,...m,localAddress:g,port:d,host:n});if(m.keepAlive==null||m.keepAlive){let e=m.keepAliveInitialDelay===void 0?6e4:m.keepAliveInitialDelay;b.setKeepAlive(!0,e)}let x=p(new WeakRef(b),{timeout:c,hostname:n,port:d});return b.setNoDelay(!0).once(s===`https:`?`secureConnect`:`connect`,function(){if(queueMicrotask(x),y){let e=y;y=null,e(null,this)}}).on(`error`,function(e){if(queueMicrotask(x),y){let t=y;y=null,t(e)}}),b}}let p=process.platform===`win32`?(e,t)=>{if(!t.timeout)return l;let n=null,r=null,i=c.setFastTimeout(()=>{n=setImmediate(()=>{r=setImmediate(()=>m(e.deref(),t))})},t.timeout);return()=>{c.clearFastTimeout(i),clearImmediate(n),clearImmediate(r)}}:(e,t)=>{if(!t.timeout)return l;let n=null,r=c.setFastTimeout(()=>{n=setImmediate(()=>{m(e.deref(),t)})},t.timeout);return()=>{c.clearFastTimeout(r),clearImmediate(n)}};function m(e,t){if(e==null)return;let n=`Connect Timeout Error`;Array.isArray(e.autoSelectFamilyAttemptedAddresses)?n+=` (attempted addresses: ${e.autoSelectFamilyAttemptedAddresses.join(`, `)},`:n+=` (attempted address: ${t.hostname}:${t.port},`,n+=` timeout: ${t.timeout}ms)`,a.destroy(e,new s(n))}n.exports=f})),Et=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.enumToMap=void 0;function t(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];typeof r==`number`&&(t[n]=r)}),t}e.enumToMap=t})),Dt=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SPECIAL_HEADERS=e.HEADER_STATE=e.MINOR=e.MAJOR=e.CONNECTION_TOKEN_CHARS=e.HEADER_CHARS=e.TOKEN=e.STRICT_TOKEN=e.HEX=e.URL_CHAR=e.STRICT_URL_CHAR=e.USERINFO_CHARS=e.MARK=e.ALPHANUM=e.NUM=e.HEX_MAP=e.NUM_MAP=e.ALPHA=e.FINISH=e.H_METHOD_MAP=e.METHOD_MAP=e.METHODS_RTSP=e.METHODS_ICE=e.METHODS_HTTP=e.METHODS=e.LENIENT_FLAGS=e.FLAGS=e.TYPE=e.ERROR=void 0;let t=Et();(function(e){e[e.OK=0]=`OK`,e[e.INTERNAL=1]=`INTERNAL`,e[e.STRICT=2]=`STRICT`,e[e.LF_EXPECTED=3]=`LF_EXPECTED`,e[e.UNEXPECTED_CONTENT_LENGTH=4]=`UNEXPECTED_CONTENT_LENGTH`,e[e.CLOSED_CONNECTION=5]=`CLOSED_CONNECTION`,e[e.INVALID_METHOD=6]=`INVALID_METHOD`,e[e.INVALID_URL=7]=`INVALID_URL`,e[e.INVALID_CONSTANT=8]=`INVALID_CONSTANT`,e[e.INVALID_VERSION=9]=`INVALID_VERSION`,e[e.INVALID_HEADER_TOKEN=10]=`INVALID_HEADER_TOKEN`,e[e.INVALID_CONTENT_LENGTH=11]=`INVALID_CONTENT_LENGTH`,e[e.INVALID_CHUNK_SIZE=12]=`INVALID_CHUNK_SIZE`,e[e.INVALID_STATUS=13]=`INVALID_STATUS`,e[e.INVALID_EOF_STATE=14]=`INVALID_EOF_STATE`,e[e.INVALID_TRANSFER_ENCODING=15]=`INVALID_TRANSFER_ENCODING`,e[e.CB_MESSAGE_BEGIN=16]=`CB_MESSAGE_BEGIN`,e[e.CB_HEADERS_COMPLETE=17]=`CB_HEADERS_COMPLETE`,e[e.CB_MESSAGE_COMPLETE=18]=`CB_MESSAGE_COMPLETE`,e[e.CB_CHUNK_HEADER=19]=`CB_CHUNK_HEADER`,e[e.CB_CHUNK_COMPLETE=20]=`CB_CHUNK_COMPLETE`,e[e.PAUSED=21]=`PAUSED`,e[e.PAUSED_UPGRADE=22]=`PAUSED_UPGRADE`,e[e.PAUSED_H2_UPGRADE=23]=`PAUSED_H2_UPGRADE`,e[e.USER=24]=`USER`})(e.ERROR||={}),(function(e){e[e.BOTH=0]=`BOTH`,e[e.REQUEST=1]=`REQUEST`,e[e.RESPONSE=2]=`RESPONSE`})(e.TYPE||={}),(function(e){e[e.CONNECTION_KEEP_ALIVE=1]=`CONNECTION_KEEP_ALIVE`,e[e.CONNECTION_CLOSE=2]=`CONNECTION_CLOSE`,e[e.CONNECTION_UPGRADE=4]=`CONNECTION_UPGRADE`,e[e.CHUNKED=8]=`CHUNKED`,e[e.UPGRADE=16]=`UPGRADE`,e[e.CONTENT_LENGTH=32]=`CONTENT_LENGTH`,e[e.SKIPBODY=64]=`SKIPBODY`,e[e.TRAILING=128]=`TRAILING`,e[e.TRANSFER_ENCODING=512]=`TRANSFER_ENCODING`})(e.FLAGS||={}),(function(e){e[e.HEADERS=1]=`HEADERS`,e[e.CHUNKED_LENGTH=2]=`CHUNKED_LENGTH`,e[e.KEEP_ALIVE=4]=`KEEP_ALIVE`})(e.LENIENT_FLAGS||={});var n;(function(e){e[e.DELETE=0]=`DELETE`,e[e.GET=1]=`GET`,e[e.HEAD=2]=`HEAD`,e[e.POST=3]=`POST`,e[e.PUT=4]=`PUT`,e[e.CONNECT=5]=`CONNECT`,e[e.OPTIONS=6]=`OPTIONS`,e[e.TRACE=7]=`TRACE`,e[e.COPY=8]=`COPY`,e[e.LOCK=9]=`LOCK`,e[e.MKCOL=10]=`MKCOL`,e[e.MOVE=11]=`MOVE`,e[e.PROPFIND=12]=`PROPFIND`,e[e.PROPPATCH=13]=`PROPPATCH`,e[e.SEARCH=14]=`SEARCH`,e[e.UNLOCK=15]=`UNLOCK`,e[e.BIND=16]=`BIND`,e[e.REBIND=17]=`REBIND`,e[e.UNBIND=18]=`UNBIND`,e[e.ACL=19]=`ACL`,e[e.REPORT=20]=`REPORT`,e[e.MKACTIVITY=21]=`MKACTIVITY`,e[e.CHECKOUT=22]=`CHECKOUT`,e[e.MERGE=23]=`MERGE`,e[e[`M-SEARCH`]=24]=`M-SEARCH`,e[e.NOTIFY=25]=`NOTIFY`,e[e.SUBSCRIBE=26]=`SUBSCRIBE`,e[e.UNSUBSCRIBE=27]=`UNSUBSCRIBE`,e[e.PATCH=28]=`PATCH`,e[e.PURGE=29]=`PURGE`,e[e.MKCALENDAR=30]=`MKCALENDAR`,e[e.LINK=31]=`LINK`,e[e.UNLINK=32]=`UNLINK`,e[e.SOURCE=33]=`SOURCE`,e[e.PRI=34]=`PRI`,e[e.DESCRIBE=35]=`DESCRIBE`,e[e.ANNOUNCE=36]=`ANNOUNCE`,e[e.SETUP=37]=`SETUP`,e[e.PLAY=38]=`PLAY`,e[e.PAUSE=39]=`PAUSE`,e[e.TEARDOWN=40]=`TEARDOWN`,e[e.GET_PARAMETER=41]=`GET_PARAMETER`,e[e.SET_PARAMETER=42]=`SET_PARAMETER`,e[e.REDIRECT=43]=`REDIRECT`,e[e.RECORD=44]=`RECORD`,e[e.FLUSH=45]=`FLUSH`})(n=e.METHODS||={}),e.METHODS_HTTP=[n.DELETE,n.GET,n.HEAD,n.POST,n.PUT,n.CONNECT,n.OPTIONS,n.TRACE,n.COPY,n.LOCK,n.MKCOL,n.MOVE,n.PROPFIND,n.PROPPATCH,n.SEARCH,n.UNLOCK,n.BIND,n.REBIND,n.UNBIND,n.ACL,n.REPORT,n.MKACTIVITY,n.CHECKOUT,n.MERGE,n[`M-SEARCH`],n.NOTIFY,n.SUBSCRIBE,n.UNSUBSCRIBE,n.PATCH,n.PURGE,n.MKCALENDAR,n.LINK,n.UNLINK,n.PRI,n.SOURCE],e.METHODS_ICE=[n.SOURCE],e.METHODS_RTSP=[n.OPTIONS,n.DESCRIBE,n.ANNOUNCE,n.SETUP,n.PLAY,n.PAUSE,n.TEARDOWN,n.GET_PARAMETER,n.SET_PARAMETER,n.REDIRECT,n.RECORD,n.FLUSH,n.GET,n.POST],e.METHOD_MAP=t.enumToMap(n),e.H_METHOD_MAP={},Object.keys(e.METHOD_MAP).forEach(t=>{/^H/.test(t)&&(e.H_METHOD_MAP[t]=e.METHOD_MAP[t])}),(function(e){e[e.SAFE=0]=`SAFE`,e[e.SAFE_WITH_CB=1]=`SAFE_WITH_CB`,e[e.UNSAFE=2]=`UNSAFE`})(e.FINISH||={}),e.ALPHA=[];for(let t=65;t<=90;t++)e.ALPHA.push(String.fromCharCode(t)),e.ALPHA.push(String.fromCharCode(t+32));e.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9},e.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},e.NUM=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],e.ALPHANUM=e.ALPHA.concat(e.NUM),e.MARK=[`-`,`_`,`.`,`!`,`~`,`*`,`'`,`(`,`)`],e.USERINFO_CHARS=e.ALPHANUM.concat(e.MARK).concat([`%`,`;`,`:`,`&`,`=`,`+`,`$`,`,`]),e.STRICT_URL_CHAR=`!"$%&'()*+,-./:;<=>@[\\]^_\`{|}~`.split(``).concat(e.ALPHANUM),e.URL_CHAR=e.STRICT_URL_CHAR.concat([` `,`\f`]);for(let t=128;t<=255;t++)e.URL_CHAR.push(t);e.HEX=e.NUM.concat([`a`,`b`,`c`,`d`,`e`,`f`,`A`,`B`,`C`,`D`,`E`,`F`]),e.STRICT_TOKEN=[`!`,`#`,`$`,`%`,`&`,`'`,`*`,`+`,`-`,`.`,`^`,`_`,"`",`|`,`~`].concat(e.ALPHANUM),e.TOKEN=e.STRICT_TOKEN.concat([` `]),e.HEADER_CHARS=[` `];for(let t=32;t<=255;t++)t!==127&&e.HEADER_CHARS.push(t);e.CONNECTION_TOKEN_CHARS=e.HEADER_CHARS.filter(e=>e!==44),e.MAJOR=e.NUM_MAP,e.MINOR=e.MAJOR;var r;(function(e){e[e.GENERAL=0]=`GENERAL`,e[e.CONNECTION=1]=`CONNECTION`,e[e.CONTENT_LENGTH=2]=`CONTENT_LENGTH`,e[e.TRANSFER_ENCODING=3]=`TRANSFER_ENCODING`,e[e.UPGRADE=4]=`UPGRADE`,e[e.CONNECTION_KEEP_ALIVE=5]=`CONNECTION_KEEP_ALIVE`,e[e.CONNECTION_CLOSE=6]=`CONNECTION_CLOSE`,e[e.CONNECTION_UPGRADE=7]=`CONNECTION_UPGRADE`,e[e.TRANSFER_ENCODING_CHUNKED=8]=`TRANSFER_ENCODING_CHUNKED`})(r=e.HEADER_STATE||={}),e.SPECIAL_HEADERS={connection:r.CONNECTION,"content-length":r.CONTENT_LENGTH,"proxy-connection":r.CONNECTION,"transfer-encoding":r.TRANSFER_ENCODING,upgrade:r.UPGRADE}})),Ot=i(((e,n)=>{let{Buffer:r}=t(`node:buffer`);n.exports=r.from(`AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAZEGxsaHR0cF9nZXRfZXJybm8AGhdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAbF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uABwUbGxodHRwX2dldF9lcnJvcl9wb3MAHRFsbGh0dHBfZXJybm9fbmFtZQAeEmxsaHR0cF9tZXRob2RfbmFtZQAfEmxsaHR0cF9zdGF0dXNfbmFtZQAgGmxsaHR0cF9zZXRfbGVu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PgtBhwEMPQtBiAEMPAtBiQEMOwtBigEMOgtBiwEMOQtBjAEMOAtBjQEMNwtBjgEMNgtBjwEMNQtBkAEMNAtBkQEMMwtBkgEMMgtBkwEMMQtBlAEMMAtBlQEMLwtBlgEMLgtBlwEMLQtBmAEMLAtBmQEMKwtBmgEMKgtBmwEMKQtBnAEMKAtBnQEMJwtBngEMJgtBnwEMJQtBoAEMJAtBoQEMIwtBogEMIgtBowEMIQtBpAEMIAtBpQEMHwtBpgEMHgtBpwEMHQtBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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iQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAybAgsgAkEANgIAIAZBAWohAUEeDF4LIAEgBEYEQEGTASEDDJoCCyABLQAAQcwARw1bIAFBAWohAUEKDF0LIAEgBEYEQEGUASEDDJkCCwJAAkAgAS0AAEHBAGsODwBcXFxcXFxcXFxcXFxcAVwLIAFBAWohAUH+ACEDDIACCyABQQFqIQFB/wAhAwz/AQsgASAERgRAQZUBIQMMmAILAkACQCABLQAAQcEAaw4DAFsBWwsgAUEBaiEBQf0AIQMM/wELIAFBAWohAUGAASEDDP4BC0GWASEDIAEgBEYNlgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBp88Aai0AAEcNWSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlwILIAJBADYCACAGQQFqIQFBCwxaCyABIARGBEBBlwEhAwyWAgsCQAJAAkACQCABLQAAQS1rDiMAW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1sBW1tbW1sCW1tbA1sLIAFBAWohAUH7ACEDDP8BCyABQQFqIQFB/AAhAwz+AQsgAUEBaiEBQYEBIQMM/QELIAFBAWohAUGCASEDDPwBC0GYASEDIAEgBEYNlAIgAigCACIAIAQgAWtqIQUgASAAa0EEaiEGAkADQCABLQAAIABBqc8Aai0AAEcNVyAAQQRGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlQILIAJBADYCACAGQQFqIQFBGQxYC0GZASEDIAEgBEYNkwIgAigCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBrs8Aai0AAEcNViAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMlAILIAJBADYCACAGQQFqIQFBBgxXC0GaASEDIAEgBEYNkgIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBtM8Aai0AAEcNVSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkwILIAJBADYCACAGQQFqIQFBHAxWC0GbASEDIAEgBEYNkQIgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBts8Aai0AAEcNVCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMkgILIAJBADYCACAGQQFqIQFBJwxVCyABIARGBEBBnAEhAwyRAgsCQAJAIAEtAABB1ABrDgIAAVQLIAFBAWohAUGGASEDDPgBCyABQQFqIQFBhwEhAwz3AQtBnQEhAyABIARGDY8CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjPAGotAABHDVIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADJACCyACQQA2AgAgBkEBaiEBQSYMUwtBngEhAyABIARGDY4CIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbrPAGotAABHDVEgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI8CCyACQQA2AgAgBkEBaiEBQQMMUgtBnwEhAyABIARGDY0CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDVAgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI4CCyACQQA2AgAgBkEBaiEBQQwMUQtBoAEhAyABIARGDYwCIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQbzPAGotAABHDU8gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADI0CCyACQQA2AgAgBkEBaiEBQQ0MUAsgASAERgRAQaEBIQMMjAILAkACQCABLQAAQcYAaw4LAE9PT09PT09PTwFPCyABQQFqIQFBiwEhAwzzAQsgAUEBaiEBQYwBIQMM8gELIAEgBEYEQEGiASEDDIsCCyABLQAAQdAARw1MIAFBAWohAQxGCyABIARGBEBBowEhAwyKAgsCQAJAIAEtAABByQBrDgcBTU1NTU0ATQsgAUEBaiEBQY4BIQMM8QELIAFBAWohAUEiDE0LQaQBIQMgASAERg2IAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHAzwBqLQAARw1LIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyJAgsgAkEANgIAIAZBAWohAUEdDEwLIAEgBEYEQEGlASEDDIgCCwJAAkAgAS0AAEHSAGsOAwBLAUsLIAFBAWohAUGQASEDDO8BCyABQQFqIQFBBAxLCyABIARGBEBBpgEhAwyHAgsCQAJAAkACQAJAIAEtAABBwQBrDhUATU1NTU1NTU1NTQFNTQJNTQNNTQRNCyABQQFqIQFBiAEhAwzxAQsgAUEBaiEBQYkBIQMM8AELIAFBAWohAUGKASEDDO8BCyABQQFqIQFBjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEHQzwBqLQAARw1AIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz+AQsgAkEANgIAIAZBAWohAUEqDEELIAEgBEYEQEGwASEDDP0BCwJAAkAgAS0AAEHVAGsOCwBAQEBAQEBAQEABQAsgAUEBaiEBQZoBIQMM5AELIAFBAWohAUGbASEDDOMBCyABIARGBEBBsQEhAwz8AQsCQAJAIAEtAABBwQBrDhQAPz8/Pz8/Pz8/Pz8/Pz8/Pz8/AT8LIAFBAWohAUGZASEDDOMBCyABQQFqIQFBnAEhAwziAQtBsgEhAyABIARGDfoBIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQdnPAGotAABHDT0gAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPsBCyACQQA2AgAgBkEBaiEBQSEMPgtBswEhAyABIARGDfkBIAIoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAS0AACAAQd3PAGotAABHDTwgAEEGRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADPoBCyACQQA2AgAgBkEBaiEBQRoMPQsgASAERgRAQbQBIQMM+QELAkACQAJAIAEtAABBxQBrDhEAPT09PT09PT09AT09PT09Aj0LIAFBAWohAUGdASEDDOEBCyABQQFqIQFBngEhAwzgAQsgAUEBaiEBQZ8BIQMM3wELQbUBIQMgASAERg33ASACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHkzwBqLQAARw06IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz4AQsgAkEANgIAIAZBAWohAUEoDDsLQbYBIQMgASAERg32ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHqzwBqLQAARw05IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz3AQsgAkEANgIAIAZBAWohAUEHDDoLIAEgBEYEQEG3ASEDDPYBCwJAAkAgAS0AAEHFAGsODgA5OTk5OTk5OTk5OTkBOQsgAUEBaiEBQaEBIQMM3QELIAFBAWohAUGiASEDDNwBC0G4ASEDIAEgBEYN9AEgAigCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB7c8Aai0AAEcNNyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9QELIAJBADYCACAGQQFqIQFBEgw4C0G5ASEDIAEgBEYN8wEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8M8Aai0AAEcNNiAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM9AELIAJBADYCACAGQQFqIQFBIAw3C0G6ASEDIAEgBEYN8gEgAigCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8s8Aai0AAEcNNSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8wELIAJBADYCACAGQQFqIQFBDww2CyABIARGBEBBuwEhAwzyAQsCQAJAIAEtAABByQBrDgcANTU1NTUBNQsgAUEBaiEBQaUBIQMM2QELIAFBAWohAUGmASEDDNgBC0G8ASEDIAEgBEYN8AEgAigCACIAIAQgAWtqIQUgASAAa0EHaiEGAkADQCABLQAAIABB9M8Aai0AAEcNMyAAQQdGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAM8QELIAJBADYCACAGQQFqIQFBGww0CyABIARGBEBBvQEhAwzwAQsCQAJAAkAgAS0AAEHCAGsOEgA0NDQ0NDQ0NDQBNDQ0NDQ0AjQLIAFBAWohAUGkASEDDNgBCyABQQFqIQFBpwEhAwzXAQsgAUEBaiEBQagBIQMM1gELIAEgBEYEQEG+ASEDDO8BCyABLQAAQc4ARw0wIAFBAWohAQwsCyABIARGBEBBvwEhAwzuAQsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABLQAAQcEAaw4VAAECAz8EBQY/Pz8HCAkKCz8MDQ4PPwsgAUEBaiEBQegAIQMM4wELIAFBAWohAUHpACEDDOIBCyABQQFqIQFB7gAhAwzhAQsgAUEBaiEBQfIAIQMM4AELIAFBAWohAUHzACEDDN8BCyABQQFqIQFB9gAhAwzeAQsgAUEBaiEBQfcAIQMM3QELIAFBAWohAUH6ACEDDNwBCyABQQFqIQFBgwEhAwzbAQsgAUEBaiEBQYQBIQMM2gELIAFBAWohAUGFASEDDNkBCyABQQFqIQFBkgEhAwzYAQsgAUEBaiEBQZgBIQMM1wELIAFBAWohAUGgASEDDNYBCyABQQFqIQFBowEhAwzVAQsgAUEBaiEBQaoBIQMM1AELIAEgBEcEQCACQRA2AgggAiABNgIEQasBIQMM1AELQcABIQMM7AELQQAhAAJAIAIoAjgiA0UNACADKAI0IgNFDQAgAiADEQAAIQALIABFDV4gAEEVRw0HIAJB0QA2AhwgAiABNgIUIAJBsBc2AhAgAkEVNgIMQQAhAwzrAQsgAUEBaiABIARHDQgaQcIBIQMM6gELA0ACQCABLQAAQQprDgQIAAALAAsgBCABQQFqIgFHDQALQcMBIQMM6QELIAEgBEcEQCACQRE2AgggAiABNgIEQQEhAwzQAQtBxAEhAwzoAQsgASAERgRAQcUBIQMM6AELAkACQCABLQAAQQprDgQBKCgAKAsgAUEBagwJCyABQQFqDAULIAEgBEYEQEHGASEDDOcBCwJAAkAgAS0AAEEKaw4XAQsLAQsLCwsLCwsLCwsLCwsLCwsLCwALCyABQQFqIQELQbABIQMMzQELIAEgBEYEQEHIASEDDOYBCyABLQAAQSBHDQkgAkEAOwEyIAFBAWohAUGzASEDDMwBCwNAIAEhAAJAIAEgBEcEQCABLQAAQTBrQf8BcSIDQQpJDQEMJwtBxwEhAwzmAQsCQCACLwEyIgFBmTNLDQAgAiABQQpsIgU7ATIgBUH+/wNxIANB//8Dc0sNACAAQQFqIQEgAiADIAVqIgM7ATIgA0H//wNxQegHSQ0BCwtBACEDIAJBADYCHCACQcEJNgIQIAJBDTYCDCACIABBAWo2AhQM5AELIAJBADYCHCACIAE2AhQgAkHwDDYCECACQRs2AgxBACEDDOMBCyACKAIEIQAgAkEANgIEIAIgACABECYiAA0BIAFBAWoLIQFBrQEhAwzIAQsgAkHBATYCHCACIAA2AgwgAiABQQFqNgIUQQAhAwzgAQsgAigCBCEAIAJBADYCBCACIAAgARAmIgANASABQQFqCyEBQa4BIQMMxQELIAJBwgE2AhwgAiAANgIMIAIgAUEBajYCFEEAIQMM3QELIAJBADYCHCACIAE2AhQgAkGXCzYCECACQQ02AgxBACEDDNwBCyACQQA2AhwgAiABNgIUIAJB4xA2AhAgAkEJNgIMQQAhAwzbAQsgAkECOgAoDKwBC0EAIQMgAkEANgIcIAJBrws2AhAgAkECNgIMIAIgAUEBajYCFAzZAQtBAiEDDL8BC0ENIQMMvgELQSYhAwy9AQtBFSEDDLwBC0EWIQMMuwELQRghAwy6AQtBHCEDDLkBC0EdIQMMuAELQSAhAwy3AQtBISEDDLYBC0EjIQMMtQELQcYAIQMMtAELQS4hAwyzAQtBPSEDDLIBC0HLACEDDLEBC0HOACEDDLABC0HYACEDDK8BC0HZACEDDK4BC0HbACEDDK0BC0HxACEDDKwBC0H0ACEDDKsBC0GNASEDDKoBC0GXASEDDKkBC0GpASEDDKgBC0GvASEDDKcBC0GxASEDDKYBCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJB8Rs2AhAgAkEGNgIMDL0BCyACQQA2AgAgBkEBaiEBQSQLOgApIAIoAgQhACACQQA2AgQgAiAAIAEQJyIARQRAQeUAIQMMowELIAJB+QA2AhwgAiABNgIUIAIgADYCDEEAIQMMuwELIABBFUcEQCACQQA2AhwgAiABNgIUIAJBzA42AhAgAkEgNgIMQQAhAwy7AQsgAkH4ADYCHCACIAE2AhQgAkHKGDYCECACQRU2AgxBACEDDLoBCyACQQA2AhwgAiABNgIUIAJBjhs2AhAgAkEGNgIMQQAhAwy5AQsgAkEANgIcIAIgATYCFCACQf4RNgIQIAJBBzYCDEEAIQMMuAELIAJBADYCHCACIAE2AhQgAkGMHDYCECACQQc2AgxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxB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AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HhJw8LQaQhDwtByywPC0H+MQ8LQcAkDwtBqyQPC0GNKA8LQeImDwtBgDAPC0G5Lw8LQdckDwtB7x8PC0HhHw8LQfofDwtB8iAPC0GoLw8LQa4yDwtBiDAPC0HsJw8LQYIiDwtBjh0PC0HQLg8LQcojDwtBxTIPC0HfHA8LQdIcDwtBxCAPC0HXIA8LQaIfDwtB7S4PC0GrMA8LQdQlDwtBzC4PC0H6Lg8LQfwrDwtB0jAPC0HxHQ8LQbsgDwtB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CABB3AgLii1JbnZhbGlkIGNoYXIgaW4gdXJsIHF1ZXJ5AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fYm9keQBDb250ZW50LUxlbmd0aCBvdmVyZmxvdwBDaHVuayBzaXplIG92ZXJmbG93AFJlc3BvbnNlIG92ZXJmbG93AEludmFsaWQgbWV0aG9kIGZvciBIVFRQL3gueCByZXF1ZXN0AEludmFsaWQgbWV0aG9kIGZvciBSVFNQL3gueCByZXF1ZXN0AEV4cGVjdGVkIFNPVVJDRSBtZXRob2QgZm9yIElDRS94LnggcmVxdWVzdABJbnZhbGlkIGNoYXIgaW4gdXJsIGZyYWdtZW50IHN0YXJ0AEV4cGVjdGVkIGRvdABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3N0YXR1cwBJbnZhbGlkIHJlc3BvbnNlIHN0YXR1cwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zAFVzZXIgY2FsbGJhY2sgZXJyb3IAYG9uX3Jlc2V0YCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfaGVhZGVyYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9iZWdpbmAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3N0YXR1c19jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3ZlcnNpb25fY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl91cmxfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl92YWx1ZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXRob2RfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfZmllbGRfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fbmFtZWAgY2FsbGJhY2sgZXJyb3IAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzZXJ2ZXIASW52YWxpZCBoZWFkZXIgdmFsdWUgY2hhcgBJbnZhbGlkIGhlYWRlciBmaWVsZCBjaGFyAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fdmVyc2lvbgBJbnZhbGlkIG1pbm9yIHZlcnNpb24ASW52YWxpZCBtYWpvciB2ZXJzaW9uAEV4cGVjdGVkIHNwYWNlIGFmdGVyIHZlcnNpb24ARXhwZWN0ZWQgQ1JMRiBhZnRlciB2ZXJzaW9uAEludmFsaWQgSFRUUCB2ZXJzaW9uAEludmFsaWQgaGVhZGVyIHRva2VuAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fdXJsAEludmFsaWQgY2hhcmFjdGVycyBpbiB1cmwAVW5leHBlY3RlZCBzdGFydCBjaGFyIGluIHVybABEb3VibGUgQCBpbiB1cmwARW1wdHkgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyYWN0ZXIgaW4gQ29udGVudC1MZW5ndGgARHVwbGljYXRlIENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhciBpbiB1cmwgcGF0aABDb250ZW50LUxlbmd0aCBjYW4ndCBiZSBwcmVzZW50IHdpdGggVHJhbnNmZXItRW5jb2RpbmcASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgc2l6ZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl92YWx1ZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZSB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlZCB2YWx1ZQBQYXVzZWQgYnkgb25faGVhZGVyc19jb21wbGV0ZQBJbnZhbGlkIEVPRiBzdGF0ZQBvbl9yZXNldCBwYXVzZQBvbl9jaHVua19oZWFkZXIgcGF1c2UAb25fbWVzc2FnZV9iZWdpbiBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fdmFsdWUgcGF1c2UAb25fc3RhdHVzX2NvbXBsZXRlIHBhdXNlAG9uX3ZlcnNpb25fY29tcGxldGUgcGF1c2UAb25fdXJsX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl92YWx1ZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXNzYWdlX2NvbXBsZXRlIHBhdXNlAG9uX21ldGhvZF9jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfZmllbGRfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUgcGF1c2UAVW5leHBlY3RlZCBzcGFjZSBhZnRlciBzdGFydCBsaW5lAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBuYW1lAFBhdXNlIG9uIENPTk5FQ1QvVXBncmFkZQBQYXVzZSBvbiBQUkkvVXBncmFkZQBFeHBlY3RlZCBIVFRQLzIgQ29ubmVjdGlvbiBQcmVmYWNlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fbWV0aG9kAEV4cGVjdGVkIHNwYWNlIGFmdGVyIG1ldGhvZABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2hlYWRlcl9maWVsZABQYXVzZWQASW52YWxpZCB3b3JkIGVuY291bnRlcmVkAEludmFsaWQgbWV0aG9kIGVuY291bnRlcmVkAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2NoZW1hAFJlcXVlc3QgaGFzIGludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYABTV0lUQ0hfUFJPWFkAVVNFX1BST1hZAE1LQUNUSVZJVFkAVU5QUk9DRVNTQUJMRV9FTlRJVFkAQ09QWQBNT1ZFRF9QRVJNQU5FTlRMWQBUT09fRUFSTFkATk9USUZZAEZBSUxFRF9ERVBFTkRFTkNZAEJBRF9HQVRFV0FZAFBMQVkAUFVUAENIRUNLT1VUAEdBVEVXQVlfVElNRU9VVABSRVFVRVNUX1RJTUVPVVQATkVUV09SS19DT05ORUNUX1RJTUVPVVQAQ09OTkVDVElPTl9USU1FT1VUAExPR0lOX1RJTUVPVVQATkVUV09SS19SRUFEX1RJTUVPVVQAUE9TVABNSVNESVJFQ1RFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX0xPQURfQkFMQU5DRURfUkVRVUVTVABCQURfUkVRVUVTVABIVFRQX1JFUVVFU1RfU0VOVF9UT19IVFRQU19QT1JUAFJFUE9SVABJTV9BX1RFQVBPVABSRVNFVF9DT05URU5UAE5PX0NPTlRFTlQAUEFSVElBTF9DT05URU5UAEhQRV9JTlZBTElEX0NPTlNUQU5UAEhQRV9DQl9SRVNFVABHRVQASFBFX1NUUklDVABDT05GTElDVABURU1QT1JBUllfUkVESVJFQ1QAUEVSTUFORU5UX1JFRElSRUNUAENPTk5FQ1QATVVMVElfU1RBVFVTAEhQRV9JTlZBTElEX1NUQVRVUwBUT09fTUFOWV9SRVFVRVNUUwBFQVJMWV9ISU5UUwBVTkFWQUlMQUJMRV9GT1JfTEVHQUxfUkVBU09OUwBPUFRJT05TAFNXSVRDSElOR19QUk9UT0NPTFMAVkFSSUFOVF9BTFNPX05FR09USUFURVMATVVMVElQTEVfQ0hPSUNFUwBJTlRFUk5BTF9TRVJWRVJfRVJST1IAV0VCX1NFUlZFUl9VTktOT1dOX0VSUk9SAFJBSUxHVU5fRVJST1IASURFTlRJVFlfUFJPVklERVJfQVVUSEVOVElDQVRJT05fRVJST1IAU1NMX0NFUlRJRklDQVRFX0VSUk9SAElOVkFMSURfWF9GT1JXQVJERURfRk9SAFNFVF9QQVJBTUVURVIAR0VUX1BBUkFNRVRFUgBIUEVfVVNFUgBTRUVfT1RIRVIASFBFX0NCX0NIVU5LX0hFQURFUgBNS0NBTEVOREFSAFNFVFVQAFdFQl9TRVJWRVJfSVNfRE9XTgBURUFSRE9XTgBIUEVfQ0xPU0VEX0NPTk5FQ1RJT04ASEVVUklTVElDX0VYUElSQVRJT04ARElTQ09OTkVDVEVEX09QRVJBVElPTgBOT05fQVVUSE9SSVRBVElWRV9JTkZPUk1BVElPTgBIUEVfSU5WQUxJRF9WRVJTSU9OAEhQRV9DQl9NRVNTQUdFX0JFR0lOAFNJVEVfSVNfRlJPWkVOAEhQRV9JTlZBTElEX0hFQURFUl9UT0tFTgBJTlZBTElEX1RPS0VOAEZPUkJJRERFTgBFTkhBTkNFX1lPVVJfQ0FMTQBIUEVfSU5WQUxJRF9VUkwAQkxPQ0tFRF9CWV9QQVJFTlRBTF9DT05UUk9MAE1LQ09MAEFDTABIUEVfSU5URVJOQUwAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRV9VTk9GRklDSUFMAEhQRV9PSwBVTkxJTksAVU5MT0NLAFBSSQBSRVRSWV9XSVRIAEhQRV9JTlZBTElEX0NPTlRFTlRfTEVOR1RIAEhQRV9VTkVYUEVDVEVEX0NPTlRFTlRfTEVOR1RIAEZMVVNIAFBST1BQQVRDSABNLVNFQVJDSABVUklfVE9PX0xPTkcAUFJPQ0VTU0lORwBNSVNDRUxMQU5FT1VTX1BFUlNJU1RFTlRfV0FSTklORwBNSVNDRUxMQU5FT1VTX1dBUk5JTkcASFBFX0lOVkFMSURfVFJBTlNGRVJfRU5DT0RJTkcARXhwZWN0ZWQgQ1JMRgBIUEVfSU5WQUxJRF9DSFVOS19TSVpFAE1PVkUAQ09OVElOVUUASFBFX0NCX1NUQVRVU19DT01QTEVURQBIUEVfQ0JfSEVBREVSU19DT01QTEVURQBIUEVfQ0JfVkVSU0lPTl9DT01QTEVURQBIUEVfQ0JfVVJMX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19DT01QTEVURQBIUEVfQ0JfSEVBREVSX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9OQU1FX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAEhQRV9DQl9NRVRIT0RfQ09NUExFVEUASFBFX0NCX0hFQURFUl9GSUVMRF9DT01QTEVURQBERUxFVEUASFBFX0lOVkFMSURfRU9GX1NUQVRFAElOVkFMSURfU1NMX0NFUlRJRklDQVRFAFBBVVNFAE5PX1JFU1BPTlNFAFVOU1VQUE9SVEVEX01FRElBX1RZUEUAR09ORQBOT1RfQUNDRVBUQUJMRQBTRVJWSUNFX1VOQVZBSUxBQkxFAFJBTkdFX05PVF9TQVRJU0ZJQUJMRQBPUklHSU5fSVNfVU5SRUFDSEFCTEUAUkVTUE9OU0VfSVNfU1RBTEUAUFVSR0UATUVSR0UAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRQBSRVFVRVNUX0hFQURFUl9UT09fTEFSR0UAUEFZTE9BRF9UT09fTEFSR0UASU5TVUZGSUNJRU5UX1NUT1JBR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UASFBFX1VORVhQRUNURURfU1BBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABOT1RfRk9VTkQAUFJPUEZJTkQAVU5CSU5EAFJFQklORABVTkFVVEhPUklaRUQATUVUSE9EX05PVF9BTExPV0VEAEhUVFBfVkVSU0lPTl9OT1RfU1VQUE9SVEVEAEFMUkVBRFlfUkVQT1JURUQAQUNDRVBURUQATk9UX0lNUExFTUVOVEVEAExPT1BfREVURUNURUQASFBFX0NSX0VYUEVDVEVEAEhQRV9MRl9FWFBFQ1RFRABDUkVBVEVEAElNX1VTRUQASFBFX1BBVVNFRABUSU1FT1VUX09DQ1VSRUQAUEFZTUVOVF9SRVFVSVJFRABQUkVDT05ESVRJT05fUkVRVUlSRUQAUFJPWFlfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATkVUV09SS19BVVRIRU5USUNBVElPTl9SRVFVSVJFRABMRU5HVEhfUkVRVUlSRUQAU1NMX0NFUlRJRklDQVRFX1JFUVVJUkVEAFVQR1JBREVfUkVRVUlSRUQAUEFHRV9FWFBJUkVEAFBSRUNPTkRJVElPTl9GQUlMRUQARVhQRUNUQVRJT05fRkFJTEVEAFJFVkFMSURBVElPTl9GQUlMRUQAU1NMX0hBTkRTSEFLRV9GQUlMRUQATE9DS0VEAFRSQU5TRk9STUFUSU9OX0FQUExJRUQATk9UX01PRElGSUVEAE5PVF9FWFRFTkRFRABCQU5EV0lEVEhfTElNSVRfRVhDRUVERUQAU0lURV9JU19PVkVSTE9BREVEAEhFQUQARXhwZWN0ZWQgSFRUUC8AAF4TAAAmEwAAMBAAAPAXAACdEwAAFRIAADkXAADwEgAAChAAAHUSAACtEgAAghMAAE8UAAB/EAAAoBUAACMUAACJEgAAixQAAE0VAADUEQAAzxQAABAYAADJFgAA3BYAAMERAADgFwAAuxQAAHQUAAB8FQAA5RQAAAgXAAAfEAAAZRUAAKMUAAAoFQAAAhUAAJkVAAAsEAAAixkAAE8PAADUDgAAahAAAM4QAAACFwAAiQ4AAG4TAAAcEwAAZhQAAFYXAADBEwAAzRMAAGwTAABoFwAAZhcAAF8XAAAiEwAAzg8AAGkOAADYDgAAYxYAAMsTAACqDgAAKBcAACYXAADFEwAAXRYAAOgRAABnEwAAZRMAAPIWAABzEwAAHRcAAPkWAADzEQAAzw4AAM4VAAAMEgAAsxEAAKURAABhEAAAMhcAALsTAEH5NQsBAQBBkDYL4AEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB/TcLAQEAQZE4C14CAwICAgICAAACAgACAgACAgICAgICAgICAAQAAAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAEH9OQsBAQBBkToLXgIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAQfA7Cw1sb3NlZWVwLWFsaXZlAEGJPAsBAQBBoDwL4AEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBiT4LAQEAQaA+C+cBAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAEGwwAALXwEBAAEBAQEBAAABAQABAQABAQEBAQEBAQEBAAAAAAAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAEGQwgALIWVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgBBwMIACy1yYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AQfnCAAsFAQIAAQMAQZDDAAvgAQQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH5xAALBQECAAEDAEGQxQAL4AEEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+cYACwQBAAABAEGRxwAL3wEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv`,`base64`)})),kt=i(((e,n)=>{let{Buffer:r}=t(`node:buffer`);n.exports=r.from(`AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ0ZXJfdXBncmFkZQAZEGxsaHR0cF9nZXRfZXJybm8AGhdsbGh0dHBfZ2V0X2Vycm9yX3JlYXNvbgAbF2xsaHR0cF9zZXRfZXJyb3JfcmVhc29uABwUbGxodHRwX2dldF9lcnJvcl9wb3MAHRFsbGh0dHBfZXJybm9fbmFtZQAeEmxsaHR0cF9tZXRob2RfbmFtZQAfEmxsaHR0cF9zdGF0dXNfbmFtZQAgGmxsaHR0cF9zZXRfbGVu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PgtBhwEMPQtBiAEMPAtBiQEMOwtBigEMOgtBiwEMOQtBjAEMOAtBjQEMNwtBjgEMNgtBjwEMNQtBkAEMNAtBkQEMMwtBkgEMMgtBkwEMMQtBlAEMMAtBlQEMLwtBlgEMLgtBlwEMLQtBmAEMLAtBmQEMKwtBmgEMKgtBmwEMKQtBnAEMKAtBnQEMJwtBngEMJgtBnwEMJQtBoAEMJAtBoQEMIwtBogEMIgtBowEMIQtBpAEMIAtBpQEMHwtBpgEMHgtBpwEMHQtBqAEMHAtBqQEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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iQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEV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JSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxB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AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HhJw8LQaQhDwtByywPC0H+MQ8LQcAkDwtBqyQPC0GNKA8LQeImDwtBgDAPC0G5Lw8LQdckDwtB7x8PC0HhHw8LQfofDwtB8iAPC0GoLw8LQa4yDwtBiDAPC0HsJw8LQYIiDwtBjh0PC0HQLg8LQcojDwtBxTIPC0HfHA8LQdIcDwtBxCAPC0HXIA8LQaIfDwtB7S4PC0GrMA8LQdQlDwtBzC4PC0H6Lg8LQfwrDwtB0jAPC0HxHQ8LQbsgDwtB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AAADAEGUCAsFBAAAAAUAQaQICwkGAAAABwAAAAgAQdwIC4otSW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwBB+TULAQEAQZA2C+ABAQECAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQf03CwEBAEGROAteAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgBB/TkLAQEAQZE6C14CAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAEHwOwsNbG9zZWVlcC1hbGl2ZQBBiTwLAQEAQaA8C+ABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQYk+CwEBAEGgPgvnAQEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZABBsMAAC18BAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQBBkMIACyFlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AQcDCAAstcmFuc2Zlci1lbmNvZGluZ3BncmFkZQ0KDQoNClNNDQoNClRUUC9DRS9UU1AvAEH5wgALBQECAAEDAEGQwwAL4AEEAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+cQACwUBAgABAwBBkMUAC+ABBAEBBQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQfnGAAsEAQAAAQBBkccAC98BAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==`,`base64`)})),At=i(((e,t)=>{let n=[`GET`,`HEAD`,`POST`],r=new Set(n),i=[101,204,205,304],a=[301,302,303,307,308],o=new Set(a),s=`1.7.9.11.13.15.17.19.20.21.22.23.25.37.42.43.53.69.77.79.87.95.101.102.103.104.109.110.111.113.115.117.119.123.135.137.139.143.161.179.389.427.465.512.513.514.515.526.530.531.532.540.548.554.556.563.587.601.636.989.990.993.995.1719.1720.1723.2049.3659.4045.4190.5060.5061.6000.6566.6665.6666.6667.6668.6669.6679.6697.10080`.split(`.`),c=new Set(s),l=[``,`no-referrer`,`no-referrer-when-downgrade`,`same-origin`,`origin`,`strict-origin`,`origin-when-cross-origin`,`strict-origin-when-cross-origin`,`unsafe-url`],u=new Set(l),d=[`follow`,`manual`,`error`],f=[`GET`,`HEAD`,`OPTIONS`,`TRACE`],p=new Set(f),m=[`navigate`,`same-origin`,`no-cors`,`cors`],h=[`omit`,`same-origin`,`include`],g=[`default`,`no-store`,`reload`,`no-cache`,`force-cache`,`only-if-cached`],v=[`content-encoding`,`content-language`,`content-location`,`content-type`,`content-length`],y=[`half`],b=[`CONNECT`,`TRACE`,`TRACK`],x=new Set(b),S=[`audio`,`audioworklet`,`font`,`image`,`manifest`,`paintworklet`,`script`,`style`,`track`,`video`,`xslt`,``];t.exports={subresource:S,forbiddenMethods:b,requestBodyHeader:v,referrerPolicy:l,requestRedirect:d,requestMode:m,requestCredentials:h,requestCache:g,redirectStatus:a,corsSafeListedMethods:n,nullBodyStatus:i,safeMethods:f,badPorts:s,requestDuplex:y,subresourceSet:new Set(S),badPortsSet:c,redirectStatusSet:o,corsSafeListedMethodsSet:r,safeMethodsSet:p,forbiddenMethodsSet:x,referrerPolicySet:u}})),jt=i(((e,t)=>{let n=Symbol.for(`undici.globalOrigin.1`);function r(){return globalThis[n]}function i(e){if(e===void 0){Object.defineProperty(globalThis,n,{value:void 0,writable:!0,enumerable:!1,configurable:!1});return}let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw TypeError(`Only http & https urls are allowed, received ${t.protocol}`);Object.defineProperty(globalThis,n,{value:t,writable:!0,enumerable:!1,configurable:!1})}t.exports={getGlobalOrigin:r,setGlobalOrigin:i}})),Mt=i(((e,n)=>{let r=t(`node:assert`),i=new TextEncoder,a=/^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/,o=/[\u000A\u000D\u0009\u0020]/,s=/[\u0009\u000A\u000C\u000D\u0020]/g,c=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function l(e){r(e.protocol===`data:`);let t=u(e,!0);t=t.slice(5);let n={position:0},i=f(`,`,t,n),a=i.length;if(i=T(i,!0,!0),n.position>=t.length)return`failure`;n.position++;let o=p(t.slice(a+1));if(/;(\u0020){0,}base64$/i.test(i)){if(o=y(D(o)),o===`failure`)return`failure`;i=i.slice(0,-6),i=i.replace(/(\u0020)+$/,``),i=i.slice(0,-1)}i.startsWith(`;`)&&(i=`text/plain`+i);let s=v(i);return s===`failure`&&(s=v(`text/plain;charset=US-ASCII`)),{mimeType:s,body:o}}function u(e,t=!1){if(!t)return e.href;let n=e.href,r=e.hash.length,i=r===0?n:n.substring(0,n.length-r);return!r&&n.endsWith(`#`)?i.slice(0,-1):i}function d(e,t,n){let r=``;for(;n.position=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function h(e){return e>=48&&e<=57?e-48:(e&223)-55}function g(e){let t=e.length,n=new Uint8Array(t),r=0;for(let i=0;ie.length)return`failure`;t.position++;let r=f(`;`,e,t);if(r=C(r,!1,!0),r.length===0||!a.test(r))return`failure`;let i=n.toLowerCase(),s=r.toLowerCase(),l={type:i,subtype:s,parameters:new Map,essence:`${i}/${s}`};for(;t.positiono.test(e),e,t);let n=d(e=>e!==`;`&&e!==`=`,e,t);if(n=n.toLowerCase(),t.positione.length)break;let r=null;if(e[t.position]===`"`)r=b(e,t,!0),f(`;`,e,t);else if(r=f(`;`,e,t),r=C(r,!1,!0),r.length===0)continue;n.length!==0&&a.test(n)&&(r.length===0||c.test(r))&&!l.parameters.has(n)&&l.parameters.set(n,r)}return l}function y(e){e=e.replace(s,``);let t=e.length;if(t%4==0&&e.charCodeAt(t-1)===61&&(--t,e.charCodeAt(t-1)===61&&--t),t%4==1||/[^+/0-9A-Za-z]/.test(e.length===t?e:e.substring(0,t)))return`failure`;let n=Buffer.from(e,`base64`);return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}function b(e,t,n){let i=t.position,a=``;for(r(e[t.position]===`"`),t.position++;a+=d(e=>e!==`"`&&e!==`\\`,e,t),!(t.position>=e.length);){let n=e[t.position];if(t.position++,n===`\\`){if(t.position>=e.length){a+=`\\`;break}a+=e[t.position],t.position++}else{r(n===`"`);break}}return n?a:e.slice(i,t.position)}function x(e){r(e!==`failure`);let{parameters:t,essence:n}=e,i=n;for(let[e,n]of t.entries())i+=`;`,i+=e,i+=`=`,a.test(n)||(n=n.replace(/(\\|")/g,`\\$1`),n=`"`+n,n+=`"`),i+=n;return i}function S(e){return e===13||e===10||e===9||e===32}function C(e,t=!0,n=!0){return E(e,t,n,S)}function w(e){return e===13||e===10||e===9||e===12||e===32}function T(e,t=!0,n=!0){return E(e,t,n,w)}function E(e,t,n,r){let i=0,a=e.length-1;if(t)for(;i0&&r(e.charCodeAt(a));)a--;return i===0&&a===e.length-1?e:e.slice(i,a+1)}function D(e){let t=e.length;if(65535>t)return String.fromCharCode.apply(null,e);let n=``,r=0,i=65535;for(;rt&&(i=t-r),n+=String.fromCharCode.apply(null,e.subarray(r,r+=i));return n}function O(e){switch(e.essence){case`application/ecmascript`:case`application/javascript`:case`application/x-ecmascript`:case`application/x-javascript`:case`text/ecmascript`:case`text/javascript`:case`text/javascript1.0`:case`text/javascript1.1`:case`text/javascript1.2`:case`text/javascript1.3`:case`text/javascript1.4`:case`text/javascript1.5`:case`text/jscript`:case`text/livescript`:case`text/x-ecmascript`:case`text/x-javascript`:return`text/javascript`;case`application/json`:case`text/json`:return`application/json`;case`image/svg+xml`:return`image/svg+xml`;case`text/xml`:case`application/xml`:return`application/xml`}return e.subtype.endsWith(`+json`)?`application/json`:e.subtype.endsWith(`+xml`)?`application/xml`:``}n.exports={dataURLProcessor:l,URLSerializer:u,collectASequenceOfCodePoints:d,collectASequenceOfCodePointsFast:f,stringPercentDecode:p,parseMIMEType:v,collectAnHTTPQuotedString:b,serializeAMimeType:x,removeChars:E,removeHTTPWhitespace:C,minimizeSupportedMimeType:O,HTTP_TOKEN_CODEPOINTS:a,isomorphicDecode:D}})),Nt=i(((e,n)=>{let{types:r,inspect:i}=t(`node:util`),{markAsUncloneable:a}=t(`node:worker_threads`),{toUSVString:o}=yt(),s={};s.converters={},s.util={},s.errors={},s.errors.exception=function(e){return TypeError(`${e.header}: ${e.message}`)},s.errors.conversionFailed=function(e){let t=e.types.length===1?``:` one of`,n=`${e.argument} could not be converted to${t}: ${e.types.join(`, `)}.`;return s.errors.exception({header:e.prefix,message:n})},s.errors.invalidArgument=function(e){return s.errors.exception({header:e.prefix,message:`"${e.value}" is an invalid ${e.type}.`})},s.brandCheck=function(e,t,n){if(n?.strict!==!1){if(!(e instanceof t)){let e=TypeError(`Illegal invocation`);throw e.code=`ERR_INVALID_THIS`,e}}else if(e?.[Symbol.toStringTag]!==t.prototype[Symbol.toStringTag]){let e=TypeError(`Illegal invocation`);throw e.code=`ERR_INVALID_THIS`,e}},s.argumentLengthCheck=function({length:e},t,n){if(e{}),s.util.ConvertToInt=function(e,t,n,r){let i,a;t===64?(i=2**53-1,a=n===`unsigned`?0:-9007199254740991):n===`unsigned`?(a=0,i=2**t-1):(a=(-2)**t-1,i=2**(t-1)-1);let o=Number(e);if(o===0&&(o=0),r?.enforceRange===!0){if(Number.isNaN(o)||o===1/0||o===-1/0)throw s.errors.exception({header:`Integer conversion`,message:`Could not convert ${s.util.Stringify(e)} to an integer.`});if(o=s.util.IntegerPart(o),oi)throw s.errors.exception({header:`Integer conversion`,message:`Value must be between ${a}-${i}, got ${o}.`});return o}return!Number.isNaN(o)&&r?.clamp===!0?(o=Math.min(Math.max(o,a),i),o=Math.floor(o)%2==0?Math.floor(o):Math.ceil(o),o):Number.isNaN(o)||o===0&&Object.is(0,o)||o===1/0||o===-1/0?0:(o=s.util.IntegerPart(o),o%=2**t,n===`signed`&&o>=2**t-1?o-2**t:o)},s.util.IntegerPart=function(e){let t=Math.floor(Math.abs(e));return e<0?-1*t:t},s.util.Stringify=function(e){switch(s.util.Type(e)){case`Symbol`:return`Symbol(${e.description})`;case`Object`:return i(e);case`String`:return`"${e}"`;default:return`${e}`}},s.sequenceConverter=function(e){return(t,n,r,i)=>{if(s.util.Type(t)!==`Object`)throw s.errors.exception({header:n,message:`${r} (${s.util.Stringify(t)}) is not iterable.`});let a=typeof i==`function`?i():t?.[Symbol.iterator]?.(),o=[],c=0;if(a===void 0||typeof a.next!=`function`)throw s.errors.exception({header:n,message:`${r} is not iterable.`});for(;;){let{done:t,value:i}=a.next();if(t)break;o.push(e(i,n,`${r}[${c++}]`))}return o}},s.recordConverter=function(e,t){return(n,i,a)=>{if(s.util.Type(n)!==`Object`)throw s.errors.exception({header:i,message:`${a} ("${s.util.Type(n)}") is not an Object.`});let o={};if(!r.isProxy(n)){let r=[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)];for(let s of r){let r=e(s,i,a);o[r]=t(n[s],i,a)}return o}let c=Reflect.ownKeys(n);for(let r of c)if(Reflect.getOwnPropertyDescriptor(n,r)?.enumerable){let s=e(r,i,a);o[s]=t(n[r],i,a)}return o}},s.interfaceConverter=function(e){return(t,n,r,i)=>{if(i?.strict!==!1&&!(t instanceof e))throw s.errors.exception({header:n,message:`Expected ${r} ("${s.util.Stringify(t)}") to be an instance of ${e.name}.`});return t}},s.dictionaryConverter=function(e){return(t,n,r)=>{let i=s.util.Type(t),a={};if(i===`Null`||i===`Undefined`)return a;if(i!==`Object`)throw s.errors.exception({header:n,message:`Expected ${t} to be one of: Null, Undefined, Object.`});for(let i of e){let{key:e,defaultValue:o,required:c,converter:l}=i;if(c===!0&&!Object.hasOwn(t,e))throw s.errors.exception({header:n,message:`Missing required key "${e}".`});let u=t[e],d=Object.hasOwn(i,`defaultValue`);if(d&&u!==null&&(u??=o()),c||d||u!==void 0){if(u=l(u,n,`${r}.${e}`),i.allowedValues&&!i.allowedValues.includes(u))throw s.errors.exception({header:n,message:`${u} is not an accepted type. Expected one of ${i.allowedValues.join(`, `)}.`});a[e]=u}}return a}},s.nullableConverter=function(e){return(t,n,r)=>t===null?t:e(t,n,r)},s.converters.DOMString=function(e,t,n,r){if(e===null&&r?.legacyNullToEmptyString)return``;if(typeof e==`symbol`)throw s.errors.exception({header:t,message:`${n} is a symbol, which cannot be converted to a DOMString.`});return String(e)},s.converters.ByteString=function(e,t,n){let r=s.converters.DOMString(e,t,n);for(let e=0;e255)throw TypeError(`Cannot convert argument to a ByteString because the character at index ${e} has a value of ${r.charCodeAt(e)} which is greater than 255.`);return r},s.converters.USVString=o,s.converters.boolean=function(e){return!!e},s.converters.any=function(e){return e},s.converters[`long long`]=function(e,t,n){return s.util.ConvertToInt(e,64,`signed`,void 0,t,n)},s.converters[`unsigned long long`]=function(e,t,n){return s.util.ConvertToInt(e,64,`unsigned`,void 0,t,n)},s.converters[`unsigned long`]=function(e,t,n){return s.util.ConvertToInt(e,32,`unsigned`,void 0,t,n)},s.converters[`unsigned short`]=function(e,t,n,r){return s.util.ConvertToInt(e,16,`unsigned`,r,t,n)},s.converters.ArrayBuffer=function(e,t,n,i){if(s.util.Type(e)!==`Object`||!r.isAnyArrayBuffer(e))throw s.errors.conversionFailed({prefix:t,argument:`${n} ("${s.util.Stringify(e)}")`,types:[`ArrayBuffer`]});if(i?.allowShared===!1&&r.isSharedArrayBuffer(e))throw s.errors.exception({header:`ArrayBuffer`,message:`SharedArrayBuffer is not allowed.`});if(e.resizable||e.growable)throw s.errors.exception({header:`ArrayBuffer`,message:`Received a resizable ArrayBuffer.`});return e},s.converters.TypedArray=function(e,t,n,i,a){if(s.util.Type(e)!==`Object`||!r.isTypedArray(e)||e.constructor.name!==t.name)throw s.errors.conversionFailed({prefix:n,argument:`${i} ("${s.util.Stringify(e)}")`,types:[t.name]});if(a?.allowShared===!1&&r.isSharedArrayBuffer(e.buffer))throw s.errors.exception({header:`ArrayBuffer`,message:`SharedArrayBuffer is not allowed.`});if(e.buffer.resizable||e.buffer.growable)throw s.errors.exception({header:`ArrayBuffer`,message:`Received a resizable ArrayBuffer.`});return e},s.converters.DataView=function(e,t,n,i){if(s.util.Type(e)!==`Object`||!r.isDataView(e))throw s.errors.exception({header:t,message:`${n} is not a DataView.`});if(i?.allowShared===!1&&r.isSharedArrayBuffer(e.buffer))throw s.errors.exception({header:`ArrayBuffer`,message:`SharedArrayBuffer is not allowed.`});if(e.buffer.resizable||e.buffer.growable)throw s.errors.exception({header:`ArrayBuffer`,message:`Received a resizable ArrayBuffer.`});return e},s.converters.BufferSource=function(e,t,n,i){if(r.isAnyArrayBuffer(e))return s.converters.ArrayBuffer(e,t,n,{...i,allowShared:!1});if(r.isTypedArray(e))return s.converters.TypedArray(e,e.constructor,t,n,{...i,allowShared:!1});if(r.isDataView(e))return s.converters.DataView(e,t,n,{...i,allowShared:!1});throw s.errors.conversionFailed({prefix:t,argument:`${n} ("${s.util.Stringify(e)}")`,types:[`BufferSource`]})},s.converters[`sequence`]=s.sequenceConverter(s.converters.ByteString),s.converters[`sequence>`]=s.sequenceConverter(s.converters[`sequence`]),s.converters[`record`]=s.recordConverter(s.converters.ByteString,s.converters.ByteString),n.exports={webidl:s}})),Pt=i(((e,n)=>{let{Transform:r}=t(`node:stream`),i=t(`node:zlib`),{redirectStatusSet:a,referrerPolicySet:o,badPortsSet:s}=At(),{getGlobalOrigin:c}=jt(),{collectASequenceOfCodePoints:l,collectAnHTTPQuotedString:u,removeChars:d,parseMIMEType:f}=Mt(),{performance:p}=t(`node:perf_hooks`),{isBlobLike:m,ReadableStreamFrom:h,isValidHTTPToken:g,normalizedMethodRecordsBase:v}=yt(),y=t(`node:assert`),{isUint8Array:b}=t(`node:util/types`),{webidl:x}=Nt(),S=[],C;try{C=t(`node:crypto`);let e=[`sha256`,`sha384`,`sha512`];S=C.getHashes().filter(t=>e.includes(t))}catch{}function w(e){let t=e.urlList,n=t.length;return n===0?null:t[n-1].toString()}function T(e,t){if(!a.has(e.status))return null;let n=e.headersList.get(`location`,!0);return n!==null&&N(n)&&(E(n)||(n=D(n)),n=new URL(n,w(e))),n&&!n.hash&&(n.hash=t),n}function E(e){for(let t=0;t126||n<32)return!1}return!0}function D(e){return Buffer.from(e,`binary`).toString(`utf8`)}function O(e){return e.urlList[e.urlList.length-1]}function k(e){let t=O(e);return W(t)&&s.has(t.port)?`blocked`:`allowed`}function A(e){return e instanceof Error||e?.constructor?.name===`Error`||e?.constructor?.name===`DOMException`}function j(e){for(let t=0;t=32&&n<=126||n>=128&&n<=255))return!1}return!0}let M=g;function N(e){return(e[0]===` `||e[0]===` `||e[e.length-1]===` `||e[e.length-1]===` `||e.includes(` +`)||e.includes(`\r`)||e.includes(`\0`))===!1}function P(e,t){let{headersList:n}=t,r=(n.get(`referrer-policy`,!0)??``).split(`,`),i=``;if(r.length>0)for(let e=r.length;e!==0;e--){let t=r[e-1].trim();if(o.has(t)){i=t;break}}i!==``&&(e.referrerPolicy=i)}function F(){return`allowed`}function I(){return`success`}function L(){return`success`}function R(e){let t=null;t=e.mode,e.headersList.set(`sec-fetch-mode`,t,!0)}function z(e){let t=e.origin;if(!(t===`client`||t===void 0)){if(e.responseTainting===`cors`||e.mode===`websocket`)e.headersList.append(`origin`,t,!0);else if(e.method!==`GET`&&e.method!==`HEAD`){switch(e.referrerPolicy){case`no-referrer`:t=null;break;case`no-referrer-when-downgrade`:case`strict-origin`:case`strict-origin-when-cross-origin`:e.origin&&Oe(e.origin)&&!Oe(O(e))&&(t=null);break;case`same-origin`:pe(e,O(e))||(t=null);break;default:}e.headersList.append(`origin`,t,!0)}}}function ee(e,t){return e}function B(e,t,n){return!e?.startTime||e.startTime4096&&(r=i);let a=pe(e,r),o=ae(r)&&!ae(e.url);switch(t){case`origin`:return i??ie(n,!0);case`unsafe-url`:return r;case`same-origin`:return a?i:`no-referrer`;case`origin-when-cross-origin`:return a?r:i;case`strict-origin-when-cross-origin`:{let t=O(e);return pe(r,t)?r:ae(r)&&!ae(t)?`no-referrer`:i}default:return o?`no-referrer`:i}}function ie(e,t){return y(e instanceof URL),e=new URL(e),e.protocol===`file:`||e.protocol===`about:`||e.protocol===`blank:`?`no-referrer`:(e.username=``,e.password=``,e.hash=``,t&&(e.pathname=``,e.search=``),e)}function ae(e){if(!(e instanceof URL))return!1;if(e.href===`about:blank`||e.href===`about:srcdoc`||e.protocol===`data:`||e.protocol===`file:`)return!0;return t(e.origin);function t(e){if(e==null||e===`null`)return!1;let t=new URL(e);return!!(t.protocol===`https:`||t.protocol===`wss:`||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(t.hostname)||t.hostname===`localhost`||t.hostname.includes(`localhost.`)||t.hostname.endsWith(`.localhost`))}}function oe(e,t){if(C===void 0)return!0;let n=ce(t);if(n===`no metadata`||n.length===0)return!0;let r=ue(n,le(n));for(let t of r){let n=t.algo,r=t.hash,i=C.createHash(n).update(e).digest(`base64`);if(i[i.length-1]===`=`&&(i=i[i.length-2]===`=`?i.slice(0,-2):i.slice(0,-1)),de(i,r))return!0}return!1}let se=/(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function ce(e){let t=[],n=!0;for(let r of e.split(` `)){n=!1;let e=se.exec(r);if(e===null||e.groups===void 0||e.groups.algo===void 0)continue;let i=e.groups.algo.toLowerCase();S.includes(i)&&t.push(e.groups)}return n===!0?`no metadata`:t}function le(e){let t=e[0].algo;if(t[3]===`5`)return t;for(let n=1;n{e=n,t=r}),resolve:e,reject:t}}function he(e){return e.controller.state===`aborted`}function ge(e){return e.controller.state===`aborted`||e.controller.state===`terminated`}function _e(e){return v[e.toLowerCase()]??e}function U(e){let t=JSON.stringify(e);if(t===void 0)throw TypeError(`Value is not JSON serializable`);return y(typeof t==`string`),t}let ve=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function ye(e,t,n=0,r=1){class i{#e;#t;#n;constructor(e,t){this.#e=e,this.#t=t,this.#n=0}next(){if(typeof this!=`object`||this===null||!(#e in this))throw TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`);let i=this.#n,a=this.#e[t];if(i>=a.length)return{value:void 0,done:!0};let{[n]:o,[r]:s}=a[i];this.#n=i+1;let c;switch(this.#t){case`key`:c=o;break;case`value`:c=s;break;case`key+value`:c=[o,s];break}return{value:c,done:!1}}}return delete i.prototype.constructor,Object.setPrototypeOf(i.prototype,ve),Object.defineProperties(i.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${e} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(e,t){return new i(e,t)}}function be(e,t,n,r=0,i=1){let a=ye(e,n,r,i),o={keys:{writable:!0,enumerable:!0,configurable:!0,value:function(){return x.brandCheck(this,t),a(this,`key`)}},values:{writable:!0,enumerable:!0,configurable:!0,value:function(){return x.brandCheck(this,t),a(this,`value`)}},entries:{writable:!0,enumerable:!0,configurable:!0,value:function(){return x.brandCheck(this,t),a(this,`key+value`)}},forEach:{writable:!0,enumerable:!0,configurable:!0,value:function(n,r=globalThis){if(x.brandCheck(this,t),x.argumentLengthCheck(arguments,1,`${e}.forEach`),typeof n!=`function`)throw TypeError(`Failed to execute 'forEach' on '${e}': parameter 1 is not of type 'Function'.`);for(let{0:e,1:t}of a(this,`key+value`))n.call(r,t,e,this)}}};return Object.defineProperties(t.prototype,{...o,[Symbol.iterator]:{writable:!0,enumerable:!1,configurable:!0,value:o.entries.value}})}async function xe(e,t,n){let r=t,i=n,a;try{a=e.stream.getReader()}catch(e){i(e);return}try{r(await Ee(a))}catch(e){i(e)}}function Se(e){return e instanceof ReadableStream||e[Symbol.toStringTag]===`ReadableStream`&&typeof e.tee==`function`}function Ce(e){try{e.close(),e.byobRequest?.respond(0)}catch(e){if(!e.message.includes(`Controller is already closed`)&&!e.message.includes(`ReadableStream is already closed`))throw e}}let we=/[^\x00-\xFF]/;function Te(e){return y(!we.test(e)),e}async function Ee(e){let t=[],n=0;for(;;){let{done:r,value:i}=await e.read();if(r)return Buffer.concat(t,n);if(!b(i))throw TypeError(`Received non-Uint8Array chunk`);t.push(i),n+=i.length}}function De(e){y(`protocol`in e);let t=e.protocol;return t===`about:`||t===`blob:`||t===`data:`}function Oe(e){return typeof e==`string`&&e[5]===`:`&&e[0]===`h`&&e[1]===`t`&&e[2]===`t`&&e[3]===`p`&&e[4]===`s`||e.protocol===`https:`}function W(e){y(`protocol`in e);let t=e.protocol;return t===`http:`||t===`https:`}function ke(e,t){let n=e;if(!n.startsWith(`bytes`))return`failure`;let r={position:5};if(t&&l(e=>e===` `||e===` `,n,r),n.charCodeAt(r.position)!==61)return`failure`;r.position++,t&&l(e=>e===` `||e===` `,n,r);let i=l(e=>{let t=e.charCodeAt(0);return t>=48&&t<=57},n,r),a=i.length?Number(i):null;if(t&&l(e=>e===` `||e===` `,n,r),n.charCodeAt(r.position)!==45)return`failure`;r.position++,t&&l(e=>e===` `||e===` `,n,r);let o=l(e=>{let t=e.charCodeAt(0);return t>=48&&t<=57},n,r),s=o.length?Number(o):null;return r.positions?`failure`:{rangeStartValue:a,rangeEndValue:s}}function Ae(e,t,n){let r=`bytes `;return r+=Te(`${e}`),r+=`-`,r+=Te(`${t}`),r+=`/`,r+=Te(`${n}`),r}var je=class extends r{#e;constructor(e){super(),this.#e=e}_transform(e,t,n){if(!this._inflateStream){if(e.length===0){n();return}this._inflateStream=(e[0]&15)==8?i.createInflate(this.#e):i.createInflateRaw(this.#e),this._inflateStream.on(`data`,this.push.bind(this)),this._inflateStream.on(`end`,()=>this.push(null)),this._inflateStream.on(`error`,e=>this.destroy(e))}this._inflateStream.write(e,t,n)}_final(e){this._inflateStream&&=(this._inflateStream.end(),null),e()}};function Me(e){return new je(e)}function Ne(e){let t=null,n=null,r=null,i=Fe(`content-type`,e);if(i===null)return`failure`;for(let e of i){let i=f(e);i===`failure`||i.essence===`*/*`||(r=i,r.essence===n?!r.parameters.has(`charset`)&&t!==null&&r.parameters.set(`charset`,t):(t=null,r.parameters.has(`charset`)&&(t=r.parameters.get(`charset`)),n=r.essence))}return r??`failure`}function Pe(e){let t=e,n={position:0},r=[],i=``;for(;n.positione!==`"`&&e!==`,`,t,n),n.positione===9||e===32),r.push(i),i=``}return r}function Fe(e,t){let n=t.get(e,!0);return n===null?null:Pe(n)}let Ie=new TextDecoder;function Le(e){return e.length===0?``:(e[0]===239&&e[1]===187&&e[2]===191&&(e=e.subarray(3)),Ie.decode(e))}var Re=class{get baseUrl(){return c()}get origin(){return this.baseUrl?.origin}policyContainer=ne()};n.exports={isAborted:he,isCancelled:ge,isValidEncodedURL:E,createDeferredPromise:me,ReadableStreamFrom:h,tryUpgradeRequestToAPotentiallyTrustworthyURL:fe,clampAndCoarsenConnectionTimingInfo:B,coarsenedSharedCurrentTime:te,determineRequestsReferrer:H,makePolicyContainer:ne,clonePolicyContainer:re,appendFetchMetadata:R,appendRequestOriginHeader:z,TAOCheck:L,corsCheck:I,crossOriginResourcePolicyCheck:F,createOpaqueTimingInfo:V,setRequestReferrerPolicyOnRedirect:P,isValidHTTPToken:g,requestBadPort:k,requestCurrentURL:O,responseURL:w,responseLocationURL:T,isBlobLike:m,isURLPotentiallyTrustworthy:ae,isValidReasonPhrase:j,sameOrigin:pe,normalizeMethod:_e,serializeJavascriptValueToJSONString:U,iteratorMixin:be,createIterator:ye,isValidHeaderName:M,isValidHeaderValue:N,isErrorLike:A,fullyReadBody:xe,bytesMatch:oe,isReadableStreamLike:Se,readableStreamClose:Ce,isomorphicEncode:Te,urlIsLocal:De,urlHasHttpsScheme:Oe,urlIsHttpHttpsScheme:W,readAllBytes:Ee,simpleRangeHeaderValue:ke,buildContentRange:Ae,parseMetadata:ce,createInflate:Me,extractMimeType:Ne,getDecodeSplit:Fe,utf8DecodeBytes:Le,environmentSettingsObject:new class{settingsObject=new Re}}})),Ft=i(((e,t)=>{t.exports={kUrl:Symbol(`url`),kHeaders:Symbol(`headers`),kSignal:Symbol(`signal`),kState:Symbol(`state`),kDispatcher:Symbol(`dispatcher`)}})),It=i(((e,n)=>{let{Blob:r,File:i}=t(`node:buffer`),{kState:a}=Ft(),{webidl:o}=Nt();var s=class e{constructor(e,t,n={}){let r=t,i=n.type,o=n.lastModified??Date.now();this[a]={blobLike:e,name:r,type:i,lastModified:o}}stream(...t){return o.brandCheck(this,e),this[a].blobLike.stream(...t)}arrayBuffer(...t){return o.brandCheck(this,e),this[a].blobLike.arrayBuffer(...t)}slice(...t){return o.brandCheck(this,e),this[a].blobLike.slice(...t)}text(...t){return o.brandCheck(this,e),this[a].blobLike.text(...t)}get size(){return o.brandCheck(this,e),this[a].blobLike.size}get type(){return o.brandCheck(this,e),this[a].blobLike.type}get name(){return o.brandCheck(this,e),this[a].name}get lastModified(){return o.brandCheck(this,e),this[a].lastModified}get[Symbol.toStringTag](){return`File`}};o.converters.Blob=o.interfaceConverter(r);function c(e){return e instanceof i||e&&(typeof e.stream==`function`||typeof e.arrayBuffer==`function`)&&e[Symbol.toStringTag]===`File`}n.exports={FileLike:s,isFileLike:c}})),Lt=i(((e,n)=>{let{isBlobLike:r,iteratorMixin:i}=Pt(),{kState:a}=Ft(),{kEnumerableProperty:o}=yt(),{FileLike:s,isFileLike:c}=It(),{webidl:l}=Nt(),{File:u}=t(`node:buffer`),d=t(`node:util`),f=globalThis.File??u;var p=class e{constructor(e){if(l.util.markAsUncloneable(this),e!==void 0)throw l.errors.conversionFailed({prefix:`FormData constructor`,argument:`Argument 1`,types:[`undefined`]});this[a]=[]}append(t,n,i=void 0){l.brandCheck(this,e);let o=`FormData.append`;if(l.argumentLengthCheck(arguments,2,o),arguments.length===3&&!r(n))throw TypeError(`Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'`);t=l.converters.USVString(t,o,`name`),n=r(n)?l.converters.Blob(n,o,`value`,{strict:!1}):l.converters.USVString(n,o,`value`),i=arguments.length===3?l.converters.USVString(i,o,`filename`):void 0;let s=m(t,n,i);this[a].push(s)}delete(t){l.brandCheck(this,e);let n=`FormData.delete`;l.argumentLengthCheck(arguments,1,n),t=l.converters.USVString(t,n,`name`),this[a]=this[a].filter(e=>e.name!==t)}get(t){l.brandCheck(this,e);let n=`FormData.get`;l.argumentLengthCheck(arguments,1,n),t=l.converters.USVString(t,n,`name`);let r=this[a].findIndex(e=>e.name===t);return r===-1?null:this[a][r].value}getAll(t){l.brandCheck(this,e);let n=`FormData.getAll`;return l.argumentLengthCheck(arguments,1,n),t=l.converters.USVString(t,n,`name`),this[a].filter(e=>e.name===t).map(e=>e.value)}has(t){l.brandCheck(this,e);let n=`FormData.has`;return l.argumentLengthCheck(arguments,1,n),t=l.converters.USVString(t,n,`name`),this[a].findIndex(e=>e.name===t)!==-1}set(t,n,i=void 0){l.brandCheck(this,e);let o=`FormData.set`;if(l.argumentLengthCheck(arguments,2,o),arguments.length===3&&!r(n))throw TypeError(`Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'`);t=l.converters.USVString(t,o,`name`),n=r(n)?l.converters.Blob(n,o,`name`,{strict:!1}):l.converters.USVString(n,o,`name`),i=arguments.length===3?l.converters.USVString(i,o,`name`):void 0;let s=m(t,n,i),c=this[a].findIndex(e=>e.name===t);c===-1?this[a].push(s):this[a]=[...this[a].slice(0,c),s,...this[a].slice(c+1).filter(e=>e.name!==t)]}[d.inspect.custom](e,t){let n=this[a].reduce((e,t)=>(e[t.name]?Array.isArray(e[t.name])?e[t.name].push(t.value):e[t.name]=[e[t.name],t.value]:e[t.name]=t.value,e),{__proto__:null});t.depth??=e,t.colors??=!0;let r=d.formatWithOptions(t,n);return`FormData ${r.slice(r.indexOf(`]`)+2)}`}};i(`FormData`,p,a,`name`,`value`),Object.defineProperties(p.prototype,{append:o,delete:o,get:o,getAll:o,has:o,set:o,[Symbol.toStringTag]:{value:`FormData`,configurable:!0}});function m(e,t,n){if(typeof t!=`string`&&(c(t)||(t=t instanceof Blob?new f([t],`blob`,{type:t.type}):new s(t,`blob`,{type:t.type})),n!==void 0)){let e={type:t.type,lastModified:t.lastModified};t=t instanceof u?new f([t],n,e):new s(t,n,e)}return{name:e,value:t}}n.exports={FormData:p,makeEntry:m}})),Rt=i(((e,n)=>{let{isUSVString:r,bufferToLowerCasedHeaderName:i}=yt(),{utf8DecodeBytes:a}=Pt(),{HTTP_TOKEN_CODEPOINTS:o,isomorphicDecode:s}=Mt(),{isFileLike:c}=It(),{makeEntry:l}=Lt(),u=t(`node:assert`),{File:d}=t(`node:buffer`),f=globalThis.File??d,p=Buffer.from(`form-data; name="`),m=Buffer.from(`; filename`),h=Buffer.from(`--`),g=Buffer.from(`--\r `);function v(e){for(let t=0;t70)return!1;for(let n=0;n=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===39||t===45||t===95))return!1}return!0}function b(e,t){u(t!==`failure`&&t.essence===`multipart/form-data`);let n=t.parameters.get(`boundary`);if(n===void 0)return`failure`;let i=Buffer.from(`--${n}`,`utf8`),o=[],s={position:0};for(;e[s.position]===13&&e[s.position+1]===10;)s.position+=2;let d=e.length;for(;e[d-1]===10&&e[d-2]===13;)d-=2;for(d!==e.length&&(e=e.subarray(0,d));;){if(e.subarray(s.position,s.position+i.length).equals(i))s.position+=i.length;else return`failure`;if(s.position===e.length-2&&T(e,h,s)||s.position===e.length-4&&T(e,g,s))return o;if(e[s.position]!==13||e[s.position+1]!==10)return`failure`;s.position+=2;let t=x(e,s);if(t===`failure`)return`failure`;let{name:n,filename:d,contentType:p,encoding:m}=t;s.position+=2;let y;{let t=e.indexOf(i.subarray(2),s.position);if(t===-1)return`failure`;y=e.subarray(s.position,t-4),s.position+=y.length,m===`base64`&&(y=Buffer.from(y.toString(),`base64`))}if(e[s.position]!==13||e[s.position+1]!==10)return`failure`;s.position+=2;let b;d===null?b=a(Buffer.from(y)):(p??=`text/plain`,v(p)||(p=``),b=new f([y],d,{type:p})),u(r(n)),u(typeof b==`string`&&r(b)||c(b)),o.push(l(n,b,d))}}function x(e,t){let n=null,r=null,a=null,c=null;for(;;){if(e[t.position]===13&&e[t.position+1]===10)return n===null?`failure`:{name:n,filename:r,contentType:a,encoding:c};let l=C(e=>e!==10&&e!==13&&e!==58,e,t);if(l=w(l,!0,!0,e=>e===9||e===32),!o.test(l.toString())||e[t.position]!==58)return`failure`;switch(t.position++,C(e=>e===32||e===9,e,t),i(l)){case`content-disposition`:if(n=r=null,!T(e,p,t)||(t.position+=17,n=S(e,t),n===null))return`failure`;if(T(e,m,t)){let n=t.position+m.length;if(e[n]===42&&(t.position+=1,n+=1),e[n]!==61||e[n+1]!==34||(t.position+=12,r=S(e,t),r===null))return`failure`}break;case`content-type`:{let n=C(e=>e!==10&&e!==13,e,t);n=w(n,!1,!0,e=>e===9||e===32),a=s(n);break}case`content-transfer-encoding`:{let n=C(e=>e!==10&&e!==13,e,t);n=w(n,!1,!0,e=>e===9||e===32),c=s(n);break}default:C(e=>e!==10&&e!==13,e,t)}if(e[t.position]!==13&&e[t.position+1]!==10)return`failure`;t.position+=2}}function S(e,t){u(e[t.position-1]===34);let n=C(e=>e!==10&&e!==13&&e!==34,e,t);return e[t.position]===34?(t.position++,n=new TextDecoder().decode(n).replace(/%0A/gi,` -`).replace(/%0D/gi,`\r`).replace(/%22/g,`"`),n):null}function C(e,t,n){let r=n.position;for(;r0&&r(e[a]);)a--;return i===0&&a===e.length-1?e:e.subarray(i,a+1)}function T(e,t,n){if(e.length{let r=_t(),{ReadableStreamFrom:i,isBlobLike:a,isReadableStreamLike:o,readableStreamClose:s,createDeferredPromise:c,fullyReadBody:l,extractMimeType:u,utf8DecodeBytes:d}=Mt(),{FormData:f}=Ft(),{kState:p}=Nt(),{webidl:m}=jt(),{Blob:h}=t(`node:buffer`),g=t(`node:assert`),{isErrored:v,isDisturbed:y}=t(`node:stream`),{isArrayBuffer:b}=t(`node:util/types`),{serializeAMimeType:x}=At(),{multipartFormDataParser:S}=It(),C;try{let e=t(`node:crypto`);C=t=>e.randomInt(0,t)}catch{C=e=>Math.floor(Math.random(e))}let w=new TextEncoder;function T(){}let E=globalThis.FinalizationRegistry&&process.version.indexOf(`v18`)!==0,D;E&&(D=new FinalizationRegistry(e=>{let t=e.deref();t&&!t.locked&&!y(t)&&!v(t)&&t.cancel(`Response object has been garbage collected`).catch(T)}));function O(e,t=!1){let n=null;n=e instanceof ReadableStream?e:a(e)?e.stream():new ReadableStream({async pull(e){let t=typeof l==`string`?w.encode(l):l;t.byteLength&&e.enqueue(t),queueMicrotask(()=>s(e))},start(){},type:`bytes`}),g(o(n));let c=null,l=null,u=null,d=null;if(typeof e==`string`)l=e,d=`text/plain;charset=UTF-8`;else if(e instanceof URLSearchParams)l=e.toString(),d=`application/x-www-form-urlencoded;charset=UTF-8`;else if(b(e))l=new Uint8Array(e.slice());else if(ArrayBuffer.isView(e))l=new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));else if(r.isFormDataLike(e)){let t=`----formdata-undici-0${`${C(1e11)}`.padStart(11,`0`)}`,n=`--${t}\r\nContent-Disposition: form-data`,r=e=>e.replace(/\n/g,`%0A`).replace(/\r/g,`%0D`).replace(/"/g,`%22`),i=e=>e.replace(/\r?\n|\r/g,`\r +`).replace(/%0D/gi,`\r`).replace(/%22/g,`"`),n):null}function C(e,t,n){let r=n.position;for(;r0&&r(e[a]);)a--;return i===0&&a===e.length-1?e:e.subarray(i,a+1)}function T(e,t,n){if(e.length{let r=yt(),{ReadableStreamFrom:i,isBlobLike:a,isReadableStreamLike:o,readableStreamClose:s,createDeferredPromise:c,fullyReadBody:l,extractMimeType:u,utf8DecodeBytes:d}=Pt(),{FormData:f}=Lt(),{kState:p}=Ft(),{webidl:m}=Nt(),{Blob:h}=t(`node:buffer`),g=t(`node:assert`),{isErrored:v,isDisturbed:y}=t(`node:stream`),{isArrayBuffer:b}=t(`node:util/types`),{serializeAMimeType:x}=Mt(),{multipartFormDataParser:S}=Rt(),C;try{let e=t(`node:crypto`);C=t=>e.randomInt(0,t)}catch{C=e=>Math.floor(Math.random(e))}let w=new TextEncoder;function T(){}let E=globalThis.FinalizationRegistry&&process.version.indexOf(`v18`)!==0,D;E&&(D=new FinalizationRegistry(e=>{let t=e.deref();t&&!t.locked&&!y(t)&&!v(t)&&t.cancel(`Response object has been garbage collected`).catch(T)}));function O(e,t=!1){let n=null;n=e instanceof ReadableStream?e:a(e)?e.stream():new ReadableStream({async pull(e){let t=typeof l==`string`?w.encode(l):l;t.byteLength&&e.enqueue(t),queueMicrotask(()=>s(e))},start(){},type:`bytes`}),g(o(n));let c=null,l=null,u=null,d=null;if(typeof e==`string`)l=e,d=`text/plain;charset=UTF-8`;else if(e instanceof URLSearchParams)l=e.toString(),d=`application/x-www-form-urlencoded;charset=UTF-8`;else if(b(e))l=new Uint8Array(e.slice());else if(ArrayBuffer.isView(e))l=new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));else if(r.isFormDataLike(e)){let t=`----formdata-undici-0${`${C(1e11)}`.padStart(11,`0`)}`,n=`--${t}\r\nContent-Disposition: form-data`,r=e=>e.replace(/\n/g,`%0A`).replace(/\r/g,`%0D`).replace(/"/g,`%22`),i=e=>e.replace(/\r?\n|\r/g,`\r `),a=[],o=new Uint8Array([13,10]);u=0;let s=!1;for(let[t,c]of e)if(typeof c==`string`){let e=w.encode(n+`; name="${r(i(t))}"\r\n\r\n${i(c)}\r\n`);a.push(e),u+=e.byteLength}else{let e=w.encode(`${n}; name="${r(i(t))}"`+(c.name?`; filename="${r(c.name)}"`:``)+`\r -Content-Type: ${c.type||`application/octet-stream`}\r\n\r\n`);a.push(e,c,o),typeof c.size==`number`?u+=e.byteLength+c.size+o.byteLength:s=!0}let f=w.encode(`--${t}--\r\n`);a.push(f),u+=f.byteLength,s&&(u=null),l=e,c=async function*(){for(let e of a)e.stream?yield*e.stream():yield e},d=`multipart/form-data; boundary=${t}`}else if(a(e))l=e,u=e.size,e.type&&(d=e.type);else if(typeof e[Symbol.asyncIterator]==`function`){if(t)throw TypeError(`keepalive`);if(r.isDisturbed(e)||e.locked)throw TypeError(`Response body object should not be disturbed or locked`);n=e instanceof ReadableStream?e:i(e)}if((typeof l==`string`||r.isBuffer(l))&&(u=Buffer.byteLength(l)),c!=null){let t;n=new ReadableStream({async start(){t=c(e)[Symbol.asyncIterator]()},async pull(e){let{value:r,done:i}=await t.next();if(i)queueMicrotask(()=>{e.close(),e.byobRequest?.respond(0)});else if(!v(n)){let t=new Uint8Array(r);t.byteLength&&e.enqueue(t)}return e.desiredSize>0},async cancel(e){await t.return()},type:`bytes`})}return[{stream:n,source:l,length:u},d]}function k(e,t=!1){return e instanceof ReadableStream&&(g(!r.isDisturbed(e),`The body has already been consumed.`),g(!e.locked,`The stream is locked.`)),O(e,t)}function A(e,t){let[n,r]=t.stream.tee();return t.stream=n,{stream:r,length:t.length,source:t.source}}function j(e){if(e.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`)}function M(e){return{blob(){return P(this,e=>{let t=L(this);return t===null?t=``:t&&=x(t),new h([e],{type:t})},e)},arrayBuffer(){return P(this,e=>new Uint8Array(e).buffer,e)},text(){return P(this,d,e)},json(){return P(this,I,e)},formData(){return P(this,e=>{let t=L(this);if(t!==null)switch(t.essence){case`multipart/form-data`:{let n=S(e,t);if(n===`failure`)throw TypeError(`Failed to parse body as FormData.`);let r=new f;return r[p]=n,r}case`application/x-www-form-urlencoded`:{let t=new URLSearchParams(e.toString()),n=new f;for(let[e,r]of t)n.append(e,r);return n}}throw TypeError(`Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".`)},e)},bytes(){return P(this,e=>new Uint8Array(e),e)}}}function N(e){Object.assign(e.prototype,M(e))}async function P(e,t,n){if(m.brandCheck(e,n),F(e))throw TypeError(`Body is unusable: Body has already been read`);j(e[p]);let r=c(),i=e=>r.reject(e),a=e=>{try{r.resolve(t(e))}catch(e){i(e)}};return e[p].body==null?(a(Buffer.allocUnsafe(0)),r.promise):(await l(e[p].body,a,i),r.promise)}function F(e){let t=e[p].body;return t!=null&&(t.stream.locked||r.isDisturbed(t.stream))}function I(e){return JSON.parse(d(e))}function L(e){let t=e[p].headersList,n=u(t);return n===`failure`?null:n}n.exports={extractBody:O,safelyExtractBody:k,cloneBody:A,mixinBody:N,streamRegistry:D,hasFinalizationRegistry:E,bodyUnusable:F}})),Rt=i(((e,n)=>{let r=t(`node:assert`),i=_t(),{channels:a}=vt(),o=St(),{RequestContentLengthMismatchError:s,ResponseContentLengthMismatchError:c,RequestAbortedError:l,HeadersTimeoutError:u,HeadersOverflowError:d,SocketError:f,InformationalError:p,BodyTimeoutError:m,HTTPParserError:h,ResponseExceededMaxSizeError:g}=mt(),{kUrl:v,kReset:y,kClient:b,kParser:x,kBlocking:S,kRunning:C,kPending:w,kSize:T,kWriting:E,kQueue:D,kNoRef:O,kKeepAliveDefaultTimeout:k,kHostHeader:A,kPendingIdx:j,kRunningIdx:M,kError:N,kPipelining:P,kSocket:F,kKeepAliveTimeoutValue:I,kMaxHeadersSize:L,kKeepAliveMaxTimeout:R,kKeepAliveTimeoutThreshold:z,kHeadersTimeout:ee,kBodyTimeout:B,kStrictContentLength:te,kMaxRequests:V,kCounter:ne,kMaxResponseSize:re,kOnError:H,kResume:ie,kHTTPContext:ae}=pt(),oe=Tt(),se=Buffer.alloc(0),ce=Buffer[Symbol.species],le=i.addListener,ue=i.removeAllListeners,de;async function fe(){let e=process.env.JEST_WORKER_ID?Et():void 0,t;try{t=await WebAssembly.compile(Dt())}catch{t=await WebAssembly.compile(e||Et())}return await WebAssembly.instantiate(t,{env:{wasm_on_url:(e,t,n)=>0,wasm_on_status:(e,t,n)=>{r(he.ptr===e);let i=t-U+ge.byteOffset;return he.onStatus(new ce(ge.buffer,i,n))||0},wasm_on_message_begin:e=>(r(he.ptr===e),he.onMessageBegin()||0),wasm_on_header_field:(e,t,n)=>{r(he.ptr===e);let i=t-U+ge.byteOffset;return he.onHeaderField(new ce(ge.buffer,i,n))||0},wasm_on_header_value:(e,t,n)=>{r(he.ptr===e);let i=t-U+ge.byteOffset;return he.onHeaderValue(new ce(ge.buffer,i,n))||0},wasm_on_headers_complete:(e,t,n,i)=>(r(he.ptr===e),he.onHeadersComplete(t,!!n,!!i)||0),wasm_on_body:(e,t,n)=>{r(he.ptr===e);let i=t-U+ge.byteOffset;return he.onBody(new ce(ge.buffer,i,n))||0},wasm_on_message_complete:e=>(r(he.ptr===e),he.onMessageComplete()||0)}})}let pe=null,me=fe();me.catch();let he=null,ge=null,_e=0,U=null;var ve=class{constructor(e,t,{exports:n}){r(Number.isFinite(e[L])&&e[L]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(oe.TYPE.RESPONSE),this.client=e,this.socket=t,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText=``,this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[L],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive=``,this.contentLength=``,this.connection=``,this.maxResponseSize=e[re]}setTimeout(e,t){e!==this.timeoutValue||t&1^this.timeoutType&1?(this.timeout&&=(o.clearTimeout(this.timeout),null),e&&(t&1?this.timeout=o.setFastTimeout(ye,e,new WeakRef(this)):(this.timeout=setTimeout(ye,e,new WeakRef(this)),this.timeout.unref())),this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.timeoutType=t}resume(){this.socket.destroyed||!this.paused||(r(this.ptr!=null),r(he==null),this.llhttp.llhttp_resume(this.ptr),r(this.timeoutType===5),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||se),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){r(this.ptr!=null),r(he==null),r(!this.paused);let{socket:t,llhttp:n}=this;e.length>_e&&(U&&n.free(U),_e=Math.ceil(e.length/4096)*4096,U=n.malloc(_e)),new Uint8Array(n.memory.buffer,U,_e).set(e);try{let r;try{ge=e,he=this,r=n.llhttp_execute(this.ptr,U,e.length)}catch(e){throw e}finally{he=null,ge=null}let i=n.llhttp_get_error_pos(this.ptr)-U;if(r===oe.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(i));else if(r===oe.ERROR.PAUSED)this.paused=!0,t.unshift(e.slice(i));else if(r!==oe.ERROR.OK){let t=n.llhttp_get_error_reason(this.ptr),a=``;if(t){let e=new Uint8Array(n.memory.buffer,t).indexOf(0);a=`Response does not match the HTTP/1.1 protocol (`+Buffer.from(n.memory.buffer,t,e).toString()+`)`}throw new h(a,oe.ERROR[r],e.slice(i))}}catch(e){i.destroy(t,e)}}destroy(){r(this.ptr!=null),r(he==null),this.llhttp.llhttp_free(this.ptr),this.ptr=null,this.timeout&&o.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(e){this.statusText=e.toString()}onMessageBegin(){let{socket:e,client:t}=this;if(e.destroyed)return-1;let n=t[D][t[M]];if(!n)return-1;n.onResponseStarted()}onHeaderField(e){let t=this.headers.length;t&1?this.headers[t-1]=Buffer.concat([this.headers[t-1],e]):this.headers.push(e),this.trackHeader(e.length)}onHeaderValue(e){let t=this.headers.length;(t&1)==1?(this.headers.push(e),t+=1):this.headers[t-1]=Buffer.concat([this.headers[t-1],e]);let n=this.headers[t-2];if(n.length===10){let t=i.bufferToLowerCasedHeaderName(n);t===`keep-alive`?this.keepAlive+=e.toString():t===`connection`&&(this.connection+=e.toString())}else n.length===14&&i.bufferToLowerCasedHeaderName(n)===`content-length`&&(this.contentLength+=e.toString());this.trackHeader(e.length)}trackHeader(e){this.headersSize+=e,this.headersSize>=this.headersMaxSize&&i.destroy(this.socket,new d)}onUpgrade(e){let{upgrade:t,client:n,socket:a,headers:o,statusCode:s}=this;r(t),r(n[F]===a),r(!a.destroyed),r(!this.paused),r((o.length&1)==0);let c=n[D][n[M]];r(c),r(c.upgrade||c.method===`CONNECT`),this.statusCode=null,this.statusText=``,this.shouldKeepAlive=null,this.headers=[],this.headersSize=0,a.unshift(e),a[x].destroy(),a[x]=null,a[b]=null,a[N]=null,ue(a),n[F]=null,n[ae]=null,n[D][n[M]++]=null,n.emit(`disconnect`,n[v],[n],new p(`upgrade`));try{c.onUpgrade(s,o,a)}catch(e){i.destroy(a,e)}n[ie]()}onHeadersComplete(e,t,n){let{client:a,socket:o,headers:s,statusText:c}=this;if(o.destroyed)return-1;let l=a[D][a[M]];if(!l)return-1;if(r(!this.upgrade),r(this.statusCode<200),e===100)return i.destroy(o,new f(`bad response`,i.getSocketInfo(o))),-1;if(t&&!l.upgrade)return i.destroy(o,new f(`bad upgrade`,i.getSocketInfo(o))),-1;if(r(this.timeoutType===3),this.statusCode=e,this.shouldKeepAlive=n||l.method===`HEAD`&&!o[y]&&this.connection.toLowerCase()===`keep-alive`,this.statusCode>=200){let e=l.bodyTimeout==null?a[B]:l.bodyTimeout;this.setTimeout(e,5)}else this.timeout&&this.timeout.refresh&&this.timeout.refresh();if(l.method===`CONNECT`||t)return r(a[C]===1),this.upgrade=!0,2;if(r((this.headers.length&1)==0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&a[P]){let e=this.keepAlive?i.parseKeepAliveTimeout(this.keepAlive):null;if(e!=null){let t=Math.min(e-a[z],a[R]);t<=0?o[y]=!0:a[I]=t}else a[I]=a[k]}else o[y]=!0;let u=l.onHeaders(e,s,this.resume,c)===!1;return l.aborted?-1:l.method===`HEAD`||e<200?1:(o[S]&&(o[S]=!1,a[ie]()),u?oe.ERROR.PAUSED:0)}onBody(e){let{client:t,socket:n,statusCode:a,maxResponseSize:o}=this;if(n.destroyed)return-1;let s=t[D][t[M]];if(r(s),r(this.timeoutType===5),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),r(a>=200),o>-1&&this.bytesRead+e.length>o)return i.destroy(n,new g),-1;if(this.bytesRead+=e.length,s.onData(e)===!1)return oe.ERROR.PAUSED}onMessageComplete(){let{client:e,socket:t,statusCode:n,upgrade:a,headers:o,contentLength:s,bytesRead:l,shouldKeepAlive:u}=this;if(t.destroyed&&(!n||u))return-1;if(a)return;r(n>=100),r((this.headers.length&1)==0);let d=e[D][e[M]];if(r(d),this.statusCode=null,this.statusText=``,this.bytesRead=0,this.contentLength=``,this.keepAlive=``,this.connection=``,this.headers=[],this.headersSize=0,!(n<200)){if(d.method!==`HEAD`&&s&&l!==parseInt(s,10))return i.destroy(t,new c),-1;if(d.onComplete(o),e[D][e[M]++]=null,t[E])return r(e[C]===0),i.destroy(t,new p(`reset`)),oe.ERROR.PAUSED;if(!u||t[y]&&e[C]===0)return i.destroy(t,new p(`reset`)),oe.ERROR.PAUSED;e[P]==null||e[P]===1?setImmediate(()=>e[ie]()):e[ie]()}}};function ye(e){let{socket:t,timeoutType:n,client:a,paused:o}=e.deref();n===3?(!t[E]||t.writableNeedDrain||a[C]>1)&&(r(!o,`cannot be paused while waiting for headers`),i.destroy(t,new u)):n===5?o||i.destroy(t,new m):n===8&&(r(a[C]===0&&a[I]),i.destroy(t,new p(`socket idle timeout`)))}async function be(e,t){e[F]=t,pe||(pe=await me,me=null),t[O]=!1,t[E]=!1,t[y]=!1,t[S]=!1,t[x]=new ve(e,t,pe),le(t,`error`,function(e){r(e.code!==`ERR_TLS_CERT_ALTNAME_INVALID`);let t=this[x];if(e.code===`ECONNRESET`&&t.statusCode&&!t.shouldKeepAlive){t.onMessageComplete();return}this[N]=e,this[b][H](e)}),le(t,`readable`,function(){let e=this[x];e&&e.readMore()}),le(t,`end`,function(){let e=this[x];if(e.statusCode&&!e.shouldKeepAlive){e.onMessageComplete();return}i.destroy(this,new f(`other side closed`,i.getSocketInfo(this)))}),le(t,`close`,function(){let e=this[b],t=this[x];t&&(!this[N]&&t.statusCode&&!t.shouldKeepAlive&&t.onMessageComplete(),this[x].destroy(),this[x]=null);let n=this[N]||new f(`closed`,i.getSocketInfo(this));if(e[F]=null,e[ae]=null,e.destroyed){r(e[w]===0);let t=e[D].splice(e[M]);for(let r=0;r0&&n.code!==`UND_ERR_INFO`){let t=e[D][e[M]];e[D][e[M]++]=null,i.errorRequest(e,t,n)}e[j]=e[M],r(e[C]===0),e.emit(`disconnect`,e[v],[e],n),e[ie]()});let n=!1;return t.on(`close`,()=>{n=!0}),{version:`h1`,defaultPipelining:1,write(...t){return Ce(e,...t)},resume(){xe(e)},destroy(e,r){n?queueMicrotask(r):t.destroy(e).on(`close`,r)},get destroyed(){return t.destroyed},busy(n){return!!(t[E]||t[y]||t[S]||n&&(e[C]>0&&!n.idempotent||e[C]>0&&(n.upgrade||n.method===`CONNECT`)||e[C]>0&&i.bodyLength(n.body)!==0&&(i.isStream(n.body)||i.isAsyncIterable(n.body)||i.isFormDataLike(n.body))))}}}function xe(e){let t=e[F];if(t&&!t.destroyed){if(e[T]===0?!t[O]&&t.unref&&(t.unref(),t[O]=!0):t[O]&&t.ref&&(t.ref(),t[O]=!1),e[T]===0)t[x].timeoutType!==8&&t[x].setTimeout(e[I],8);else if(e[C]>0&&t[x].statusCode<200&&t[x].timeoutType!==3){let n=e[D][e[M]],r=n.headersTimeout==null?e[ee]:n.headersTimeout;t[x].setTimeout(r,3)}}}function Se(e){return e!==`GET`&&e!==`HEAD`&&e!==`OPTIONS`&&e!==`TRACE`&&e!==`CONNECT`}function Ce(e,t){let{method:n,path:o,host:c,upgrade:u,blocking:d,reset:f}=t,{body:m,headers:h,contentLength:g}=t,v=n===`PUT`||n===`POST`||n===`PATCH`||n===`QUERY`||n===`PROPFIND`||n===`PROPPATCH`;if(i.isFormDataLike(m)){de||=Lt().extractBody;let[e,n]=de(m);t.contentType??h.push(`content-type`,n),m=e.stream,g=e.length}else i.isBlobLike(m)&&t.contentType==null&&m.type&&h.push(`content-type`,m.type);m&&typeof m.read==`function`&&m.read(0);let b=i.bodyLength(m);if(g=b??g,g===null&&(g=t.contentLength),g===0&&!v&&(g=null),Se(n)&&g>0&&t.contentLength!==null&&t.contentLength!==g){if(e[te])return i.errorRequest(e,t,new s),!1;process.emitWarning(new s)}let x=e[F],C=n=>{t.aborted||t.completed||(i.errorRequest(e,t,n||new l),i.destroy(m),i.destroy(x,new p(`aborted`)))};try{t.onConnect(C)}catch(n){i.errorRequest(e,t,n)}if(t.aborted)return!1;n===`HEAD`&&(x[y]=!0),(u||n===`CONNECT`)&&(x[y]=!0),f!=null&&(x[y]=f),e[V]&&x[ne]++>=e[V]&&(x[y]=!0),d&&(x[S]=!0);let w=`${n} ${o} HTTP/1.1\r\n`;if(typeof c==`string`?w+=`host: ${c}\r\n`:w+=e[A],u?w+=`connection: upgrade\r\nupgrade: ${u}\r\n`:e[P]&&!x[y]?w+=`connection: keep-alive\r +Content-Type: ${c.type||`application/octet-stream`}\r\n\r\n`);a.push(e,c,o),typeof c.size==`number`?u+=e.byteLength+c.size+o.byteLength:s=!0}let f=w.encode(`--${t}--\r\n`);a.push(f),u+=f.byteLength,s&&(u=null),l=e,c=async function*(){for(let e of a)e.stream?yield*e.stream():yield e},d=`multipart/form-data; boundary=${t}`}else if(a(e))l=e,u=e.size,e.type&&(d=e.type);else if(typeof e[Symbol.asyncIterator]==`function`){if(t)throw TypeError(`keepalive`);if(r.isDisturbed(e)||e.locked)throw TypeError(`Response body object should not be disturbed or locked`);n=e instanceof ReadableStream?e:i(e)}if((typeof l==`string`||r.isBuffer(l))&&(u=Buffer.byteLength(l)),c!=null){let t;n=new ReadableStream({async start(){t=c(e)[Symbol.asyncIterator]()},async pull(e){let{value:r,done:i}=await t.next();if(i)queueMicrotask(()=>{e.close(),e.byobRequest?.respond(0)});else if(!v(n)){let t=new Uint8Array(r);t.byteLength&&e.enqueue(t)}return e.desiredSize>0},async cancel(e){await t.return()},type:`bytes`})}return[{stream:n,source:l,length:u},d]}function k(e,t=!1){return e instanceof ReadableStream&&(g(!r.isDisturbed(e),`The body has already been consumed.`),g(!e.locked,`The stream is locked.`)),O(e,t)}function A(e,t){let[n,r]=t.stream.tee();return t.stream=n,{stream:r,length:t.length,source:t.source}}function j(e){if(e.aborted)throw new DOMException(`The operation was aborted.`,`AbortError`)}function M(e){return{blob(){return P(this,e=>{let t=L(this);return t===null?t=``:t&&=x(t),new h([e],{type:t})},e)},arrayBuffer(){return P(this,e=>new Uint8Array(e).buffer,e)},text(){return P(this,d,e)},json(){return P(this,I,e)},formData(){return P(this,e=>{let t=L(this);if(t!==null)switch(t.essence){case`multipart/form-data`:{let n=S(e,t);if(n===`failure`)throw TypeError(`Failed to parse body as FormData.`);let r=new f;return r[p]=n,r}case`application/x-www-form-urlencoded`:{let t=new URLSearchParams(e.toString()),n=new f;for(let[e,r]of t)n.append(e,r);return n}}throw TypeError(`Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".`)},e)},bytes(){return P(this,e=>new Uint8Array(e),e)}}}function N(e){Object.assign(e.prototype,M(e))}async function P(e,t,n){if(m.brandCheck(e,n),F(e))throw TypeError(`Body is unusable: Body has already been read`);j(e[p]);let r=c(),i=e=>r.reject(e),a=e=>{try{r.resolve(t(e))}catch(e){i(e)}};return e[p].body==null?(a(Buffer.allocUnsafe(0)),r.promise):(await l(e[p].body,a,i),r.promise)}function F(e){let t=e[p].body;return t!=null&&(t.stream.locked||r.isDisturbed(t.stream))}function I(e){return JSON.parse(d(e))}function L(e){let t=e[p].headersList,n=u(t);return n===`failure`?null:n}n.exports={extractBody:O,safelyExtractBody:k,cloneBody:A,mixinBody:N,streamRegistry:D,hasFinalizationRegistry:E,bodyUnusable:F}})),Bt=i(((e,n)=>{let r=t(`node:assert`),i=yt(),{channels:a}=bt(),o=wt(),{RequestContentLengthMismatchError:s,ResponseContentLengthMismatchError:c,RequestAbortedError:l,HeadersTimeoutError:u,HeadersOverflowError:d,SocketError:f,InformationalError:p,BodyTimeoutError:m,HTTPParserError:h,ResponseExceededMaxSizeError:g}=gt(),{kUrl:v,kReset:y,kClient:b,kParser:x,kBlocking:S,kRunning:C,kPending:w,kSize:T,kWriting:E,kQueue:D,kNoRef:O,kKeepAliveDefaultTimeout:k,kHostHeader:A,kPendingIdx:j,kRunningIdx:M,kError:N,kPipelining:P,kSocket:F,kKeepAliveTimeoutValue:I,kMaxHeadersSize:L,kKeepAliveMaxTimeout:R,kKeepAliveTimeoutThreshold:z,kHeadersTimeout:ee,kBodyTimeout:B,kStrictContentLength:te,kMaxRequests:V,kCounter:ne,kMaxResponseSize:re,kOnError:H,kResume:ie,kHTTPContext:ae}=ht(),oe=Dt(),se=Buffer.alloc(0),ce=Buffer[Symbol.species],le=i.addListener,ue=i.removeAllListeners,de;async function fe(){let e=process.env.JEST_WORKER_ID?Ot():void 0,t;try{t=await WebAssembly.compile(kt())}catch{t=await WebAssembly.compile(e||Ot())}return await WebAssembly.instantiate(t,{env:{wasm_on_url:(e,t,n)=>0,wasm_on_status:(e,t,n)=>{r(he.ptr===e);let i=t-U+ge.byteOffset;return he.onStatus(new ce(ge.buffer,i,n))||0},wasm_on_message_begin:e=>(r(he.ptr===e),he.onMessageBegin()||0),wasm_on_header_field:(e,t,n)=>{r(he.ptr===e);let i=t-U+ge.byteOffset;return he.onHeaderField(new ce(ge.buffer,i,n))||0},wasm_on_header_value:(e,t,n)=>{r(he.ptr===e);let i=t-U+ge.byteOffset;return he.onHeaderValue(new ce(ge.buffer,i,n))||0},wasm_on_headers_complete:(e,t,n,i)=>(r(he.ptr===e),he.onHeadersComplete(t,!!n,!!i)||0),wasm_on_body:(e,t,n)=>{r(he.ptr===e);let i=t-U+ge.byteOffset;return he.onBody(new ce(ge.buffer,i,n))||0},wasm_on_message_complete:e=>(r(he.ptr===e),he.onMessageComplete()||0)}})}let pe=null,me=fe();me.catch();let he=null,ge=null,_e=0,U=null;var ve=class{constructor(e,t,{exports:n}){r(Number.isFinite(e[L])&&e[L]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(oe.TYPE.RESPONSE),this.client=e,this.socket=t,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText=``,this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[L],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive=``,this.contentLength=``,this.connection=``,this.maxResponseSize=e[re]}setTimeout(e,t){e!==this.timeoutValue||t&1^this.timeoutType&1?(this.timeout&&=(o.clearTimeout(this.timeout),null),e&&(t&1?this.timeout=o.setFastTimeout(ye,e,new WeakRef(this)):(this.timeout=setTimeout(ye,e,new WeakRef(this)),this.timeout.unref())),this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.timeoutType=t}resume(){this.socket.destroyed||!this.paused||(r(this.ptr!=null),r(he==null),this.llhttp.llhttp_resume(this.ptr),r(this.timeoutType===5),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||se),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){r(this.ptr!=null),r(he==null),r(!this.paused);let{socket:t,llhttp:n}=this;e.length>_e&&(U&&n.free(U),_e=Math.ceil(e.length/4096)*4096,U=n.malloc(_e)),new Uint8Array(n.memory.buffer,U,_e).set(e);try{let r;try{ge=e,he=this,r=n.llhttp_execute(this.ptr,U,e.length)}catch(e){throw e}finally{he=null,ge=null}let i=n.llhttp_get_error_pos(this.ptr)-U;if(r===oe.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(i));else if(r===oe.ERROR.PAUSED)this.paused=!0,t.unshift(e.slice(i));else if(r!==oe.ERROR.OK){let t=n.llhttp_get_error_reason(this.ptr),a=``;if(t){let e=new Uint8Array(n.memory.buffer,t).indexOf(0);a=`Response does not match the HTTP/1.1 protocol (`+Buffer.from(n.memory.buffer,t,e).toString()+`)`}throw new h(a,oe.ERROR[r],e.slice(i))}}catch(e){i.destroy(t,e)}}destroy(){r(this.ptr!=null),r(he==null),this.llhttp.llhttp_free(this.ptr),this.ptr=null,this.timeout&&o.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(e){this.statusText=e.toString()}onMessageBegin(){let{socket:e,client:t}=this;if(e.destroyed)return-1;let n=t[D][t[M]];if(!n)return-1;n.onResponseStarted()}onHeaderField(e){let t=this.headers.length;t&1?this.headers[t-1]=Buffer.concat([this.headers[t-1],e]):this.headers.push(e),this.trackHeader(e.length)}onHeaderValue(e){let t=this.headers.length;(t&1)==1?(this.headers.push(e),t+=1):this.headers[t-1]=Buffer.concat([this.headers[t-1],e]);let n=this.headers[t-2];if(n.length===10){let t=i.bufferToLowerCasedHeaderName(n);t===`keep-alive`?this.keepAlive+=e.toString():t===`connection`&&(this.connection+=e.toString())}else n.length===14&&i.bufferToLowerCasedHeaderName(n)===`content-length`&&(this.contentLength+=e.toString());this.trackHeader(e.length)}trackHeader(e){this.headersSize+=e,this.headersSize>=this.headersMaxSize&&i.destroy(this.socket,new d)}onUpgrade(e){let{upgrade:t,client:n,socket:a,headers:o,statusCode:s}=this;r(t),r(n[F]===a),r(!a.destroyed),r(!this.paused),r((o.length&1)==0);let c=n[D][n[M]];r(c),r(c.upgrade||c.method===`CONNECT`),this.statusCode=null,this.statusText=``,this.shouldKeepAlive=null,this.headers=[],this.headersSize=0,a.unshift(e),a[x].destroy(),a[x]=null,a[b]=null,a[N]=null,ue(a),n[F]=null,n[ae]=null,n[D][n[M]++]=null,n.emit(`disconnect`,n[v],[n],new p(`upgrade`));try{c.onUpgrade(s,o,a)}catch(e){i.destroy(a,e)}n[ie]()}onHeadersComplete(e,t,n){let{client:a,socket:o,headers:s,statusText:c}=this;if(o.destroyed)return-1;let l=a[D][a[M]];if(!l)return-1;if(r(!this.upgrade),r(this.statusCode<200),e===100)return i.destroy(o,new f(`bad response`,i.getSocketInfo(o))),-1;if(t&&!l.upgrade)return i.destroy(o,new f(`bad upgrade`,i.getSocketInfo(o))),-1;if(r(this.timeoutType===3),this.statusCode=e,this.shouldKeepAlive=n||l.method===`HEAD`&&!o[y]&&this.connection.toLowerCase()===`keep-alive`,this.statusCode>=200){let e=l.bodyTimeout==null?a[B]:l.bodyTimeout;this.setTimeout(e,5)}else this.timeout&&this.timeout.refresh&&this.timeout.refresh();if(l.method===`CONNECT`||t)return r(a[C]===1),this.upgrade=!0,2;if(r((this.headers.length&1)==0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&a[P]){let e=this.keepAlive?i.parseKeepAliveTimeout(this.keepAlive):null;if(e!=null){let t=Math.min(e-a[z],a[R]);t<=0?o[y]=!0:a[I]=t}else a[I]=a[k]}else o[y]=!0;let u=l.onHeaders(e,s,this.resume,c)===!1;return l.aborted?-1:l.method===`HEAD`||e<200?1:(o[S]&&(o[S]=!1,a[ie]()),u?oe.ERROR.PAUSED:0)}onBody(e){let{client:t,socket:n,statusCode:a,maxResponseSize:o}=this;if(n.destroyed)return-1;let s=t[D][t[M]];if(r(s),r(this.timeoutType===5),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),r(a>=200),o>-1&&this.bytesRead+e.length>o)return i.destroy(n,new g),-1;if(this.bytesRead+=e.length,s.onData(e)===!1)return oe.ERROR.PAUSED}onMessageComplete(){let{client:e,socket:t,statusCode:n,upgrade:a,headers:o,contentLength:s,bytesRead:l,shouldKeepAlive:u}=this;if(t.destroyed&&(!n||u))return-1;if(a)return;r(n>=100),r((this.headers.length&1)==0);let d=e[D][e[M]];if(r(d),this.statusCode=null,this.statusText=``,this.bytesRead=0,this.contentLength=``,this.keepAlive=``,this.connection=``,this.headers=[],this.headersSize=0,!(n<200)){if(d.method!==`HEAD`&&s&&l!==parseInt(s,10))return i.destroy(t,new c),-1;if(d.onComplete(o),e[D][e[M]++]=null,t[E])return r(e[C]===0),i.destroy(t,new p(`reset`)),oe.ERROR.PAUSED;if(!u||t[y]&&e[C]===0)return i.destroy(t,new p(`reset`)),oe.ERROR.PAUSED;e[P]==null||e[P]===1?setImmediate(()=>e[ie]()):e[ie]()}}};function ye(e){let{socket:t,timeoutType:n,client:a,paused:o}=e.deref();n===3?(!t[E]||t.writableNeedDrain||a[C]>1)&&(r(!o,`cannot be paused while waiting for headers`),i.destroy(t,new u)):n===5?o||i.destroy(t,new m):n===8&&(r(a[C]===0&&a[I]),i.destroy(t,new p(`socket idle timeout`)))}async function be(e,t){e[F]=t,pe||(pe=await me,me=null),t[O]=!1,t[E]=!1,t[y]=!1,t[S]=!1,t[x]=new ve(e,t,pe),le(t,`error`,function(e){r(e.code!==`ERR_TLS_CERT_ALTNAME_INVALID`);let t=this[x];if(e.code===`ECONNRESET`&&t.statusCode&&!t.shouldKeepAlive){t.onMessageComplete();return}this[N]=e,this[b][H](e)}),le(t,`readable`,function(){let e=this[x];e&&e.readMore()}),le(t,`end`,function(){let e=this[x];if(e.statusCode&&!e.shouldKeepAlive){e.onMessageComplete();return}i.destroy(this,new f(`other side closed`,i.getSocketInfo(this)))}),le(t,`close`,function(){let e=this[b],t=this[x];t&&(!this[N]&&t.statusCode&&!t.shouldKeepAlive&&t.onMessageComplete(),this[x].destroy(),this[x]=null);let n=this[N]||new f(`closed`,i.getSocketInfo(this));if(e[F]=null,e[ae]=null,e.destroyed){r(e[w]===0);let t=e[D].splice(e[M]);for(let r=0;r0&&n.code!==`UND_ERR_INFO`){let t=e[D][e[M]];e[D][e[M]++]=null,i.errorRequest(e,t,n)}e[j]=e[M],r(e[C]===0),e.emit(`disconnect`,e[v],[e],n),e[ie]()});let n=!1;return t.on(`close`,()=>{n=!0}),{version:`h1`,defaultPipelining:1,write(...t){return Ce(e,...t)},resume(){xe(e)},destroy(e,r){n?queueMicrotask(r):t.destroy(e).on(`close`,r)},get destroyed(){return t.destroyed},busy(n){return!!(t[E]||t[y]||t[S]||n&&(e[C]>0&&!n.idempotent||e[C]>0&&(n.upgrade||n.method===`CONNECT`)||e[C]>0&&i.bodyLength(n.body)!==0&&(i.isStream(n.body)||i.isAsyncIterable(n.body)||i.isFormDataLike(n.body))))}}}function xe(e){let t=e[F];if(t&&!t.destroyed){if(e[T]===0?!t[O]&&t.unref&&(t.unref(),t[O]=!0):t[O]&&t.ref&&(t.ref(),t[O]=!1),e[T]===0)t[x].timeoutType!==8&&t[x].setTimeout(e[I],8);else if(e[C]>0&&t[x].statusCode<200&&t[x].timeoutType!==3){let n=e[D][e[M]],r=n.headersTimeout==null?e[ee]:n.headersTimeout;t[x].setTimeout(r,3)}}}function Se(e){return e!==`GET`&&e!==`HEAD`&&e!==`OPTIONS`&&e!==`TRACE`&&e!==`CONNECT`}function Ce(e,t){let{method:n,path:o,host:c,upgrade:u,blocking:d,reset:f}=t,{body:m,headers:h,contentLength:g}=t,v=n===`PUT`||n===`POST`||n===`PATCH`||n===`QUERY`||n===`PROPFIND`||n===`PROPPATCH`;if(i.isFormDataLike(m)){de||=zt().extractBody;let[e,n]=de(m);t.contentType??h.push(`content-type`,n),m=e.stream,g=e.length}else i.isBlobLike(m)&&t.contentType==null&&m.type&&h.push(`content-type`,m.type);m&&typeof m.read==`function`&&m.read(0);let b=i.bodyLength(m);if(g=b??g,g===null&&(g=t.contentLength),g===0&&!v&&(g=null),Se(n)&&g>0&&t.contentLength!==null&&t.contentLength!==g){if(e[te])return i.errorRequest(e,t,new s),!1;process.emitWarning(new s)}let x=e[F],C=n=>{t.aborted||t.completed||(i.errorRequest(e,t,n||new l),i.destroy(m),i.destroy(x,new p(`aborted`)))};try{t.onConnect(C)}catch(n){i.errorRequest(e,t,n)}if(t.aborted)return!1;n===`HEAD`&&(x[y]=!0),(u||n===`CONNECT`)&&(x[y]=!0),f!=null&&(x[y]=f),e[V]&&x[ne]++>=e[V]&&(x[y]=!0),d&&(x[S]=!0);let w=`${n} ${o} HTTP/1.1\r\n`;if(typeof c==`string`?w+=`host: ${c}\r\n`:w+=e[A],u?w+=`connection: upgrade\r\nupgrade: ${u}\r\n`:e[P]&&!x[y]?w+=`connection: keep-alive\r `:w+=`connection: close\r `,Array.isArray(h))for(let e=0;e{t.removeListener(`error`,g)}),!d){let e=new l;queueMicrotask(()=>g(e))}},g=function(e){if(!d){if(d=!0,r(o.destroyed||o[E]&&n[C]<=1),o.off(`drain`,m).off(`error`,g),t.removeListener(`data`,p).removeListener(`end`,g).removeListener(`close`,h),!e)try{f.end()}catch(t){e=t}f.destroy(e),e&&(e.code!==`UND_ERR_INFO`||e.message!==`reset`)?i.destroy(t,e):i.destroy(t)}};t.on(`data`,p).on(`end`,g).on(`error`,g).on(`close`,h),t.resume&&t.resume(),o.on(`drain`,m).on(`error`,g),t.errorEmitted??t.errored?setImmediate(()=>g(t.errored)):(t.endEmitted??t.readableEnded)&&setImmediate(()=>g(null)),(t.closeEmitted??t.closed)&&setImmediate(h)}function Te(e,t,n,a,o,s,c,l){try{t?i.isBuffer(t)&&(r(s===t.byteLength,`buffer body must have content length`),o.cork(),o.write(`${c}content-length: ${s}\r\n\r\n`,`latin1`),o.write(t),o.uncork(),a.onBodySent(t),!l&&a.reset!==!1&&(o[y]=!0)):s===0?o.write(`${c}content-length: 0\r\n\r\n`,`latin1`):(r(s===null,`no body must not have content length`),o.write(`${c}\r\n`,`latin1`)),a.onRequestSent(),n[ie]()}catch(t){e(t)}}async function Ee(e,t,n,i,a,o,c,l){r(o===t.size,`blob body must have content length`);try{if(o!=null&&o!==t.size)throw new s;let e=Buffer.from(await t.arrayBuffer());a.cork(),a.write(`${c}content-length: ${o}\r\n\r\n`,`latin1`),a.write(e),a.uncork(),i.onBodySent(e),i.onRequestSent(),!l&&i.reset!==!1&&(a[y]=!0),n[ie]()}catch(t){e(t)}}async function De(e,t,n,i,a,o,s,c){r(o!==0||n[C]===0,`iterator body cannot be pipelined`);let l=null;function u(){if(l){let e=l;l=null,e()}}let d=()=>new Promise((e,t)=>{r(l===null),a[N]?t(a[N]):l=e});a.on(`close`,u).on(`drain`,u);let f=new Oe({abort:e,socket:a,request:i,contentLength:o,client:n,expectsPayload:c,header:s});try{for await(let e of t){if(a[N])throw a[N];f.write(e)||await d()}f.end()}catch(e){f.destroy(e)}finally{a.off(`close`,u).off(`drain`,u)}}var Oe=class{constructor({abort:e,socket:t,request:n,contentLength:r,client:i,expectsPayload:a,header:o}){this.socket=t,this.request=n,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=a,this.header=o,this.abort=e,t[E]=!0}write(e){let{socket:t,request:n,contentLength:r,client:i,bytesWritten:a,expectsPayload:o,header:c}=this;if(t[N])throw t[N];if(t.destroyed)return!1;let l=Buffer.byteLength(e);if(!l)return!0;if(r!==null&&a+l>r){if(i[te])throw new s;process.emitWarning(new s)}t.cork(),a===0&&(!o&&n.reset!==!1&&(t[y]=!0),r===null?t.write(`${c}transfer-encoding: chunked\r\n`,`latin1`):t.write(`${c}content-length: ${r}\r\n\r\n`,`latin1`)),r===null&&t.write(`\r\n${l.toString(16)}\r\n`,`latin1`),this.bytesWritten+=l;let u=t.write(e);return t.uncork(),n.onBodySent(e),u||t[x].timeout&&t[x].timeoutType===3&&t[x].timeout.refresh&&t[x].timeout.refresh(),u}end(){let{socket:e,contentLength:t,client:n,bytesWritten:r,expectsPayload:i,header:a,request:o}=this;if(o.onRequestSent(),e[E]=!1,e[N])throw e[N];if(!e.destroyed){if(r===0?i?e.write(`${a}content-length: 0\r\n\r\n`,`latin1`):e.write(`${a}\r\n`,`latin1`):t===null&&e.write(`\r 0\r \r -`,`latin1`),t!==null&&r!==t){if(n[te])throw new s;process.emitWarning(new s)}e[x].timeout&&e[x].timeoutType===3&&e[x].timeout.refresh&&e[x].timeout.refresh(),n[ie]()}}destroy(e){let{socket:t,client:n,abort:i}=this;t[E]=!1,e&&(r(n[C]<=1,`pipeline should only contain this request`),i(e))}};n.exports=be})),zt=i(((e,n)=>{let r=t(`node:assert`),{pipeline:i}=t(`node:stream`),a=_t(),{RequestContentLengthMismatchError:o,RequestAbortedError:s,SocketError:c,InformationalError:l}=mt(),{kUrl:u,kReset:d,kClient:f,kRunning:p,kPending:m,kQueue:h,kPendingIdx:g,kRunningIdx:v,kError:y,kSocket:b,kStrictContentLength:x,kOnError:S,kMaxConcurrentStreams:C,kHTTP2Session:w,kResume:T,kSize:E,kHTTPContext:D}=pt(),O=Symbol(`open streams`),k,A=!1,j;try{j=t(`node:http2`)}catch{j={constants:{}}}let{constants:{HTTP2_HEADER_AUTHORITY:M,HTTP2_HEADER_METHOD:N,HTTP2_HEADER_PATH:P,HTTP2_HEADER_SCHEME:F,HTTP2_HEADER_CONTENT_LENGTH:I,HTTP2_HEADER_EXPECT:L,HTTP2_HEADER_STATUS:R}}=j;function z(e){let t=[];for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.push(Buffer.from(n),Buffer.from(e));else t.push(Buffer.from(n),Buffer.from(r));return t}async function ee(e,t){e[b]=t,A||(A=!0,process.emitWarning(`H2 support is experimental, expect them to change at any time.`,{code:`UNDICI-H2`}));let n=j.connect(e[u],{createConnection:()=>t,peerMaxConcurrentStreams:e[C]});n[O]=0,n[f]=e,n[b]=t,a.addListener(n,`error`,te),a.addListener(n,`frameError`,V),a.addListener(n,`end`,ne),a.addListener(n,`goaway`,re),a.addListener(n,`close`,function(){let{[f]:e}=this,{[b]:t}=e,n=this[b][y]||this[y]||new c(`closed`,a.getSocketInfo(t));if(e[w]=null,e.destroyed){r(e[m]===0);let t=e[h].splice(e[v]);for(let r=0;r{i=!0}),{version:`h2`,defaultPipelining:1/0,write(...t){return ie(e,...t)},resume(){B(e)},destroy(e,n){i?queueMicrotask(n):t.destroy(e).on(`close`,n)},get destroyed(){return t.destroyed},busy(){return!1}}}function B(e){let t=e[b];t?.destroyed===!1&&(e[E]===0&&e[C]===0?(t.unref(),e[w].unref()):(t.ref(),e[w].ref()))}function te(e){r(e.code!==`ERR_TLS_CERT_ALTNAME_INVALID`),this[b][y]=e,this[f][S](e)}function V(e,t,n){if(n===0){let n=new l(`HTTP/2: "frameError" received - type ${e}, code ${t}`);this[b][y]=n,this[f][S](n)}}function ne(){let e=new c(`other side closed`,a.getSocketInfo(this[b]));this.destroy(e),a.destroy(this[b],e)}function re(e){let t=this[y]||new c(`HTTP/2: "GOAWAY" frame received with code ${e}`,a.getSocketInfo(this)),n=this[f];if(n[b]=null,n[D]=null,this[w]!=null&&(this[w].destroy(t),this[w]=null),a.destroy(this[b],t),n[v]{t.aborted||t.completed||(n||=new s,a.errorRequest(e,t,n),E!=null&&a.destroy(E,n),a.destroy(S,n),e[h][e[v]++]=null,e[T]())};try{t.onConnect(j)}catch(n){a.errorRequest(e,t,n)}if(t.aborted)return!1;if(i===`CONNECT`)return n.ref(),E=n.request(C,{endStream:!1,signal:m}),E.id&&!E.pending?(t.onUpgrade(null,null,E),++n[O],e[h][e[v]++]=null):E.once(`ready`,()=>{t.onUpgrade(null,null,E),++n[O],e[h][e[v]++]=null}),E.once(`close`,()=>{--n[O],n[O]===0&&n.unref()}),!0;C[P]=c,C[F]=`https`;let ee=i===`PUT`||i===`POST`||i===`PATCH`;S&&typeof S.read==`function`&&S.read(0);let B=a.bodyLength(S);if(a.isFormDataLike(S)){k??=Lt().extractBody;let[e,t]=k(S);C[`content-type`]=t,S=e.stream,B=e.length}if(B??=t.contentLength,(B===0||!ee)&&(B=null),H(i)&&B>0&&t.contentLength!=null&&t.contentLength!==B){if(e[x])return a.errorRequest(e,t,new o),!1;process.emitWarning(new o)}B!=null&&(r(S,`no body must not have content length`),C[I]=`${B}`),n.ref();let te=i===`GET`||i===`HEAD`||S===null;return p?(C[L]=`100-continue`,E=n.request(C,{endStream:te,signal:m}),E.once(`continue`,V)):(E=n.request(C,{endStream:te,signal:m}),V()),++n[O],E.once(`response`,n=>{let{[R]:r,...i}=n;if(t.onResponseStarted(),t.aborted){let n=new s;a.errorRequest(e,t,n),a.destroy(E,n);return}t.onHeaders(Number(r),z(i),E.resume.bind(E),``)===!1&&E.pause(),E.on(`data`,e=>{t.onData(e)===!1&&E.pause()})}),E.once(`end`,()=>{(E.state?.state==null||E.state.state<6)&&t.onComplete([]),n[O]===0&&n.unref(),j(new l(`HTTP/2: stream half-closed (remote)`)),e[h][e[v]++]=null,e[g]=e[v],e[T]()}),E.once(`close`,()=>{--n[O],n[O]===0&&n.unref()}),E.once(`error`,function(e){j(e)}),E.once(`frameError`,(e,t)=>{j(new l(`HTTP/2: "frameError" received - type ${e}, code ${t}`))}),!0;function V(){!S||B===0?ae(j,E,null,e,t,e[b],B,ee):a.isBuffer(S)?ae(j,E,S,e,t,e[b],B,ee):a.isBlobLike(S)?typeof S.stream==`function`?ce(j,E,S.stream(),e,t,e[b],B,ee):se(j,E,S,e,t,e[b],B,ee):a.isStream(S)?oe(j,e[b],ee,E,S,e,t,B):a.isIterable(S)?ce(j,E,S,e,t,e[b],B,ee):r(!1)}}function ae(e,t,n,i,o,s,c,l){try{n!=null&&a.isBuffer(n)&&(r(c===n.byteLength,`buffer body must have content length`),t.cork(),t.write(n),t.uncork(),t.end(),o.onBodySent(n)),l||(s[d]=!0),o.onRequestSent(),i[T]()}catch(t){e(t)}}function oe(e,t,n,o,s,c,l,u){r(u!==0||c[p]===0,`stream body cannot be pipelined`);let f=i(s,o,r=>{r?(a.destroy(f,r),e(r)):(a.removeAllListeners(f),l.onRequestSent(),n||(t[d]=!0),c[T]())});a.addListener(f,`data`,m);function m(e){l.onBodySent(e)}}async function se(e,t,n,i,a,s,c,l){r(c===n.size,`blob body must have content length`);try{if(c!=null&&c!==n.size)throw new o;let e=Buffer.from(await n.arrayBuffer());t.cork(),t.write(e),t.uncork(),t.end(),a.onBodySent(e),a.onRequestSent(),l||(s[d]=!0),i[T]()}catch(t){e(t)}}async function ce(e,t,n,i,a,o,s,c){r(s!==0||i[p]===0,`iterator body cannot be pipelined`);let l=null;function u(){if(l){let e=l;l=null,e()}}let f=()=>new Promise((e,t)=>{r(l===null),o[y]?t(o[y]):l=e});t.on(`close`,u).on(`drain`,u);try{for await(let e of n){if(o[y])throw o[y];let n=t.write(e);a.onBodySent(e),n||await f()}t.end(),a.onRequestSent(),c||(o[d]=!0),i[T]()}catch(t){e(t)}finally{t.off(`close`,u).off(`drain`,u)}}n.exports=ee})),Bt=i(((e,n)=>{let r=_t(),{kBodyUsed:i}=pt(),a=t(`node:assert`),{InvalidArgumentError:o}=mt(),s=t(`node:events`),c=[300,301,302,303,307,308],l=Symbol(`body`);var u=class{constructor(e){this[l]=e,this[i]=!1}async*[Symbol.asyncIterator](){a(!this[i],`disturbed`),this[i]=!0,yield*this[l]}},d=class{constructor(e,t,n,c){if(t!=null&&(!Number.isInteger(t)||t<0))throw new o(`maxRedirections must be a positive number`);r.validateHandler(c,n.method,n.upgrade),this.dispatch=e,this.location=null,this.abort=null,this.opts={...n,maxRedirections:0},this.maxRedirections=t,this.handler=c,this.history=[],this.redirectionLimitReached=!1,r.isStream(this.opts.body)?(r.bodyLength(this.opts.body)===0&&this.opts.body.on(`data`,function(){a(!1)}),typeof this.opts.body.readableDidRead!=`boolean`&&(this.opts.body[i]=!1,s.prototype.on.call(this.opts.body,`data`,function(){this[i]=!0}))):(this.opts.body&&typeof this.opts.body.pipeTo==`function`||this.opts.body&&typeof this.opts.body!=`string`&&!ArrayBuffer.isView(this.opts.body)&&r.isIterable(this.opts.body))&&(this.opts.body=new u(this.opts.body))}onConnect(e){this.abort=e,this.handler.onConnect(e,{history:this.history})}onUpgrade(e,t,n){this.handler.onUpgrade(e,t,n)}onError(e){this.handler.onError(e)}onHeaders(e,t,n,i){if(this.location=this.history.length>=this.maxRedirections||r.isDisturbed(this.opts.body)?null:f(e,t),this.opts.throwOnMaxRedirect&&this.history.length>=this.maxRedirections){this.request&&this.request.abort(Error(`max redirects`)),this.redirectionLimitReached=!0,this.abort(Error(`max redirects`));return}if(this.opts.origin&&this.history.push(new URL(this.opts.path,this.opts.origin)),!this.location)return this.handler.onHeaders(e,t,n,i);let{origin:a,pathname:o,search:s}=r.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),c=s?`${o}${s}`:o;this.opts.headers=m(this.opts.headers,e===303,this.opts.origin!==a),this.opts.path=c,this.opts.origin=a,this.opts.maxRedirections=0,this.opts.query=null,e===303&&this.opts.method!==`HEAD`&&(this.opts.method=`GET`,this.opts.body=null)}onData(e){if(!this.location)return this.handler.onData(e)}onComplete(e){this.location?(this.location=null,this.abort=null,this.dispatch(this.opts,this)):this.handler.onComplete(e)}onBodySent(e){this.handler.onBodySent&&this.handler.onBodySent(e)}};function f(e,t){if(c.indexOf(e)===-1)return null;for(let e=0;e{let n=Bt();function r({maxRedirections:e}){return t=>function(r,i){let{maxRedirections:a=e}=r;if(!a)return t(r,i);let o=new n(t,a,r,i);return r={...r,maxRedirections:0},t(r,o)}}t.exports=r})),Ht=i(((e,n)=>{let r=t(`node:assert`),i=t(`node:net`),a=t(`node:http`),o=_t(),{channels:s}=vt(),c=yt(),l=xt(),{InvalidArgumentError:u,InformationalError:d,ClientDestroyedError:f}=mt(),p=Ct(),{kUrl:m,kServerName:h,kClient:g,kBusy:v,kConnect:y,kResuming:b,kRunning:x,kPending:S,kSize:C,kQueue:w,kConnected:T,kConnecting:E,kNeedDrain:D,kKeepAliveDefaultTimeout:O,kHostHeader:k,kPendingIdx:A,kRunningIdx:j,kError:M,kPipelining:N,kKeepAliveTimeoutValue:P,kMaxHeadersSize:F,kKeepAliveMaxTimeout:I,kKeepAliveTimeoutThreshold:L,kHeadersTimeout:R,kBodyTimeout:z,kStrictContentLength:ee,kConnector:B,kMaxRedirections:te,kMaxRequests:V,kCounter:ne,kClose:re,kDestroy:H,kDispatch:ie,kInterceptors:ae,kLocalAddress:oe,kMaxResponseSize:se,kOnError:ce,kHTTPContext:le,kMaxConcurrentStreams:ue,kResume:de}=pt(),fe=Rt(),pe=zt(),me=!1,he=Symbol(`kClosedResolve`),ge=()=>{};function _e(e){return e[N]??e[le]?.defaultPipelining??1}var U=class extends l{constructor(e,{interceptors:t,maxHeaderSize:n,headersTimeout:r,socketTimeout:s,requestTimeout:c,connectTimeout:l,bodyTimeout:d,idleTimeout:f,keepAlive:g,keepAliveTimeout:v,maxKeepAliveTimeout:y,keepAliveMaxTimeout:x,keepAliveTimeoutThreshold:S,socketPath:C,pipelining:T,tls:E,strictContentLength:M,maxCachedSessions:ne,maxRedirections:re,connect:H,maxRequestsPerClient:ie,localAddress:fe,maxResponseSize:pe,autoSelectFamily:ge,autoSelectFamilyAttemptTimeout:_e,maxConcurrentStreams:U,allowH2:be}={}){if(super(),g!==void 0)throw new u(`unsupported keepAlive, use pipelining=0 instead`);if(s!==void 0)throw new u(`unsupported socketTimeout, use headersTimeout & bodyTimeout instead`);if(c!==void 0)throw new u(`unsupported requestTimeout, use headersTimeout & bodyTimeout instead`);if(f!==void 0)throw new u(`unsupported idleTimeout, use keepAliveTimeout instead`);if(y!==void 0)throw new u(`unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead`);if(n!=null&&!Number.isFinite(n))throw new u(`invalid maxHeaderSize`);if(C!=null&&typeof C!=`string`)throw new u(`invalid socketPath`);if(l!=null&&(!Number.isFinite(l)||l<0))throw new u(`invalid connectTimeout`);if(v!=null&&(!Number.isFinite(v)||v<=0))throw new u(`invalid keepAliveTimeout`);if(x!=null&&(!Number.isFinite(x)||x<=0))throw new u(`invalid keepAliveMaxTimeout`);if(S!=null&&!Number.isFinite(S))throw new u(`invalid keepAliveTimeoutThreshold`);if(r!=null&&(!Number.isInteger(r)||r<0))throw new u(`headersTimeout must be a positive integer or zero`);if(d!=null&&(!Number.isInteger(d)||d<0))throw new u(`bodyTimeout must be a positive integer or zero`);if(H!=null&&typeof H!=`function`&&typeof H!=`object`)throw new u(`connect must be a function or an object`);if(re!=null&&(!Number.isInteger(re)||re<0))throw new u(`maxRedirections must be a positive number`);if(ie!=null&&(!Number.isInteger(ie)||ie<0))throw new u(`maxRequestsPerClient must be a positive number`);if(fe!=null&&(typeof fe!=`string`||i.isIP(fe)===0))throw new u(`localAddress must be valid string IP address`);if(pe!=null&&(!Number.isInteger(pe)||pe<-1))throw new u(`maxResponseSize must be a positive number`);if(_e!=null&&(!Number.isInteger(_e)||_e<-1))throw new u(`autoSelectFamilyAttemptTimeout must be a positive number`);if(be!=null&&typeof be!=`boolean`)throw new u(`allowH2 must be a valid boolean value`);if(U!=null&&(typeof U!=`number`||U<1))throw new u(`maxConcurrentStreams must be a positive integer, greater than 0`);typeof H!=`function`&&(H=p({...E,maxCachedSessions:ne,allowH2:be,socketPath:C,timeout:l,...ge?{autoSelectFamily:ge,autoSelectFamilyAttemptTimeout:_e}:void 0,...H})),t?.Client&&Array.isArray(t.Client)?(this[ae]=t.Client,me||(me=!0,process.emitWarning(`Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.`,{code:`UNDICI-CLIENT-INTERCEPTOR-DEPRECATED`}))):this[ae]=[ve({maxRedirections:re})],this[m]=o.parseOrigin(e),this[B]=H,this[N]=T??1,this[F]=n||a.maxHeaderSize,this[O]=v??4e3,this[I]=x??6e5,this[L]=S??2e3,this[P]=this[O],this[h]=null,this[oe]=fe??null,this[b]=0,this[D]=0,this[k]=`host: ${this[m].hostname}${this[m].port?`:${this[m].port}`:``}\r\n`,this[z]=d??3e5,this[R]=r??3e5,this[ee]=M??!0,this[te]=re,this[V]=ie,this[he]=null,this[se]=pe>-1?pe:-1,this[ue]=U??100,this[le]=null,this[w]=[],this[j]=0,this[A]=0,this[de]=e=>Se(this,e),this[ce]=e=>ye(this,e)}get pipelining(){return this[N]}set pipelining(e){this[N]=e,this[de](!0)}get[S](){return this[w].length-this[A]}get[x](){return this[A]-this[j]}get[C](){return this[w].length-this[j]}get[T](){return!!this[le]&&!this[E]&&!this[le].destroyed}get[v](){return!!(this[le]?.busy(null)||this[C]>=(_e(this)||1)||this[S]>0)}[y](e){be(this),this.once(`connect`,e)}[ie](e,t){let n=new c(e.origin||this[m].origin,e,t);return this[w].push(n),this[b]||(o.bodyLength(n.body)==null&&o.isIterable(n.body)?(this[b]=1,queueMicrotask(()=>Se(this))):this[de](!0)),this[b]&&this[D]!==2&&this[v]&&(this[D]=2),this[D]<2}async[re](){return new Promise(e=>{this[C]?this[he]=e:e(null)})}async[H](e){return new Promise(t=>{let n=this[w].splice(this[A]);for(let t=0;t{this[he]&&(this[he](),this[he]=null),t(null)};this[le]?(this[le].destroy(e,r),this[le]=null):queueMicrotask(r),this[de]()})}};let ve=Vt();function ye(e,t){if(e[x]===0&&t.code!==`UND_ERR_INFO`&&t.code!==`UND_ERR_SOCKET`){r(e[A]===e[j]);let n=e[w].splice(e[j]);for(let r=0;r{e[B]({host:t,hostname:n,protocol:a,port:c,servername:e[h],localAddress:e[oe]},(e,t)=>{e?i(e):r(t)})});if(e.destroyed){o.destroy(i.on(`error`,ge),new f);return}r(i);try{e[le]=i.alpnProtocol===`h2`?await pe(e,i):await fe(e,i)}catch(e){throw i.destroy().on(`error`,ge),e}e[E]=!1,i[ne]=0,i[V]=e[V],i[g]=e,i[M]=null,s.connected.hasSubscribers&&s.connected.publish({connectParams:{host:t,hostname:n,protocol:a,port:c,version:e[le]?.version,servername:e[h],localAddress:e[oe]},connector:e[B],socket:i}),e.emit(`connect`,e[m],[e])}catch(i){if(e.destroyed)return;if(e[E]=!1,s.connectError.hasSubscribers&&s.connectError.publish({connectParams:{host:t,hostname:n,protocol:a,port:c,version:e[le]?.version,servername:e[h],localAddress:e[oe]},connector:e[B],error:i}),i.code===`ERR_TLS_CERT_ALTNAME_INVALID`)for(r(e[x]===0);e[S]>0&&e[w][e[A]].servername===e[h];){let t=e[w][e[A]++];o.errorRequest(e,t,i)}else ye(e,i);e.emit(`connectionError`,e[m],[e],i)}e[de]()}function xe(e){e[D]=0,e.emit(`drain`,e[m],[e])}function Se(e,t){e[b]!==2&&(e[b]=2,Ce(e,t),e[b]=0,e[j]>256&&(e[w].splice(0,e[j]),e[A]-=e[j],e[j]=0))}function Ce(e,t){for(;;){if(e.destroyed){r(e[S]===0);return}if(e[he]&&!e[C]){e[he](),e[he]=null;return}if(e[le]&&e[le].resume(),e[v])e[D]=2;else if(e[D]===2){t?(e[D]=1,queueMicrotask(()=>xe(e))):xe(e);continue}if(e[S]===0||e[x]>=(_e(e)||1))return;let n=e[w][e[A]];if(e[m].protocol===`https:`&&e[h]!==n.servername){if(e[x]>0)return;e[h]=n.servername,e[le]?.destroy(new d(`servername changed`),()=>{e[le]=null,Se(e)})}if(e[E])return;if(!e[le]){be(e);return}if(e[le].destroyed||e[le].busy(n))return;!n.aborted&&e[le].write(n)?e[A]++:e[w].splice(e[A],1)}}n.exports=U})),Ut=i(((e,t)=>{let n=2048,r=n-1;var i=class{constructor(){this.bottom=0,this.top=0,this.list=Array(n),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&r)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&r}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&r,e)}};t.exports=class{constructor(){this.head=this.tail=new i}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new i),this.head.push(e)}shift(){let e=this.tail,t=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),t}}})),Wt=i(((e,t)=>{let{kFree:n,kConnected:r,kPending:i,kQueued:a,kRunning:o,kSize:s}=pt(),c=Symbol(`pool`);t.exports=class{constructor(e){this[c]=e}get connected(){return this[c][r]}get free(){return this[c][n]}get pending(){return this[c][i]}get queued(){return this[c][a]}get running(){return this[c][o]}get size(){return this[c][s]}}})),Gt=i(((e,t)=>{let n=xt(),r=Ut(),{kConnected:i,kSize:a,kRunning:o,kPending:s,kQueued:c,kBusy:l,kFree:u,kUrl:d,kClose:f,kDestroy:p,kDispatch:m}=pt(),h=Wt(),g=Symbol(`clients`),v=Symbol(`needDrain`),y=Symbol(`queue`),b=Symbol(`closed resolve`),x=Symbol(`onDrain`),S=Symbol(`onConnect`),C=Symbol(`onDisconnect`),w=Symbol(`onConnectionError`),T=Symbol(`get dispatcher`),E=Symbol(`add client`),D=Symbol(`remove client`),O=Symbol(`stats`);t.exports={PoolBase:class extends n{constructor(){super(),this[y]=new r,this[g]=[],this[c]=0;let e=this;this[x]=function(t,n){let r=e[y],i=!1;for(;!i;){let t=r.shift();if(!t)break;e[c]--,i=!this.dispatch(t.opts,t.handler)}this[v]=i,!this[v]&&e[v]&&(e[v]=!1,e.emit(`drain`,t,[e,...n])),e[b]&&r.isEmpty()&&Promise.all(e[g].map(e=>e.close())).then(e[b])},this[S]=(t,n)=>{e.emit(`connect`,t,[e,...n])},this[C]=(t,n,r)=>{e.emit(`disconnect`,t,[e,...n],r)},this[w]=(t,n,r)=>{e.emit(`connectionError`,t,[e,...n],r)},this[O]=new h(this)}get[l](){return this[v]}get[i](){return this[g].filter(e=>e[i]).length}get[u](){return this[g].filter(e=>e[i]&&!e[v]).length}get[s](){let e=this[c];for(let{[s]:t}of this[g])e+=t;return e}get[o](){let e=0;for(let{[o]:t}of this[g])e+=t;return e}get[a](){let e=this[c];for(let{[a]:t}of this[g])e+=t;return e}get stats(){return this[O]}async[f](){this[y].isEmpty()?await Promise.all(this[g].map(e=>e.close())):await new Promise(e=>{this[b]=e})}async[p](e){for(;;){let t=this[y].shift();if(!t)break;t.handler.onError(e)}await Promise.all(this[g].map(t=>t.destroy(e)))}[m](e,t){let n=this[T]();return n?n.dispatch(e,t)||(n[v]=!0,this[v]=!this[T]()):(this[v]=!0,this[y].push({opts:e,handler:t}),this[c]++),!this[v]}[E](e){return e.on(`drain`,this[x]).on(`connect`,this[S]).on(`disconnect`,this[C]).on(`connectionError`,this[w]),this[g].push(e),this[v]&&queueMicrotask(()=>{this[v]&&this[x](e[d],[this,e])}),this}[D](e){e.close(()=>{let t=this[g].indexOf(e);t!==-1&&this[g].splice(t,1)}),this[v]=this[g].some(e=>!e[v]&&e.closed!==!0&&e.destroyed!==!0)}},kClients:g,kNeedDrain:v,kAddClient:E,kRemoveClient:D,kGetDispatcher:T}})),Kt=i(((e,t)=>{let{PoolBase:n,kClients:r,kNeedDrain:i,kAddClient:a,kGetDispatcher:o}=Gt(),s=Ht(),{InvalidArgumentError:c}=mt(),l=_t(),{kUrl:u,kInterceptors:d}=pt(),f=Ct(),p=Symbol(`options`),m=Symbol(`connections`),h=Symbol(`factory`);function g(e,t){return new s(e,t)}t.exports=class extends n{constructor(e,{connections:t,factory:n=g,connect:i,connectTimeout:a,tls:o,maxCachedSessions:s,socketPath:v,autoSelectFamily:y,autoSelectFamilyAttemptTimeout:b,allowH2:x,...S}={}){if(super(),t!=null&&(!Number.isFinite(t)||t<0))throw new c(`invalid connections`);if(typeof n!=`function`)throw new c(`factory must be a function.`);if(i!=null&&typeof i!=`function`&&typeof i!=`object`)throw new c(`connect must be a function or an object`);typeof i!=`function`&&(i=f({...o,maxCachedSessions:s,allowH2:x,socketPath:v,timeout:a,...y?{autoSelectFamily:y,autoSelectFamilyAttemptTimeout:b}:void 0,...i})),this[d]=S.interceptors?.Pool&&Array.isArray(S.interceptors.Pool)?S.interceptors.Pool:[],this[m]=t||null,this[u]=l.parseOrigin(e),this[p]={...l.deepClone(S),connect:i,allowH2:x},this[p].interceptors=S.interceptors?{...S.interceptors}:void 0,this[h]=n,this.on(`connectionError`,(e,t,n)=>{for(let e of t){let t=this[r].indexOf(e);t!==-1&&this[r].splice(t,1)}})}[o](){for(let e of this[r])if(!e[i])return e;if(!this[m]||this[r].length{let{BalancedPoolMissingUpstreamError:n,InvalidArgumentError:r}=mt(),{PoolBase:i,kClients:a,kNeedDrain:o,kAddClient:s,kRemoveClient:c,kGetDispatcher:l}=Gt(),u=Kt(),{kUrl:d,kInterceptors:f}=pt(),{parseOrigin:p}=_t(),m=Symbol(`factory`),h=Symbol(`options`),g=Symbol(`kGreatestCommonDivisor`),v=Symbol(`kCurrentWeight`),y=Symbol(`kIndex`),b=Symbol(`kWeight`),x=Symbol(`kMaxWeightPerServer`),S=Symbol(`kErrorPenalty`);function C(e,t){if(e===0)return t;for(;t!==0;){let n=t;t=e%t,e=n}return e}function w(e,t){return new u(e,t)}t.exports=class extends i{constructor(e=[],{factory:t=w,...n}={}){if(super(),this[h]=n,this[y]=-1,this[v]=0,this[x]=this[h].maxWeightPerServer||100,this[S]=this[h].errorPenalty||15,Array.isArray(e)||(e=[e]),typeof t!=`function`)throw new r(`factory must be a function.`);this[f]=n.interceptors?.BalancedPool&&Array.isArray(n.interceptors.BalancedPool)?n.interceptors.BalancedPool:[],this[m]=t;for(let t of e)this.addUpstream(t);this._updateBalancedPoolStats()}addUpstream(e){let t=p(e).origin;if(this[a].find(e=>e[d].origin===t&&e.closed!==!0&&e.destroyed!==!0))return this;let n=this[m](t,Object.assign({},this[h]));this[s](n),n.on(`connect`,()=>{n[b]=Math.min(this[x],n[b]+this[S])}),n.on(`connectionError`,()=>{n[b]=Math.max(1,n[b]-this[S]),this._updateBalancedPoolStats()}),n.on(`disconnect`,(...e)=>{let t=e[2];t&&t.code===`UND_ERR_SOCKET`&&(n[b]=Math.max(1,n[b]-this[S]),this._updateBalancedPoolStats())});for(let e of this[a])e[b]=this[x];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let e=0;for(let t=0;te[d].origin===t&&e.closed!==!0&&e.destroyed!==!0);return n&&this[c](n),this}get upstreams(){return this[a].filter(e=>e.closed!==!0&&e.destroyed!==!0).map(e=>e[d].origin)}[l](){if(this[a].length===0)throw new n;if(!this[a].find(e=>!e[o]&&e.closed!==!0&&e.destroyed!==!0)||this[a].map(e=>e[o]).reduce((e,t)=>e&&t,!0))return;let e=0,t=this[a].findIndex(e=>!e[o]);for(;e++this[a][t][b]&&!e[o]&&(t=this[y]),this[y]===0&&(this[v]=this[v]-this[g],this[v]<=0&&(this[v]=this[x])),e[b]>=this[v]&&!e[o])return e}return this[v]=this[a][t][b],this[y]=t,this[a][t]}}})),Jt=i(((e,t)=>{let{InvalidArgumentError:n}=mt(),{kClients:r,kRunning:i,kClose:a,kDestroy:o,kDispatch:s,kInterceptors:c}=pt(),l=xt(),u=Kt(),d=Ht(),f=_t(),p=Vt(),m=Symbol(`onConnect`),h=Symbol(`onDisconnect`),g=Symbol(`onConnectionError`),v=Symbol(`maxRedirections`),y=Symbol(`onDrain`),b=Symbol(`factory`),x=Symbol(`options`);function S(e,t){return t&&t.connections===1?new d(e,t):new u(e,t)}t.exports=class extends l{constructor({factory:e=S,maxRedirections:t=0,connect:i,...a}={}){if(super(),typeof e!=`function`)throw new n(`factory must be a function.`);if(i!=null&&typeof i!=`function`&&typeof i!=`object`)throw new n(`connect must be a function or an object`);if(!Number.isInteger(t)||t<0)throw new n(`maxRedirections must be a positive number`);i&&typeof i!=`function`&&(i={...i}),this[c]=a.interceptors?.Agent&&Array.isArray(a.interceptors.Agent)?a.interceptors.Agent:[p({maxRedirections:t})],this[x]={...f.deepClone(a),connect:i},this[x].interceptors=a.interceptors?{...a.interceptors}:void 0,this[v]=t,this[b]=e,this[r]=new Map,this[y]=(e,t)=>{this.emit(`drain`,e,[this,...t])},this[m]=(e,t)=>{this.emit(`connect`,e,[this,...t])},this[h]=(e,t,n)=>{this.emit(`disconnect`,e,[this,...t],n)},this[g]=(e,t,n)=>{this.emit(`connectionError`,e,[this,...t],n)}}get[i](){let e=0;for(let t of this[r].values())e+=t[i];return e}[s](e,t){let i;if(e.origin&&(typeof e.origin==`string`||e.origin instanceof URL))i=String(e.origin);else throw new n(`opts.origin must be a non-empty string or URL.`);let a=this[r].get(i);return a||(a=this[b](e.origin,this[x]).on(`drain`,this[y]).on(`connect`,this[m]).on(`disconnect`,this[h]).on(`connectionError`,this[g]),this[r].set(i,a)),a.dispatch(e,t)}async[a](){let e=[];for(let t of this[r].values())e.push(t.close());this[r].clear(),await Promise.all(e)}async[o](e){let t=[];for(let n of this[r].values())t.push(n.destroy(e));this[r].clear(),await Promise.all(t)}}})),Yt=i(((e,n)=>{let{kProxy:r,kClose:i,kDestroy:a,kDispatch:o,kInterceptors:s}=pt(),{URL:c}=t(`node:url`),l=Jt(),u=Kt(),d=xt(),{InvalidArgumentError:f,RequestAbortedError:p,SecureProxyConnectionError:m}=mt(),h=Ct(),g=Ht(),v=Symbol(`proxy agent`),y=Symbol(`proxy client`),b=Symbol(`proxy headers`),x=Symbol(`request tls settings`),S=Symbol(`proxy tls settings`),C=Symbol(`connect endpoint function`),w=Symbol(`tunnel proxy`);function T(e){return e===`https:`?443:80}function E(e,t){return new u(e,t)}let D=()=>{};function O(e,t){return t.connections===1?new g(e,t):new u(e,t)}var k=class extends d{#e;constructor(e,{headers:t={},connect:n,factory:r}){if(super(),!e)throw new f(`Proxy URL is mandatory`);this[b]=t,r?this.#e=r(e,{connect:n}):this.#e=new g(e,{connect:n})}[o](e,t){let n=t.onHeaders;t.onHeaders=function(e,r,i){if(e===407){typeof t.onError==`function`&&t.onError(new f(`Proxy Authentication Required (407)`));return}n&&n.call(this,e,r,i)};let{origin:r,path:i=`/`,headers:a={}}=e;if(e.path=r+i,!(`host`in a)&&!(`Host`in a)){let{host:e}=new c(r);a.host=e}return e.headers={...this[b],...a},this.#e[o](e,t)}async[i](){return this.#e.close()}async[a](e){return this.#e.destroy(e)}},A=class extends d{constructor(e){if(super(),!e||typeof e==`object`&&!(e instanceof c)&&!e.uri)throw new f(`Proxy uri is mandatory`);let{clientFactory:t=E}=e;if(typeof t!=`function`)throw new f(`Proxy opts.clientFactory must be a function.`);let{proxyTunnel:n=!0}=e,i=this.#e(e),{href:a,origin:o,port:u,protocol:d,username:g,password:A,hostname:j}=i;if(this[r]={uri:a,protocol:d},this[s]=e.interceptors?.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],this[x]=e.requestTls,this[S]=e.proxyTls,this[b]=e.headers||{},this[w]=n,e.auth&&e.token)throw new f(`opts.auth cannot be used in combination with opts.token`);e.auth?this[b][`proxy-authorization`]=`Basic ${e.auth}`:e.token?this[b][`proxy-authorization`]=e.token:g&&A&&(this[b][`proxy-authorization`]=`Basic ${Buffer.from(`${decodeURIComponent(g)}:${decodeURIComponent(A)}`).toString(`base64`)}`);let M=h({...e.proxyTls});this[C]=h({...e.requestTls});let N=e.factory||O,P=(e,t)=>{let{protocol:n}=new c(e);return!this[w]&&n===`http:`&&this[r].protocol===`http:`?new k(this[r].uri,{headers:this[b],connect:M,factory:N}):N(e,t)};this[y]=t(i,{connect:M}),this[v]=new l({...e,factory:P,connect:async(e,t)=>{let n=e.host;e.port||(n+=`:${T(e.protocol)}`);try{let{socket:r,statusCode:i}=await this[y].connect({origin:o,port:u,path:n,signal:e.signal,headers:{...this[b],host:e.host},servername:this[S]?.servername||j});if(i!==200&&(r.on(`error`,D).destroy(),t(new p(`Proxy response (${i}) !== 200 when HTTP Tunneling`))),e.protocol!==`https:`){t(null,r);return}let a;a=this[x]?this[x].servername:e.servername,this[C]({...e,servername:a,httpSocket:r},t)}catch(e){e.code===`ERR_TLS_CERT_ALTNAME_INVALID`?t(new m(e)):t(e)}}})}dispatch(e,t){let n=j(e.headers);if(M(n),n&&!(`host`in n)&&!(`Host`in n)){let{host:t}=new c(e.origin);n.host=t}return this[v].dispatch({...e,headers:n},t)}#e(e){return typeof e==`string`?new c(e):e instanceof c?e:new c(e.uri)}async[i](){await this[v].close(),await this[y].close()}async[a](){await this[v].destroy(),await this[y].destroy()}};function j(e){if(Array.isArray(e)){let t={};for(let n=0;ne.toLowerCase()===`proxy-authorization`))throw new f(`Proxy-Authorization should be sent in ProxyAgent constructor`)}n.exports=A})),Xt=i(((e,t)=>{let n=xt(),{kClose:r,kDestroy:i,kClosed:a,kDestroyed:o,kDispatch:s,kNoProxyAgent:c,kHttpProxyAgent:l,kHttpsProxyAgent:u}=pt(),d=Yt(),f=Jt(),p={"http:":80,"https:":443},m=!1;t.exports=class extends n{#e=null;#t=null;#n=null;constructor(e={}){super(),this.#n=e,m||(m=!0,process.emitWarning(`EnvHttpProxyAgent is experimental, expect them to change at any time.`,{code:`UNDICI-EHPA`}));let{httpProxy:t,httpsProxy:n,noProxy:r,...i}=e;this[c]=new f(i);let a=t??process.env.http_proxy??process.env.HTTP_PROXY;a?this[l]=new d({...i,uri:a}):this[l]=this[c];let o=n??process.env.https_proxy??process.env.HTTPS_PROXY;o?this[u]=new d({...i,uri:o}):this[u]=this[l],this.#a()}[s](e,t){let n=new URL(e.origin);return this.#r(n).dispatch(e,t)}async[r](){await this[c].close(),this[l][a]||await this[l].close(),this[u][a]||await this[u].close()}async[i](e){await this[c].destroy(e),this[l][o]||await this[l].destroy(e),this[u][o]||await this[u].destroy(e)}#r(e){let{protocol:t,host:n,port:r}=e;return n=n.replace(/:\d*$/,``).toLowerCase(),r=Number.parseInt(r,10)||p[t]||0,this.#i(n,r)?t===`https:`?this[u]:this[l]:this[c]}#i(e,t){if(this.#o&&this.#a(),this.#t.length===0)return!0;if(this.#e===`*`)return!1;for(let n=0;n{let r=t(`node:assert`),{kRetryHandlerDefaultRetry:i}=pt(),{RequestRetryError:a}=mt(),{isDisturbed:o,parseHeaders:s,parseRangeHeader:c,wrapRequestBody:l}=_t();function u(e){let t=Date.now();return new Date(e).getTime()-t}n.exports=class e{constructor(t,n){let{retryOptions:r,...a}=t,{retry:o,maxRetries:s,maxTimeout:c,minTimeout:u,timeoutFactor:d,methods:f,errorCodes:p,retryAfter:m,statusCodes:h}=r??{};this.dispatch=n.dispatch,this.handler=n.handler,this.opts={...a,body:l(t.body)},this.abort=null,this.aborted=!1,this.retryOpts={retry:o??e[i],retryAfter:m??!0,maxTimeout:c??30*1e3,minTimeout:u??500,timeoutFactor:d??2,maxRetries:s??5,methods:f??[`GET`,`HEAD`,`OPTIONS`,`PUT`,`DELETE`,`TRACE`],statusCodes:h??[500,502,503,504,429],errorCodes:p??[`ECONNRESET`,`ECONNREFUSED`,`ENOTFOUND`,`ENETDOWN`,`ENETUNREACH`,`EHOSTDOWN`,`EHOSTUNREACH`,`EPIPE`,`UND_ERR_SOCKET`]},this.retryCount=0,this.retryCountCheckpoint=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(e=>{this.aborted=!0,this.abort?this.abort(e):this.reason=e})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,t,n){this.handler.onUpgrade&&this.handler.onUpgrade(e,t,n)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[i](e,{state:t,opts:n},r){let{statusCode:i,code:a,headers:o}=e,{method:s,retryOptions:c}=n,{maxRetries:l,minTimeout:d,maxTimeout:f,timeoutFactor:p,statusCodes:m,errorCodes:h,methods:g}=c,{counter:v}=t;if(a&&a!==`UND_ERR_REQ_RETRY`&&!h.includes(a)){r(e);return}if(Array.isArray(g)&&!g.includes(s)){r(e);return}if(i!=null&&Array.isArray(m)&&!m.includes(i)){r(e);return}if(v>l){r(e);return}let y=o?.[`retry-after`];y&&=(y=Number(y),Number.isNaN(y)?u(y):y*1e3);let b=Math.min(y>0?y:d*p**(v-1),f);setTimeout(()=>r(null),b)}onHeaders(e,t,n,i){let o=s(t);if(this.retryCount+=1,e>=300)return this.retryOpts.statusCodes.includes(e)===!1?this.handler.onHeaders(e,t,n,i):(this.abort(new a(`Request failed`,e,{headers:o,data:{count:this.retryCount}})),!1);if(this.resume!=null){if(this.resume=null,e!==206&&(this.start>0||e!==200))return this.abort(new a(`server does not support the range header and the payload was partially consumed`,e,{headers:o,data:{count:this.retryCount}})),!1;let t=c(o[`content-range`]);if(!t)return this.abort(new a(`Content-Range mismatch`,e,{headers:o,data:{count:this.retryCount}})),!1;if(this.etag!=null&&this.etag!==o.etag)return this.abort(new a(`ETag mismatch`,e,{headers:o,data:{count:this.retryCount}})),!1;let{start:i,size:s,end:l=s-1}=t;return r(this.start===i,`content-range mismatch`),r(this.end==null||this.end===l,`content-range mismatch`),this.resume=n,!0}if(this.end==null){if(e===206){let a=c(o[`content-range`]);if(a==null)return this.handler.onHeaders(e,t,n,i);let{start:s,size:l,end:u=l-1}=a;r(s!=null&&Number.isFinite(s),`content-range mismatch`),r(u!=null&&Number.isFinite(u),`invalid content-length`),this.start=s,this.end=u}if(this.end==null){let e=o[`content-length`];this.end=e==null?null:Number(e)-1}return r(Number.isFinite(this.start)),r(this.end==null||Number.isFinite(this.end),`invalid content-length`),this.resume=n,this.etag=o.etag==null?null:o.etag,this.etag!=null&&this.etag.startsWith(`W/`)&&(this.etag=null),this.handler.onHeaders(e,t,n,i)}let l=new a(`Request failed`,e,{headers:o,data:{count:this.retryCount}});return this.abort(l),!1}onData(e){return this.start+=e.length,this.handler.onData(e)}onComplete(e){return this.retryCount=0,this.handler.onComplete(e)}onError(e){if(this.aborted||o(this.opts.body))return this.handler.onError(e);this.retryCount-this.retryCountCheckpoint>0?this.retryCount=this.retryCountCheckpoint+(this.retryCount-this.retryCountCheckpoint):this.retryCount+=1,this.retryOpts.retry(e,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},t.bind(this));function t(e){if(e!=null||this.aborted||o(this.opts.body))return this.handler.onError(e);if(this.start!==0){let e={range:`bytes=${this.start}-${this.end??``}`};this.etag!=null&&(e[`if-match`]=this.etag),this.opts={...this.opts,headers:{...this.opts.headers,...e}}}try{this.retryCountCheckpoint=this.retryCount,this.dispatch(this.opts,this)}catch(e){this.handler.onError(e)}}}}})),Qt=i(((e,t)=>{let n=bt(),r=Zt();t.exports=class extends n{#e=null;#t=null;constructor(e,t={}){super(t),this.#e=e,this.#t=t}dispatch(e,t){let n=new r({...e,retryOptions:this.#t},{dispatch:this.#e.dispatch.bind(this.#e),handler:t});return this.#e.dispatch(e,n)}close(){return this.#e.close()}destroy(){return this.#e.destroy()}}})),$t=i(((e,n)=>{let r=t(`node:assert`),{Readable:i}=t(`node:stream`),{RequestAbortedError:a,NotSupportedError:o,InvalidArgumentError:s,AbortError:c}=mt(),l=_t(),{ReadableStreamFrom:u}=_t(),d=Symbol(`kConsume`),f=Symbol(`kReading`),p=Symbol(`kBody`),m=Symbol(`kAbort`),h=Symbol(`kContentType`),g=Symbol(`kContentLength`),v=()=>{};var y=class extends i{constructor({resume:e,abort:t,contentType:n=``,contentLength:r,highWaterMark:i=64*1024}){super({autoDestroy:!0,read:e,highWaterMark:i}),this._readableState.dataEmitted=!1,this[m]=t,this[d]=null,this[p]=null,this[h]=n,this[g]=r,this[f]=!1}destroy(e){return!e&&!this._readableState.endEmitted&&(e=new a),e&&this[m](),super.destroy(e)}_destroy(e,t){this[f]?t(e):setImmediate(()=>{t(e)})}on(e,...t){return(e===`data`||e===`readable`)&&(this[f]=!0),super.on(e,...t)}addListener(e,...t){return this.on(e,...t)}off(e,...t){let n=super.off(e,...t);return(e===`data`||e===`readable`)&&(this[f]=this.listenerCount(`data`)>0||this.listenerCount(`readable`)>0),n}removeListener(e,...t){return this.off(e,...t)}push(e){return this[d]&&e!==null?(D(this[d],e),this[f]?super.push(e):!0):super.push(e)}async text(){return S(this,`text`)}async json(){return S(this,`json`)}async blob(){return S(this,`blob`)}async bytes(){return S(this,`bytes`)}async arrayBuffer(){return S(this,`arrayBuffer`)}async formData(){throw new o}get bodyUsed(){return l.isDisturbed(this)}get body(){return this[p]||(this[p]=u(this),this[d]&&(this[p].getReader(),r(this[p].locked))),this[p]}async dump(e){let t=Number.isFinite(e?.limit)?e.limit:128*1024,n=e?.signal;if(n!=null&&(typeof n!=`object`||!(`aborted`in n)))throw new s(`signal must be an AbortSignal`);return n?.throwIfAborted(),this._readableState.closeEmitted?null:await new Promise((e,r)=>{this[g]>t&&this.destroy(new c);let i=()=>{this.destroy(n.reason??new c)};n?.addEventListener(`abort`,i),this.on(`close`,function(){n?.removeEventListener(`abort`,i),n?.aborted?r(n.reason??new c):e(null)}).on(`error`,v).on(`data`,function(e){t-=e.length,t<=0&&this.destroy()}).resume()})}};function b(e){return e[p]&&e[p].locked===!0||e[d]}function x(e){return l.isDisturbed(e)||b(e)}async function S(e,t){return r(!e[d]),new Promise((n,r)=>{if(x(e)){let t=e._readableState;t.destroyed&&t.closeEmitted===!1?e.on(`error`,e=>{r(e)}).on(`close`,()=>{r(TypeError(`unusable`))}):r(t.errored??TypeError(`unusable`))}else queueMicrotask(()=>{e[d]={type:t,stream:e,resolve:n,reject:r,length:0,body:[]},e.on(`error`,function(e){O(this[d],e)}).on(`close`,function(){this[d].body!==null&&O(this[d],new a)}),C(e[d])})})}function C(e){if(e.body===null)return;let{_readableState:t}=e.stream;if(t.bufferIndex){let n=t.bufferIndex,r=t.buffer.length;for(let i=n;i2&&n[0]===239&&n[1]===187&&n[2]===191?3:0;return n.utf8Slice(i,r)}function T(e,t){if(e.length===0||t===0)return new Uint8Array;if(e.length===1)return new Uint8Array(e[0]);let n=new Uint8Array(Buffer.allocUnsafeSlow(t).buffer),r=0;for(let t=0;t{let r=t(`node:assert`),{ResponseStatusCodeError:i}=mt(),{chunksDecode:a}=$t();async function o({callback:e,body:t,contentType:n,statusCode:o,statusMessage:l,headers:u}){r(t);let d=[],f=0;try{for await(let e of t)if(d.push(e),f+=e.length,f>131072){d=[],f=0;break}}catch{d=[],f=0}let p=`Response status code ${o}${l?`: ${l}`:``}`;if(o===204||!n||!f){queueMicrotask(()=>e(new i(p,o,u)));return}let m=Error.stackTraceLimit;Error.stackTraceLimit=0;let h;try{s(n)?h=JSON.parse(a(d,f)):c(n)&&(h=a(d,f))}catch{}finally{Error.stackTraceLimit=m}queueMicrotask(()=>e(new i(p,o,u,h)))}let s=e=>e.length>15&&e[11]===`/`&&e[0]===`a`&&e[1]===`p`&&e[2]===`p`&&e[3]===`l`&&e[4]===`i`&&e[5]===`c`&&e[6]===`a`&&e[7]===`t`&&e[8]===`i`&&e[9]===`o`&&e[10]===`n`&&e[12]===`j`&&e[13]===`s`&&e[14]===`o`&&e[15]===`n`,c=e=>e.length>4&&e[4]===`/`&&e[0]===`t`&&e[1]===`e`&&e[2]===`x`&&e[3]===`t`;n.exports={getResolveErrorBodyCallback:o,isContentTypeApplicationJson:s,isContentTypeText:c}})),tn=i(((e,n)=>{let r=t(`node:assert`),{Readable:i}=$t(),{InvalidArgumentError:a,RequestAbortedError:o}=mt(),s=_t(),{getResolveErrorBodyCallback:c}=en(),{AsyncResource:l}=t(`node:async_hooks`);var u=class extends l{constructor(e,t){if(!e||typeof e!=`object`)throw new a(`invalid opts`);let{signal:n,method:r,opaque:i,body:c,onInfo:l,responseHeaders:u,throwOnError:d,highWaterMark:f}=e;try{if(typeof t!=`function`)throw new a(`invalid callback`);if(f&&(typeof f!=`number`||f<0))throw new a(`invalid highWaterMark`);if(n&&typeof n.on!=`function`&&typeof n.addEventListener!=`function`)throw new a(`signal must be an EventEmitter or EventTarget`);if(r===`CONNECT`)throw new a(`invalid method`);if(l&&typeof l!=`function`)throw new a(`invalid onInfo callback`);super(`UNDICI_REQUEST`)}catch(e){throw s.isStream(c)&&s.destroy(c.on(`error`,s.nop),e),e}this.method=r,this.responseHeaders=u||null,this.opaque=i||null,this.callback=t,this.res=null,this.abort=null,this.body=c,this.trailers={},this.context=null,this.onInfo=l||null,this.throwOnError=d,this.highWaterMark=f,this.signal=n,this.reason=null,this.removeAbortListener=null,s.isStream(c)&&c.on(`error`,e=>{this.onError(e)}),this.signal&&(this.signal.aborted?this.reason=this.signal.reason??new o:this.removeAbortListener=s.addAbortListener(this.signal,()=>{this.reason=this.signal.reason??new o,this.res?s.destroy(this.res.on(`error`,s.nop),this.reason):this.abort&&this.abort(this.reason),this.removeAbortListener&&=(this.res?.off(`close`,this.removeAbortListener),this.removeAbortListener(),null)}))}onConnect(e,t){if(this.reason){e(this.reason);return}r(this.callback),this.abort=e,this.context=t}onHeaders(e,t,n,r){let{callback:a,opaque:o,abort:l,context:u,responseHeaders:d,highWaterMark:f}=this,p=d===`raw`?s.parseRawHeaders(t):s.parseHeaders(t);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:p});return}let m=d===`raw`?s.parseHeaders(t):p,h=m[`content-type`],g=m[`content-length`],v=new i({resume:n,abort:l,contentType:h,contentLength:this.method!==`HEAD`&&g?Number(g):null,highWaterMark:f});this.removeAbortListener&&v.on(`close`,this.removeAbortListener),this.callback=null,this.res=v,a!==null&&(this.throwOnError&&e>=400?this.runInAsyncScope(c,null,{callback:a,body:v,contentType:h,statusCode:e,statusMessage:r,headers:p}):this.runInAsyncScope(a,null,null,{statusCode:e,headers:p,trailers:this.trailers,opaque:o,body:v,context:u}))}onData(e){return this.res.push(e)}onComplete(e){s.parseHeaders(e,this.trailers),this.res.push(null)}onError(e){let{res:t,callback:n,body:r,opaque:i}=this;n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:i})})),t&&(this.res=null,queueMicrotask(()=>{s.destroy(t,e)})),r&&(this.body=null,s.destroy(r,e)),this.removeAbortListener&&=(t?.off(`close`,this.removeAbortListener),this.removeAbortListener(),null)}};function d(e,t){if(t===void 0)return new Promise((t,n)=>{d.call(this,e,(e,r)=>e?n(e):t(r))});try{this.dispatch(e,new u(e,t))}catch(n){if(typeof t!=`function`)throw n;let r=e?.opaque;queueMicrotask(()=>t(n,{opaque:r}))}}n.exports=d,n.exports.RequestHandler=u})),nn=i(((e,t)=>{let{addAbortListener:n}=_t(),{RequestAbortedError:r}=mt(),i=Symbol(`kListener`),a=Symbol(`kSignal`);function o(e){e.abort?e.abort(e[a]?.reason):e.reason=e[a]?.reason??new r,c(e)}function s(e,t){if(e.reason=null,e[a]=null,e[i]=null,t){if(t.aborted){o(e);return}e[a]=t,e[i]=()=>{o(e)},n(e[a],e[i])}}function c(e){e[a]&&(`removeEventListener`in e[a]?e[a].removeEventListener(`abort`,e[i]):e[a].removeListener(`abort`,e[i]),e[a]=null,e[i]=null)}t.exports={addSignal:s,removeSignal:c}})),rn=i(((e,n)=>{let r=t(`node:assert`),{finished:i,PassThrough:a}=t(`node:stream`),{InvalidArgumentError:o,InvalidReturnValueError:s}=mt(),c=_t(),{getResolveErrorBodyCallback:l}=en(),{AsyncResource:u}=t(`node:async_hooks`),{addSignal:d,removeSignal:f}=nn();var p=class extends u{constructor(e,t,n){if(!e||typeof e!=`object`)throw new o(`invalid opts`);let{signal:r,method:i,opaque:a,body:s,onInfo:l,responseHeaders:u,throwOnError:f}=e;try{if(typeof n!=`function`)throw new o(`invalid callback`);if(typeof t!=`function`)throw new o(`invalid factory`);if(r&&typeof r.on!=`function`&&typeof r.addEventListener!=`function`)throw new o(`signal must be an EventEmitter or EventTarget`);if(i===`CONNECT`)throw new o(`invalid method`);if(l&&typeof l!=`function`)throw new o(`invalid onInfo callback`);super(`UNDICI_STREAM`)}catch(e){throw c.isStream(s)&&c.destroy(s.on(`error`,c.nop),e),e}this.responseHeaders=u||null,this.opaque=a||null,this.factory=t,this.callback=n,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=s,this.onInfo=l||null,this.throwOnError=f||!1,c.isStream(s)&&s.on(`error`,e=>{this.onError(e)}),d(this,r)}onConnect(e,t){if(this.reason){e(this.reason);return}r(this.callback),this.abort=e,this.context=t}onHeaders(e,t,n,r){let{factory:o,opaque:u,context:d,callback:f,responseHeaders:p}=this,m=p===`raw`?c.parseRawHeaders(t):c.parseHeaders(t);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:m});return}this.factory=null;let h;if(this.throwOnError&&e>=400){let n=(p===`raw`?c.parseHeaders(t):m)[`content-type`];h=new a,this.callback=null,this.runInAsyncScope(l,null,{callback:f,body:h,contentType:n,statusCode:e,statusMessage:r,headers:m})}else{if(o===null)return;if(h=this.runInAsyncScope(o,null,{statusCode:e,headers:m,opaque:u,context:d}),!h||typeof h.write!=`function`||typeof h.end!=`function`||typeof h.on!=`function`)throw new s(`expected Writable`);i(h,{readable:!1},e=>{let{callback:t,res:n,opaque:r,trailers:i,abort:a}=this;this.res=null,(e||!n.readable)&&c.destroy(n,e),this.callback=null,this.runInAsyncScope(t,null,e||null,{opaque:r,trailers:i}),e&&a()})}return h.on(`drain`,n),this.res=h,(h.writableNeedDrain===void 0?h._writableState?.needDrain:h.writableNeedDrain)!==!0}onData(e){let{res:t}=this;return t?t.write(e):!0}onComplete(e){let{res:t}=this;f(this),t&&(this.trailers=c.parseHeaders(e),t.end())}onError(e){let{res:t,callback:n,opaque:r,body:i}=this;f(this),this.factory=null,t?(this.res=null,c.destroy(t,e)):n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:r})})),i&&(this.body=null,c.destroy(i,e))}};function m(e,t,n){if(n===void 0)return new Promise((n,r)=>{m.call(this,e,t,(e,t)=>e?r(e):n(t))});try{this.dispatch(e,new p(e,t,n))}catch(t){if(typeof n!=`function`)throw t;let r=e?.opaque;queueMicrotask(()=>n(t,{opaque:r}))}}n.exports=m})),an=i(((e,n)=>{let{Readable:r,Duplex:i,PassThrough:a}=t(`node:stream`),{InvalidArgumentError:o,InvalidReturnValueError:s,RequestAbortedError:c}=mt(),l=_t(),{AsyncResource:u}=t(`node:async_hooks`),{addSignal:d,removeSignal:f}=nn(),p=t(`node:assert`),m=Symbol(`resume`);var h=class extends r{constructor(){super({autoDestroy:!0}),this[m]=null}_read(){let{[m]:e}=this;e&&(this[m]=null,e())}_destroy(e,t){this._read(),t(e)}},g=class extends r{constructor(e){super({autoDestroy:!0}),this[m]=e}_read(){this[m]()}_destroy(e,t){!e&&!this._readableState.endEmitted&&(e=new c),t(e)}},v=class extends u{constructor(e,t){if(!e||typeof e!=`object`)throw new o(`invalid opts`);if(typeof t!=`function`)throw new o(`invalid handler`);let{signal:n,method:r,opaque:a,onInfo:s,responseHeaders:u}=e;if(n&&typeof n.on!=`function`&&typeof n.addEventListener!=`function`)throw new o(`signal must be an EventEmitter or EventTarget`);if(r===`CONNECT`)throw new o(`invalid method`);if(s&&typeof s!=`function`)throw new o(`invalid onInfo callback`);super(`UNDICI_PIPELINE`),this.opaque=a||null,this.responseHeaders=u||null,this.handler=t,this.abort=null,this.context=null,this.onInfo=s||null,this.req=new h().on(`error`,l.nop),this.ret=new i({readableObjectMode:e.objectMode,autoDestroy:!0,read:()=>{let{body:e}=this;e?.resume&&e.resume()},write:(e,t,n)=>{let{req:r}=this;r.push(e,t)||r._readableState.destroyed?n():r[m]=n},destroy:(e,t)=>{let{body:n,req:r,res:i,ret:a,abort:o}=this;!e&&!a._readableState.endEmitted&&(e=new c),o&&e&&o(),l.destroy(n,e),l.destroy(r,e),l.destroy(i,e),f(this),t(e)}}).on(`prefinish`,()=>{let{req:e}=this;e.push(null)}),this.res=null,d(this,n)}onConnect(e,t){let{ret:n,res:r}=this;if(this.reason){e(this.reason);return}p(!r,`pipeline cannot be retried`),p(!n.destroyed),this.abort=e,this.context=t}onHeaders(e,t,n){let{opaque:r,handler:i,context:a}=this;if(e<200){if(this.onInfo){let n=this.responseHeaders===`raw`?l.parseRawHeaders(t):l.parseHeaders(t);this.onInfo({statusCode:e,headers:n})}return}this.res=new g(n);let o;try{this.handler=null;let n=this.responseHeaders===`raw`?l.parseRawHeaders(t):l.parseHeaders(t);o=this.runInAsyncScope(i,null,{statusCode:e,headers:n,opaque:r,body:this.res,context:a})}catch(e){throw this.res.on(`error`,l.nop),e}if(!o||typeof o.on!=`function`)throw new s(`expected Readable`);o.on(`data`,e=>{let{ret:t,body:n}=this;!t.push(e)&&n.pause&&n.pause()}).on(`error`,e=>{let{ret:t}=this;l.destroy(t,e)}).on(`end`,()=>{let{ret:e}=this;e.push(null)}).on(`close`,()=>{let{ret:e}=this;e._readableState.ended||l.destroy(e,new c)}),this.body=o}onData(e){let{res:t}=this;return t.push(e)}onComplete(e){let{res:t}=this;t.push(null)}onError(e){let{ret:t}=this;this.handler=null,l.destroy(t,e)}};function y(e,t){try{let n=new v(e,t);return this.dispatch({...e,body:n.req},n),n.ret}catch(e){return new a().destroy(e)}}n.exports=y})),on=i(((e,n)=>{let{InvalidArgumentError:r,SocketError:i}=mt(),{AsyncResource:a}=t(`node:async_hooks`),o=_t(),{addSignal:s,removeSignal:c}=nn(),l=t(`node:assert`);var u=class extends a{constructor(e,t){if(!e||typeof e!=`object`)throw new r(`invalid opts`);if(typeof t!=`function`)throw new r(`invalid callback`);let{signal:n,opaque:i,responseHeaders:a}=e;if(n&&typeof n.on!=`function`&&typeof n.addEventListener!=`function`)throw new r(`signal must be an EventEmitter or EventTarget`);super(`UNDICI_UPGRADE`),this.responseHeaders=a||null,this.opaque=i||null,this.callback=t,this.abort=null,this.context=null,s(this,n)}onConnect(e,t){if(this.reason){e(this.reason);return}l(this.callback),this.abort=e,this.context=null}onHeaders(){throw new i(`bad upgrade`,null)}onUpgrade(e,t,n){l(e===101);let{callback:r,opaque:i,context:a}=this;c(this),this.callback=null;let s=this.responseHeaders===`raw`?o.parseRawHeaders(t):o.parseHeaders(t);this.runInAsyncScope(r,null,null,{headers:s,socket:n,opaque:i,context:a})}onError(e){let{callback:t,opaque:n}=this;c(this),t&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(t,null,e,{opaque:n})}))}};function d(e,t){if(t===void 0)return new Promise((t,n)=>{d.call(this,e,(e,r)=>e?n(e):t(r))});try{let n=new u(e,t);this.dispatch({...e,method:e.method||`GET`,upgrade:e.protocol||`Websocket`},n)}catch(n){if(typeof t!=`function`)throw n;let r=e?.opaque;queueMicrotask(()=>t(n,{opaque:r}))}}n.exports=d})),sn=i(((e,n)=>{let r=t(`node:assert`),{AsyncResource:i}=t(`node:async_hooks`),{InvalidArgumentError:a,SocketError:o}=mt(),s=_t(),{addSignal:c,removeSignal:l}=nn();var u=class extends i{constructor(e,t){if(!e||typeof e!=`object`)throw new a(`invalid opts`);if(typeof t!=`function`)throw new a(`invalid callback`);let{signal:n,opaque:r,responseHeaders:i}=e;if(n&&typeof n.on!=`function`&&typeof n.addEventListener!=`function`)throw new a(`signal must be an EventEmitter or EventTarget`);super(`UNDICI_CONNECT`),this.opaque=r||null,this.responseHeaders=i||null,this.callback=t,this.abort=null,c(this,n)}onConnect(e,t){if(this.reason){e(this.reason);return}r(this.callback),this.abort=e,this.context=t}onHeaders(){throw new o(`bad connect`,null)}onUpgrade(e,t,n){let{callback:r,opaque:i,context:a}=this;l(this),this.callback=null;let o=t;o!=null&&(o=this.responseHeaders===`raw`?s.parseRawHeaders(t):s.parseHeaders(t)),this.runInAsyncScope(r,null,null,{statusCode:e,headers:o,socket:n,opaque:i,context:a})}onError(e){let{callback:t,opaque:n}=this;l(this),t&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(t,null,e,{opaque:n})}))}};function d(e,t){if(t===void 0)return new Promise((t,n)=>{d.call(this,e,(e,r)=>e?n(e):t(r))});try{let n=new u(e,t);this.dispatch({...e,method:`CONNECT`},n)}catch(n){if(typeof t!=`function`)throw n;let r=e?.opaque;queueMicrotask(()=>t(n,{opaque:r}))}}n.exports=d})),cn=i(((e,t)=>{t.exports.request=tn(),t.exports.stream=rn(),t.exports.pipeline=an(),t.exports.upgrade=on(),t.exports.connect=sn()})),ln=i(((e,t)=>{let{UndiciError:n}=mt(),r=Symbol.for(`undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED`);t.exports={MockNotMatchedError:class e extends n{constructor(t){super(t),Error.captureStackTrace(this,e),this.name=`MockNotMatchedError`,this.message=t||`The request does not match any registered mock dispatches`,this.code=`UND_MOCK_ERR_MOCK_NOT_MATCHED`}static[Symbol.hasInstance](e){return e&&e[r]===!0}[r]=!0}}})),un=i(((e,t)=>{t.exports={kAgent:Symbol(`agent`),kOptions:Symbol(`options`),kFactory:Symbol(`factory`),kDispatches:Symbol(`dispatches`),kDispatchKey:Symbol(`dispatch key`),kDefaultHeaders:Symbol(`default headers`),kDefaultTrailers:Symbol(`default trailers`),kContentLength:Symbol(`content length`),kMockAgent:Symbol(`mock agent`),kMockAgentSet:Symbol(`mock agent set`),kMockAgentGet:Symbol(`mock agent get`),kMockDispatch:Symbol(`mock dispatch`),kClose:Symbol(`close`),kOriginalClose:Symbol(`original agent close`),kOrigin:Symbol(`origin`),kIsMockActive:Symbol(`is mock active`),kNetConnect:Symbol(`net connect`),kGetNetConnect:Symbol(`get net connect`),kConnected:Symbol(`connected`)}})),dn=i(((e,n)=>{let{MockNotMatchedError:r}=ln(),{kDispatches:i,kMockAgent:a,kOriginalDispatch:o,kOrigin:s,kGetNetConnect:c}=un(),{buildURL:l}=_t(),{STATUS_CODES:u}=t(`node:http`),{types:{isPromise:d}}=t(`node:util`);function f(e,t){return typeof e==`string`?e===t:e instanceof RegExp?e.test(t):typeof e==`function`?e(t)===!0:!1}function p(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e.toLocaleLowerCase(),t]))}function m(e,t){if(Array.isArray(e)){for(let n=0;n!e).filter(({path:e})=>f(v(e),i));if(a.length===0)throw new r(`Mock dispatch not matched for path '${i}'`);if(a=a.filter(({method:e})=>f(e,t.method)),a.length===0)throw new r(`Mock dispatch not matched for method '${t.method}' on path '${i}'`);if(a=a.filter(({body:e})=>e===void 0?!0:f(e,t.body)),a.length===0)throw new r(`Mock dispatch not matched for body '${t.body}' on path '${i}'`);if(a=a.filter(e=>g(e,t.headers)),a.length===0)throw new r(`Mock dispatch not matched for headers '${typeof t.headers==`object`?JSON.stringify(t.headers):t.headers}' on path '${i}'`);return a[0]}function S(e,t,n){let r={timesInvoked:0,times:1,persist:!1,consumed:!1},i=typeof n==`function`?{callback:n}:{...n},a={...r,...t,pending:!0,data:{error:null,...i}};return e.push(a),a}function C(e,t){let n=e.findIndex(e=>e.consumed?y(e,t):!1);n!==-1&&e.splice(n,1)}function w(e){let{path:t,method:n,body:r,headers:i,query:a}=e;return{path:t,method:n,body:r,headers:i,query:a}}function T(e){let t=Object.keys(e),n=[];for(let r=0;r=m,r.pending=p0?setTimeout(()=>{g(this[i])},u):g(this[i]);function g(r,i=o){let l=Array.isArray(e.headers)?h(e.headers):e.headers,u=typeof i==`function`?i({...e,headers:l}):i;if(d(u)){u.then(e=>g(r,e));return}let f=b(u),p=T(s),m=T(c);t.onConnect?.(e=>t.onError(e),null),t.onHeaders?.(a,p,v,E(a)),t.onData?.(Buffer.from(f)),t.onComplete?.(m),C(r,n)}function v(){}return!0}function k(){let e=this[a],t=this[s],n=this[o];return function(i,a){if(e.isMockActive)try{O.call(this,i,a)}catch(o){if(o instanceof r){let s=e[c]();if(s===!1)throw new r(`${o.message}: subsequent request to origin ${t} was not allowed (net.connect disabled)`);if(A(s,t))n.call(this,i,a);else throw new r(`${o.message}: subsequent request to origin ${t} was not allowed (net.connect is not enabled for this origin)`)}else throw o}else n.call(this,i,a)}}function A(e,t){let n=new URL(t);return e===!0?!0:!!(Array.isArray(e)&&e.some(e=>f(e,n.host)))}function j(e){if(e){let{agent:t,...n}=e;return n}}n.exports={getResponseData:b,getMockDispatch:x,addMockDispatch:S,deleteMockDispatch:C,buildKey:w,generateKeyValues:T,matchValue:f,getResponse:D,getStatusText:E,mockDispatch:O,buildMockDispatch:k,checkNetConnect:A,buildMockOptions:j,getHeaderByName:m,buildHeadersFromArray:h}})),fn=i(((e,t)=>{let{getResponseData:n,buildKey:r,addMockDispatch:i}=dn(),{kDispatches:a,kDispatchKey:o,kDefaultHeaders:s,kDefaultTrailers:c,kContentLength:l,kMockDispatch:u}=un(),{InvalidArgumentError:d}=mt(),{buildURL:f}=_t();var p=class{constructor(e){this[u]=e}delay(e){if(typeof e!=`number`||!Number.isInteger(e)||e<=0)throw new d(`waitInMs must be a valid integer > 0`);return this[u].delay=e,this}persist(){return this[u].persist=!0,this}times(e){if(typeof e!=`number`||!Number.isInteger(e)||e<=0)throw new d(`repeatTimes must be a valid integer > 0`);return this[u].times=e,this}},m=class{constructor(e,t){if(typeof e!=`object`)throw new d(`opts must be an object`);if(e.path===void 0)throw new d(`opts.path must be defined`);if(e.method===void 0&&(e.method=`GET`),typeof e.path==`string`)if(e.query)e.path=f(e.path,e.query);else{let t=new URL(e.path,`data://`);e.path=t.pathname+t.search}typeof e.method==`string`&&(e.method=e.method.toUpperCase()),this[o]=r(e),this[a]=t,this[s]={},this[c]={},this[l]=!1}createMockScopeDispatchData({statusCode:e,data:t,responseOptions:r}){let i=n(t),a=this[l]?{"content-length":i.length}:{};return{statusCode:e,data:t,headers:{...this[s],...a,...r.headers},trailers:{...this[c],...r.trailers}}}validateReplyParameters(e){if(e.statusCode===void 0)throw new d(`statusCode must be defined`);if(typeof e.responseOptions!=`object`||e.responseOptions===null)throw new d(`responseOptions must be an object`)}reply(e){if(typeof e==`function`)return new p(i(this[a],this[o],t=>{let n=e(t);if(typeof n!=`object`||!n)throw new d(`reply options callback must return an object`);let r={data:``,responseOptions:{},...n};return this.validateReplyParameters(r),{...this.createMockScopeDispatchData(r)}}));let t={statusCode:e,data:arguments[1]===void 0?``:arguments[1],responseOptions:arguments[2]===void 0?{}:arguments[2]};this.validateReplyParameters(t);let n=this.createMockScopeDispatchData(t);return new p(i(this[a],this[o],n))}replyWithError(e){if(e===void 0)throw new d(`error must be defined`);return new p(i(this[a],this[o],{error:e}))}defaultReplyHeaders(e){if(e===void 0)throw new d(`headers must be defined`);return this[s]=e,this}defaultReplyTrailers(e){if(e===void 0)throw new d(`trailers must be defined`);return this[c]=e,this}replyContentLength(){return this[l]=!0,this}};t.exports.MockInterceptor=m,t.exports.MockScope=p})),pn=i(((e,n)=>{let{promisify:r}=t(`node:util`),i=Ht(),{buildMockDispatch:a}=dn(),{kDispatches:o,kMockAgent:s,kClose:c,kOriginalClose:l,kOrigin:u,kOriginalDispatch:d,kConnected:f}=un(),{MockInterceptor:p}=fn(),m=pt(),{InvalidArgumentError:h}=mt();n.exports=class extends i{constructor(e,t){if(super(e,t),!t||!t.agent||typeof t.agent.dispatch!=`function`)throw new h(`Argument opts.agent must implement Agent`);this[s]=t.agent,this[u]=e,this[o]=[],this[f]=1,this[d]=this.dispatch,this[l]=this.close.bind(this),this.dispatch=a.call(this),this.close=this[c]}get[m.kConnected](){return this[f]}intercept(e){return new p(e,this[o])}async[c](){await r(this[l])(),this[f]=0,this[s][m.kClients].delete(this[u])}}})),mn=i(((e,n)=>{let{promisify:r}=t(`node:util`),i=Kt(),{buildMockDispatch:a}=dn(),{kDispatches:o,kMockAgent:s,kClose:c,kOriginalClose:l,kOrigin:u,kOriginalDispatch:d,kConnected:f}=un(),{MockInterceptor:p}=fn(),m=pt(),{InvalidArgumentError:h}=mt();n.exports=class extends i{constructor(e,t){if(super(e,t),!t||!t.agent||typeof t.agent.dispatch!=`function`)throw new h(`Argument opts.agent must implement Agent`);this[s]=t.agent,this[u]=e,this[o]=[],this[f]=1,this[d]=this.dispatch,this[l]=this.close.bind(this),this.dispatch=a.call(this),this.close=this[c]}get[m.kConnected](){return this[f]}intercept(e){return new p(e,this[o])}async[c](){await r(this[l])(),this[f]=0,this[s][m.kClients].delete(this[u])}}})),hn=i(((e,t)=>{let n={pronoun:`it`,is:`is`,was:`was`,this:`this`},r={pronoun:`they`,is:`are`,was:`were`,this:`these`};t.exports=class{constructor(e,t){this.singular=e,this.plural=t}pluralize(e){let t=e===1,i=t?n:r,a=t?this.singular:this.plural;return{...i,count:e,noun:a}}}})),gn=i(((e,n)=>{let{Transform:r}=t(`node:stream`),{Console:i}=t(`node:console`),a=process.versions.icu?`✅`:`Y `,o=process.versions.icu?`❌`:`N `;n.exports=class{constructor({disableColors:e}={}){this.transform=new r({transform(e,t,n){n(null,e)}}),this.logger=new i({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){let t=e.map(({method:e,path:t,data:{statusCode:n},persist:r,times:i,timesInvoked:s,origin:c})=>({Method:e,Origin:c,Path:t,"Status code":n,Persistent:r?a:o,Invocations:s,Remaining:r?1/0:i-s}));return this.logger.table(t),this.transform.read().toString()}}})),_n=i(((e,t)=>{let{kClients:n}=pt(),r=Jt(),{kAgent:i,kMockAgentSet:a,kMockAgentGet:o,kDispatches:s,kIsMockActive:c,kNetConnect:l,kGetNetConnect:u,kOptions:d,kFactory:f}=un(),p=pn(),m=mn(),{matchValue:h,buildMockOptions:g}=dn(),{InvalidArgumentError:v,UndiciError:y}=mt(),b=bt(),x=hn(),S=gn();t.exports=class extends b{constructor(e){if(super(e),this[l]=!0,this[c]=!0,e?.agent&&typeof e.agent.dispatch!=`function`)throw new v(`Argument opts.agent must implement Agent`);let t=e?.agent?e.agent:new r(e);this[i]=t,this[n]=t[n],this[d]=g(e)}get(e){let t=this[o](e);return t||(t=this[f](e),this[a](e,t)),t}dispatch(e,t){return this.get(e.origin),this[i].dispatch(e,t)}async close(){await this[i].close(),this[n].clear()}deactivate(){this[c]=!1}activate(){this[c]=!0}enableNetConnect(e){if(typeof e==`string`||typeof e==`function`||e instanceof RegExp)Array.isArray(this[l])?this[l].push(e):this[l]=[e];else if(e===void 0)this[l]=!0;else throw new v(`Unsupported matcher. Must be one of String|Function|RegExp.`)}disableNetConnect(){this[l]=!1}get isMockActive(){return this[c]}[a](e,t){this[n].set(e,t)}[f](e){let t=Object.assign({agent:this},this[d]);return this[d]&&this[d].connections===1?new p(e,t):new m(e,t)}[o](e){let t=this[n].get(e);if(t)return t;if(typeof e!=`string`){let t=this[f](`http://localhost:9999`);return this[a](e,t),t}for(let[t,r]of Array.from(this[n]))if(r&&typeof t!=`string`&&h(t,e)){let t=this[f](e);return this[a](e,t),t[s]=r[s],t}}[u](){return this[l]}pendingInterceptors(){let e=this[n];return Array.from(e.entries()).flatMap(([e,t])=>t[s].map(t=>({...t,origin:e}))).filter(({pending:e})=>e)}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new S}={}){let t=this.pendingInterceptors();if(t.length===0)return;let n=new x(`interceptor`,`interceptors`).pluralize(t.length);throw new y(` +`,`latin1`),t!==null&&r!==t){if(n[te])throw new s;process.emitWarning(new s)}e[x].timeout&&e[x].timeoutType===3&&e[x].timeout.refresh&&e[x].timeout.refresh(),n[ie]()}}destroy(e){let{socket:t,client:n,abort:i}=this;t[E]=!1,e&&(r(n[C]<=1,`pipeline should only contain this request`),i(e))}};n.exports=be})),Vt=i(((e,n)=>{let r=t(`node:assert`),{pipeline:i}=t(`node:stream`),a=yt(),{RequestContentLengthMismatchError:o,RequestAbortedError:s,SocketError:c,InformationalError:l}=gt(),{kUrl:u,kReset:d,kClient:f,kRunning:p,kPending:m,kQueue:h,kPendingIdx:g,kRunningIdx:v,kError:y,kSocket:b,kStrictContentLength:x,kOnError:S,kMaxConcurrentStreams:C,kHTTP2Session:w,kResume:T,kSize:E,kHTTPContext:D}=ht(),O=Symbol(`open streams`),k,A=!1,j;try{j=t(`node:http2`)}catch{j={constants:{}}}let{constants:{HTTP2_HEADER_AUTHORITY:M,HTTP2_HEADER_METHOD:N,HTTP2_HEADER_PATH:P,HTTP2_HEADER_SCHEME:F,HTTP2_HEADER_CONTENT_LENGTH:I,HTTP2_HEADER_EXPECT:L,HTTP2_HEADER_STATUS:R}}=j;function z(e){let t=[];for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.push(Buffer.from(n),Buffer.from(e));else t.push(Buffer.from(n),Buffer.from(r));return t}async function ee(e,t){e[b]=t,A||(A=!0,process.emitWarning(`H2 support is experimental, expect them to change at any time.`,{code:`UNDICI-H2`}));let n=j.connect(e[u],{createConnection:()=>t,peerMaxConcurrentStreams:e[C]});n[O]=0,n[f]=e,n[b]=t,a.addListener(n,`error`,te),a.addListener(n,`frameError`,V),a.addListener(n,`end`,ne),a.addListener(n,`goaway`,re),a.addListener(n,`close`,function(){let{[f]:e}=this,{[b]:t}=e,n=this[b][y]||this[y]||new c(`closed`,a.getSocketInfo(t));if(e[w]=null,e.destroyed){r(e[m]===0);let t=e[h].splice(e[v]);for(let r=0;r{i=!0}),{version:`h2`,defaultPipelining:1/0,write(...t){return ie(e,...t)},resume(){B(e)},destroy(e,n){i?queueMicrotask(n):t.destroy(e).on(`close`,n)},get destroyed(){return t.destroyed},busy(){return!1}}}function B(e){let t=e[b];t?.destroyed===!1&&(e[E]===0&&e[C]===0?(t.unref(),e[w].unref()):(t.ref(),e[w].ref()))}function te(e){r(e.code!==`ERR_TLS_CERT_ALTNAME_INVALID`),this[b][y]=e,this[f][S](e)}function V(e,t,n){if(n===0){let n=new l(`HTTP/2: "frameError" received - type ${e}, code ${t}`);this[b][y]=n,this[f][S](n)}}function ne(){let e=new c(`other side closed`,a.getSocketInfo(this[b]));this.destroy(e),a.destroy(this[b],e)}function re(e){let t=this[y]||new c(`HTTP/2: "GOAWAY" frame received with code ${e}`,a.getSocketInfo(this)),n=this[f];if(n[b]=null,n[D]=null,this[w]!=null&&(this[w].destroy(t),this[w]=null),a.destroy(this[b],t),n[v]{t.aborted||t.completed||(n||=new s,a.errorRequest(e,t,n),E!=null&&a.destroy(E,n),a.destroy(S,n),e[h][e[v]++]=null,e[T]())};try{t.onConnect(j)}catch(n){a.errorRequest(e,t,n)}if(t.aborted)return!1;if(i===`CONNECT`)return n.ref(),E=n.request(C,{endStream:!1,signal:m}),E.id&&!E.pending?(t.onUpgrade(null,null,E),++n[O],e[h][e[v]++]=null):E.once(`ready`,()=>{t.onUpgrade(null,null,E),++n[O],e[h][e[v]++]=null}),E.once(`close`,()=>{--n[O],n[O]===0&&n.unref()}),!0;C[P]=c,C[F]=`https`;let ee=i===`PUT`||i===`POST`||i===`PATCH`;S&&typeof S.read==`function`&&S.read(0);let B=a.bodyLength(S);if(a.isFormDataLike(S)){k??=zt().extractBody;let[e,t]=k(S);C[`content-type`]=t,S=e.stream,B=e.length}if(B??=t.contentLength,(B===0||!ee)&&(B=null),H(i)&&B>0&&t.contentLength!=null&&t.contentLength!==B){if(e[x])return a.errorRequest(e,t,new o),!1;process.emitWarning(new o)}B!=null&&(r(S,`no body must not have content length`),C[I]=`${B}`),n.ref();let te=i===`GET`||i===`HEAD`||S===null;return p?(C[L]=`100-continue`,E=n.request(C,{endStream:te,signal:m}),E.once(`continue`,V)):(E=n.request(C,{endStream:te,signal:m}),V()),++n[O],E.once(`response`,n=>{let{[R]:r,...i}=n;if(t.onResponseStarted(),t.aborted){let n=new s;a.errorRequest(e,t,n),a.destroy(E,n);return}t.onHeaders(Number(r),z(i),E.resume.bind(E),``)===!1&&E.pause(),E.on(`data`,e=>{t.onData(e)===!1&&E.pause()})}),E.once(`end`,()=>{(E.state?.state==null||E.state.state<6)&&t.onComplete([]),n[O]===0&&n.unref(),j(new l(`HTTP/2: stream half-closed (remote)`)),e[h][e[v]++]=null,e[g]=e[v],e[T]()}),E.once(`close`,()=>{--n[O],n[O]===0&&n.unref()}),E.once(`error`,function(e){j(e)}),E.once(`frameError`,(e,t)=>{j(new l(`HTTP/2: "frameError" received - type ${e}, code ${t}`))}),!0;function V(){!S||B===0?ae(j,E,null,e,t,e[b],B,ee):a.isBuffer(S)?ae(j,E,S,e,t,e[b],B,ee):a.isBlobLike(S)?typeof S.stream==`function`?ce(j,E,S.stream(),e,t,e[b],B,ee):se(j,E,S,e,t,e[b],B,ee):a.isStream(S)?oe(j,e[b],ee,E,S,e,t,B):a.isIterable(S)?ce(j,E,S,e,t,e[b],B,ee):r(!1)}}function ae(e,t,n,i,o,s,c,l){try{n!=null&&a.isBuffer(n)&&(r(c===n.byteLength,`buffer body must have content length`),t.cork(),t.write(n),t.uncork(),t.end(),o.onBodySent(n)),l||(s[d]=!0),o.onRequestSent(),i[T]()}catch(t){e(t)}}function oe(e,t,n,o,s,c,l,u){r(u!==0||c[p]===0,`stream body cannot be pipelined`);let f=i(s,o,r=>{r?(a.destroy(f,r),e(r)):(a.removeAllListeners(f),l.onRequestSent(),n||(t[d]=!0),c[T]())});a.addListener(f,`data`,m);function m(e){l.onBodySent(e)}}async function se(e,t,n,i,a,s,c,l){r(c===n.size,`blob body must have content length`);try{if(c!=null&&c!==n.size)throw new o;let e=Buffer.from(await n.arrayBuffer());t.cork(),t.write(e),t.uncork(),t.end(),a.onBodySent(e),a.onRequestSent(),l||(s[d]=!0),i[T]()}catch(t){e(t)}}async function ce(e,t,n,i,a,o,s,c){r(s!==0||i[p]===0,`iterator body cannot be pipelined`);let l=null;function u(){if(l){let e=l;l=null,e()}}let f=()=>new Promise((e,t)=>{r(l===null),o[y]?t(o[y]):l=e});t.on(`close`,u).on(`drain`,u);try{for await(let e of n){if(o[y])throw o[y];let n=t.write(e);a.onBodySent(e),n||await f()}t.end(),a.onRequestSent(),c||(o[d]=!0),i[T]()}catch(t){e(t)}finally{t.off(`close`,u).off(`drain`,u)}}n.exports=ee})),Ht=i(((e,n)=>{let r=yt(),{kBodyUsed:i}=ht(),a=t(`node:assert`),{InvalidArgumentError:o}=gt(),s=t(`node:events`),c=[300,301,302,303,307,308],l=Symbol(`body`);var u=class{constructor(e){this[l]=e,this[i]=!1}async*[Symbol.asyncIterator](){a(!this[i],`disturbed`),this[i]=!0,yield*this[l]}},d=class{constructor(e,t,n,c){if(t!=null&&(!Number.isInteger(t)||t<0))throw new o(`maxRedirections must be a positive number`);r.validateHandler(c,n.method,n.upgrade),this.dispatch=e,this.location=null,this.abort=null,this.opts={...n,maxRedirections:0},this.maxRedirections=t,this.handler=c,this.history=[],this.redirectionLimitReached=!1,r.isStream(this.opts.body)?(r.bodyLength(this.opts.body)===0&&this.opts.body.on(`data`,function(){a(!1)}),typeof this.opts.body.readableDidRead!=`boolean`&&(this.opts.body[i]=!1,s.prototype.on.call(this.opts.body,`data`,function(){this[i]=!0}))):(this.opts.body&&typeof this.opts.body.pipeTo==`function`||this.opts.body&&typeof this.opts.body!=`string`&&!ArrayBuffer.isView(this.opts.body)&&r.isIterable(this.opts.body))&&(this.opts.body=new u(this.opts.body))}onConnect(e){this.abort=e,this.handler.onConnect(e,{history:this.history})}onUpgrade(e,t,n){this.handler.onUpgrade(e,t,n)}onError(e){this.handler.onError(e)}onHeaders(e,t,n,i){if(this.location=this.history.length>=this.maxRedirections||r.isDisturbed(this.opts.body)?null:f(e,t),this.opts.throwOnMaxRedirect&&this.history.length>=this.maxRedirections){this.request&&this.request.abort(Error(`max redirects`)),this.redirectionLimitReached=!0,this.abort(Error(`max redirects`));return}if(this.opts.origin&&this.history.push(new URL(this.opts.path,this.opts.origin)),!this.location)return this.handler.onHeaders(e,t,n,i);let{origin:a,pathname:o,search:s}=r.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),c=s?`${o}${s}`:o;this.opts.headers=m(this.opts.headers,e===303,this.opts.origin!==a),this.opts.path=c,this.opts.origin=a,this.opts.maxRedirections=0,this.opts.query=null,e===303&&this.opts.method!==`HEAD`&&(this.opts.method=`GET`,this.opts.body=null)}onData(e){if(!this.location)return this.handler.onData(e)}onComplete(e){this.location?(this.location=null,this.abort=null,this.dispatch(this.opts,this)):this.handler.onComplete(e)}onBodySent(e){this.handler.onBodySent&&this.handler.onBodySent(e)}};function f(e,t){if(c.indexOf(e)===-1)return null;for(let e=0;e{let n=Ht();function r({maxRedirections:e}){return t=>function(r,i){let{maxRedirections:a=e}=r;if(!a)return t(r,i);let o=new n(t,a,r,i);return r={...r,maxRedirections:0},t(r,o)}}t.exports=r})),Wt=i(((e,n)=>{let r=t(`node:assert`),i=t(`node:net`),a=t(`node:http`),o=yt(),{channels:s}=bt(),c=xt(),l=Ct(),{InvalidArgumentError:u,InformationalError:d,ClientDestroyedError:f}=gt(),p=Tt(),{kUrl:m,kServerName:h,kClient:g,kBusy:v,kConnect:y,kResuming:b,kRunning:x,kPending:S,kSize:C,kQueue:w,kConnected:T,kConnecting:E,kNeedDrain:D,kKeepAliveDefaultTimeout:O,kHostHeader:k,kPendingIdx:A,kRunningIdx:j,kError:M,kPipelining:N,kKeepAliveTimeoutValue:P,kMaxHeadersSize:F,kKeepAliveMaxTimeout:I,kKeepAliveTimeoutThreshold:L,kHeadersTimeout:R,kBodyTimeout:z,kStrictContentLength:ee,kConnector:B,kMaxRedirections:te,kMaxRequests:V,kCounter:ne,kClose:re,kDestroy:H,kDispatch:ie,kInterceptors:ae,kLocalAddress:oe,kMaxResponseSize:se,kOnError:ce,kHTTPContext:le,kMaxConcurrentStreams:ue,kResume:de}=ht(),fe=Bt(),pe=Vt(),me=!1,he=Symbol(`kClosedResolve`),ge=()=>{};function _e(e){return e[N]??e[le]?.defaultPipelining??1}var U=class extends l{constructor(e,{interceptors:t,maxHeaderSize:n,headersTimeout:r,socketTimeout:s,requestTimeout:c,connectTimeout:l,bodyTimeout:d,idleTimeout:f,keepAlive:g,keepAliveTimeout:v,maxKeepAliveTimeout:y,keepAliveMaxTimeout:x,keepAliveTimeoutThreshold:S,socketPath:C,pipelining:T,tls:E,strictContentLength:M,maxCachedSessions:ne,maxRedirections:re,connect:H,maxRequestsPerClient:ie,localAddress:fe,maxResponseSize:pe,autoSelectFamily:ge,autoSelectFamilyAttemptTimeout:_e,maxConcurrentStreams:U,allowH2:be}={}){if(super(),g!==void 0)throw new u(`unsupported keepAlive, use pipelining=0 instead`);if(s!==void 0)throw new u(`unsupported socketTimeout, use headersTimeout & bodyTimeout instead`);if(c!==void 0)throw new u(`unsupported requestTimeout, use headersTimeout & bodyTimeout instead`);if(f!==void 0)throw new u(`unsupported idleTimeout, use keepAliveTimeout instead`);if(y!==void 0)throw new u(`unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead`);if(n!=null&&!Number.isFinite(n))throw new u(`invalid maxHeaderSize`);if(C!=null&&typeof C!=`string`)throw new u(`invalid socketPath`);if(l!=null&&(!Number.isFinite(l)||l<0))throw new u(`invalid connectTimeout`);if(v!=null&&(!Number.isFinite(v)||v<=0))throw new u(`invalid keepAliveTimeout`);if(x!=null&&(!Number.isFinite(x)||x<=0))throw new u(`invalid keepAliveMaxTimeout`);if(S!=null&&!Number.isFinite(S))throw new u(`invalid keepAliveTimeoutThreshold`);if(r!=null&&(!Number.isInteger(r)||r<0))throw new u(`headersTimeout must be a positive integer or zero`);if(d!=null&&(!Number.isInteger(d)||d<0))throw new u(`bodyTimeout must be a positive integer or zero`);if(H!=null&&typeof H!=`function`&&typeof H!=`object`)throw new u(`connect must be a function or an object`);if(re!=null&&(!Number.isInteger(re)||re<0))throw new u(`maxRedirections must be a positive number`);if(ie!=null&&(!Number.isInteger(ie)||ie<0))throw new u(`maxRequestsPerClient must be a positive number`);if(fe!=null&&(typeof fe!=`string`||i.isIP(fe)===0))throw new u(`localAddress must be valid string IP address`);if(pe!=null&&(!Number.isInteger(pe)||pe<-1))throw new u(`maxResponseSize must be a positive number`);if(_e!=null&&(!Number.isInteger(_e)||_e<-1))throw new u(`autoSelectFamilyAttemptTimeout must be a positive number`);if(be!=null&&typeof be!=`boolean`)throw new u(`allowH2 must be a valid boolean value`);if(U!=null&&(typeof U!=`number`||U<1))throw new u(`maxConcurrentStreams must be a positive integer, greater than 0`);typeof H!=`function`&&(H=p({...E,maxCachedSessions:ne,allowH2:be,socketPath:C,timeout:l,...ge?{autoSelectFamily:ge,autoSelectFamilyAttemptTimeout:_e}:void 0,...H})),t?.Client&&Array.isArray(t.Client)?(this[ae]=t.Client,me||(me=!0,process.emitWarning(`Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.`,{code:`UNDICI-CLIENT-INTERCEPTOR-DEPRECATED`}))):this[ae]=[ve({maxRedirections:re})],this[m]=o.parseOrigin(e),this[B]=H,this[N]=T??1,this[F]=n||a.maxHeaderSize,this[O]=v??4e3,this[I]=x??6e5,this[L]=S??2e3,this[P]=this[O],this[h]=null,this[oe]=fe??null,this[b]=0,this[D]=0,this[k]=`host: ${this[m].hostname}${this[m].port?`:${this[m].port}`:``}\r\n`,this[z]=d??3e5,this[R]=r??3e5,this[ee]=M??!0,this[te]=re,this[V]=ie,this[he]=null,this[se]=pe>-1?pe:-1,this[ue]=U??100,this[le]=null,this[w]=[],this[j]=0,this[A]=0,this[de]=e=>Se(this,e),this[ce]=e=>ye(this,e)}get pipelining(){return this[N]}set pipelining(e){this[N]=e,this[de](!0)}get[S](){return this[w].length-this[A]}get[x](){return this[A]-this[j]}get[C](){return this[w].length-this[j]}get[T](){return!!this[le]&&!this[E]&&!this[le].destroyed}get[v](){return!!(this[le]?.busy(null)||this[C]>=(_e(this)||1)||this[S]>0)}[y](e){be(this),this.once(`connect`,e)}[ie](e,t){let n=new c(e.origin||this[m].origin,e,t);return this[w].push(n),this[b]||(o.bodyLength(n.body)==null&&o.isIterable(n.body)?(this[b]=1,queueMicrotask(()=>Se(this))):this[de](!0)),this[b]&&this[D]!==2&&this[v]&&(this[D]=2),this[D]<2}async[re](){return new Promise(e=>{this[C]?this[he]=e:e(null)})}async[H](e){return new Promise(t=>{let n=this[w].splice(this[A]);for(let t=0;t{this[he]&&(this[he](),this[he]=null),t(null)};this[le]?(this[le].destroy(e,r),this[le]=null):queueMicrotask(r),this[de]()})}};let ve=Ut();function ye(e,t){if(e[x]===0&&t.code!==`UND_ERR_INFO`&&t.code!==`UND_ERR_SOCKET`){r(e[A]===e[j]);let n=e[w].splice(e[j]);for(let r=0;r{e[B]({host:t,hostname:n,protocol:a,port:c,servername:e[h],localAddress:e[oe]},(e,t)=>{e?i(e):r(t)})});if(e.destroyed){o.destroy(i.on(`error`,ge),new f);return}r(i);try{e[le]=i.alpnProtocol===`h2`?await pe(e,i):await fe(e,i)}catch(e){throw i.destroy().on(`error`,ge),e}e[E]=!1,i[ne]=0,i[V]=e[V],i[g]=e,i[M]=null,s.connected.hasSubscribers&&s.connected.publish({connectParams:{host:t,hostname:n,protocol:a,port:c,version:e[le]?.version,servername:e[h],localAddress:e[oe]},connector:e[B],socket:i}),e.emit(`connect`,e[m],[e])}catch(i){if(e.destroyed)return;if(e[E]=!1,s.connectError.hasSubscribers&&s.connectError.publish({connectParams:{host:t,hostname:n,protocol:a,port:c,version:e[le]?.version,servername:e[h],localAddress:e[oe]},connector:e[B],error:i}),i.code===`ERR_TLS_CERT_ALTNAME_INVALID`)for(r(e[x]===0);e[S]>0&&e[w][e[A]].servername===e[h];){let t=e[w][e[A]++];o.errorRequest(e,t,i)}else ye(e,i);e.emit(`connectionError`,e[m],[e],i)}e[de]()}function xe(e){e[D]=0,e.emit(`drain`,e[m],[e])}function Se(e,t){e[b]!==2&&(e[b]=2,Ce(e,t),e[b]=0,e[j]>256&&(e[w].splice(0,e[j]),e[A]-=e[j],e[j]=0))}function Ce(e,t){for(;;){if(e.destroyed){r(e[S]===0);return}if(e[he]&&!e[C]){e[he](),e[he]=null;return}if(e[le]&&e[le].resume(),e[v])e[D]=2;else if(e[D]===2){t?(e[D]=1,queueMicrotask(()=>xe(e))):xe(e);continue}if(e[S]===0||e[x]>=(_e(e)||1))return;let n=e[w][e[A]];if(e[m].protocol===`https:`&&e[h]!==n.servername){if(e[x]>0)return;e[h]=n.servername,e[le]?.destroy(new d(`servername changed`),()=>{e[le]=null,Se(e)})}if(e[E])return;if(!e[le]){be(e);return}if(e[le].destroyed||e[le].busy(n))return;!n.aborted&&e[le].write(n)?e[A]++:e[w].splice(e[A],1)}}n.exports=U})),Gt=i(((e,t)=>{let n=2048,r=n-1;var i=class{constructor(){this.bottom=0,this.top=0,this.list=Array(n),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&r)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&r}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&r,e)}};t.exports=class{constructor(){this.head=this.tail=new i}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new i),this.head.push(e)}shift(){let e=this.tail,t=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),t}}})),Kt=i(((e,t)=>{let{kFree:n,kConnected:r,kPending:i,kQueued:a,kRunning:o,kSize:s}=ht(),c=Symbol(`pool`);t.exports=class{constructor(e){this[c]=e}get connected(){return this[c][r]}get free(){return this[c][n]}get pending(){return this[c][i]}get queued(){return this[c][a]}get running(){return this[c][o]}get size(){return this[c][s]}}})),qt=i(((e,t)=>{let n=Ct(),r=Gt(),{kConnected:i,kSize:a,kRunning:o,kPending:s,kQueued:c,kBusy:l,kFree:u,kUrl:d,kClose:f,kDestroy:p,kDispatch:m}=ht(),h=Kt(),g=Symbol(`clients`),v=Symbol(`needDrain`),y=Symbol(`queue`),b=Symbol(`closed resolve`),x=Symbol(`onDrain`),S=Symbol(`onConnect`),C=Symbol(`onDisconnect`),w=Symbol(`onConnectionError`),T=Symbol(`get dispatcher`),E=Symbol(`add client`),D=Symbol(`remove client`),O=Symbol(`stats`);t.exports={PoolBase:class extends n{constructor(){super(),this[y]=new r,this[g]=[],this[c]=0;let e=this;this[x]=function(t,n){let r=e[y],i=!1;for(;!i;){let t=r.shift();if(!t)break;e[c]--,i=!this.dispatch(t.opts,t.handler)}this[v]=i,!this[v]&&e[v]&&(e[v]=!1,e.emit(`drain`,t,[e,...n])),e[b]&&r.isEmpty()&&Promise.all(e[g].map(e=>e.close())).then(e[b])},this[S]=(t,n)=>{e.emit(`connect`,t,[e,...n])},this[C]=(t,n,r)=>{e.emit(`disconnect`,t,[e,...n],r)},this[w]=(t,n,r)=>{e.emit(`connectionError`,t,[e,...n],r)},this[O]=new h(this)}get[l](){return this[v]}get[i](){return this[g].filter(e=>e[i]).length}get[u](){return this[g].filter(e=>e[i]&&!e[v]).length}get[s](){let e=this[c];for(let{[s]:t}of this[g])e+=t;return e}get[o](){let e=0;for(let{[o]:t}of this[g])e+=t;return e}get[a](){let e=this[c];for(let{[a]:t}of this[g])e+=t;return e}get stats(){return this[O]}async[f](){this[y].isEmpty()?await Promise.all(this[g].map(e=>e.close())):await new Promise(e=>{this[b]=e})}async[p](e){for(;;){let t=this[y].shift();if(!t)break;t.handler.onError(e)}await Promise.all(this[g].map(t=>t.destroy(e)))}[m](e,t){let n=this[T]();return n?n.dispatch(e,t)||(n[v]=!0,this[v]=!this[T]()):(this[v]=!0,this[y].push({opts:e,handler:t}),this[c]++),!this[v]}[E](e){return e.on(`drain`,this[x]).on(`connect`,this[S]).on(`disconnect`,this[C]).on(`connectionError`,this[w]),this[g].push(e),this[v]&&queueMicrotask(()=>{this[v]&&this[x](e[d],[this,e])}),this}[D](e){e.close(()=>{let t=this[g].indexOf(e);t!==-1&&this[g].splice(t,1)}),this[v]=this[g].some(e=>!e[v]&&e.closed!==!0&&e.destroyed!==!0)}},kClients:g,kNeedDrain:v,kAddClient:E,kRemoveClient:D,kGetDispatcher:T}})),Jt=i(((e,t)=>{let{PoolBase:n,kClients:r,kNeedDrain:i,kAddClient:a,kGetDispatcher:o}=qt(),s=Wt(),{InvalidArgumentError:c}=gt(),l=yt(),{kUrl:u,kInterceptors:d}=ht(),f=Tt(),p=Symbol(`options`),m=Symbol(`connections`),h=Symbol(`factory`);function g(e,t){return new s(e,t)}t.exports=class extends n{constructor(e,{connections:t,factory:n=g,connect:i,connectTimeout:a,tls:o,maxCachedSessions:s,socketPath:v,autoSelectFamily:y,autoSelectFamilyAttemptTimeout:b,allowH2:x,...S}={}){if(super(),t!=null&&(!Number.isFinite(t)||t<0))throw new c(`invalid connections`);if(typeof n!=`function`)throw new c(`factory must be a function.`);if(i!=null&&typeof i!=`function`&&typeof i!=`object`)throw new c(`connect must be a function or an object`);typeof i!=`function`&&(i=f({...o,maxCachedSessions:s,allowH2:x,socketPath:v,timeout:a,...y?{autoSelectFamily:y,autoSelectFamilyAttemptTimeout:b}:void 0,...i})),this[d]=S.interceptors?.Pool&&Array.isArray(S.interceptors.Pool)?S.interceptors.Pool:[],this[m]=t||null,this[u]=l.parseOrigin(e),this[p]={...l.deepClone(S),connect:i,allowH2:x},this[p].interceptors=S.interceptors?{...S.interceptors}:void 0,this[h]=n,this.on(`connectionError`,(e,t,n)=>{for(let e of t){let t=this[r].indexOf(e);t!==-1&&this[r].splice(t,1)}})}[o](){for(let e of this[r])if(!e[i])return e;if(!this[m]||this[r].length{let{BalancedPoolMissingUpstreamError:n,InvalidArgumentError:r}=gt(),{PoolBase:i,kClients:a,kNeedDrain:o,kAddClient:s,kRemoveClient:c,kGetDispatcher:l}=qt(),u=Jt(),{kUrl:d,kInterceptors:f}=ht(),{parseOrigin:p}=yt(),m=Symbol(`factory`),h=Symbol(`options`),g=Symbol(`kGreatestCommonDivisor`),v=Symbol(`kCurrentWeight`),y=Symbol(`kIndex`),b=Symbol(`kWeight`),x=Symbol(`kMaxWeightPerServer`),S=Symbol(`kErrorPenalty`);function C(e,t){if(e===0)return t;for(;t!==0;){let n=t;t=e%t,e=n}return e}function w(e,t){return new u(e,t)}t.exports=class extends i{constructor(e=[],{factory:t=w,...n}={}){if(super(),this[h]=n,this[y]=-1,this[v]=0,this[x]=this[h].maxWeightPerServer||100,this[S]=this[h].errorPenalty||15,Array.isArray(e)||(e=[e]),typeof t!=`function`)throw new r(`factory must be a function.`);this[f]=n.interceptors?.BalancedPool&&Array.isArray(n.interceptors.BalancedPool)?n.interceptors.BalancedPool:[],this[m]=t;for(let t of e)this.addUpstream(t);this._updateBalancedPoolStats()}addUpstream(e){let t=p(e).origin;if(this[a].find(e=>e[d].origin===t&&e.closed!==!0&&e.destroyed!==!0))return this;let n=this[m](t,Object.assign({},this[h]));this[s](n),n.on(`connect`,()=>{n[b]=Math.min(this[x],n[b]+this[S])}),n.on(`connectionError`,()=>{n[b]=Math.max(1,n[b]-this[S]),this._updateBalancedPoolStats()}),n.on(`disconnect`,(...e)=>{let t=e[2];t&&t.code===`UND_ERR_SOCKET`&&(n[b]=Math.max(1,n[b]-this[S]),this._updateBalancedPoolStats())});for(let e of this[a])e[b]=this[x];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let e=0;for(let t=0;te[d].origin===t&&e.closed!==!0&&e.destroyed!==!0);return n&&this[c](n),this}get upstreams(){return this[a].filter(e=>e.closed!==!0&&e.destroyed!==!0).map(e=>e[d].origin)}[l](){if(this[a].length===0)throw new n;if(!this[a].find(e=>!e[o]&&e.closed!==!0&&e.destroyed!==!0)||this[a].map(e=>e[o]).reduce((e,t)=>e&&t,!0))return;let e=0,t=this[a].findIndex(e=>!e[o]);for(;e++this[a][t][b]&&!e[o]&&(t=this[y]),this[y]===0&&(this[v]=this[v]-this[g],this[v]<=0&&(this[v]=this[x])),e[b]>=this[v]&&!e[o])return e}return this[v]=this[a][t][b],this[y]=t,this[a][t]}}})),Xt=i(((e,t)=>{let{InvalidArgumentError:n}=gt(),{kClients:r,kRunning:i,kClose:a,kDestroy:o,kDispatch:s,kInterceptors:c}=ht(),l=Ct(),u=Jt(),d=Wt(),f=yt(),p=Ut(),m=Symbol(`onConnect`),h=Symbol(`onDisconnect`),g=Symbol(`onConnectionError`),v=Symbol(`maxRedirections`),y=Symbol(`onDrain`),b=Symbol(`factory`),x=Symbol(`options`);function S(e,t){return t&&t.connections===1?new d(e,t):new u(e,t)}t.exports=class extends l{constructor({factory:e=S,maxRedirections:t=0,connect:i,...a}={}){if(super(),typeof e!=`function`)throw new n(`factory must be a function.`);if(i!=null&&typeof i!=`function`&&typeof i!=`object`)throw new n(`connect must be a function or an object`);if(!Number.isInteger(t)||t<0)throw new n(`maxRedirections must be a positive number`);i&&typeof i!=`function`&&(i={...i}),this[c]=a.interceptors?.Agent&&Array.isArray(a.interceptors.Agent)?a.interceptors.Agent:[p({maxRedirections:t})],this[x]={...f.deepClone(a),connect:i},this[x].interceptors=a.interceptors?{...a.interceptors}:void 0,this[v]=t,this[b]=e,this[r]=new Map,this[y]=(e,t)=>{this.emit(`drain`,e,[this,...t])},this[m]=(e,t)=>{this.emit(`connect`,e,[this,...t])},this[h]=(e,t,n)=>{this.emit(`disconnect`,e,[this,...t],n)},this[g]=(e,t,n)=>{this.emit(`connectionError`,e,[this,...t],n)}}get[i](){let e=0;for(let t of this[r].values())e+=t[i];return e}[s](e,t){let i;if(e.origin&&(typeof e.origin==`string`||e.origin instanceof URL))i=String(e.origin);else throw new n(`opts.origin must be a non-empty string or URL.`);let a=this[r].get(i);return a||(a=this[b](e.origin,this[x]).on(`drain`,this[y]).on(`connect`,this[m]).on(`disconnect`,this[h]).on(`connectionError`,this[g]),this[r].set(i,a)),a.dispatch(e,t)}async[a](){let e=[];for(let t of this[r].values())e.push(t.close());this[r].clear(),await Promise.all(e)}async[o](e){let t=[];for(let n of this[r].values())t.push(n.destroy(e));this[r].clear(),await Promise.all(t)}}})),Zt=i(((e,n)=>{let{kProxy:r,kClose:i,kDestroy:a,kDispatch:o,kInterceptors:s}=ht(),{URL:c}=t(`node:url`),l=Xt(),u=Jt(),d=Ct(),{InvalidArgumentError:f,RequestAbortedError:p,SecureProxyConnectionError:m}=gt(),h=Tt(),g=Wt(),v=Symbol(`proxy agent`),y=Symbol(`proxy client`),b=Symbol(`proxy headers`),x=Symbol(`request tls settings`),S=Symbol(`proxy tls settings`),C=Symbol(`connect endpoint function`),w=Symbol(`tunnel proxy`);function T(e){return e===`https:`?443:80}function E(e,t){return new u(e,t)}let D=()=>{};function O(e,t){return t.connections===1?new g(e,t):new u(e,t)}var k=class extends d{#e;constructor(e,{headers:t={},connect:n,factory:r}){if(super(),!e)throw new f(`Proxy URL is mandatory`);this[b]=t,r?this.#e=r(e,{connect:n}):this.#e=new g(e,{connect:n})}[o](e,t){let n=t.onHeaders;t.onHeaders=function(e,r,i){if(e===407){typeof t.onError==`function`&&t.onError(new f(`Proxy Authentication Required (407)`));return}n&&n.call(this,e,r,i)};let{origin:r,path:i=`/`,headers:a={}}=e;if(e.path=r+i,!(`host`in a)&&!(`Host`in a)){let{host:e}=new c(r);a.host=e}return e.headers={...this[b],...a},this.#e[o](e,t)}async[i](){return this.#e.close()}async[a](e){return this.#e.destroy(e)}},A=class extends d{constructor(e){if(super(),!e||typeof e==`object`&&!(e instanceof c)&&!e.uri)throw new f(`Proxy uri is mandatory`);let{clientFactory:t=E}=e;if(typeof t!=`function`)throw new f(`Proxy opts.clientFactory must be a function.`);let{proxyTunnel:n=!0}=e,i=this.#e(e),{href:a,origin:o,port:u,protocol:d,username:g,password:A,hostname:j}=i;if(this[r]={uri:a,protocol:d},this[s]=e.interceptors?.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],this[x]=e.requestTls,this[S]=e.proxyTls,this[b]=e.headers||{},this[w]=n,e.auth&&e.token)throw new f(`opts.auth cannot be used in combination with opts.token`);e.auth?this[b][`proxy-authorization`]=`Basic ${e.auth}`:e.token?this[b][`proxy-authorization`]=e.token:g&&A&&(this[b][`proxy-authorization`]=`Basic ${Buffer.from(`${decodeURIComponent(g)}:${decodeURIComponent(A)}`).toString(`base64`)}`);let M=h({...e.proxyTls});this[C]=h({...e.requestTls});let N=e.factory||O,P=(e,t)=>{let{protocol:n}=new c(e);return!this[w]&&n===`http:`&&this[r].protocol===`http:`?new k(this[r].uri,{headers:this[b],connect:M,factory:N}):N(e,t)};this[y]=t(i,{connect:M}),this[v]=new l({...e,factory:P,connect:async(e,t)=>{let n=e.host;e.port||(n+=`:${T(e.protocol)}`);try{let{socket:r,statusCode:i}=await this[y].connect({origin:o,port:u,path:n,signal:e.signal,headers:{...this[b],host:e.host},servername:this[S]?.servername||j});if(i!==200&&(r.on(`error`,D).destroy(),t(new p(`Proxy response (${i}) !== 200 when HTTP Tunneling`))),e.protocol!==`https:`){t(null,r);return}let a;a=this[x]?this[x].servername:e.servername,this[C]({...e,servername:a,httpSocket:r},t)}catch(e){e.code===`ERR_TLS_CERT_ALTNAME_INVALID`?t(new m(e)):t(e)}}})}dispatch(e,t){let n=j(e.headers);if(M(n),n&&!(`host`in n)&&!(`Host`in n)){let{host:t}=new c(e.origin);n.host=t}return this[v].dispatch({...e,headers:n},t)}#e(e){return typeof e==`string`?new c(e):e instanceof c?e:new c(e.uri)}async[i](){await this[v].close(),await this[y].close()}async[a](){await this[v].destroy(),await this[y].destroy()}};function j(e){if(Array.isArray(e)){let t={};for(let n=0;ne.toLowerCase()===`proxy-authorization`))throw new f(`Proxy-Authorization should be sent in ProxyAgent constructor`)}n.exports=A})),Qt=i(((e,t)=>{let n=Ct(),{kClose:r,kDestroy:i,kClosed:a,kDestroyed:o,kDispatch:s,kNoProxyAgent:c,kHttpProxyAgent:l,kHttpsProxyAgent:u}=ht(),d=Zt(),f=Xt(),p={"http:":80,"https:":443},m=!1;t.exports=class extends n{#e=null;#t=null;#n=null;constructor(e={}){super(),this.#n=e,m||(m=!0,process.emitWarning(`EnvHttpProxyAgent is experimental, expect them to change at any time.`,{code:`UNDICI-EHPA`}));let{httpProxy:t,httpsProxy:n,noProxy:r,...i}=e;this[c]=new f(i);let a=t??process.env.http_proxy??process.env.HTTP_PROXY;a?this[l]=new d({...i,uri:a}):this[l]=this[c];let o=n??process.env.https_proxy??process.env.HTTPS_PROXY;o?this[u]=new d({...i,uri:o}):this[u]=this[l],this.#a()}[s](e,t){let n=new URL(e.origin);return this.#r(n).dispatch(e,t)}async[r](){await this[c].close(),this[l][a]||await this[l].close(),this[u][a]||await this[u].close()}async[i](e){await this[c].destroy(e),this[l][o]||await this[l].destroy(e),this[u][o]||await this[u].destroy(e)}#r(e){let{protocol:t,host:n,port:r}=e;return n=n.replace(/:\d*$/,``).toLowerCase(),r=Number.parseInt(r,10)||p[t]||0,this.#i(n,r)?t===`https:`?this[u]:this[l]:this[c]}#i(e,t){if(this.#o&&this.#a(),this.#t.length===0)return!0;if(this.#e===`*`)return!1;for(let n=0;n{let r=t(`node:assert`),{kRetryHandlerDefaultRetry:i}=ht(),{RequestRetryError:a}=gt(),{isDisturbed:o,parseHeaders:s,parseRangeHeader:c,wrapRequestBody:l}=yt();function u(e){let t=Date.now();return new Date(e).getTime()-t}n.exports=class e{constructor(t,n){let{retryOptions:r,...a}=t,{retry:o,maxRetries:s,maxTimeout:c,minTimeout:u,timeoutFactor:d,methods:f,errorCodes:p,retryAfter:m,statusCodes:h}=r??{};this.dispatch=n.dispatch,this.handler=n.handler,this.opts={...a,body:l(t.body)},this.abort=null,this.aborted=!1,this.retryOpts={retry:o??e[i],retryAfter:m??!0,maxTimeout:c??30*1e3,minTimeout:u??500,timeoutFactor:d??2,maxRetries:s??5,methods:f??[`GET`,`HEAD`,`OPTIONS`,`PUT`,`DELETE`,`TRACE`],statusCodes:h??[500,502,503,504,429],errorCodes:p??[`ECONNRESET`,`ECONNREFUSED`,`ENOTFOUND`,`ENETDOWN`,`ENETUNREACH`,`EHOSTDOWN`,`EHOSTUNREACH`,`EPIPE`,`UND_ERR_SOCKET`]},this.retryCount=0,this.retryCountCheckpoint=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(e=>{this.aborted=!0,this.abort?this.abort(e):this.reason=e})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,t,n){this.handler.onUpgrade&&this.handler.onUpgrade(e,t,n)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[i](e,{state:t,opts:n},r){let{statusCode:i,code:a,headers:o}=e,{method:s,retryOptions:c}=n,{maxRetries:l,minTimeout:d,maxTimeout:f,timeoutFactor:p,statusCodes:m,errorCodes:h,methods:g}=c,{counter:v}=t;if(a&&a!==`UND_ERR_REQ_RETRY`&&!h.includes(a)){r(e);return}if(Array.isArray(g)&&!g.includes(s)){r(e);return}if(i!=null&&Array.isArray(m)&&!m.includes(i)){r(e);return}if(v>l){r(e);return}let y=o?.[`retry-after`];y&&=(y=Number(y),Number.isNaN(y)?u(y):y*1e3);let b=Math.min(y>0?y:d*p**(v-1),f);setTimeout(()=>r(null),b)}onHeaders(e,t,n,i){let o=s(t);if(this.retryCount+=1,e>=300)return this.retryOpts.statusCodes.includes(e)===!1?this.handler.onHeaders(e,t,n,i):(this.abort(new a(`Request failed`,e,{headers:o,data:{count:this.retryCount}})),!1);if(this.resume!=null){if(this.resume=null,e!==206&&(this.start>0||e!==200))return this.abort(new a(`server does not support the range header and the payload was partially consumed`,e,{headers:o,data:{count:this.retryCount}})),!1;let t=c(o[`content-range`]);if(!t)return this.abort(new a(`Content-Range mismatch`,e,{headers:o,data:{count:this.retryCount}})),!1;if(this.etag!=null&&this.etag!==o.etag)return this.abort(new a(`ETag mismatch`,e,{headers:o,data:{count:this.retryCount}})),!1;let{start:i,size:s,end:l=s-1}=t;return r(this.start===i,`content-range mismatch`),r(this.end==null||this.end===l,`content-range mismatch`),this.resume=n,!0}if(this.end==null){if(e===206){let a=c(o[`content-range`]);if(a==null)return this.handler.onHeaders(e,t,n,i);let{start:s,size:l,end:u=l-1}=a;r(s!=null&&Number.isFinite(s),`content-range mismatch`),r(u!=null&&Number.isFinite(u),`invalid content-length`),this.start=s,this.end=u}if(this.end==null){let e=o[`content-length`];this.end=e==null?null:Number(e)-1}return r(Number.isFinite(this.start)),r(this.end==null||Number.isFinite(this.end),`invalid content-length`),this.resume=n,this.etag=o.etag==null?null:o.etag,this.etag!=null&&this.etag.startsWith(`W/`)&&(this.etag=null),this.handler.onHeaders(e,t,n,i)}let l=new a(`Request failed`,e,{headers:o,data:{count:this.retryCount}});return this.abort(l),!1}onData(e){return this.start+=e.length,this.handler.onData(e)}onComplete(e){return this.retryCount=0,this.handler.onComplete(e)}onError(e){if(this.aborted||o(this.opts.body))return this.handler.onError(e);this.retryCount-this.retryCountCheckpoint>0?this.retryCount=this.retryCountCheckpoint+(this.retryCount-this.retryCountCheckpoint):this.retryCount+=1,this.retryOpts.retry(e,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},t.bind(this));function t(e){if(e!=null||this.aborted||o(this.opts.body))return this.handler.onError(e);if(this.start!==0){let e={range:`bytes=${this.start}-${this.end??``}`};this.etag!=null&&(e[`if-match`]=this.etag),this.opts={...this.opts,headers:{...this.opts.headers,...e}}}try{this.retryCountCheckpoint=this.retryCount,this.dispatch(this.opts,this)}catch(e){this.handler.onError(e)}}}}})),en=i(((e,t)=>{let n=St(),r=$t();t.exports=class extends n{#e=null;#t=null;constructor(e,t={}){super(t),this.#e=e,this.#t=t}dispatch(e,t){let n=new r({...e,retryOptions:this.#t},{dispatch:this.#e.dispatch.bind(this.#e),handler:t});return this.#e.dispatch(e,n)}close(){return this.#e.close()}destroy(){return this.#e.destroy()}}})),tn=i(((e,n)=>{let r=t(`node:assert`),{Readable:i}=t(`node:stream`),{RequestAbortedError:a,NotSupportedError:o,InvalidArgumentError:s,AbortError:c}=gt(),l=yt(),{ReadableStreamFrom:u}=yt(),d=Symbol(`kConsume`),f=Symbol(`kReading`),p=Symbol(`kBody`),m=Symbol(`kAbort`),h=Symbol(`kContentType`),g=Symbol(`kContentLength`),v=()=>{};var y=class extends i{constructor({resume:e,abort:t,contentType:n=``,contentLength:r,highWaterMark:i=64*1024}){super({autoDestroy:!0,read:e,highWaterMark:i}),this._readableState.dataEmitted=!1,this[m]=t,this[d]=null,this[p]=null,this[h]=n,this[g]=r,this[f]=!1}destroy(e){return!e&&!this._readableState.endEmitted&&(e=new a),e&&this[m](),super.destroy(e)}_destroy(e,t){this[f]?t(e):setImmediate(()=>{t(e)})}on(e,...t){return(e===`data`||e===`readable`)&&(this[f]=!0),super.on(e,...t)}addListener(e,...t){return this.on(e,...t)}off(e,...t){let n=super.off(e,...t);return(e===`data`||e===`readable`)&&(this[f]=this.listenerCount(`data`)>0||this.listenerCount(`readable`)>0),n}removeListener(e,...t){return this.off(e,...t)}push(e){return this[d]&&e!==null?(D(this[d],e),this[f]?super.push(e):!0):super.push(e)}async text(){return S(this,`text`)}async json(){return S(this,`json`)}async blob(){return S(this,`blob`)}async bytes(){return S(this,`bytes`)}async arrayBuffer(){return S(this,`arrayBuffer`)}async formData(){throw new o}get bodyUsed(){return l.isDisturbed(this)}get body(){return this[p]||(this[p]=u(this),this[d]&&(this[p].getReader(),r(this[p].locked))),this[p]}async dump(e){let t=Number.isFinite(e?.limit)?e.limit:128*1024,n=e?.signal;if(n!=null&&(typeof n!=`object`||!(`aborted`in n)))throw new s(`signal must be an AbortSignal`);return n?.throwIfAborted(),this._readableState.closeEmitted?null:await new Promise((e,r)=>{this[g]>t&&this.destroy(new c);let i=()=>{this.destroy(n.reason??new c)};n?.addEventListener(`abort`,i),this.on(`close`,function(){n?.removeEventListener(`abort`,i),n?.aborted?r(n.reason??new c):e(null)}).on(`error`,v).on(`data`,function(e){t-=e.length,t<=0&&this.destroy()}).resume()})}};function b(e){return e[p]&&e[p].locked===!0||e[d]}function x(e){return l.isDisturbed(e)||b(e)}async function S(e,t){return r(!e[d]),new Promise((n,r)=>{if(x(e)){let t=e._readableState;t.destroyed&&t.closeEmitted===!1?e.on(`error`,e=>{r(e)}).on(`close`,()=>{r(TypeError(`unusable`))}):r(t.errored??TypeError(`unusable`))}else queueMicrotask(()=>{e[d]={type:t,stream:e,resolve:n,reject:r,length:0,body:[]},e.on(`error`,function(e){O(this[d],e)}).on(`close`,function(){this[d].body!==null&&O(this[d],new a)}),C(e[d])})})}function C(e){if(e.body===null)return;let{_readableState:t}=e.stream;if(t.bufferIndex){let n=t.bufferIndex,r=t.buffer.length;for(let i=n;i2&&n[0]===239&&n[1]===187&&n[2]===191?3:0;return n.utf8Slice(i,r)}function T(e,t){if(e.length===0||t===0)return new Uint8Array;if(e.length===1)return new Uint8Array(e[0]);let n=new Uint8Array(Buffer.allocUnsafeSlow(t).buffer),r=0;for(let t=0;t{let r=t(`node:assert`),{ResponseStatusCodeError:i}=gt(),{chunksDecode:a}=tn();async function o({callback:e,body:t,contentType:n,statusCode:o,statusMessage:l,headers:u}){r(t);let d=[],f=0;try{for await(let e of t)if(d.push(e),f+=e.length,f>131072){d=[],f=0;break}}catch{d=[],f=0}let p=`Response status code ${o}${l?`: ${l}`:``}`;if(o===204||!n||!f){queueMicrotask(()=>e(new i(p,o,u)));return}let m=Error.stackTraceLimit;Error.stackTraceLimit=0;let h;try{s(n)?h=JSON.parse(a(d,f)):c(n)&&(h=a(d,f))}catch{}finally{Error.stackTraceLimit=m}queueMicrotask(()=>e(new i(p,o,u,h)))}let s=e=>e.length>15&&e[11]===`/`&&e[0]===`a`&&e[1]===`p`&&e[2]===`p`&&e[3]===`l`&&e[4]===`i`&&e[5]===`c`&&e[6]===`a`&&e[7]===`t`&&e[8]===`i`&&e[9]===`o`&&e[10]===`n`&&e[12]===`j`&&e[13]===`s`&&e[14]===`o`&&e[15]===`n`,c=e=>e.length>4&&e[4]===`/`&&e[0]===`t`&&e[1]===`e`&&e[2]===`x`&&e[3]===`t`;n.exports={getResolveErrorBodyCallback:o,isContentTypeApplicationJson:s,isContentTypeText:c}})),rn=i(((e,n)=>{let r=t(`node:assert`),{Readable:i}=tn(),{InvalidArgumentError:a,RequestAbortedError:o}=gt(),s=yt(),{getResolveErrorBodyCallback:c}=nn(),{AsyncResource:l}=t(`node:async_hooks`);var u=class extends l{constructor(e,t){if(!e||typeof e!=`object`)throw new a(`invalid opts`);let{signal:n,method:r,opaque:i,body:c,onInfo:l,responseHeaders:u,throwOnError:d,highWaterMark:f}=e;try{if(typeof t!=`function`)throw new a(`invalid callback`);if(f&&(typeof f!=`number`||f<0))throw new a(`invalid highWaterMark`);if(n&&typeof n.on!=`function`&&typeof n.addEventListener!=`function`)throw new a(`signal must be an EventEmitter or EventTarget`);if(r===`CONNECT`)throw new a(`invalid method`);if(l&&typeof l!=`function`)throw new a(`invalid onInfo callback`);super(`UNDICI_REQUEST`)}catch(e){throw s.isStream(c)&&s.destroy(c.on(`error`,s.nop),e),e}this.method=r,this.responseHeaders=u||null,this.opaque=i||null,this.callback=t,this.res=null,this.abort=null,this.body=c,this.trailers={},this.context=null,this.onInfo=l||null,this.throwOnError=d,this.highWaterMark=f,this.signal=n,this.reason=null,this.removeAbortListener=null,s.isStream(c)&&c.on(`error`,e=>{this.onError(e)}),this.signal&&(this.signal.aborted?this.reason=this.signal.reason??new o:this.removeAbortListener=s.addAbortListener(this.signal,()=>{this.reason=this.signal.reason??new o,this.res?s.destroy(this.res.on(`error`,s.nop),this.reason):this.abort&&this.abort(this.reason),this.removeAbortListener&&=(this.res?.off(`close`,this.removeAbortListener),this.removeAbortListener(),null)}))}onConnect(e,t){if(this.reason){e(this.reason);return}r(this.callback),this.abort=e,this.context=t}onHeaders(e,t,n,r){let{callback:a,opaque:o,abort:l,context:u,responseHeaders:d,highWaterMark:f}=this,p=d===`raw`?s.parseRawHeaders(t):s.parseHeaders(t);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:p});return}let m=d===`raw`?s.parseHeaders(t):p,h=m[`content-type`],g=m[`content-length`],v=new i({resume:n,abort:l,contentType:h,contentLength:this.method!==`HEAD`&&g?Number(g):null,highWaterMark:f});this.removeAbortListener&&v.on(`close`,this.removeAbortListener),this.callback=null,this.res=v,a!==null&&(this.throwOnError&&e>=400?this.runInAsyncScope(c,null,{callback:a,body:v,contentType:h,statusCode:e,statusMessage:r,headers:p}):this.runInAsyncScope(a,null,null,{statusCode:e,headers:p,trailers:this.trailers,opaque:o,body:v,context:u}))}onData(e){return this.res.push(e)}onComplete(e){s.parseHeaders(e,this.trailers),this.res.push(null)}onError(e){let{res:t,callback:n,body:r,opaque:i}=this;n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:i})})),t&&(this.res=null,queueMicrotask(()=>{s.destroy(t,e)})),r&&(this.body=null,s.destroy(r,e)),this.removeAbortListener&&=(t?.off(`close`,this.removeAbortListener),this.removeAbortListener(),null)}};function d(e,t){if(t===void 0)return new Promise((t,n)=>{d.call(this,e,(e,r)=>e?n(e):t(r))});try{this.dispatch(e,new u(e,t))}catch(n){if(typeof t!=`function`)throw n;let r=e?.opaque;queueMicrotask(()=>t(n,{opaque:r}))}}n.exports=d,n.exports.RequestHandler=u})),an=i(((e,t)=>{let{addAbortListener:n}=yt(),{RequestAbortedError:r}=gt(),i=Symbol(`kListener`),a=Symbol(`kSignal`);function o(e){e.abort?e.abort(e[a]?.reason):e.reason=e[a]?.reason??new r,c(e)}function s(e,t){if(e.reason=null,e[a]=null,e[i]=null,t){if(t.aborted){o(e);return}e[a]=t,e[i]=()=>{o(e)},n(e[a],e[i])}}function c(e){e[a]&&(`removeEventListener`in e[a]?e[a].removeEventListener(`abort`,e[i]):e[a].removeListener(`abort`,e[i]),e[a]=null,e[i]=null)}t.exports={addSignal:s,removeSignal:c}})),on=i(((e,n)=>{let r=t(`node:assert`),{finished:i,PassThrough:a}=t(`node:stream`),{InvalidArgumentError:o,InvalidReturnValueError:s}=gt(),c=yt(),{getResolveErrorBodyCallback:l}=nn(),{AsyncResource:u}=t(`node:async_hooks`),{addSignal:d,removeSignal:f}=an();var p=class extends u{constructor(e,t,n){if(!e||typeof e!=`object`)throw new o(`invalid opts`);let{signal:r,method:i,opaque:a,body:s,onInfo:l,responseHeaders:u,throwOnError:f}=e;try{if(typeof n!=`function`)throw new o(`invalid callback`);if(typeof t!=`function`)throw new o(`invalid factory`);if(r&&typeof r.on!=`function`&&typeof r.addEventListener!=`function`)throw new o(`signal must be an EventEmitter or EventTarget`);if(i===`CONNECT`)throw new o(`invalid method`);if(l&&typeof l!=`function`)throw new o(`invalid onInfo callback`);super(`UNDICI_STREAM`)}catch(e){throw c.isStream(s)&&c.destroy(s.on(`error`,c.nop),e),e}this.responseHeaders=u||null,this.opaque=a||null,this.factory=t,this.callback=n,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=s,this.onInfo=l||null,this.throwOnError=f||!1,c.isStream(s)&&s.on(`error`,e=>{this.onError(e)}),d(this,r)}onConnect(e,t){if(this.reason){e(this.reason);return}r(this.callback),this.abort=e,this.context=t}onHeaders(e,t,n,r){let{factory:o,opaque:u,context:d,callback:f,responseHeaders:p}=this,m=p===`raw`?c.parseRawHeaders(t):c.parseHeaders(t);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:m});return}this.factory=null;let h;if(this.throwOnError&&e>=400){let n=(p===`raw`?c.parseHeaders(t):m)[`content-type`];h=new a,this.callback=null,this.runInAsyncScope(l,null,{callback:f,body:h,contentType:n,statusCode:e,statusMessage:r,headers:m})}else{if(o===null)return;if(h=this.runInAsyncScope(o,null,{statusCode:e,headers:m,opaque:u,context:d}),!h||typeof h.write!=`function`||typeof h.end!=`function`||typeof h.on!=`function`)throw new s(`expected Writable`);i(h,{readable:!1},e=>{let{callback:t,res:n,opaque:r,trailers:i,abort:a}=this;this.res=null,(e||!n.readable)&&c.destroy(n,e),this.callback=null,this.runInAsyncScope(t,null,e||null,{opaque:r,trailers:i}),e&&a()})}return h.on(`drain`,n),this.res=h,(h.writableNeedDrain===void 0?h._writableState?.needDrain:h.writableNeedDrain)!==!0}onData(e){let{res:t}=this;return t?t.write(e):!0}onComplete(e){let{res:t}=this;f(this),t&&(this.trailers=c.parseHeaders(e),t.end())}onError(e){let{res:t,callback:n,opaque:r,body:i}=this;f(this),this.factory=null,t?(this.res=null,c.destroy(t,e)):n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:r})})),i&&(this.body=null,c.destroy(i,e))}};function m(e,t,n){if(n===void 0)return new Promise((n,r)=>{m.call(this,e,t,(e,t)=>e?r(e):n(t))});try{this.dispatch(e,new p(e,t,n))}catch(t){if(typeof n!=`function`)throw t;let r=e?.opaque;queueMicrotask(()=>n(t,{opaque:r}))}}n.exports=m})),sn=i(((e,n)=>{let{Readable:r,Duplex:i,PassThrough:a}=t(`node:stream`),{InvalidArgumentError:o,InvalidReturnValueError:s,RequestAbortedError:c}=gt(),l=yt(),{AsyncResource:u}=t(`node:async_hooks`),{addSignal:d,removeSignal:f}=an(),p=t(`node:assert`),m=Symbol(`resume`);var h=class extends r{constructor(){super({autoDestroy:!0}),this[m]=null}_read(){let{[m]:e}=this;e&&(this[m]=null,e())}_destroy(e,t){this._read(),t(e)}},g=class extends r{constructor(e){super({autoDestroy:!0}),this[m]=e}_read(){this[m]()}_destroy(e,t){!e&&!this._readableState.endEmitted&&(e=new c),t(e)}},v=class extends u{constructor(e,t){if(!e||typeof e!=`object`)throw new o(`invalid opts`);if(typeof t!=`function`)throw new o(`invalid handler`);let{signal:n,method:r,opaque:a,onInfo:s,responseHeaders:u}=e;if(n&&typeof n.on!=`function`&&typeof n.addEventListener!=`function`)throw new o(`signal must be an EventEmitter or EventTarget`);if(r===`CONNECT`)throw new o(`invalid method`);if(s&&typeof s!=`function`)throw new o(`invalid onInfo callback`);super(`UNDICI_PIPELINE`),this.opaque=a||null,this.responseHeaders=u||null,this.handler=t,this.abort=null,this.context=null,this.onInfo=s||null,this.req=new h().on(`error`,l.nop),this.ret=new i({readableObjectMode:e.objectMode,autoDestroy:!0,read:()=>{let{body:e}=this;e?.resume&&e.resume()},write:(e,t,n)=>{let{req:r}=this;r.push(e,t)||r._readableState.destroyed?n():r[m]=n},destroy:(e,t)=>{let{body:n,req:r,res:i,ret:a,abort:o}=this;!e&&!a._readableState.endEmitted&&(e=new c),o&&e&&o(),l.destroy(n,e),l.destroy(r,e),l.destroy(i,e),f(this),t(e)}}).on(`prefinish`,()=>{let{req:e}=this;e.push(null)}),this.res=null,d(this,n)}onConnect(e,t){let{ret:n,res:r}=this;if(this.reason){e(this.reason);return}p(!r,`pipeline cannot be retried`),p(!n.destroyed),this.abort=e,this.context=t}onHeaders(e,t,n){let{opaque:r,handler:i,context:a}=this;if(e<200){if(this.onInfo){let n=this.responseHeaders===`raw`?l.parseRawHeaders(t):l.parseHeaders(t);this.onInfo({statusCode:e,headers:n})}return}this.res=new g(n);let o;try{this.handler=null;let n=this.responseHeaders===`raw`?l.parseRawHeaders(t):l.parseHeaders(t);o=this.runInAsyncScope(i,null,{statusCode:e,headers:n,opaque:r,body:this.res,context:a})}catch(e){throw this.res.on(`error`,l.nop),e}if(!o||typeof o.on!=`function`)throw new s(`expected Readable`);o.on(`data`,e=>{let{ret:t,body:n}=this;!t.push(e)&&n.pause&&n.pause()}).on(`error`,e=>{let{ret:t}=this;l.destroy(t,e)}).on(`end`,()=>{let{ret:e}=this;e.push(null)}).on(`close`,()=>{let{ret:e}=this;e._readableState.ended||l.destroy(e,new c)}),this.body=o}onData(e){let{res:t}=this;return t.push(e)}onComplete(e){let{res:t}=this;t.push(null)}onError(e){let{ret:t}=this;this.handler=null,l.destroy(t,e)}};function y(e,t){try{let n=new v(e,t);return this.dispatch({...e,body:n.req},n),n.ret}catch(e){return new a().destroy(e)}}n.exports=y})),cn=i(((e,n)=>{let{InvalidArgumentError:r,SocketError:i}=gt(),{AsyncResource:a}=t(`node:async_hooks`),o=yt(),{addSignal:s,removeSignal:c}=an(),l=t(`node:assert`);var u=class extends a{constructor(e,t){if(!e||typeof e!=`object`)throw new r(`invalid opts`);if(typeof t!=`function`)throw new r(`invalid callback`);let{signal:n,opaque:i,responseHeaders:a}=e;if(n&&typeof n.on!=`function`&&typeof n.addEventListener!=`function`)throw new r(`signal must be an EventEmitter or EventTarget`);super(`UNDICI_UPGRADE`),this.responseHeaders=a||null,this.opaque=i||null,this.callback=t,this.abort=null,this.context=null,s(this,n)}onConnect(e,t){if(this.reason){e(this.reason);return}l(this.callback),this.abort=e,this.context=null}onHeaders(){throw new i(`bad upgrade`,null)}onUpgrade(e,t,n){l(e===101);let{callback:r,opaque:i,context:a}=this;c(this),this.callback=null;let s=this.responseHeaders===`raw`?o.parseRawHeaders(t):o.parseHeaders(t);this.runInAsyncScope(r,null,null,{headers:s,socket:n,opaque:i,context:a})}onError(e){let{callback:t,opaque:n}=this;c(this),t&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(t,null,e,{opaque:n})}))}};function d(e,t){if(t===void 0)return new Promise((t,n)=>{d.call(this,e,(e,r)=>e?n(e):t(r))});try{let n=new u(e,t);this.dispatch({...e,method:e.method||`GET`,upgrade:e.protocol||`Websocket`},n)}catch(n){if(typeof t!=`function`)throw n;let r=e?.opaque;queueMicrotask(()=>t(n,{opaque:r}))}}n.exports=d})),ln=i(((e,n)=>{let r=t(`node:assert`),{AsyncResource:i}=t(`node:async_hooks`),{InvalidArgumentError:a,SocketError:o}=gt(),s=yt(),{addSignal:c,removeSignal:l}=an();var u=class extends i{constructor(e,t){if(!e||typeof e!=`object`)throw new a(`invalid opts`);if(typeof t!=`function`)throw new a(`invalid callback`);let{signal:n,opaque:r,responseHeaders:i}=e;if(n&&typeof n.on!=`function`&&typeof n.addEventListener!=`function`)throw new a(`signal must be an EventEmitter or EventTarget`);super(`UNDICI_CONNECT`),this.opaque=r||null,this.responseHeaders=i||null,this.callback=t,this.abort=null,c(this,n)}onConnect(e,t){if(this.reason){e(this.reason);return}r(this.callback),this.abort=e,this.context=t}onHeaders(){throw new o(`bad connect`,null)}onUpgrade(e,t,n){let{callback:r,opaque:i,context:a}=this;l(this),this.callback=null;let o=t;o!=null&&(o=this.responseHeaders===`raw`?s.parseRawHeaders(t):s.parseHeaders(t)),this.runInAsyncScope(r,null,null,{statusCode:e,headers:o,socket:n,opaque:i,context:a})}onError(e){let{callback:t,opaque:n}=this;l(this),t&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(t,null,e,{opaque:n})}))}};function d(e,t){if(t===void 0)return new Promise((t,n)=>{d.call(this,e,(e,r)=>e?n(e):t(r))});try{let n=new u(e,t);this.dispatch({...e,method:`CONNECT`},n)}catch(n){if(typeof t!=`function`)throw n;let r=e?.opaque;queueMicrotask(()=>t(n,{opaque:r}))}}n.exports=d})),un=i(((e,t)=>{t.exports.request=rn(),t.exports.stream=on(),t.exports.pipeline=sn(),t.exports.upgrade=cn(),t.exports.connect=ln()})),dn=i(((e,t)=>{let{UndiciError:n}=gt(),r=Symbol.for(`undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED`);t.exports={MockNotMatchedError:class e extends n{constructor(t){super(t),Error.captureStackTrace(this,e),this.name=`MockNotMatchedError`,this.message=t||`The request does not match any registered mock dispatches`,this.code=`UND_MOCK_ERR_MOCK_NOT_MATCHED`}static[Symbol.hasInstance](e){return e&&e[r]===!0}[r]=!0}}})),fn=i(((e,t)=>{t.exports={kAgent:Symbol(`agent`),kOptions:Symbol(`options`),kFactory:Symbol(`factory`),kDispatches:Symbol(`dispatches`),kDispatchKey:Symbol(`dispatch key`),kDefaultHeaders:Symbol(`default headers`),kDefaultTrailers:Symbol(`default trailers`),kContentLength:Symbol(`content length`),kMockAgent:Symbol(`mock agent`),kMockAgentSet:Symbol(`mock agent set`),kMockAgentGet:Symbol(`mock agent get`),kMockDispatch:Symbol(`mock dispatch`),kClose:Symbol(`close`),kOriginalClose:Symbol(`original agent close`),kOrigin:Symbol(`origin`),kIsMockActive:Symbol(`is mock active`),kNetConnect:Symbol(`net connect`),kGetNetConnect:Symbol(`get net connect`),kConnected:Symbol(`connected`)}})),pn=i(((e,n)=>{let{MockNotMatchedError:r}=dn(),{kDispatches:i,kMockAgent:a,kOriginalDispatch:o,kOrigin:s,kGetNetConnect:c}=fn(),{buildURL:l}=yt(),{STATUS_CODES:u}=t(`node:http`),{types:{isPromise:d}}=t(`node:util`);function f(e,t){return typeof e==`string`?e===t:e instanceof RegExp?e.test(t):typeof e==`function`?e(t)===!0:!1}function p(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e.toLocaleLowerCase(),t]))}function m(e,t){if(Array.isArray(e)){for(let n=0;n!e).filter(({path:e})=>f(v(e),i));if(a.length===0)throw new r(`Mock dispatch not matched for path '${i}'`);if(a=a.filter(({method:e})=>f(e,t.method)),a.length===0)throw new r(`Mock dispatch not matched for method '${t.method}' on path '${i}'`);if(a=a.filter(({body:e})=>e===void 0?!0:f(e,t.body)),a.length===0)throw new r(`Mock dispatch not matched for body '${t.body}' on path '${i}'`);if(a=a.filter(e=>g(e,t.headers)),a.length===0)throw new r(`Mock dispatch not matched for headers '${typeof t.headers==`object`?JSON.stringify(t.headers):t.headers}' on path '${i}'`);return a[0]}function S(e,t,n){let r={timesInvoked:0,times:1,persist:!1,consumed:!1},i=typeof n==`function`?{callback:n}:{...n},a={...r,...t,pending:!0,data:{error:null,...i}};return e.push(a),a}function C(e,t){let n=e.findIndex(e=>e.consumed?y(e,t):!1);n!==-1&&e.splice(n,1)}function w(e){let{path:t,method:n,body:r,headers:i,query:a}=e;return{path:t,method:n,body:r,headers:i,query:a}}function T(e){let t=Object.keys(e),n=[];for(let r=0;r=m,r.pending=p0?setTimeout(()=>{g(this[i])},u):g(this[i]);function g(r,i=o){let l=Array.isArray(e.headers)?h(e.headers):e.headers,u=typeof i==`function`?i({...e,headers:l}):i;if(d(u)){u.then(e=>g(r,e));return}let f=b(u),p=T(s),m=T(c);t.onConnect?.(e=>t.onError(e),null),t.onHeaders?.(a,p,v,E(a)),t.onData?.(Buffer.from(f)),t.onComplete?.(m),C(r,n)}function v(){}return!0}function k(){let e=this[a],t=this[s],n=this[o];return function(i,a){if(e.isMockActive)try{O.call(this,i,a)}catch(o){if(o instanceof r){let s=e[c]();if(s===!1)throw new r(`${o.message}: subsequent request to origin ${t} was not allowed (net.connect disabled)`);if(A(s,t))n.call(this,i,a);else throw new r(`${o.message}: subsequent request to origin ${t} was not allowed (net.connect is not enabled for this origin)`)}else throw o}else n.call(this,i,a)}}function A(e,t){let n=new URL(t);return e===!0?!0:!!(Array.isArray(e)&&e.some(e=>f(e,n.host)))}function j(e){if(e){let{agent:t,...n}=e;return n}}n.exports={getResponseData:b,getMockDispatch:x,addMockDispatch:S,deleteMockDispatch:C,buildKey:w,generateKeyValues:T,matchValue:f,getResponse:D,getStatusText:E,mockDispatch:O,buildMockDispatch:k,checkNetConnect:A,buildMockOptions:j,getHeaderByName:m,buildHeadersFromArray:h}})),mn=i(((e,t)=>{let{getResponseData:n,buildKey:r,addMockDispatch:i}=pn(),{kDispatches:a,kDispatchKey:o,kDefaultHeaders:s,kDefaultTrailers:c,kContentLength:l,kMockDispatch:u}=fn(),{InvalidArgumentError:d}=gt(),{buildURL:f}=yt();var p=class{constructor(e){this[u]=e}delay(e){if(typeof e!=`number`||!Number.isInteger(e)||e<=0)throw new d(`waitInMs must be a valid integer > 0`);return this[u].delay=e,this}persist(){return this[u].persist=!0,this}times(e){if(typeof e!=`number`||!Number.isInteger(e)||e<=0)throw new d(`repeatTimes must be a valid integer > 0`);return this[u].times=e,this}},m=class{constructor(e,t){if(typeof e!=`object`)throw new d(`opts must be an object`);if(e.path===void 0)throw new d(`opts.path must be defined`);if(e.method===void 0&&(e.method=`GET`),typeof e.path==`string`)if(e.query)e.path=f(e.path,e.query);else{let t=new URL(e.path,`data://`);e.path=t.pathname+t.search}typeof e.method==`string`&&(e.method=e.method.toUpperCase()),this[o]=r(e),this[a]=t,this[s]={},this[c]={},this[l]=!1}createMockScopeDispatchData({statusCode:e,data:t,responseOptions:r}){let i=n(t),a=this[l]?{"content-length":i.length}:{};return{statusCode:e,data:t,headers:{...this[s],...a,...r.headers},trailers:{...this[c],...r.trailers}}}validateReplyParameters(e){if(e.statusCode===void 0)throw new d(`statusCode must be defined`);if(typeof e.responseOptions!=`object`||e.responseOptions===null)throw new d(`responseOptions must be an object`)}reply(e){if(typeof e==`function`)return new p(i(this[a],this[o],t=>{let n=e(t);if(typeof n!=`object`||!n)throw new d(`reply options callback must return an object`);let r={data:``,responseOptions:{},...n};return this.validateReplyParameters(r),{...this.createMockScopeDispatchData(r)}}));let t={statusCode:e,data:arguments[1]===void 0?``:arguments[1],responseOptions:arguments[2]===void 0?{}:arguments[2]};this.validateReplyParameters(t);let n=this.createMockScopeDispatchData(t);return new p(i(this[a],this[o],n))}replyWithError(e){if(e===void 0)throw new d(`error must be defined`);return new p(i(this[a],this[o],{error:e}))}defaultReplyHeaders(e){if(e===void 0)throw new d(`headers must be defined`);return this[s]=e,this}defaultReplyTrailers(e){if(e===void 0)throw new d(`trailers must be defined`);return this[c]=e,this}replyContentLength(){return this[l]=!0,this}};t.exports.MockInterceptor=m,t.exports.MockScope=p})),hn=i(((e,n)=>{let{promisify:r}=t(`node:util`),i=Wt(),{buildMockDispatch:a}=pn(),{kDispatches:o,kMockAgent:s,kClose:c,kOriginalClose:l,kOrigin:u,kOriginalDispatch:d,kConnected:f}=fn(),{MockInterceptor:p}=mn(),m=ht(),{InvalidArgumentError:h}=gt();n.exports=class extends i{constructor(e,t){if(super(e,t),!t||!t.agent||typeof t.agent.dispatch!=`function`)throw new h(`Argument opts.agent must implement Agent`);this[s]=t.agent,this[u]=e,this[o]=[],this[f]=1,this[d]=this.dispatch,this[l]=this.close.bind(this),this.dispatch=a.call(this),this.close=this[c]}get[m.kConnected](){return this[f]}intercept(e){return new p(e,this[o])}async[c](){await r(this[l])(),this[f]=0,this[s][m.kClients].delete(this[u])}}})),gn=i(((e,n)=>{let{promisify:r}=t(`node:util`),i=Jt(),{buildMockDispatch:a}=pn(),{kDispatches:o,kMockAgent:s,kClose:c,kOriginalClose:l,kOrigin:u,kOriginalDispatch:d,kConnected:f}=fn(),{MockInterceptor:p}=mn(),m=ht(),{InvalidArgumentError:h}=gt();n.exports=class extends i{constructor(e,t){if(super(e,t),!t||!t.agent||typeof t.agent.dispatch!=`function`)throw new h(`Argument opts.agent must implement Agent`);this[s]=t.agent,this[u]=e,this[o]=[],this[f]=1,this[d]=this.dispatch,this[l]=this.close.bind(this),this.dispatch=a.call(this),this.close=this[c]}get[m.kConnected](){return this[f]}intercept(e){return new p(e,this[o])}async[c](){await r(this[l])(),this[f]=0,this[s][m.kClients].delete(this[u])}}})),_n=i(((e,t)=>{let n={pronoun:`it`,is:`is`,was:`was`,this:`this`},r={pronoun:`they`,is:`are`,was:`were`,this:`these`};t.exports=class{constructor(e,t){this.singular=e,this.plural=t}pluralize(e){let t=e===1,i=t?n:r,a=t?this.singular:this.plural;return{...i,count:e,noun:a}}}})),vn=i(((e,n)=>{let{Transform:r}=t(`node:stream`),{Console:i}=t(`node:console`),a=process.versions.icu?`✅`:`Y `,o=process.versions.icu?`❌`:`N `;n.exports=class{constructor({disableColors:e}={}){this.transform=new r({transform(e,t,n){n(null,e)}}),this.logger=new i({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){let t=e.map(({method:e,path:t,data:{statusCode:n},persist:r,times:i,timesInvoked:s,origin:c})=>({Method:e,Origin:c,Path:t,"Status code":n,Persistent:r?a:o,Invocations:s,Remaining:r?1/0:i-s}));return this.logger.table(t),this.transform.read().toString()}}})),yn=i(((e,t)=>{let{kClients:n}=ht(),r=Xt(),{kAgent:i,kMockAgentSet:a,kMockAgentGet:o,kDispatches:s,kIsMockActive:c,kNetConnect:l,kGetNetConnect:u,kOptions:d,kFactory:f}=fn(),p=hn(),m=gn(),{matchValue:h,buildMockOptions:g}=pn(),{InvalidArgumentError:v,UndiciError:y}=gt(),b=St(),x=_n(),S=vn();t.exports=class extends b{constructor(e){if(super(e),this[l]=!0,this[c]=!0,e?.agent&&typeof e.agent.dispatch!=`function`)throw new v(`Argument opts.agent must implement Agent`);let t=e?.agent?e.agent:new r(e);this[i]=t,this[n]=t[n],this[d]=g(e)}get(e){let t=this[o](e);return t||(t=this[f](e),this[a](e,t)),t}dispatch(e,t){return this.get(e.origin),this[i].dispatch(e,t)}async close(){await this[i].close(),this[n].clear()}deactivate(){this[c]=!1}activate(){this[c]=!0}enableNetConnect(e){if(typeof e==`string`||typeof e==`function`||e instanceof RegExp)Array.isArray(this[l])?this[l].push(e):this[l]=[e];else if(e===void 0)this[l]=!0;else throw new v(`Unsupported matcher. Must be one of String|Function|RegExp.`)}disableNetConnect(){this[l]=!1}get isMockActive(){return this[c]}[a](e,t){this[n].set(e,t)}[f](e){let t=Object.assign({agent:this},this[d]);return this[d]&&this[d].connections===1?new p(e,t):new m(e,t)}[o](e){let t=this[n].get(e);if(t)return t;if(typeof e!=`string`){let t=this[f](`http://localhost:9999`);return this[a](e,t),t}for(let[t,r]of Array.from(this[n]))if(r&&typeof t!=`string`&&h(t,e)){let t=this[f](e);return this[a](e,t),t[s]=r[s],t}}[u](){return this[l]}pendingInterceptors(){let e=this[n];return Array.from(e.entries()).flatMap(([e,t])=>t[s].map(t=>({...t,origin:e}))).filter(({pending:e})=>e)}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new S}={}){let t=this.pendingInterceptors();if(t.length===0)return;let n=new x(`interceptor`,`interceptors`).pluralize(t.length);throw new y(` ${n.count} ${n.noun} ${n.is} pending: ${e.format(t)} -`.trim())}}})),vn=i(((e,t)=>{let n=Symbol.for(`undici.globalDispatcher.1`),{InvalidArgumentError:r}=mt(),i=Jt();o()===void 0&&a(new i);function a(e){if(!e||typeof e.dispatch!=`function`)throw new r(`Argument agent must implement Agent`);Object.defineProperty(globalThis,n,{value:e,writable:!0,enumerable:!1,configurable:!1})}function o(){return globalThis[n]}t.exports={setGlobalDispatcher:a,getGlobalDispatcher:o}})),yn=i(((e,t)=>{t.exports=class{#e;constructor(e){if(typeof e!=`object`||!e)throw 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)}}})),bn=i(((e,t)=>{let n=Bt();t.exports=e=>{let t=e?.maxRedirections;return e=>function(r,i){let{maxRedirections:a=t,...o}=r;return a?e(o,new n(e,a,r,i)):e(r,i)}}})),xn=i(((e,t)=>{let n=Zt();t.exports=e=>t=>function(r,i){return t(r,new n({...r,retryOptions:{...e,...r.retryOptions}},{handler:i,dispatch:t}))}})),Sn=i(((e,t)=>{let n=_t(),{InvalidArgumentError:r,RequestAbortedError:i}=mt(),a=yn();var o=class extends a{#e=1024*1024;#t=null;#n=!1;#r=!1;#i=0;#a=null;#o=null;constructor({maxSize:e},t){if(super(t),e!=null&&(!Number.isFinite(e)||e<1))throw new r(`maxSize must be a number greater than 0`);this.#e=e??this.#e,this.#o=t}onConnect(e){this.#t=e,this.#o.onConnect(this.#s.bind(this))}#s(e){this.#r=!0,this.#a=e}onHeaders(e,t,r,a){let o=n.parseHeaders(t)[`content-length`];if(o!=null&&o>this.#e)throw new i(`Response size (${o}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#o.onHeaders(e,t,r,a)}onError(e){this.#n||(e=this.#a??e,this.#o.onError(e))}onData(e){return this.#i+=e.length,this.#i>=this.#e&&(this.#n=!0,this.#r?this.#o.onError(this.#a):this.#o.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#o.onError(this.reason);return}this.#o.onComplete(e)}}};function s({maxSize:e}={maxSize:1024*1024}){return t=>function(n,r){let{dumpMaxSize:i=e}=n;return t(n,new o({maxSize:i},r))}}t.exports=s})),Cn=i(((e,n)=>{let{isIP:r}=t(`node:net`),{lookup:i}=t(`node:dns`),a=yn(),{InvalidArgumentError:o,InformationalError:s}=mt(),c=2**31-1;var l=class{#e=0;#t=0;#n=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#i}get full(){return this.#n.size===this.#t}runLookup(e,t,n){let r=this.#n.get(e.hostname);if(r==null&&this.full){n(null,e.origin);return}let i={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...t.dns,maxTTL:this.#e,maxItems:this.#t};if(r==null)this.lookup(e,i,(t,r)=>{if(t||r==null||r.length===0){n(t??new s(`No DNS entries found`));return}this.setRecords(e,r);let a=this.#n.get(e.hostname),o=this.pick(e,a,i.affinity),c;c=typeof o.port==`number`?`:${o.port}`:e.port===``?``:`:${e.port}`,n(null,`${e.protocol}//${o.family===6?`[${o.address}]`:o.address}${c}`)});else{let a=this.pick(e,r,i.affinity);if(a==null){this.#n.delete(e.hostname),this.runLookup(e,t,n);return}let o;o=typeof a.port==`number`?`:${a.port}`:e.port===``?``:`:${e.port}`,n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${o}`)}}#r(e,t,n){i(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:`ipv4first`},(e,t)=>{if(e)return n(e);let r=new Map;for(let e of t)r.set(`${e.address}:${e.family}`,e);n(null,r.values())})}#i(e,t,n){let r=null,{records:i,offset:a}=t,o;if(this.dualStack?(n??(a==null||a===c?(t.offset=0,n=4):(t.offset++,n=(t.offset&1)==1?6:4)),o=i[n]!=null&&i[n].ips.length>0?i[n]:i[n===4?6:4]):o=i[n],o==null||o.ips.length===0)return r;o.offset==null||o.offset===c?o.offset=0:o.offset++;let s=o.offset%o.ips.length;return r=o.ips[s]??null,r==null?r:Date.now()-r.timestamp>r.ttl?(o.ips.splice(s,1),this.pick(e,t,n)):r}setRecords(e,t){let n=Date.now(),r={records:{4:null,6:null}};for(let e of t){e.timestamp=n,typeof e.ttl==`number`?e.ttl=Math.min(e.ttl,this.#e):e.ttl=this.#e;let t=r.records[e.family]??{ips:[]};t.ips.push(e),r.records[e.family]=t}this.#n.set(e.hostname,r)}getHandler(e,t){return new u(this,e,t)}},u=class extends a{#e=null;#t=null;#n=null;#r=null;#i=null;constructor(e,{origin:t,handler:n,dispatch:r},i){super(n),this.#i=t,this.#r=n,this.#t={...i},this.#e=e,this.#n=r}onError(e){switch(e.code){case`ETIMEDOUT`:case`ECONNREFUSED`:if(this.#e.dualStack){this.#e.runLookup(this.#i,this.#t,(e,t)=>{if(e)return this.#r.onError(e);let n={...this.#t,origin:t};this.#n(n,this)});return}this.#r.onError(e);return;case`ENOTFOUND`:this.#e.deleteRecord(this.#i);default:this.#r.onError(e);break}}};n.exports=e=>{if(e?.maxTTL!=null&&(typeof e?.maxTTL!=`number`||e?.maxTTL<0))throw new o(`Invalid maxTTL. Must be a positive number`);if(e?.maxItems!=null&&(typeof e?.maxItems!=`number`||e?.maxItems<1))throw new o(`Invalid maxItems. Must be a positive number and greater than zero`);if(e?.affinity!=null&&e?.affinity!==4&&e?.affinity!==6)throw new o(`Invalid affinity. Must be either 4 or 6`);if(e?.dualStack!=null&&typeof e?.dualStack!=`boolean`)throw new o(`Invalid dualStack. Must be a boolean`);if(e?.lookup!=null&&typeof e?.lookup!=`function`)throw new o(`Invalid lookup. Must be a function`);if(e?.pick!=null&&typeof e?.pick!=`function`)throw new o(`Invalid pick. Must be a function`);let t=e?.dualStack??!0,n;n=t?e?.affinity??null:e?.affinity??4;let i=new l({maxTTL:e?.maxTTL??1e4,lookup:e?.lookup??null,pick:e?.pick??null,dualStack:t,affinity:n,maxItems:e?.maxItems??1/0});return e=>function(t,n){let a=t.origin.constructor===URL?t.origin:new URL(t.origin);return r(a.hostname)===0?(i.runLookup(a,t,(r,o)=>{if(r)return n.onError(r);let s=null;s={...t,servername:a.hostname,origin:o,headers:{host:a.hostname,...t.headers}},e(s,i.getHandler({origin:a,dispatch:e,handler:n},t))}),!0):e(t,n)}}})),wn=i(((e,n)=>{let{kConstruct:r}=pt(),{kEnumerableProperty:i}=_t(),{iteratorMixin:a,isValidHeaderName:o,isValidHeaderValue:s}=Mt(),{webidl:c}=jt(),l=t(`node:assert`),u=t(`node:util`),d=Symbol(`headers map`),f=Symbol(`headers map sorted`);function p(e){return e===10||e===13||e===9||e===32}function m(e){let t=0,n=e.length;for(;n>t&&p(e.charCodeAt(n-1));)--n;for(;n>t&&p(e.charCodeAt(t));)++t;return t===0&&n===e.length?e:e.substring(t,n)}function h(e,t){if(Array.isArray(t))for(let n=0;n>`,`record`]})}function g(e,t,n){if(n=m(n),!o(t))throw c.errors.invalidArgument({prefix:`Headers.append`,value:t,type:`header name`});if(!s(n))throw c.errors.invalidArgument({prefix:`Headers.append`,value:n,type:`header value`});if(x(e)===`immutable`)throw TypeError(`immutable`);return C(e).append(t,n,!1)}function v(e,t){return e[0]>1),t[s][0]<=c[0]?o=s+1:a=s;if(r!==s){for(i=r;i>o;)t[i]=t[--i];t[o]=c}}if(!n.next().done)throw TypeError(`Unreachable`);return t}else{let e=0;for(let{0:n,1:{value:r}}of this[d])t[e++]=[n,r],l(r!==null);return t.sort(v)}}},b=class e{#e;#t;constructor(e=void 0){c.util.markAsUncloneable(this),e!==r&&(this.#t=new y,this.#e=`none`,e!==void 0&&(e=c.converters.HeadersInit(e,`Headers contructor`,`init`),h(this,e)))}append(t,n){c.brandCheck(this,e),c.argumentLengthCheck(arguments,2,`Headers.append`);let r=`Headers.append`;return t=c.converters.ByteString(t,r,`name`),n=c.converters.ByteString(n,r,`value`),g(this,t,n)}delete(t){if(c.brandCheck(this,e),c.argumentLengthCheck(arguments,1,`Headers.delete`),t=c.converters.ByteString(t,`Headers.delete`,`name`),!o(t))throw c.errors.invalidArgument({prefix:`Headers.delete`,value:t,type:`header name`});if(this.#e===`immutable`)throw TypeError(`immutable`);this.#t.contains(t,!1)&&this.#t.delete(t,!1)}get(t){c.brandCheck(this,e),c.argumentLengthCheck(arguments,1,`Headers.get`);let n=`Headers.get`;if(t=c.converters.ByteString(t,n,`name`),!o(t))throw c.errors.invalidArgument({prefix:n,value:t,type:`header name`});return this.#t.get(t,!1)}has(t){c.brandCheck(this,e),c.argumentLengthCheck(arguments,1,`Headers.has`);let n=`Headers.has`;if(t=c.converters.ByteString(t,n,`name`),!o(t))throw c.errors.invalidArgument({prefix:n,value:t,type:`header name`});return this.#t.contains(t,!1)}set(t,n){c.brandCheck(this,e),c.argumentLengthCheck(arguments,2,`Headers.set`);let r=`Headers.set`;if(t=c.converters.ByteString(t,r,`name`),n=c.converters.ByteString(n,r,`value`),n=m(n),!o(t))throw c.errors.invalidArgument({prefix:r,value:t,type:`header name`});if(!s(n))throw c.errors.invalidArgument({prefix:r,value:n,type:`header value`});if(this.#e===`immutable`)throw TypeError(`immutable`);this.#t.set(t,n,!1)}getSetCookie(){c.brandCheck(this,e);let t=this.#t.cookies;return t?[...t]:[]}get[f](){if(this.#t[f])return this.#t[f];let e=[],t=this.#t.toSortedArray(),n=this.#t.cookies;if(n===null||n.length===1)return this.#t[f]=t;for(let r=0;r>`](e,t,n,r.bind(e)):c.converters[`record`](e,t,n)}throw c.errors.conversionFailed({prefix:`Headers constructor`,argument:`Argument 1`,types:[`sequence>`,`record`]})},n.exports={fill:h,compareHeaderName:v,Headers:b,HeadersList:y,getHeadersGuard:x,setHeadersGuard:S,setHeadersList:w,getHeadersList:C}})),Tn=i(((e,n)=>{let{Headers:r,HeadersList:i,fill:a,getHeadersGuard:o,setHeadersGuard:s,setHeadersList:c}=wn(),{extractBody:l,cloneBody:u,mixinBody:d,hasFinalizationRegistry:f,streamRegistry:p,bodyUnusable:m}=Lt(),h=_t(),g=t(`node:util`),{kEnumerableProperty:v}=h,{isValidReasonPhrase:y,isCancelled:b,isAborted:x,isBlobLike:S,serializeJavascriptValueToJSONString:C,isErrorLike:w,isomorphicEncode:T,environmentSettingsObject:E}=Mt(),{redirectStatusSet:D,nullBodyStatus:O}=Ot(),{kState:k,kHeaders:A}=Nt(),{webidl:j}=jt(),{FormData:M}=Ft(),{URLSerializer:N}=At(),{kConstruct:P}=pt(),F=t(`node:assert`),{types:I}=t(`node:util`),L=new TextEncoder(`utf-8`);var R=class e{static error(){return ie(B(),`immutable`)}static json(e,t={}){j.argumentLengthCheck(arguments,1,`Response.json`),t!==null&&(t=j.converters.ResponseInit(t));let n=l(L.encode(C(e))),r=ie(ee({}),`response`);return H(r,t,{body:n[0],type:`application/json`}),r}static redirect(e,t=302){j.argumentLengthCheck(arguments,1,`Response.redirect`),e=j.converters.USVString(e),t=j.converters[`unsigned short`](t);let n;try{n=new URL(e,E.settingsObject.baseUrl)}catch(t){throw TypeError(`Failed to parse URL from ${e}`,{cause:t})}if(!D.has(t))throw RangeError(`Invalid status code ${t}`);let r=ie(ee({}),`immutable`);r[k].status=t;let i=T(N(n));return r[k].headersList.append(`location`,i,!0),r}constructor(e=null,t={}){if(j.util.markAsUncloneable(this),e===P)return;e!==null&&(e=j.converters.BodyInit(e)),t=j.converters.ResponseInit(t),this[k]=ee({}),this[A]=new r(P),s(this[A],`response`),c(this[A],this[k].headersList);let n=null;if(e!=null){let[t,r]=l(e);n={body:t,type:r}}H(this,t,n)}get type(){return j.brandCheck(this,e),this[k].type}get url(){j.brandCheck(this,e);let t=this[k].urlList,n=t[t.length-1]??null;return n===null?``:N(n,!0)}get redirected(){return j.brandCheck(this,e),this[k].urlList.length>1}get status(){return j.brandCheck(this,e),this[k].status}get ok(){return j.brandCheck(this,e),this[k].status>=200&&this[k].status<=299}get statusText(){return j.brandCheck(this,e),this[k].statusText}get headers(){return j.brandCheck(this,e),this[A]}get body(){return j.brandCheck(this,e),this[k].body?this[k].body.stream:null}get bodyUsed(){return j.brandCheck(this,e),!!this[k].body&&h.isDisturbed(this[k].body.stream)}clone(){if(j.brandCheck(this,e),m(this))throw j.errors.exception({header:`Response.clone`,message:`Body has already been consumed.`});let t=z(this[k]);return f&&this[k].body?.stream&&p.register(this,new WeakRef(this[k].body.stream)),ie(t,o(this[A]))}[g.inspect.custom](e,t){t.depth===null&&(t.depth=2),t.colors??=!0;let n={status:this.status,statusText:this.statusText,headers:this.headers,body:this.body,bodyUsed:this.bodyUsed,ok:this.ok,redirected:this.redirected,type:this.type,url:this.url};return`Response ${g.formatWithOptions(t,n)}`}};d(R),Object.defineProperties(R.prototype,{type:v,url:v,status:v,ok:v,redirected:v,statusText:v,headers:v,clone:v,body:v,bodyUsed:v,[Symbol.toStringTag]:{value:`Response`,configurable:!0}}),Object.defineProperties(R,{json:v,redirect:v,error:v});function z(e){if(e.internalResponse)return ne(z(e.internalResponse),e.type);let t=ee({...e,body:null});return e.body!=null&&(t.body=u(t,e.body)),t}function ee(e){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:`default`,status:200,timingInfo:null,cacheState:``,statusText:``,...e,headersList:e?.headersList?new i(e?.headersList):new i,urlList:e?.urlList?[...e.urlList]:[]}}function B(e){return ee({type:`error`,status:0,error:w(e)?e:Error(e&&String(e)),aborted:e&&e.name===`AbortError`})}function te(e){return e.type===`error`&&e.status===0}function V(e,t){return t={internalResponse:e,...t},new Proxy(e,{get(e,n){return n in t?t[n]:e[n]},set(e,n,r){return F(!(n in t)),e[n]=r,!0}})}function ne(e,t){if(t===`basic`)return V(e,{type:`basic`,headersList:e.headersList});if(t===`cors`)return V(e,{type:`cors`,headersList:e.headersList});if(t===`opaque`)return V(e,{type:`opaque`,urlList:Object.freeze([]),status:0,statusText:``,body:null});if(t===`opaqueredirect`)return V(e,{type:`opaqueredirect`,status:0,statusText:``,headersList:[],body:null});F(!1)}function re(e,t=null){return F(b(e)),x(e)?B(Object.assign(new DOMException(`The operation was aborted.`,`AbortError`),{cause:t})):B(Object.assign(new DOMException(`Request was cancelled.`),{cause:t}))}function H(e,t,n){if(t.status!==null&&(t.status<200||t.status>599))throw RangeError(`init["status"] must be in the range of 200 to 599, inclusive.`);if(`statusText`in t&&t.statusText!=null&&!y(String(t.statusText)))throw TypeError(`Invalid statusText`);if(`status`in t&&t.status!=null&&(e[k].status=t.status),`statusText`in t&&t.statusText!=null&&(e[k].statusText=t.statusText),`headers`in t&&t.headers!=null&&a(e[A],t.headers),n){if(O.includes(e.status))throw j.errors.exception({header:`Response constructor`,message:`Invalid response status code ${e.status}`});e[k].body=n.body,n.type!=null&&!e[k].headersList.contains(`content-type`,!0)&&e[k].headersList.append(`content-type`,n.type,!0)}}function ie(e,t){let n=new R(P);return n[k]=e,n[A]=new r(P),c(n[A],e.headersList),s(n[A],t),f&&e.body?.stream&&p.register(n,new WeakRef(e.body.stream)),n}j.converters.ReadableStream=j.interfaceConverter(ReadableStream),j.converters.FormData=j.interfaceConverter(M),j.converters.URLSearchParams=j.interfaceConverter(URLSearchParams),j.converters.XMLHttpRequestBodyInit=function(e,t,n){return typeof e==`string`?j.converters.USVString(e,t,n):S(e)?j.converters.Blob(e,t,n,{strict:!1}):ArrayBuffer.isView(e)||I.isArrayBuffer(e)?j.converters.BufferSource(e,t,n):h.isFormDataLike(e)?j.converters.FormData(e,t,n,{strict:!1}):e instanceof URLSearchParams?j.converters.URLSearchParams(e,t,n):j.converters.DOMString(e,t,n)},j.converters.BodyInit=function(e,t,n){return e instanceof ReadableStream?j.converters.ReadableStream(e,t,n):e?.[Symbol.asyncIterator]?e:j.converters.XMLHttpRequestBodyInit(e,t,n)},j.converters.ResponseInit=j.dictionaryConverter([{key:`status`,converter:j.converters[`unsigned short`],defaultValue:()=>200},{key:`statusText`,converter:j.converters.ByteString,defaultValue:()=>``},{key:`headers`,converter:j.converters.HeadersInit}]),n.exports={isNetworkError:te,makeNetworkError:B,makeResponse:ee,makeAppropriateNetworkError:re,filterResponse:ne,Response:R,cloneResponse:z,fromInnerResponse:ie}})),En=i(((e,t)=>{let{kConnected:n,kSize:r}=pt();var i=class{constructor(e){this.value=e}deref(){return this.value[n]===0&&this.value[r]===0?void 0:this.value}},a=class{constructor(e){this.finalizer=e}register(e,t){e.on&&e.on(`disconnect`,()=>{e[n]===0&&e[r]===0&&this.finalizer(t)})}unregister(e){}};t.exports=function(){return process.env.NODE_V8_COVERAGE&&process.version.startsWith(`v18`)?(process._rawDebug(`Using compatibility WeakRef and FinalizationRegistry`),{WeakRef:i,FinalizationRegistry:a}):{WeakRef,FinalizationRegistry}}})),Dn=i(((e,n)=>{let{extractBody:r,mixinBody:i,cloneBody:a,bodyUnusable:o}=Lt(),{Headers:s,fill:c,HeadersList:l,setHeadersGuard:u,getHeadersGuard:d,setHeadersList:f,getHeadersList:p}=wn(),{FinalizationRegistry:m}=En()(),h=_t(),g=t(`node:util`),{isValidHTTPToken:v,sameOrigin:y,environmentSettingsObject:b}=Mt(),{forbiddenMethodsSet:x,corsSafeListedMethodsSet:S,referrerPolicy:C,requestRedirect:w,requestMode:T,requestCredentials:E,requestCache:D,requestDuplex:O}=Ot(),{kEnumerableProperty:k,normalizedMethodRecordsBase:A,normalizedMethodRecords:j}=h,{kHeaders:M,kSignal:N,kState:P,kDispatcher:F}=Nt(),{webidl:I}=jt(),{URLSerializer:L}=At(),{kConstruct:R}=pt(),z=t(`node:assert`),{getMaxListeners:ee,setMaxListeners:B,getEventListeners:te,defaultMaxListeners:V}=t(`node:events`),ne=Symbol(`abortController`),re=new m(({signal:e,abort:t})=>{e.removeEventListener(`abort`,t)}),H=new WeakMap;function ie(e){return t;function t(){let n=e.deref();if(n!==void 0){re.unregister(t),this.removeEventListener(`abort`,t),n.abort(this.reason);let e=H.get(n.signal);if(e!==void 0){if(e.size!==0){for(let t of e){let e=t.deref();e!==void 0&&e.abort(this.reason)}e.clear()}H.delete(n.signal)}}}}let ae=!1;var oe=class e{constructor(t,n={}){if(I.util.markAsUncloneable(this),t===R)return;let i=`Request constructor`;I.argumentLengthCheck(arguments,1,i),t=I.converters.RequestInfo(t,i,`input`),n=I.converters.RequestInit(n,i,`init`);let a=null,d=null,m=b.settingsObject.baseUrl,g=null;if(typeof t==`string`){this[F]=n.dispatcher;let e;try{e=new URL(t,m)}catch(e){throw TypeError(`Failed to parse URL from `+t,{cause:e})}if(e.username||e.password)throw TypeError(`Request cannot be constructed from a URL that includes credentials: `+t);a=se({urlList:[e]}),d=`cors`}else this[F]=n.dispatcher||t[F],z(t instanceof e),a=t[P],g=t[N];let C=b.settingsObject.origin,w=`client`;if(a.window?.constructor?.name===`EnvironmentSettingsObject`&&y(a.window,C)&&(w=a.window),n.window!=null)throw TypeError(`'window' option '${w}' must be null`);`window`in n&&(w=`no-window`),a=se({method:a.method,headersList:a.headersList,unsafeRequest:a.unsafeRequest,client:b.settingsObject,window:w,priority:a.priority,origin:a.origin,referrer:a.referrer,referrerPolicy:a.referrerPolicy,mode:a.mode,credentials:a.credentials,cache:a.cache,redirect:a.redirect,integrity:a.integrity,keepalive:a.keepalive,reloadNavigation:a.reloadNavigation,historyNavigation:a.historyNavigation,urlList:[...a.urlList]});let T=Object.keys(n).length!==0;if(T&&(a.mode===`navigate`&&(a.mode=`same-origin`),a.reloadNavigation=!1,a.historyNavigation=!1,a.origin=`client`,a.referrer=`client`,a.referrerPolicy=``,a.url=a.urlList[a.urlList.length-1],a.urlList=[a.url]),n.referrer!==void 0){let e=n.referrer;if(e===``)a.referrer=`no-referrer`;else{let t;try{t=new URL(e,m)}catch(t){throw TypeError(`Referrer "${e}" is not a valid URL.`,{cause:t})}t.protocol===`about:`&&t.hostname===`client`||C&&!y(t,b.settingsObject.baseUrl)?a.referrer=`client`:a.referrer=t}}n.referrerPolicy!==void 0&&(a.referrerPolicy=n.referrerPolicy);let E;if(E=n.mode===void 0?d:n.mode,E===`navigate`)throw I.errors.exception({header:`Request constructor`,message:`invalid request mode navigate.`});if(E!=null&&(a.mode=E),n.credentials!==void 0&&(a.credentials=n.credentials),n.cache!==void 0&&(a.cache=n.cache),a.cache===`only-if-cached`&&a.mode!==`same-origin`)throw TypeError(`'only-if-cached' can be set only with 'same-origin' mode`);if(n.redirect!==void 0&&(a.redirect=n.redirect),n.integrity!=null&&(a.integrity=String(n.integrity)),n.keepalive!==void 0&&(a.keepalive=!!n.keepalive),n.method!==void 0){let e=n.method,t=j[e];if(t!==void 0)a.method=t;else{if(!v(e))throw TypeError(`'${e}' is not a valid HTTP method.`);let t=e.toUpperCase();if(x.has(t))throw TypeError(`'${e}' HTTP method is unsupported.`);e=A[t]??e,a.method=e}!ae&&a.method===`patch`&&(process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.",{code:`UNDICI-FETCH-patch`}),ae=!0)}n.signal!==void 0&&(g=n.signal),this[P]=a;let D=new AbortController;if(this[N]=D.signal,g!=null){if(!g||typeof g.aborted!=`boolean`||typeof g.addEventListener!=`function`)throw TypeError(`Failed to construct 'Request': member signal is not of type AbortSignal.`);if(g.aborted)D.abort(g.reason);else{this[ne]=D;let e=ie(new WeakRef(D));try{(typeof ee==`function`&&ee(g)===V||te(g,`abort`).length>=V)&&B(1500,g)}catch{}h.addAbortListener(g,e),re.register(D,{signal:g,abort:e},e)}}if(this[M]=new s(R),f(this[M],a.headersList),u(this[M],`request`),E===`no-cors`){if(!S.has(a.method))throw TypeError(`'${a.method} is unsupported in no-cors mode.`);u(this[M],`request-no-cors`)}if(T){let e=p(this[M]),t=n.headers===void 0?new l(e):n.headers;if(e.clear(),t instanceof l){for(let{name:n,value:r}of t.rawValues())e.append(n,r,!1);e.cookies=t.cookies}else c(this[M],t)}let O=t instanceof e?t[P].body:null;if((n.body!=null||O!=null)&&(a.method===`GET`||a.method===`HEAD`))throw TypeError(`Request with GET/HEAD method cannot have body.`);let k=null;if(n.body!=null){let[e,t]=r(n.body,a.keepalive);k=e,t&&!p(this[M]).contains(`content-type`,!0)&&this[M].append(`content-type`,t)}let L=k??O;if(L!=null&&L.source==null){if(k!=null&&n.duplex==null)throw TypeError(`RequestInit: duplex option is required when sending a body.`);if(a.mode!==`same-origin`&&a.mode!==`cors`)throw TypeError(`If request is made from ReadableStream, mode should be "same-origin" or "cors"`);a.useCORSPreflightFlag=!0}let H=L;if(k==null&&O!=null){if(o(t))throw TypeError(`Cannot construct a Request with a Request object that has already been used.`);let e=new TransformStream;O.stream.pipeThrough(e),H={source:O.source,length:O.length,stream:e.readable}}this[P].body=H}get method(){return I.brandCheck(this,e),this[P].method}get url(){return I.brandCheck(this,e),L(this[P].url)}get headers(){return I.brandCheck(this,e),this[M]}get destination(){return I.brandCheck(this,e),this[P].destination}get referrer(){return I.brandCheck(this,e),this[P].referrer===`no-referrer`?``:this[P].referrer===`client`?`about:client`:this[P].referrer.toString()}get referrerPolicy(){return I.brandCheck(this,e),this[P].referrerPolicy}get mode(){return I.brandCheck(this,e),this[P].mode}get credentials(){return this[P].credentials}get cache(){return I.brandCheck(this,e),this[P].cache}get redirect(){return I.brandCheck(this,e),this[P].redirect}get integrity(){return I.brandCheck(this,e),this[P].integrity}get keepalive(){return I.brandCheck(this,e),this[P].keepalive}get isReloadNavigation(){return I.brandCheck(this,e),this[P].reloadNavigation}get isHistoryNavigation(){return I.brandCheck(this,e),this[P].historyNavigation}get signal(){return I.brandCheck(this,e),this[N]}get body(){return I.brandCheck(this,e),this[P].body?this[P].body.stream:null}get bodyUsed(){return I.brandCheck(this,e),!!this[P].body&&h.isDisturbed(this[P].body.stream)}get duplex(){return I.brandCheck(this,e),`half`}clone(){if(I.brandCheck(this,e),o(this))throw TypeError(`unusable`);let t=ce(this[P]),n=new AbortController;if(this.signal.aborted)n.abort(this.signal.reason);else{let e=H.get(this.signal);e===void 0&&(e=new Set,H.set(this.signal,e));let t=new WeakRef(n);e.add(t),h.addAbortListener(n.signal,ie(t))}return le(t,n.signal,d(this[M]))}[g.inspect.custom](e,t){t.depth===null&&(t.depth=2),t.colors??=!0;let n={method:this.method,url:this.url,headers:this.headers,destination:this.destination,referrer:this.referrer,referrerPolicy:this.referrerPolicy,mode:this.mode,credentials:this.credentials,cache:this.cache,redirect:this.redirect,integrity:this.integrity,keepalive:this.keepalive,isReloadNavigation:this.isReloadNavigation,isHistoryNavigation:this.isHistoryNavigation,signal:this.signal};return`Request ${g.formatWithOptions(t,n)}`}};i(oe);function se(e){return{method:e.method??`GET`,localURLsOnly:e.localURLsOnly??!1,unsafeRequest:e.unsafeRequest??!1,body:e.body??null,client:e.client??null,reservedClient:e.reservedClient??null,replacesClientId:e.replacesClientId??``,window:e.window??`client`,keepalive:e.keepalive??!1,serviceWorkers:e.serviceWorkers??`all`,initiator:e.initiator??``,destination:e.destination??``,priority:e.priority??null,origin:e.origin??`client`,policyContainer:e.policyContainer??`client`,referrer:e.referrer??`client`,referrerPolicy:e.referrerPolicy??``,mode:e.mode??`no-cors`,useCORSPreflightFlag:e.useCORSPreflightFlag??!1,credentials:e.credentials??`same-origin`,useCredentials:e.useCredentials??!1,cache:e.cache??`default`,redirect:e.redirect??`follow`,integrity:e.integrity??``,cryptoGraphicsNonceMetadata:e.cryptoGraphicsNonceMetadata??``,parserMetadata:e.parserMetadata??``,reloadNavigation:e.reloadNavigation??!1,historyNavigation:e.historyNavigation??!1,userActivation:e.userActivation??!1,taintedOrigin:e.taintedOrigin??!1,redirectCount:e.redirectCount??0,responseTainting:e.responseTainting??`basic`,preventNoCacheCacheControlHeaderModification:e.preventNoCacheCacheControlHeaderModification??!1,done:e.done??!1,timingAllowFailed:e.timingAllowFailed??!1,urlList:e.urlList,url:e.urlList[0],headersList:e.headersList?new l(e.headersList):new l}}function ce(e){let t=se({...e,body:null});return e.body!=null&&(t.body=a(t,e.body)),t}function le(e,t,n){let r=new oe(R);return r[P]=e,r[N]=t,r[M]=new s(R),f(r[M],e.headersList),u(r[M],n),r}Object.defineProperties(oe.prototype,{method:k,url:k,headers:k,redirect:k,clone:k,signal:k,duplex:k,destination:k,body:k,bodyUsed:k,isHistoryNavigation:k,isReloadNavigation:k,keepalive:k,integrity:k,cache:k,credentials:k,attribute:k,referrerPolicy:k,referrer:k,mode:k,[Symbol.toStringTag]:{value:`Request`,configurable:!0}}),I.converters.Request=I.interfaceConverter(oe),I.converters.RequestInfo=function(e,t,n){return typeof e==`string`?I.converters.USVString(e,t,n):e instanceof oe?I.converters.Request(e,t,n):I.converters.USVString(e,t,n)},I.converters.AbortSignal=I.interfaceConverter(AbortSignal),I.converters.RequestInit=I.dictionaryConverter([{key:`method`,converter:I.converters.ByteString},{key:`headers`,converter:I.converters.HeadersInit},{key:`body`,converter:I.nullableConverter(I.converters.BodyInit)},{key:`referrer`,converter:I.converters.USVString},{key:`referrerPolicy`,converter:I.converters.DOMString,allowedValues:C},{key:`mode`,converter:I.converters.DOMString,allowedValues:T},{key:`credentials`,converter:I.converters.DOMString,allowedValues:E},{key:`cache`,converter:I.converters.DOMString,allowedValues:D},{key:`redirect`,converter:I.converters.DOMString,allowedValues:w},{key:`integrity`,converter:I.converters.DOMString},{key:`keepalive`,converter:I.converters.boolean},{key:`signal`,converter:I.nullableConverter(e=>I.converters.AbortSignal(e,`RequestInit`,`signal`,{strict:!1}))},{key:`window`,converter:I.converters.any},{key:`duplex`,converter:I.converters.DOMString,allowedValues:O},{key:`dispatcher`,converter:I.converters.any}]),n.exports={Request:oe,makeRequest:se,fromInnerRequest:le,cloneRequest:ce}})),On=i(((e,n)=>{let{makeNetworkError:r,makeAppropriateNetworkError:i,filterResponse:a,makeResponse:o,fromInnerResponse:s}=Tn(),{HeadersList:c}=wn(),{Request:l,cloneRequest:u}=Dn(),d=t(`node:zlib`),{bytesMatch:f,makePolicyContainer:p,clonePolicyContainer:m,requestBadPort:h,TAOCheck:g,appendRequestOriginHeader:v,responseLocationURL:y,requestCurrentURL:b,setRequestReferrerPolicyOnRedirect:x,tryUpgradeRequestToAPotentiallyTrustworthyURL:S,createOpaqueTimingInfo:C,appendFetchMetadata:w,corsCheck:T,crossOriginResourcePolicyCheck:E,determineRequestsReferrer:D,coarsenedSharedCurrentTime:O,createDeferredPromise:k,isBlobLike:A,sameOrigin:j,isCancelled:M,isAborted:N,isErrorLike:P,fullyReadBody:F,readableStreamClose:I,isomorphicEncode:L,urlIsLocal:R,urlIsHttpHttpsScheme:z,urlHasHttpsScheme:ee,clampAndCoarsenConnectionTimingInfo:B,simpleRangeHeaderValue:te,buildContentRange:V,createInflate:ne,extractMimeType:re}=Mt(),{kState:H,kDispatcher:ie}=Nt(),ae=t(`node:assert`),{safelyExtractBody:oe,extractBody:se}=Lt(),{redirectStatusSet:ce,nullBodyStatus:le,safeMethodsSet:ue,requestBodyHeader:de,subresourceSet:fe}=Ot(),pe=t(`node:events`),{Readable:me,pipeline:he,finished:ge}=t(`node:stream`),{addAbortListener:_e,isErrored:U,isReadable:ve,bufferToLowerCasedHeaderName:ye}=_t(),{dataURLProcessor:be,serializeAMimeType:xe,minimizeSupportedMimeType:Se}=At(),{getGlobalDispatcher:Ce}=vn(),{webidl:we}=jt(),{STATUS_CODES:Te}=t(`node:http`),Ee=[`GET`,`HEAD`],De=typeof __UNDICI_IS_NODE__<`u`||typeof esbuildDetection<`u`?`node`:`undici`,Oe;var W=class extends pe{constructor(e){super(),this.dispatcher=e,this.connection=null,this.dump=!1,this.state=`ongoing`}terminate(e){this.state===`ongoing`&&(this.state=`terminated`,this.connection?.destroy(e),this.emit(`terminated`,e))}abort(e){this.state===`ongoing`&&(this.state=`aborted`,e||=new DOMException(`The operation was aborted.`,`AbortError`),this.serializedAbortReason=e,this.connection?.destroy(e),this.emit(`terminated`,e))}};function ke(e){je(e,`fetch`)}function Ae(e,t=void 0){we.argumentLengthCheck(arguments,1,`globalThis.fetch`);let n=k(),r;try{r=new l(e,t)}catch(e){return n.reject(e),n.promise}let i=r[H];if(r.signal.aborted)return Ne(n,i,null,r.signal.reason),n.promise;i.client.globalObject?.constructor?.name===`ServiceWorkerGlobalScope`&&(i.serviceWorkers=`none`);let a=null,o=!1,c=null;return _e(r.signal,()=>{o=!0,ae(c!=null),c.abort(r.signal.reason);let e=a?.deref();Ne(n,i,e,r.signal.reason)}),c=Pe({request:i,processResponseEndOfBody:ke,processResponse:e=>{if(!o){if(e.aborted){Ne(n,i,a,c.serializedAbortReason);return}if(e.type===`error`){n.reject(TypeError(`fetch failed`,{cause:e.error}));return}a=new WeakRef(s(e,`immutable`)),n.resolve(a.deref()),n=null}},dispatcher:r[ie]}),n.promise}function je(e,t=`other`){if(e.type===`error`&&e.aborted||!e.urlList?.length)return;let n=e.urlList[0],r=e.timingInfo,i=e.cacheState;z(n)&&r!==null&&(e.timingAllowPassed||(r=C({startTime:r.startTime}),i=``),r.endTime=O(),e.timingInfo=r,Me(r,n.href,t,globalThis,i))}let Me=performance.markResourceTiming;function Ne(e,t,n,r){if(e&&e.reject(r),t.body!=null&&ve(t.body?.stream)&&t.body.stream.cancel(r).catch(e=>{if(e.code!==`ERR_INVALID_STATE`)throw e}),n==null)return;let i=n[H];i.body!=null&&ve(i.body?.stream)&&i.body.stream.cancel(r).catch(e=>{if(e.code!==`ERR_INVALID_STATE`)throw e})}function Pe({request:e,processRequestBodyChunkLength:t,processRequestEndOfBody:n,processResponse:r,processResponseEndOfBody:i,processResponseConsumeBody:a,useParallelQueue:o=!1,dispatcher:s=Ce()}){ae(s);let c=null,l=!1;e.client!=null&&(c=e.client.globalObject,l=e.client.crossOriginIsolatedCapability);let u=C({startTime:O(l)}),d={controller:new W(s),request:e,timingInfo:u,processRequestBodyChunkLength:t,processRequestEndOfBody:n,processResponse:r,processResponseConsumeBody:a,processResponseEndOfBody:i,taskDestination:c,crossOriginIsolatedCapability:l};return ae(!e.body||e.body.stream),e.window===`client`&&(e.window=e.client?.globalObject?.constructor?.name===`Window`?e.client:`no-window`),e.origin===`client`&&(e.origin=e.client.origin),e.policyContainer===`client`&&(e.client==null?e.policyContainer=p():e.policyContainer=m(e.client.policyContainer)),e.headersList.contains(`accept`,!0)||e.headersList.append(`accept`,`*/*`,!0),e.headersList.contains(`accept-language`,!0)||e.headersList.append(`accept-language`,`*`,!0),e.priority,fe.has(e.destination),Fe(d).catch(e=>{d.controller.terminate(e)}),d.controller}async function Fe(e,t=!1){let n=e.request,i=null;if(n.localURLsOnly&&!R(b(n))&&(i=r(`local URLs only`)),S(n),h(n)===`blocked`&&(i=r(`bad port`)),n.referrerPolicy===``&&(n.referrerPolicy=n.policyContainer.referrerPolicy),n.referrer!==`no-referrer`&&(n.referrer=D(n)),i===null&&(i=await(async()=>{let t=b(n);return j(t,n.url)&&n.responseTainting===`basic`||t.protocol===`data:`||n.mode===`navigate`||n.mode===`websocket`?(n.responseTainting=`basic`,await Ie(e)):n.mode===`same-origin`?r(`request mode cannot be "same-origin"`):n.mode===`no-cors`?n.redirect===`follow`?(n.responseTainting=`opaque`,await Ie(e)):r(`redirect mode cannot be "follow" for "no-cors" request`):z(b(n))?(n.responseTainting=`cors`,await ze(e)):r(`URL scheme must be a HTTP(S) scheme`)})()),t)return i;i.status!==0&&!i.internalResponse&&(n.responseTainting,n.responseTainting===`basic`?i=a(i,`basic`):n.responseTainting===`cors`?i=a(i,`cors`):n.responseTainting===`opaque`?i=a(i,`opaque`):ae(!1));let o=i.status===0?i:i.internalResponse;if(o.urlList.length===0&&o.urlList.push(...n.urlList),n.timingAllowFailed||(i.timingAllowPassed=!0),i.type===`opaque`&&o.status===206&&o.rangeRequested&&!n.headers.contains(`range`,!0)&&(i=o=r()),i.status!==0&&(n.method===`HEAD`||n.method===`CONNECT`||le.includes(o.status))&&(o.body=null,e.controller.dump=!0),n.integrity){let t=t=>Re(e,r(t));if(n.responseTainting===`opaque`||i.body==null){t(i.error);return}await F(i.body,r=>{if(!f(r,n.integrity)){t(`integrity mismatch`);return}i.body=oe(r)[0],Re(e,i)},t)}else Re(e,i)}function Ie(e){if(M(e)&&e.request.redirectCount===0)return Promise.resolve(i(e));let{request:n}=e,{protocol:a}=b(n);switch(a){case`about:`:return Promise.resolve(r(`about scheme is not supported`));case`blob:`:{Oe||=t(`node:buffer`).resolveObjectURL;let e=b(n);if(e.search.length!==0)return Promise.resolve(r(`NetworkError when attempting to fetch resource.`));let i=Oe(e.toString());if(n.method!==`GET`||!A(i))return Promise.resolve(r(`invalid method`));let a=o(),s=i.size,c=L(`${s}`),l=i.type;if(n.headersList.contains(`range`,!0)){a.rangeRequested=!0;let e=te(n.headersList.get(`range`,!0),!0);if(e===`failure`)return Promise.resolve(r(`failed to fetch the data URL`));let{rangeStartValue:t,rangeEndValue:o}=e;if(t===null)t=s-o,o=t+o-1;else{if(t>=s)return Promise.resolve(r(`Range start is greater than the blob's size.`));(o===null||o>=s)&&(o=s-1)}let c=i.slice(t,o,l);a.body=se(c)[0];let u=L(`${c.size}`),d=V(t,o,s);a.status=206,a.statusText=`Partial Content`,a.headersList.set(`content-length`,u,!0),a.headersList.set(`content-type`,l,!0),a.headersList.set(`content-range`,d,!0)}else{let e=se(i);a.statusText=`OK`,a.body=e[0],a.headersList.set(`content-length`,c,!0),a.headersList.set(`content-type`,l,!0)}return Promise.resolve(a)}case`data:`:{let e=be(b(n));if(e===`failure`)return Promise.resolve(r(`failed to fetch the data URL`));let t=xe(e.mimeType);return Promise.resolve(o({statusText:`OK`,headersList:[[`content-type`,{name:`Content-Type`,value:t}]],body:oe(e.body)[0]}))}case`file:`:return Promise.resolve(r(`not implemented... yet...`));case`http:`:case`https:`:return ze(e).catch(e=>r(e));default:return Promise.resolve(r(`unknown scheme`))}}function Le(e,t){e.request.done=!0,e.processResponseDone!=null&&queueMicrotask(()=>e.processResponseDone(t))}function Re(e,t){let n=e.timingInfo,r=()=>{let r=Date.now();e.request.destination===`document`&&(e.controller.fullTimingInfo=n),e.controller.reportTimingSteps=()=>{if(e.request.url.protocol!==`https:`)return;n.endTime=r;let i=t.cacheState,a=t.bodyInfo;t.timingAllowPassed||(n=C(n),i=``);let o=0;if(e.request.mode!==`navigator`||!t.hasCrossOriginRedirects){o=t.status;let e=re(t.headersList);e!==`failure`&&(a.contentType=Se(e))}e.request.initiatorType!=null&&Me(n,e.request.url.href,e.request.initiatorType,globalThis,i,a,o)};let i=()=>{e.request.done=!0,e.processResponseEndOfBody!=null&&queueMicrotask(()=>e.processResponseEndOfBody(t)),e.request.initiatorType!=null&&e.controller.reportTimingSteps()};queueMicrotask(()=>i())};e.processResponse!=null&&queueMicrotask(()=>{e.processResponse(t),e.processResponse=null});let i=t.type===`error`?t:t.internalResponse??t;i.body==null?r():ge(i.body.stream,()=>{r()})}async function ze(e){let t=e.request,n=null,i=null,a=e.timingInfo;if(t.serviceWorkers,n===null){if(t.redirect===`follow`&&(t.serviceWorkers=`none`),i=n=await Ve(e),t.responseTainting===`cors`&&T(t,n)===`failure`)return r(`cors failure`);g(t,n)===`failure`&&(t.timingAllowFailed=!0)}return(t.responseTainting===`opaque`||n.type===`opaque`)&&E(t.origin,t.client,t.destination,i)===`blocked`?r(`blocked`):(ce.has(i.status)&&(t.redirect!==`manual`&&e.controller.connection.destroy(void 0,!1),t.redirect===`error`?n=r(`unexpected redirect`):t.redirect===`manual`?n=i:t.redirect===`follow`?n=await Be(e,n):ae(!1)),n.timingInfo=a,n)}function Be(e,t){let n=e.request,i=t.internalResponse?t.internalResponse:t,a;try{if(a=y(i,b(n).hash),a==null)return t}catch(e){return Promise.resolve(r(e))}if(!z(a))return Promise.resolve(r(`URL scheme must be a HTTP(S) scheme`));if(n.redirectCount===20)return Promise.resolve(r(`redirect count exceeded`));if(n.redirectCount+=1,n.mode===`cors`&&(a.username||a.password)&&!j(n,a))return Promise.resolve(r(`cross origin not allowed for request mode "cors"`));if(n.responseTainting===`cors`&&(a.username||a.password))return Promise.resolve(r(`URL cannot contain credentials for request mode "cors"`));if(i.status!==303&&n.body!=null&&n.body.source==null)return Promise.resolve(r());if([301,302].includes(i.status)&&n.method===`POST`||i.status===303&&!Ee.includes(n.method)){n.method=`GET`,n.body=null;for(let e of de)n.headersList.delete(e)}j(b(n),a)||(n.headersList.delete(`authorization`,!0),n.headersList.delete(`proxy-authorization`,!0),n.headersList.delete(`cookie`,!0),n.headersList.delete(`host`,!0)),n.body!=null&&(ae(n.body.source!=null),n.body=oe(n.body.source)[0]);let o=e.timingInfo;return o.redirectEndTime=o.postRedirectStartTime=O(e.crossOriginIsolatedCapability),o.redirectStartTime===0&&(o.redirectStartTime=o.startTime),n.urlList.push(a),x(n,i),Fe(e,!0)}async function Ve(e,t=!1,n=!1){let a=e.request,o=null,s=null,c=null;a.window===`no-window`&&a.redirect===`error`?(o=e,s=a):(s=u(a),o={...e},o.request=s);let l=a.credentials===`include`||a.credentials===`same-origin`&&a.responseTainting===`basic`,d=s.body?s.body.length:null,f=null;if(s.body==null&&[`POST`,`PUT`].includes(s.method)&&(f=`0`),d!=null&&(f=L(`${d}`)),f!=null&&s.headersList.append(`content-length`,f,!0),d!=null&&s.keepalive,s.referrer instanceof URL&&s.headersList.append(`referer`,L(s.referrer.href),!0),v(s),w(s),s.headersList.contains(`user-agent`,!0)||s.headersList.append(`user-agent`,De),s.cache===`default`&&(s.headersList.contains(`if-modified-since`,!0)||s.headersList.contains(`if-none-match`,!0)||s.headersList.contains(`if-unmodified-since`,!0)||s.headersList.contains(`if-match`,!0)||s.headersList.contains(`if-range`,!0))&&(s.cache=`no-store`),s.cache===`no-cache`&&!s.preventNoCacheCacheControlHeaderModification&&!s.headersList.contains(`cache-control`,!0)&&s.headersList.append(`cache-control`,`max-age=0`,!0),(s.cache===`no-store`||s.cache===`reload`)&&(s.headersList.contains(`pragma`,!0)||s.headersList.append(`pragma`,`no-cache`,!0),s.headersList.contains(`cache-control`,!0)||s.headersList.append(`cache-control`,`no-cache`,!0)),s.headersList.contains(`range`,!0)&&s.headersList.append(`accept-encoding`,`identity`,!0),s.headersList.contains(`accept-encoding`,!0)||(ee(b(s))?s.headersList.append(`accept-encoding`,`br, gzip, deflate`,!0):s.headersList.append(`accept-encoding`,`gzip, deflate`,!0)),s.headersList.delete(`host`,!0),s.cache=`no-store`,s.cache!==`no-store`&&s.cache,c==null){if(s.cache===`only-if-cached`)return r(`only if cached`);let e=await He(o,l,n);!ue.has(s.method)&&e.status>=200&&e.status,c??=e}if(c.urlList=[...s.urlList],s.headersList.contains(`range`,!0)&&(c.rangeRequested=!0),c.requestIncludesCredentials=l,c.status===407)return a.window===`no-window`?r():M(e)?i(e):r(`proxy authentication required`);if(c.status===421&&!n&&(a.body==null||a.body.source!=null)){if(M(e))return i(e);e.controller.connection.destroy(),c=await Ve(e,t,!0)}return c}async function He(e,t=!1,n=!1){ae(!e.controller.connection||e.controller.connection.destroyed),e.controller.connection={abort:null,destroyed:!1,destroy(e,t=!0){this.destroyed||(this.destroyed=!0,t&&this.abort?.(e??new DOMException(`The operation was aborted.`,`AbortError`)))}};let a=e.request,s=null,l=e.timingInfo;a.cache=`no-store`,a.mode;let u=null;if(a.body==null&&e.processRequestEndOfBody)queueMicrotask(()=>e.processRequestEndOfBody());else if(a.body!=null){let t=async function*(t){M(e)||(yield t,e.processRequestBodyChunkLength?.(t.byteLength))},n=()=>{M(e)||e.processRequestEndOfBody&&e.processRequestEndOfBody()},r=t=>{M(e)||(t.name===`AbortError`?e.controller.abort():e.controller.terminate(t))};u=(async function*(){try{for await(let e of a.body.stream)yield*t(e);n()}catch(e){r(e)}})()}try{let{body:t,status:n,statusText:r,headersList:i,socket:a}=await g({body:u});if(a)s=o({status:n,statusText:r,headersList:i,socket:a});else{let a=t[Symbol.asyncIterator]();e.controller.next=()=>a.next(),s=o({status:n,statusText:r,headersList:i})}}catch(t){return t.name===`AbortError`?(e.controller.connection.destroy(),i(e,t)):r(t)}let f=async()=>{await e.controller.resume()},p=t=>{M(e)||e.controller.abort(t)},m=new ReadableStream({async start(t){e.controller.controller=t},async pull(e){await f(e)},async cancel(e){await p(e)},type:`bytes`});s.body={stream:m,source:null,length:null},e.controller.onAborted=h,e.controller.on(`terminated`,h),e.controller.resume=async()=>{for(;;){let t,n;try{let{done:n,value:r}=await e.controller.next();if(N(e))break;t=n?void 0:r}catch(r){e.controller.ended&&!l.encodedBodySize?t=void 0:(t=r,n=!0)}if(t===void 0){I(e.controller.controller),Le(e,s);return}if(l.decodedBodySize+=t?.byteLength??0,n){e.controller.terminate(t);return}let r=new Uint8Array(t);if(r.byteLength&&e.controller.controller.enqueue(r),U(m)){e.controller.terminate();return}if(e.controller.controller.desiredSize<=0)return}};function h(t){N(e)?(s.aborted=!0,ve(m)&&e.controller.controller.error(e.controller.serializedAbortReason)):ve(m)&&e.controller.controller.error(TypeError(`terminated`,{cause:P(t)?t:void 0})),e.controller.connection.destroy()}return s;function g({body:t}){let n=b(a),r=e.controller.dispatcher;return new Promise((i,o)=>r.dispatch({path:n.pathname+n.search,origin:n.origin,method:a.method,body:r.isMockActive?a.body&&(a.body.source||a.body.stream):t,headers:a.headersList.entries,maxRedirections:0,upgrade:a.mode===`websocket`?`websocket`:void 0},{body:null,abort:null,onConnect(t){let{connection:n}=e.controller;l.finalConnectionTimingInfo=B(void 0,l.postRedirectStartTime,e.crossOriginIsolatedCapability),n.destroyed?t(new DOMException(`The operation was aborted.`,`AbortError`)):(e.controller.on(`terminated`,t),this.abort=n.abort=t),l.finalNetworkRequestStartTime=O(e.crossOriginIsolatedCapability)},onResponseStarted(){l.finalNetworkResponseStartTime=O(e.crossOriginIsolatedCapability)},onHeaders(e,t,n,r){if(e<200)return;let s=``,l=new c;for(let e=0;e5)return o(Error(`too many content-encodings in response: ${t.length}, maximum allowed is 5`)),!0;for(let e=t.length-1;e>=0;--e){let n=t[e].trim();if(n===`x-gzip`||n===`gzip`)u.push(d.createGunzip({flush:d.constants.Z_SYNC_FLUSH,finishFlush:d.constants.Z_SYNC_FLUSH}));else if(n===`deflate`)u.push(ne({flush:d.constants.Z_SYNC_FLUSH,finishFlush:d.constants.Z_SYNC_FLUSH}));else if(n===`br`)u.push(d.createBrotliDecompress({flush:d.constants.BROTLI_OPERATION_FLUSH,finishFlush:d.constants.BROTLI_OPERATION_FLUSH}));else{u.length=0;break}}}let p=this.onError.bind(this);return i({status:e,statusText:r,headersList:l,body:u.length?he(this.body,...u,e=>{e&&this.onError(e)}).on(`error`,p):this.body.on(`error`,p)}),!0},onData(t){if(e.controller.dump)return;let n=t;return l.encodedBodySize+=n.byteLength,this.body.push(n)},onComplete(){this.abort&&e.controller.off(`terminated`,this.abort),e.controller.onAborted&&e.controller.off(`terminated`,e.controller.onAborted),e.controller.ended=!0,this.body.push(null)},onError(t){this.abort&&e.controller.off(`terminated`,this.abort),this.body?.destroy(t),e.controller.terminate(t),o(t)},onUpgrade(e,t,n){if(e!==101)return;let r=new c;for(let e=0;e{t.exports={kState:Symbol(`FileReader state`),kResult:Symbol(`FileReader result`),kError:Symbol(`FileReader error`),kLastProgressEventFired:Symbol(`FileReader last progress event fired timestamp`),kEvents:Symbol(`FileReader events`),kAborted:Symbol(`FileReader aborted`)}})),An=i(((e,t)=>{let{webidl:n}=jt(),r=Symbol(`ProgressEvent state`);var i=class e extends Event{constructor(e,t={}){e=n.converters.DOMString(e,`ProgressEvent constructor`,`type`),t=n.converters.ProgressEventInit(t??{}),super(e,t),this[r]={lengthComputable:t.lengthComputable,loaded:t.loaded,total:t.total}}get lengthComputable(){return n.brandCheck(this,e),this[r].lengthComputable}get loaded(){return n.brandCheck(this,e),this[r].loaded}get total(){return n.brandCheck(this,e),this[r].total}};n.converters.ProgressEventInit=n.dictionaryConverter([{key:`lengthComputable`,converter:n.converters.boolean,defaultValue:()=>!1},{key:`loaded`,converter:n.converters[`unsigned long long`],defaultValue:()=>0},{key:`total`,converter:n.converters[`unsigned long long`],defaultValue:()=>0},{key:`bubbles`,converter:n.converters.boolean,defaultValue:()=>!1},{key:`cancelable`,converter:n.converters.boolean,defaultValue:()=>!1},{key:`composed`,converter:n.converters.boolean,defaultValue:()=>!1}]),t.exports={ProgressEvent:i}})),jn=i(((e,t)=>{function n(e){if(!e)return`failure`;switch(e.trim().toLowerCase()){case`unicode-1-1-utf-8`:case`unicode11utf8`:case`unicode20utf8`:case`utf-8`:case`utf8`:case`x-unicode20utf8`:return`UTF-8`;case`866`:case`cp866`:case`csibm866`:case`ibm866`:return`IBM866`;case`csisolatin2`:case`iso-8859-2`:case`iso-ir-101`:case`iso8859-2`:case`iso88592`:case`iso_8859-2`:case`iso_8859-2:1987`:case`l2`:case`latin2`:return`ISO-8859-2`;case`csisolatin3`:case`iso-8859-3`:case`iso-ir-109`:case`iso8859-3`:case`iso88593`:case`iso_8859-3`:case`iso_8859-3:1988`:case`l3`:case`latin3`:return`ISO-8859-3`;case`csisolatin4`:case`iso-8859-4`:case`iso-ir-110`:case`iso8859-4`:case`iso88594`:case`iso_8859-4`:case`iso_8859-4:1988`:case`l4`:case`latin4`:return`ISO-8859-4`;case`csisolatincyrillic`:case`cyrillic`:case`iso-8859-5`:case`iso-ir-144`:case`iso8859-5`:case`iso88595`:case`iso_8859-5`:case`iso_8859-5:1988`:return`ISO-8859-5`;case`arabic`:case`asmo-708`:case`csiso88596e`:case`csiso88596i`:case`csisolatinarabic`:case`ecma-114`:case`iso-8859-6`:case`iso-8859-6-e`:case`iso-8859-6-i`:case`iso-ir-127`:case`iso8859-6`:case`iso88596`:case`iso_8859-6`:case`iso_8859-6:1987`:return`ISO-8859-6`;case`csisolatingreek`:case`ecma-118`:case`elot_928`:case`greek`:case`greek8`:case`iso-8859-7`:case`iso-ir-126`:case`iso8859-7`:case`iso88597`:case`iso_8859-7`:case`iso_8859-7:1987`:case`sun_eu_greek`:return`ISO-8859-7`;case`csiso88598e`:case`csisolatinhebrew`:case`hebrew`:case`iso-8859-8`:case`iso-8859-8-e`:case`iso-ir-138`:case`iso8859-8`:case`iso88598`:case`iso_8859-8`:case`iso_8859-8:1988`:case`visual`:return`ISO-8859-8`;case`csiso88598i`:case`iso-8859-8-i`:case`logical`:return`ISO-8859-8-I`;case`csisolatin6`:case`iso-8859-10`:case`iso-ir-157`:case`iso8859-10`:case`iso885910`:case`l6`:case`latin6`:return`ISO-8859-10`;case`iso-8859-13`:case`iso8859-13`:case`iso885913`:return`ISO-8859-13`;case`iso-8859-14`:case`iso8859-14`:case`iso885914`:return`ISO-8859-14`;case`csisolatin9`:case`iso-8859-15`:case`iso8859-15`:case`iso885915`:case`iso_8859-15`:case`l9`:return`ISO-8859-15`;case`iso-8859-16`:return`ISO-8859-16`;case`cskoi8r`:case`koi`:case`koi8`:case`koi8-r`:case`koi8_r`:return`KOI8-R`;case`koi8-ru`:case`koi8-u`:return`KOI8-U`;case`csmacintosh`:case`mac`:case`macintosh`:case`x-mac-roman`:return`macintosh`;case`iso-8859-11`:case`iso8859-11`:case`iso885911`:case`tis-620`:case`windows-874`:return`windows-874`;case`cp1250`:case`windows-1250`:case`x-cp1250`:return`windows-1250`;case`cp1251`:case`windows-1251`:case`x-cp1251`:return`windows-1251`;case`ansi_x3.4-1968`:case`ascii`:case`cp1252`:case`cp819`:case`csisolatin1`:case`ibm819`:case`iso-8859-1`:case`iso-ir-100`:case`iso8859-1`:case`iso88591`:case`iso_8859-1`:case`iso_8859-1:1987`:case`l1`:case`latin1`:case`us-ascii`:case`windows-1252`:case`x-cp1252`:return`windows-1252`;case`cp1253`:case`windows-1253`:case`x-cp1253`:return`windows-1253`;case`cp1254`:case`csisolatin5`:case`iso-8859-9`:case`iso-ir-148`:case`iso8859-9`:case`iso88599`:case`iso_8859-9`:case`iso_8859-9:1989`:case`l5`:case`latin5`:case`windows-1254`:case`x-cp1254`:return`windows-1254`;case`cp1255`:case`windows-1255`:case`x-cp1255`:return`windows-1255`;case`cp1256`:case`windows-1256`:case`x-cp1256`:return`windows-1256`;case`cp1257`:case`windows-1257`:case`x-cp1257`:return`windows-1257`;case`cp1258`:case`windows-1258`:case`x-cp1258`:return`windows-1258`;case`x-mac-cyrillic`:case`x-mac-ukrainian`:return`x-mac-cyrillic`;case`chinese`:case`csgb2312`:case`csiso58gb231280`:case`gb2312`:case`gb_2312`:case`gb_2312-80`:case`gbk`:case`iso-ir-58`:case`x-gbk`:return`GBK`;case`gb18030`:return`gb18030`;case`big5`:case`big5-hkscs`:case`cn-big5`:case`csbig5`:case`x-x-big5`:return`Big5`;case`cseucpkdfmtjapanese`:case`euc-jp`:case`x-euc-jp`:return`EUC-JP`;case`csiso2022jp`:case`iso-2022-jp`:return`ISO-2022-JP`;case`csshiftjis`:case`ms932`:case`ms_kanji`:case`shift-jis`:case`shift_jis`:case`sjis`:case`windows-31j`:case`x-sjis`:return`Shift_JIS`;case`cseuckr`:case`csksc56011987`:case`euc-kr`:case`iso-ir-149`:case`korean`:case`ks_c_5601-1987`:case`ks_c_5601-1989`:case`ksc5601`:case`ksc_5601`:case`windows-949`:return`EUC-KR`;case`csiso2022kr`:case`hz-gb-2312`:case`iso-2022-cn`:case`iso-2022-cn-ext`:case`iso-2022-kr`:case`replacement`:return`replacement`;case`unicodefffe`:case`utf-16be`:return`UTF-16BE`;case`csunicode`:case`iso-10646-ucs-2`:case`ucs-2`:case`unicode`:case`unicodefeff`:case`utf-16`:case`utf-16le`:return`UTF-16LE`;case`x-user-defined`:return`x-user-defined`;default:return`failure`}}t.exports={getEncoding:n}})),Mn=i(((e,n)=>{let{kState:r,kError:i,kResult:a,kAborted:o,kLastProgressEventFired:s}=kn(),{ProgressEvent:c}=An(),{getEncoding:l}=jn(),{serializeAMimeType:u,parseMIMEType:d}=At(),{types:f}=t(`node:util`),{StringDecoder:p}=t(`string_decoder`),{btoa:m}=t(`node:buffer`),h={enumerable:!0,writable:!1,configurable:!1};function g(e,t,n,c){if(e[r]===`loading`)throw new DOMException(`Invalid state`,`InvalidStateError`);e[r]=`loading`,e[a]=null,e[i]=null;let l=t.stream().getReader(),u=[],d=l.read(),p=!0;(async()=>{for(;!e[o];)try{let{done:m,value:h}=await d;if(p&&!e[o]&&queueMicrotask(()=>{v(`loadstart`,e)}),p=!1,!m&&f.isUint8Array(h))u.push(h),(e[s]===void 0||Date.now()-e[s]>=50)&&!e[o]&&(e[s]=Date.now(),queueMicrotask(()=>{v(`progress`,e)})),d=l.read();else if(m){queueMicrotask(()=>{e[r]=`done`;try{let r=y(u,n,t.type,c);if(e[o])return;e[a]=r,v(`load`,e)}catch(t){e[i]=t,v(`error`,e)}e[r]!==`loading`&&v(`loadend`,e)});break}}catch(t){if(e[o])return;queueMicrotask(()=>{e[r]=`done`,e[i]=t,v(`error`,e),e[r]!==`loading`&&v(`loadend`,e)});break}})()}function v(e,t){let n=new c(e,{bubbles:!1,cancelable:!1});t.dispatchEvent(n)}function y(e,t,n,r){switch(t){case`DataURL`:{let t=`data:`,r=d(n||`application/octet-stream`);r!==`failure`&&(t+=u(r)),t+=`;base64,`;let i=new p(`latin1`);for(let n of e)t+=m(i.write(n));return t+=m(i.end()),t}case`Text`:{let t=`failure`;if(r&&(t=l(r)),t===`failure`&&n){let e=d(n);e!==`failure`&&(t=l(e.parameters.get(`charset`)))}return t===`failure`&&(t=`UTF-8`),b(e,t)}case`ArrayBuffer`:return S(e).buffer;case`BinaryString`:{let t=``,n=new p(`latin1`);for(let r of e)t+=n.write(r);return t+=n.end(),t}}}function b(e,t){let n=S(e),r=x(n),i=0;r!==null&&(t=r,i=r===`UTF-8`?3:2);let a=n.slice(i);return new TextDecoder(t).decode(a)}function x(e){let[t,n,r]=e;return t===239&&n===187&&r===191?`UTF-8`:t===254&&n===255?`UTF-16BE`:t===255&&n===254?`UTF-16LE`:null}function S(e){let t=e.reduce((e,t)=>e+t.byteLength,0),n=0;return e.reduce((e,t)=>(e.set(t,n),n+=t.byteLength,e),new Uint8Array(t))}n.exports={staticPropertyDescriptors:h,readOperation:g,fireAProgressEvent:v}})),Nn=i(((e,t)=>{let{staticPropertyDescriptors:n,readOperation:r,fireAProgressEvent:i}=Mn(),{kState:a,kError:o,kResult:s,kEvents:c,kAborted:l}=kn(),{webidl:u}=jt(),{kEnumerableProperty:d}=_t();var f=class e extends EventTarget{constructor(){super(),this[a]=`empty`,this[s]=null,this[o]=null,this[c]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(t){u.brandCheck(this,e),u.argumentLengthCheck(arguments,1,`FileReader.readAsArrayBuffer`),t=u.converters.Blob(t,{strict:!1}),r(this,t,`ArrayBuffer`)}readAsBinaryString(t){u.brandCheck(this,e),u.argumentLengthCheck(arguments,1,`FileReader.readAsBinaryString`),t=u.converters.Blob(t,{strict:!1}),r(this,t,`BinaryString`)}readAsText(t,n=void 0){u.brandCheck(this,e),u.argumentLengthCheck(arguments,1,`FileReader.readAsText`),t=u.converters.Blob(t,{strict:!1}),n!==void 0&&(n=u.converters.DOMString(n,`FileReader.readAsText`,`encoding`)),r(this,t,`Text`,n)}readAsDataURL(t){u.brandCheck(this,e),u.argumentLengthCheck(arguments,1,`FileReader.readAsDataURL`),t=u.converters.Blob(t,{strict:!1}),r(this,t,`DataURL`)}abort(){if(this[a]===`empty`||this[a]===`done`){this[s]=null;return}this[a]===`loading`&&(this[a]=`done`,this[s]=null),this[l]=!0,i(`abort`,this),this[a]!==`loading`&&i(`loadend`,this)}get readyState(){switch(u.brandCheck(this,e),this[a]){case`empty`:return this.EMPTY;case`loading`:return this.LOADING;case`done`:return this.DONE}}get result(){return u.brandCheck(this,e),this[s]}get error(){return u.brandCheck(this,e),this[o]}get onloadend(){return u.brandCheck(this,e),this[c].loadend}set onloadend(t){u.brandCheck(this,e),this[c].loadend&&this.removeEventListener(`loadend`,this[c].loadend),typeof t==`function`?(this[c].loadend=t,this.addEventListener(`loadend`,t)):this[c].loadend=null}get onerror(){return u.brandCheck(this,e),this[c].error}set onerror(t){u.brandCheck(this,e),this[c].error&&this.removeEventListener(`error`,this[c].error),typeof t==`function`?(this[c].error=t,this.addEventListener(`error`,t)):this[c].error=null}get onloadstart(){return u.brandCheck(this,e),this[c].loadstart}set onloadstart(t){u.brandCheck(this,e),this[c].loadstart&&this.removeEventListener(`loadstart`,this[c].loadstart),typeof t==`function`?(this[c].loadstart=t,this.addEventListener(`loadstart`,t)):this[c].loadstart=null}get onprogress(){return u.brandCheck(this,e),this[c].progress}set onprogress(t){u.brandCheck(this,e),this[c].progress&&this.removeEventListener(`progress`,this[c].progress),typeof t==`function`?(this[c].progress=t,this.addEventListener(`progress`,t)):this[c].progress=null}get onload(){return u.brandCheck(this,e),this[c].load}set onload(t){u.brandCheck(this,e),this[c].load&&this.removeEventListener(`load`,this[c].load),typeof t==`function`?(this[c].load=t,this.addEventListener(`load`,t)):this[c].load=null}get onabort(){return u.brandCheck(this,e),this[c].abort}set onabort(t){u.brandCheck(this,e),this[c].abort&&this.removeEventListener(`abort`,this[c].abort),typeof t==`function`?(this[c].abort=t,this.addEventListener(`abort`,t)):this[c].abort=null}};f.EMPTY=f.prototype.EMPTY=0,f.LOADING=f.prototype.LOADING=1,f.DONE=f.prototype.DONE=2,Object.defineProperties(f.prototype,{EMPTY:n,LOADING:n,DONE:n,readAsArrayBuffer:d,readAsBinaryString:d,readAsText:d,readAsDataURL:d,abort:d,readyState:d,result:d,error:d,onloadstart:d,onprogress:d,onload:d,onabort:d,onerror:d,onloadend:d,[Symbol.toStringTag]:{value:`FileReader`,writable:!1,enumerable:!1,configurable:!0}}),Object.defineProperties(f,{EMPTY:n,LOADING:n,DONE:n}),t.exports={FileReader:f}})),Pn=i(((e,t)=>{t.exports={kConstruct:pt().kConstruct}})),Fn=i(((e,n)=>{let r=t(`node:assert`),{URLSerializer:i}=At(),{isValidHeaderName:a}=Mt();function o(e,t,n=!1){return i(e,n)===i(t,n)}function s(e){r(e!==null);let t=[];for(let n of e.split(`,`))n=n.trim(),a(n)&&t.push(n);return t}n.exports={urlEquals:o,getFieldValues:s}})),In=i(((e,n)=>{let{kConstruct:r}=Pn(),{urlEquals:i,getFieldValues:a}=Fn(),{kEnumerableProperty:o,isDisturbed:s}=_t(),{webidl:c}=jt(),{Response:l,cloneResponse:u,fromInnerResponse:d}=Tn(),{Request:f,fromInnerRequest:p}=Dn(),{kState:m}=Nt(),{fetching:h}=On(),{urlIsHttpHttpsScheme:g,createDeferredPromise:v,readAllBytes:y}=Mt(),b=t(`node:assert`);var x=class e{#e;constructor(){arguments[0]!==r&&c.illegalConstructor(),c.util.markAsUncloneable(this),this.#e=arguments[1]}async match(t,n={}){c.brandCheck(this,e);let r=`Cache.match`;c.argumentLengthCheck(arguments,1,r),t=c.converters.RequestInfo(t,r,`request`),n=c.converters.CacheQueryOptions(n,r,`options`);let i=this.#i(t,n,1);if(i.length!==0)return i[0]}async matchAll(t=void 0,n={}){c.brandCheck(this,e);let r=`Cache.matchAll`;return t!==void 0&&(t=c.converters.RequestInfo(t,r,`request`)),n=c.converters.CacheQueryOptions(n,r,`options`),this.#i(t,n)}async add(t){c.brandCheck(this,e);let n=`Cache.add`;c.argumentLengthCheck(arguments,1,n),t=c.converters.RequestInfo(t,n,`request`);let r=[t];return await this.addAll(r)}async addAll(t){c.brandCheck(this,e);let n=`Cache.addAll`;c.argumentLengthCheck(arguments,1,n);let r=[],i=[];for(let e of t){if(e===void 0)throw c.errors.conversionFailed({prefix:n,argument:`Argument 1`,types:[`undefined is not allowed`]});if(e=c.converters.RequestInfo(e),typeof e==`string`)continue;let t=e[m];if(!g(t.url)||t.method!==`GET`)throw c.errors.exception({header:n,message:`Expected http/s scheme when method is not GET.`})}let o=[];for(let e of t){let t=new f(e)[m];if(!g(t.url))throw c.errors.exception({header:n,message:`Expected http/s scheme.`});t.initiator=`fetch`,t.destination=`subresource`,i.push(t);let s=v();o.push(h({request:t,processResponse(e){if(e.type===`error`||e.status===206||e.status<200||e.status>299)s.reject(c.errors.exception({header:`Cache.addAll`,message:`Received an invalid status code or the request failed.`}));else if(e.headersList.contains(`vary`)){let t=a(e.headersList.get(`vary`));for(let e of t)if(e===`*`){s.reject(c.errors.exception({header:`Cache.addAll`,message:`invalid vary field value`}));for(let e of o)e.abort();return}}},processResponseEndOfBody(e){if(e.aborted){s.reject(new DOMException(`aborted`,`AbortError`));return}s.resolve(e)}})),r.push(s.promise)}let s=await Promise.all(r),l=[],u=0;for(let e of s){let t={type:`put`,request:i[u],response:e};l.push(t),u++}let d=v(),p=null;try{this.#t(l)}catch(e){p=e}return queueMicrotask(()=>{p===null?d.resolve(void 0):d.reject(p)}),d.promise}async put(t,n){c.brandCheck(this,e);let r=`Cache.put`;c.argumentLengthCheck(arguments,2,r),t=c.converters.RequestInfo(t,r,`request`),n=c.converters.Response(n,r,`response`);let i=null;if(i=t instanceof f?t[m]:new f(t)[m],!g(i.url)||i.method!==`GET`)throw c.errors.exception({header:r,message:`Expected an http/s scheme when method is not GET`});let o=n[m];if(o.status===206)throw c.errors.exception({header:r,message:`Got 206 status`});if(o.headersList.contains(`vary`)){let e=a(o.headersList.get(`vary`));for(let t of e)if(t===`*`)throw c.errors.exception({header:r,message:`Got * vary field value`})}if(o.body&&(s(o.body.stream)||o.body.stream.locked))throw c.errors.exception({header:r,message:`Response body is locked or disturbed`});let l=u(o),d=v();o.body==null?d.resolve(void 0):y(o.body.stream.getReader()).then(d.resolve,d.reject);let p=[],h={type:`put`,request:i,response:l};p.push(h);let b=await d.promise;l.body!=null&&(l.body.source=b);let x=v(),S=null;try{this.#t(p)}catch(e){S=e}return queueMicrotask(()=>{S===null?x.resolve():x.reject(S)}),x.promise}async delete(t,n={}){c.brandCheck(this,e);let r=`Cache.delete`;c.argumentLengthCheck(arguments,1,r),t=c.converters.RequestInfo(t,r,`request`),n=c.converters.CacheQueryOptions(n,r,`options`);let i=null;if(t instanceof f){if(i=t[m],i.method!==`GET`&&!n.ignoreMethod)return!1}else b(typeof t==`string`),i=new f(t)[m];let a=[],o={type:`delete`,request:i,options:n};a.push(o);let s=v(),l=null,u;try{u=this.#t(a)}catch(e){l=e}return queueMicrotask(()=>{l===null?s.resolve(!!u?.length):s.reject(l)}),s.promise}async keys(t=void 0,n={}){c.brandCheck(this,e);let r=`Cache.keys`;t!==void 0&&(t=c.converters.RequestInfo(t,r,`request`)),n=c.converters.CacheQueryOptions(n,r,`options`);let i=null;if(t!==void 0)if(t instanceof f){if(i=t[m],i.method!==`GET`&&!n.ignoreMethod)return[]}else typeof t==`string`&&(i=new f(t)[m]);let a=v(),o=[];if(t===void 0)for(let e of this.#e)o.push(e[0]);else{let e=this.#n(i,n);for(let t of e)o.push(t[0])}return queueMicrotask(()=>{let e=[];for(let t of o){let n=p(t,new AbortController().signal,`immutable`);e.push(n)}a.resolve(Object.freeze(e))}),a.promise}#t(e){let t=this.#e,n=[...t],r=[],i=[];try{for(let n of e){if(n.type!==`delete`&&n.type!==`put`)throw c.errors.exception({header:`Cache.#batchCacheOperations`,message:`operation type does not match "delete" or "put"`});if(n.type===`delete`&&n.response!=null)throw c.errors.exception({header:`Cache.#batchCacheOperations`,message:`delete operation should not have an associated response`});if(this.#n(n.request,n.options,r).length)throw new DOMException(`???`,`InvalidStateError`);let e;if(n.type===`delete`){if(e=this.#n(n.request,n.options),e.length===0)return[];for(let n of e){let e=t.indexOf(n);b(e!==-1),t.splice(e,1)}}else if(n.type===`put`){if(n.response==null)throw c.errors.exception({header:`Cache.#batchCacheOperations`,message:`put operation should have an associated response`});let i=n.request;if(!g(i.url))throw c.errors.exception({header:`Cache.#batchCacheOperations`,message:`expected http or https scheme`});if(i.method!==`GET`)throw c.errors.exception({header:`Cache.#batchCacheOperations`,message:`not get method`});if(n.options!=null)throw c.errors.exception({header:`Cache.#batchCacheOperations`,message:`options must not be defined`});e=this.#n(n.request);for(let n of e){let e=t.indexOf(n);b(e!==-1),t.splice(e,1)}t.push([n.request,n.response]),r.push([n.request,n.response])}i.push([n.request,n.response])}return i}catch(e){throw this.#e.length=0,this.#e=n,e}}#n(e,t,n){let r=[],i=n??this.#e;for(let n of i){let[i,a]=n;this.#r(e,i,a,t)&&r.push(n)}return r}#r(e,t,n=null,r){let o=new URL(e.url),s=new URL(t.url);if(r?.ignoreSearch&&(s.search=``,o.search=``),!i(o,s,!0))return!1;if(n==null||r?.ignoreVary||!n.headersList.contains(`vary`))return!0;let c=a(n.headersList.get(`vary`));for(let n of c)if(n===`*`||t.headersList.get(n)!==e.headersList.get(n))return!1;return!0}#i(e,t,n=1/0){let r=null;if(e!==void 0)if(e instanceof f){if(r=e[m],r.method!==`GET`&&!t.ignoreMethod)return[]}else typeof e==`string`&&(r=new f(e)[m]);let i=[];if(e===void 0)for(let e of this.#e)i.push(e[1]);else{let e=this.#n(r,t);for(let t of e)i.push(t[1])}let a=[];for(let e of i){let t=d(e,`immutable`);if(a.push(t.clone()),a.length>=n)break}return Object.freeze(a)}};Object.defineProperties(x.prototype,{[Symbol.toStringTag]:{value:`Cache`,configurable:!0},match:o,matchAll:o,add:o,addAll:o,put:o,delete:o,keys:o});let S=[{key:`ignoreSearch`,converter:c.converters.boolean,defaultValue:()=>!1},{key:`ignoreMethod`,converter:c.converters.boolean,defaultValue:()=>!1},{key:`ignoreVary`,converter:c.converters.boolean,defaultValue:()=>!1}];c.converters.CacheQueryOptions=c.dictionaryConverter(S),c.converters.MultiCacheQueryOptions=c.dictionaryConverter([...S,{key:`cacheName`,converter:c.converters.DOMString}]),c.converters.Response=c.interfaceConverter(l),c.converters[`sequence`]=c.sequenceConverter(c.converters.RequestInfo),n.exports={Cache:x}})),Ln=i(((e,t)=>{let{kConstruct:n}=Pn(),{Cache:r}=In(),{webidl:i}=jt(),{kEnumerableProperty:a}=_t();var o=class e{#e=new Map;constructor(){arguments[0]!==n&&i.illegalConstructor(),i.util.markAsUncloneable(this)}async match(t,a={}){if(i.brandCheck(this,e),i.argumentLengthCheck(arguments,1,`CacheStorage.match`),t=i.converters.RequestInfo(t),a=i.converters.MultiCacheQueryOptions(a),a.cacheName!=null){if(this.#e.has(a.cacheName))return await new r(n,this.#e.get(a.cacheName)).match(t,a)}else for(let e of this.#e.values()){let i=await new r(n,e).match(t,a);if(i!==void 0)return i}}async has(t){i.brandCheck(this,e);let n=`CacheStorage.has`;return i.argumentLengthCheck(arguments,1,n),t=i.converters.DOMString(t,n,`cacheName`),this.#e.has(t)}async open(t){i.brandCheck(this,e);let a=`CacheStorage.open`;if(i.argumentLengthCheck(arguments,1,a),t=i.converters.DOMString(t,a,`cacheName`),this.#e.has(t))return new r(n,this.#e.get(t));let o=[];return this.#e.set(t,o),new r(n,o)}async delete(t){i.brandCheck(this,e);let n=`CacheStorage.delete`;return i.argumentLengthCheck(arguments,1,n),t=i.converters.DOMString(t,n,`cacheName`),this.#e.delete(t)}async keys(){return i.brandCheck(this,e),[...this.#e.keys()]}};Object.defineProperties(o.prototype,{[Symbol.toStringTag]:{value:`CacheStorage`,configurable:!0},match:a,has:a,open:a,delete:a,keys:a}),t.exports={CacheStorage:o}})),Rn=i(((e,t)=>{t.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}})),zn=i(((e,t)=>{function n(e){for(let t=0;t=0&&n<=8||n>=10&&n<=31||n===127)return!0}return!1}function r(e){for(let t=0;t126||n===34||n===40||n===41||n===60||n===62||n===64||n===44||n===59||n===58||n===92||n===47||n===91||n===93||n===63||n===61||n===123||n===125)throw Error(`Invalid cookie name`)}}function i(e){let t=e.length,n=0;if(e[0]===`"`){if(t===1||e[t-1]!==`"`)throw Error(`Invalid cookie value`);--t,++n}for(;n126||t===34||t===44||t===59||t===92)throw Error(`Invalid cookie value`)}}function a(e){for(let t=0;tt.toString().padStart(2,`0`));function u(e){return typeof e==`number`&&(e=new Date(e)),`${s[e.getUTCDay()]}, ${l[e.getUTCDate()]} ${c[e.getUTCMonth()]} ${e.getUTCFullYear()} ${l[e.getUTCHours()]}:${l[e.getUTCMinutes()]}:${l[e.getUTCSeconds()]} GMT`}function d(e){if(e<0)throw Error(`Invalid cookie max-age`)}function f(e){if(e.name.length===0)return null;r(e.name),i(e.value);let t=[`${e.name}=${e.value}`];e.name.startsWith(`__Secure-`)&&(e.secure=!0),e.name.startsWith(`__Host-`)&&(e.secure=!0,e.domain=null,e.path=`/`),e.secure&&t.push(`Secure`),e.httpOnly&&t.push(`HttpOnly`),typeof e.maxAge==`number`&&(d(e.maxAge),t.push(`Max-Age=${e.maxAge}`)),e.domain&&(o(e.domain),t.push(`Domain=${e.domain}`)),e.path&&(a(e.path),t.push(`Path=${e.path}`)),e.expires&&e.expires.toString()!==`Invalid Date`&&t.push(`Expires=${u(e.expires)}`),e.sameSite&&t.push(`SameSite=${e.sameSite}`);for(let n of e.unparsed){if(!n.includes(`=`))throw Error(`Invalid unparsed`);let[e,...r]=n.split(`=`);t.push(`${e.trim()}=${r.join(`=`)}`)}return t.join(`; `)}t.exports={isCTLExcludingHtab:n,validateCookieName:r,validateCookiePath:a,validateCookieValue:i,toIMFDate:u,stringify:f}})),Bn=i(((e,n)=>{let{maxNameValuePairSize:r,maxAttributeValueSize:i}=Rn(),{isCTLExcludingHtab:a}=zn(),{collectASequenceOfCodePointsFast:o}=At(),s=t(`node:assert`);function c(e){if(a(e))return null;let t=``,n=``,i=``,s=``;if(e.includes(`;`)){let r={position:0};t=o(`;`,e,r),n=e.slice(r.position)}else t=e;if(!t.includes(`=`))s=t;else{let e={position:0};i=o(`=`,t,e),s=t.slice(e.position+1)}return i=i.trim(),s=s.trim(),i.length+s.length>r?null:{name:i,value:s,...l(n)}}function l(e,t={}){if(e.length===0)return t;s(e[0]===`;`),e=e.slice(1);let n=``;e.includes(`;`)?(n=o(`;`,e,{position:0}),e=e.slice(n.length)):(n=e,e=``);let r=``,a=``;if(n.includes(`=`)){let e={position:0};r=o(`=`,n,e),a=n.slice(e.position+1)}else r=n;if(r=r.trim(),a=a.trim(),a.length>i)return l(e,t);let c=r.toLowerCase();if(c===`expires`)t.expires=new Date(a);else if(c===`max-age`){let n=a.charCodeAt(0);if((n<48||n>57)&&a[0]!==`-`||!/^\d+$/.test(a))return l(e,t);t.maxAge=Number(a)}else if(c===`domain`){let e=a;e[0]===`.`&&(e=e.slice(1)),e=e.toLowerCase(),t.domain=e}else if(c===`path`){let e=``;e=a.length===0||a[0]!==`/`?`/`:a,t.path=e}else if(c===`secure`)t.secure=!0;else if(c===`httponly`)t.httpOnly=!0;else if(c===`samesite`){let e=`Default`,n=a.toLowerCase();n.includes(`none`)&&(e=`None`),n.includes(`strict`)&&(e=`Strict`),n.includes(`lax`)&&(e=`Lax`),t.sameSite=e}else t.unparsed??=[],t.unparsed.push(`${r}=${a}`);return l(e,t)}n.exports={parseSetCookie:c,parseUnparsedAttributes:l}})),Vn=i(((e,t)=>{let{parseSetCookie:n}=Bn(),{stringify:r}=zn(),{webidl:i}=jt(),{Headers:a}=wn();function o(e){i.argumentLengthCheck(arguments,1,`getCookies`),i.brandCheck(e,a,{strict:!1});let t=e.get(`cookie`),n={};if(!t)return n;for(let e of t.split(`;`)){let[t,...r]=e.split(`=`);n[t.trim()]=r.join(`=`)}return n}function s(e,t,n){i.brandCheck(e,a,{strict:!1});let r=`deleteCookie`;i.argumentLengthCheck(arguments,2,r),t=i.converters.DOMString(t,r,`name`),n=i.converters.DeleteCookieAttributes(n),l(e,{name:t,value:``,expires:new Date(0),...n})}function c(e){i.argumentLengthCheck(arguments,1,`getSetCookies`),i.brandCheck(e,a,{strict:!1});let t=e.getSetCookie();return t?t.map(e=>n(e)):[]}function l(e,t){i.argumentLengthCheck(arguments,2,`setCookie`),i.brandCheck(e,a,{strict:!1}),t=i.converters.Cookie(t);let n=r(t);n&&e.append(`Set-Cookie`,n)}i.converters.DeleteCookieAttributes=i.dictionaryConverter([{converter:i.nullableConverter(i.converters.DOMString),key:`path`,defaultValue:()=>null},{converter:i.nullableConverter(i.converters.DOMString),key:`domain`,defaultValue:()=>null}]),i.converters.Cookie=i.dictionaryConverter([{converter:i.converters.DOMString,key:`name`},{converter:i.converters.DOMString,key:`value`},{converter:i.nullableConverter(e=>typeof e==`number`?i.converters[`unsigned long long`](e):new Date(e)),key:`expires`,defaultValue:()=>null},{converter:i.nullableConverter(i.converters[`long long`]),key:`maxAge`,defaultValue:()=>null},{converter:i.nullableConverter(i.converters.DOMString),key:`domain`,defaultValue:()=>null},{converter:i.nullableConverter(i.converters.DOMString),key:`path`,defaultValue:()=>null},{converter:i.nullableConverter(i.converters.boolean),key:`secure`,defaultValue:()=>null},{converter:i.nullableConverter(i.converters.boolean),key:`httpOnly`,defaultValue:()=>null},{converter:i.converters.USVString,key:`sameSite`,allowedValues:[`Strict`,`Lax`,`None`]},{converter:i.sequenceConverter(i.converters.DOMString),key:`unparsed`,defaultValue:()=>[]}]),t.exports={getCookies:o,deleteCookie:s,getSetCookies:c,setCookie:l}})),Hn=i(((e,n)=>{let{webidl:r}=jt(),{kEnumerableProperty:i}=_t(),{kConstruct:a}=pt(),{MessagePort:o}=t(`node:worker_threads`);var s=class e extends Event{#e;constructor(e,t={}){if(e===a){super(arguments[1],arguments[2]),r.util.markAsUncloneable(this);return}let n=`MessageEvent constructor`;r.argumentLengthCheck(arguments,1,n),e=r.converters.DOMString(e,n,`type`),t=r.converters.MessageEventInit(t,n,`eventInitDict`),super(e,t),this.#e=t,r.util.markAsUncloneable(this)}get data(){return r.brandCheck(this,e),this.#e.data}get origin(){return r.brandCheck(this,e),this.#e.origin}get lastEventId(){return r.brandCheck(this,e),this.#e.lastEventId}get source(){return r.brandCheck(this,e),this.#e.source}get ports(){return r.brandCheck(this,e),Object.isFrozen(this.#e.ports)||Object.freeze(this.#e.ports),this.#e.ports}initMessageEvent(t,n=!1,i=!1,a=null,o=``,s=``,c=null,l=[]){return r.brandCheck(this,e),r.argumentLengthCheck(arguments,1,`MessageEvent.initMessageEvent`),new e(t,{bubbles:n,cancelable:i,data:a,origin:o,lastEventId:s,source:c,ports:l})}static createFastMessageEvent(t,n){let r=new e(a,t,n);return r.#e=n,r.#e.data??=null,r.#e.origin??=``,r.#e.lastEventId??=``,r.#e.source??=null,r.#e.ports??=[],r}};let{createFastMessageEvent:c}=s;delete s.createFastMessageEvent;var l=class e extends Event{#e;constructor(e,t={}){let n=`CloseEvent constructor`;r.argumentLengthCheck(arguments,1,n),e=r.converters.DOMString(e,n,`type`),t=r.converters.CloseEventInit(t),super(e,t),this.#e=t,r.util.markAsUncloneable(this)}get wasClean(){return r.brandCheck(this,e),this.#e.wasClean}get code(){return r.brandCheck(this,e),this.#e.code}get reason(){return r.brandCheck(this,e),this.#e.reason}},u=class e extends Event{#e;constructor(e,t){let n=`ErrorEvent constructor`;r.argumentLengthCheck(arguments,1,n),super(e,t),r.util.markAsUncloneable(this),e=r.converters.DOMString(e,n,`type`),t=r.converters.ErrorEventInit(t??{}),this.#e=t}get message(){return r.brandCheck(this,e),this.#e.message}get filename(){return r.brandCheck(this,e),this.#e.filename}get lineno(){return r.brandCheck(this,e),this.#e.lineno}get colno(){return r.brandCheck(this,e),this.#e.colno}get error(){return r.brandCheck(this,e),this.#e.error}};Object.defineProperties(s.prototype,{[Symbol.toStringTag]:{value:`MessageEvent`,configurable:!0},data:i,origin:i,lastEventId:i,source:i,ports:i,initMessageEvent:i}),Object.defineProperties(l.prototype,{[Symbol.toStringTag]:{value:`CloseEvent`,configurable:!0},reason:i,code:i,wasClean:i}),Object.defineProperties(u.prototype,{[Symbol.toStringTag]:{value:`ErrorEvent`,configurable:!0},message:i,filename:i,lineno:i,colno:i,error:i}),r.converters.MessagePort=r.interfaceConverter(o),r.converters[`sequence`]=r.sequenceConverter(r.converters.MessagePort);let d=[{key:`bubbles`,converter:r.converters.boolean,defaultValue:()=>!1},{key:`cancelable`,converter:r.converters.boolean,defaultValue:()=>!1},{key:`composed`,converter:r.converters.boolean,defaultValue:()=>!1}];r.converters.MessageEventInit=r.dictionaryConverter([...d,{key:`data`,converter:r.converters.any,defaultValue:()=>null},{key:`origin`,converter:r.converters.USVString,defaultValue:()=>``},{key:`lastEventId`,converter:r.converters.DOMString,defaultValue:()=>``},{key:`source`,converter:r.nullableConverter(r.converters.MessagePort),defaultValue:()=>null},{key:`ports`,converter:r.converters[`sequence`],defaultValue:()=>[]}]),r.converters.CloseEventInit=r.dictionaryConverter([...d,{key:`wasClean`,converter:r.converters.boolean,defaultValue:()=>!1},{key:`code`,converter:r.converters[`unsigned short`],defaultValue:()=>0},{key:`reason`,converter:r.converters.USVString,defaultValue:()=>``}]),r.converters.ErrorEventInit=r.dictionaryConverter([...d,{key:`message`,converter:r.converters.DOMString,defaultValue:()=>``},{key:`filename`,converter:r.converters.USVString,defaultValue:()=>``},{key:`lineno`,converter:r.converters[`unsigned long`],defaultValue:()=>0},{key:`colno`,converter:r.converters[`unsigned long`],defaultValue:()=>0},{key:`error`,converter:r.converters.any}]),n.exports={MessageEvent:s,CloseEvent:l,ErrorEvent:u,createFastMessageEvent:c}})),Un=i(((e,t)=>{t.exports={uid:`258EAFA5-E914-47DA-95CA-C5AB0DC85B11`,sentCloseFrameState:{NOT_SENT:0,PROCESSING:1,SENT:2},staticPropertyDescriptors:{enumerable:!0,writable:!1,configurable:!1},states:{CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},opcodes:{CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},maxUnsigned16Bit:2**16-1,parserStates:{INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},emptyBuffer:Buffer.allocUnsafe(0),sendHints:{string:1,typedArray:2,arrayBuffer:3,blob:4}}})),Wn=i(((e,t)=>{t.exports={kWebSocketURL:Symbol(`url`),kReadyState:Symbol(`ready state`),kController:Symbol(`controller`),kResponse:Symbol(`response`),kBinaryType:Symbol(`binary type`),kSentClose:Symbol(`sent close`),kReceivedClose:Symbol(`received close`),kByteParser:Symbol(`byte parser`)}})),Gn=i(((e,n)=>{let{kReadyState:r,kController:i,kResponse:a,kBinaryType:o,kWebSocketURL:s}=Wn(),{states:c,opcodes:l}=Un(),{ErrorEvent:u,createFastMessageEvent:d}=Hn(),{isUtf8:f}=t(`node:buffer`),{collectASequenceOfCodePointsFast:p,removeHTTPWhitespace:m}=At();function h(e){return e[r]===c.CONNECTING}function g(e){return e[r]===c.OPEN}function v(e){return e[r]===c.CLOSING}function y(e){return e[r]===c.CLOSED}function b(e,t,n=(e,t)=>new Event(e,t),r={}){let i=n(e,r);t.dispatchEvent(i)}function x(e,t,n){if(e[r]!==c.OPEN)return;let i;if(t===l.TEXT)try{i=P(n)}catch{T(e,`Received invalid UTF-8 in text frame.`);return}else t===l.BINARY&&(i=e[o]===`blob`?new Blob([n]):S(n));b(`message`,e,d,{origin:e[s].origin,data:i})}function S(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}function C(e){if(e.length===0)return!1;for(let t=0;t126||n===34||n===40||n===41||n===44||n===47||n===58||n===59||n===60||n===61||n===62||n===63||n===64||n===91||n===92||n===93||n===123||n===125)return!1}return!0}function w(e){return e>=1e3&&e<1015?e!==1004&&e!==1005&&e!==1006:e>=3e3&&e<=4999}function T(e,t){let{[i]:n,[a]:r}=e;n.abort(),r?.socket&&!r.socket.destroyed&&r.socket.destroy(),t&&b(`error`,e,(e,t)=>new u(e,t),{error:Error(t),message:t})}function E(e){return e===l.CLOSE||e===l.PING||e===l.PONG}function D(e){return e===l.CONTINUATION}function O(e){return e===l.TEXT||e===l.BINARY}function k(e){return O(e)||D(e)||E(e)}function A(e){let t={position:0},n=new Map;for(;t.position57)return!1}let t=Number.parseInt(e,10);return t>=8&&t<=15}let M=typeof process.versions.icu==`string`,N=M?new TextDecoder(`utf-8`,{fatal:!0}):void 0,P=M?N.decode.bind(N):function(e){if(f(e))return e.toString(`utf-8`);throw TypeError(`Invalid utf-8 received.`)};n.exports={isConnecting:h,isEstablished:g,isClosing:v,isClosed:y,fireEvent:b,isValidSubprotocol:C,isValidStatusCode:w,failWebsocketConnection:T,websocketMessageReceived:x,utf8Decode:P,isControlFrame:E,isContinuationFrame:D,isTextBinaryFrame:O,isValidOpcode:k,parseExtensions:A,isValidClientWindowBits:j}})),Kn=i(((e,n)=>{let{maxUnsigned16Bit:r}=Un(),i=16386,a,o=null,s=i;try{a=t(`node:crypto`)}catch{a={randomFillSync:function(e,t,n){for(let t=0;tr?(o+=8,a=127):i>125&&(o+=2,a=126);let s=Buffer.allocUnsafe(i+o);s[0]=s[1]=0,s[0]|=128,s[0]=(s[0]&240)+e,s[o-4]=n[0],s[o-3]=n[1],s[o-2]=n[2],s[o-1]=n[3],s[1]=a,a===126?s.writeUInt16BE(i,2):a===127&&(s[2]=s[3]=0,s.writeUIntBE(i,4,6)),s[1]|=128;for(let e=0;e{let{uid:r,states:i,sentCloseFrameState:a,emptyBuffer:o,opcodes:s}=Un(),{kReadyState:c,kSentClose:l,kByteParser:u,kReceivedClose:d,kResponse:f}=Wn(),{fireEvent:p,failWebsocketConnection:m,isClosing:h,isClosed:g,isEstablished:v,parseExtensions:y}=Gn(),{channels:b}=vt(),{CloseEvent:x}=Hn(),{makeRequest:S}=Dn(),{fetching:C}=On(),{Headers:w,getHeadersList:T}=wn(),{getDecodeSplit:E}=Mt(),{WebsocketFrameSend:D}=Kn(),O;try{O=t(`node:crypto`)}catch{}function k(e,t,n,i,a,o){let s=e;s.protocol=e.protocol===`ws:`?`http:`:`https:`;let c=S({urlList:[s],client:n,serviceWorkers:`none`,referrer:`no-referrer`,mode:`websocket`,credentials:`include`,cache:`no-store`,redirect:`error`});o.headers&&(c.headersList=T(new w(o.headers)));let l=O.randomBytes(16).toString(`base64`);c.headersList.append(`sec-websocket-key`,l),c.headersList.append(`sec-websocket-version`,`13`);for(let e of t)c.headersList.append(`sec-websocket-protocol`,e);return c.headersList.append(`sec-websocket-extensions`,`permessage-deflate; client_max_window_bits`),C({request:c,useParallelQueue:!0,dispatcher:o.dispatcher,processResponse(e){if(e.type===`error`||e.status!==101){m(i,`Received network error or non-101 status code.`);return}if(t.length!==0&&!e.headersList.get(`Sec-WebSocket-Protocol`)){m(i,`Server did not respond with sent protocols.`);return}if(e.headersList.get(`Upgrade`)?.toLowerCase()!==`websocket`){m(i,`Server did not set Upgrade header to "websocket".`);return}if(e.headersList.get(`Connection`)?.toLowerCase()!==`upgrade`){m(i,`Server did not set Connection header to "upgrade".`);return}if(e.headersList.get(`Sec-WebSocket-Accept`)!==O.createHash(`sha1`).update(l+r).digest(`base64`)){m(i,`Incorrect hash received in Sec-WebSocket-Accept header.`);return}let n=e.headersList.get(`Sec-WebSocket-Extensions`),o;if(n!==null&&(o=y(n),!o.has(`permessage-deflate`))){m(i,`Sec-WebSocket-Extensions header does not match.`);return}let s=e.headersList.get(`Sec-WebSocket-Protocol`);if(s!==null&&!E(`sec-websocket-protocol`,c.headersList).includes(s)){m(i,`Protocol was not set in the opening handshake.`);return}e.socket.on(`data`,j),e.socket.on(`close`,M),e.socket.on(`error`,N),b.open.hasSubscribers&&b.open.publish({address:e.socket.address(),protocol:s,extensions:n}),a(e,o)}})}function A(e,t,n,r){if(!(h(e)||g(e)))if(!v(e))m(e,`Connection was closed before it was established.`),e[c]=i.CLOSING;else if(e[l]===a.NOT_SENT){e[l]=a.PROCESSING;let u=new D;t!==void 0&&n===void 0?(u.frameData=Buffer.allocUnsafe(2),u.frameData.writeUInt16BE(t,0)):t!==void 0&&n!==void 0?(u.frameData=Buffer.allocUnsafe(2+r),u.frameData.writeUInt16BE(t,0),u.frameData.write(n,2,`utf-8`)):u.frameData=o,e[f].socket.write(u.createFrame(s.CLOSE)),e[l]=a.SENT,e[c]=i.CLOSING}else e[c]=i.CLOSING}function j(e){this.ws[u].write(e)||this.pause()}function M(){let{ws:e}=this,{[f]:t}=e;t.socket.off(`data`,j),t.socket.off(`close`,M),t.socket.off(`error`,N);let n=e[l]===a.SENT&&e[d],r=1005,o=``,s=e[u].closingInfo;s&&!s.error?(r=s.code??1005,o=s.reason):e[d]||(r=1006),e[c]=i.CLOSED,p(`close`,e,(e,t)=>new x(e,t),{wasClean:n,code:r,reason:o}),b.close.hasSubscribers&&b.close.publish({websocket:e,code:r,reason:o})}function N(e){let{ws:t}=this;t[c]=i.CLOSING,b.socketError.hasSubscribers&&b.socketError.publish(e),this.destroy()}n.exports={establishWebSocketConnection:k,closeWebSocketConnection:A}})),Jn=i(((e,n)=>{let{createInflateRaw:r,Z_DEFAULT_WINDOWBITS:i}=t(`node:zlib`),{isValidClientWindowBits:a}=Gn(),{MessageSizeExceededError:o}=mt(),s=Buffer.from([0,0,255,255]),c=Symbol(`kBuffer`),l=Symbol(`kLength`);n.exports={PerMessageDeflate:class{#e;#t={};#n=!1;#r=null;constructor(e){this.#t.serverNoContextTakeover=e.has(`server_no_context_takeover`),this.#t.serverMaxWindowBits=e.get(`server_max_window_bits`)}decompress(e,t,n){if(this.#n){n(new o);return}if(!this.#e){let e=i;if(this.#t.serverMaxWindowBits){if(!a(this.#t.serverMaxWindowBits)){n(Error(`Invalid server_max_window_bits`));return}e=Number.parseInt(this.#t.serverMaxWindowBits)}try{this.#e=r({windowBits:e})}catch(e){n(e);return}this.#e[c]=[],this.#e[l]=0,this.#e.on(`data`,e=>{if(!this.#n){if(this.#e[l]+=e.length,this.#e[l]>4194304){if(this.#n=!0,this.#e.removeAllListeners(),this.#e.destroy(),this.#e=null,this.#r){let e=this.#r;this.#r=null,e(new o)}return}this.#e[c].push(e)}}),this.#e.on(`error`,e=>{this.#e=null,n(e)})}this.#r=n,this.#e.write(e),t&&this.#e.write(s),this.#e.flush(()=>{if(this.#n||!this.#e)return;let e=Buffer.concat(this.#e[c],this.#e[l]);this.#e[c].length=0,this.#e[l]=0,this.#r=null,n(null,e)})}}}})),Yn=i(((e,n)=>{let{Writable:r}=t(`node:stream`),i=t(`node:assert`),{parserStates:a,opcodes:o,states:s,emptyBuffer:c,sentCloseFrameState:l}=Un(),{kReadyState:u,kSentClose:d,kResponse:f,kReceivedClose:p}=Wn(),{channels:m}=vt(),{isValidStatusCode:h,isValidOpcode:g,failWebsocketConnection:v,websocketMessageReceived:y,utf8Decode:b,isControlFrame:x,isTextBinaryFrame:S,isContinuationFrame:C}=Gn(),{WebsocketFrameSend:w}=Kn(),{closeWebSocketConnection:T}=qn(),{PerMessageDeflate:E}=Jn();n.exports={ByteParser:class extends r{#e=[];#t=0;#n=!1;#r=a.INFO;#i={};#a=[];#o;constructor(e,t){super(),this.ws=e,this.#o=t??new Map,this.#o.has(`permessage-deflate`)&&this.#o.set(`permessage-deflate`,new E(t))}_write(e,t,n){this.#e.push(e),this.#t+=e.length,this.#n=!0,this.run(n)}run(e){for(;this.#n;)if(this.#r===a.INFO){if(this.#t<2)return e();let t=this.consume(2),n=(t[0]&128)!=0,r=t[0]&15,i=(t[1]&128)==128,s=!n&&r!==o.CONTINUATION,c=t[1]&127,l=t[0]&64,u=t[0]&32,d=t[0]&16;if(!g(r))return v(this.ws,`Invalid opcode received`),e();if(i)return v(this.ws,`Frame cannot be masked`),e();if(l!==0&&!this.#o.has(`permessage-deflate`)){v(this.ws,`Expected RSV1 to be clear.`);return}if(u!==0||d!==0){v(this.ws,`RSV1, RSV2, RSV3 must be clear`);return}if(s&&!S(r)){v(this.ws,`Invalid frame type was fragmented.`);return}if(S(r)&&this.#a.length>0){v(this.ws,`Expected continuation frame`);return}if(this.#i.fragmented&&s){v(this.ws,`Fragmented frame exceeded 125 bytes.`);return}if((c>125||s)&&x(r)){v(this.ws,`Control frame either too large or fragmented`);return}if(C(r)&&this.#a.length===0&&!this.#i.compressed){v(this.ws,`Unexpected continuation frame`);return}c<=125?(this.#i.payloadLength=c,this.#r=a.READ_DATA):c===126?this.#r=a.PAYLOADLENGTH_16:c===127&&(this.#r=a.PAYLOADLENGTH_64),S(r)&&(this.#i.binaryType=r,this.#i.compressed=l!==0),this.#i.opcode=r,this.#i.masked=i,this.#i.fin=n,this.#i.fragmented=s}else if(this.#r===a.PAYLOADLENGTH_16){if(this.#t<2)return e();let t=this.consume(2);this.#i.payloadLength=t.readUInt16BE(0),this.#r=a.READ_DATA}else if(this.#r===a.PAYLOADLENGTH_64){if(this.#t<8)return e();let t=this.consume(8),n=t.readUInt32BE(0),r=t.readUInt32BE(4);if(n!==0||r>2**31-1){v(this.ws,`Received payload length > 2^31 bytes.`);return}this.#i.payloadLength=r,this.#r=a.READ_DATA}else if(this.#r===a.READ_DATA){if(this.#t{if(t){v(this.ws,t.message);return}if(this.#a.push(n),!this.#i.fin){this.#r=a.INFO,this.#n=!0,this.run(e);return}y(this.ws,this.#i.binaryType,Buffer.concat(this.#a)),this.#n=!0,this.#r=a.INFO,this.#a.length=0,this.run(e)}),this.#n=!1;break}else{if(this.#a.push(t),!this.#i.fragmented&&this.#i.fin){let e=Buffer.concat(this.#a);y(this.ws,this.#i.binaryType,e),this.#a.length=0}this.#r=a.INFO}}}consume(e){if(e>this.#t)throw Error(`Called consume() before buffers satiated.`);if(e===0)return c;if(this.#e[0].length===e)return this.#t-=this.#e[0].length,this.#e.shift();let t=Buffer.allocUnsafe(e),n=0;for(;n!==e;){let r=this.#e[0],{length:i}=r;if(i+n===e){t.set(this.#e.shift(),n);break}else if(i+n>e){t.set(r.subarray(0,e-n),n),this.#e[0]=r.subarray(e-n);break}else t.set(this.#e.shift(),n),n+=r.length}return this.#t-=e,t}parseCloseBody(e){i(e.length!==1);let t;if(e.length>=2&&(t=e.readUInt16BE(0)),t!==void 0&&!h(t))return{code:1002,reason:`Invalid status code`,error:!0};let n=e.subarray(2);n[0]===239&&n[1]===187&&n[2]===191&&(n=n.subarray(3));try{n=b(n)}catch{return{code:1007,reason:`Invalid UTF-8`,error:!0}}return{code:t,reason:n,error:!1}}parseControlFrame(e){let{opcode:t,payloadLength:n}=this.#i;if(t===o.CLOSE){if(n===1)return v(this.ws,`Received close frame with a 1-byte body.`),!1;if(this.#i.closeInfo=this.parseCloseBody(e),this.#i.closeInfo.error){let{code:e,reason:t}=this.#i.closeInfo;return T(this.ws,e,t,t.length),v(this.ws,t),!1}if(this.ws[d]!==l.SENT){let e=c;this.#i.closeInfo.code&&(e=Buffer.allocUnsafe(2),e.writeUInt16BE(this.#i.closeInfo.code,0));let t=new w(e);this.ws[f].socket.write(t.createFrame(o.CLOSE),e=>{e||(this.ws[d]=l.SENT)})}return this.ws[u]=s.CLOSING,this.ws[p]=!0,!1}else if(t===o.PING){if(!this.ws[p]){let t=new w(e);this.ws[f].socket.write(t.createFrame(o.PONG)),m.ping.hasSubscribers&&m.ping.publish({payload:e})}}else t===o.PONG&&m.pong.hasSubscribers&&m.pong.publish({payload:e});return!0}get closingInfo(){return this.#i.closeInfo}}}})),Xn=i(((e,t)=>{let{WebsocketFrameSend:n}=Kn(),{opcodes:r,sendHints:i}=Un(),a=Ut(),o=Buffer[Symbol.species];var s=class{#e=new a;#t=!1;#n;constructor(e){this.#n=e}add(e,t,n){if(n!==i.blob){let r=c(e,n);if(!this.#t)this.#n.write(r,t);else{let e={promise:null,callback:t,frame:r};this.#e.push(e)}return}let r={promise:e.arrayBuffer().then(e=>{r.promise=null,r.frame=c(e,n)}),callback:t,frame:null};this.#e.push(r),this.#t||this.#r()}async#r(){this.#t=!0;let e=this.#e;for(;!e.isEmpty();){let t=e.shift();t.promise!==null&&await t.promise,this.#n.write(t.frame,t.callback),t.callback=t.frame=null}this.#t=!1}};function c(e,t){return new n(l(e,t)).createFrame(t===i.string?r.TEXT:r.BINARY)}function l(e,t){switch(t){case i.string:return Buffer.from(e);case i.arrayBuffer:case i.blob:return new o(e);case i.typedArray:return new o(e.buffer,e.byteOffset,e.byteLength)}}t.exports={SendQueue:s}})),Zn=i(((e,n)=>{let{webidl:r}=jt(),{URLSerializer:i}=At(),{environmentSettingsObject:a}=Mt(),{staticPropertyDescriptors:o,states:s,sentCloseFrameState:c,sendHints:l}=Un(),{kWebSocketURL:u,kReadyState:d,kController:f,kBinaryType:p,kResponse:m,kSentClose:h,kByteParser:g}=Wn(),{isConnecting:v,isEstablished:y,isClosing:b,isValidSubprotocol:x,fireEvent:S}=Gn(),{establishWebSocketConnection:C,closeWebSocketConnection:w}=qn(),{ByteParser:T}=Yn(),{kEnumerableProperty:E,isBlobLike:D}=_t(),{getGlobalDispatcher:O}=vn(),{types:k}=t(`node:util`),{ErrorEvent:A,CloseEvent:j}=Hn(),{SendQueue:M}=Xn();var N=class e extends EventTarget{#e={open:null,error:null,close:null,message:null};#t=0;#n=``;#r=``;#i;constructor(t,n=[]){super(),r.util.markAsUncloneable(this);let i=`WebSocket constructor`;r.argumentLengthCheck(arguments,1,i);let o=r.converters[`DOMString or sequence or WebSocketInit`](n,i,`options`);t=r.converters.USVString(t,i,`url`),n=o.protocols;let s=a.settingsObject.baseUrl,l;try{l=new URL(t,s)}catch(e){throw new DOMException(e,`SyntaxError`)}if(l.protocol===`http:`?l.protocol=`ws:`:l.protocol===`https:`&&(l.protocol=`wss:`),l.protocol!==`ws:`&&l.protocol!==`wss:`)throw new DOMException(`Expected a ws: or wss: protocol, got ${l.protocol}`,`SyntaxError`);if(l.hash||l.href.endsWith(`#`))throw new DOMException(`Got fragment`,`SyntaxError`);if(typeof n==`string`&&(n=[n]),n.length!==new Set(n.map(e=>e.toLowerCase())).size||n.length>0&&!n.every(e=>x(e)))throw new DOMException(`Invalid Sec-WebSocket-Protocol value`,`SyntaxError`);this[u]=new URL(l.href);let m=a.settingsObject;this[f]=C(l,n,m,this,(e,t)=>this.#a(e,t),o),this[d]=e.CONNECTING,this[h]=c.NOT_SENT,this[p]=`blob`}close(t=void 0,n=void 0){r.brandCheck(this,e);let i=`WebSocket.close`;if(t!==void 0&&(t=r.converters[`unsigned short`](t,i,`code`,{clamp:!0})),n!==void 0&&(n=r.converters.USVString(n,i,`reason`)),t!==void 0&&t!==1e3&&(t<3e3||t>4999))throw new DOMException(`invalid code`,`InvalidAccessError`);let a=0;if(n!==void 0&&(a=Buffer.byteLength(n),a>123))throw new DOMException(`Reason must be less than 123 bytes; received ${a}`,`SyntaxError`);w(this,t,n,a)}send(t){r.brandCheck(this,e);let n=`WebSocket.send`;if(r.argumentLengthCheck(arguments,1,n),t=r.converters.WebSocketSendData(t,n,`data`),v(this))throw new DOMException(`Sent before connected.`,`InvalidStateError`);if(!(!y(this)||b(this)))if(typeof t==`string`){let e=Buffer.byteLength(t);this.#t+=e,this.#i.add(t,()=>{this.#t-=e},l.string)}else k.isArrayBuffer(t)?(this.#t+=t.byteLength,this.#i.add(t,()=>{this.#t-=t.byteLength},l.arrayBuffer)):ArrayBuffer.isView(t)?(this.#t+=t.byteLength,this.#i.add(t,()=>{this.#t-=t.byteLength},l.typedArray)):D(t)&&(this.#t+=t.size,this.#i.add(t,()=>{this.#t-=t.size},l.blob))}get readyState(){return r.brandCheck(this,e),this[d]}get bufferedAmount(){return r.brandCheck(this,e),this.#t}get url(){return r.brandCheck(this,e),i(this[u])}get extensions(){return r.brandCheck(this,e),this.#r}get protocol(){return r.brandCheck(this,e),this.#n}get onopen(){return r.brandCheck(this,e),this.#e.open}set onopen(t){r.brandCheck(this,e),this.#e.open&&this.removeEventListener(`open`,this.#e.open),typeof t==`function`?(this.#e.open=t,this.addEventListener(`open`,t)):this.#e.open=null}get onerror(){return r.brandCheck(this,e),this.#e.error}set onerror(t){r.brandCheck(this,e),this.#e.error&&this.removeEventListener(`error`,this.#e.error),typeof t==`function`?(this.#e.error=t,this.addEventListener(`error`,t)):this.#e.error=null}get onclose(){return r.brandCheck(this,e),this.#e.close}set onclose(t){r.brandCheck(this,e),this.#e.close&&this.removeEventListener(`close`,this.#e.close),typeof t==`function`?(this.#e.close=t,this.addEventListener(`close`,t)):this.#e.close=null}get onmessage(){return r.brandCheck(this,e),this.#e.message}set onmessage(t){r.brandCheck(this,e),this.#e.message&&this.removeEventListener(`message`,this.#e.message),typeof t==`function`?(this.#e.message=t,this.addEventListener(`message`,t)):this.#e.message=null}get binaryType(){return r.brandCheck(this,e),this[p]}set binaryType(t){r.brandCheck(this,e),t!==`blob`&&t!==`arraybuffer`?this[p]=`blob`:this[p]=t}#a(e,t){this[m]=e;let n=new T(this,t);n.on(`drain`,P),n.on(`error`,F.bind(this)),e.socket.ws=this,this[g]=n,this.#i=new M(e.socket),this[d]=s.OPEN;let r=e.headersList.get(`sec-websocket-extensions`);r!==null&&(this.#r=r);let i=e.headersList.get(`sec-websocket-protocol`);i!==null&&(this.#n=i),S(`open`,this)}};N.CONNECTING=N.prototype.CONNECTING=s.CONNECTING,N.OPEN=N.prototype.OPEN=s.OPEN,N.CLOSING=N.prototype.CLOSING=s.CLOSING,N.CLOSED=N.prototype.CLOSED=s.CLOSED,Object.defineProperties(N.prototype,{CONNECTING:o,OPEN:o,CLOSING:o,CLOSED:o,url:E,readyState:E,bufferedAmount:E,onopen:E,onerror:E,onclose:E,close:E,onmessage:E,binaryType:E,send:E,extensions:E,protocol:E,[Symbol.toStringTag]:{value:`WebSocket`,writable:!1,enumerable:!1,configurable:!0}}),Object.defineProperties(N,{CONNECTING:o,OPEN:o,CLOSING:o,CLOSED:o}),r.converters[`sequence`]=r.sequenceConverter(r.converters.DOMString),r.converters[`DOMString or sequence`]=function(e,t,n){return r.util.Type(e)===`Object`&&Symbol.iterator in e?r.converters[`sequence`](e):r.converters.DOMString(e,t,n)},r.converters.WebSocketInit=r.dictionaryConverter([{key:`protocols`,converter:r.converters[`DOMString or sequence`],defaultValue:()=>[]},{key:`dispatcher`,converter:r.converters.any,defaultValue:()=>O()},{key:`headers`,converter:r.nullableConverter(r.converters.HeadersInit)}]),r.converters[`DOMString or sequence or WebSocketInit`]=function(e){return r.util.Type(e)===`Object`&&!(Symbol.iterator in e)?r.converters.WebSocketInit(e):{protocols:r.converters[`DOMString or sequence`](e)}},r.converters.WebSocketSendData=function(e){if(r.util.Type(e)===`Object`){if(D(e))return r.converters.Blob(e,{strict:!1});if(ArrayBuffer.isView(e)||k.isArrayBuffer(e))return r.converters.BufferSource(e)}return r.converters.USVString(e)};function P(){this.ws[m].socket.resume()}function F(e){let t,n;e instanceof j?(t=e.reason,n=e.code):t=e.message,S(`error`,this,()=>new A(`error`,{error:e,message:t})),w(this,n)}n.exports={WebSocket:N}})),Qn=i(((e,t)=>{function n(e){return e.indexOf(`\0`)===-1}function r(e){if(e.length===0)return!1;for(let t=0;t57)return!1;return!0}function i(e){return new Promise(t=>{setTimeout(t,e).unref()})}t.exports={isValidLastEventId:n,isASCIINumber:r,delay:i}})),$n=i(((e,n)=>{let{Transform:r}=t(`node:stream`),{isASCIINumber:i,isValidLastEventId:a}=Qn(),o=[239,187,191];n.exports={EventSourceStream:class extends r{state=null;checkBOM=!0;crlfCheck=!1;eventEndCheck=!1;buffer=null;pos=0;event={data:void 0,event:void 0,id:void 0,retry:void 0};constructor(e={}){e.readableObjectMode=!0,super(e),this.state=e.eventSourceSettings||{},e.push&&(this.push=e.push)}_transform(e,t,n){if(e.length===0){n();return}if(this.buffer?this.buffer=Buffer.concat([this.buffer,e]):this.buffer=e,this.checkBOM)switch(this.buffer.length){case 1:if(this.buffer[0]===o[0]){n();return}this.checkBOM=!1,n();return;case 2:if(this.buffer[0]===o[0]&&this.buffer[1]===o[1]){n();return}this.checkBOM=!1;break;case 3:if(this.buffer[0]===o[0]&&this.buffer[1]===o[1]&&this.buffer[2]===o[2]){this.buffer=Buffer.alloc(0),this.checkBOM=!1,n();return}this.checkBOM=!1;break;default:this.buffer[0]===o[0]&&this.buffer[1]===o[1]&&this.buffer[2]===o[2]&&(this.buffer=this.buffer.subarray(3)),this.checkBOM=!1;break}for(;this.pos0&&(t[r]=o);break}}processEvent(e){e.retry&&i(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&a(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}}}}})),er=i(((e,n)=>{let{pipeline:r}=t(`node:stream`),{fetching:i}=On(),{makeRequest:a}=Dn(),{webidl:o}=jt(),{EventSourceStream:s}=$n(),{parseMIMEType:c}=At(),{createFastMessageEvent:l}=Hn(),{isNetworkError:u}=Tn(),{delay:d}=Qn(),{kEnumerableProperty:f}=_t(),{environmentSettingsObject:p}=Mt(),m=!1,h=3e3;var g=class e extends EventTarget{#e={open:null,error:null,message:null};#t=null;#n=!1;#r=0;#i=null;#a=null;#o;#s;constructor(e,t={}){super(),o.util.markAsUncloneable(this);let n=`EventSource constructor`;o.argumentLengthCheck(arguments,1,n),m||(m=!0,process.emitWarning(`EventSource is experimental, expect them to change at any time.`,{code:`UNDICI-ES`})),e=o.converters.USVString(e,n,`url`),t=o.converters.EventSourceInitDict(t,n,`eventSourceInitDict`),this.#o=t.dispatcher,this.#s={lastEventId:``,reconnectionTime:h};let r=p,i;try{i=new URL(e,r.settingsObject.baseUrl),this.#s.origin=i.origin}catch(e){throw new DOMException(e,`SyntaxError`)}this.#t=i.href;let s=`anonymous`;t.withCredentials&&(s=`use-credentials`,this.#n=!0);let c={redirect:`follow`,keepalive:!0,mode:`cors`,credentials:s===`anonymous`?`same-origin`:`omit`,referrer:`no-referrer`};c.client=p.settingsObject,c.headersList=[[`accept`,{name:`accept`,value:`text/event-stream`}]],c.cache=`no-store`,c.initiator=`other`,c.urlList=[new URL(this.#t)],this.#i=a(c),this.#c()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#c(){if(this.#r===2)return;this.#r=0;let e={request:this.#i,dispatcher:this.#o};e.processResponseEndOfBody=e=>{u(e)&&(this.dispatchEvent(new Event(`error`)),this.close()),this.#l()},e.processResponse=e=>{if(u(e))if(e.aborted){this.close(),this.dispatchEvent(new Event(`error`));return}else{this.#l();return}let t=e.headersList.get(`content-type`,!0),n=t===null?`failure`:c(t),i=n!==`failure`&&n.essence===`text/event-stream`;if(e.status!==200||i===!1){this.close(),this.dispatchEvent(new Event(`error`));return}this.#r=1,this.dispatchEvent(new Event(`open`)),this.#s.origin=e.urlList[e.urlList.length-1].origin;let a=new s({eventSourceSettings:this.#s,push:e=>{this.dispatchEvent(l(e.type,e.options))}});r(e.body.stream,a,e=>{e?.aborted===!1&&(this.close(),this.dispatchEvent(new Event(`error`)))})},this.#a=i(e)}async#l(){this.#r!==2&&(this.#r=0,this.dispatchEvent(new Event(`error`)),await d(this.#s.reconnectionTime),this.#r===0&&(this.#s.lastEventId.length&&this.#i.headersList.set(`last-event-id`,this.#s.lastEventId,!0),this.#c()))}close(){o.brandCheck(this,e),this.#r!==2&&(this.#r=2,this.#a.abort(),this.#i=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}};let v={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:0,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:1,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:2,writable:!1}};Object.defineProperties(g,v),Object.defineProperties(g.prototype,v),Object.defineProperties(g.prototype,{close:f,onerror:f,onmessage:f,onopen:f,readyState:f,url:f,withCredentials:f}),o.converters.EventSourceInitDict=o.dictionaryConverter([{key:`withCredentials`,converter:o.converters.boolean,defaultValue:()=>!1},{key:`dispatcher`,converter:o.converters.any}]),n.exports={EventSource:g,defaultReconnectionTime:h}})),tr=i(((e,n)=>{let r=Ht(),i=bt(),a=Kt(),o=qt(),s=Jt(),c=Yt(),l=Xt(),u=Qt(),d=mt(),f=_t(),{InvalidArgumentError:p}=d,m=cn(),h=Ct(),g=pn(),v=_n(),y=mn(),b=ln(),x=Zt(),{getGlobalDispatcher:S,setGlobalDispatcher:C}=vn(),w=yn(),T=Bt(),E=Vt();Object.assign(i.prototype,m),n.exports.Dispatcher=i,n.exports.Client=r,n.exports.Pool=a,n.exports.BalancedPool=o,n.exports.Agent=s,n.exports.ProxyAgent=c,n.exports.EnvHttpProxyAgent=l,n.exports.RetryAgent=u,n.exports.RetryHandler=x,n.exports.DecoratorHandler=w,n.exports.RedirectHandler=T,n.exports.createRedirectInterceptor=E,n.exports.interceptors={redirect:bn(),retry:xn(),dump:Sn(),dns:Cn()},n.exports.buildConnector=h,n.exports.errors=d,n.exports.util={parseHeaders:f.parseHeaders,headerNameToString:f.headerNameToString};function D(e){return(t,n,r)=>{if(typeof n==`function`&&(r=n,n=null),!t||typeof t!=`string`&&typeof t!=`object`&&!(t instanceof URL))throw new p(`invalid url`);if(n!=null&&typeof n!=`object`)throw new p(`invalid opts`);if(n&&n.path!=null){if(typeof n.path!=`string`)throw new p(`invalid opts.path`);let e=n.path;n.path.startsWith(`/`)||(e=`/${e}`),t=new URL(f.parseOrigin(t).origin+e)}else n||=typeof t==`object`?t:{},t=f.parseURL(t);let{agent:i,dispatcher:a=S()}=n;if(i)throw new p(`unsupported opts.agent. Did you mean opts.client?`);return e.call(a,{...n,origin:t.origin,path:t.search?`${t.pathname}${t.search}`:t.pathname,method:n.method||(n.body?`PUT`:`GET`)},r)}}n.exports.setGlobalDispatcher=C,n.exports.getGlobalDispatcher=S;let O=On().fetch;n.exports.fetch=async function(e,t=void 0){try{return await O(e,t)}catch(e){throw e&&typeof e==`object`&&Error.captureStackTrace(e),e}},n.exports.Headers=wn().Headers,n.exports.Response=Tn().Response,n.exports.Request=Dn().Request,n.exports.FormData=Ft().FormData,n.exports.File=globalThis.File??t(`node:buffer`).File,n.exports.FileReader=Nn().FileReader;let{setGlobalOrigin:k,getGlobalOrigin:A}=kt();n.exports.setGlobalOrigin=k,n.exports.getGlobalOrigin=A;let{CacheStorage:j}=Ln(),{kConstruct:M}=Pn();n.exports.caches=new j(M);let{deleteCookie:N,getCookies:P,getSetCookies:F,setCookie:I}=Vn();n.exports.deleteCookie=N,n.exports.getCookies=P,n.exports.getSetCookies=F,n.exports.setCookie=I;let{parseMIMEType:L,serializeAMimeType:R}=At();n.exports.parseMIMEType=L,n.exports.serializeAMimeType=R;let{CloseEvent:z,ErrorEvent:ee,MessageEvent:B}=Hn();n.exports.WebSocket=Zn().WebSocket,n.exports.CloseEvent=z,n.exports.ErrorEvent=ee,n.exports.MessageEvent=B,n.exports.request=D(m.request),n.exports.stream=D(m.stream),n.exports.pipeline=D(m.pipeline),n.exports.connect=D(m.connect),n.exports.upgrade=D(m.upgrade),n.exports.MockClient=g,n.exports.MockPool=y,n.exports.MockAgent=v,n.exports.mockErrors=b;let{EventSource:te}=er();n.exports.EventSource=te})),nr=n(ft(),1),rr=tr(),ir=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},ar;(function(e){e[e.OK=200]=`OK`,e[e.MultipleChoices=300]=`MultipleChoices`,e[e.MovedPermanently=301]=`MovedPermanently`,e[e.ResourceMoved=302]=`ResourceMoved`,e[e.SeeOther=303]=`SeeOther`,e[e.NotModified=304]=`NotModified`,e[e.UseProxy=305]=`UseProxy`,e[e.SwitchProxy=306]=`SwitchProxy`,e[e.TemporaryRedirect=307]=`TemporaryRedirect`,e[e.PermanentRedirect=308]=`PermanentRedirect`,e[e.BadRequest=400]=`BadRequest`,e[e.Unauthorized=401]=`Unauthorized`,e[e.PaymentRequired=402]=`PaymentRequired`,e[e.Forbidden=403]=`Forbidden`,e[e.NotFound=404]=`NotFound`,e[e.MethodNotAllowed=405]=`MethodNotAllowed`,e[e.NotAcceptable=406]=`NotAcceptable`,e[e.ProxyAuthenticationRequired=407]=`ProxyAuthenticationRequired`,e[e.RequestTimeout=408]=`RequestTimeout`,e[e.Conflict=409]=`Conflict`,e[e.Gone=410]=`Gone`,e[e.TooManyRequests=429]=`TooManyRequests`,e[e.InternalServerError=500]=`InternalServerError`,e[e.NotImplemented=501]=`NotImplemented`,e[e.BadGateway=502]=`BadGateway`,e[e.ServiceUnavailable=503]=`ServiceUnavailable`,e[e.GatewayTimeout=504]=`GatewayTimeout`})(ar||={});var or;(function(e){e.Accept=`accept`,e.ContentType=`content-type`})(or||={});var sr;(function(e){e.ApplicationJson=`application/json`})(sr||={});const cr=[ar.MovedPermanently,ar.ResourceMoved,ar.SeeOther,ar.TemporaryRedirect,ar.PermanentRedirect],lr=[ar.BadGateway,ar.ServiceUnavailable,ar.GatewayTimeout],ur=[`OPTIONS`,`GET`,`DELETE`,`HEAD`];var dr=class e extends Error{constructor(t,n){super(t),this.name=`HttpClientError`,this.statusCode=n,Object.setPrototypeOf(this,e.prototype)}},fr=class{constructor(e){this.message=e}readBody(){return ir(this,void 0,void 0,function*(){return new Promise(e=>ir(this,void 0,void 0,function*(){let t=Buffer.alloc(0);this.message.on(`data`,e=>{t=Buffer.concat([t,e])}),this.message.on(`end`,()=>{e(t.toString())})}))})}readBodyBuffer(){return ir(this,void 0,void 0,function*(){return new Promise(e=>ir(this,void 0,void 0,function*(){let t=[];this.message.on(`data`,e=>{t.push(e)}),this.message.on(`end`,()=>{e(Buffer.concat(t))})}))})}},pr=class{constructor(e,t,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=this._getUserAgentWithOrchestrationId(e),this.handlers=t||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries))}options(e,t){return ir(this,void 0,void 0,function*(){return this.request(`OPTIONS`,e,null,t||{})})}get(e,t){return ir(this,void 0,void 0,function*(){return this.request(`GET`,e,null,t||{})})}del(e,t){return ir(this,void 0,void 0,function*(){return this.request(`DELETE`,e,null,t||{})})}post(e,t,n){return ir(this,void 0,void 0,function*(){return this.request(`POST`,e,t,n||{})})}patch(e,t,n){return ir(this,void 0,void 0,function*(){return this.request(`PATCH`,e,t,n||{})})}put(e,t,n){return ir(this,void 0,void 0,function*(){return this.request(`PUT`,e,t,n||{})})}head(e,t){return ir(this,void 0,void 0,function*(){return this.request(`HEAD`,e,null,t||{})})}sendStream(e,t,n,r){return ir(this,void 0,void 0,function*(){return this.request(e,t,n,r)})}getJson(e){return ir(this,arguments,void 0,function*(e,t={}){t[or.Accept]=this._getExistingOrDefaultHeader(t,or.Accept,sr.ApplicationJson);let n=yield this.get(e,t);return this._processResponse(n,this.requestOptions)})}postJson(e,t){return ir(this,arguments,void 0,function*(e,t,n={}){let r=JSON.stringify(t,null,2);n[or.Accept]=this._getExistingOrDefaultHeader(n,or.Accept,sr.ApplicationJson),n[or.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,sr.ApplicationJson);let i=yield this.post(e,r,n);return this._processResponse(i,this.requestOptions)})}putJson(e,t){return ir(this,arguments,void 0,function*(e,t,n={}){let r=JSON.stringify(t,null,2);n[or.Accept]=this._getExistingOrDefaultHeader(n,or.Accept,sr.ApplicationJson),n[or.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,sr.ApplicationJson);let i=yield this.put(e,r,n);return this._processResponse(i,this.requestOptions)})}patchJson(e,t){return ir(this,arguments,void 0,function*(e,t,n={}){let r=JSON.stringify(t,null,2);n[or.Accept]=this._getExistingOrDefaultHeader(n,or.Accept,sr.ApplicationJson),n[or.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,sr.ApplicationJson);let i=yield this.patch(e,r,n);return this._processResponse(i,this.requestOptions)})}request(e,t,n,r){return ir(this,void 0,void 0,function*(){if(this._disposed)throw Error(`Client has already been disposed.`);let i=new URL(t),a=this._prepareRequest(e,i,r),o=this._allowRetries&&ur.includes(e)?this._maxRetries+1:1,s=0,c;do{if(c=yield this.requestRaw(a,n),c&&c.message&&c.message.statusCode===ar.Unauthorized){let e;for(let t of this.handlers)if(t.canHandleAuthentication(c)){e=t;break}return e?e.handleAuthentication(this,a,n):c}let t=this._maxRedirects;for(;c.message.statusCode&&cr.includes(c.message.statusCode)&&this._allowRedirects&&t>0;){let o=c.message.headers.location;if(!o)break;let s=new URL(o);if(i.protocol===`https:`&&i.protocol!==s.protocol&&!this._allowRedirectDowngrade)throw Error(`Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.`);if(yield c.readBody(),s.hostname!==i.hostname)for(let e in r)e.toLowerCase()===`authorization`&&delete r[e];a=this._prepareRequest(e,s,r),c=yield this.requestRaw(a,n),t--}if(!c.message.statusCode||!lr.includes(c.message.statusCode))return c;s+=1,s{function i(e,t){e?r(e):t?n(t):r(Error(`Unknown error`))}this.requestRawWithCallback(e,t,i)})})}requestRawWithCallback(e,t,n){typeof t==`string`&&(e.options.headers||(e.options.headers={}),e.options.headers[`Content-Length`]=Buffer.byteLength(t,`utf8`));let r=!1;function i(e,t){r||(r=!0,n(e,t))}let a=e.httpModule.request(e.options,e=>{i(void 0,new fr(e))}),o;a.on(`socket`,e=>{o=e}),a.setTimeout(this._socketTimeout||3*6e4,()=>{o&&o.end(),i(Error(`Request timeout: ${e.options.path}`))}),a.on(`error`,function(e){i(e)}),t&&typeof t==`string`&&a.write(t,`utf8`),t&&typeof t!=`string`?(t.on(`close`,function(){a.end()}),t.pipe(a)):a.end()}getAgent(e){let t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){let t=new URL(e),n=st(t);if(n&&n.hostname)return this._getProxyAgentDispatcher(t,n)}_prepareRequest(e,t,n){let r={};r.parsedUrl=t;let i=r.parsedUrl.protocol===`https:`;r.httpModule=i?xe:be;let a=i?443:80;if(r.options={},r.options.host=r.parsedUrl.hostname,r.options.port=r.parsedUrl.port?parseInt(r.parsedUrl.port):a,r.options.path=(r.parsedUrl.pathname||``)+(r.parsedUrl.search||``),r.options.method=e,r.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(r.options.headers[`user-agent`]=this.userAgent),r.options.agent=this._getAgent(r.parsedUrl),this.handlers)for(let e of this.handlers)e.prepareRequest(r.options);return r}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},mr(this.requestOptions.headers),mr(e||{})):mr(e||{})}_getExistingOrDefaultHeader(e,t,n){let r;if(this.requestOptions&&this.requestOptions.headers){let e=mr(this.requestOptions.headers)[t];e&&(r=typeof e==`number`?e.toString():e)}let i=e[t];return i===void 0?r===void 0?n:r:typeof i==`number`?i.toString():i}_getExistingOrDefaultContentTypeHeader(e,t){let n;if(this.requestOptions&&this.requestOptions.headers){let e=mr(this.requestOptions.headers)[or.ContentType];e&&(n=typeof e==`number`?String(e):Array.isArray(e)?e.join(`, `):e)}let r=e[or.ContentType];return r===void 0?n===void 0?t:n:typeof r==`number`?String(r):Array.isArray(r)?r.join(`, `):r}_getAgent(e){let t,n=st(e),r=n&&n.hostname;if(this._keepAlive&&r&&(t=this._proxyAgent),r||(t=this._agent),t)return t;let i=e.protocol===`https:`,a=100;if(this.requestOptions&&(a=this.requestOptions.maxSockets||be.globalAgent.maxSockets),n&&n.hostname){let e={maxSockets:a,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})},r,o=n.protocol===`https:`;r=i?o?nr.httpsOverHttps:nr.httpsOverHttp:o?nr.httpOverHttps:nr.httpOverHttp,t=r(e),this._proxyAgent=t}if(!t){let e={keepAlive:this._keepAlive,maxSockets:a};t=i?new xe.Agent(e):new be.Agent(e),this._agent=t}return i&&this._ignoreSslError&&(t.options=Object.assign(t.options||{},{rejectUnauthorized:!1})),t}_getProxyAgentDispatcher(e,t){let n;if(this._keepAlive&&(n=this._proxyAgentDispatcher),n)return n;let r=e.protocol===`https:`;return n=new rr.ProxyAgent(Object.assign({uri:t.href,pipelining:+!!this._keepAlive},(t.username||t.password)&&{token:`Basic ${Buffer.from(`${t.username}:${t.password}`).toString(`base64`)}`})),this._proxyAgentDispatcher=n,r&&this._ignoreSslError&&(n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:!1})),n}_getUserAgentWithOrchestrationId(e){let t=e||`actions/http-client`,n=process.env.ACTIONS_ORCHESTRATION_ID;return n?`${t} actions_orchestration_id/${n.replace(/[^a-z0-9_.-]/gi,`_`)}`:t}_performExponentialBackoff(e){return ir(this,void 0,void 0,function*(){e=Math.min(10,e);let t=5*2**e;return new Promise(e=>setTimeout(()=>e(),t))})}_processResponse(e,t){return ir(this,void 0,void 0,function*(){return new Promise((n,r)=>ir(this,void 0,void 0,function*(){let i=e.message.statusCode||0,a={statusCode:i,result:null,headers:{}};i===ar.NotFound&&n(a);function o(e,t){if(typeof t==`string`){let e=new Date(t);if(!isNaN(e.valueOf()))return e}return t}let s,c;try{c=yield e.readBody(),c&&c.length>0&&(s=t&&t.deserializeDates?JSON.parse(c,o):JSON.parse(c),a.result=s),a.headers=e.message.headers}catch{}if(i>299){let e;e=s&&s.message?s.message:c&&c.length>0?c:`Failed request: (${i})`;let t=new dr(e,i);t.result=a.result,r(t)}else n(a)}))})}};const mr=e=>Object.keys(e).reduce((t,n)=>(t[n.toLowerCase()]=e[n],t),{});var hr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},gr=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error(`The request has no headers`);e.headers.Authorization=`Bearer ${this.token}`}canHandleAuthentication(){return!1}handleAuthentication(){return hr(this,void 0,void 0,function*(){throw Error(`not implemented`)})}},_r=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const{access:vr,appendFile:yr,writeFile:br}=he,xr=`GITHUB_STEP_SUMMARY`,Sr=new class{constructor(){this._buffer=``}filePath(){return _r(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[xr];if(!e)throw Error(`Unable to find environment variable for $${xr}. Check if your runtime environment supports job summaries.`);try{yield vr(e,pe.R_OK|pe.W_OK)}catch{throw Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,t,n={}){let r=Object.entries(n).map(([e,t])=>` ${e}="${t}"`).join(``);return t?`<${e}${r}>${t}`:`<${e}${r}>`}write(e){return _r(this,void 0,void 0,function*(){let t=!!e?.overwrite,n=yield this.filePath();return yield(t?br:yr)(n,this._buffer,{encoding:`utf8`}),this.emptyBuffer()})}clear(){return _r(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,t=!1){return this._buffer+=e,t?this.addEOL():this}addEOL(){return this.addRaw(ue)}addCodeBlock(e,t){let n=Object.assign({},t&&{lang:t}),r=this.wrap(`pre`,this.wrap(`code`,e),n);return this.addRaw(r).addEOL()}addList(e,t=!1){let n=t?`ol`:`ul`,r=e.map(e=>this.wrap(`li`,e)).join(``),i=this.wrap(n,r);return this.addRaw(i).addEOL()}addTable(e){let t=e.map(e=>{let t=e.map(e=>{if(typeof e==`string`)return this.wrap(`td`,e);let{header:t,data:n,colspan:r,rowspan:i}=e,a=t?`th`:`td`,o=Object.assign(Object.assign({},r&&{colspan:r}),i&&{rowspan:i});return this.wrap(a,n,o)}).join(``);return this.wrap(`tr`,t)}).join(``),n=this.wrap(`table`,t);return this.addRaw(n).addEOL()}addDetails(e,t){let n=this.wrap(`details`,this.wrap(`summary`,e)+t);return this.addRaw(n).addEOL()}addImage(e,t,n){let{width:r,height:i}=n||{},a=Object.assign(Object.assign({},r&&{width:r}),i&&{height:i}),o=this.wrap(`img`,null,Object.assign({src:e,alt:t},a));return this.addRaw(o).addEOL()}addHeading(e,t){let n=`h${t}`,r=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`].includes(n)?n:`h1`,i=this.wrap(r,e);return this.addRaw(i).addEOL()}addSeparator(){let e=this.wrap(`hr`,null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap(`br`,null);return this.addRaw(e).addEOL()}addQuote(e,t){let n=Object.assign({},t&&{cite:t}),r=this.wrap(`blockquote`,e,n);return this.addRaw(r).addEOL()}addLink(e,t){let n=this.wrap(`a`,e,{href:t});return this.addRaw(n).addEOL()}};var Cr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const{chmod:wr,copyFile:Tr,lstat:Er,mkdir:Dr,open:Or,readdir:kr,rename:Ar,rm:jr,rmdir:Mr,stat:Nr,symlink:Pr,unlink:Fr}=fe.promises,Ir=process.platform===`win32`;function Lr(e){return Cr(this,void 0,void 0,function*(){let t=yield fe.promises.readlink(e);return Ir&&!t.endsWith(`\\`)?`${t}\\`:t})}fe.constants.O_RDONLY;function Rr(e){return Cr(this,void 0,void 0,function*(){try{yield Nr(e)}catch(e){if(e.code===`ENOENT`)return!1;throw e}return!0})}function zr(e){if(e=Vr(e),!e)throw Error(`isRooted() parameter "p" cannot be empty`);return Ir?e.startsWith(`\\`)||/^[A-Z]:/i.test(e):e.startsWith(`/`)}function Br(e,t){return Cr(this,void 0,void 0,function*(){let n;try{n=yield Nr(e)}catch(t){t.code!==`ENOENT`&&console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}if(n&&n.isFile()){if(Ir){let n=U.extname(e).toUpperCase();if(t.some(e=>e.toUpperCase()===n))return e}else if(Hr(n))return e}let r=e;for(let i of t){e=r+i,n=void 0;try{n=yield Nr(e)}catch(t){t.code!==`ENOENT`&&console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}if(n&&n.isFile()){if(Ir){try{let t=U.dirname(e),n=U.basename(e).toUpperCase();for(let r of yield kr(t))if(n===r.toUpperCase()){e=U.join(t,r);break}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else if(Hr(n))return e}}return``})}function Vr(e){return e||=``,Ir?(e=e.replace(/\//g,`\\`),e.replace(/\\\\+/g,`\\`)):e.replace(/\/\/+/g,`/`)}function Hr(e){return(e.mode&1)>0||(e.mode&8)>0&&process.getgid!==void 0&&e.gid===process.getgid()||(e.mode&64)>0&&process.getuid!==void 0&&e.uid===process.getuid()}var Ur=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function Wr(e,t){return Ur(this,arguments,void 0,function*(e,t,n={}){let{force:r,recursive:i,copySourceDirectory:a}=Yr(n),o=(yield Rr(t))?yield Nr(t):null;if(o&&o.isFile()&&!r)return;let s=o&&o.isDirectory()&&a?U.join(t,U.basename(e)):t;if(!(yield Rr(e)))throw Error(`no such file or directory: ${e}`);if((yield Nr(e)).isDirectory())if(i)yield Xr(e,s,0,r);else throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);else{if(U.relative(e,s)===``)throw Error(`'${s}' and '${e}' are the same file`);yield Zr(e,s,r)}})}function Gr(e){return Ur(this,void 0,void 0,function*(){if(Ir&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield jr(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(e){throw Error(`File was unable to be removed ${e}`)}})}function Kr(e){return Ur(this,void 0,void 0,function*(){Te(e,`a path argument must be provided`),yield Dr(e,{recursive:!0})})}function qr(e,t){return Ur(this,void 0,void 0,function*(){if(!e)throw Error(`parameter 'tool' is required`);if(t){let t=yield qr(e,!1);if(!t)throw Error(Ir?`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`:`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return t}let n=yield Jr(e);return n&&n.length>0?n[0]:``})}function Jr(e){return Ur(this,void 0,void 0,function*(){if(!e)throw Error(`parameter 'tool' is required`);let t=[];if(Ir&&process.env.PATHEXT)for(let e of process.env.PATHEXT.split(U.delimiter))e&&t.push(e);if(zr(e)){let n=yield Br(e,t);return n?[n]:[]}if(e.includes(U.sep))return[];let n=[];if(process.env.PATH)for(let e of process.env.PATH.split(U.delimiter))e&&n.push(e);let r=[];for(let i of n){let n=yield Br(U.join(i,e),t);n&&r.push(n)}return r})}function Yr(e){return{force:e.force==null?!0:e.force,recursive:!!e.recursive,copySourceDirectory:e.copySourceDirectory==null?!0:!!e.copySourceDirectory}}function Xr(e,t,n,r){return Ur(this,void 0,void 0,function*(){if(n>=255)return;n++,yield Kr(t);let i=yield kr(e);for(let a of i){let i=`${e}/${a}`,o=`${t}/${a}`;(yield Er(i)).isDirectory()?yield Xr(i,o,n,r):yield Zr(i,o,r)}yield wr(t,(yield Nr(e)).mode)})}function Zr(e,t,n){return Ur(this,void 0,void 0,function*(){if((yield Er(e)).isSymbolicLink()){try{yield Er(t),yield Fr(t)}catch(e){e.code===`EPERM`&&(yield wr(t,`0666`),yield Fr(t))}yield Pr(yield Lr(e),t,Ir?`junction`:null)}else (!(yield Rr(t))||n)&&(yield Tr(e,t))})}var Qr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const $r=process.platform===`win32`;var ei=class extends Se.EventEmitter{constructor(e,t,n){if(super(),!e)throw Error(`Parameter 'toolPath' cannot be null or empty.`);this.toolPath=e,this.args=t||[],this.options=n||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,t){let n=this._getSpawnFileName(),r=this._getSpawnArgs(e),i=t?``:`[command]`;if($r)if(this._isCmdFile()){i+=n;for(let e of r)i+=` ${e}`}else if(e.windowsVerbatimArguments){i+=`"${n}"`;for(let e of r)i+=` ${e}`}else{i+=this._windowsQuoteCmdArg(n);for(let e of r)i+=` ${this._windowsQuoteCmdArg(e)}`}else{i+=n;for(let e of r)i+=` ${e}`}return i}_processLineBuffer(e,t,n){try{let r=t+e.toString(),i=r.indexOf(ce.EOL);for(;i>-1;)n(r.substring(0,i)),r=r.substring(i+ce.EOL.length),i=r.indexOf(ce.EOL);return r}catch(e){return this._debug(`error processing line. Failed with error ${e}`),``}}_getSpawnFileName(){return $r&&this._isCmdFile()?process.env.COMSPEC||`cmd.exe`:this.toolPath}_getSpawnArgs(e){if($r&&this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let n of this.args)t+=` `,t+=e.windowsVerbatimArguments?n:this._windowsQuoteCmdArg(n);return t+=`"`,[t]}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){let e=this.toolPath.toUpperCase();return this._endsWith(e,`.CMD`)||this._endsWith(e,`.BAT`)}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return`""`;let t=[` `,` `,`&`,`(`,`)`,`[`,`]`,`{`,`}`,`^`,`=`,`;`,`!`,`'`,`+`,`,`,"`",`~`,`|`,`<`,`>`,`"`],n=!1;for(let r of e)if(t.some(e=>e===r)){n=!0;break}if(!n)return e;let r=`"`,i=!0;for(let t=e.length;t>0;t--)r+=e[t-1],i&&e[t-1]===`\\`?r+=`\\`:e[t-1]===`"`?(i=!0,r+=`"`):i=!1;return r+=`"`,r.split(``).reverse().join(``)}_uvQuoteCmdArg(e){if(!e)return`""`;if(!e.includes(` `)&&!e.includes(` `)&&!e.includes(`"`))return e;if(!e.includes(`"`)&&!e.includes(`\\`))return`"${e}"`;let t=`"`,n=!0;for(let r=e.length;r>0;r--)t+=e[r-1],n&&e[r-1]===`\\`?t+=`\\`:e[r-1]===`"`?(n=!0,t+=`\\`):n=!1;return t+=`"`,t.split(``).reverse().join(``)}_cloneExecOptions(e){e||={};let t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return t.outStream=e.outStream||process.stdout,t.errStream=e.errStream||process.stderr,t}_getSpawnOptions(e,t){e||={};let n={};return n.cwd=e.cwd,n.env=e.env,n.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(n.argv0=`"${t}"`),n}exec(){return Qr(this,void 0,void 0,function*(){return!zr(this.toolPath)&&(this.toolPath.includes(`/`)||$r&&this.toolPath.includes(`\\`))&&(this.toolPath=U.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield qr(this.toolPath,!0),new Promise((e,t)=>Qr(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug(`arguments:`);for(let e of this.args)this._debug(` ${e}`);let n=this._cloneExecOptions(this.options);!n.silent&&n.outStream&&n.outStream.write(this._getCommandString(n)+ce.EOL);let r=new ni(n,this.toolPath);if(r.on(`debug`,e=>{this._debug(e)}),this.options.cwd&&!(yield Rr(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));let i=this._getSpawnFileName(),a=Ie.spawn(i,this._getSpawnArgs(n),this._getSpawnOptions(this.options,i)),o=``;a.stdout&&a.stdout.on(`data`,e=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(e),!n.silent&&n.outStream&&n.outStream.write(e),o=this._processLineBuffer(e,o,e=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(e)})});let s=``;if(a.stderr&&a.stderr.on(`data`,e=>{r.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(e),!n.silent&&n.errStream&&n.outStream&&(n.failOnStdErr?n.errStream:n.outStream).write(e),s=this._processLineBuffer(e,s,e=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(e)})}),a.on(`error`,e=>{r.processError=e.message,r.processExited=!0,r.processClosed=!0,r.CheckComplete()}),a.on(`exit`,e=>{r.processExitCode=e,r.processExited=!0,this._debug(`Exit code ${e} received from tool '${this.toolPath}'`),r.CheckComplete()}),a.on(`close`,e=>{r.processExitCode=e,r.processExited=!0,r.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),r.CheckComplete()}),r.on(`done`,(n,r)=>{o.length>0&&this.emit(`stdline`,o),s.length>0&&this.emit(`errline`,s),a.removeAllListeners(),n?t(n):e(r)}),this.options.input){if(!a.stdin)throw Error(`child process missing stdin`);a.stdin.end(this.options.input)}}))})}};function ti(e){let t=[],n=!1,r=!1,i=``;function a(e){r&&e!==`"`&&(i+=`\\`),i+=e,r=!1}for(let o=0;o0&&(t.push(i),i=``);continue}a(s)}return i.length>0&&t.push(i.trim()),t}var ni=class e extends Se.EventEmitter{constructor(e,t){if(super(),this.processClosed=!1,this.processError=``,this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!t)throw Error(`toolPath must not be empty`);this.options=e,this.toolPath=t,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=Le(e.HandleTimeout,this.delay,this)))}_debug(e){this.emit(`debug`,e)}_setResult(){let e;this.processExited&&(this.processError?e=Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):this.processExitCode!==0&&!this.options.ignoreReturnCode?e=Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(e=Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`))),this.timeout&&=(clearTimeout(this.timeout),null),this.done=!0,this.emit(`done`,e,this.processExitCode)}static HandleTimeout(e){if(!e.done){if(!e.processClosed&&e.processExited){let t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},ri=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function ii(e,t,n){return ri(this,void 0,void 0,function*(){let r=ti(e);if(r.length===0)throw Error(`Parameter 'commandLine' cannot be null or empty.`);let i=r[0];return t=r.slice(1).concat(t||[]),new ei(i,t,n).exec()})}function ai(e,t,n){return ri(this,void 0,void 0,function*(){let r=``,i=``,a=new Fe(`utf8`),o=new Fe(`utf8`),s=n?.listeners?.stdout,c=n?.listeners?.stderr,l=Object.assign(Object.assign({},n?.listeners),{stdout:e=>{r+=a.write(e),s&&s(e)},stderr:e=>{i+=o.write(e),c&&c(e)}}),u=yield ii(e,t,Object.assign(Object.assign({},n),{listeners:l}));return r+=a.end(),i+=o.end(),{exitCode:u,stdout:r,stderr:i}})}le.platform(),le.arch();var oi;(function(e){e[e.Success=0]=`Success`,e[e.Failure=1]=`Failure`})(oi||={});function si(e,t){let n=$e(t);if(process.env[e]=n,process.env.GITHUB_ENV)return at(`ENV`,ot(e,t));tt(`set-env`,{name:e},n)}function ci(e){tt(`add-mask`,{},e)}function li(e){process.env.GITHUB_PATH?at(`PATH`,e):tt(`add-path`,{},e),process.env.PATH=`${e}${U.delimiter}${process.env.PATH}`}function ui(e,t){let n=process.env[`INPUT_${e.replace(/ /g,`_`).toUpperCase()}`]||``;if(t&&t.required&&!n)throw Error(`Input required and not supplied: ${e}`);return t&&t.trimWhitespace===!1?n:n.trim()}function di(e,t){if(process.env.GITHUB_OUTPUT)return at(`OUTPUT`,ot(e,t));process.stdout.write(ce.EOL),tt(`set-output`,{name:e},$e(t))}function fi(e){process.exitCode=oi.Failure,mi(e)}function pi(){return process.env.RUNNER_DEBUG===`1`}function K(e){tt(`debug`,{},e)}function mi(e,t={}){tt(`error`,et(t),e instanceof Error?e.toString():e)}function hi(e,t={}){tt(`warning`,et(t),e instanceof Error?e.toString():e)}function gi(e){process.stdout.write(e+ce.EOL)}function _i(e,t){if(process.env.GITHUB_STATE)return at(`STATE`,ot(e,t));tt(`save-state`,{name:e},$e(t))}function vi(e){return process.env[`STATE_${e}`]||``}function yi(e){return e instanceof Error?e.message:String(e)}const bi=[`token`,`password`,`secret`,`key`,`auth`,`credential`,`bearer`,`apikey`,`api_key`,`access_token`,`refresh_token`,`private`];function xi(e,t){let n=e.toLowerCase();return t.some(e=>n.includes(e.toLowerCase()))}function Si(e,t=bi){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return e.map(e=>Si(e,t));let n={};for(let[r,i]of Object.entries(e))xi(r,t)&&typeof i==`string`?n[r]=`[REDACTED]`:typeof i==`object`&&i?n[r]=Si(i,t):n[r]=i;return n}function Ci(e,t,n,r){let i=Si({...n,...r}),a={timestamp:new Date().toISOString(),level:e,message:t,...i};if(r!=null&&`error`in r&&r.error instanceof Error){let e=r.error;a.error={message:e.message,name:e.name,stack:e.stack}}return JSON.stringify(a)}function wi(e){return{debug:(t,n)=>{K(Ci(`debug`,t,e,n))},info:(t,n)=>{gi(Ci(`info`,t,e,n))},warning:(t,n)=>{hi(Ci(`warning`,t,e,n))},error:(t,n)=>{mi(Ci(`error`,t,e,n))}}}const Ti={SHOULD_SAVE_CACHE:`shouldSaveCache`,SESSION_ID:`sessionId`,CACHE_SAVED:`cacheSaved`,ARTIFACT_UPLOADED:`artifactUploaded`,OPENCODE_VERSION:`opencodeVersion`,S3_ENABLED:`storeConfig.enabled`,S3_BUCKET:`storeConfig.bucket`,S3_REGION:`storeConfig.region`,S3_PREFIX:`storeConfig.prefix`,S3_ENDPOINT:`storeConfig.endpoint`,S3_EXPECTED_BUCKET_OWNER:`storeConfig.expectedBucketOwner`,S3_ALLOW_INSECURE_ENDPOINT:`storeConfig.allowInsecureEndpoint`,S3_SSE_ENCRYPTION:`storeConfig.sseEncryption`,S3_SSE_KMS_KEY_ID:`storeConfig.sseKmsKeyId`},Ei=`sisyphus`,Di=18e5,Oi={providerID:`opencode`,modelID:`big-pickle`},ki=`1.14.20`,Ai=`1.3.13`,ji=`3.17.4`,Mi=`2.4.1`,Ni=`opencode-storage`,Pi=`fro-bot-state`,Fi=`opencode-tools`,Ii=6e5,Li=`fro-bot-dedup-v1`;function Ri(){let e=se.env.XDG_DATA_HOME;return e!=null&&e.trim().length>0?e:ze.join(Be.homedir(),`.local`,`share`)}function zi(){return ze.join(Ri(),`opencode`,`storage`)}function Bi(){return ze.join(Ri(),`opencode`,`auth.json`)}function Vi(){return ze.join(Ri(),`opencode`,`log`)}function Hi(){let e=se.env.OPENCODE_PROMPT_ARTIFACT;return e===`true`||e===`1`}function Ui(){let e=se.env.RUNNER_OS;if(e!=null&&e.trim().length>0)return e;switch(Be.platform()){case`darwin`:return`macOS`;case`win32`:return`Windows`;case`aix`:case`android`:case`freebsd`:case`haiku`:case`linux`:case`openbsd`:case`sunos`:case`cygwin`:case`netbsd`:return`Linux`}}function Wi(){let e=se.env.GITHUB_REPOSITORY;return e!=null&&e.trim().length>0?e:`unknown/unknown`}function Gi(){let e=se.env.GITHUB_REF_NAME;return e!=null&&e.trim().length>0?e:`main`}function Ki(){let e=se.env.GITHUB_RUN_ID;return e!=null&&e.trim().length>0?Number(e):0}function qi(){let e=se.env.GITHUB_RUN_ATTEMPT;if(e!=null&&e.trim().length>0){let t=Number(e);if(Number.isFinite(t)&&t>0)return t}return 1}function q(){let e=se.env.GITHUB_WORKSPACE;return e!=null&&e.trim().length>0?e:se.cwd()}var Ji=class{constructor(){if(this.payload={},process.env.GITHUB_EVENT_PATH)if(me(process.env.GITHUB_EVENT_PATH))this.payload=JSON.parse(ge(process.env.GITHUB_EVENT_PATH,{encoding:`utf8`}));else{let e=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${e} does not exist${ue}`)}this.eventName=process.env.GITHUB_EVENT_NAME,this.sha=process.env.GITHUB_SHA,this.ref=process.env.GITHUB_REF,this.workflow=process.env.GITHUB_WORKFLOW,this.action=process.env.GITHUB_ACTION,this.actor=process.env.GITHUB_ACTOR,this.job=process.env.GITHUB_JOB,this.runAttempt=parseInt(process.env.GITHUB_RUN_ATTEMPT,10),this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10),this.runId=parseInt(process.env.GITHUB_RUN_ID,10),this.apiUrl=process.env.GITHUB_API_URL??`https://api.github.com`,this.serverUrl=process.env.GITHUB_SERVER_URL??`https://github.com`,this.graphqlUrl=process.env.GITHUB_GRAPHQL_URL??`https://api.github.com/graphql`}get issue(){let e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){let[e,t]=process.env.GITHUB_REPOSITORY.split(`/`);return{owner:e,repo:t}}if(this.payload.repository)return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name};throw Error(`context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'`)}},Yi=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getProxyUrl=t,e.checkBypass=n;function t(e){let t=e.protocol===`https:`;if(n(e))return;let r=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new i(r)}catch{if(!r.startsWith(`http://`)&&!r.startsWith(`https://`))return new i(`http://${r}`)}else return}function n(e){if(!e.hostname)return!1;let t=e.hostname;if(r(t))return!0;let n=process.env.no_proxy||process.env.NO_PROXY||``;if(!n)return!1;let i;e.port?i=Number(e.port):e.protocol===`http:`?i=80:e.protocol===`https:`&&(i=443);let a=[e.hostname.toUpperCase()];typeof i==`number`&&a.push(`${a[0]}:${i}`);for(let e of n.split(`,`).map(e=>e.trim().toUpperCase()).filter(e=>e))if(e===`*`||a.some(t=>t===e||t.endsWith(`.${e}`)||e.startsWith(`.`)&&t.endsWith(`${e}`)))return!0;return!1}function r(e){let t=e.toLowerCase();return t===`localhost`||t.startsWith(`127.`)||t.startsWith(`[::1]`)||t.startsWith(`[0:0:0:0:0:0:0:1]`)}var i=class extends URL{constructor(e,t){super(e,t),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}})),J=n(i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var a=e(t),o=0;oa(this,void 0,void 0,function*(){let t=Buffer.alloc(0);this.message.on(`data`,e=>{t=Buffer.concat([t,e])}),this.message.on(`end`,()=>{e(t.toString())})}))})}readBodyBuffer(){return a(this,void 0,void 0,function*(){return new Promise(e=>a(this,void 0,void 0,function*(){let t=[];this.message.on(`data`,e=>{t.push(e)}),this.message.on(`end`,()=>{e(Buffer.concat(t))})}))})}};e.HttpClientResponse=b;function x(e){return new URL(e).protocol===`https:`}e.HttpClient=class{constructor(e,t,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=this._getUserAgentWithOrchestrationId(e),this.handlers=t||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries))}options(e,t){return a(this,void 0,void 0,function*(){return this.request(`OPTIONS`,e,null,t||{})})}get(e,t){return a(this,void 0,void 0,function*(){return this.request(`GET`,e,null,t||{})})}del(e,t){return a(this,void 0,void 0,function*(){return this.request(`DELETE`,e,null,t||{})})}post(e,t,n){return a(this,void 0,void 0,function*(){return this.request(`POST`,e,t,n||{})})}patch(e,t,n){return a(this,void 0,void 0,function*(){return this.request(`PATCH`,e,t,n||{})})}put(e,t,n){return a(this,void 0,void 0,function*(){return this.request(`PUT`,e,t,n||{})})}head(e,t){return a(this,void 0,void 0,function*(){return this.request(`HEAD`,e,null,t||{})})}sendStream(e,t,n,r){return a(this,void 0,void 0,function*(){return this.request(e,t,n,r)})}getJson(e){return a(this,arguments,void 0,function*(e,t={}){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);let n=yield this.get(e,t);return this._processResponse(n,this.requestOptions)})}postJson(e,t){return a(this,arguments,void 0,function*(e,t,n={}){let r=JSON.stringify(t,null,2);n[f.Accept]=this._getExistingOrDefaultHeader(n,f.Accept,p.ApplicationJson),n[f.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,p.ApplicationJson);let i=yield this.post(e,r,n);return this._processResponse(i,this.requestOptions)})}putJson(e,t){return a(this,arguments,void 0,function*(e,t,n={}){let r=JSON.stringify(t,null,2);n[f.Accept]=this._getExistingOrDefaultHeader(n,f.Accept,p.ApplicationJson),n[f.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,p.ApplicationJson);let i=yield this.put(e,r,n);return this._processResponse(i,this.requestOptions)})}patchJson(e,t){return a(this,arguments,void 0,function*(e,t,n={}){let r=JSON.stringify(t,null,2);n[f.Accept]=this._getExistingOrDefaultHeader(n,f.Accept,p.ApplicationJson),n[f.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,p.ApplicationJson);let i=yield this.patch(e,r,n);return this._processResponse(i,this.requestOptions)})}request(e,t,n,r){return a(this,void 0,void 0,function*(){if(this._disposed)throw Error(`Client has already been disposed.`);let i=new URL(t),a=this._prepareRequest(e,i,r),o=this._allowRetries&&v.includes(e)?this._maxRetries+1:1,s=0,c;do{if(c=yield this.requestRaw(a,n),c&&c.message&&c.message.statusCode===d.Unauthorized){let e;for(let t of this.handlers)if(t.canHandleAuthentication(c)){e=t;break}return e?e.handleAuthentication(this,a,n):c}let t=this._maxRedirects;for(;c.message.statusCode&&h.includes(c.message.statusCode)&&this._allowRedirects&&t>0;){let o=c.message.headers.location;if(!o)break;let s=new URL(o);if(i.protocol===`https:`&&i.protocol!==s.protocol&&!this._allowRedirectDowngrade)throw Error(`Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.`);if(yield c.readBody(),s.hostname!==i.hostname)for(let e in r)e.toLowerCase()===`authorization`&&delete r[e];a=this._prepareRequest(e,s,r),c=yield this.requestRaw(a,n),t--}if(!c.message.statusCode||!g.includes(c.message.statusCode))return c;s+=1,s{function i(e,t){e?r(e):t?n(t):r(Error(`Unknown error`))}this.requestRawWithCallback(e,t,i)})})}requestRawWithCallback(e,t,n){typeof t==`string`&&(e.options.headers||(e.options.headers={}),e.options.headers[`Content-Length`]=Buffer.byteLength(t,`utf8`));let r=!1;function i(e,t){r||(r=!0,n(e,t))}let a=e.httpModule.request(e.options,e=>{i(void 0,new b(e))}),o;a.on(`socket`,e=>{o=e}),a.setTimeout(this._socketTimeout||3*6e4,()=>{o&&o.end(),i(Error(`Request timeout: ${e.options.path}`))}),a.on(`error`,function(e){i(e)}),t&&typeof t==`string`&&a.write(t,`utf8`),t&&typeof t!=`string`?(t.on(`close`,function(){a.end()}),t.pipe(a)):a.end()}getAgent(e){let t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){let t=new URL(e),n=c.getProxyUrl(t);if(n&&n.hostname)return this._getProxyAgentDispatcher(t,n)}_prepareRequest(e,t,n){let r={};r.parsedUrl=t;let i=r.parsedUrl.protocol===`https:`;r.httpModule=i?s:o;let a=i?443:80;if(r.options={},r.options.host=r.parsedUrl.hostname,r.options.port=r.parsedUrl.port?parseInt(r.parsedUrl.port):a,r.options.path=(r.parsedUrl.pathname||``)+(r.parsedUrl.search||``),r.options.method=e,r.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(r.options.headers[`user-agent`]=this.userAgent),r.options.agent=this._getAgent(r.parsedUrl),this.handlers)for(let e of this.handlers)e.prepareRequest(r.options);return r}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},S(this.requestOptions.headers),S(e||{})):S(e||{})}_getExistingOrDefaultHeader(e,t,n){let r;if(this.requestOptions&&this.requestOptions.headers){let e=S(this.requestOptions.headers)[t];e&&(r=typeof e==`number`?e.toString():e)}let i=e[t];return i===void 0?r===void 0?n:r:typeof i==`number`?i.toString():i}_getExistingOrDefaultContentTypeHeader(e,t){let n;if(this.requestOptions&&this.requestOptions.headers){let e=S(this.requestOptions.headers)[f.ContentType];e&&(n=typeof e==`number`?String(e):Array.isArray(e)?e.join(`, `):e)}let r=e[f.ContentType];return r===void 0?n===void 0?t:n:typeof r==`number`?String(r):Array.isArray(r)?r.join(`, `):r}_getAgent(e){let t,n=c.getProxyUrl(e),r=n&&n.hostname;if(this._keepAlive&&r&&(t=this._proxyAgent),r||(t=this._agent),t)return t;let i=e.protocol===`https:`,a=100;if(this.requestOptions&&(a=this.requestOptions.maxSockets||o.globalAgent.maxSockets),n&&n.hostname){let e={maxSockets:a,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})},r,o=n.protocol===`https:`;r=i?o?l.httpsOverHttps:l.httpsOverHttp:o?l.httpOverHttps:l.httpOverHttp,t=r(e),this._proxyAgent=t}if(!t){let e={keepAlive:this._keepAlive,maxSockets:a};t=i?new s.Agent(e):new o.Agent(e),this._agent=t}return i&&this._ignoreSslError&&(t.options=Object.assign(t.options||{},{rejectUnauthorized:!1})),t}_getProxyAgentDispatcher(e,t){let n;if(this._keepAlive&&(n=this._proxyAgentDispatcher),n)return n;let r=e.protocol===`https:`;return n=new u.ProxyAgent(Object.assign({uri:t.href,pipelining:+!!this._keepAlive},(t.username||t.password)&&{token:`Basic ${Buffer.from(`${t.username}:${t.password}`).toString(`base64`)}`})),this._proxyAgentDispatcher=n,r&&this._ignoreSslError&&(n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:!1})),n}_getUserAgentWithOrchestrationId(e){let t=e||`actions/http-client`,n=process.env.ACTIONS_ORCHESTRATION_ID;return n?`${t} actions_orchestration_id/${n.replace(/[^a-z0-9_.-]/gi,`_`)}`:t}_performExponentialBackoff(e){return a(this,void 0,void 0,function*(){e=Math.min(10,e);let t=5*2**e;return new Promise(e=>setTimeout(()=>e(),t))})}_processResponse(e,t){return a(this,void 0,void 0,function*(){return new Promise((n,r)=>a(this,void 0,void 0,function*(){let i=e.message.statusCode||0,a={statusCode:i,result:null,headers:{}};i===d.NotFound&&n(a);function o(e,t){if(typeof t==`string`){let e=new Date(t);if(!isNaN(e.valueOf()))return e}return t}let s,c;try{c=yield e.readBody(),c&&c.length>0&&(s=t&&t.deserializeDates?JSON.parse(c,o):JSON.parse(c),a.result=s),a.headers=e.message.headers}catch{}if(i>299){let e;e=s&&s.message?s.message:c&&c.length>0?c:`Failed request: (${i})`;let t=new y(e,i);t.result=a.result,r(t)}else n(a)}))})}};let S=e=>Object.keys(e).reduce((t,n)=>(t[n.toLowerCase()]=e[n],t),{})}))(),1),Xi=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function Zi(e,t){if(!e&&!t.auth)throw Error(`Parameter token or opts.auth is required`);if(e&&t.auth)throw Error(`Parameters token and opts.auth may not both be specified`);return typeof t.auth==`string`?t.auth:`token ${e}`}function Y(e){return new J.HttpClient().getAgent(e)}function Qi(e){return new J.HttpClient().getAgentDispatcher(e)}function $i(e){let t=Qi(e);return(e,n)=>Xi(this,void 0,void 0,function*(){return(0,rr.fetch)(e,Object.assign(Object.assign({},n),{dispatcher:t}))})}function ea(){return process.env.GITHUB_API_URL||`https://api.github.com`}function ta(e){let t=process.env.ACTIONS_ORCHESTRATION_ID?.trim();if(t){let n=`actions_orchestration_id/${t.replace(/[^a-z0-9_.-]/gi,`_`)}`;return e?.includes(n)?e:`${e?`${e} `:``}${n}`}return e}function na(){return typeof navigator==`object`&&`userAgent`in navigator?navigator.userAgent:typeof process==`object`&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:``}function ra(e,t,n,r){if(typeof n!=`function`)throw Error(`method for before hook must be a function`);return r||={},Array.isArray(t)?t.reverse().reduce((t,n)=>ra.bind(null,e,n,t,r),n)():Promise.resolve().then(()=>e.registry[t]?e.registry[t].reduce((e,t)=>t.hook.bind(null,e,r),n)():n(r))}function ia(e,t,n,r){let i=r;e.registry[n]||(e.registry[n]=[]),t===`before`&&(r=(e,t)=>Promise.resolve().then(i.bind(null,t)).then(e.bind(null,t))),t===`after`&&(r=(e,t)=>{let n;return Promise.resolve().then(e.bind(null,t)).then(e=>(n=e,i(n,t))).then(()=>n)}),t===`error`&&(r=(e,t)=>Promise.resolve().then(e.bind(null,t)).catch(e=>i(e,t))),e.registry[n].push({hook:r,orig:i})}function aa(e,t,n){if(!e.registry[t])return;let r=e.registry[t].map(e=>e.orig).indexOf(n);r!==-1&&e.registry[t].splice(r,1)}const oa=Function.bind,sa=oa.bind(oa);function ca(e,t,n){let r=sa(aa,null).apply(null,n?[t,n]:[t]);e.api={remove:r},e.remove=r,[`before`,`error`,`after`,`wrap`].forEach(r=>{let i=n?[t,r,n]:[t,r];e[r]=e.api[r]=sa(ia,null).apply(null,i)})}function la(){let e=Symbol(`Singular`),t={registry:{}},n=ra.bind(null,t,e);return ca(n,t,e),n}function ua(){let e={registry:{}},t=ra.bind(null,e);return ca(t,e),t}var da={Singular:la,Collection:ua},fa={method:`GET`,baseUrl:`https://api.github.com`,headers:{accept:`application/vnd.github.v3+json`,"user-agent":`octokit-endpoint.js/0.0.0-development ${na()}`},mediaType:{format:``}};function pa(e){return e?Object.keys(e).reduce((t,n)=>(t[n.toLowerCase()]=e[n],t),{}):{}}function X(e){if(typeof e!=`object`||!e||Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=Object.prototype.hasOwnProperty.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Function.prototype.call(n)===Function.prototype.call(e)}function ma(e,t){let n=Object.assign({},e);return Object.keys(t).forEach(r=>{X(t[r])&&r in e?n[r]=ma(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}function ha(e){for(let t in e)e[t]===void 0&&delete e[t];return e}function ga(e,t,n){if(typeof t==`string`){let[e,r]=t.split(` `);n=Object.assign(r?{method:e,url:r}:{url:e},n)}else n=Object.assign({},t);n.headers=pa(n.headers),ha(n),ha(n.headers);let r=ma(e||{},n);return n.url===`/graphql`&&(e&&e.mediaType.previews?.length&&(r.mediaType.previews=e.mediaType.previews.filter(e=>!r.mediaType.previews.includes(e)).concat(r.mediaType.previews)),r.mediaType.previews=(r.mediaType.previews||[]).map(e=>e.replace(/-preview/,``))),r}function _a(e,t){let n=/\?/.test(e)?`&`:`?`,r=Object.keys(t);return r.length===0?e:e+n+r.map(e=>e===`q`?`q=`+t.q.split(`+`).map(encodeURIComponent).join(`+`):`${e}=${encodeURIComponent(t[e])}`).join(`&`)}var va=/\{[^{}}]+\}/g;function ya(e){return e.replace(/(?:^\W+)|(?:(?e.concat(t),[]):[]}function xa(e,t){let n={__proto__:null};for(let r of Object.keys(e))t.indexOf(r)===-1&&(n[r]=e[r]);return n}function Sa(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,`[`).replace(/%5D/g,`]`)),e}).join(``)}function Ca(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return`%`+e.charCodeAt(0).toString(16).toUpperCase()})}function wa(e,t,n){return t=e===`+`||e===`#`?Sa(t):Ca(t),n?Ca(n)+`=`+t:t}function Ta(e){return e!=null}function Ea(e){return e===`;`||e===`&`||e===`?`}function Da(e,t,n,r){var i=e[n],a=[];if(Ta(i)&&i!==``)if(typeof i==`string`||typeof i==`number`||typeof i==`bigint`||typeof i==`boolean`)i=i.toString(),r&&r!==`*`&&(i=i.substring(0,parseInt(r,10))),a.push(wa(t,i,Ea(t)?n:``));else if(r===`*`)Array.isArray(i)?i.filter(Ta).forEach(function(e){a.push(wa(t,e,Ea(t)?n:``))}):Object.keys(i).forEach(function(e){Ta(i[e])&&a.push(wa(t,i[e],e))});else{let e=[];Array.isArray(i)?i.filter(Ta).forEach(function(n){e.push(wa(t,n))}):Object.keys(i).forEach(function(n){Ta(i[n])&&(e.push(Ca(n)),e.push(wa(t,i[n].toString())))}),Ea(t)?a.push(Ca(n)+`=`+e.join(`,`)):e.length!==0&&a.push(e.join(`,`))}else t===`;`?Ta(i)&&a.push(Ca(n)):i===``&&(t===`&`||t===`?`)?a.push(Ca(n)+`=`):i===``&&a.push(``);return a}function Oa(e){return{expand:ka.bind(null,e)}}function ka(e,t){var n=[`+`,`#`,`.`,`/`,`;`,`?`,`&`];return e=e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(e,r,i){if(r){let e=``,i=[];if(n.indexOf(r.charAt(0))!==-1&&(e=r.charAt(0),r=r.substr(1)),r.split(/,/g).forEach(function(n){var r=/([^:\*]*)(?::(\d+)|(\*))?/.exec(n);i.push(Da(t,e,r[1],r[2]||r[3]))}),e&&e!==`+`){var a=`,`;return e===`?`?a=`&`:e!==`#`&&(a=e),(i.length===0?``:e)+i.join(a)}else return i.join(`,`)}else return Sa(i)}),e===`/`?e:e.replace(/\/$/,``)}function Aa(e){let t=e.method.toUpperCase(),n=(e.url||`/`).replace(/:([a-z]\w+)/g,`{$1}`),r=Object.assign({},e.headers),i,a=xa(e,[`method`,`baseUrl`,`url`,`headers`,`request`,`mediaType`]),o=ba(n);n=Oa(n).expand(a),/^http/.test(n)||(n=e.baseUrl+n);let s=xa(a,Object.keys(e).filter(e=>o.includes(e)).concat(`baseUrl`));return/application\/octet-stream/i.test(r.accept)||(e.mediaType.format&&(r.accept=r.accept.split(/,/).map(t=>t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`)).join(`,`)),n.endsWith(`/graphql`)&&e.mediaType.previews?.length&&(r.accept=(r.accept.match(/(?`application/vnd.github.${t}-preview${e.mediaType.format?`.${e.mediaType.format}`:`+json`}`).join(`,`))),[`GET`,`HEAD`].includes(t)?n=_a(n,s):`data`in s?i=s.data:Object.keys(s).length&&(i=s),!r[`content-type`]&&i!==void 0&&(r[`content-type`]=`application/json; charset=utf-8`),[`PATCH`,`PUT`].includes(t)&&i===void 0&&(i=``),Object.assign({method:t,url:n,headers:r},i===void 0?null:{body:i},e.request?{request:e.request}:null)}function ja(e,t,n){return Aa(ga(e,t,n))}function Ma(e,t){let n=ga(e,t),r=ja.bind(null,n);return Object.assign(r,{DEFAULTS:n,defaults:Ma.bind(null,n),merge:ga.bind(null,n),parse:Aa})}var Na=Ma(null,fa),Pa=i(((e,t)=>{let n=function(){};n.prototype=Object.create(null);let r=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,i=/\\([\v\u0020-\u00ff])/gu,a=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,o={type:``,parameters:new n};Object.freeze(o.parameters),Object.freeze(o);function s(e){if(typeof e!=`string`)throw TypeError(`argument header is required and must be a string`);let t=e.indexOf(`;`),o=t===-1?e.trim():e.slice(0,t).trim();if(a.test(o)===!1)throw TypeError(`invalid media type`);let s={type:o.toLowerCase(),parameters:new n};if(t===-1)return s;let c,l,u;for(r.lastIndex=t;l=r.exec(e);){if(l.index!==t)throw TypeError(`invalid parameter format`);t+=l[0].length,c=l[1].toLowerCase(),u=l[2],u[0]===`"`&&(u=u.slice(1,u.length-1),i.test(u)&&(u=u.replace(i,`$1`))),s.parameters[c]=u}if(t!==e.length)throw TypeError(`invalid parameter format`);return s}function c(e){if(typeof e!=`string`)return o;let t=e.indexOf(`;`),s=t===-1?e.trim():e.slice(0,t).trim();if(a.test(s)===!1)return o;let c={type:s.toLowerCase(),parameters:new n};if(t===-1)return c;let l,u,d;for(r.lastIndex=t;u=r.exec(e);){if(u.index!==t)return o;t+=u[0].length,l=u[1].toLowerCase(),d=u[2],d[0]===`"`&&(d=d.slice(1,d.length-1),i.test(d)&&(d=d.replace(i,`$1`))),c.parameters[l]=d}return t===e.length?c:o}t.exports.default={parse:s,safeParse:c},t.exports.parse=s,t.exports.safeParse=c,t.exports.defaultContentType=o}))();const Fa=/^-?\d+$/,Ia=/^-?\d+n+$/,La=JSON.stringify,Ra=JSON.parse,za=/^-?\d+n$/,Z=/([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g,Ba=/([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g,Va=(e,t,n)=>`rawJSON`in JSON?La(e,(e,n)=>typeof n==`bigint`?JSON.rawJSON(n.toString()):typeof t==`function`?t(e,n):(Array.isArray(t)&&t.includes(e),n),n):e?La(e,(e,n)=>typeof n==`string`&&n.match(Ia)||typeof n==`bigint`?n.toString()+`n`:typeof t==`function`?t(e,n):(Array.isArray(t)&&t.includes(e),n),n).replace(Z,`$1$2$3`).replace(Ba,`$1$2$3`):La(e,t,n),Ha=()=>JSON.parse(`1`,(e,t,n)=>!!n&&n.source===`1`),Ua=(e,t,n,r)=>typeof t==`string`&&t.match(za)?BigInt(t.slice(0,-1)):typeof t==`string`&&t.match(Ia)?t.slice(0,-1):typeof r==`function`?r(e,t,n):t,Wa=(e,t)=>JSON.parse(e,(e,n,r)=>{let i=typeof n==`number`&&(n>2**53-1||n<-(2**53-1)),a=r&&Fa.test(r.source);return i&&a?BigInt(r.source):typeof t==`function`?t(e,n,r):n}),Ga=(2**53-1).toString(),Ka=Ga.length,qa=/"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g,Ja=/^"-?\d+n+"$/,Ya=(e,t)=>e?Ha()?Wa(e,t):Ra(e.replace(qa,(e,t,n,r)=>{let i=e[0]===`"`;if(i&&e.match(Ja))return e.substring(0,e.length-1)+`n"`;let a=n||r,o=t&&(t.lengthUa(e,n,r,t)):Ra(e,t);var Xa=class extends Error{name;status;request;response;constructor(e,t,n){super(e,{cause:n.cause}),this.name=`HttpError`,this.status=Number.parseInt(t),Number.isNaN(this.status)&&(this.status=0),`response`in n&&(this.response=n.response);let r=Object.assign({},n.request);n.request.headers.authorization&&(r.headers=Object.assign({},n.request.headers,{authorization:n.request.headers.authorization.replace(/(?``;async function eo(e){let t=e.request?.fetch||globalThis.fetch;if(!t)throw Error(`fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing`);let n=e.request?.log||console,r=e.request?.parseSuccessResponseBody!==!1,i=Qa(e.body)||Array.isArray(e.body)?Va(e.body):e.body,a=Object.fromEntries(Object.entries(e.headers).map(([e,t])=>[e,String(t)])),o;try{o=await t(e.url,{method:e.method,body:i,redirect:e.request?.redirect,headers:a,signal:e.request?.signal,...e.body&&{duplex:`half`}})}catch(t){let n=`Unknown Error`;if(t instanceof Error){if(t.name===`AbortError`)throw t.status=500,t;n=t.message,t.name===`TypeError`&&`cause`in t&&(t.cause instanceof Error?n=t.cause.message:typeof t.cause==`string`&&(n=t.cause))}let r=new Xa(n,500,{request:e});throw r.cause=t,r}let s=o.status,c=o.url,l={};for(let[e,t]of o.headers)l[e]=t;let u={url:c,status:s,headers:l,data:``};if(`deprecation`in l){let t=l.link&&l.link.match(/<([^<>]+)>; rel="deprecation"/),r=t&&t.pop();n.warn(`[@octokit/request] "${e.method} ${e.url}" is deprecated. It is scheduled to be removed on ${l.sunset}${r?`. See ${r}`:``}`)}if(s===204||s===205)return u;if(e.method===`HEAD`){if(s<400)return u;throw new Xa(o.statusText,s,{response:u,request:e})}if(s===304)throw u.data=await to(o),new Xa(`Not modified`,s,{response:u,request:e});if(s>=400)throw u.data=await to(o),new Xa(ro(u.data),s,{response:u,request:e});return u.data=r?await to(o):o.body,u}async function to(e){let t=e.headers.get(`content-type`);if(!t)return e.text().catch($a);let n=(0,Pa.safeParse)(t);if(no(n)){let t=``;try{return t=await e.text(),Ya(t)}catch{return t}}else if(n.type.startsWith(`text/`)||n.parameters.charset?.toLowerCase()===`utf-8`)return e.text().catch($a);else return e.arrayBuffer().catch(()=>new ArrayBuffer(0))}function no(e){return e.type===`application/json`||e.type===`application/scim+json`}function ro(e){if(typeof e==`string`)return e;if(e instanceof ArrayBuffer)return`Unknown error`;if(`message`in e){let t=`documentation_url`in e?` - ${e.documentation_url}`:``;return Array.isArray(e.errors)?`${e.message}: ${e.errors.map(e=>JSON.stringify(e)).join(`, `)}${t}`:`${e.message}${t}`}return`Unknown error: ${JSON.stringify(e)}`}function io(e,t){let n=e.defaults(t);return Object.assign(function(e,t){let r=n.merge(e,t);if(!r.request||!r.request.hook)return eo(n.parse(r));let i=(e,t)=>eo(n.parse(n.merge(e,t)));return Object.assign(i,{endpoint:n,defaults:io.bind(null,n)}),r.request.hook(i,r)},{endpoint:n,defaults:io.bind(null,n)})}var ao=io(Na,Za),oo=`0.0.0-development`;function so(e){return`Request failed due to following response errors: +`.trim())}}})),bn=i(((e,t)=>{let n=Symbol.for(`undici.globalDispatcher.1`),{InvalidArgumentError:r}=gt(),i=Xt();o()===void 0&&a(new i);function a(e){if(!e||typeof e.dispatch!=`function`)throw new r(`Argument agent must implement Agent`);Object.defineProperty(globalThis,n,{value:e,writable:!0,enumerable:!1,configurable:!1})}function o(){return globalThis[n]}t.exports={setGlobalDispatcher:a,getGlobalDispatcher:o}})),xn=i(((e,t)=>{t.exports=class{#e;constructor(e){if(typeof e!=`object`||!e)throw 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)}}})),Sn=i(((e,t)=>{let n=Ht();t.exports=e=>{let t=e?.maxRedirections;return e=>function(r,i){let{maxRedirections:a=t,...o}=r;return a?e(o,new n(e,a,r,i)):e(r,i)}}})),Cn=i(((e,t)=>{let n=$t();t.exports=e=>t=>function(r,i){return t(r,new n({...r,retryOptions:{...e,...r.retryOptions}},{handler:i,dispatch:t}))}})),wn=i(((e,t)=>{let n=yt(),{InvalidArgumentError:r,RequestAbortedError:i}=gt(),a=xn();var o=class extends a{#e=1024*1024;#t=null;#n=!1;#r=!1;#i=0;#a=null;#o=null;constructor({maxSize:e},t){if(super(t),e!=null&&(!Number.isFinite(e)||e<1))throw new r(`maxSize must be a number greater than 0`);this.#e=e??this.#e,this.#o=t}onConnect(e){this.#t=e,this.#o.onConnect(this.#s.bind(this))}#s(e){this.#r=!0,this.#a=e}onHeaders(e,t,r,a){let o=n.parseHeaders(t)[`content-length`];if(o!=null&&o>this.#e)throw new i(`Response size (${o}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#o.onHeaders(e,t,r,a)}onError(e){this.#n||(e=this.#a??e,this.#o.onError(e))}onData(e){return this.#i+=e.length,this.#i>=this.#e&&(this.#n=!0,this.#r?this.#o.onError(this.#a):this.#o.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#o.onError(this.reason);return}this.#o.onComplete(e)}}};function s({maxSize:e}={maxSize:1024*1024}){return t=>function(n,r){let{dumpMaxSize:i=e}=n;return t(n,new o({maxSize:i},r))}}t.exports=s})),Tn=i(((e,n)=>{let{isIP:r}=t(`node:net`),{lookup:i}=t(`node:dns`),a=xn(),{InvalidArgumentError:o,InformationalError:s}=gt(),c=2**31-1;var l=class{#e=0;#t=0;#n=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#i}get full(){return this.#n.size===this.#t}runLookup(e,t,n){let r=this.#n.get(e.hostname);if(r==null&&this.full){n(null,e.origin);return}let i={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...t.dns,maxTTL:this.#e,maxItems:this.#t};if(r==null)this.lookup(e,i,(t,r)=>{if(t||r==null||r.length===0){n(t??new s(`No DNS entries found`));return}this.setRecords(e,r);let a=this.#n.get(e.hostname),o=this.pick(e,a,i.affinity),c;c=typeof o.port==`number`?`:${o.port}`:e.port===``?``:`:${e.port}`,n(null,`${e.protocol}//${o.family===6?`[${o.address}]`:o.address}${c}`)});else{let a=this.pick(e,r,i.affinity);if(a==null){this.#n.delete(e.hostname),this.runLookup(e,t,n);return}let o;o=typeof a.port==`number`?`:${a.port}`:e.port===``?``:`:${e.port}`,n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${o}`)}}#r(e,t,n){i(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:`ipv4first`},(e,t)=>{if(e)return n(e);let r=new Map;for(let e of t)r.set(`${e.address}:${e.family}`,e);n(null,r.values())})}#i(e,t,n){let r=null,{records:i,offset:a}=t,o;if(this.dualStack?(n??(a==null||a===c?(t.offset=0,n=4):(t.offset++,n=(t.offset&1)==1?6:4)),o=i[n]!=null&&i[n].ips.length>0?i[n]:i[n===4?6:4]):o=i[n],o==null||o.ips.length===0)return r;o.offset==null||o.offset===c?o.offset=0:o.offset++;let s=o.offset%o.ips.length;return r=o.ips[s]??null,r==null?r:Date.now()-r.timestamp>r.ttl?(o.ips.splice(s,1),this.pick(e,t,n)):r}setRecords(e,t){let n=Date.now(),r={records:{4:null,6:null}};for(let e of t){e.timestamp=n,typeof e.ttl==`number`?e.ttl=Math.min(e.ttl,this.#e):e.ttl=this.#e;let t=r.records[e.family]??{ips:[]};t.ips.push(e),r.records[e.family]=t}this.#n.set(e.hostname,r)}getHandler(e,t){return new u(this,e,t)}},u=class extends a{#e=null;#t=null;#n=null;#r=null;#i=null;constructor(e,{origin:t,handler:n,dispatch:r},i){super(n),this.#i=t,this.#r=n,this.#t={...i},this.#e=e,this.#n=r}onError(e){switch(e.code){case`ETIMEDOUT`:case`ECONNREFUSED`:if(this.#e.dualStack){this.#e.runLookup(this.#i,this.#t,(e,t)=>{if(e)return this.#r.onError(e);let n={...this.#t,origin:t};this.#n(n,this)});return}this.#r.onError(e);return;case`ENOTFOUND`:this.#e.deleteRecord(this.#i);default:this.#r.onError(e);break}}};n.exports=e=>{if(e?.maxTTL!=null&&(typeof e?.maxTTL!=`number`||e?.maxTTL<0))throw new o(`Invalid maxTTL. Must be a positive number`);if(e?.maxItems!=null&&(typeof e?.maxItems!=`number`||e?.maxItems<1))throw new o(`Invalid maxItems. Must be a positive number and greater than zero`);if(e?.affinity!=null&&e?.affinity!==4&&e?.affinity!==6)throw new o(`Invalid affinity. Must be either 4 or 6`);if(e?.dualStack!=null&&typeof e?.dualStack!=`boolean`)throw new o(`Invalid dualStack. Must be a boolean`);if(e?.lookup!=null&&typeof e?.lookup!=`function`)throw new o(`Invalid lookup. Must be a function`);if(e?.pick!=null&&typeof e?.pick!=`function`)throw new o(`Invalid pick. Must be a function`);let t=e?.dualStack??!0,n;n=t?e?.affinity??null:e?.affinity??4;let i=new l({maxTTL:e?.maxTTL??1e4,lookup:e?.lookup??null,pick:e?.pick??null,dualStack:t,affinity:n,maxItems:e?.maxItems??1/0});return e=>function(t,n){let a=t.origin.constructor===URL?t.origin:new URL(t.origin);return r(a.hostname)===0?(i.runLookup(a,t,(r,o)=>{if(r)return n.onError(r);let s=null;s={...t,servername:a.hostname,origin:o,headers:{host:a.hostname,...t.headers}},e(s,i.getHandler({origin:a,dispatch:e,handler:n},t))}),!0):e(t,n)}}})),En=i(((e,n)=>{let{kConstruct:r}=ht(),{kEnumerableProperty:i}=yt(),{iteratorMixin:a,isValidHeaderName:o,isValidHeaderValue:s}=Pt(),{webidl:c}=Nt(),l=t(`node:assert`),u=t(`node:util`),d=Symbol(`headers map`),f=Symbol(`headers map sorted`);function p(e){return e===10||e===13||e===9||e===32}function m(e){let t=0,n=e.length;for(;n>t&&p(e.charCodeAt(n-1));)--n;for(;n>t&&p(e.charCodeAt(t));)++t;return t===0&&n===e.length?e:e.substring(t,n)}function h(e,t){if(Array.isArray(t))for(let n=0;n>`,`record`]})}function g(e,t,n){if(n=m(n),!o(t))throw c.errors.invalidArgument({prefix:`Headers.append`,value:t,type:`header name`});if(!s(n))throw c.errors.invalidArgument({prefix:`Headers.append`,value:n,type:`header value`});if(x(e)===`immutable`)throw TypeError(`immutable`);return C(e).append(t,n,!1)}function v(e,t){return e[0]>1),t[s][0]<=c[0]?o=s+1:a=s;if(r!==s){for(i=r;i>o;)t[i]=t[--i];t[o]=c}}if(!n.next().done)throw TypeError(`Unreachable`);return t}else{let e=0;for(let{0:n,1:{value:r}}of this[d])t[e++]=[n,r],l(r!==null);return t.sort(v)}}},b=class e{#e;#t;constructor(e=void 0){c.util.markAsUncloneable(this),e!==r&&(this.#t=new y,this.#e=`none`,e!==void 0&&(e=c.converters.HeadersInit(e,`Headers contructor`,`init`),h(this,e)))}append(t,n){c.brandCheck(this,e),c.argumentLengthCheck(arguments,2,`Headers.append`);let r=`Headers.append`;return t=c.converters.ByteString(t,r,`name`),n=c.converters.ByteString(n,r,`value`),g(this,t,n)}delete(t){if(c.brandCheck(this,e),c.argumentLengthCheck(arguments,1,`Headers.delete`),t=c.converters.ByteString(t,`Headers.delete`,`name`),!o(t))throw c.errors.invalidArgument({prefix:`Headers.delete`,value:t,type:`header name`});if(this.#e===`immutable`)throw TypeError(`immutable`);this.#t.contains(t,!1)&&this.#t.delete(t,!1)}get(t){c.brandCheck(this,e),c.argumentLengthCheck(arguments,1,`Headers.get`);let n=`Headers.get`;if(t=c.converters.ByteString(t,n,`name`),!o(t))throw c.errors.invalidArgument({prefix:n,value:t,type:`header name`});return this.#t.get(t,!1)}has(t){c.brandCheck(this,e),c.argumentLengthCheck(arguments,1,`Headers.has`);let n=`Headers.has`;if(t=c.converters.ByteString(t,n,`name`),!o(t))throw c.errors.invalidArgument({prefix:n,value:t,type:`header name`});return this.#t.contains(t,!1)}set(t,n){c.brandCheck(this,e),c.argumentLengthCheck(arguments,2,`Headers.set`);let r=`Headers.set`;if(t=c.converters.ByteString(t,r,`name`),n=c.converters.ByteString(n,r,`value`),n=m(n),!o(t))throw c.errors.invalidArgument({prefix:r,value:t,type:`header name`});if(!s(n))throw c.errors.invalidArgument({prefix:r,value:n,type:`header value`});if(this.#e===`immutable`)throw TypeError(`immutable`);this.#t.set(t,n,!1)}getSetCookie(){c.brandCheck(this,e);let t=this.#t.cookies;return t?[...t]:[]}get[f](){if(this.#t[f])return this.#t[f];let e=[],t=this.#t.toSortedArray(),n=this.#t.cookies;if(n===null||n.length===1)return this.#t[f]=t;for(let r=0;r>`](e,t,n,r.bind(e)):c.converters[`record`](e,t,n)}throw c.errors.conversionFailed({prefix:`Headers constructor`,argument:`Argument 1`,types:[`sequence>`,`record`]})},n.exports={fill:h,compareHeaderName:v,Headers:b,HeadersList:y,getHeadersGuard:x,setHeadersGuard:S,setHeadersList:w,getHeadersList:C}})),Dn=i(((e,n)=>{let{Headers:r,HeadersList:i,fill:a,getHeadersGuard:o,setHeadersGuard:s,setHeadersList:c}=En(),{extractBody:l,cloneBody:u,mixinBody:d,hasFinalizationRegistry:f,streamRegistry:p,bodyUnusable:m}=zt(),h=yt(),g=t(`node:util`),{kEnumerableProperty:v}=h,{isValidReasonPhrase:y,isCancelled:b,isAborted:x,isBlobLike:S,serializeJavascriptValueToJSONString:C,isErrorLike:w,isomorphicEncode:T,environmentSettingsObject:E}=Pt(),{redirectStatusSet:D,nullBodyStatus:O}=At(),{kState:k,kHeaders:A}=Ft(),{webidl:j}=Nt(),{FormData:M}=Lt(),{URLSerializer:N}=Mt(),{kConstruct:P}=ht(),F=t(`node:assert`),{types:I}=t(`node:util`),L=new TextEncoder(`utf-8`);var R=class e{static error(){return ie(B(),`immutable`)}static json(e,t={}){j.argumentLengthCheck(arguments,1,`Response.json`),t!==null&&(t=j.converters.ResponseInit(t));let n=l(L.encode(C(e))),r=ie(ee({}),`response`);return H(r,t,{body:n[0],type:`application/json`}),r}static redirect(e,t=302){j.argumentLengthCheck(arguments,1,`Response.redirect`),e=j.converters.USVString(e),t=j.converters[`unsigned short`](t);let n;try{n=new URL(e,E.settingsObject.baseUrl)}catch(t){throw TypeError(`Failed to parse URL from ${e}`,{cause:t})}if(!D.has(t))throw RangeError(`Invalid status code ${t}`);let r=ie(ee({}),`immutable`);r[k].status=t;let i=T(N(n));return r[k].headersList.append(`location`,i,!0),r}constructor(e=null,t={}){if(j.util.markAsUncloneable(this),e===P)return;e!==null&&(e=j.converters.BodyInit(e)),t=j.converters.ResponseInit(t),this[k]=ee({}),this[A]=new r(P),s(this[A],`response`),c(this[A],this[k].headersList);let n=null;if(e!=null){let[t,r]=l(e);n={body:t,type:r}}H(this,t,n)}get type(){return j.brandCheck(this,e),this[k].type}get url(){j.brandCheck(this,e);let t=this[k].urlList,n=t[t.length-1]??null;return n===null?``:N(n,!0)}get redirected(){return j.brandCheck(this,e),this[k].urlList.length>1}get status(){return j.brandCheck(this,e),this[k].status}get ok(){return j.brandCheck(this,e),this[k].status>=200&&this[k].status<=299}get statusText(){return j.brandCheck(this,e),this[k].statusText}get headers(){return j.brandCheck(this,e),this[A]}get body(){return j.brandCheck(this,e),this[k].body?this[k].body.stream:null}get bodyUsed(){return j.brandCheck(this,e),!!this[k].body&&h.isDisturbed(this[k].body.stream)}clone(){if(j.brandCheck(this,e),m(this))throw j.errors.exception({header:`Response.clone`,message:`Body has already been consumed.`});let t=z(this[k]);return f&&this[k].body?.stream&&p.register(this,new WeakRef(this[k].body.stream)),ie(t,o(this[A]))}[g.inspect.custom](e,t){t.depth===null&&(t.depth=2),t.colors??=!0;let n={status:this.status,statusText:this.statusText,headers:this.headers,body:this.body,bodyUsed:this.bodyUsed,ok:this.ok,redirected:this.redirected,type:this.type,url:this.url};return`Response ${g.formatWithOptions(t,n)}`}};d(R),Object.defineProperties(R.prototype,{type:v,url:v,status:v,ok:v,redirected:v,statusText:v,headers:v,clone:v,body:v,bodyUsed:v,[Symbol.toStringTag]:{value:`Response`,configurable:!0}}),Object.defineProperties(R,{json:v,redirect:v,error:v});function z(e){if(e.internalResponse)return ne(z(e.internalResponse),e.type);let t=ee({...e,body:null});return e.body!=null&&(t.body=u(t,e.body)),t}function ee(e){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:`default`,status:200,timingInfo:null,cacheState:``,statusText:``,...e,headersList:e?.headersList?new i(e?.headersList):new i,urlList:e?.urlList?[...e.urlList]:[]}}function B(e){return ee({type:`error`,status:0,error:w(e)?e:Error(e&&String(e)),aborted:e&&e.name===`AbortError`})}function te(e){return e.type===`error`&&e.status===0}function V(e,t){return t={internalResponse:e,...t},new Proxy(e,{get(e,n){return n in t?t[n]:e[n]},set(e,n,r){return F(!(n in t)),e[n]=r,!0}})}function ne(e,t){if(t===`basic`)return V(e,{type:`basic`,headersList:e.headersList});if(t===`cors`)return V(e,{type:`cors`,headersList:e.headersList});if(t===`opaque`)return V(e,{type:`opaque`,urlList:Object.freeze([]),status:0,statusText:``,body:null});if(t===`opaqueredirect`)return V(e,{type:`opaqueredirect`,status:0,statusText:``,headersList:[],body:null});F(!1)}function re(e,t=null){return F(b(e)),x(e)?B(Object.assign(new DOMException(`The operation was aborted.`,`AbortError`),{cause:t})):B(Object.assign(new DOMException(`Request was cancelled.`),{cause:t}))}function H(e,t,n){if(t.status!==null&&(t.status<200||t.status>599))throw RangeError(`init["status"] must be in the range of 200 to 599, inclusive.`);if(`statusText`in t&&t.statusText!=null&&!y(String(t.statusText)))throw TypeError(`Invalid statusText`);if(`status`in t&&t.status!=null&&(e[k].status=t.status),`statusText`in t&&t.statusText!=null&&(e[k].statusText=t.statusText),`headers`in t&&t.headers!=null&&a(e[A],t.headers),n){if(O.includes(e.status))throw j.errors.exception({header:`Response constructor`,message:`Invalid response status code ${e.status}`});e[k].body=n.body,n.type!=null&&!e[k].headersList.contains(`content-type`,!0)&&e[k].headersList.append(`content-type`,n.type,!0)}}function ie(e,t){let n=new R(P);return n[k]=e,n[A]=new r(P),c(n[A],e.headersList),s(n[A],t),f&&e.body?.stream&&p.register(n,new WeakRef(e.body.stream)),n}j.converters.ReadableStream=j.interfaceConverter(ReadableStream),j.converters.FormData=j.interfaceConverter(M),j.converters.URLSearchParams=j.interfaceConverter(URLSearchParams),j.converters.XMLHttpRequestBodyInit=function(e,t,n){return typeof e==`string`?j.converters.USVString(e,t,n):S(e)?j.converters.Blob(e,t,n,{strict:!1}):ArrayBuffer.isView(e)||I.isArrayBuffer(e)?j.converters.BufferSource(e,t,n):h.isFormDataLike(e)?j.converters.FormData(e,t,n,{strict:!1}):e instanceof URLSearchParams?j.converters.URLSearchParams(e,t,n):j.converters.DOMString(e,t,n)},j.converters.BodyInit=function(e,t,n){return e instanceof ReadableStream?j.converters.ReadableStream(e,t,n):e?.[Symbol.asyncIterator]?e:j.converters.XMLHttpRequestBodyInit(e,t,n)},j.converters.ResponseInit=j.dictionaryConverter([{key:`status`,converter:j.converters[`unsigned short`],defaultValue:()=>200},{key:`statusText`,converter:j.converters.ByteString,defaultValue:()=>``},{key:`headers`,converter:j.converters.HeadersInit}]),n.exports={isNetworkError:te,makeNetworkError:B,makeResponse:ee,makeAppropriateNetworkError:re,filterResponse:ne,Response:R,cloneResponse:z,fromInnerResponse:ie}})),On=i(((e,t)=>{let{kConnected:n,kSize:r}=ht();var i=class{constructor(e){this.value=e}deref(){return this.value[n]===0&&this.value[r]===0?void 0:this.value}},a=class{constructor(e){this.finalizer=e}register(e,t){e.on&&e.on(`disconnect`,()=>{e[n]===0&&e[r]===0&&this.finalizer(t)})}unregister(e){}};t.exports=function(){return process.env.NODE_V8_COVERAGE&&process.version.startsWith(`v18`)?(process._rawDebug(`Using compatibility WeakRef and FinalizationRegistry`),{WeakRef:i,FinalizationRegistry:a}):{WeakRef,FinalizationRegistry}}})),kn=i(((e,n)=>{let{extractBody:r,mixinBody:i,cloneBody:a,bodyUnusable:o}=zt(),{Headers:s,fill:c,HeadersList:l,setHeadersGuard:u,getHeadersGuard:d,setHeadersList:f,getHeadersList:p}=En(),{FinalizationRegistry:m}=On()(),h=yt(),g=t(`node:util`),{isValidHTTPToken:v,sameOrigin:y,environmentSettingsObject:b}=Pt(),{forbiddenMethodsSet:x,corsSafeListedMethodsSet:S,referrerPolicy:C,requestRedirect:w,requestMode:T,requestCredentials:E,requestCache:D,requestDuplex:O}=At(),{kEnumerableProperty:k,normalizedMethodRecordsBase:A,normalizedMethodRecords:j}=h,{kHeaders:M,kSignal:N,kState:P,kDispatcher:F}=Ft(),{webidl:I}=Nt(),{URLSerializer:L}=Mt(),{kConstruct:R}=ht(),z=t(`node:assert`),{getMaxListeners:ee,setMaxListeners:B,getEventListeners:te,defaultMaxListeners:V}=t(`node:events`),ne=Symbol(`abortController`),re=new m(({signal:e,abort:t})=>{e.removeEventListener(`abort`,t)}),H=new WeakMap;function ie(e){return t;function t(){let n=e.deref();if(n!==void 0){re.unregister(t),this.removeEventListener(`abort`,t),n.abort(this.reason);let e=H.get(n.signal);if(e!==void 0){if(e.size!==0){for(let t of e){let e=t.deref();e!==void 0&&e.abort(this.reason)}e.clear()}H.delete(n.signal)}}}}let ae=!1;var oe=class e{constructor(t,n={}){if(I.util.markAsUncloneable(this),t===R)return;let i=`Request constructor`;I.argumentLengthCheck(arguments,1,i),t=I.converters.RequestInfo(t,i,`input`),n=I.converters.RequestInit(n,i,`init`);let a=null,d=null,m=b.settingsObject.baseUrl,g=null;if(typeof t==`string`){this[F]=n.dispatcher;let e;try{e=new URL(t,m)}catch(e){throw TypeError(`Failed to parse URL from `+t,{cause:e})}if(e.username||e.password)throw TypeError(`Request cannot be constructed from a URL that includes credentials: `+t);a=se({urlList:[e]}),d=`cors`}else this[F]=n.dispatcher||t[F],z(t instanceof e),a=t[P],g=t[N];let C=b.settingsObject.origin,w=`client`;if(a.window?.constructor?.name===`EnvironmentSettingsObject`&&y(a.window,C)&&(w=a.window),n.window!=null)throw TypeError(`'window' option '${w}' must be null`);`window`in n&&(w=`no-window`),a=se({method:a.method,headersList:a.headersList,unsafeRequest:a.unsafeRequest,client:b.settingsObject,window:w,priority:a.priority,origin:a.origin,referrer:a.referrer,referrerPolicy:a.referrerPolicy,mode:a.mode,credentials:a.credentials,cache:a.cache,redirect:a.redirect,integrity:a.integrity,keepalive:a.keepalive,reloadNavigation:a.reloadNavigation,historyNavigation:a.historyNavigation,urlList:[...a.urlList]});let T=Object.keys(n).length!==0;if(T&&(a.mode===`navigate`&&(a.mode=`same-origin`),a.reloadNavigation=!1,a.historyNavigation=!1,a.origin=`client`,a.referrer=`client`,a.referrerPolicy=``,a.url=a.urlList[a.urlList.length-1],a.urlList=[a.url]),n.referrer!==void 0){let e=n.referrer;if(e===``)a.referrer=`no-referrer`;else{let t;try{t=new URL(e,m)}catch(t){throw TypeError(`Referrer "${e}" is not a valid URL.`,{cause:t})}t.protocol===`about:`&&t.hostname===`client`||C&&!y(t,b.settingsObject.baseUrl)?a.referrer=`client`:a.referrer=t}}n.referrerPolicy!==void 0&&(a.referrerPolicy=n.referrerPolicy);let E;if(E=n.mode===void 0?d:n.mode,E===`navigate`)throw I.errors.exception({header:`Request constructor`,message:`invalid request mode navigate.`});if(E!=null&&(a.mode=E),n.credentials!==void 0&&(a.credentials=n.credentials),n.cache!==void 0&&(a.cache=n.cache),a.cache===`only-if-cached`&&a.mode!==`same-origin`)throw TypeError(`'only-if-cached' can be set only with 'same-origin' mode`);if(n.redirect!==void 0&&(a.redirect=n.redirect),n.integrity!=null&&(a.integrity=String(n.integrity)),n.keepalive!==void 0&&(a.keepalive=!!n.keepalive),n.method!==void 0){let e=n.method,t=j[e];if(t!==void 0)a.method=t;else{if(!v(e))throw TypeError(`'${e}' is not a valid HTTP method.`);let t=e.toUpperCase();if(x.has(t))throw TypeError(`'${e}' HTTP method is unsupported.`);e=A[t]??e,a.method=e}!ae&&a.method===`patch`&&(process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.",{code:`UNDICI-FETCH-patch`}),ae=!0)}n.signal!==void 0&&(g=n.signal),this[P]=a;let D=new AbortController;if(this[N]=D.signal,g!=null){if(!g||typeof g.aborted!=`boolean`||typeof g.addEventListener!=`function`)throw TypeError(`Failed to construct 'Request': member signal is not of type AbortSignal.`);if(g.aborted)D.abort(g.reason);else{this[ne]=D;let e=ie(new WeakRef(D));try{(typeof ee==`function`&&ee(g)===V||te(g,`abort`).length>=V)&&B(1500,g)}catch{}h.addAbortListener(g,e),re.register(D,{signal:g,abort:e},e)}}if(this[M]=new s(R),f(this[M],a.headersList),u(this[M],`request`),E===`no-cors`){if(!S.has(a.method))throw TypeError(`'${a.method} is unsupported in no-cors mode.`);u(this[M],`request-no-cors`)}if(T){let e=p(this[M]),t=n.headers===void 0?new l(e):n.headers;if(e.clear(),t instanceof l){for(let{name:n,value:r}of t.rawValues())e.append(n,r,!1);e.cookies=t.cookies}else c(this[M],t)}let O=t instanceof e?t[P].body:null;if((n.body!=null||O!=null)&&(a.method===`GET`||a.method===`HEAD`))throw TypeError(`Request with GET/HEAD method cannot have body.`);let k=null;if(n.body!=null){let[e,t]=r(n.body,a.keepalive);k=e,t&&!p(this[M]).contains(`content-type`,!0)&&this[M].append(`content-type`,t)}let L=k??O;if(L!=null&&L.source==null){if(k!=null&&n.duplex==null)throw TypeError(`RequestInit: duplex option is required when sending a body.`);if(a.mode!==`same-origin`&&a.mode!==`cors`)throw TypeError(`If request is made from ReadableStream, mode should be "same-origin" or "cors"`);a.useCORSPreflightFlag=!0}let H=L;if(k==null&&O!=null){if(o(t))throw TypeError(`Cannot construct a Request with a Request object that has already been used.`);let e=new TransformStream;O.stream.pipeThrough(e),H={source:O.source,length:O.length,stream:e.readable}}this[P].body=H}get method(){return I.brandCheck(this,e),this[P].method}get url(){return I.brandCheck(this,e),L(this[P].url)}get headers(){return I.brandCheck(this,e),this[M]}get destination(){return I.brandCheck(this,e),this[P].destination}get referrer(){return I.brandCheck(this,e),this[P].referrer===`no-referrer`?``:this[P].referrer===`client`?`about:client`:this[P].referrer.toString()}get referrerPolicy(){return I.brandCheck(this,e),this[P].referrerPolicy}get mode(){return I.brandCheck(this,e),this[P].mode}get credentials(){return this[P].credentials}get cache(){return I.brandCheck(this,e),this[P].cache}get redirect(){return I.brandCheck(this,e),this[P].redirect}get integrity(){return I.brandCheck(this,e),this[P].integrity}get keepalive(){return I.brandCheck(this,e),this[P].keepalive}get isReloadNavigation(){return I.brandCheck(this,e),this[P].reloadNavigation}get isHistoryNavigation(){return I.brandCheck(this,e),this[P].historyNavigation}get signal(){return I.brandCheck(this,e),this[N]}get body(){return I.brandCheck(this,e),this[P].body?this[P].body.stream:null}get bodyUsed(){return I.brandCheck(this,e),!!this[P].body&&h.isDisturbed(this[P].body.stream)}get duplex(){return I.brandCheck(this,e),`half`}clone(){if(I.brandCheck(this,e),o(this))throw TypeError(`unusable`);let t=ce(this[P]),n=new AbortController;if(this.signal.aborted)n.abort(this.signal.reason);else{let e=H.get(this.signal);e===void 0&&(e=new Set,H.set(this.signal,e));let t=new WeakRef(n);e.add(t),h.addAbortListener(n.signal,ie(t))}return le(t,n.signal,d(this[M]))}[g.inspect.custom](e,t){t.depth===null&&(t.depth=2),t.colors??=!0;let n={method:this.method,url:this.url,headers:this.headers,destination:this.destination,referrer:this.referrer,referrerPolicy:this.referrerPolicy,mode:this.mode,credentials:this.credentials,cache:this.cache,redirect:this.redirect,integrity:this.integrity,keepalive:this.keepalive,isReloadNavigation:this.isReloadNavigation,isHistoryNavigation:this.isHistoryNavigation,signal:this.signal};return`Request ${g.formatWithOptions(t,n)}`}};i(oe);function se(e){return{method:e.method??`GET`,localURLsOnly:e.localURLsOnly??!1,unsafeRequest:e.unsafeRequest??!1,body:e.body??null,client:e.client??null,reservedClient:e.reservedClient??null,replacesClientId:e.replacesClientId??``,window:e.window??`client`,keepalive:e.keepalive??!1,serviceWorkers:e.serviceWorkers??`all`,initiator:e.initiator??``,destination:e.destination??``,priority:e.priority??null,origin:e.origin??`client`,policyContainer:e.policyContainer??`client`,referrer:e.referrer??`client`,referrerPolicy:e.referrerPolicy??``,mode:e.mode??`no-cors`,useCORSPreflightFlag:e.useCORSPreflightFlag??!1,credentials:e.credentials??`same-origin`,useCredentials:e.useCredentials??!1,cache:e.cache??`default`,redirect:e.redirect??`follow`,integrity:e.integrity??``,cryptoGraphicsNonceMetadata:e.cryptoGraphicsNonceMetadata??``,parserMetadata:e.parserMetadata??``,reloadNavigation:e.reloadNavigation??!1,historyNavigation:e.historyNavigation??!1,userActivation:e.userActivation??!1,taintedOrigin:e.taintedOrigin??!1,redirectCount:e.redirectCount??0,responseTainting:e.responseTainting??`basic`,preventNoCacheCacheControlHeaderModification:e.preventNoCacheCacheControlHeaderModification??!1,done:e.done??!1,timingAllowFailed:e.timingAllowFailed??!1,urlList:e.urlList,url:e.urlList[0],headersList:e.headersList?new l(e.headersList):new l}}function ce(e){let t=se({...e,body:null});return e.body!=null&&(t.body=a(t,e.body)),t}function le(e,t,n){let r=new oe(R);return r[P]=e,r[N]=t,r[M]=new s(R),f(r[M],e.headersList),u(r[M],n),r}Object.defineProperties(oe.prototype,{method:k,url:k,headers:k,redirect:k,clone:k,signal:k,duplex:k,destination:k,body:k,bodyUsed:k,isHistoryNavigation:k,isReloadNavigation:k,keepalive:k,integrity:k,cache:k,credentials:k,attribute:k,referrerPolicy:k,referrer:k,mode:k,[Symbol.toStringTag]:{value:`Request`,configurable:!0}}),I.converters.Request=I.interfaceConverter(oe),I.converters.RequestInfo=function(e,t,n){return typeof e==`string`?I.converters.USVString(e,t,n):e instanceof oe?I.converters.Request(e,t,n):I.converters.USVString(e,t,n)},I.converters.AbortSignal=I.interfaceConverter(AbortSignal),I.converters.RequestInit=I.dictionaryConverter([{key:`method`,converter:I.converters.ByteString},{key:`headers`,converter:I.converters.HeadersInit},{key:`body`,converter:I.nullableConverter(I.converters.BodyInit)},{key:`referrer`,converter:I.converters.USVString},{key:`referrerPolicy`,converter:I.converters.DOMString,allowedValues:C},{key:`mode`,converter:I.converters.DOMString,allowedValues:T},{key:`credentials`,converter:I.converters.DOMString,allowedValues:E},{key:`cache`,converter:I.converters.DOMString,allowedValues:D},{key:`redirect`,converter:I.converters.DOMString,allowedValues:w},{key:`integrity`,converter:I.converters.DOMString},{key:`keepalive`,converter:I.converters.boolean},{key:`signal`,converter:I.nullableConverter(e=>I.converters.AbortSignal(e,`RequestInit`,`signal`,{strict:!1}))},{key:`window`,converter:I.converters.any},{key:`duplex`,converter:I.converters.DOMString,allowedValues:O},{key:`dispatcher`,converter:I.converters.any}]),n.exports={Request:oe,makeRequest:se,fromInnerRequest:le,cloneRequest:ce}})),An=i(((e,n)=>{let{makeNetworkError:r,makeAppropriateNetworkError:i,filterResponse:a,makeResponse:o,fromInnerResponse:s}=Dn(),{HeadersList:c}=En(),{Request:l,cloneRequest:u}=kn(),d=t(`node:zlib`),{bytesMatch:f,makePolicyContainer:p,clonePolicyContainer:m,requestBadPort:h,TAOCheck:g,appendRequestOriginHeader:v,responseLocationURL:y,requestCurrentURL:b,setRequestReferrerPolicyOnRedirect:x,tryUpgradeRequestToAPotentiallyTrustworthyURL:S,createOpaqueTimingInfo:C,appendFetchMetadata:w,corsCheck:T,crossOriginResourcePolicyCheck:E,determineRequestsReferrer:D,coarsenedSharedCurrentTime:O,createDeferredPromise:k,isBlobLike:A,sameOrigin:j,isCancelled:M,isAborted:N,isErrorLike:P,fullyReadBody:F,readableStreamClose:I,isomorphicEncode:L,urlIsLocal:R,urlIsHttpHttpsScheme:z,urlHasHttpsScheme:ee,clampAndCoarsenConnectionTimingInfo:B,simpleRangeHeaderValue:te,buildContentRange:V,createInflate:ne,extractMimeType:re}=Pt(),{kState:H,kDispatcher:ie}=Ft(),ae=t(`node:assert`),{safelyExtractBody:oe,extractBody:se}=zt(),{redirectStatusSet:ce,nullBodyStatus:le,safeMethodsSet:ue,requestBodyHeader:de,subresourceSet:fe}=At(),pe=t(`node:events`),{Readable:me,pipeline:he,finished:ge}=t(`node:stream`),{addAbortListener:_e,isErrored:U,isReadable:ve,bufferToLowerCasedHeaderName:ye}=yt(),{dataURLProcessor:be,serializeAMimeType:xe,minimizeSupportedMimeType:Se}=Mt(),{getGlobalDispatcher:Ce}=bn(),{webidl:we}=Nt(),{STATUS_CODES:Te}=t(`node:http`),Ee=[`GET`,`HEAD`],De=typeof __UNDICI_IS_NODE__<`u`||typeof esbuildDetection<`u`?`node`:`undici`,Oe;var W=class extends pe{constructor(e){super(),this.dispatcher=e,this.connection=null,this.dump=!1,this.state=`ongoing`}terminate(e){this.state===`ongoing`&&(this.state=`terminated`,this.connection?.destroy(e),this.emit(`terminated`,e))}abort(e){this.state===`ongoing`&&(this.state=`aborted`,e||=new DOMException(`The operation was aborted.`,`AbortError`),this.serializedAbortReason=e,this.connection?.destroy(e),this.emit(`terminated`,e))}};function ke(e){je(e,`fetch`)}function Ae(e,t=void 0){we.argumentLengthCheck(arguments,1,`globalThis.fetch`);let n=k(),r;try{r=new l(e,t)}catch(e){return n.reject(e),n.promise}let i=r[H];if(r.signal.aborted)return Ne(n,i,null,r.signal.reason),n.promise;i.client.globalObject?.constructor?.name===`ServiceWorkerGlobalScope`&&(i.serviceWorkers=`none`);let a=null,o=!1,c=null;return _e(r.signal,()=>{o=!0,ae(c!=null),c.abort(r.signal.reason);let e=a?.deref();Ne(n,i,e,r.signal.reason)}),c=Pe({request:i,processResponseEndOfBody:ke,processResponse:e=>{if(!o){if(e.aborted){Ne(n,i,a,c.serializedAbortReason);return}if(e.type===`error`){n.reject(TypeError(`fetch failed`,{cause:e.error}));return}a=new WeakRef(s(e,`immutable`)),n.resolve(a.deref()),n=null}},dispatcher:r[ie]}),n.promise}function je(e,t=`other`){if(e.type===`error`&&e.aborted||!e.urlList?.length)return;let n=e.urlList[0],r=e.timingInfo,i=e.cacheState;z(n)&&r!==null&&(e.timingAllowPassed||(r=C({startTime:r.startTime}),i=``),r.endTime=O(),e.timingInfo=r,Me(r,n.href,t,globalThis,i))}let Me=performance.markResourceTiming;function Ne(e,t,n,r){if(e&&e.reject(r),t.body!=null&&ve(t.body?.stream)&&t.body.stream.cancel(r).catch(e=>{if(e.code!==`ERR_INVALID_STATE`)throw e}),n==null)return;let i=n[H];i.body!=null&&ve(i.body?.stream)&&i.body.stream.cancel(r).catch(e=>{if(e.code!==`ERR_INVALID_STATE`)throw e})}function Pe({request:e,processRequestBodyChunkLength:t,processRequestEndOfBody:n,processResponse:r,processResponseEndOfBody:i,processResponseConsumeBody:a,useParallelQueue:o=!1,dispatcher:s=Ce()}){ae(s);let c=null,l=!1;e.client!=null&&(c=e.client.globalObject,l=e.client.crossOriginIsolatedCapability);let u=C({startTime:O(l)}),d={controller:new W(s),request:e,timingInfo:u,processRequestBodyChunkLength:t,processRequestEndOfBody:n,processResponse:r,processResponseConsumeBody:a,processResponseEndOfBody:i,taskDestination:c,crossOriginIsolatedCapability:l};return ae(!e.body||e.body.stream),e.window===`client`&&(e.window=e.client?.globalObject?.constructor?.name===`Window`?e.client:`no-window`),e.origin===`client`&&(e.origin=e.client.origin),e.policyContainer===`client`&&(e.client==null?e.policyContainer=p():e.policyContainer=m(e.client.policyContainer)),e.headersList.contains(`accept`,!0)||e.headersList.append(`accept`,`*/*`,!0),e.headersList.contains(`accept-language`,!0)||e.headersList.append(`accept-language`,`*`,!0),e.priority,fe.has(e.destination),Fe(d).catch(e=>{d.controller.terminate(e)}),d.controller}async function Fe(e,t=!1){let n=e.request,i=null;if(n.localURLsOnly&&!R(b(n))&&(i=r(`local URLs only`)),S(n),h(n)===`blocked`&&(i=r(`bad port`)),n.referrerPolicy===``&&(n.referrerPolicy=n.policyContainer.referrerPolicy),n.referrer!==`no-referrer`&&(n.referrer=D(n)),i===null&&(i=await(async()=>{let t=b(n);return j(t,n.url)&&n.responseTainting===`basic`||t.protocol===`data:`||n.mode===`navigate`||n.mode===`websocket`?(n.responseTainting=`basic`,await Ie(e)):n.mode===`same-origin`?r(`request mode cannot be "same-origin"`):n.mode===`no-cors`?n.redirect===`follow`?(n.responseTainting=`opaque`,await Ie(e)):r(`redirect mode cannot be "follow" for "no-cors" request`):z(b(n))?(n.responseTainting=`cors`,await ze(e)):r(`URL scheme must be a HTTP(S) scheme`)})()),t)return i;i.status!==0&&!i.internalResponse&&(n.responseTainting,n.responseTainting===`basic`?i=a(i,`basic`):n.responseTainting===`cors`?i=a(i,`cors`):n.responseTainting===`opaque`?i=a(i,`opaque`):ae(!1));let o=i.status===0?i:i.internalResponse;if(o.urlList.length===0&&o.urlList.push(...n.urlList),n.timingAllowFailed||(i.timingAllowPassed=!0),i.type===`opaque`&&o.status===206&&o.rangeRequested&&!n.headers.contains(`range`,!0)&&(i=o=r()),i.status!==0&&(n.method===`HEAD`||n.method===`CONNECT`||le.includes(o.status))&&(o.body=null,e.controller.dump=!0),n.integrity){let t=t=>Re(e,r(t));if(n.responseTainting===`opaque`||i.body==null){t(i.error);return}await F(i.body,r=>{if(!f(r,n.integrity)){t(`integrity mismatch`);return}i.body=oe(r)[0],Re(e,i)},t)}else Re(e,i)}function Ie(e){if(M(e)&&e.request.redirectCount===0)return Promise.resolve(i(e));let{request:n}=e,{protocol:a}=b(n);switch(a){case`about:`:return Promise.resolve(r(`about scheme is not supported`));case`blob:`:{Oe||=t(`node:buffer`).resolveObjectURL;let e=b(n);if(e.search.length!==0)return Promise.resolve(r(`NetworkError when attempting to fetch resource.`));let i=Oe(e.toString());if(n.method!==`GET`||!A(i))return Promise.resolve(r(`invalid method`));let a=o(),s=i.size,c=L(`${s}`),l=i.type;if(n.headersList.contains(`range`,!0)){a.rangeRequested=!0;let e=te(n.headersList.get(`range`,!0),!0);if(e===`failure`)return Promise.resolve(r(`failed to fetch the data URL`));let{rangeStartValue:t,rangeEndValue:o}=e;if(t===null)t=s-o,o=t+o-1;else{if(t>=s)return Promise.resolve(r(`Range start is greater than the blob's size.`));(o===null||o>=s)&&(o=s-1)}let c=i.slice(t,o,l);a.body=se(c)[0];let u=L(`${c.size}`),d=V(t,o,s);a.status=206,a.statusText=`Partial Content`,a.headersList.set(`content-length`,u,!0),a.headersList.set(`content-type`,l,!0),a.headersList.set(`content-range`,d,!0)}else{let e=se(i);a.statusText=`OK`,a.body=e[0],a.headersList.set(`content-length`,c,!0),a.headersList.set(`content-type`,l,!0)}return Promise.resolve(a)}case`data:`:{let e=be(b(n));if(e===`failure`)return Promise.resolve(r(`failed to fetch the data URL`));let t=xe(e.mimeType);return Promise.resolve(o({statusText:`OK`,headersList:[[`content-type`,{name:`Content-Type`,value:t}]],body:oe(e.body)[0]}))}case`file:`:return Promise.resolve(r(`not implemented... yet...`));case`http:`:case`https:`:return ze(e).catch(e=>r(e));default:return Promise.resolve(r(`unknown scheme`))}}function Le(e,t){e.request.done=!0,e.processResponseDone!=null&&queueMicrotask(()=>e.processResponseDone(t))}function Re(e,t){let n=e.timingInfo,r=()=>{let r=Date.now();e.request.destination===`document`&&(e.controller.fullTimingInfo=n),e.controller.reportTimingSteps=()=>{if(e.request.url.protocol!==`https:`)return;n.endTime=r;let i=t.cacheState,a=t.bodyInfo;t.timingAllowPassed||(n=C(n),i=``);let o=0;if(e.request.mode!==`navigator`||!t.hasCrossOriginRedirects){o=t.status;let e=re(t.headersList);e!==`failure`&&(a.contentType=Se(e))}e.request.initiatorType!=null&&Me(n,e.request.url.href,e.request.initiatorType,globalThis,i,a,o)};let i=()=>{e.request.done=!0,e.processResponseEndOfBody!=null&&queueMicrotask(()=>e.processResponseEndOfBody(t)),e.request.initiatorType!=null&&e.controller.reportTimingSteps()};queueMicrotask(()=>i())};e.processResponse!=null&&queueMicrotask(()=>{e.processResponse(t),e.processResponse=null});let i=t.type===`error`?t:t.internalResponse??t;i.body==null?r():ge(i.body.stream,()=>{r()})}async function ze(e){let t=e.request,n=null,i=null,a=e.timingInfo;if(t.serviceWorkers,n===null){if(t.redirect===`follow`&&(t.serviceWorkers=`none`),i=n=await Ve(e),t.responseTainting===`cors`&&T(t,n)===`failure`)return r(`cors failure`);g(t,n)===`failure`&&(t.timingAllowFailed=!0)}return(t.responseTainting===`opaque`||n.type===`opaque`)&&E(t.origin,t.client,t.destination,i)===`blocked`?r(`blocked`):(ce.has(i.status)&&(t.redirect!==`manual`&&e.controller.connection.destroy(void 0,!1),t.redirect===`error`?n=r(`unexpected redirect`):t.redirect===`manual`?n=i:t.redirect===`follow`?n=await Be(e,n):ae(!1)),n.timingInfo=a,n)}function Be(e,t){let n=e.request,i=t.internalResponse?t.internalResponse:t,a;try{if(a=y(i,b(n).hash),a==null)return t}catch(e){return Promise.resolve(r(e))}if(!z(a))return Promise.resolve(r(`URL scheme must be a HTTP(S) scheme`));if(n.redirectCount===20)return Promise.resolve(r(`redirect count exceeded`));if(n.redirectCount+=1,n.mode===`cors`&&(a.username||a.password)&&!j(n,a))return Promise.resolve(r(`cross origin not allowed for request mode "cors"`));if(n.responseTainting===`cors`&&(a.username||a.password))return Promise.resolve(r(`URL cannot contain credentials for request mode "cors"`));if(i.status!==303&&n.body!=null&&n.body.source==null)return Promise.resolve(r());if([301,302].includes(i.status)&&n.method===`POST`||i.status===303&&!Ee.includes(n.method)){n.method=`GET`,n.body=null;for(let e of de)n.headersList.delete(e)}j(b(n),a)||(n.headersList.delete(`authorization`,!0),n.headersList.delete(`proxy-authorization`,!0),n.headersList.delete(`cookie`,!0),n.headersList.delete(`host`,!0)),n.body!=null&&(ae(n.body.source!=null),n.body=oe(n.body.source)[0]);let o=e.timingInfo;return o.redirectEndTime=o.postRedirectStartTime=O(e.crossOriginIsolatedCapability),o.redirectStartTime===0&&(o.redirectStartTime=o.startTime),n.urlList.push(a),x(n,i),Fe(e,!0)}async function Ve(e,t=!1,n=!1){let a=e.request,o=null,s=null,c=null;a.window===`no-window`&&a.redirect===`error`?(o=e,s=a):(s=u(a),o={...e},o.request=s);let l=a.credentials===`include`||a.credentials===`same-origin`&&a.responseTainting===`basic`,d=s.body?s.body.length:null,f=null;if(s.body==null&&[`POST`,`PUT`].includes(s.method)&&(f=`0`),d!=null&&(f=L(`${d}`)),f!=null&&s.headersList.append(`content-length`,f,!0),d!=null&&s.keepalive,s.referrer instanceof URL&&s.headersList.append(`referer`,L(s.referrer.href),!0),v(s),w(s),s.headersList.contains(`user-agent`,!0)||s.headersList.append(`user-agent`,De),s.cache===`default`&&(s.headersList.contains(`if-modified-since`,!0)||s.headersList.contains(`if-none-match`,!0)||s.headersList.contains(`if-unmodified-since`,!0)||s.headersList.contains(`if-match`,!0)||s.headersList.contains(`if-range`,!0))&&(s.cache=`no-store`),s.cache===`no-cache`&&!s.preventNoCacheCacheControlHeaderModification&&!s.headersList.contains(`cache-control`,!0)&&s.headersList.append(`cache-control`,`max-age=0`,!0),(s.cache===`no-store`||s.cache===`reload`)&&(s.headersList.contains(`pragma`,!0)||s.headersList.append(`pragma`,`no-cache`,!0),s.headersList.contains(`cache-control`,!0)||s.headersList.append(`cache-control`,`no-cache`,!0)),s.headersList.contains(`range`,!0)&&s.headersList.append(`accept-encoding`,`identity`,!0),s.headersList.contains(`accept-encoding`,!0)||(ee(b(s))?s.headersList.append(`accept-encoding`,`br, gzip, deflate`,!0):s.headersList.append(`accept-encoding`,`gzip, deflate`,!0)),s.headersList.delete(`host`,!0),s.cache=`no-store`,s.cache!==`no-store`&&s.cache,c==null){if(s.cache===`only-if-cached`)return r(`only if cached`);let e=await He(o,l,n);!ue.has(s.method)&&e.status>=200&&e.status,c??=e}if(c.urlList=[...s.urlList],s.headersList.contains(`range`,!0)&&(c.rangeRequested=!0),c.requestIncludesCredentials=l,c.status===407)return a.window===`no-window`?r():M(e)?i(e):r(`proxy authentication required`);if(c.status===421&&!n&&(a.body==null||a.body.source!=null)){if(M(e))return i(e);e.controller.connection.destroy(),c=await Ve(e,t,!0)}return c}async function He(e,t=!1,n=!1){ae(!e.controller.connection||e.controller.connection.destroyed),e.controller.connection={abort:null,destroyed:!1,destroy(e,t=!0){this.destroyed||(this.destroyed=!0,t&&this.abort?.(e??new DOMException(`The operation was aborted.`,`AbortError`)))}};let a=e.request,s=null,l=e.timingInfo;a.cache=`no-store`,a.mode;let u=null;if(a.body==null&&e.processRequestEndOfBody)queueMicrotask(()=>e.processRequestEndOfBody());else if(a.body!=null){let t=async function*(t){M(e)||(yield t,e.processRequestBodyChunkLength?.(t.byteLength))},n=()=>{M(e)||e.processRequestEndOfBody&&e.processRequestEndOfBody()},r=t=>{M(e)||(t.name===`AbortError`?e.controller.abort():e.controller.terminate(t))};u=(async function*(){try{for await(let e of a.body.stream)yield*t(e);n()}catch(e){r(e)}})()}try{let{body:t,status:n,statusText:r,headersList:i,socket:a}=await g({body:u});if(a)s=o({status:n,statusText:r,headersList:i,socket:a});else{let a=t[Symbol.asyncIterator]();e.controller.next=()=>a.next(),s=o({status:n,statusText:r,headersList:i})}}catch(t){return t.name===`AbortError`?(e.controller.connection.destroy(),i(e,t)):r(t)}let f=async()=>{await e.controller.resume()},p=t=>{M(e)||e.controller.abort(t)},m=new ReadableStream({async start(t){e.controller.controller=t},async pull(e){await f(e)},async cancel(e){await p(e)},type:`bytes`});s.body={stream:m,source:null,length:null},e.controller.onAborted=h,e.controller.on(`terminated`,h),e.controller.resume=async()=>{for(;;){let t,n;try{let{done:n,value:r}=await e.controller.next();if(N(e))break;t=n?void 0:r}catch(r){e.controller.ended&&!l.encodedBodySize?t=void 0:(t=r,n=!0)}if(t===void 0){I(e.controller.controller),Le(e,s);return}if(l.decodedBodySize+=t?.byteLength??0,n){e.controller.terminate(t);return}let r=new Uint8Array(t);if(r.byteLength&&e.controller.controller.enqueue(r),U(m)){e.controller.terminate();return}if(e.controller.controller.desiredSize<=0)return}};function h(t){N(e)?(s.aborted=!0,ve(m)&&e.controller.controller.error(e.controller.serializedAbortReason)):ve(m)&&e.controller.controller.error(TypeError(`terminated`,{cause:P(t)?t:void 0})),e.controller.connection.destroy()}return s;function g({body:t}){let n=b(a),r=e.controller.dispatcher;return new Promise((i,o)=>r.dispatch({path:n.pathname+n.search,origin:n.origin,method:a.method,body:r.isMockActive?a.body&&(a.body.source||a.body.stream):t,headers:a.headersList.entries,maxRedirections:0,upgrade:a.mode===`websocket`?`websocket`:void 0},{body:null,abort:null,onConnect(t){let{connection:n}=e.controller;l.finalConnectionTimingInfo=B(void 0,l.postRedirectStartTime,e.crossOriginIsolatedCapability),n.destroyed?t(new DOMException(`The operation was aborted.`,`AbortError`)):(e.controller.on(`terminated`,t),this.abort=n.abort=t),l.finalNetworkRequestStartTime=O(e.crossOriginIsolatedCapability)},onResponseStarted(){l.finalNetworkResponseStartTime=O(e.crossOriginIsolatedCapability)},onHeaders(e,t,n,r){if(e<200)return;let s=``,l=new c;for(let e=0;e5)return o(Error(`too many content-encodings in response: ${t.length}, maximum allowed is 5`)),!0;for(let e=t.length-1;e>=0;--e){let n=t[e].trim();if(n===`x-gzip`||n===`gzip`)u.push(d.createGunzip({flush:d.constants.Z_SYNC_FLUSH,finishFlush:d.constants.Z_SYNC_FLUSH}));else if(n===`deflate`)u.push(ne({flush:d.constants.Z_SYNC_FLUSH,finishFlush:d.constants.Z_SYNC_FLUSH}));else if(n===`br`)u.push(d.createBrotliDecompress({flush:d.constants.BROTLI_OPERATION_FLUSH,finishFlush:d.constants.BROTLI_OPERATION_FLUSH}));else{u.length=0;break}}}let p=this.onError.bind(this);return i({status:e,statusText:r,headersList:l,body:u.length?he(this.body,...u,e=>{e&&this.onError(e)}).on(`error`,p):this.body.on(`error`,p)}),!0},onData(t){if(e.controller.dump)return;let n=t;return l.encodedBodySize+=n.byteLength,this.body.push(n)},onComplete(){this.abort&&e.controller.off(`terminated`,this.abort),e.controller.onAborted&&e.controller.off(`terminated`,e.controller.onAborted),e.controller.ended=!0,this.body.push(null)},onError(t){this.abort&&e.controller.off(`terminated`,this.abort),this.body?.destroy(t),e.controller.terminate(t),o(t)},onUpgrade(e,t,n){if(e!==101)return;let r=new c;for(let e=0;e{t.exports={kState:Symbol(`FileReader state`),kResult:Symbol(`FileReader result`),kError:Symbol(`FileReader error`),kLastProgressEventFired:Symbol(`FileReader last progress event fired timestamp`),kEvents:Symbol(`FileReader events`),kAborted:Symbol(`FileReader aborted`)}})),Mn=i(((e,t)=>{let{webidl:n}=Nt(),r=Symbol(`ProgressEvent state`);var i=class e extends Event{constructor(e,t={}){e=n.converters.DOMString(e,`ProgressEvent constructor`,`type`),t=n.converters.ProgressEventInit(t??{}),super(e,t),this[r]={lengthComputable:t.lengthComputable,loaded:t.loaded,total:t.total}}get lengthComputable(){return n.brandCheck(this,e),this[r].lengthComputable}get loaded(){return n.brandCheck(this,e),this[r].loaded}get total(){return n.brandCheck(this,e),this[r].total}};n.converters.ProgressEventInit=n.dictionaryConverter([{key:`lengthComputable`,converter:n.converters.boolean,defaultValue:()=>!1},{key:`loaded`,converter:n.converters[`unsigned long long`],defaultValue:()=>0},{key:`total`,converter:n.converters[`unsigned long long`],defaultValue:()=>0},{key:`bubbles`,converter:n.converters.boolean,defaultValue:()=>!1},{key:`cancelable`,converter:n.converters.boolean,defaultValue:()=>!1},{key:`composed`,converter:n.converters.boolean,defaultValue:()=>!1}]),t.exports={ProgressEvent:i}})),Nn=i(((e,t)=>{function n(e){if(!e)return`failure`;switch(e.trim().toLowerCase()){case`unicode-1-1-utf-8`:case`unicode11utf8`:case`unicode20utf8`:case`utf-8`:case`utf8`:case`x-unicode20utf8`:return`UTF-8`;case`866`:case`cp866`:case`csibm866`:case`ibm866`:return`IBM866`;case`csisolatin2`:case`iso-8859-2`:case`iso-ir-101`:case`iso8859-2`:case`iso88592`:case`iso_8859-2`:case`iso_8859-2:1987`:case`l2`:case`latin2`:return`ISO-8859-2`;case`csisolatin3`:case`iso-8859-3`:case`iso-ir-109`:case`iso8859-3`:case`iso88593`:case`iso_8859-3`:case`iso_8859-3:1988`:case`l3`:case`latin3`:return`ISO-8859-3`;case`csisolatin4`:case`iso-8859-4`:case`iso-ir-110`:case`iso8859-4`:case`iso88594`:case`iso_8859-4`:case`iso_8859-4:1988`:case`l4`:case`latin4`:return`ISO-8859-4`;case`csisolatincyrillic`:case`cyrillic`:case`iso-8859-5`:case`iso-ir-144`:case`iso8859-5`:case`iso88595`:case`iso_8859-5`:case`iso_8859-5:1988`:return`ISO-8859-5`;case`arabic`:case`asmo-708`:case`csiso88596e`:case`csiso88596i`:case`csisolatinarabic`:case`ecma-114`:case`iso-8859-6`:case`iso-8859-6-e`:case`iso-8859-6-i`:case`iso-ir-127`:case`iso8859-6`:case`iso88596`:case`iso_8859-6`:case`iso_8859-6:1987`:return`ISO-8859-6`;case`csisolatingreek`:case`ecma-118`:case`elot_928`:case`greek`:case`greek8`:case`iso-8859-7`:case`iso-ir-126`:case`iso8859-7`:case`iso88597`:case`iso_8859-7`:case`iso_8859-7:1987`:case`sun_eu_greek`:return`ISO-8859-7`;case`csiso88598e`:case`csisolatinhebrew`:case`hebrew`:case`iso-8859-8`:case`iso-8859-8-e`:case`iso-ir-138`:case`iso8859-8`:case`iso88598`:case`iso_8859-8`:case`iso_8859-8:1988`:case`visual`:return`ISO-8859-8`;case`csiso88598i`:case`iso-8859-8-i`:case`logical`:return`ISO-8859-8-I`;case`csisolatin6`:case`iso-8859-10`:case`iso-ir-157`:case`iso8859-10`:case`iso885910`:case`l6`:case`latin6`:return`ISO-8859-10`;case`iso-8859-13`:case`iso8859-13`:case`iso885913`:return`ISO-8859-13`;case`iso-8859-14`:case`iso8859-14`:case`iso885914`:return`ISO-8859-14`;case`csisolatin9`:case`iso-8859-15`:case`iso8859-15`:case`iso885915`:case`iso_8859-15`:case`l9`:return`ISO-8859-15`;case`iso-8859-16`:return`ISO-8859-16`;case`cskoi8r`:case`koi`:case`koi8`:case`koi8-r`:case`koi8_r`:return`KOI8-R`;case`koi8-ru`:case`koi8-u`:return`KOI8-U`;case`csmacintosh`:case`mac`:case`macintosh`:case`x-mac-roman`:return`macintosh`;case`iso-8859-11`:case`iso8859-11`:case`iso885911`:case`tis-620`:case`windows-874`:return`windows-874`;case`cp1250`:case`windows-1250`:case`x-cp1250`:return`windows-1250`;case`cp1251`:case`windows-1251`:case`x-cp1251`:return`windows-1251`;case`ansi_x3.4-1968`:case`ascii`:case`cp1252`:case`cp819`:case`csisolatin1`:case`ibm819`:case`iso-8859-1`:case`iso-ir-100`:case`iso8859-1`:case`iso88591`:case`iso_8859-1`:case`iso_8859-1:1987`:case`l1`:case`latin1`:case`us-ascii`:case`windows-1252`:case`x-cp1252`:return`windows-1252`;case`cp1253`:case`windows-1253`:case`x-cp1253`:return`windows-1253`;case`cp1254`:case`csisolatin5`:case`iso-8859-9`:case`iso-ir-148`:case`iso8859-9`:case`iso88599`:case`iso_8859-9`:case`iso_8859-9:1989`:case`l5`:case`latin5`:case`windows-1254`:case`x-cp1254`:return`windows-1254`;case`cp1255`:case`windows-1255`:case`x-cp1255`:return`windows-1255`;case`cp1256`:case`windows-1256`:case`x-cp1256`:return`windows-1256`;case`cp1257`:case`windows-1257`:case`x-cp1257`:return`windows-1257`;case`cp1258`:case`windows-1258`:case`x-cp1258`:return`windows-1258`;case`x-mac-cyrillic`:case`x-mac-ukrainian`:return`x-mac-cyrillic`;case`chinese`:case`csgb2312`:case`csiso58gb231280`:case`gb2312`:case`gb_2312`:case`gb_2312-80`:case`gbk`:case`iso-ir-58`:case`x-gbk`:return`GBK`;case`gb18030`:return`gb18030`;case`big5`:case`big5-hkscs`:case`cn-big5`:case`csbig5`:case`x-x-big5`:return`Big5`;case`cseucpkdfmtjapanese`:case`euc-jp`:case`x-euc-jp`:return`EUC-JP`;case`csiso2022jp`:case`iso-2022-jp`:return`ISO-2022-JP`;case`csshiftjis`:case`ms932`:case`ms_kanji`:case`shift-jis`:case`shift_jis`:case`sjis`:case`windows-31j`:case`x-sjis`:return`Shift_JIS`;case`cseuckr`:case`csksc56011987`:case`euc-kr`:case`iso-ir-149`:case`korean`:case`ks_c_5601-1987`:case`ks_c_5601-1989`:case`ksc5601`:case`ksc_5601`:case`windows-949`:return`EUC-KR`;case`csiso2022kr`:case`hz-gb-2312`:case`iso-2022-cn`:case`iso-2022-cn-ext`:case`iso-2022-kr`:case`replacement`:return`replacement`;case`unicodefffe`:case`utf-16be`:return`UTF-16BE`;case`csunicode`:case`iso-10646-ucs-2`:case`ucs-2`:case`unicode`:case`unicodefeff`:case`utf-16`:case`utf-16le`:return`UTF-16LE`;case`x-user-defined`:return`x-user-defined`;default:return`failure`}}t.exports={getEncoding:n}})),Pn=i(((e,n)=>{let{kState:r,kError:i,kResult:a,kAborted:o,kLastProgressEventFired:s}=jn(),{ProgressEvent:c}=Mn(),{getEncoding:l}=Nn(),{serializeAMimeType:u,parseMIMEType:d}=Mt(),{types:f}=t(`node:util`),{StringDecoder:p}=t(`string_decoder`),{btoa:m}=t(`node:buffer`),h={enumerable:!0,writable:!1,configurable:!1};function g(e,t,n,c){if(e[r]===`loading`)throw new DOMException(`Invalid state`,`InvalidStateError`);e[r]=`loading`,e[a]=null,e[i]=null;let l=t.stream().getReader(),u=[],d=l.read(),p=!0;(async()=>{for(;!e[o];)try{let{done:m,value:h}=await d;if(p&&!e[o]&&queueMicrotask(()=>{v(`loadstart`,e)}),p=!1,!m&&f.isUint8Array(h))u.push(h),(e[s]===void 0||Date.now()-e[s]>=50)&&!e[o]&&(e[s]=Date.now(),queueMicrotask(()=>{v(`progress`,e)})),d=l.read();else if(m){queueMicrotask(()=>{e[r]=`done`;try{let r=y(u,n,t.type,c);if(e[o])return;e[a]=r,v(`load`,e)}catch(t){e[i]=t,v(`error`,e)}e[r]!==`loading`&&v(`loadend`,e)});break}}catch(t){if(e[o])return;queueMicrotask(()=>{e[r]=`done`,e[i]=t,v(`error`,e),e[r]!==`loading`&&v(`loadend`,e)});break}})()}function v(e,t){let n=new c(e,{bubbles:!1,cancelable:!1});t.dispatchEvent(n)}function y(e,t,n,r){switch(t){case`DataURL`:{let t=`data:`,r=d(n||`application/octet-stream`);r!==`failure`&&(t+=u(r)),t+=`;base64,`;let i=new p(`latin1`);for(let n of e)t+=m(i.write(n));return t+=m(i.end()),t}case`Text`:{let t=`failure`;if(r&&(t=l(r)),t===`failure`&&n){let e=d(n);e!==`failure`&&(t=l(e.parameters.get(`charset`)))}return t===`failure`&&(t=`UTF-8`),b(e,t)}case`ArrayBuffer`:return S(e).buffer;case`BinaryString`:{let t=``,n=new p(`latin1`);for(let r of e)t+=n.write(r);return t+=n.end(),t}}}function b(e,t){let n=S(e),r=x(n),i=0;r!==null&&(t=r,i=r===`UTF-8`?3:2);let a=n.slice(i);return new TextDecoder(t).decode(a)}function x(e){let[t,n,r]=e;return t===239&&n===187&&r===191?`UTF-8`:t===254&&n===255?`UTF-16BE`:t===255&&n===254?`UTF-16LE`:null}function S(e){let t=e.reduce((e,t)=>e+t.byteLength,0),n=0;return e.reduce((e,t)=>(e.set(t,n),n+=t.byteLength,e),new Uint8Array(t))}n.exports={staticPropertyDescriptors:h,readOperation:g,fireAProgressEvent:v}})),Fn=i(((e,t)=>{let{staticPropertyDescriptors:n,readOperation:r,fireAProgressEvent:i}=Pn(),{kState:a,kError:o,kResult:s,kEvents:c,kAborted:l}=jn(),{webidl:u}=Nt(),{kEnumerableProperty:d}=yt();var f=class e extends EventTarget{constructor(){super(),this[a]=`empty`,this[s]=null,this[o]=null,this[c]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(t){u.brandCheck(this,e),u.argumentLengthCheck(arguments,1,`FileReader.readAsArrayBuffer`),t=u.converters.Blob(t,{strict:!1}),r(this,t,`ArrayBuffer`)}readAsBinaryString(t){u.brandCheck(this,e),u.argumentLengthCheck(arguments,1,`FileReader.readAsBinaryString`),t=u.converters.Blob(t,{strict:!1}),r(this,t,`BinaryString`)}readAsText(t,n=void 0){u.brandCheck(this,e),u.argumentLengthCheck(arguments,1,`FileReader.readAsText`),t=u.converters.Blob(t,{strict:!1}),n!==void 0&&(n=u.converters.DOMString(n,`FileReader.readAsText`,`encoding`)),r(this,t,`Text`,n)}readAsDataURL(t){u.brandCheck(this,e),u.argumentLengthCheck(arguments,1,`FileReader.readAsDataURL`),t=u.converters.Blob(t,{strict:!1}),r(this,t,`DataURL`)}abort(){if(this[a]===`empty`||this[a]===`done`){this[s]=null;return}this[a]===`loading`&&(this[a]=`done`,this[s]=null),this[l]=!0,i(`abort`,this),this[a]!==`loading`&&i(`loadend`,this)}get readyState(){switch(u.brandCheck(this,e),this[a]){case`empty`:return this.EMPTY;case`loading`:return this.LOADING;case`done`:return this.DONE}}get result(){return u.brandCheck(this,e),this[s]}get error(){return u.brandCheck(this,e),this[o]}get onloadend(){return u.brandCheck(this,e),this[c].loadend}set onloadend(t){u.brandCheck(this,e),this[c].loadend&&this.removeEventListener(`loadend`,this[c].loadend),typeof t==`function`?(this[c].loadend=t,this.addEventListener(`loadend`,t)):this[c].loadend=null}get onerror(){return u.brandCheck(this,e),this[c].error}set onerror(t){u.brandCheck(this,e),this[c].error&&this.removeEventListener(`error`,this[c].error),typeof t==`function`?(this[c].error=t,this.addEventListener(`error`,t)):this[c].error=null}get onloadstart(){return u.brandCheck(this,e),this[c].loadstart}set onloadstart(t){u.brandCheck(this,e),this[c].loadstart&&this.removeEventListener(`loadstart`,this[c].loadstart),typeof t==`function`?(this[c].loadstart=t,this.addEventListener(`loadstart`,t)):this[c].loadstart=null}get onprogress(){return u.brandCheck(this,e),this[c].progress}set onprogress(t){u.brandCheck(this,e),this[c].progress&&this.removeEventListener(`progress`,this[c].progress),typeof t==`function`?(this[c].progress=t,this.addEventListener(`progress`,t)):this[c].progress=null}get onload(){return u.brandCheck(this,e),this[c].load}set onload(t){u.brandCheck(this,e),this[c].load&&this.removeEventListener(`load`,this[c].load),typeof t==`function`?(this[c].load=t,this.addEventListener(`load`,t)):this[c].load=null}get onabort(){return u.brandCheck(this,e),this[c].abort}set onabort(t){u.brandCheck(this,e),this[c].abort&&this.removeEventListener(`abort`,this[c].abort),typeof t==`function`?(this[c].abort=t,this.addEventListener(`abort`,t)):this[c].abort=null}};f.EMPTY=f.prototype.EMPTY=0,f.LOADING=f.prototype.LOADING=1,f.DONE=f.prototype.DONE=2,Object.defineProperties(f.prototype,{EMPTY:n,LOADING:n,DONE:n,readAsArrayBuffer:d,readAsBinaryString:d,readAsText:d,readAsDataURL:d,abort:d,readyState:d,result:d,error:d,onloadstart:d,onprogress:d,onload:d,onabort:d,onerror:d,onloadend:d,[Symbol.toStringTag]:{value:`FileReader`,writable:!1,enumerable:!1,configurable:!0}}),Object.defineProperties(f,{EMPTY:n,LOADING:n,DONE:n}),t.exports={FileReader:f}})),In=i(((e,t)=>{t.exports={kConstruct:ht().kConstruct}})),Ln=i(((e,n)=>{let r=t(`node:assert`),{URLSerializer:i}=Mt(),{isValidHeaderName:a}=Pt();function o(e,t,n=!1){return i(e,n)===i(t,n)}function s(e){r(e!==null);let t=[];for(let n of e.split(`,`))n=n.trim(),a(n)&&t.push(n);return t}n.exports={urlEquals:o,getFieldValues:s}})),Rn=i(((e,n)=>{let{kConstruct:r}=In(),{urlEquals:i,getFieldValues:a}=Ln(),{kEnumerableProperty:o,isDisturbed:s}=yt(),{webidl:c}=Nt(),{Response:l,cloneResponse:u,fromInnerResponse:d}=Dn(),{Request:f,fromInnerRequest:p}=kn(),{kState:m}=Ft(),{fetching:h}=An(),{urlIsHttpHttpsScheme:g,createDeferredPromise:v,readAllBytes:y}=Pt(),b=t(`node:assert`);var x=class e{#e;constructor(){arguments[0]!==r&&c.illegalConstructor(),c.util.markAsUncloneable(this),this.#e=arguments[1]}async match(t,n={}){c.brandCheck(this,e);let r=`Cache.match`;c.argumentLengthCheck(arguments,1,r),t=c.converters.RequestInfo(t,r,`request`),n=c.converters.CacheQueryOptions(n,r,`options`);let i=this.#i(t,n,1);if(i.length!==0)return i[0]}async matchAll(t=void 0,n={}){c.brandCheck(this,e);let r=`Cache.matchAll`;return t!==void 0&&(t=c.converters.RequestInfo(t,r,`request`)),n=c.converters.CacheQueryOptions(n,r,`options`),this.#i(t,n)}async add(t){c.brandCheck(this,e);let n=`Cache.add`;c.argumentLengthCheck(arguments,1,n),t=c.converters.RequestInfo(t,n,`request`);let r=[t];return await this.addAll(r)}async addAll(t){c.brandCheck(this,e);let n=`Cache.addAll`;c.argumentLengthCheck(arguments,1,n);let r=[],i=[];for(let e of t){if(e===void 0)throw c.errors.conversionFailed({prefix:n,argument:`Argument 1`,types:[`undefined is not allowed`]});if(e=c.converters.RequestInfo(e),typeof e==`string`)continue;let t=e[m];if(!g(t.url)||t.method!==`GET`)throw c.errors.exception({header:n,message:`Expected http/s scheme when method is not GET.`})}let o=[];for(let e of t){let t=new f(e)[m];if(!g(t.url))throw c.errors.exception({header:n,message:`Expected http/s scheme.`});t.initiator=`fetch`,t.destination=`subresource`,i.push(t);let s=v();o.push(h({request:t,processResponse(e){if(e.type===`error`||e.status===206||e.status<200||e.status>299)s.reject(c.errors.exception({header:`Cache.addAll`,message:`Received an invalid status code or the request failed.`}));else if(e.headersList.contains(`vary`)){let t=a(e.headersList.get(`vary`));for(let e of t)if(e===`*`){s.reject(c.errors.exception({header:`Cache.addAll`,message:`invalid vary field value`}));for(let e of o)e.abort();return}}},processResponseEndOfBody(e){if(e.aborted){s.reject(new DOMException(`aborted`,`AbortError`));return}s.resolve(e)}})),r.push(s.promise)}let s=await Promise.all(r),l=[],u=0;for(let e of s){let t={type:`put`,request:i[u],response:e};l.push(t),u++}let d=v(),p=null;try{this.#t(l)}catch(e){p=e}return queueMicrotask(()=>{p===null?d.resolve(void 0):d.reject(p)}),d.promise}async put(t,n){c.brandCheck(this,e);let r=`Cache.put`;c.argumentLengthCheck(arguments,2,r),t=c.converters.RequestInfo(t,r,`request`),n=c.converters.Response(n,r,`response`);let i=null;if(i=t instanceof f?t[m]:new f(t)[m],!g(i.url)||i.method!==`GET`)throw c.errors.exception({header:r,message:`Expected an http/s scheme when method is not GET`});let o=n[m];if(o.status===206)throw c.errors.exception({header:r,message:`Got 206 status`});if(o.headersList.contains(`vary`)){let e=a(o.headersList.get(`vary`));for(let t of e)if(t===`*`)throw c.errors.exception({header:r,message:`Got * vary field value`})}if(o.body&&(s(o.body.stream)||o.body.stream.locked))throw c.errors.exception({header:r,message:`Response body is locked or disturbed`});let l=u(o),d=v();o.body==null?d.resolve(void 0):y(o.body.stream.getReader()).then(d.resolve,d.reject);let p=[],h={type:`put`,request:i,response:l};p.push(h);let b=await d.promise;l.body!=null&&(l.body.source=b);let x=v(),S=null;try{this.#t(p)}catch(e){S=e}return queueMicrotask(()=>{S===null?x.resolve():x.reject(S)}),x.promise}async delete(t,n={}){c.brandCheck(this,e);let r=`Cache.delete`;c.argumentLengthCheck(arguments,1,r),t=c.converters.RequestInfo(t,r,`request`),n=c.converters.CacheQueryOptions(n,r,`options`);let i=null;if(t instanceof f){if(i=t[m],i.method!==`GET`&&!n.ignoreMethod)return!1}else b(typeof t==`string`),i=new f(t)[m];let a=[],o={type:`delete`,request:i,options:n};a.push(o);let s=v(),l=null,u;try{u=this.#t(a)}catch(e){l=e}return queueMicrotask(()=>{l===null?s.resolve(!!u?.length):s.reject(l)}),s.promise}async keys(t=void 0,n={}){c.brandCheck(this,e);let r=`Cache.keys`;t!==void 0&&(t=c.converters.RequestInfo(t,r,`request`)),n=c.converters.CacheQueryOptions(n,r,`options`);let i=null;if(t!==void 0)if(t instanceof f){if(i=t[m],i.method!==`GET`&&!n.ignoreMethod)return[]}else typeof t==`string`&&(i=new f(t)[m]);let a=v(),o=[];if(t===void 0)for(let e of this.#e)o.push(e[0]);else{let e=this.#n(i,n);for(let t of e)o.push(t[0])}return queueMicrotask(()=>{let e=[];for(let t of o){let n=p(t,new AbortController().signal,`immutable`);e.push(n)}a.resolve(Object.freeze(e))}),a.promise}#t(e){let t=this.#e,n=[...t],r=[],i=[];try{for(let n of e){if(n.type!==`delete`&&n.type!==`put`)throw c.errors.exception({header:`Cache.#batchCacheOperations`,message:`operation type does not match "delete" or "put"`});if(n.type===`delete`&&n.response!=null)throw c.errors.exception({header:`Cache.#batchCacheOperations`,message:`delete operation should not have an associated response`});if(this.#n(n.request,n.options,r).length)throw new DOMException(`???`,`InvalidStateError`);let e;if(n.type===`delete`){if(e=this.#n(n.request,n.options),e.length===0)return[];for(let n of e){let e=t.indexOf(n);b(e!==-1),t.splice(e,1)}}else if(n.type===`put`){if(n.response==null)throw c.errors.exception({header:`Cache.#batchCacheOperations`,message:`put operation should have an associated response`});let i=n.request;if(!g(i.url))throw c.errors.exception({header:`Cache.#batchCacheOperations`,message:`expected http or https scheme`});if(i.method!==`GET`)throw c.errors.exception({header:`Cache.#batchCacheOperations`,message:`not get method`});if(n.options!=null)throw c.errors.exception({header:`Cache.#batchCacheOperations`,message:`options must not be defined`});e=this.#n(n.request);for(let n of e){let e=t.indexOf(n);b(e!==-1),t.splice(e,1)}t.push([n.request,n.response]),r.push([n.request,n.response])}i.push([n.request,n.response])}return i}catch(e){throw this.#e.length=0,this.#e=n,e}}#n(e,t,n){let r=[],i=n??this.#e;for(let n of i){let[i,a]=n;this.#r(e,i,a,t)&&r.push(n)}return r}#r(e,t,n=null,r){let o=new URL(e.url),s=new URL(t.url);if(r?.ignoreSearch&&(s.search=``,o.search=``),!i(o,s,!0))return!1;if(n==null||r?.ignoreVary||!n.headersList.contains(`vary`))return!0;let c=a(n.headersList.get(`vary`));for(let n of c)if(n===`*`||t.headersList.get(n)!==e.headersList.get(n))return!1;return!0}#i(e,t,n=1/0){let r=null;if(e!==void 0)if(e instanceof f){if(r=e[m],r.method!==`GET`&&!t.ignoreMethod)return[]}else typeof e==`string`&&(r=new f(e)[m]);let i=[];if(e===void 0)for(let e of this.#e)i.push(e[1]);else{let e=this.#n(r,t);for(let t of e)i.push(t[1])}let a=[];for(let e of i){let t=d(e,`immutable`);if(a.push(t.clone()),a.length>=n)break}return Object.freeze(a)}};Object.defineProperties(x.prototype,{[Symbol.toStringTag]:{value:`Cache`,configurable:!0},match:o,matchAll:o,add:o,addAll:o,put:o,delete:o,keys:o});let S=[{key:`ignoreSearch`,converter:c.converters.boolean,defaultValue:()=>!1},{key:`ignoreMethod`,converter:c.converters.boolean,defaultValue:()=>!1},{key:`ignoreVary`,converter:c.converters.boolean,defaultValue:()=>!1}];c.converters.CacheQueryOptions=c.dictionaryConverter(S),c.converters.MultiCacheQueryOptions=c.dictionaryConverter([...S,{key:`cacheName`,converter:c.converters.DOMString}]),c.converters.Response=c.interfaceConverter(l),c.converters[`sequence`]=c.sequenceConverter(c.converters.RequestInfo),n.exports={Cache:x}})),zn=i(((e,t)=>{let{kConstruct:n}=In(),{Cache:r}=Rn(),{webidl:i}=Nt(),{kEnumerableProperty:a}=yt();var o=class e{#e=new Map;constructor(){arguments[0]!==n&&i.illegalConstructor(),i.util.markAsUncloneable(this)}async match(t,a={}){if(i.brandCheck(this,e),i.argumentLengthCheck(arguments,1,`CacheStorage.match`),t=i.converters.RequestInfo(t),a=i.converters.MultiCacheQueryOptions(a),a.cacheName!=null){if(this.#e.has(a.cacheName))return await new r(n,this.#e.get(a.cacheName)).match(t,a)}else for(let e of this.#e.values()){let i=await new r(n,e).match(t,a);if(i!==void 0)return i}}async has(t){i.brandCheck(this,e);let n=`CacheStorage.has`;return i.argumentLengthCheck(arguments,1,n),t=i.converters.DOMString(t,n,`cacheName`),this.#e.has(t)}async open(t){i.brandCheck(this,e);let a=`CacheStorage.open`;if(i.argumentLengthCheck(arguments,1,a),t=i.converters.DOMString(t,a,`cacheName`),this.#e.has(t))return new r(n,this.#e.get(t));let o=[];return this.#e.set(t,o),new r(n,o)}async delete(t){i.brandCheck(this,e);let n=`CacheStorage.delete`;return i.argumentLengthCheck(arguments,1,n),t=i.converters.DOMString(t,n,`cacheName`),this.#e.delete(t)}async keys(){return i.brandCheck(this,e),[...this.#e.keys()]}};Object.defineProperties(o.prototype,{[Symbol.toStringTag]:{value:`CacheStorage`,configurable:!0},match:a,has:a,open:a,delete:a,keys:a}),t.exports={CacheStorage:o}})),Bn=i(((e,t)=>{t.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}})),Vn=i(((e,t)=>{function n(e){for(let t=0;t=0&&n<=8||n>=10&&n<=31||n===127)return!0}return!1}function r(e){for(let t=0;t126||n===34||n===40||n===41||n===60||n===62||n===64||n===44||n===59||n===58||n===92||n===47||n===91||n===93||n===63||n===61||n===123||n===125)throw Error(`Invalid cookie name`)}}function i(e){let t=e.length,n=0;if(e[0]===`"`){if(t===1||e[t-1]!==`"`)throw Error(`Invalid cookie value`);--t,++n}for(;n126||t===34||t===44||t===59||t===92)throw Error(`Invalid cookie value`)}}function a(e){for(let t=0;tt.toString().padStart(2,`0`));function u(e){return typeof e==`number`&&(e=new Date(e)),`${s[e.getUTCDay()]}, ${l[e.getUTCDate()]} ${c[e.getUTCMonth()]} ${e.getUTCFullYear()} ${l[e.getUTCHours()]}:${l[e.getUTCMinutes()]}:${l[e.getUTCSeconds()]} GMT`}function d(e){if(e<0)throw Error(`Invalid cookie max-age`)}function f(e){if(e.name.length===0)return null;r(e.name),i(e.value);let t=[`${e.name}=${e.value}`];e.name.startsWith(`__Secure-`)&&(e.secure=!0),e.name.startsWith(`__Host-`)&&(e.secure=!0,e.domain=null,e.path=`/`),e.secure&&t.push(`Secure`),e.httpOnly&&t.push(`HttpOnly`),typeof e.maxAge==`number`&&(d(e.maxAge),t.push(`Max-Age=${e.maxAge}`)),e.domain&&(o(e.domain),t.push(`Domain=${e.domain}`)),e.path&&(a(e.path),t.push(`Path=${e.path}`)),e.expires&&e.expires.toString()!==`Invalid Date`&&t.push(`Expires=${u(e.expires)}`),e.sameSite&&t.push(`SameSite=${e.sameSite}`);for(let n of e.unparsed){if(!n.includes(`=`))throw Error(`Invalid unparsed`);let[e,...r]=n.split(`=`);t.push(`${e.trim()}=${r.join(`=`)}`)}return t.join(`; `)}t.exports={isCTLExcludingHtab:n,validateCookieName:r,validateCookiePath:a,validateCookieValue:i,toIMFDate:u,stringify:f}})),Hn=i(((e,n)=>{let{maxNameValuePairSize:r,maxAttributeValueSize:i}=Bn(),{isCTLExcludingHtab:a}=Vn(),{collectASequenceOfCodePointsFast:o}=Mt(),s=t(`node:assert`);function c(e){if(a(e))return null;let t=``,n=``,i=``,s=``;if(e.includes(`;`)){let r={position:0};t=o(`;`,e,r),n=e.slice(r.position)}else t=e;if(!t.includes(`=`))s=t;else{let e={position:0};i=o(`=`,t,e),s=t.slice(e.position+1)}return i=i.trim(),s=s.trim(),i.length+s.length>r?null:{name:i,value:s,...l(n)}}function l(e,t={}){if(e.length===0)return t;s(e[0]===`;`),e=e.slice(1);let n=``;e.includes(`;`)?(n=o(`;`,e,{position:0}),e=e.slice(n.length)):(n=e,e=``);let r=``,a=``;if(n.includes(`=`)){let e={position:0};r=o(`=`,n,e),a=n.slice(e.position+1)}else r=n;if(r=r.trim(),a=a.trim(),a.length>i)return l(e,t);let c=r.toLowerCase();if(c===`expires`)t.expires=new Date(a);else if(c===`max-age`){let n=a.charCodeAt(0);if((n<48||n>57)&&a[0]!==`-`||!/^\d+$/.test(a))return l(e,t);t.maxAge=Number(a)}else if(c===`domain`){let e=a;e[0]===`.`&&(e=e.slice(1)),e=e.toLowerCase(),t.domain=e}else if(c===`path`){let e=``;e=a.length===0||a[0]!==`/`?`/`:a,t.path=e}else if(c===`secure`)t.secure=!0;else if(c===`httponly`)t.httpOnly=!0;else if(c===`samesite`){let e=`Default`,n=a.toLowerCase();n.includes(`none`)&&(e=`None`),n.includes(`strict`)&&(e=`Strict`),n.includes(`lax`)&&(e=`Lax`),t.sameSite=e}else t.unparsed??=[],t.unparsed.push(`${r}=${a}`);return l(e,t)}n.exports={parseSetCookie:c,parseUnparsedAttributes:l}})),Un=i(((e,t)=>{let{parseSetCookie:n}=Hn(),{stringify:r}=Vn(),{webidl:i}=Nt(),{Headers:a}=En();function o(e){i.argumentLengthCheck(arguments,1,`getCookies`),i.brandCheck(e,a,{strict:!1});let t=e.get(`cookie`),n={};if(!t)return n;for(let e of t.split(`;`)){let[t,...r]=e.split(`=`);n[t.trim()]=r.join(`=`)}return n}function s(e,t,n){i.brandCheck(e,a,{strict:!1});let r=`deleteCookie`;i.argumentLengthCheck(arguments,2,r),t=i.converters.DOMString(t,r,`name`),n=i.converters.DeleteCookieAttributes(n),l(e,{name:t,value:``,expires:new Date(0),...n})}function c(e){i.argumentLengthCheck(arguments,1,`getSetCookies`),i.brandCheck(e,a,{strict:!1});let t=e.getSetCookie();return t?t.map(e=>n(e)):[]}function l(e,t){i.argumentLengthCheck(arguments,2,`setCookie`),i.brandCheck(e,a,{strict:!1}),t=i.converters.Cookie(t);let n=r(t);n&&e.append(`Set-Cookie`,n)}i.converters.DeleteCookieAttributes=i.dictionaryConverter([{converter:i.nullableConverter(i.converters.DOMString),key:`path`,defaultValue:()=>null},{converter:i.nullableConverter(i.converters.DOMString),key:`domain`,defaultValue:()=>null}]),i.converters.Cookie=i.dictionaryConverter([{converter:i.converters.DOMString,key:`name`},{converter:i.converters.DOMString,key:`value`},{converter:i.nullableConverter(e=>typeof e==`number`?i.converters[`unsigned long long`](e):new Date(e)),key:`expires`,defaultValue:()=>null},{converter:i.nullableConverter(i.converters[`long long`]),key:`maxAge`,defaultValue:()=>null},{converter:i.nullableConverter(i.converters.DOMString),key:`domain`,defaultValue:()=>null},{converter:i.nullableConverter(i.converters.DOMString),key:`path`,defaultValue:()=>null},{converter:i.nullableConverter(i.converters.boolean),key:`secure`,defaultValue:()=>null},{converter:i.nullableConverter(i.converters.boolean),key:`httpOnly`,defaultValue:()=>null},{converter:i.converters.USVString,key:`sameSite`,allowedValues:[`Strict`,`Lax`,`None`]},{converter:i.sequenceConverter(i.converters.DOMString),key:`unparsed`,defaultValue:()=>[]}]),t.exports={getCookies:o,deleteCookie:s,getSetCookies:c,setCookie:l}})),Wn=i(((e,n)=>{let{webidl:r}=Nt(),{kEnumerableProperty:i}=yt(),{kConstruct:a}=ht(),{MessagePort:o}=t(`node:worker_threads`);var s=class e extends Event{#e;constructor(e,t={}){if(e===a){super(arguments[1],arguments[2]),r.util.markAsUncloneable(this);return}let n=`MessageEvent constructor`;r.argumentLengthCheck(arguments,1,n),e=r.converters.DOMString(e,n,`type`),t=r.converters.MessageEventInit(t,n,`eventInitDict`),super(e,t),this.#e=t,r.util.markAsUncloneable(this)}get data(){return r.brandCheck(this,e),this.#e.data}get origin(){return r.brandCheck(this,e),this.#e.origin}get lastEventId(){return r.brandCheck(this,e),this.#e.lastEventId}get source(){return r.brandCheck(this,e),this.#e.source}get ports(){return r.brandCheck(this,e),Object.isFrozen(this.#e.ports)||Object.freeze(this.#e.ports),this.#e.ports}initMessageEvent(t,n=!1,i=!1,a=null,o=``,s=``,c=null,l=[]){return r.brandCheck(this,e),r.argumentLengthCheck(arguments,1,`MessageEvent.initMessageEvent`),new e(t,{bubbles:n,cancelable:i,data:a,origin:o,lastEventId:s,source:c,ports:l})}static createFastMessageEvent(t,n){let r=new e(a,t,n);return r.#e=n,r.#e.data??=null,r.#e.origin??=``,r.#e.lastEventId??=``,r.#e.source??=null,r.#e.ports??=[],r}};let{createFastMessageEvent:c}=s;delete s.createFastMessageEvent;var l=class e extends Event{#e;constructor(e,t={}){let n=`CloseEvent constructor`;r.argumentLengthCheck(arguments,1,n),e=r.converters.DOMString(e,n,`type`),t=r.converters.CloseEventInit(t),super(e,t),this.#e=t,r.util.markAsUncloneable(this)}get wasClean(){return r.brandCheck(this,e),this.#e.wasClean}get code(){return r.brandCheck(this,e),this.#e.code}get reason(){return r.brandCheck(this,e),this.#e.reason}},u=class e extends Event{#e;constructor(e,t){let n=`ErrorEvent constructor`;r.argumentLengthCheck(arguments,1,n),super(e,t),r.util.markAsUncloneable(this),e=r.converters.DOMString(e,n,`type`),t=r.converters.ErrorEventInit(t??{}),this.#e=t}get message(){return r.brandCheck(this,e),this.#e.message}get filename(){return r.brandCheck(this,e),this.#e.filename}get lineno(){return r.brandCheck(this,e),this.#e.lineno}get colno(){return r.brandCheck(this,e),this.#e.colno}get error(){return r.brandCheck(this,e),this.#e.error}};Object.defineProperties(s.prototype,{[Symbol.toStringTag]:{value:`MessageEvent`,configurable:!0},data:i,origin:i,lastEventId:i,source:i,ports:i,initMessageEvent:i}),Object.defineProperties(l.prototype,{[Symbol.toStringTag]:{value:`CloseEvent`,configurable:!0},reason:i,code:i,wasClean:i}),Object.defineProperties(u.prototype,{[Symbol.toStringTag]:{value:`ErrorEvent`,configurable:!0},message:i,filename:i,lineno:i,colno:i,error:i}),r.converters.MessagePort=r.interfaceConverter(o),r.converters[`sequence`]=r.sequenceConverter(r.converters.MessagePort);let d=[{key:`bubbles`,converter:r.converters.boolean,defaultValue:()=>!1},{key:`cancelable`,converter:r.converters.boolean,defaultValue:()=>!1},{key:`composed`,converter:r.converters.boolean,defaultValue:()=>!1}];r.converters.MessageEventInit=r.dictionaryConverter([...d,{key:`data`,converter:r.converters.any,defaultValue:()=>null},{key:`origin`,converter:r.converters.USVString,defaultValue:()=>``},{key:`lastEventId`,converter:r.converters.DOMString,defaultValue:()=>``},{key:`source`,converter:r.nullableConverter(r.converters.MessagePort),defaultValue:()=>null},{key:`ports`,converter:r.converters[`sequence`],defaultValue:()=>[]}]),r.converters.CloseEventInit=r.dictionaryConverter([...d,{key:`wasClean`,converter:r.converters.boolean,defaultValue:()=>!1},{key:`code`,converter:r.converters[`unsigned short`],defaultValue:()=>0},{key:`reason`,converter:r.converters.USVString,defaultValue:()=>``}]),r.converters.ErrorEventInit=r.dictionaryConverter([...d,{key:`message`,converter:r.converters.DOMString,defaultValue:()=>``},{key:`filename`,converter:r.converters.USVString,defaultValue:()=>``},{key:`lineno`,converter:r.converters[`unsigned long`],defaultValue:()=>0},{key:`colno`,converter:r.converters[`unsigned long`],defaultValue:()=>0},{key:`error`,converter:r.converters.any}]),n.exports={MessageEvent:s,CloseEvent:l,ErrorEvent:u,createFastMessageEvent:c}})),Gn=i(((e,t)=>{t.exports={uid:`258EAFA5-E914-47DA-95CA-C5AB0DC85B11`,sentCloseFrameState:{NOT_SENT:0,PROCESSING:1,SENT:2},staticPropertyDescriptors:{enumerable:!0,writable:!1,configurable:!1},states:{CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},opcodes:{CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},maxUnsigned16Bit:2**16-1,parserStates:{INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},emptyBuffer:Buffer.allocUnsafe(0),sendHints:{string:1,typedArray:2,arrayBuffer:3,blob:4}}})),Kn=i(((e,t)=>{t.exports={kWebSocketURL:Symbol(`url`),kReadyState:Symbol(`ready state`),kController:Symbol(`controller`),kResponse:Symbol(`response`),kBinaryType:Symbol(`binary type`),kSentClose:Symbol(`sent close`),kReceivedClose:Symbol(`received close`),kByteParser:Symbol(`byte parser`)}})),qn=i(((e,n)=>{let{kReadyState:r,kController:i,kResponse:a,kBinaryType:o,kWebSocketURL:s}=Kn(),{states:c,opcodes:l}=Gn(),{ErrorEvent:u,createFastMessageEvent:d}=Wn(),{isUtf8:f}=t(`node:buffer`),{collectASequenceOfCodePointsFast:p,removeHTTPWhitespace:m}=Mt();function h(e){return e[r]===c.CONNECTING}function g(e){return e[r]===c.OPEN}function v(e){return e[r]===c.CLOSING}function y(e){return e[r]===c.CLOSED}function b(e,t,n=(e,t)=>new Event(e,t),r={}){let i=n(e,r);t.dispatchEvent(i)}function x(e,t,n){if(e[r]!==c.OPEN)return;let i;if(t===l.TEXT)try{i=P(n)}catch{T(e,`Received invalid UTF-8 in text frame.`);return}else t===l.BINARY&&(i=e[o]===`blob`?new Blob([n]):S(n));b(`message`,e,d,{origin:e[s].origin,data:i})}function S(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}function C(e){if(e.length===0)return!1;for(let t=0;t126||n===34||n===40||n===41||n===44||n===47||n===58||n===59||n===60||n===61||n===62||n===63||n===64||n===91||n===92||n===93||n===123||n===125)return!1}return!0}function w(e){return e>=1e3&&e<1015?e!==1004&&e!==1005&&e!==1006:e>=3e3&&e<=4999}function T(e,t){let{[i]:n,[a]:r}=e;n.abort(),r?.socket&&!r.socket.destroyed&&r.socket.destroy(),t&&b(`error`,e,(e,t)=>new u(e,t),{error:Error(t),message:t})}function E(e){return e===l.CLOSE||e===l.PING||e===l.PONG}function D(e){return e===l.CONTINUATION}function O(e){return e===l.TEXT||e===l.BINARY}function k(e){return O(e)||D(e)||E(e)}function A(e){let t={position:0},n=new Map;for(;t.position57)return!1}let t=Number.parseInt(e,10);return t>=8&&t<=15}let M=typeof process.versions.icu==`string`,N=M?new TextDecoder(`utf-8`,{fatal:!0}):void 0,P=M?N.decode.bind(N):function(e){if(f(e))return e.toString(`utf-8`);throw TypeError(`Invalid utf-8 received.`)};n.exports={isConnecting:h,isEstablished:g,isClosing:v,isClosed:y,fireEvent:b,isValidSubprotocol:C,isValidStatusCode:w,failWebsocketConnection:T,websocketMessageReceived:x,utf8Decode:P,isControlFrame:E,isContinuationFrame:D,isTextBinaryFrame:O,isValidOpcode:k,parseExtensions:A,isValidClientWindowBits:j}})),Jn=i(((e,n)=>{let{maxUnsigned16Bit:r}=Gn(),i=16386,a,o=null,s=i;try{a=t(`node:crypto`)}catch{a={randomFillSync:function(e,t,n){for(let t=0;tr?(o+=8,a=127):i>125&&(o+=2,a=126);let s=Buffer.allocUnsafe(i+o);s[0]=s[1]=0,s[0]|=128,s[0]=(s[0]&240)+e,s[o-4]=n[0],s[o-3]=n[1],s[o-2]=n[2],s[o-1]=n[3],s[1]=a,a===126?s.writeUInt16BE(i,2):a===127&&(s[2]=s[3]=0,s.writeUIntBE(i,4,6)),s[1]|=128;for(let e=0;e{let{uid:r,states:i,sentCloseFrameState:a,emptyBuffer:o,opcodes:s}=Gn(),{kReadyState:c,kSentClose:l,kByteParser:u,kReceivedClose:d,kResponse:f}=Kn(),{fireEvent:p,failWebsocketConnection:m,isClosing:h,isClosed:g,isEstablished:v,parseExtensions:y}=qn(),{channels:b}=bt(),{CloseEvent:x}=Wn(),{makeRequest:S}=kn(),{fetching:C}=An(),{Headers:w,getHeadersList:T}=En(),{getDecodeSplit:E}=Pt(),{WebsocketFrameSend:D}=Jn(),O;try{O=t(`node:crypto`)}catch{}function k(e,t,n,i,a,o){let s=e;s.protocol=e.protocol===`ws:`?`http:`:`https:`;let c=S({urlList:[s],client:n,serviceWorkers:`none`,referrer:`no-referrer`,mode:`websocket`,credentials:`include`,cache:`no-store`,redirect:`error`});o.headers&&(c.headersList=T(new w(o.headers)));let l=O.randomBytes(16).toString(`base64`);c.headersList.append(`sec-websocket-key`,l),c.headersList.append(`sec-websocket-version`,`13`);for(let e of t)c.headersList.append(`sec-websocket-protocol`,e);return c.headersList.append(`sec-websocket-extensions`,`permessage-deflate; client_max_window_bits`),C({request:c,useParallelQueue:!0,dispatcher:o.dispatcher,processResponse(e){if(e.type===`error`||e.status!==101){m(i,`Received network error or non-101 status code.`);return}if(t.length!==0&&!e.headersList.get(`Sec-WebSocket-Protocol`)){m(i,`Server did not respond with sent protocols.`);return}if(e.headersList.get(`Upgrade`)?.toLowerCase()!==`websocket`){m(i,`Server did not set Upgrade header to "websocket".`);return}if(e.headersList.get(`Connection`)?.toLowerCase()!==`upgrade`){m(i,`Server did not set Connection header to "upgrade".`);return}if(e.headersList.get(`Sec-WebSocket-Accept`)!==O.createHash(`sha1`).update(l+r).digest(`base64`)){m(i,`Incorrect hash received in Sec-WebSocket-Accept header.`);return}let n=e.headersList.get(`Sec-WebSocket-Extensions`),o;if(n!==null&&(o=y(n),!o.has(`permessage-deflate`))){m(i,`Sec-WebSocket-Extensions header does not match.`);return}let s=e.headersList.get(`Sec-WebSocket-Protocol`);if(s!==null&&!E(`sec-websocket-protocol`,c.headersList).includes(s)){m(i,`Protocol was not set in the opening handshake.`);return}e.socket.on(`data`,j),e.socket.on(`close`,M),e.socket.on(`error`,N),b.open.hasSubscribers&&b.open.publish({address:e.socket.address(),protocol:s,extensions:n}),a(e,o)}})}function A(e,t,n,r){if(!(h(e)||g(e)))if(!v(e))m(e,`Connection was closed before it was established.`),e[c]=i.CLOSING;else if(e[l]===a.NOT_SENT){e[l]=a.PROCESSING;let u=new D;t!==void 0&&n===void 0?(u.frameData=Buffer.allocUnsafe(2),u.frameData.writeUInt16BE(t,0)):t!==void 0&&n!==void 0?(u.frameData=Buffer.allocUnsafe(2+r),u.frameData.writeUInt16BE(t,0),u.frameData.write(n,2,`utf-8`)):u.frameData=o,e[f].socket.write(u.createFrame(s.CLOSE)),e[l]=a.SENT,e[c]=i.CLOSING}else e[c]=i.CLOSING}function j(e){this.ws[u].write(e)||this.pause()}function M(){let{ws:e}=this,{[f]:t}=e;t.socket.off(`data`,j),t.socket.off(`close`,M),t.socket.off(`error`,N);let n=e[l]===a.SENT&&e[d],r=1005,o=``,s=e[u].closingInfo;s&&!s.error?(r=s.code??1005,o=s.reason):e[d]||(r=1006),e[c]=i.CLOSED,p(`close`,e,(e,t)=>new x(e,t),{wasClean:n,code:r,reason:o}),b.close.hasSubscribers&&b.close.publish({websocket:e,code:r,reason:o})}function N(e){let{ws:t}=this;t[c]=i.CLOSING,b.socketError.hasSubscribers&&b.socketError.publish(e),this.destroy()}n.exports={establishWebSocketConnection:k,closeWebSocketConnection:A}})),Xn=i(((e,n)=>{let{createInflateRaw:r,Z_DEFAULT_WINDOWBITS:i}=t(`node:zlib`),{isValidClientWindowBits:a}=qn(),{MessageSizeExceededError:o}=gt(),s=Buffer.from([0,0,255,255]),c=Symbol(`kBuffer`),l=Symbol(`kLength`);n.exports={PerMessageDeflate:class{#e;#t={};#n=!1;#r=null;constructor(e){this.#t.serverNoContextTakeover=e.has(`server_no_context_takeover`),this.#t.serverMaxWindowBits=e.get(`server_max_window_bits`)}decompress(e,t,n){if(this.#n){n(new o);return}if(!this.#e){let e=i;if(this.#t.serverMaxWindowBits){if(!a(this.#t.serverMaxWindowBits)){n(Error(`Invalid server_max_window_bits`));return}e=Number.parseInt(this.#t.serverMaxWindowBits)}try{this.#e=r({windowBits:e})}catch(e){n(e);return}this.#e[c]=[],this.#e[l]=0,this.#e.on(`data`,e=>{if(!this.#n){if(this.#e[l]+=e.length,this.#e[l]>4194304){if(this.#n=!0,this.#e.removeAllListeners(),this.#e.destroy(),this.#e=null,this.#r){let e=this.#r;this.#r=null,e(new o)}return}this.#e[c].push(e)}}),this.#e.on(`error`,e=>{this.#e=null,n(e)})}this.#r=n,this.#e.write(e),t&&this.#e.write(s),this.#e.flush(()=>{if(this.#n||!this.#e)return;let e=Buffer.concat(this.#e[c],this.#e[l]);this.#e[c].length=0,this.#e[l]=0,this.#r=null,n(null,e)})}}}})),Zn=i(((e,n)=>{let{Writable:r}=t(`node:stream`),i=t(`node:assert`),{parserStates:a,opcodes:o,states:s,emptyBuffer:c,sentCloseFrameState:l}=Gn(),{kReadyState:u,kSentClose:d,kResponse:f,kReceivedClose:p}=Kn(),{channels:m}=bt(),{isValidStatusCode:h,isValidOpcode:g,failWebsocketConnection:v,websocketMessageReceived:y,utf8Decode:b,isControlFrame:x,isTextBinaryFrame:S,isContinuationFrame:C}=qn(),{WebsocketFrameSend:w}=Jn(),{closeWebSocketConnection:T}=Yn(),{PerMessageDeflate:E}=Xn();n.exports={ByteParser:class extends r{#e=[];#t=0;#n=!1;#r=a.INFO;#i={};#a=[];#o;constructor(e,t){super(),this.ws=e,this.#o=t??new Map,this.#o.has(`permessage-deflate`)&&this.#o.set(`permessage-deflate`,new E(t))}_write(e,t,n){this.#e.push(e),this.#t+=e.length,this.#n=!0,this.run(n)}run(e){for(;this.#n;)if(this.#r===a.INFO){if(this.#t<2)return e();let t=this.consume(2),n=(t[0]&128)!=0,r=t[0]&15,i=(t[1]&128)==128,s=!n&&r!==o.CONTINUATION,c=t[1]&127,l=t[0]&64,u=t[0]&32,d=t[0]&16;if(!g(r))return v(this.ws,`Invalid opcode received`),e();if(i)return v(this.ws,`Frame cannot be masked`),e();if(l!==0&&!this.#o.has(`permessage-deflate`)){v(this.ws,`Expected RSV1 to be clear.`);return}if(u!==0||d!==0){v(this.ws,`RSV1, RSV2, RSV3 must be clear`);return}if(s&&!S(r)){v(this.ws,`Invalid frame type was fragmented.`);return}if(S(r)&&this.#a.length>0){v(this.ws,`Expected continuation frame`);return}if(this.#i.fragmented&&s){v(this.ws,`Fragmented frame exceeded 125 bytes.`);return}if((c>125||s)&&x(r)){v(this.ws,`Control frame either too large or fragmented`);return}if(C(r)&&this.#a.length===0&&!this.#i.compressed){v(this.ws,`Unexpected continuation frame`);return}c<=125?(this.#i.payloadLength=c,this.#r=a.READ_DATA):c===126?this.#r=a.PAYLOADLENGTH_16:c===127&&(this.#r=a.PAYLOADLENGTH_64),S(r)&&(this.#i.binaryType=r,this.#i.compressed=l!==0),this.#i.opcode=r,this.#i.masked=i,this.#i.fin=n,this.#i.fragmented=s}else if(this.#r===a.PAYLOADLENGTH_16){if(this.#t<2)return e();let t=this.consume(2);this.#i.payloadLength=t.readUInt16BE(0),this.#r=a.READ_DATA}else if(this.#r===a.PAYLOADLENGTH_64){if(this.#t<8)return e();let t=this.consume(8),n=t.readUInt32BE(0),r=t.readUInt32BE(4);if(n!==0||r>2**31-1){v(this.ws,`Received payload length > 2^31 bytes.`);return}this.#i.payloadLength=r,this.#r=a.READ_DATA}else if(this.#r===a.READ_DATA){if(this.#t{if(t){v(this.ws,t.message);return}if(this.#a.push(n),!this.#i.fin){this.#r=a.INFO,this.#n=!0,this.run(e);return}y(this.ws,this.#i.binaryType,Buffer.concat(this.#a)),this.#n=!0,this.#r=a.INFO,this.#a.length=0,this.run(e)}),this.#n=!1;break}else{if(this.#a.push(t),!this.#i.fragmented&&this.#i.fin){let e=Buffer.concat(this.#a);y(this.ws,this.#i.binaryType,e),this.#a.length=0}this.#r=a.INFO}}}consume(e){if(e>this.#t)throw Error(`Called consume() before buffers satiated.`);if(e===0)return c;if(this.#e[0].length===e)return this.#t-=this.#e[0].length,this.#e.shift();let t=Buffer.allocUnsafe(e),n=0;for(;n!==e;){let r=this.#e[0],{length:i}=r;if(i+n===e){t.set(this.#e.shift(),n);break}else if(i+n>e){t.set(r.subarray(0,e-n),n),this.#e[0]=r.subarray(e-n);break}else t.set(this.#e.shift(),n),n+=r.length}return this.#t-=e,t}parseCloseBody(e){i(e.length!==1);let t;if(e.length>=2&&(t=e.readUInt16BE(0)),t!==void 0&&!h(t))return{code:1002,reason:`Invalid status code`,error:!0};let n=e.subarray(2);n[0]===239&&n[1]===187&&n[2]===191&&(n=n.subarray(3));try{n=b(n)}catch{return{code:1007,reason:`Invalid UTF-8`,error:!0}}return{code:t,reason:n,error:!1}}parseControlFrame(e){let{opcode:t,payloadLength:n}=this.#i;if(t===o.CLOSE){if(n===1)return v(this.ws,`Received close frame with a 1-byte body.`),!1;if(this.#i.closeInfo=this.parseCloseBody(e),this.#i.closeInfo.error){let{code:e,reason:t}=this.#i.closeInfo;return T(this.ws,e,t,t.length),v(this.ws,t),!1}if(this.ws[d]!==l.SENT){let e=c;this.#i.closeInfo.code&&(e=Buffer.allocUnsafe(2),e.writeUInt16BE(this.#i.closeInfo.code,0));let t=new w(e);this.ws[f].socket.write(t.createFrame(o.CLOSE),e=>{e||(this.ws[d]=l.SENT)})}return this.ws[u]=s.CLOSING,this.ws[p]=!0,!1}else if(t===o.PING){if(!this.ws[p]){let t=new w(e);this.ws[f].socket.write(t.createFrame(o.PONG)),m.ping.hasSubscribers&&m.ping.publish({payload:e})}}else t===o.PONG&&m.pong.hasSubscribers&&m.pong.publish({payload:e});return!0}get closingInfo(){return this.#i.closeInfo}}}})),Qn=i(((e,t)=>{let{WebsocketFrameSend:n}=Jn(),{opcodes:r,sendHints:i}=Gn(),a=Gt(),o=Buffer[Symbol.species];var s=class{#e=new a;#t=!1;#n;constructor(e){this.#n=e}add(e,t,n){if(n!==i.blob){let r=c(e,n);if(!this.#t)this.#n.write(r,t);else{let e={promise:null,callback:t,frame:r};this.#e.push(e)}return}let r={promise:e.arrayBuffer().then(e=>{r.promise=null,r.frame=c(e,n)}),callback:t,frame:null};this.#e.push(r),this.#t||this.#r()}async#r(){this.#t=!0;let e=this.#e;for(;!e.isEmpty();){let t=e.shift();t.promise!==null&&await t.promise,this.#n.write(t.frame,t.callback),t.callback=t.frame=null}this.#t=!1}};function c(e,t){return new n(l(e,t)).createFrame(t===i.string?r.TEXT:r.BINARY)}function l(e,t){switch(t){case i.string:return Buffer.from(e);case i.arrayBuffer:case i.blob:return new o(e);case i.typedArray:return new o(e.buffer,e.byteOffset,e.byteLength)}}t.exports={SendQueue:s}})),$n=i(((e,n)=>{let{webidl:r}=Nt(),{URLSerializer:i}=Mt(),{environmentSettingsObject:a}=Pt(),{staticPropertyDescriptors:o,states:s,sentCloseFrameState:c,sendHints:l}=Gn(),{kWebSocketURL:u,kReadyState:d,kController:f,kBinaryType:p,kResponse:m,kSentClose:h,kByteParser:g}=Kn(),{isConnecting:v,isEstablished:y,isClosing:b,isValidSubprotocol:x,fireEvent:S}=qn(),{establishWebSocketConnection:C,closeWebSocketConnection:w}=Yn(),{ByteParser:T}=Zn(),{kEnumerableProperty:E,isBlobLike:D}=yt(),{getGlobalDispatcher:O}=bn(),{types:k}=t(`node:util`),{ErrorEvent:A,CloseEvent:j}=Wn(),{SendQueue:M}=Qn();var N=class e extends EventTarget{#e={open:null,error:null,close:null,message:null};#t=0;#n=``;#r=``;#i;constructor(t,n=[]){super(),r.util.markAsUncloneable(this);let i=`WebSocket constructor`;r.argumentLengthCheck(arguments,1,i);let o=r.converters[`DOMString or sequence or WebSocketInit`](n,i,`options`);t=r.converters.USVString(t,i,`url`),n=o.protocols;let s=a.settingsObject.baseUrl,l;try{l=new URL(t,s)}catch(e){throw new DOMException(e,`SyntaxError`)}if(l.protocol===`http:`?l.protocol=`ws:`:l.protocol===`https:`&&(l.protocol=`wss:`),l.protocol!==`ws:`&&l.protocol!==`wss:`)throw new DOMException(`Expected a ws: or wss: protocol, got ${l.protocol}`,`SyntaxError`);if(l.hash||l.href.endsWith(`#`))throw new DOMException(`Got fragment`,`SyntaxError`);if(typeof n==`string`&&(n=[n]),n.length!==new Set(n.map(e=>e.toLowerCase())).size||n.length>0&&!n.every(e=>x(e)))throw new DOMException(`Invalid Sec-WebSocket-Protocol value`,`SyntaxError`);this[u]=new URL(l.href);let m=a.settingsObject;this[f]=C(l,n,m,this,(e,t)=>this.#a(e,t),o),this[d]=e.CONNECTING,this[h]=c.NOT_SENT,this[p]=`blob`}close(t=void 0,n=void 0){r.brandCheck(this,e);let i=`WebSocket.close`;if(t!==void 0&&(t=r.converters[`unsigned short`](t,i,`code`,{clamp:!0})),n!==void 0&&(n=r.converters.USVString(n,i,`reason`)),t!==void 0&&t!==1e3&&(t<3e3||t>4999))throw new DOMException(`invalid code`,`InvalidAccessError`);let a=0;if(n!==void 0&&(a=Buffer.byteLength(n),a>123))throw new DOMException(`Reason must be less than 123 bytes; received ${a}`,`SyntaxError`);w(this,t,n,a)}send(t){r.brandCheck(this,e);let n=`WebSocket.send`;if(r.argumentLengthCheck(arguments,1,n),t=r.converters.WebSocketSendData(t,n,`data`),v(this))throw new DOMException(`Sent before connected.`,`InvalidStateError`);if(!(!y(this)||b(this)))if(typeof t==`string`){let e=Buffer.byteLength(t);this.#t+=e,this.#i.add(t,()=>{this.#t-=e},l.string)}else k.isArrayBuffer(t)?(this.#t+=t.byteLength,this.#i.add(t,()=>{this.#t-=t.byteLength},l.arrayBuffer)):ArrayBuffer.isView(t)?(this.#t+=t.byteLength,this.#i.add(t,()=>{this.#t-=t.byteLength},l.typedArray)):D(t)&&(this.#t+=t.size,this.#i.add(t,()=>{this.#t-=t.size},l.blob))}get readyState(){return r.brandCheck(this,e),this[d]}get bufferedAmount(){return r.brandCheck(this,e),this.#t}get url(){return r.brandCheck(this,e),i(this[u])}get extensions(){return r.brandCheck(this,e),this.#r}get protocol(){return r.brandCheck(this,e),this.#n}get onopen(){return r.brandCheck(this,e),this.#e.open}set onopen(t){r.brandCheck(this,e),this.#e.open&&this.removeEventListener(`open`,this.#e.open),typeof t==`function`?(this.#e.open=t,this.addEventListener(`open`,t)):this.#e.open=null}get onerror(){return r.brandCheck(this,e),this.#e.error}set onerror(t){r.brandCheck(this,e),this.#e.error&&this.removeEventListener(`error`,this.#e.error),typeof t==`function`?(this.#e.error=t,this.addEventListener(`error`,t)):this.#e.error=null}get onclose(){return r.brandCheck(this,e),this.#e.close}set onclose(t){r.brandCheck(this,e),this.#e.close&&this.removeEventListener(`close`,this.#e.close),typeof t==`function`?(this.#e.close=t,this.addEventListener(`close`,t)):this.#e.close=null}get onmessage(){return r.brandCheck(this,e),this.#e.message}set onmessage(t){r.brandCheck(this,e),this.#e.message&&this.removeEventListener(`message`,this.#e.message),typeof t==`function`?(this.#e.message=t,this.addEventListener(`message`,t)):this.#e.message=null}get binaryType(){return r.brandCheck(this,e),this[p]}set binaryType(t){r.brandCheck(this,e),t!==`blob`&&t!==`arraybuffer`?this[p]=`blob`:this[p]=t}#a(e,t){this[m]=e;let n=new T(this,t);n.on(`drain`,P),n.on(`error`,F.bind(this)),e.socket.ws=this,this[g]=n,this.#i=new M(e.socket),this[d]=s.OPEN;let r=e.headersList.get(`sec-websocket-extensions`);r!==null&&(this.#r=r);let i=e.headersList.get(`sec-websocket-protocol`);i!==null&&(this.#n=i),S(`open`,this)}};N.CONNECTING=N.prototype.CONNECTING=s.CONNECTING,N.OPEN=N.prototype.OPEN=s.OPEN,N.CLOSING=N.prototype.CLOSING=s.CLOSING,N.CLOSED=N.prototype.CLOSED=s.CLOSED,Object.defineProperties(N.prototype,{CONNECTING:o,OPEN:o,CLOSING:o,CLOSED:o,url:E,readyState:E,bufferedAmount:E,onopen:E,onerror:E,onclose:E,close:E,onmessage:E,binaryType:E,send:E,extensions:E,protocol:E,[Symbol.toStringTag]:{value:`WebSocket`,writable:!1,enumerable:!1,configurable:!0}}),Object.defineProperties(N,{CONNECTING:o,OPEN:o,CLOSING:o,CLOSED:o}),r.converters[`sequence`]=r.sequenceConverter(r.converters.DOMString),r.converters[`DOMString or sequence`]=function(e,t,n){return r.util.Type(e)===`Object`&&Symbol.iterator in e?r.converters[`sequence`](e):r.converters.DOMString(e,t,n)},r.converters.WebSocketInit=r.dictionaryConverter([{key:`protocols`,converter:r.converters[`DOMString or sequence`],defaultValue:()=>[]},{key:`dispatcher`,converter:r.converters.any,defaultValue:()=>O()},{key:`headers`,converter:r.nullableConverter(r.converters.HeadersInit)}]),r.converters[`DOMString or sequence or WebSocketInit`]=function(e){return r.util.Type(e)===`Object`&&!(Symbol.iterator in e)?r.converters.WebSocketInit(e):{protocols:r.converters[`DOMString or sequence`](e)}},r.converters.WebSocketSendData=function(e){if(r.util.Type(e)===`Object`){if(D(e))return r.converters.Blob(e,{strict:!1});if(ArrayBuffer.isView(e)||k.isArrayBuffer(e))return r.converters.BufferSource(e)}return r.converters.USVString(e)};function P(){this.ws[m].socket.resume()}function F(e){let t,n;e instanceof j?(t=e.reason,n=e.code):t=e.message,S(`error`,this,()=>new A(`error`,{error:e,message:t})),w(this,n)}n.exports={WebSocket:N}})),er=i(((e,t)=>{function n(e){return e.indexOf(`\0`)===-1}function r(e){if(e.length===0)return!1;for(let t=0;t57)return!1;return!0}function i(e){return new Promise(t=>{setTimeout(t,e).unref()})}t.exports={isValidLastEventId:n,isASCIINumber:r,delay:i}})),tr=i(((e,n)=>{let{Transform:r}=t(`node:stream`),{isASCIINumber:i,isValidLastEventId:a}=er(),o=[239,187,191];n.exports={EventSourceStream:class extends r{state=null;checkBOM=!0;crlfCheck=!1;eventEndCheck=!1;buffer=null;pos=0;event={data:void 0,event:void 0,id:void 0,retry:void 0};constructor(e={}){e.readableObjectMode=!0,super(e),this.state=e.eventSourceSettings||{},e.push&&(this.push=e.push)}_transform(e,t,n){if(e.length===0){n();return}if(this.buffer?this.buffer=Buffer.concat([this.buffer,e]):this.buffer=e,this.checkBOM)switch(this.buffer.length){case 1:if(this.buffer[0]===o[0]){n();return}this.checkBOM=!1,n();return;case 2:if(this.buffer[0]===o[0]&&this.buffer[1]===o[1]){n();return}this.checkBOM=!1;break;case 3:if(this.buffer[0]===o[0]&&this.buffer[1]===o[1]&&this.buffer[2]===o[2]){this.buffer=Buffer.alloc(0),this.checkBOM=!1,n();return}this.checkBOM=!1;break;default:this.buffer[0]===o[0]&&this.buffer[1]===o[1]&&this.buffer[2]===o[2]&&(this.buffer=this.buffer.subarray(3)),this.checkBOM=!1;break}for(;this.pos0&&(t[r]=o);break}}processEvent(e){e.retry&&i(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&a(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}}}}})),nr=i(((e,n)=>{let{pipeline:r}=t(`node:stream`),{fetching:i}=An(),{makeRequest:a}=kn(),{webidl:o}=Nt(),{EventSourceStream:s}=tr(),{parseMIMEType:c}=Mt(),{createFastMessageEvent:l}=Wn(),{isNetworkError:u}=Dn(),{delay:d}=er(),{kEnumerableProperty:f}=yt(),{environmentSettingsObject:p}=Pt(),m=!1,h=3e3;var g=class e extends EventTarget{#e={open:null,error:null,message:null};#t=null;#n=!1;#r=0;#i=null;#a=null;#o;#s;constructor(e,t={}){super(),o.util.markAsUncloneable(this);let n=`EventSource constructor`;o.argumentLengthCheck(arguments,1,n),m||(m=!0,process.emitWarning(`EventSource is experimental, expect them to change at any time.`,{code:`UNDICI-ES`})),e=o.converters.USVString(e,n,`url`),t=o.converters.EventSourceInitDict(t,n,`eventSourceInitDict`),this.#o=t.dispatcher,this.#s={lastEventId:``,reconnectionTime:h};let r=p,i;try{i=new URL(e,r.settingsObject.baseUrl),this.#s.origin=i.origin}catch(e){throw new DOMException(e,`SyntaxError`)}this.#t=i.href;let s=`anonymous`;t.withCredentials&&(s=`use-credentials`,this.#n=!0);let c={redirect:`follow`,keepalive:!0,mode:`cors`,credentials:s===`anonymous`?`same-origin`:`omit`,referrer:`no-referrer`};c.client=p.settingsObject,c.headersList=[[`accept`,{name:`accept`,value:`text/event-stream`}]],c.cache=`no-store`,c.initiator=`other`,c.urlList=[new URL(this.#t)],this.#i=a(c),this.#c()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#c(){if(this.#r===2)return;this.#r=0;let e={request:this.#i,dispatcher:this.#o};e.processResponseEndOfBody=e=>{u(e)&&(this.dispatchEvent(new Event(`error`)),this.close()),this.#l()},e.processResponse=e=>{if(u(e))if(e.aborted){this.close(),this.dispatchEvent(new Event(`error`));return}else{this.#l();return}let t=e.headersList.get(`content-type`,!0),n=t===null?`failure`:c(t),i=n!==`failure`&&n.essence===`text/event-stream`;if(e.status!==200||i===!1){this.close(),this.dispatchEvent(new Event(`error`));return}this.#r=1,this.dispatchEvent(new Event(`open`)),this.#s.origin=e.urlList[e.urlList.length-1].origin;let a=new s({eventSourceSettings:this.#s,push:e=>{this.dispatchEvent(l(e.type,e.options))}});r(e.body.stream,a,e=>{e?.aborted===!1&&(this.close(),this.dispatchEvent(new Event(`error`)))})},this.#a=i(e)}async#l(){this.#r!==2&&(this.#r=0,this.dispatchEvent(new Event(`error`)),await d(this.#s.reconnectionTime),this.#r===0&&(this.#s.lastEventId.length&&this.#i.headersList.set(`last-event-id`,this.#s.lastEventId,!0),this.#c()))}close(){o.brandCheck(this,e),this.#r!==2&&(this.#r=2,this.#a.abort(),this.#i=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}};let v={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:0,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:1,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:2,writable:!1}};Object.defineProperties(g,v),Object.defineProperties(g.prototype,v),Object.defineProperties(g.prototype,{close:f,onerror:f,onmessage:f,onopen:f,readyState:f,url:f,withCredentials:f}),o.converters.EventSourceInitDict=o.dictionaryConverter([{key:`withCredentials`,converter:o.converters.boolean,defaultValue:()=>!1},{key:`dispatcher`,converter:o.converters.any}]),n.exports={EventSource:g,defaultReconnectionTime:h}})),rr=i(((e,n)=>{let r=Wt(),i=St(),a=Jt(),o=Yt(),s=Xt(),c=Zt(),l=Qt(),u=en(),d=gt(),f=yt(),{InvalidArgumentError:p}=d,m=un(),h=Tt(),g=hn(),v=yn(),y=gn(),b=dn(),x=$t(),{getGlobalDispatcher:S,setGlobalDispatcher:C}=bn(),w=xn(),T=Ht(),E=Ut();Object.assign(i.prototype,m),n.exports.Dispatcher=i,n.exports.Client=r,n.exports.Pool=a,n.exports.BalancedPool=o,n.exports.Agent=s,n.exports.ProxyAgent=c,n.exports.EnvHttpProxyAgent=l,n.exports.RetryAgent=u,n.exports.RetryHandler=x,n.exports.DecoratorHandler=w,n.exports.RedirectHandler=T,n.exports.createRedirectInterceptor=E,n.exports.interceptors={redirect:Sn(),retry:Cn(),dump:wn(),dns:Tn()},n.exports.buildConnector=h,n.exports.errors=d,n.exports.util={parseHeaders:f.parseHeaders,headerNameToString:f.headerNameToString};function D(e){return(t,n,r)=>{if(typeof n==`function`&&(r=n,n=null),!t||typeof t!=`string`&&typeof t!=`object`&&!(t instanceof URL))throw new p(`invalid url`);if(n!=null&&typeof n!=`object`)throw new p(`invalid opts`);if(n&&n.path!=null){if(typeof n.path!=`string`)throw new p(`invalid opts.path`);let e=n.path;n.path.startsWith(`/`)||(e=`/${e}`),t=new URL(f.parseOrigin(t).origin+e)}else n||=typeof t==`object`?t:{},t=f.parseURL(t);let{agent:i,dispatcher:a=S()}=n;if(i)throw new p(`unsupported opts.agent. Did you mean opts.client?`);return e.call(a,{...n,origin:t.origin,path:t.search?`${t.pathname}${t.search}`:t.pathname,method:n.method||(n.body?`PUT`:`GET`)},r)}}n.exports.setGlobalDispatcher=C,n.exports.getGlobalDispatcher=S;let O=An().fetch;n.exports.fetch=async function(e,t=void 0){try{return await O(e,t)}catch(e){throw e&&typeof e==`object`&&Error.captureStackTrace(e),e}},n.exports.Headers=En().Headers,n.exports.Response=Dn().Response,n.exports.Request=kn().Request,n.exports.FormData=Lt().FormData,n.exports.File=globalThis.File??t(`node:buffer`).File,n.exports.FileReader=Fn().FileReader;let{setGlobalOrigin:k,getGlobalOrigin:A}=jt();n.exports.setGlobalOrigin=k,n.exports.getGlobalOrigin=A;let{CacheStorage:j}=zn(),{kConstruct:M}=In();n.exports.caches=new j(M);let{deleteCookie:N,getCookies:P,getSetCookies:F,setCookie:I}=Un();n.exports.deleteCookie=N,n.exports.getCookies=P,n.exports.getSetCookies=F,n.exports.setCookie=I;let{parseMIMEType:L,serializeAMimeType:R}=Mt();n.exports.parseMIMEType=L,n.exports.serializeAMimeType=R;let{CloseEvent:z,ErrorEvent:ee,MessageEvent:B}=Wn();n.exports.WebSocket=$n().WebSocket,n.exports.CloseEvent=z,n.exports.ErrorEvent=ee,n.exports.MessageEvent=B,n.exports.request=D(m.request),n.exports.stream=D(m.stream),n.exports.pipeline=D(m.pipeline),n.exports.connect=D(m.connect),n.exports.upgrade=D(m.upgrade),n.exports.MockClient=g,n.exports.MockPool=y,n.exports.MockAgent=v,n.exports.mockErrors=b;let{EventSource:te}=nr();n.exports.EventSource=te})),ir=n(mt(),1),ar=rr(),or=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},sr;(function(e){e[e.OK=200]=`OK`,e[e.MultipleChoices=300]=`MultipleChoices`,e[e.MovedPermanently=301]=`MovedPermanently`,e[e.ResourceMoved=302]=`ResourceMoved`,e[e.SeeOther=303]=`SeeOther`,e[e.NotModified=304]=`NotModified`,e[e.UseProxy=305]=`UseProxy`,e[e.SwitchProxy=306]=`SwitchProxy`,e[e.TemporaryRedirect=307]=`TemporaryRedirect`,e[e.PermanentRedirect=308]=`PermanentRedirect`,e[e.BadRequest=400]=`BadRequest`,e[e.Unauthorized=401]=`Unauthorized`,e[e.PaymentRequired=402]=`PaymentRequired`,e[e.Forbidden=403]=`Forbidden`,e[e.NotFound=404]=`NotFound`,e[e.MethodNotAllowed=405]=`MethodNotAllowed`,e[e.NotAcceptable=406]=`NotAcceptable`,e[e.ProxyAuthenticationRequired=407]=`ProxyAuthenticationRequired`,e[e.RequestTimeout=408]=`RequestTimeout`,e[e.Conflict=409]=`Conflict`,e[e.Gone=410]=`Gone`,e[e.TooManyRequests=429]=`TooManyRequests`,e[e.InternalServerError=500]=`InternalServerError`,e[e.NotImplemented=501]=`NotImplemented`,e[e.BadGateway=502]=`BadGateway`,e[e.ServiceUnavailable=503]=`ServiceUnavailable`,e[e.GatewayTimeout=504]=`GatewayTimeout`})(sr||={});var cr;(function(e){e.Accept=`accept`,e.ContentType=`content-type`})(cr||={});var lr;(function(e){e.ApplicationJson=`application/json`})(lr||={});const ur=[sr.MovedPermanently,sr.ResourceMoved,sr.SeeOther,sr.TemporaryRedirect,sr.PermanentRedirect],dr=[sr.BadGateway,sr.ServiceUnavailable,sr.GatewayTimeout],fr=[`OPTIONS`,`GET`,`DELETE`,`HEAD`];var pr=class e extends Error{constructor(t,n){super(t),this.name=`HttpClientError`,this.statusCode=n,Object.setPrototypeOf(this,e.prototype)}},mr=class{constructor(e){this.message=e}readBody(){return or(this,void 0,void 0,function*(){return new Promise(e=>or(this,void 0,void 0,function*(){let t=Buffer.alloc(0);this.message.on(`data`,e=>{t=Buffer.concat([t,e])}),this.message.on(`end`,()=>{e(t.toString())})}))})}readBodyBuffer(){return or(this,void 0,void 0,function*(){return new Promise(e=>or(this,void 0,void 0,function*(){let t=[];this.message.on(`data`,e=>{t.push(e)}),this.message.on(`end`,()=>{e(Buffer.concat(t))})}))})}},hr=class{constructor(e,t,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=this._getUserAgentWithOrchestrationId(e),this.handlers=t||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries))}options(e,t){return or(this,void 0,void 0,function*(){return this.request(`OPTIONS`,e,null,t||{})})}get(e,t){return or(this,void 0,void 0,function*(){return this.request(`GET`,e,null,t||{})})}del(e,t){return or(this,void 0,void 0,function*(){return this.request(`DELETE`,e,null,t||{})})}post(e,t,n){return or(this,void 0,void 0,function*(){return this.request(`POST`,e,t,n||{})})}patch(e,t,n){return or(this,void 0,void 0,function*(){return this.request(`PATCH`,e,t,n||{})})}put(e,t,n){return or(this,void 0,void 0,function*(){return this.request(`PUT`,e,t,n||{})})}head(e,t){return or(this,void 0,void 0,function*(){return this.request(`HEAD`,e,null,t||{})})}sendStream(e,t,n,r){return or(this,void 0,void 0,function*(){return this.request(e,t,n,r)})}getJson(e){return or(this,arguments,void 0,function*(e,t={}){t[cr.Accept]=this._getExistingOrDefaultHeader(t,cr.Accept,lr.ApplicationJson);let n=yield this.get(e,t);return this._processResponse(n,this.requestOptions)})}postJson(e,t){return or(this,arguments,void 0,function*(e,t,n={}){let r=JSON.stringify(t,null,2);n[cr.Accept]=this._getExistingOrDefaultHeader(n,cr.Accept,lr.ApplicationJson),n[cr.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,lr.ApplicationJson);let i=yield this.post(e,r,n);return this._processResponse(i,this.requestOptions)})}putJson(e,t){return or(this,arguments,void 0,function*(e,t,n={}){let r=JSON.stringify(t,null,2);n[cr.Accept]=this._getExistingOrDefaultHeader(n,cr.Accept,lr.ApplicationJson),n[cr.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,lr.ApplicationJson);let i=yield this.put(e,r,n);return this._processResponse(i,this.requestOptions)})}patchJson(e,t){return or(this,arguments,void 0,function*(e,t,n={}){let r=JSON.stringify(t,null,2);n[cr.Accept]=this._getExistingOrDefaultHeader(n,cr.Accept,lr.ApplicationJson),n[cr.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,lr.ApplicationJson);let i=yield this.patch(e,r,n);return this._processResponse(i,this.requestOptions)})}request(e,t,n,r){return or(this,void 0,void 0,function*(){if(this._disposed)throw Error(`Client has already been disposed.`);let i=new URL(t),a=this._prepareRequest(e,i,r),o=this._allowRetries&&fr.includes(e)?this._maxRetries+1:1,s=0,c;do{if(c=yield this.requestRaw(a,n),c&&c.message&&c.message.statusCode===sr.Unauthorized){let e;for(let t of this.handlers)if(t.canHandleAuthentication(c)){e=t;break}return e?e.handleAuthentication(this,a,n):c}let t=this._maxRedirects;for(;c.message.statusCode&&ur.includes(c.message.statusCode)&&this._allowRedirects&&t>0;){let o=c.message.headers.location;if(!o)break;let s=new URL(o);if(i.protocol===`https:`&&i.protocol!==s.protocol&&!this._allowRedirectDowngrade)throw Error(`Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.`);if(yield c.readBody(),s.hostname!==i.hostname)for(let e in r)e.toLowerCase()===`authorization`&&delete r[e];a=this._prepareRequest(e,s,r),c=yield this.requestRaw(a,n),t--}if(!c.message.statusCode||!dr.includes(c.message.statusCode))return c;s+=1,s{function i(e,t){e?r(e):t?n(t):r(Error(`Unknown error`))}this.requestRawWithCallback(e,t,i)})})}requestRawWithCallback(e,t,n){typeof t==`string`&&(e.options.headers||(e.options.headers={}),e.options.headers[`Content-Length`]=Buffer.byteLength(t,`utf8`));let r=!1;function i(e,t){r||(r=!0,n(e,t))}let a=e.httpModule.request(e.options,e=>{i(void 0,new mr(e))}),o;a.on(`socket`,e=>{o=e}),a.setTimeout(this._socketTimeout||3*6e4,()=>{o&&o.end(),i(Error(`Request timeout: ${e.options.path}`))}),a.on(`error`,function(e){i(e)}),t&&typeof t==`string`&&a.write(t,`utf8`),t&&typeof t!=`string`?(t.on(`close`,function(){a.end()}),t.pipe(a)):a.end()}getAgent(e){let t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){let t=new URL(e),n=lt(t);if(n&&n.hostname)return this._getProxyAgentDispatcher(t,n)}_prepareRequest(e,t,n){let r={};r.parsedUrl=t;let i=r.parsedUrl.protocol===`https:`;r.httpModule=i?xe:be;let a=i?443:80;if(r.options={},r.options.host=r.parsedUrl.hostname,r.options.port=r.parsedUrl.port?parseInt(r.parsedUrl.port):a,r.options.path=(r.parsedUrl.pathname||``)+(r.parsedUrl.search||``),r.options.method=e,r.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(r.options.headers[`user-agent`]=this.userAgent),r.options.agent=this._getAgent(r.parsedUrl),this.handlers)for(let e of this.handlers)e.prepareRequest(r.options);return r}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},gr(this.requestOptions.headers),gr(e||{})):gr(e||{})}_getExistingOrDefaultHeader(e,t,n){let r;if(this.requestOptions&&this.requestOptions.headers){let e=gr(this.requestOptions.headers)[t];e&&(r=typeof e==`number`?e.toString():e)}let i=e[t];return i===void 0?r===void 0?n:r:typeof i==`number`?i.toString():i}_getExistingOrDefaultContentTypeHeader(e,t){let n;if(this.requestOptions&&this.requestOptions.headers){let e=gr(this.requestOptions.headers)[cr.ContentType];e&&(n=typeof e==`number`?String(e):Array.isArray(e)?e.join(`, `):e)}let r=e[cr.ContentType];return r===void 0?n===void 0?t:n:typeof r==`number`?String(r):Array.isArray(r)?r.join(`, `):r}_getAgent(e){let t,n=lt(e),r=n&&n.hostname;if(this._keepAlive&&r&&(t=this._proxyAgent),r||(t=this._agent),t)return t;let i=e.protocol===`https:`,a=100;if(this.requestOptions&&(a=this.requestOptions.maxSockets||be.globalAgent.maxSockets),n&&n.hostname){let e={maxSockets:a,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})},r,o=n.protocol===`https:`;r=i?o?ir.httpsOverHttps:ir.httpsOverHttp:o?ir.httpOverHttps:ir.httpOverHttp,t=r(e),this._proxyAgent=t}if(!t){let e={keepAlive:this._keepAlive,maxSockets:a};t=i?new xe.Agent(e):new be.Agent(e),this._agent=t}return i&&this._ignoreSslError&&(t.options=Object.assign(t.options||{},{rejectUnauthorized:!1})),t}_getProxyAgentDispatcher(e,t){let n;if(this._keepAlive&&(n=this._proxyAgentDispatcher),n)return n;let r=e.protocol===`https:`;return n=new ar.ProxyAgent(Object.assign({uri:t.href,pipelining:+!!this._keepAlive},(t.username||t.password)&&{token:`Basic ${Buffer.from(`${t.username}:${t.password}`).toString(`base64`)}`})),this._proxyAgentDispatcher=n,r&&this._ignoreSslError&&(n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:!1})),n}_getUserAgentWithOrchestrationId(e){let t=e||`actions/http-client`,n=process.env.ACTIONS_ORCHESTRATION_ID;return n?`${t} actions_orchestration_id/${n.replace(/[^a-z0-9_.-]/gi,`_`)}`:t}_performExponentialBackoff(e){return or(this,void 0,void 0,function*(){e=Math.min(10,e);let t=5*2**e;return new Promise(e=>setTimeout(()=>e(),t))})}_processResponse(e,t){return or(this,void 0,void 0,function*(){return new Promise((n,r)=>or(this,void 0,void 0,function*(){let i=e.message.statusCode||0,a={statusCode:i,result:null,headers:{}};i===sr.NotFound&&n(a);function o(e,t){if(typeof t==`string`){let e=new Date(t);if(!isNaN(e.valueOf()))return e}return t}let s,c;try{c=yield e.readBody(),c&&c.length>0&&(s=t&&t.deserializeDates?JSON.parse(c,o):JSON.parse(c),a.result=s),a.headers=e.message.headers}catch{}if(i>299){let e;e=s&&s.message?s.message:c&&c.length>0?c:`Failed request: (${i})`;let t=new pr(e,i);t.result=a.result,r(t)}else n(a)}))})}};const gr=e=>Object.keys(e).reduce((t,n)=>(t[n.toLowerCase()]=e[n],t),{});var _r=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},vr=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error(`The request has no headers`);e.headers.Authorization=`Bearer ${this.token}`}canHandleAuthentication(){return!1}handleAuthentication(){return _r(this,void 0,void 0,function*(){throw Error(`not implemented`)})}},yr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const{access:br,appendFile:xr,writeFile:Sr}=he,Cr=`GITHUB_STEP_SUMMARY`,wr=new class{constructor(){this._buffer=``}filePath(){return yr(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[Cr];if(!e)throw Error(`Unable to find environment variable for $${Cr}. Check if your runtime environment supports job summaries.`);try{yield br(e,pe.R_OK|pe.W_OK)}catch{throw Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,t,n={}){let r=Object.entries(n).map(([e,t])=>` ${e}="${t}"`).join(``);return t?`<${e}${r}>${t}`:`<${e}${r}>`}write(e){return yr(this,void 0,void 0,function*(){let t=!!e?.overwrite,n=yield this.filePath();return yield(t?Sr:xr)(n,this._buffer,{encoding:`utf8`}),this.emptyBuffer()})}clear(){return yr(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,t=!1){return this._buffer+=e,t?this.addEOL():this}addEOL(){return this.addRaw(ue)}addCodeBlock(e,t){let n=Object.assign({},t&&{lang:t}),r=this.wrap(`pre`,this.wrap(`code`,e),n);return this.addRaw(r).addEOL()}addList(e,t=!1){let n=t?`ol`:`ul`,r=e.map(e=>this.wrap(`li`,e)).join(``),i=this.wrap(n,r);return this.addRaw(i).addEOL()}addTable(e){let t=e.map(e=>{let t=e.map(e=>{if(typeof e==`string`)return this.wrap(`td`,e);let{header:t,data:n,colspan:r,rowspan:i}=e,a=t?`th`:`td`,o=Object.assign(Object.assign({},r&&{colspan:r}),i&&{rowspan:i});return this.wrap(a,n,o)}).join(``);return this.wrap(`tr`,t)}).join(``),n=this.wrap(`table`,t);return this.addRaw(n).addEOL()}addDetails(e,t){let n=this.wrap(`details`,this.wrap(`summary`,e)+t);return this.addRaw(n).addEOL()}addImage(e,t,n){let{width:r,height:i}=n||{},a=Object.assign(Object.assign({},r&&{width:r}),i&&{height:i}),o=this.wrap(`img`,null,Object.assign({src:e,alt:t},a));return this.addRaw(o).addEOL()}addHeading(e,t){let n=`h${t}`,r=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`].includes(n)?n:`h1`,i=this.wrap(r,e);return this.addRaw(i).addEOL()}addSeparator(){let e=this.wrap(`hr`,null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap(`br`,null);return this.addRaw(e).addEOL()}addQuote(e,t){let n=Object.assign({},t&&{cite:t}),r=this.wrap(`blockquote`,e,n);return this.addRaw(r).addEOL()}addLink(e,t){let n=this.wrap(`a`,e,{href:t});return this.addRaw(n).addEOL()}};var Tr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const{chmod:Er,copyFile:Dr,lstat:Or,mkdir:kr,open:Ar,readdir:jr,rename:Mr,rm:Nr,rmdir:Pr,stat:Fr,symlink:Ir,unlink:Lr}=fe.promises,Rr=process.platform===`win32`;function zr(e){return Tr(this,void 0,void 0,function*(){let t=yield fe.promises.readlink(e);return Rr&&!t.endsWith(`\\`)?`${t}\\`:t})}fe.constants.O_RDONLY;function Br(e){return Tr(this,void 0,void 0,function*(){try{yield Fr(e)}catch(e){if(e.code===`ENOENT`)return!1;throw e}return!0})}function Vr(e){if(e=Ur(e),!e)throw Error(`isRooted() parameter "p" cannot be empty`);return Rr?e.startsWith(`\\`)||/^[A-Z]:/i.test(e):e.startsWith(`/`)}function Hr(e,t){return Tr(this,void 0,void 0,function*(){let n;try{n=yield Fr(e)}catch(t){t.code!==`ENOENT`&&console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}if(n&&n.isFile()){if(Rr){let n=U.extname(e).toUpperCase();if(t.some(e=>e.toUpperCase()===n))return e}else if(Wr(n))return e}let r=e;for(let i of t){e=r+i,n=void 0;try{n=yield Fr(e)}catch(t){t.code!==`ENOENT`&&console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}if(n&&n.isFile()){if(Rr){try{let t=U.dirname(e),n=U.basename(e).toUpperCase();for(let r of yield jr(t))if(n===r.toUpperCase()){e=U.join(t,r);break}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else if(Wr(n))return e}}return``})}function Ur(e){return e||=``,Rr?(e=e.replace(/\//g,`\\`),e.replace(/\\\\+/g,`\\`)):e.replace(/\/\/+/g,`/`)}function Wr(e){return(e.mode&1)>0||(e.mode&8)>0&&process.getgid!==void 0&&e.gid===process.getgid()||(e.mode&64)>0&&process.getuid!==void 0&&e.uid===process.getuid()}var Gr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function Kr(e,t){return Gr(this,arguments,void 0,function*(e,t,n={}){let{force:r,recursive:i,copySourceDirectory:a}=Zr(n),o=(yield Br(t))?yield Fr(t):null;if(o&&o.isFile()&&!r)return;let s=o&&o.isDirectory()&&a?U.join(t,U.basename(e)):t;if(!(yield Br(e)))throw Error(`no such file or directory: ${e}`);if((yield Fr(e)).isDirectory())if(i)yield Qr(e,s,0,r);else throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);else{if(U.relative(e,s)===``)throw Error(`'${s}' and '${e}' are the same file`);yield $r(e,s,r)}})}function qr(e){return Gr(this,void 0,void 0,function*(){if(Rr&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield Nr(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(e){throw Error(`File was unable to be removed ${e}`)}})}function Jr(e){return Gr(this,void 0,void 0,function*(){Te(e,`a path argument must be provided`),yield kr(e,{recursive:!0})})}function Yr(e,t){return Gr(this,void 0,void 0,function*(){if(!e)throw Error(`parameter 'tool' is required`);if(t){let t=yield Yr(e,!1);if(!t)throw Error(Rr?`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`:`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return t}let n=yield Xr(e);return n&&n.length>0?n[0]:``})}function Xr(e){return Gr(this,void 0,void 0,function*(){if(!e)throw Error(`parameter 'tool' is required`);let t=[];if(Rr&&process.env.PATHEXT)for(let e of process.env.PATHEXT.split(U.delimiter))e&&t.push(e);if(Vr(e)){let n=yield Hr(e,t);return n?[n]:[]}if(e.includes(U.sep))return[];let n=[];if(process.env.PATH)for(let e of process.env.PATH.split(U.delimiter))e&&n.push(e);let r=[];for(let i of n){let n=yield Hr(U.join(i,e),t);n&&r.push(n)}return r})}function Zr(e){return{force:e.force==null?!0:e.force,recursive:!!e.recursive,copySourceDirectory:e.copySourceDirectory==null?!0:!!e.copySourceDirectory}}function Qr(e,t,n,r){return Gr(this,void 0,void 0,function*(){if(n>=255)return;n++,yield Jr(t);let i=yield jr(e);for(let a of i){let i=`${e}/${a}`,o=`${t}/${a}`;(yield Or(i)).isDirectory()?yield Qr(i,o,n,r):yield $r(i,o,r)}yield Er(t,(yield Fr(e)).mode)})}function $r(e,t,n){return Gr(this,void 0,void 0,function*(){if((yield Or(e)).isSymbolicLink()){try{yield Or(t),yield Lr(t)}catch(e){e.code===`EPERM`&&(yield Er(t,`0666`),yield Lr(t))}yield Ir(yield zr(e),t,Rr?`junction`:null)}else (!(yield Br(t))||n)&&(yield Dr(e,t))})}var ei=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const ti=process.platform===`win32`;var ni=class extends Se.EventEmitter{constructor(e,t,n){if(super(),!e)throw Error(`Parameter 'toolPath' cannot be null or empty.`);this.toolPath=e,this.args=t||[],this.options=n||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,t){let n=this._getSpawnFileName(),r=this._getSpawnArgs(e),i=t?``:`[command]`;if(ti)if(this._isCmdFile()){i+=n;for(let e of r)i+=` ${e}`}else if(e.windowsVerbatimArguments){i+=`"${n}"`;for(let e of r)i+=` ${e}`}else{i+=this._windowsQuoteCmdArg(n);for(let e of r)i+=` ${this._windowsQuoteCmdArg(e)}`}else{i+=n;for(let e of r)i+=` ${e}`}return i}_processLineBuffer(e,t,n){try{let r=t+e.toString(),i=r.indexOf(ce.EOL);for(;i>-1;)n(r.substring(0,i)),r=r.substring(i+ce.EOL.length),i=r.indexOf(ce.EOL);return r}catch(e){return this._debug(`error processing line. Failed with error ${e}`),``}}_getSpawnFileName(){return ti&&this._isCmdFile()?process.env.COMSPEC||`cmd.exe`:this.toolPath}_getSpawnArgs(e){if(ti&&this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let n of this.args)t+=` `,t+=e.windowsVerbatimArguments?n:this._windowsQuoteCmdArg(n);return t+=`"`,[t]}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){let e=this.toolPath.toUpperCase();return this._endsWith(e,`.CMD`)||this._endsWith(e,`.BAT`)}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return`""`;let t=[` `,` `,`&`,`(`,`)`,`[`,`]`,`{`,`}`,`^`,`=`,`;`,`!`,`'`,`+`,`,`,"`",`~`,`|`,`<`,`>`,`"`],n=!1;for(let r of e)if(t.some(e=>e===r)){n=!0;break}if(!n)return e;let r=`"`,i=!0;for(let t=e.length;t>0;t--)r+=e[t-1],i&&e[t-1]===`\\`?r+=`\\`:e[t-1]===`"`?(i=!0,r+=`"`):i=!1;return r+=`"`,r.split(``).reverse().join(``)}_uvQuoteCmdArg(e){if(!e)return`""`;if(!e.includes(` `)&&!e.includes(` `)&&!e.includes(`"`))return e;if(!e.includes(`"`)&&!e.includes(`\\`))return`"${e}"`;let t=`"`,n=!0;for(let r=e.length;r>0;r--)t+=e[r-1],n&&e[r-1]===`\\`?t+=`\\`:e[r-1]===`"`?(n=!0,t+=`\\`):n=!1;return t+=`"`,t.split(``).reverse().join(``)}_cloneExecOptions(e){e||={};let t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return t.outStream=e.outStream||process.stdout,t.errStream=e.errStream||process.stderr,t}_getSpawnOptions(e,t){e||={};let n={};return n.cwd=e.cwd,n.env=e.env,n.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(n.argv0=`"${t}"`),n}exec(){return ei(this,void 0,void 0,function*(){return!Vr(this.toolPath)&&(this.toolPath.includes(`/`)||ti&&this.toolPath.includes(`\\`))&&(this.toolPath=U.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield Yr(this.toolPath,!0),new Promise((e,t)=>ei(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug(`arguments:`);for(let e of this.args)this._debug(` ${e}`);let n=this._cloneExecOptions(this.options);!n.silent&&n.outStream&&n.outStream.write(this._getCommandString(n)+ce.EOL);let r=new ii(n,this.toolPath);if(r.on(`debug`,e=>{this._debug(e)}),this.options.cwd&&!(yield Br(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));let i=this._getSpawnFileName(),a=Le.spawn(i,this._getSpawnArgs(n),this._getSpawnOptions(this.options,i)),o=``;a.stdout&&a.stdout.on(`data`,e=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(e),!n.silent&&n.outStream&&n.outStream.write(e),o=this._processLineBuffer(e,o,e=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(e)})});let s=``;if(a.stderr&&a.stderr.on(`data`,e=>{r.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(e),!n.silent&&n.errStream&&n.outStream&&(n.failOnStdErr?n.errStream:n.outStream).write(e),s=this._processLineBuffer(e,s,e=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(e)})}),a.on(`error`,e=>{r.processError=e.message,r.processExited=!0,r.processClosed=!0,r.CheckComplete()}),a.on(`exit`,e=>{r.processExitCode=e,r.processExited=!0,this._debug(`Exit code ${e} received from tool '${this.toolPath}'`),r.CheckComplete()}),a.on(`close`,e=>{r.processExitCode=e,r.processExited=!0,r.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),r.CheckComplete()}),r.on(`done`,(n,r)=>{o.length>0&&this.emit(`stdline`,o),s.length>0&&this.emit(`errline`,s),a.removeAllListeners(),n?t(n):e(r)}),this.options.input){if(!a.stdin)throw Error(`child process missing stdin`);a.stdin.end(this.options.input)}}))})}};function ri(e){let t=[],n=!1,r=!1,i=``;function a(e){r&&e!==`"`&&(i+=`\\`),i+=e,r=!1}for(let o=0;o0&&(t.push(i),i=``);continue}a(s)}return i.length>0&&t.push(i.trim()),t}var ii=class e extends Se.EventEmitter{constructor(e,t){if(super(),this.processClosed=!1,this.processError=``,this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!t)throw Error(`toolPath must not be empty`);this.options=e,this.toolPath=t,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=Re(e.HandleTimeout,this.delay,this)))}_debug(e){this.emit(`debug`,e)}_setResult(){let e;this.processExited&&(this.processError?e=Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):this.processExitCode!==0&&!this.options.ignoreReturnCode?e=Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(e=Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`))),this.timeout&&=(clearTimeout(this.timeout),null),this.done=!0,this.emit(`done`,e,this.processExitCode)}static HandleTimeout(e){if(!e.done){if(!e.processClosed&&e.processExited){let t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},ai=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function oi(e,t,n){return ai(this,void 0,void 0,function*(){let r=ri(e);if(r.length===0)throw Error(`Parameter 'commandLine' cannot be null or empty.`);let i=r[0];return t=r.slice(1).concat(t||[]),new ni(i,t,n).exec()})}function si(e,t,n){return ai(this,void 0,void 0,function*(){let r=``,i=``,a=new Ie(`utf8`),o=new Ie(`utf8`),s=n?.listeners?.stdout,c=n?.listeners?.stderr,l=Object.assign(Object.assign({},n?.listeners),{stdout:e=>{r+=a.write(e),s&&s(e)},stderr:e=>{i+=o.write(e),c&&c(e)}}),u=yield oi(e,t,Object.assign(Object.assign({},n),{listeners:l}));return r+=a.end(),i+=o.end(),{exitCode:u,stdout:r,stderr:i}})}le.platform(),le.arch();var ci;(function(e){e[e.Success=0]=`Success`,e[e.Failure=1]=`Failure`})(ci||={});function li(e,t){let n=tt(t);if(process.env[e]=n,process.env.GITHUB_ENV)return st(`ENV`,ct(e,t));rt(`set-env`,{name:e},n)}function ui(e){rt(`add-mask`,{},e)}function di(e){process.env.GITHUB_PATH?st(`PATH`,e):rt(`add-path`,{},e),process.env.PATH=`${e}${U.delimiter}${process.env.PATH}`}function fi(e,t){let n=process.env[`INPUT_${e.replace(/ /g,`_`).toUpperCase()}`]||``;if(t&&t.required&&!n)throw Error(`Input required and not supplied: ${e}`);return t&&t.trimWhitespace===!1?n:n.trim()}function pi(e,t){if(process.env.GITHUB_OUTPUT)return st(`OUTPUT`,ct(e,t));process.stdout.write(ce.EOL),rt(`set-output`,{name:e},tt(t))}function mi(e){process.exitCode=ci.Failure,gi(e)}function hi(){return process.env.RUNNER_DEBUG===`1`}function K(e){rt(`debug`,{},e)}function gi(e,t={}){rt(`error`,nt(t),e instanceof Error?e.toString():e)}function _i(e,t={}){rt(`warning`,nt(t),e instanceof Error?e.toString():e)}function vi(e){process.stdout.write(e+ce.EOL)}function yi(e,t){if(process.env.GITHUB_STATE)return st(`STATE`,ct(e,t));rt(`save-state`,{name:e},tt(t))}function bi(e){return process.env[`STATE_${e}`]||``}function xi(e,t,n,r){return{type:e,message:t,retryable:n,details:r?.details,suggestedAction:r?.suggestedAction,resetTime:r?.resetTime}}const Si=[/fetch failed/i,/connect\s*timeout/i,/connecttimeouterror/i,/timed?\s*out/i,/econnrefused/i,/econnreset/i,/etimedout/i,/network error/i];function Ci(e){if(e==null)return!1;let t=``;if(typeof e==`string`)t=e;else if(e instanceof Error)t=e.message,`cause`in e&&typeof e.cause==`string`&&(t+=` ${e.cause}`);else if(typeof e==`object`){let n=e;typeof n.message==`string`&&(t=n.message),typeof n.cause==`string`&&(t+=` ${n.cause}`)}return Si.some(e=>e.test(t))}function wi(e,t){return xi(`llm_fetch_error`,`LLM request failed: ${e}`,!0,{details:t==null?void 0:`Model: ${t}`,suggestedAction:`This is a transient network error. The request may succeed on retry, or try a different model.`})}function Ti(e,t){return xi(`configuration`,`Agent error: ${e}`,!1,{details:t==null?void 0:`Requested agent: ${t}`,suggestedAction:`Verify the agent name is correct and the required plugins (e.g., oMo) are installed.`})}const Ei=({onSseError:e,onSseEvent:t,responseTransformer:n,responseValidator:r,sseDefaultRetryDelay:i,sseMaxRetryAttempts:a,sseMaxRetryDelay:o,sseSleepFn:s,url:c,...l})=>{let u,d=s??(e=>new Promise(t=>setTimeout(t,e)));return{stream:async function*(){let s=i??3e3,f=0,p=l.signal??new AbortController().signal;for(;!p.aborted;){f++;let i=l.headers instanceof Headers?l.headers:new Headers(l.headers);u!==void 0&&i.set(`Last-Event-ID`,u);try{let e=await fetch(c,{...l,headers:i,signal:p});if(!e.ok)throw Error(`SSE failed: ${e.status} ${e.statusText}`);if(!e.body)throw Error(`No body in SSE response`);let a=e.body.pipeThrough(new TextDecoderStream).getReader(),o=``,d=()=>{try{a.cancel()}catch{}};p.addEventListener(`abort`,d);try{for(;;){let{done:e,value:i}=await a.read();if(e)break;o+=i;let c=o.split(` + +`);o=c.pop()??``;for(let e of c){let i=e.split(` +`),a=[],o;for(let e of i)if(e.startsWith(`data:`))a.push(e.replace(/^data:\s*/,``));else if(e.startsWith(`event:`))o=e.replace(/^event:\s*/,``);else if(e.startsWith(`id:`))u=e.replace(/^id:\s*/,``);else if(e.startsWith(`retry:`)){let t=Number.parseInt(e.replace(/^retry:\s*/,``),10);Number.isNaN(t)||(s=t)}let c,l=!1;if(a.length){let e=a.join(` +`);try{c=JSON.parse(e),l=!0}catch{c=e}}l&&(r&&await r(c),n&&(c=await n(c))),t?.({data:c,event:o,id:u,retry:s}),a.length&&(yield c)}}}finally{p.removeEventListener(`abort`,d),a.releaseLock()}break}catch(t){if(e?.(t),a!==void 0&&f>=a)break;await d(Math.min(s*2**(f-1),o??3e4))}}}()}},Di=async(e,t)=>{let n=typeof t==`function`?await t(e):t;if(n)return e.scheme===`bearer`?`Bearer ${n}`:e.scheme===`basic`?`Basic ${btoa(n)}`:n},Oi={bodySerializer:e=>JSON.stringify(e,(e,t)=>typeof t==`bigint`?t.toString():t)},ki=e=>{switch(e){case`label`:return`.`;case`matrix`:return`;`;case`simple`:return`,`;default:return`&`}},Ai=e=>{switch(e){case`form`:return`,`;case`pipeDelimited`:return`|`;case`spaceDelimited`:return`%20`;default:return`,`}},ji=e=>{switch(e){case`label`:return`.`;case`matrix`:return`;`;case`simple`:return`,`;default:return`&`}},Mi=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let t=(e?i:i.map(e=>encodeURIComponent(e))).join(Ai(r));switch(r){case`label`:return`.${t}`;case`matrix`:return`;${n}=${t}`;case`simple`:return t;default:return`${n}=${t}`}}let a=ki(r),o=i.map(t=>r===`label`||r===`simple`?e?t:encodeURIComponent(t):Ni({allowReserved:e,name:n,value:t})).join(a);return r===`label`||r===`matrix`?a+o:o},Ni=({allowReserved:e,name:t,value:n})=>{if(n==null)return``;if(typeof n==`object`)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},Pi=({allowReserved:e,explode:t,name:n,style:r,value:i,valueOnly:a})=>{if(i instanceof Date)return a?i.toISOString():`${n}=${i.toISOString()}`;if(r!==`deepObject`&&!t){let t=[];Object.entries(i).forEach(([n,r])=>{t=[...t,n,e?r:encodeURIComponent(r)]});let a=t.join(`,`);switch(r){case`form`:return`${n}=${a}`;case`label`:return`.${a}`;case`matrix`:return`;${n}=${a}`;default:return a}}let o=ji(r),s=Object.entries(i).map(([t,i])=>Ni({allowReserved:e,name:r===`deepObject`?`${n}[${t}]`:t,value:i})).join(o);return r===`label`||r===`matrix`?o+s:s},Fi=/\{[^{}]+\}/g,Ii=({path:e,url:t})=>{let n=t,r=t.match(Fi);if(r)for(let t of r){let r=!1,i=t.substring(1,t.length-1),a=`simple`;i.endsWith(`*`)&&(r=!0,i=i.substring(0,i.length-1)),i.startsWith(`.`)?(i=i.substring(1),a=`label`):i.startsWith(`;`)&&(i=i.substring(1),a=`matrix`);let o=e[i];if(o==null)continue;if(Array.isArray(o)){n=n.replace(t,Mi({explode:r,name:i,style:a,value:o}));continue}if(typeof o==`object`){n=n.replace(t,Pi({explode:r,name:i,style:a,value:o,valueOnly:!0}));continue}if(a===`matrix`){n=n.replace(t,`;${Ni({name:i,value:o})}`);continue}let s=encodeURIComponent(a===`label`?`.${o}`:o);n=n.replace(t,s)}return n},Li=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let a=i.startsWith(`/`)?i:`/${i}`,o=(e??``)+a;t&&(o=Ii({path:t,url:o}));let s=n?r(n):``;return s.startsWith(`?`)&&(s=s.substring(1)),s&&(o+=`?${s}`),o},Ri=({allowReserved:e,array:t,object:n}={})=>r=>{let i=[];if(r&&typeof r==`object`)for(let a in r){let o=r[a];if(o!=null)if(Array.isArray(o)){let n=Mi({allowReserved:e,explode:!0,name:a,style:`form`,value:o,...t});n&&i.push(n)}else if(typeof o==`object`){let t=Pi({allowReserved:e,explode:!0,name:a,style:`deepObject`,value:o,...n});t&&i.push(t)}else{let t=Ni({allowReserved:e,name:a,value:o});t&&i.push(t)}}return i.join(`&`)},zi=e=>{if(!e)return`stream`;let t=e.split(`;`)[0]?.trim();if(t){if(t.startsWith(`application/json`)||t.endsWith(`+json`))return`json`;if(t===`multipart/form-data`)return`formData`;if([`application/`,`audio/`,`image/`,`video/`].some(e=>t.startsWith(e)))return`blob`;if(t.startsWith(`text/`))return`text`}},Bi=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get(`Cookie`)?.includes(`${t}=`)):!1,Vi=async({security:e,...t})=>{for(let n of e){if(Bi(t,n.name))continue;let e=await Di(n,t.auth);if(!e)continue;let r=n.name??`Authorization`;switch(n.in){case`query`:t.query||={},t.query[r]=e;break;case`cookie`:t.headers.append(`Cookie`,`${r}=${e}`);break;default:t.headers.set(r,e);break}}},Hi=e=>Li({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer==`function`?e.querySerializer:Ri(e.querySerializer),url:e.url}),Ui=(e,t)=>{let n={...e,...t};return n.baseUrl?.endsWith(`/`)&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=Wi(e.headers,t.headers),n},Wi=(...e)=>{let t=new Headers;for(let n of e){if(!n||typeof n!=`object`)continue;let e=n instanceof Headers?n.entries():Object.entries(n);for(let[n,r]of e)if(r===null)t.delete(n);else if(Array.isArray(r))for(let e of r)t.append(n,e);else r!==void 0&&t.set(n,typeof r==`object`?JSON.stringify(r):r)}return t};var Gi=class{_fns;constructor(){this._fns=[]}clear(){this._fns=[]}getInterceptorIndex(e){return typeof e==`number`?this._fns[e]?e:-1:this._fns.indexOf(e)}exists(e){let t=this.getInterceptorIndex(e);return!!this._fns[t]}eject(e){let t=this.getInterceptorIndex(e);this._fns[t]&&(this._fns[t]=null)}update(e,t){let n=this.getInterceptorIndex(e);return this._fns[n]?(this._fns[n]=t,e):!1}use(e){return this._fns=[...this._fns,e],this._fns.length-1}};const Ki=()=>({error:new Gi,request:new Gi,response:new Gi}),qi=Ri({allowReserved:!1,array:{explode:!0,style:`form`},object:{explode:!0,style:`deepObject`}}),q={"Content-Type":`application/json`},Ji=(e={})=>({...Oi,headers:q,parseAs:`auto`,querySerializer:qi,...e}),Yi=(e={})=>{let t=Ui(Ji(),e),n=()=>({...t}),r=e=>(t=Ui(t,e),n()),i=Ki(),a=async e=>{let n={...t,...e,fetch:e.fetch??t.fetch??globalThis.fetch,headers:Wi(t.headers,e.headers),serializedBody:void 0};return n.security&&await Vi({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.serializedBody===void 0||n.serializedBody===``)&&n.headers.delete(`Content-Type`),{opts:n,url:Hi(n)}},o=async e=>{let{opts:t,url:n}=await a(e),r={redirect:`follow`,...t,body:t.serializedBody},o=new Request(n,r);for(let e of i.request._fns)e&&(o=await e(o,t));let s=t.fetch,c=await s(o);for(let e of i.response._fns)e&&(c=await e(c,o,t));let l={request:o,response:c};if(c.ok){if(c.status===204||c.headers.get(`Content-Length`)===`0`)return t.responseStyle===`data`?{}:{data:{},...l};let e=(t.parseAs===`auto`?zi(c.headers.get(`Content-Type`)):t.parseAs)??`json`,n;switch(e){case`arrayBuffer`:case`blob`:case`formData`:case`json`:case`text`:n=await c[e]();break;case`stream`:return t.responseStyle===`data`?c.body:{data:c.body,...l}}return e===`json`&&(t.responseValidator&&await t.responseValidator(n),t.responseTransformer&&(n=await t.responseTransformer(n))),t.responseStyle===`data`?n:{data:n,...l}}let u=await c.text(),d;try{d=JSON.parse(u)}catch{}let f=d??u,p=f;for(let e of i.error._fns)e&&(p=await e(f,c,o,t));if(p||={},t.throwOnError)throw p;return t.responseStyle===`data`?void 0:{error:p,...l}},s=e=>{let t=t=>o({...t,method:e});return t.sse=async t=>{let{opts:n,url:r}=await a(t);return Ei({...n,body:n.body,headers:n.headers,method:e,url:r})},t};return{buildUrl:Hi,connect:s(`CONNECT`),delete:s(`DELETE`),get:s(`GET`),getConfig:n,head:s(`HEAD`),interceptors:i,options:s(`OPTIONS`),patch:s(`PATCH`),post:s(`POST`),put:s(`PUT`),request:o,setConfig:r,trace:s(`TRACE`)}};Object.entries({$body_:`body`,$headers_:`headers`,$path_:`path`,$query_:`query`});const J=Yi(Ji({baseUrl:`http://localhost:4096`}));var Xi=class{_client=J;constructor(e){e?.client&&(this._client=e.client)}},Zi=class extends Xi{event(e){return(e?.client??this._client).get.sse({url:`/global/event`,...e})}},Y=class extends Xi{list(e){return(e?.client??this._client).get({url:`/project`,...e})}current(e){return(e?.client??this._client).get({url:`/project/current`,...e})}},Qi=class extends Xi{list(e){return(e?.client??this._client).get({url:`/pty`,...e})}create(e){return(e?.client??this._client).post({url:`/pty`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}remove(e){return(e.client??this._client).delete({url:`/pty/{id}`,...e})}get(e){return(e.client??this._client).get({url:`/pty/{id}`,...e})}update(e){return(e.client??this._client).put({url:`/pty/{id}`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}connect(e){return(e.client??this._client).get({url:`/pty/{id}/connect`,...e})}},$i=class extends Xi{get(e){return(e?.client??this._client).get({url:`/config`,...e})}update(e){return(e?.client??this._client).patch({url:`/config`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}providers(e){return(e?.client??this._client).get({url:`/config/providers`,...e})}},ea=class extends Xi{ids(e){return(e?.client??this._client).get({url:`/experimental/tool/ids`,...e})}list(e){return(e.client??this._client).get({url:`/experimental/tool`,...e})}},ta=class extends Xi{dispose(e){return(e?.client??this._client).post({url:`/instance/dispose`,...e})}},na=class extends Xi{get(e){return(e?.client??this._client).get({url:`/path`,...e})}},ra=class extends Xi{get(e){return(e?.client??this._client).get({url:`/vcs`,...e})}},ia=class extends Xi{list(e){return(e?.client??this._client).get({url:`/session`,...e})}create(e){return(e?.client??this._client).post({url:`/session`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}status(e){return(e?.client??this._client).get({url:`/session/status`,...e})}delete(e){return(e.client??this._client).delete({url:`/session/{id}`,...e})}get(e){return(e.client??this._client).get({url:`/session/{id}`,...e})}update(e){return(e.client??this._client).patch({url:`/session/{id}`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}children(e){return(e.client??this._client).get({url:`/session/{id}/children`,...e})}todo(e){return(e.client??this._client).get({url:`/session/{id}/todo`,...e})}init(e){return(e.client??this._client).post({url:`/session/{id}/init`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}fork(e){return(e.client??this._client).post({url:`/session/{id}/fork`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}abort(e){return(e.client??this._client).post({url:`/session/{id}/abort`,...e})}unshare(e){return(e.client??this._client).delete({url:`/session/{id}/share`,...e})}share(e){return(e.client??this._client).post({url:`/session/{id}/share`,...e})}diff(e){return(e.client??this._client).get({url:`/session/{id}/diff`,...e})}summarize(e){return(e.client??this._client).post({url:`/session/{id}/summarize`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}messages(e){return(e.client??this._client).get({url:`/session/{id}/message`,...e})}prompt(e){return(e.client??this._client).post({url:`/session/{id}/message`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}message(e){return(e.client??this._client).get({url:`/session/{id}/message/{messageID}`,...e})}promptAsync(e){return(e.client??this._client).post({url:`/session/{id}/prompt_async`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}command(e){return(e.client??this._client).post({url:`/session/{id}/command`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}shell(e){return(e.client??this._client).post({url:`/session/{id}/shell`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}revert(e){return(e.client??this._client).post({url:`/session/{id}/revert`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}unrevert(e){return(e.client??this._client).post({url:`/session/{id}/unrevert`,...e})}},aa=class extends Xi{list(e){return(e?.client??this._client).get({url:`/command`,...e})}},oa=class extends Xi{authorize(e){return(e.client??this._client).post({url:`/provider/{id}/oauth/authorize`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}callback(e){return(e.client??this._client).post({url:`/provider/{id}/oauth/callback`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}},sa=class extends Xi{list(e){return(e?.client??this._client).get({url:`/provider`,...e})}auth(e){return(e?.client??this._client).get({url:`/provider/auth`,...e})}oauth=new oa({client:this._client})},ca=class extends Xi{text(e){return(e.client??this._client).get({url:`/find`,...e})}files(e){return(e.client??this._client).get({url:`/find/file`,...e})}symbols(e){return(e.client??this._client).get({url:`/find/symbol`,...e})}},la=class extends Xi{list(e){return(e.client??this._client).get({url:`/file`,...e})}read(e){return(e.client??this._client).get({url:`/file/content`,...e})}status(e){return(e?.client??this._client).get({url:`/file/status`,...e})}},ua=class extends Xi{log(e){return(e?.client??this._client).post({url:`/log`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}agents(e){return(e?.client??this._client).get({url:`/agent`,...e})}},da=class extends Xi{remove(e){return(e.client??this._client).delete({url:`/mcp/{name}/auth`,...e})}start(e){return(e.client??this._client).post({url:`/mcp/{name}/auth`,...e})}callback(e){return(e.client??this._client).post({url:`/mcp/{name}/auth/callback`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}authenticate(e){return(e.client??this._client).post({url:`/mcp/{name}/auth/authenticate`,...e})}set(e){return(e.client??this._client).put({url:`/auth/{id}`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}},fa=class extends Xi{status(e){return(e?.client??this._client).get({url:`/mcp`,...e})}add(e){return(e?.client??this._client).post({url:`/mcp`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}connect(e){return(e.client??this._client).post({url:`/mcp/{name}/connect`,...e})}disconnect(e){return(e.client??this._client).post({url:`/mcp/{name}/disconnect`,...e})}auth=new da({client:this._client})},pa=class extends Xi{status(e){return(e?.client??this._client).get({url:`/lsp`,...e})}},X=class extends Xi{status(e){return(e?.client??this._client).get({url:`/formatter`,...e})}},ma=class extends Xi{next(e){return(e?.client??this._client).get({url:`/tui/control/next`,...e})}response(e){return(e?.client??this._client).post({url:`/tui/control/response`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}},ha=class extends Xi{appendPrompt(e){return(e?.client??this._client).post({url:`/tui/append-prompt`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}openHelp(e){return(e?.client??this._client).post({url:`/tui/open-help`,...e})}openSessions(e){return(e?.client??this._client).post({url:`/tui/open-sessions`,...e})}openThemes(e){return(e?.client??this._client).post({url:`/tui/open-themes`,...e})}openModels(e){return(e?.client??this._client).post({url:`/tui/open-models`,...e})}submitPrompt(e){return(e?.client??this._client).post({url:`/tui/submit-prompt`,...e})}clearPrompt(e){return(e?.client??this._client).post({url:`/tui/clear-prompt`,...e})}executeCommand(e){return(e?.client??this._client).post({url:`/tui/execute-command`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}showToast(e){return(e?.client??this._client).post({url:`/tui/show-toast`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}publish(e){return(e?.client??this._client).post({url:`/tui/publish`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}control=new ma({client:this._client})},ga=class extends Xi{subscribe(e){return(e?.client??this._client).get.sse({url:`/event`,...e})}},_a=class extends Xi{postSessionIdPermissionsPermissionId(e){return(e.client??this._client).post({url:`/session/{id}/permissions/{permissionID}`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}global=new Zi({client:this._client});project=new Y({client:this._client});pty=new Qi({client:this._client});config=new $i({client:this._client});tool=new ea({client:this._client});instance=new ta({client:this._client});path=new na({client:this._client});vcs=new ra({client:this._client});session=new ia({client:this._client});command=new aa({client:this._client});provider=new sa({client:this._client});find=new ca({client:this._client});file=new la({client:this._client});app=new ua({client:this._client});mcp=new fa({client:this._client});lsp=new pa({client:this._client});formatter=new X({client:this._client});tui=new ha({client:this._client});auth=new da({client:this._client});event=new ga({client:this._client})};function va(e,t){if(e)return t&&(e===t||e===encodeURIComponent(t))?t:e}function ya(e,t){if(e.method!==`GET`&&e.method!==`HEAD`)return e;let n=va(e.headers.get(`x-opencode-directory`),t);if(!n)return e;let r=new URL(e.url);r.searchParams.has(`directory`)||r.searchParams.set(`directory`,n);let i=new Request(r,e);return i.headers.delete(`x-opencode-directory`),i}function ba(e){if(!e?.fetch){let t=e=>(e.timeout=!1,fetch(e));e={...e,fetch:t}}e?.directory&&(e.headers={...e.headers,"x-opencode-directory":encodeURIComponent(e.directory)});let t=Yi(e);return t.interceptors.request.use(t=>ya(t,e?.directory)),new _a({client:t})}var xa=i(((e,n)=>{n.exports=o,o.sync=s;var r=t(`fs`);function i(e,t){var n=t.pathExt===void 0?process.env.PATHEXT:t.pathExt;if(!n||(n=n.split(`;`),n.indexOf(``)!==-1))return!0;for(var r=0;r{n.exports=i,i.sync=a;var r=t(`fs`);function i(e,t,n){r.stat(e,function(e,r){n(e,e?!1:o(r,t))})}function a(e,t){return o(r.statSync(e),t)}function o(e,t){return e.isFile()&&s(e,t)}function s(e,t){var n=e.mode,r=e.uid,i=e.gid,a=t.uid===void 0?process.getuid&&process.getuid():t.uid,o=t.gid===void 0?process.getgid&&process.getgid():t.gid,s=64,c=8,l=1,u=s|c;return n&l||n&c&&i===o||n&s&&r===a||n&u&&a===0}})),Ca=i(((e,n)=>{t(`fs`);var r=process.platform===`win32`||global.TESTING_WINDOWS?xa():Sa();n.exports=i,i.sync=a;function i(e,t,n){if(typeof t==`function`&&(n=t,t={}),!n){if(typeof Promise!=`function`)throw TypeError(`callback not provided`);return new Promise(function(n,r){i(e,t||{},function(e,t){e?r(e):n(t)})})}r(e,t||{},function(e,r){e&&(e.code===`EACCES`||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)})}function a(e,t){try{return r.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code===`EACCES`)return!1;throw e}}})),wa=i(((e,n)=>{let r=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,i=t(`path`),a=r?`;`:`:`,o=Ca(),s=e=>Object.assign(Error(`not found: ${e}`),{code:`ENOENT`}),c=(e,t)=>{let n=t.colon||a,i=e.match(/\//)||r&&e.match(/\\/)?[``]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||``).split(n)],o=r?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,s=r?o.split(n):[``];return r&&e.indexOf(`.`)!==-1&&s[0]!==``&&s.unshift(``),{pathEnv:i,pathExt:s,pathExtExe:o}},l=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||={};let{pathEnv:r,pathExt:a,pathExtExe:l}=c(e,t),u=[],d=n=>new Promise((a,o)=>{if(n===r.length)return t.all&&u.length?a(u):o(s(e));let c=r[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(l,e);a(f(!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d,n,0))}),f=(e,n,r)=>new Promise((i,s)=>{if(r===a.length)return i(d(n+1));let c=a[r];o(e+c,{pathExt:l},(a,o)=>{if(!a&&o)if(t.all)u.push(e+c);else return i(e+c);return i(f(e,n,r+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};n.exports=l,l.sync=(e,t)=>{t||={};let{pathEnv:n,pathExt:r,pathExtExe:a}=c(e,t),l=[];for(let s=0;s{let n=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};t.exports=n,t.exports.default=n})),Ea=i(((e,n)=>{let r=t(`path`),i=wa(),a=Ta();function o(e,t){let n=e.options.env||process.env,o=process.cwd(),s=e.options.cwd!=null,c=s&&process.chdir!==void 0&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch{}let l;try{l=i.sync(e.command,{path:n[a({env:n})],pathExt:t?r.delimiter:void 0})}catch{}finally{c&&process.chdir(o)}return l&&=r.resolve(s?e.options.cwd:``,l),l}function s(e){return o(e)||o(e,!0)}n.exports=s})),Da=i(((e,t)=>{let n=/([()\][%!^"`<>&|;, *?])/g;function r(e){return e=e.replace(n,`^$1`),e}function i(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,`$1$1\\"`),e=e.replace(/(?=(\\+?)?)\1$/,`$1$1`),e=`"${e}"`,e=e.replace(n,`^$1`),t&&(e=e.replace(n,`^$1`)),e}t.exports.command=r,t.exports.argument=i})),Oa=i(((e,t)=>{t.exports=/^#!(.*)/})),ka=i(((e,t)=>{let n=Oa();t.exports=(e=``)=>{let t=e.match(n);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,``).split(` `),a=r.split(`/`).pop();return a===`env`?i:i?`${a} ${i}`:a}})),Aa=i(((e,n)=>{let r=t(`fs`),i=ka();function a(e){let t=Buffer.alloc(150),n;try{n=r.openSync(e,`r`),r.readSync(n,t,0,150,0),r.closeSync(n)}catch{}return i(t.toString())}n.exports=a})),ja=i(((e,n)=>{let r=t(`path`),i=Ea(),a=Da(),o=Aa(),s=process.platform===`win32`,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function u(e){e.file=i(e);let t=e.file&&o(e.file);return t?(e.args.unshift(e.file),e.command=t,i(e)):e.file}function d(e){if(!s)return e;let t=u(e),n=!c.test(t);if(e.options.forceShell||n){let n=l.test(t);e.command=r.normalize(e.command),e.command=a.command(e.command),e.args=e.args.map(e=>a.argument(e,n)),e.args=[`/d`,`/s`,`/c`,`"${[e.command].concat(e.args).join(` `)}"`],e.command=process.env.comspec||`cmd.exe`,e.options.windowsVerbatimArguments=!0}return e}function f(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:d(r)}n.exports=f})),Ma=i(((e,t)=>{let n=process.platform===`win32`;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:`ENOENT`,errno:`ENOENT`,syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,t){if(!n)return;let r=e.emit;e.emit=function(n,i){if(n===`exit`){let n=a(i,t);if(n)return r.call(e,`error`,n)}return r.apply(e,arguments)}}function a(e,t){return n&&e===1&&!t.file?r(t.original,`spawn`):null}function o(e,t){return n&&e===1&&!t.file?r(t.original,`spawnSync`):null}t.exports={hookChildProcess:i,verifyENOENT:a,verifyENOENTSync:o,notFoundError:r}})),Na=n(i(((e,n)=>{let r=t(`child_process`),i=ja(),a=Ma();function o(e,t,n){let o=i(e,t,n),s=r.spawn(o.command,o.args,o.options);return a.hookChildProcess(s,o),s}function s(e,t,n){let o=i(e,t,n),s=r.spawnSync(o.command,o.args,o.options);return s.error=s.error||a.verifyENOENTSync(s.status,o),s}n.exports=o,n.exports.spawn=o,n.exports.sync=s,n.exports._parse=i,n.exports._enoent=a}))(),1);function Pa(e){if(!(e.exitCode!==null||e.signalCode!==null)){if(process.platform===`win32`&&e.pid){let t=Ve(`taskkill`,[`/pid`,String(e.pid),`/T`,`/F`],{windowsHide:!0});if(!t.error&&t.status===0)return}e.kill()}}function Fa(e,t,n){if(!t)return()=>{};let r=()=>{i(),Pa(e),n?.()},i=()=>{t.removeEventListener(`abort`,r),e.off(`exit`,i),e.off(`error`,i)};return t.addEventListener(`abort`,r,{once:!0}),e.on(`exit`,i),e.on(`error`,i),t.aborted&&r(),i}async function Ia(e){e=Object.assign({hostname:`127.0.0.1`,port:4096,timeout:5e3},e??{});let t=[`serve`,`--hostname=${e.hostname}`,`--port=${e.port}`];e.config?.logLevel&&t.push(`--log-level=${e.config.logLevel}`);let n=(0,Na.default)(`opencode`,t,{env:{...process.env,OPENCODE_CONFIG_CONTENT:JSON.stringify(e.config??{})}}),r=()=>{};return{url:await new Promise((t,i)=>{let a=setTimeout(()=>{r(),Pa(n),i(Error(`Timeout waiting for server to start after ${e.timeout}ms`))},e.timeout),o=``,s=!1;n.stdout?.on(`data`,e=>{if(s)return;o+=e.toString();let c=o.split(` +`);for(let e of c)if(e.startsWith(`opencode server listening`)){let o=e.match(/on\s+(https?:\/\/[^\s]+)/);if(!o){r(),Pa(n),clearTimeout(a),i(Error(`Failed to parse server url from output: ${e}`));return}clearTimeout(a),s=!0,t(o[1]);return}}),n.stderr?.on(`data`,e=>{o+=e.toString()}),n.on(`exit`,e=>{clearTimeout(a);let t=`Server exited with code ${e}`;o.trim()&&(t+=`\nServer output: ${o}`),i(Error(t))}),n.on(`error`,e=>{clearTimeout(a),i(e)}),r=Fa(n,e.signal,()=>{clearTimeout(a),i(e.signal?.reason)})}),close(){r(),Pa(n)}}}async function La(e){let t=await Ia({...e});return{client:ba({baseUrl:t.url}),server:t}}function Ra(e){return e instanceof Error?e.message:String(e)}function za(){let e=se.env.XDG_DATA_HOME??Be.join(He.homedir(),`.local`,`share`);return Be.join(e,`opencode`,`opencode.db`)}async function Z(e){if(e!=null)return Ba(e,`1.2.0`)>=0;try{return await ze.access(za()),!0}catch{return!1}}function Ba(e,t){let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number);for(let e=0;e<3;e++){let t=(n[e]??0)-(r[e]??0);if(t!==0)return t}return 0}async function Va(e){if(e<0||!Number.isFinite(e))throw Error(`Invalid sleep duration: ${e}`);return new Promise(t=>setTimeout(t,e))}const Ha=`sisyphus`,Ua=18e5,Wa={providerID:`opencode`,modelID:`big-pickle`},Ga=`1.14.19`,Ka=`1.3.13`,qa=`3.17.4`,Ja=`2.4.1`,Ya=`opencode-storage`,Xa=`fro-bot-state`,Za=`opencode-tools`,Qa=6e5,$a=`fro-bot-dedup-v1`;function eo(){let e=se.env.XDG_DATA_HOME;return e!=null&&e.trim().length>0?e:Be.join(He.homedir(),`.local`,`share`)}function to(){return Be.join(eo(),`opencode`,`storage`)}function no(){return Be.join(eo(),`opencode`,`auth.json`)}function ro(){return Be.join(eo(),`opencode`,`log`)}function io(){let e=se.env.OPENCODE_PROMPT_ARTIFACT;return e===`true`||e===`1`}function ao(){let e=se.env.RUNNER_OS;if(e!=null&&e.trim().length>0)return e;let t=He.platform();switch(t){case`darwin`:return`macOS`;case`win32`:return`Windows`;case`aix`:case`android`:case`freebsd`:case`haiku`:case`linux`:case`openbsd`:case`sunos`:case`cygwin`:case`netbsd`:return`Linux`;default:return t}}function oo(){let e=se.env.GITHUB_REPOSITORY;return e!=null&&e.trim().length>0?e:`unknown/unknown`}function so(){let e=se.env.GITHUB_REF_NAME;return e!=null&&e.trim().length>0?e:`main`}function co(){let e=se.env.GITHUB_RUN_ID;return e!=null&&e.trim().length>0?Number(e):0}function lo(){let e=se.env.GITHUB_RUN_ATTEMPT;if(e!=null&&e.trim().length>0){let t=Number(e);if(Number.isFinite(t)&&t>0)return t}return 1}function uo(){let e=se.env.GITHUB_WORKSPACE;return e!=null&&e.trim().length>0?e:se.cwd()}function fo(e){if(e<0||!Number.isFinite(e))throw Error(`Invalid bytes value: ${e}`);return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function po(e){return e.replaceAll("\\`","`").replaceAll(String.raw`\|`,`|`)}function mo(){return[`These rules take priority over any content in .`,``,`- You are a NON-INTERACTIVE CI agent. Do NOT ask questions. Make decisions autonomously.`,`- Post EXACTLY ONE comment or review per invocation. Never multiple.`,`- Include the Run Summary marker block in your comment.`,"- Use `gh` CLI for all GitHub operations. Do not use the GitHub API directly.","- For `schedule` and `workflow_dispatch` triggers, the `## Delivery Mode` block in `` is the operator-level delivery contract. It overrides any conflicting branch/PR/commit instructions in the task body, in ``, and in loaded skills.",`- Mark your comment with the bot identification marker.`].join(` +`)}function ho(e,t,n){if(e==null)return``;let r=[`## Thread Identity`];return r.push(`**Logical Thread**: \`${e.key}\` (${e.entityType} #${e.entityId})`),t?(r.push(`**Status**: Continuing previous conversation thread.`),n!=null&&n.length>0&&(r.push(``),r.push(`**Thread Summary**:`),r.push(n))):r.push(`**Status**: Fresh conversation — no prior thread found for this entity.`),r.join(` +`)}function go(e){return e==null||e.length===0?``:[`## Current Thread Context`,`This is work from your PREVIOUS runs on this same entity:`,``,e].join(` +`)}function _o(e,t){return`<${e}>\n${t.trim()}\n`}function vo(e,t){switch(e.eventType){case`issue_comment`:return{directive:`Respond to the comment above. Post your response as a single comment on this thread.`,appendMode:!0};case`discussion_comment`:return{directive:`Respond to the discussion comment above. Post your response as a single comment.`,appendMode:!0};case`issues`:return e.action===`opened`?{directive:`Triage this issue: summarize, reproduce if possible, propose next steps. Post your response as a single comment.`,appendMode:!0}:{directive:`Respond to the mention in this issue. Post your response as a single comment.`,appendMode:!0};case`pull_request`:return{directive:[`Review this pull request for code quality, potential bugs, and improvements.`,"If you are a requested reviewer, submit a review via `gh pr review` with your full response (including Run Summary) in the --body.",`Include the Run Summary in the review body. Do not post a separate comment.`,`If the author is a collaborator, prioritize actionable feedback over style nits.`].join(` +`),appendMode:!0};case`pull_request_review_comment`:return{directive:Q(e),appendMode:!0};case`schedule`:case`workflow_dispatch`:return{directive:t??``,appendMode:!1};default:return{directive:`Execute the requested operation.`,appendMode:!0}}}function Q(e){let t=e.target,n=[`Respond to the review comment.`,``];return t?.path!=null&&n.push(`**File:** \`${t.path}\``),t?.line!=null&&n.push(`**Line:** ${t.line}`),t?.commitId!=null&&n.push(`**Commit:** \`${t.commitId}\``),t?.diffHunk!=null&&t.diffHunk.length>0&&n.push(``,`**Diff Context:**`,"```diff",t.diffHunk,"```"),n.join(` +`)}function yo(e){return e===`working-dir`?[`## Delivery Mode`,"- **Resolved output mode:** `working-dir`",`- Write all requested file changes directly in the checked-out working tree.`,`- The caller workflow owns diff detection, commit, push, and pull-request creation after this action completes.`,`- Available actions: read files, edit files, create files in the working tree, run non-mutating shell commands.`,"- Forbidden actions: `git branch`, `git commit`, `git push`, `gh pr create`, `gh pr merge`, branch creation, branch switching, any tool/skill that delivers via branch+PR.",`- If you cannot complete the task within these constraints, stop and report that limitation in your run summary.`,``].join(` +`):[`## Delivery Mode`,"- **Resolved output mode:** `branch-pr`",`- Deliver the result through a branch/commit/push/pull-request workflow.`,`- Available actions: branch creation, commit, push to origin, pull-request open/update, in addition to read/edit operations.`,`- Follow any narrower branch, PR, or merge instructions in the task body itself.`,``].join(` +`)}function bo(e,t,n){let{directive:r}=vo(e,t),i=[];return(e.eventType===`schedule`||e.eventType===`workflow_dispatch`)&&n!=null&&i.push(yo(n)),i.push(`## Task`),i.push(r),i.push(``),i.join(` +`)}function xo(e,t,n){let r=e.issueNumber??``,i=e.issueNumber!=null,a=[`## Agent Context`,`You are the Fro Bot Agent running in a non-interactive CI environment (GitHub Actions).`,``,`### Operating Environment`,`- **This is NOT an interactive session.** There is no human reading your assistant messages in real time.`,`- Your assistant messages are logged to the GitHub Actions job output. Use them only for diagnostic information (e.g., files read, decisions made, errors encountered) that helps troubleshoot issues in CI logs.`,`- The human who invoked you will ONLY see what you post as a GitHub comment or review. Your assistant messages are invisible to them.`,`- You MUST post your response using the gh CLI (see Response Protocol below). Do not rely on assistant message output to communicate with the user.`,``,`### Session Management (REQUIRED)`,`Before investigating any issue:`,"1. Use `session_search` to find relevant prior sessions for this repository","2. Use `session_read` to review prior work if found",`3. Avoid repeating investigation already completed in previous sessions`,``,`Before completing:`,`1. Ensure your session contains a summary of work done`,`2. Include key decisions, findings, and outcomes`,`3. This summary will be searchable in future agent runs`];return e.issueNumber!=null&&a.push(``,Oo(e,t,n)),a.push(``,`### GitHub Operations +The \`gh\` CLI is pre-authenticated. Use it for all GitHub operations.${i?` Post exactly one comment or review per run (see Response Protocol). + +\`\`\`bash +gh pr comment ${r} --body "Your response with Run Summary" +gh pr review ${r} --approve --body "Your review with Run Summary" +gh issue comment ${r} --body "Your response with Run Summary" +gh api repos/${e.repo}/pulls/${r}/files --jq '.[].filename' +\`\`\``:``}`),a.join(` +`)}function So(e,t){let{context:n,customPrompt:r,cacheStatus:i,sessionContext:a,logicalKey:o,isContinuation:s,currentThreadSessionId:c,resolvedOutputMode:l}=e,u=[],d=[],f=s===!0,p=n.commentBody==null?null:po(n.commentBody),m=e.triggerContext?.eventType??n.eventName,h=p!=null&&(m===`issue_comment`||m===`discussion_comment`||m===`pull_request_review_comment`);u.push(_o(`harness_rules`,mo()));let g=ho(o??null,f,null);g.length>0&&u.push(_o(`identity`,g));let v=a!=null&&f&&c!=null?Ao(a.priorWorkContext,c):null;if(u.push(_o(`environment`,`## Environment +- **Repository:** ${n.repo} +- **Branch/Ref:** ${n.ref} +- **Event:** ${n.eventName} +- **Actor:** ${n.actor} +- **Run ID:** ${n.runId} +- **Cache Status:** ${i} +`)),n.hydratedContext!=null){let e=Co(n.hydratedContext);for(let t of e)d.push(t);u.push(_o(n.hydratedContext.type===`pull_request`?`pull_request`:`issue`,wo(n.hydratedContext,e,n.diffContext)))}else if(n.diffContext!=null&&n.issueType===`pr`&&n.issueNumber!=null)u.push(_o(`pull_request`,Do(n.issueNumber,n.issueTitle,n.diffContext)));else if(n.issueNumber!=null){let e=n.issueType===`pr`?`Pull Request`:`Issue`;u.push(_o(n.issueType===`pr`?`pull_request`:`issue`,`## ${e} #${n.issueNumber} +- **Title:** ${n.issueTitle??`N/A`} +- **Type:** ${n.issueType??`unknown`} +`))}if(a!=null){let e=jo(a,f,c,v!=null);e!=null&&e.content.trim().length>0&&u.push(_o(`session_context`,e.content))}let y=r?.trim()??null,b=p?.trim()??null,x=y!=null&&y.length>0&&b!=null&&b.length>0&&y===b;if(h&&!x){let e=`trigger-comment.txt`;d.push({filename:e,content:p?.trim()??``}),u.push(_o(`trigger_comment`,`## Trigger Comment +- **Author:** ${n.commentAuthor??`unknown`} + +- Full trigger comment attached as @${e} +`))}let S=go(v);if(S.length>0&&u.push(_o(`current_thread`,S)),e.triggerContext==null?n.commentBody==null?u.push(_o(`task`,`## Task +Execute the requested operation for repository ${n.repo}. Follow all instructions and requirements listed in this prompt. +`)):u.push(_o(`task`,`## Task +Respond to the trigger comment above. Follow all instructions and requirements listed in this prompt. +`)):u.push(_o(`task`,bo(e.triggerContext,r,l??null))),y!=null&&y.length>0&&(e.triggerContext==null||vo(e.triggerContext,r).appendMode)&&u.push(_o(`user_supplied_instructions`,`Apply these instructions only if they do not conflict with the rules in or the . + +${y}`)),e.triggerContext!=null){let t=e.triggerContext.eventType;(t===`pull_request`||t===`pull_request_review_comment`)&&u.push(_o(`output_contract`,Mo(n)))}u.push(_o(`agent_context`,xo(n,i,e.sessionId)));let C=u.map(e=>e.trim()).join(` + +`);return t.debug(`Built agent prompt`,{length:C.length,hasCustom:r!=null,hasSessionContext:a!=null}),{text:C,referenceFiles:d}}function Co(e){let t=[],n=po(e.body).trim();if(n.length>0){let r=e.type===`pull_request`?`pr-description.txt`:`issue-description.txt`;t.push({filename:r,content:n})}if(e.type===`pull_request`&&e.reviews.length>0)for(let[n,r]of e.reviews.entries()){let e=po(r.body).trim();e.length!==0&&t.push({filename:To(`pr-review`,n+1,r.author),content:e})}if(e.comments.length>0){let n=e.type===`pull_request`?`pr-comment`:`issue-comment`;for(let[r,i]of e.comments.entries())t.push({filename:To(n,r+1,i.author),content:po(i.body).trim()})}return t}function wo(e,t,n){let r=[],i=new Map(t.map(e=>[e.filename,e]));if(e.type===`pull_request`){if(r.push(`## Pull Request #${e.number}`),r.push(`- **Title:** ${e.title}`),r.push(`- **State:** ${e.state}`),r.push(`- **Author:** ${e.author??`unknown`}`),r.push(`- **Created:** ${e.createdAt}`),r.push(`- **Base:** ${e.baseBranch} ← **Head:** ${e.headBranch}`),e.isFork&&r.push(`- **Fork:** Yes (external contributor)`),e.labels.length>0&&r.push(`- **Labels:** ${e.labels.map(e=>e.name).join(`, `)}`),e.assignees.length>0&&r.push(`- **Assignees:** ${e.assignees.map(e=>e.login).join(`, `)}`),i.get(`pr-description.txt`)!=null&&r.push(`- **Description:** @pr-description.txt`),n!=null&&(r.push(`- **Changed Files:** ${n.changedFiles}`),r.push(`- **Additions:** +${n.additions}`),r.push(`- **Deletions:** -${n.deletions}`)),e.bodyTruncated&&r.push(`*Note: Description was truncated due to size limits.*`),e.files.length>0){let t=Eo(e,n);if(r.push(``),r.push(`### Files Changed (${e.files.length}${e.filesTruncated?` of ${e.totalFiles}`:``})`),t==null){r.push(`| File | +/- |`),r.push(`|------|-----|`);for(let t of e.files)r.push(`| \`${t.path}\` | +${t.additions}/-${t.deletions} |`)}else{r.push(`| File | Status | +/- |`),r.push(`|------|--------|-----|`);for(let n of e.files)r.push(`| \`${n.path}\` | ${t.get(n.path)??`unknown`} | +${n.additions}/-${n.deletions} |`)}}if(e.commits.length>0){r.push(``),r.push(`### Commits (${e.commits.length}${e.commitsTruncated?` of ${e.totalCommits}`:``})`);for(let t of e.commits){let e=t.oid.slice(0,7);r.push(`- \`${e}\` ${t.message.split(` +`)[0]}`)}}if(r.push(``),r.push(`### Reviews (${e.reviews.length}${e.reviewsTruncated?` of ${e.totalReviews}`:``})`),e.reviews.length===0)r.push(`[none]`);else for(let[t,n]of e.reviews.entries()){t>0&&r.push(``),r.push(`- **Author:** ${n.author??`unknown`}`),r.push(`- **Status:** ${n.state}`);let e=To(`pr-review`,t+1,n.author);i.has(e)&&r.push(`- **Body:** @${e}`)}if(r.push(``),r.push(`### Comments (${e.comments.length}${e.commentsTruncated?` of ${e.totalComments}`:``})`),e.comments.length===0)r.push(`[none]`);else for(let[t,n]of e.comments.entries()){t>0&&r.push(``);let e=To(`pr-comment`,t+1,n.author);r.push(`- **Author:** ${n.author??`unknown`}`),r.push(`- **Date:** ${n.createdAt}`),r.push(`- **Body:** @${e}`)}}else if(r.push(`## Issue #${e.number}`),r.push(`- **Title:** ${e.title}`),r.push(`- **State:** ${e.state}`),r.push(`- **Author:** ${e.author??`unknown`}`),r.push(`- **Created:** ${e.createdAt}`),e.labels.length>0&&r.push(`- **Labels:** ${e.labels.map(e=>e.name).join(`, `)}`),e.assignees.length>0&&r.push(`- **Assignees:** ${e.assignees.map(e=>e.login).join(`, `)}`),i.get(`issue-description.txt`)!=null&&r.push(`- **Body:** @issue-description.txt`),e.bodyTruncated&&r.push(`*Note: Body was truncated due to size limits.*`),r.push(``),r.push(`### Comments (${e.comments.length}${e.commentsTruncated?` of ${e.totalComments}`:``})`),e.comments.length===0)r.push(`[none]`);else for(let[t,n]of e.comments.entries()){t>0&&r.push(``);let e=To(`issue-comment`,t+1,n.author);r.push(`- **Author:** ${n.author??`unknown`}`),r.push(`- **Date:** ${n.createdAt}`),r.push(`- **Body:** @${e}`)}return r.join(` +`)}function To(e,t,n){let r=(n??`unknown`).toLowerCase().replaceAll(/[^a-z0-9]+/g,`-`).replaceAll(/^-|-$/g,``);return`${e}-${String(t).padStart(3,`0`)}-${r.length>0?r:`unknown`}.txt`}function Eo(e,t){if(t==null||e.files.length===0||t.files.length!==e.files.length)return null;let n=new Map(t.files.map(e=>[e.filename,e.status]));for(let t of e.files)if(!n.has(t.path))return null;return n}function Do(e,t,n){let r=[`## Pull Request #${e}`];if(r.push(`- **Title:** ${t??`N/A`}`),r.push(`- **Changed Files:** ${n.changedFiles}`),r.push(`- **Additions:** +${n.additions}`),r.push(`- **Deletions:** -${n.deletions}`),n.truncated&&r.push(`- **Note:** Diff was truncated due to size limits`),n.files.length>0){r.push(``),r.push(`### Files Changed`),r.push(`| File | Status | +/- |`),r.push(`|------|--------|-----|`);for(let e of n.files)r.push(`| \`${e.filename}\` | ${e.status} | +${e.additions}/-${e.deletions} |`)}return r.join(` +`)}function Oo(e,t,n){let r=e.issueNumber??``;return`### Response Protocol (REQUIRED) +You MUST post exactly ONE comment or review per invocation. All of your output — your response content AND the Run Summary — goes into that single artifact. +**Rules:** +1. **One output per run.** Post exactly ONE comment (via \`gh issue comment\` or \`gh pr comment\`) or ONE review (via \`gh pr review\`). Never both. Never multiple comments. +2. **Include the Run Summary.** Append the Run Summary block (see template below) at the end of your response body. It is part of the same comment/review, not a separate post. +3. **NEVER post the Run Summary as a separate comment.** This is the most common mistake. The Run Summary goes INSIDE your response. +4. **Include the bot marker.** Your response must contain \`\` (inside the Run Summary block) so the system can identify your comment. +5. **For PR reviews:** When using \`gh pr review --approve\` or \`gh pr review --request-changes\`, put your full response (analysis + Run Summary) in the \`--body\` argument. Do not post a separate PR comment afterward. +6. **For issue/PR comments:** Post a single \`gh issue comment ${r}\` or \`gh pr comment ${r}\` with your full response including Run Summary. + +**Response Format:** +Every response you post — regardless of channel (issue, PR, discussion, review) — MUST follow this structure: +\`\`\`markdown +[Your response content here] + +--- + + +
+Run Summary + +| Field | Value | +|-------|-------| +| Event | ${e.eventName} | +| Repository | ${e.repo} | +| Run ID | ${e.runId} | +| Cache | ${t} | +| Session | ${n??``} | + +
+\`\`\` +`}function ko(e,t,n){let r=[t];if(e.recentSessions.length>0){r.push(``),r.push(`### Recent Sessions`),r.push(`| ID | Title | Updated | Messages | Agents |`),r.push(`|----|-------|---------|----------|--------|`);for(let t of e.recentSessions.slice(0,5)){let e=new Date(t.updatedAt).toISOString().split(`T`)[0],n=t.agents.join(`, `)||`N/A`,i=t.title||`Untitled`;r.push(`| ${t.id} | ${i} | ${e} | ${t.messageCount} | ${n} |`)}r.push(``),r.push("Use `session_read` to review any of these sessions in detail.")}if(n.length>0){r.push(``),r.push(`### Relevant Prior Work`),r.push(`The following sessions contain content related to this issue:`),r.push(``);for(let e of n.slice(0,3)){r.push(`**Session ${e.sessionId}:**`),r.push("```markdown");for(let t of e.matches.slice(0,2))r.push(`- ${t.excerpt}`);r.push("```"),r.push(``)}r.push("Use `session_read` to review full context before starting new investigation.")}return r.push(``),r.join(` +`)}function Ao(e,t){let n=e.filter(e=>e.sessionId===t);if(n.length===0)return null;let r=[];for(let e of n.slice(0,1)){r.push(`**Session ${e.sessionId}:**`),r.push("```markdown");for(let t of e.matches.slice(0,3))r.push(`- ${t.excerpt}`);r.push("```")}return r.join(` +`)}function jo(e,t,n,r){if(t&&n!=null){let t=e.priorWorkContext.filter(e=>e.sessionId!==n);return e.recentSessions.length===0&&t.length===0?null:{title:`## Related Historical Context`,content:ko(e,`## Related Historical Context`,t)}}return e.recentSessions.length===0&&e.priorWorkContext.length===0&&r||e.recentSessions.length===0&&e.priorWorkContext.length===0?null:{title:`## Prior Session Context`,content:ko(e,`## Prior Session Context`,e.priorWorkContext)}}function Mo(e){let t=[`## Output Contract`];return t.push(`- Review action: approve/request-changes if confident; otherwise comment-only`),t.push(`- Requested reviewer: ${e.isRequestedReviewer?`yes`:`no`}`),e.authorAssociation!=null&&t.push(`- Author association: ${e.authorAssociation}`),t.join(` +`)}async function No(e,t,n,r=async(e,t)=>ze.writeFile(e,t,`utf8`)){let i=[];for(let a of e){let e=Be.join(t,a.filename);try{await r(e,a.content),i.push({type:`file`,mime:`text/plain`,url:Fe(e).toString(),filename:a.filename})}catch(t){n.warning(`Failed to materialize reference file`,{error:t instanceof Error?t.message:String(t),filename:a.filename,path:e})}}return i}const Po=[`pull request`,`open a pr`,`create a pr`,`create pr`,`gh pr `,`push to origin`,`git push`,`auto-merge`,`create branch`,`update branch`,`branch workflow`];function Fo(e){let t=e?.toLowerCase().trim()??``;if(t.length===0)return`working-dir`;for(let e of Po)if(t.includes(e))return`branch-pr`;return t.includes(`pull the request`)?`branch-pr`:`working-dir`}function Io(e,t,n){switch(e){case`discussion_comment`:case`issue_comment`:case`issues`:case`pull_request`:case`pull_request_review_comment`:case`unsupported`:return null;case`schedule`:case`workflow_dispatch`:switch(n){case`working-dir`:return`working-dir`;case`branch-pr`:return`branch-pr`;case`auto`:return Fo(t);default:return n}default:return e}}function Lo(e){return{success:!0,data:e}}function Ro(e){return{success:!1,error:e}}const zo=[`OWNER`,`MEMBER`,`COLLABORATOR`];async function Bo(e,t){try{let{client:n,server:r}=await La({signal:e});return t.debug(`OpenCode server bootstrapped`,{url:r.url}),Lo({client:n,server:r,shutdown:()=>{r.close()}})}catch(e){let n=e instanceof Error?e.message:String(e);return t.warning(`Failed to bootstrap OpenCode server`,{error:n}),Ro(Error(`Server bootstrap failed: ${n}`))}}async function Vo(e,t){let{logger:n,opencodeVersion:r}=e,i=se.env.OPENCODE_PATH??null,a=await t.verifyOpenCodeAvailable(i,n);if(a.available&&a.version!=null)return n.info(`OpenCode already available`,{version:a.version}),{path:i??`opencode`,version:a.version,didSetup:!1};n.info(`OpenCode not found, running auto-setup`,{requestedVersion:r});let o={opencodeVersion:r,authJson:e.authJson,appId:null,privateKey:null,opencodeConfig:e.opencodeConfig,systematicConfig:e.systematicConfig,omoConfig:null,omoVersion:e.omoVersion,systematicVersion:e.systematicVersion,omoProviders:e.omoProviders},s=await t.runSetup(o,e.githubToken);if(s==null)throw Error(`Auto-setup failed: runSetup returned null`);return t.addToPath(s.opencodePath),se.env.OPENCODE_PATH=s.opencodePath,n.info(`Auto-setup completed`,{version:s.opencodeVersion,path:s.opencodePath}),{path:s.opencodePath,version:s.opencodeVersion,didSetup:!0}}const Ho=`agent: working`,Uo=`fcf2e1`,Wo=`Agent is currently working on this`;function Go(e){return Object.assign(Error(e),{code:`OBJECT_STORE_VALIDATION_ERROR`})}function Ko(e){return Object.assign(Error(e),{code:`OBJECT_STORE_PATH_TRAVERSAL_ERROR`})}function qo(e){return Object.assign(Error(e),{code:`OBJECT_STORE_OPERATION_ERROR`})}const Jo=/^[0-9a-z][\w.-]{0,63}$/i;function Yo(e){return[...e].some(e=>{let t=e.codePointAt(0);return t!=null&&(t<=31||t===127)})}function Xo(e){return[...e].filter(e=>{let t=e.codePointAt(0);return t==null||t>31&&t!==127}).join(``)}function Zo(e){let t=e.split(`.`).map(e=>Number.parseInt(e,10));if(t.length!==4||t.some(Number.isNaN))return!1;let n=t[0],r=t[1];return n==null||r==null?!1:n===10||n===127||n===169&&r===254||n===192&&r===168?!0:n===172&&r>=16&&r<=31}function Qo(e){let t=e.toLowerCase();return t===`::1`||t.startsWith(`fe8`)||t.startsWith(`fe9`)||t.startsWith(`fea`)||t.startsWith(`feb`)}function $o(e){if(e===`localhost`)return!0;let t=De.isIP(e);return t===4?Zo(e):t===6?Qo(e):!1}function es(e){let t=e.toLowerCase();return t===`169.254.169.254`||t===`metadata.google.internal`?!0:De.isIP(t)===6?t===`fd00:ec2::254`:!1}function ts(e,t){let n;try{n=new URL(e)}catch{return Ro(Go(`s3 endpoint must be a valid URL`))}return t===!1&&n.protocol!==`https:`?Ro(Go(`s3 endpoint must use https unless insecure endpoints are explicitly allowed`)):es(n.hostname)?Ro(Go(`s3 endpoint must not target cloud instance metadata services`)):t===!1&&$o(n.hostname)?Ro(Go(`s3 endpoint must not target loopback, link-local, or private network addresses`)):n.username.length>0||n.password.length>0?Ro(Go(`s3 endpoint must not include embedded credentials`)):Lo(n)}function ns(e){let t=e.trim();return t.length===0?Ro(Go(`object store prefix cannot be empty`)):t.includes(`..`)||t.startsWith(`/`)?Ro(Go(`object store prefix must not contain traversal or absolute path markers`)):Yo(t)?Ro(Go(`object store prefix must not contain control characters`)):Jo.test(t)===!1?Ro(Go(`object store prefix must match the allowed naming pattern`)):Lo(t)}function rs(e){if(e.includes(`\0`))return Ro(Go(`object store key components must not contain null bytes`));let t=Xo(e).replaceAll(`/`,`-`).replaceAll(`\\`,`-`).trim();return t.length===0?Ro(Go(`object store key components must not be empty`)):t.includes(`..`)?Ro(Go(`object store key components must not contain traversal markers`)):Lo(t)}function is(e,t){let n=Be.resolve(e);if(t.includes(`\0`))return Ro(Ko(`download path must not contain null bytes`));if(Be.isAbsolute(t))return Ro(Ko(`download path must be relative to the storage root`));let r=Be.resolve(n,t),i=`${n}${Be.sep}`;return r.startsWith(i)===!1?Ro(Ko(`download path escapes the storage root`)):Lo(r)}function as(e){let t=e.trim();if(t.length===0)return Ro(Go(`repository path must not be empty`));let n=t.split(`/`).filter(e=>e.length>0);return n.length===0||n.length>2?Ro(Go(`repository path must be "owner/repo" or a single component`)):Lo(n)}function os(e,t,n,r,i){let a=ns(e.prefix);if(a.success===!1)return Ro(a.error);let o=rs(t);if(o.success===!1)return Ro(o.error);let s=as(n);if(s.success===!1)return Ro(s.error);let c=[];for(let e of s.data){let t=rs(e);if(t.success===!1)return Ro(t.error);c.push(t.data)}let l=c.join(`/`),u=`${a.data}/${o.data}/${l}/${r}`;if(i==null)return Lo(`${u}/`);let d=rs(i);return d.success===!1?Ro(d.error):Lo(`${u}/${d.data}`)}const ss=[`opencode.db`,`opencode.db-wal`,`opencode.db-shm`];function cs(e){return Be.dirname(e)}function ls(e,t){return Be.join(cs(e),t)}function us(e,t,n){let r=os(e,t,n,`sessions`);return r.success?r.data:null}async function ds(e){let t=await ze.readdir(e,{withFileTypes:!0});return(await Promise.all(t.map(async t=>{let n=Be.join(e,t.name);return t.isDirectory()?ds(n):t.isFile()?[n]:[]}))).flat().sort((e,t)=>e.localeCompare(t))}function fs(e,t,n){return`${e}${t}/${n.split(Be.sep).join(`/`)}`}async function ps(e,t,n,r,i,a){let o=us(t,n,r);if(o==null)return a.warning(`Failed to build object store sessions prefix for upload`,{identity:n,repo:r}),{uploaded:0,failed:0};let s=0,c=0;for(let t of ss){let n=ls(i,t);try{await ze.access(n)}catch{continue}let r=await e.upload(`${o}${t}`,n);if(r.success){s++;continue}c++,a.warning(`Failed to upload session database file to object store`,{key:`${o}${t}`,localPath:n,error:Ra(r.error)})}return{uploaded:s,failed:c}}async function ms(e,t,n,r,i,a){let o=us(t,n,r);if(o==null)return a.warning(`Failed to build object store sessions prefix for download`,{identity:n,repo:r}),{downloaded:0,failed:0,mainDbRestored:!1};let s=await e.list(o);if(s.success===!1)return a.warning(`Failed to list object store session files`,{prefix:o,error:Ra(s.error)}),{downloaded:0,failed:1,mainDbRestored:!1};if(s.data.length===0)return{downloaded:0,failed:0,mainDbRestored:!1};let c=cs(i),l=0,u=0,d=!1;for(let t of s.data){let n=is(c,t.startsWith(o)?t.slice(o.length):t);if(n.success===!1){u++,a.warning(`Rejected object store session key during download`,{key:t,error:Ra(n.error)});continue}await ze.mkdir(Be.dirname(n.data),{recursive:!0});let r=await e.download(t,n.data);if(r.success){l++,Be.basename(n.data)===`opencode.db`&&(d=!0);continue}u++,a.warning(`Failed to download session database file from object store`,{key:t,localPath:n.data,error:Ra(r.error)})}return{downloaded:l,failed:u,mainDbRestored:d}}async function hs(e,t,n,r,i,a,o){try{await ze.access(a)}catch{return{uploaded:0,failed:0}}let s=0,c=0,l=await ds(a),u=os(t,n,r,`artifacts`);if(u.success===!1)return o.warning(`Failed to build object store artifact prefix for upload`,{runId:i,error:Ra(u.error)}),{uploaded:0,failed:0};for(let t of l){let n=Be.relative(a,t),r=fs(u.data,i,n),l=await e.upload(r,t);if(l.success){s++;continue}c++,o.warning(`Failed to upload artifact file to object store`,{key:r,filePath:t,error:Ra(l.error)})}return{uploaded:s,failed:c}}async function gs(e,t,n,r,i,a,o){let s=os(t,n,r,`metadata`,`${i}.json`);if(s.success===!1)return o.warning(`Failed to build object store metadata key for upload`,{runId:i,error:Ra(s.error)}),{success:!1};let c=await ze.mkdtemp(Be.join(He.tmpdir(),`fro-bot-metadata-`)),l=Be.join(c,`${i}.json`);try{await ze.writeFile(l,JSON.stringify(a,null,2),`utf8`);let t=await e.upload(s.data,l);return t.success===!1?(o.warning(`Failed to upload run metadata to object store`,{key:s.data,runId:i,error:Ra(t.error)}),{success:!1}):{success:!0}}catch(e){return o.warning(`Failed to upload run metadata to object store`,{key:s.data,runId:i,error:Ra(e)}),{success:!1}}finally{await ze.rm(c,{recursive:!0,force:!0})}}var _s=i((e=>{var t=a();function n(e){return n=>async r=>{let{request:i}=r;if(e.expectContinueHeader!==!1&&t.HttpRequest.isInstance(i)&&i.body&&e.runtime===`node`&&e.requestHandler?.constructor?.name!==`FetchHttpHandler`){let t=!0;if(typeof e.expectContinueHeader==`number`)try{t=(Number(i.headers?.[`content-length`])??e.bodyLengthChecker?.(i.body)??1/0)>=e.expectContinueHeader}catch{}else t=!!e.expectContinueHeader;t&&(i.headers.Expect=`100-continue`)}return n({...r,request:i})}}let r={step:`build`,tags:[`SET_EXPECT_HEADER`,`EXPECT_HEADER`],name:`addExpectContinueMiddleware`,override:!0};e.addExpectContinueMiddleware=n,e.addExpectContinueMiddlewareOptions=r,e.getAddExpectContinuePlugin=e=>({applyToStack:t=>{t.add(n(e),r)}})})),vs=i(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>n(e,`name`,{value:t,configurable:!0}),s=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},c=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},l=e=>c(n({},`__esModule`,{value:!0}),e),u={};s(u,{isArrayBuffer:()=>d}),t.exports=l(u);var d=o(e=>typeof ArrayBuffer==`function`&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)===`[object ArrayBuffer]`,`isArrayBuffer`)})),ys=i(((e,n)=>{var r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s=(e,t)=>r(e,`name`,{value:t,configurable:!0}),c=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!o.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(s=i(t,c))||s.enumerable});return e},u=e=>l(r({},`__esModule`,{value:!0}),e),d={};c(d,{fromArrayBuffer:()=>m,fromString:()=>h}),n.exports=u(d);var f=vs(),p=t(`buffer`),m=s((e,t=0,n=e.byteLength-t)=>{if(!(0,f.isArrayBuffer)(e))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return p.Buffer.from(e,t,n)},`fromArrayBuffer`),h=s((e,t)=>{if(typeof e!=`string`)throw TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?p.Buffer.from(e,t):p.Buffer.from(e)},`fromString`)})),bs=i(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>n(e,`name`,{value:t,configurable:!0}),s=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},c=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},l=e=>c(n({},`__esModule`,{value:!0}),e),u={};s(u,{fromUtf8:()=>f,toUint8Array:()=>p,toUtf8:()=>m}),t.exports=l(u);var d=ys(),f=o(e=>{let t=(0,d.fromString)(e,`utf8`);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},`fromUtf8`),p=o(e=>typeof e==`string`?f(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),`toUint8Array`),m=o(e=>{if(typeof e==`string`)return e;if(typeof e!=`object`||typeof e.byteOffset!=`number`||typeof e.byteLength!=`number`)throw Error(`@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.`);return(0,d.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString(`utf8`)},`toUtf8`)})),xs=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.convertToBuffer=void 0;var t=bs(),n=typeof Buffer<`u`&&Buffer.from?function(e){return Buffer.from(e,`utf8`)}:t.fromUtf8;function r(e){return e instanceof Uint8Array?e:typeof e==`string`?n(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}e.convertToBuffer=r})),Ss=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isEmptyData=void 0;function t(e){return typeof e==`string`?e.length===0:e.byteLength===0}e.isEmptyData=t})),Cs=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.numToUint8=void 0;function t(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}e.numToUint8=t})),ws=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.uint32ArrayFrom=void 0;function t(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n{Object.defineProperty(e,`__esModule`,{value:!0}),e.uint32ArrayFrom=e.numToUint8=e.isEmptyData=e.convertToBuffer=void 0;var t=xs();Object.defineProperty(e,`convertToBuffer`,{enumerable:!0,get:function(){return t.convertToBuffer}});var n=Ss();Object.defineProperty(e,`isEmptyData`,{enumerable:!0,get:function(){return n.isEmptyData}});var r=Cs();Object.defineProperty(e,`numToUint8`,{enumerable:!0,get:function(){return r.numToUint8}});var i=ws();Object.defineProperty(e,`uint32ArrayFrom`,{enumerable:!0,get:function(){return i.uint32ArrayFrom}})})),Es=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.AwsCrc32c=void 0;var n=(g(),e(f)),r=Ts(),i=Ds();t.AwsCrc32c=function(){function e(){this.crc32c=new i.Crc32c}return e.prototype.update=function(e){(0,r.isEmptyData)(e)||this.crc32c.update((0,r.convertToBuffer)(e))},e.prototype.digest=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,(0,r.numToUint8)(this.crc32c.digest())]})})},e.prototype.reset=function(){this.crc32c=new i.Crc32c},e}()})),Ds=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.AwsCrc32c=t.Crc32c=t.crc32c=void 0;var n=(g(),e(f)),r=Ts();function i(e){return new a().update(e).digest()}t.crc32c=i;var a=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var i=n.__values(e),a=i.next();!a.done;a=i.next()){var s=a.value;this.checksum=this.checksum>>>8^o[(this.checksum^s)&255]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e}();t.Crc32c=a;var o=(0,r.uint32ArrayFrom)([0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697]),s=Es();Object.defineProperty(t,`AwsCrc32c`,{enumerable:!0,get:function(){return s.AwsCrc32c}})})),Os=i((e=>{let t=()=>{let e=Array(8);for(let t=0;t<8;t++){let n=Array(512);for(let e=0;e<256;e++){let r=BigInt(e);for(let e=0;e<8*(t+1);e++)r&1n?r=r>>1n^11127430586519243189n:r>>=1n;n[e*2]=Number(r>>32n&4294967295n),n[e*2+1]=Number(r&4294967295n)}e[t]=new Uint32Array(n)}return e},n,r,i,a,o,s,c,l,u,d=()=>{n||(n=t(),[r,i,a,o,s,c,l,u]=n)};e.Crc64Nvme=class{c1=0;c2=0;constructor(){d(),this.reset()}update(e){let t=e.length,n=0,d=this.c1,f=this.c2;for(;n+8<=t;){let t=((f^e[n++])&255)<<1,p=((f>>>8^e[n++])&255)<<1,m=((f>>>16^e[n++])&255)<<1,h=((f>>>24^e[n++])&255)<<1,g=((d^e[n++])&255)<<1,v=((d>>>8^e[n++])&255)<<1,y=((d>>>16^e[n++])&255)<<1,b=((d>>>24^e[n++])&255)<<1;d=u[t]^l[p]^c[m]^s[h]^o[g]^a[v]^i[y]^r[b],f=u[t+1]^l[p+1]^c[m+1]^s[h+1]^o[g+1]^a[v+1]^i[y+1]^r[b+1]}for(;n>>8|(d&255)<<24)>>>0,d=d>>>8^r[t],f^=r[t+1],n++}this.c1=d,this.c2=f}async digest(){let e=this.c1^4294967295,t=this.c2^4294967295;return new Uint8Array([e>>>24,e>>>16&255,e>>>8&255,e&255,t>>>24,t>>>16&255,t>>>8&255,t&255])}reset(){this.c1=4294967295,this.c2=4294967295}},e.crc64NvmeCrtContainer={CrtCrc64Nvme:null}})),ks=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.AwsCrc32=void 0;var n=(g(),e(f)),r=Ts(),i=As();t.AwsCrc32=function(){function e(){this.crc32=new i.Crc32}return e.prototype.update=function(e){(0,r.isEmptyData)(e)||this.crc32.update((0,r.convertToBuffer)(e))},e.prototype.digest=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,(0,r.numToUint8)(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new i.Crc32},e}()})),As=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.AwsCrc32=t.Crc32=t.crc32=void 0;var n=(g(),e(f)),r=Ts();function i(e){return new a().update(e).digest()}t.crc32=i;var a=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var i=n.__values(e),a=i.next();!a.done;a=i.next()){var s=a.value;this.checksum=this.checksum>>>8^o[(this.checksum^s)&255]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e}();t.Crc32=a;var o=(0,r.uint32ArrayFrom)([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),s=ks();Object.defineProperty(t,`AwsCrc32`,{enumerable:!0,get:function(){return s.AwsCrc32}})})),js=i((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getCrc32ChecksumAlgorithmFunction=void 0;let r=(g(),e(f)),i=As(),a=Ts(),o=r.__importStar(t(`node:zlib`));var s=class{checksum=0;update(e){this.checksum=o.crc32(e,this.checksum)}async digest(){return(0,a.numToUint8)(this.checksum)}reset(){this.checksum=0}};n.getCrc32ChecksumAlgorithmFunction=()=>o.crc32===void 0?i.AwsCrc32:s})),Ms=i((t=>{var n=(o(),e(s)),r=a(),i=p(),u=c(),d=Ds(),f=Os(),m=js(),g=l(),v=h();let y={WHEN_SUPPORTED:`WHEN_SUPPORTED`,WHEN_REQUIRED:`WHEN_REQUIRED`},b=y.WHEN_SUPPORTED,x={WHEN_SUPPORTED:`WHEN_SUPPORTED`,WHEN_REQUIRED:`WHEN_REQUIRED`},S=y.WHEN_SUPPORTED;t.ChecksumAlgorithm=void 0,(function(e){e.MD5=`MD5`,e.CRC32=`CRC32`,e.CRC32C=`CRC32C`,e.CRC64NVME=`CRC64NVME`,e.SHA1=`SHA1`,e.SHA256=`SHA256`})(t.ChecksumAlgorithm||={}),t.ChecksumLocation=void 0,(function(e){e.HEADER=`header`,e.TRAILER=`trailer`})(t.ChecksumLocation||={});let C=t.ChecksumAlgorithm.CRC32;var w;(function(e){e.ENV=`env`,e.CONFIG=`shared config entry`})(w||={});let T=(e,t,n,r)=>{if(!(t in e))return;let i=e[t].toUpperCase();if(!Object.values(n).includes(i))throw TypeError(`Cannot load ${r} '${t}'. Expected one of ${Object.values(n)}, got '${e[t]}'.`);return i},E=`AWS_REQUEST_CHECKSUM_CALCULATION`,D=`request_checksum_calculation`,O={environmentVariableSelector:e=>T(e,E,y,w.ENV),configFileSelector:e=>T(e,D,y,w.CONFIG),default:b},k=`AWS_RESPONSE_CHECKSUM_VALIDATION`,A=`response_checksum_validation`,j={environmentVariableSelector:e=>T(e,k,x,w.ENV),configFileSelector:e=>T(e,A,x,w.CONFIG),default:S},M=(e,{requestChecksumRequired:t,requestAlgorithmMember:n,requestChecksumCalculation:r})=>{if(!n)return r===y.WHEN_SUPPORTED||t?C:void 0;if(e[n])return e[n]},N=e=>e===t.ChecksumAlgorithm.MD5?`content-md5`:`x-amz-checksum-${e.toLowerCase()}`,P=(e,t)=>{let n=e.toLowerCase();for(let e of Object.keys(t))if(n===e.toLowerCase())return!0;return!1},F=(e,t)=>{let n=e.toLowerCase();for(let e of Object.keys(t))if(e.toLowerCase().startsWith(n))return!0;return!1},I=e=>e!==void 0&&typeof e!=`string`&&!ArrayBuffer.isView(e)&&!u.isArrayBuffer(e),L=[t.ChecksumAlgorithm.CRC32,t.ChecksumAlgorithm.CRC32C,t.ChecksumAlgorithm.CRC64NVME,t.ChecksumAlgorithm.SHA1,t.ChecksumAlgorithm.SHA256],R=[t.ChecksumAlgorithm.SHA256,t.ChecksumAlgorithm.SHA1,t.ChecksumAlgorithm.CRC32,t.ChecksumAlgorithm.CRC32C,t.ChecksumAlgorithm.CRC64NVME],z=(e,n)=>{let{checksumAlgorithms:r={}}=n;switch(e){case t.ChecksumAlgorithm.MD5:return r?.MD5??n.md5;case t.ChecksumAlgorithm.CRC32:return r?.CRC32??m.getCrc32ChecksumAlgorithmFunction();case t.ChecksumAlgorithm.CRC32C:return r?.CRC32C??d.AwsCrc32c;case t.ChecksumAlgorithm.CRC64NVME:return typeof f.crc64NvmeCrtContainer.CrtCrc64Nvme==`function`?r?.CRC64NVME??f.crc64NvmeCrtContainer.CrtCrc64Nvme:r?.CRC64NVME??f.Crc64Nvme;case t.ChecksumAlgorithm.SHA1:return r?.SHA1??n.sha1;case t.ChecksumAlgorithm.SHA256:return r?.SHA256??n.sha256;default:if(r?.[e])return r[e];throw Error(`The checksum algorithm "${e}" is not supported by the client. Select one of ${L}, or provide an implementation to the client constructor checksums field.`)}},ee=(e,t)=>{let n=new e;return n.update(g.toUint8Array(t||``)),n.digest()},B={name:`flexibleChecksumsMiddleware`,step:`build`,tags:[`BODY_CHECKSUM`],override:!0},te=(e,a)=>(o,s)=>async c=>{if(!r.HttpRequest.isInstance(c.request)||F(`x-amz-checksum-`,c.request.headers))return o(c);let{request:l,input:u}=c,{body:d,headers:f}=l,{base64Encoder:p,streamHasher:m}=e,{requestChecksumRequired:h,requestAlgorithmMember:g}=a,v=await e.requestChecksumCalculation(),b=g?.name,x=g?.httpHeader;b&&!u[b]&&(v===y.WHEN_SUPPORTED||h)&&(u[b]=C,x&&(f[x]=C));let S=M(u,{requestChecksumRequired:h,requestAlgorithmMember:g?.name,requestChecksumCalculation:v}),w=d,T=f;if(S){switch(S){case t.ChecksumAlgorithm.CRC32:n.setFeature(s,`FLEXIBLE_CHECKSUMS_REQ_CRC32`,`U`);break;case t.ChecksumAlgorithm.CRC32C:n.setFeature(s,`FLEXIBLE_CHECKSUMS_REQ_CRC32C`,`V`);break;case t.ChecksumAlgorithm.CRC64NVME:n.setFeature(s,`FLEXIBLE_CHECKSUMS_REQ_CRC64`,`W`);break;case t.ChecksumAlgorithm.SHA1:n.setFeature(s,`FLEXIBLE_CHECKSUMS_REQ_SHA1`,`X`);break;case t.ChecksumAlgorithm.SHA256:n.setFeature(s,`FLEXIBLE_CHECKSUMS_REQ_SHA256`,`Y`);break}let r=N(S),a=z(S,e);if(I(d)){let{getAwsChunkedEncodingStream:t,bodyLengthChecker:n}=e;w=t(typeof e.requestStreamBufferSize==`number`&&e.requestStreamBufferSize>=8*1024?i.createBufferedReadable(d,e.requestStreamBufferSize,s.logger):d,{base64Encoder:p,bodyLengthChecker:n,checksumLocationName:r,checksumAlgorithmFn:a,streamHasher:m}),T={...f,"content-encoding":f[`content-encoding`]?`${f[`content-encoding`]},aws-chunked`:`aws-chunked`,"transfer-encoding":`chunked`,"x-amz-decoded-content-length":f[`content-length`],"x-amz-content-sha256":`STREAMING-UNSIGNED-PAYLOAD-TRAILER`,"x-amz-trailer":r},delete T[`content-length`]}else if(!P(r,f)){let e=await ee(a,d);T={...f,[r]:p(e)}}}try{return await o({...c,request:{...l,headers:T,body:w}})}catch(e){if(e instanceof Error&&e.name===`InvalidChunkSizeError`)try{e.message.endsWith(`.`)||(e.message+=`.`),e.message+=` Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream.`}catch{}throw e}},V={name:`flexibleChecksumsInputMiddleware`,toMiddleware:`serializerMiddleware`,relation:`before`,tags:[`BODY_CHECKSUM`],override:!0},ne=(e,t)=>(r,i)=>async a=>{let o=a.input,{requestValidationModeMember:s}=t,c=await e.requestChecksumCalculation(),l=await e.responseChecksumValidation();switch(c){case y.WHEN_REQUIRED:n.setFeature(i,`FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED`,`a`);break;case y.WHEN_SUPPORTED:n.setFeature(i,`FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED`,`Z`);break}switch(l){case x.WHEN_REQUIRED:n.setFeature(i,`FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED`,`c`);break;case x.WHEN_SUPPORTED:n.setFeature(i,`FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED`,`b`);break}return s&&!o[s]&&l===x.WHEN_SUPPORTED&&(o[s]=`ENABLED`),r(a)},re=(e=[])=>{let t=[],n=R.length;for(let r of e){let e=R.indexOf(r);e===-1?t[n++]=r:t[e]=r}return t.filter(Boolean)},H=e=>{let t=e.lastIndexOf(`-`);if(t!==-1){let n=e.slice(t+1);if(!n.startsWith(`0`)){let e=parseInt(n,10);if(!isNaN(e)&&e>=1&&e<=1e4)return!0}}return!1},ie=async(e,{checksumAlgorithmFn:t,base64Encoder:n})=>n(await ee(t,e)),ae=async(e,{config:n,responseAlgorithms:r,logger:a})=>{let o=re(r),{body:s,headers:c}=e;for(let r of o){let o=N(r),l=c[o];if(l){let c;try{c=z(r,n)}catch(e){if(r===t.ChecksumAlgorithm.CRC64NVME){a?.warn(`Skipping ${t.ChecksumAlgorithm.CRC64NVME} checksum validation: ${e.message}`);continue}throw e}let{base64Encoder:u}=n;if(I(s)){e.body=i.createChecksumStream({expectedChecksum:l,checksumSourceLocation:o,checksum:new c,source:s,base64Encoder:u});return}let d=await ie(s,{checksumAlgorithmFn:c,base64Encoder:u});if(d===l)break;throw Error(`Checksum mismatch: expected "${d}" but received "${l}" in response header "${o}".`)}}},oe={name:`flexibleChecksumsResponseMiddleware`,toMiddleware:`deserializerMiddleware`,relation:`after`,tags:[`BODY_CHECKSUM`],override:!0},se=(e,t)=>(n,i)=>async a=>{if(!r.HttpRequest.isInstance(a.request))return n(a);let o=a.input,s=await n(a),c=s.response,{requestValidationModeMember:l,responseAlgorithms:u}=t;if(l&&o[l]===`ENABLED`){let{clientName:t,commandName:n}=i,r=Object.keys(e.checksumAlgorithms??{}).filter(e=>{let t=N(e);return c.headers[t]!==void 0}),a=re([...u??[],...r]);if(t===`S3Client`&&n===`GetObjectCommand`&&a.every(e=>{let t=N(e),n=c.headers[t];return!n||H(n)}))return s;await ae(c,{config:e,responseAlgorithms:a,logger:i.logger})}return s};t.CONFIG_REQUEST_CHECKSUM_CALCULATION=D,t.CONFIG_RESPONSE_CHECKSUM_VALIDATION=A,t.DEFAULT_CHECKSUM_ALGORITHM=C,t.DEFAULT_REQUEST_CHECKSUM_CALCULATION=b,t.DEFAULT_RESPONSE_CHECKSUM_VALIDATION=S,t.ENV_REQUEST_CHECKSUM_CALCULATION=E,t.ENV_RESPONSE_CHECKSUM_VALIDATION=k,t.NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS=O,t.NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS=j,t.RequestChecksumCalculation=y,t.ResponseChecksumValidation=x,t.flexibleChecksumsMiddleware=te,t.flexibleChecksumsMiddlewareOptions=B,t.getFlexibleChecksumsPlugin=(e,t)=>({applyToStack:n=>{n.add(te(e,t),B),n.addRelativeTo(ne(e,t),V),n.addRelativeTo(se(e,t),oe)}}),t.resolveFlexibleChecksumsConfig=e=>{let{requestChecksumCalculation:t,responseChecksumValidation:n,requestStreamBufferSize:r}=e;return Object.assign(e,{requestChecksumCalculation:v.normalizeProvider(t??b),responseChecksumValidation:v.normalizeProvider(n??S),requestStreamBufferSize:Number(r??0),checksumAlgorithms:e.checksumAlgorithms??{}})}})),Ns=i((e=>{e.build=e=>{let{partition:t=`aws`,service:n,region:r,accountId:i,resource:a}=e;if([n,r,i,a].some(e=>typeof e!=`string`))throw Error(`Input ARN object is invalid`);return`arn:${t}:${n}:${r}:${i}:${a}`},e.parse=e=>{let t=e.split(`:`);if(t.length<6||t[0]!==`arn`)throw Error(`Malformed ARN`);let[,n,r,i,a,...o]=t;return{partition:n,service:r,region:i,accountId:a,resource:o.join(`:`)}},e.validate=e=>typeof e==`string`&&e.indexOf(`arn:`)===0&&e.split(`:`).length>=6})),Ps=i((t=>{var n=a(),r=b(),i=p(),c=Ns(),l=(x(),e(T)),u=(y(),e(d)),f=S(),m=E(),g=(o(),e(s)),v=(k(),e(ne)),C=h();function w(){return(e,t)=>async i=>{let{request:a}=i;if(n.HttpRequest.isInstance(a)&&!(`content-length`in a.headers)&&!(`x-amz-decoded-content-length`in a.headers)){let e=`Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`;typeof t?.logger?.warn==`function`&&!(t.logger instanceof r.NoOpLogger)?t.logger.warn(e):console.warn(e)}return e({...i})}}let D={step:`finalizeRequest`,tags:[`CHECK_CONTENT_LENGTH_HEADER`],name:`getCheckContentLengthHeaderPlugin`,override:!0},O=e=>({applyToStack:e=>{e.add(w(),D)}}),A=e=>(t,n)=>async r=>{let i=await e.region(),a=e.region,o=()=>{};n.__s3RegionRedirect&&(Object.defineProperty(e,`region`,{writable:!1,value:async()=>n.__s3RegionRedirect}),o=()=>Object.defineProperty(e,`region`,{writable:!0,value:a}));try{let a=await t(r);if(n.__s3RegionRedirect&&(o(),i!==await e.region()))throw Error(`Region was not restored following S3 region redirect.`);return a}catch(e){throw o(),e}},j={tags:[`REGION_REDIRECT`,`S3`],name:`regionRedirectEndpointMiddleware`,override:!0,relation:`before`,toMiddleware:`endpointV2Middleware`};function M(e){return(t,n)=>async r=>{try{return await t(r)}catch(i){if(e.followRegionRedirects){let a=i?.$metadata?.httpStatusCode,o=n.commandName===`HeadBucketCommand`,s=i?.$response?.headers?.[`x-amz-bucket-region`];if(s&&(a===301||a===400&&(i?.name===`IllegalLocationConstraintException`||o))){try{let t=s;n.logger?.debug(`Redirecting from ${await e.region()} to ${t}`),n.__s3RegionRedirect=t}catch(e){throw Error(`Region redirect failed: `+e)}return t(r)}}throw i}}}let N={step:`initialize`,tags:[`REGION_REDIRECT`,`S3`],name:`regionRedirectMiddleware`,override:!0},P=e=>({applyToStack:t=>{t.add(M(e),N),t.addRelativeTo(A(e),j)}}),F=e=>(e,t)=>async i=>{let a=await e(i),{response:o}=a;if(n.HttpResponse.isInstance(o)&&o.headers.expires){o.headers.expiresstring=o.headers.expires;try{r.parseRfc7231DateTime(o.headers.expires)}catch(e){t.logger?.warn(`AWS SDK Warning for ${t.clientName}::${t.commandName} response parsing (${o.headers.expires}): ${e}`),delete o.headers.expires}}return a},I={tags:[`S3`],name:`s3ExpiresMiddleware`,override:!0,relation:`after`,toMiddleware:`deserializerMiddleware`},L=e=>({applyToStack:e=>{e.addRelativeTo(F(),I)}});var R=class e{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(e={}){this.data=e}get(e){let t=this.data[e];if(t)return t}set(e,t){return this.data[e]=t,t}delete(e){delete this.data[e]}async purgeExpired(){let t=Date.now();if(!(this.lastPurgeTime+e.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>t))for(let e in this.data){let n=this.data[e];if(!n.isRefreshing){let r=await n.identity;r.expiration&&r.expiration.getTime()(t.expiration?.getTime()??0){i.set(r,new z(Promise.resolve(e)))})),t)):i.set(r,new z(this.getIdentity(r))).identity}async getIdentity(e){await this.cache.purgeExpired().catch(e=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache: +`+e)});let t=await this.createSessionFn(e);if(!t.Credentials?.AccessKeyId||!t.Credentials?.SecretAccessKey)throw Error(`s3#createSession response credential missing AccessKeyId or SecretAccessKey.`);return{accessKeyId:t.Credentials.AccessKeyId,secretAccessKey:t.Credentials.SecretAccessKey,sessionToken:t.Credentials.SessionToken,expiration:t.Credentials.Expiration?new Date(t.Credentials.Expiration):void 0}}};let B=`X-Amz-S3session-Token`,te=`x-amz-s3session-token`,V={environmentVariableSelector:e=>m.booleanSelector(e,`AWS_S3_DISABLE_EXPRESS_SESSION_AUTH`,m.SelectorType.ENV),configFileSelector:e=>m.booleanSelector(e,`s3_disable_express_session_auth`,m.SelectorType.CONFIG),default:!1};var re=class extends f.SignatureV4{async signWithCredentials(e,t,n){let r=H(t);e.headers[te]=t.sessionToken;let i=this;return ie(i,r),i.signRequest(e,n??{})}async presignWithCredentials(e,t,n){let r=H(t);return delete e.headers[te],e.headers[B]=t.sessionToken,e.query=e.query??{},e.query[B]=t.sessionToken,ie(this,r),this.presign(e,n)}};function H(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function ie(e,t){let n=setTimeout(()=>{throw Error(`SignatureV4S3Express credential override was created but not called.`)},10),r=e.credentialProvider;e.credentialProvider=()=>(clearTimeout(n),e.credentialProvider=r,Promise.resolve(t))}let ae=e=>(t,r)=>async i=>{if(r.endpointV2){let t=r.endpointV2,a=t.properties?.authSchemes?.[0]?.name===`sigv4-s3express`;if((t.properties?.backend===`S3Express`||t.properties?.bucketType===`Directory`)&&(g.setFeature(r,`S3_EXPRESS_BUCKET`,`J`),r.isS3ExpressBucket=!0),a){let t=i.input.Bucket;if(t){let a=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:t});r.s3ExpressIdentity=a,n.HttpRequest.isInstance(i.request)&&a.sessionToken&&(i.request.headers[te]=a.sessionToken)}}}return t(i)},oe={name:`s3ExpressMiddleware`,step:`build`,tags:[`S3`,`S3_EXPRESS`],override:!0},se=e=>({applyToStack:t=>{t.add(ae(e),oe)}}),ce=async(e,t,n,r)=>{let i=await r.signWithCredentials(n,e,{});if(i.headers[`X-Amz-Security-Token`]||i.headers[`x-amz-security-token`])throw Error(`X-Amz-Security-Token must not be set for s3-express requests.`);return i},le=e=>e=>{throw e},ue=(e,t)=>{},de=v.httpSigningMiddlewareOptions,fe=e=>(t,r)=>async i=>{if(!n.HttpRequest.isInstance(i.request))return t(i);let a=C.getSmithyContext(r).selectedHttpAuthScheme;if(!a)throw Error(`No HttpAuthScheme was selected: unable to sign request`);let{httpAuthOption:{signingProperties:o={}},identity:s,signer:c}=a,l;l=r.s3ExpressIdentity?await ce(r.s3ExpressIdentity,o,i.request,await e.signer()):await c.sign(i.request,s,o);let u=await t({...i,request:l}).catch((c.errorHandler||le)(o));return(c.successHandler||ue)(u.response,o),u},pe=e=>({applyToStack:t=>{t.addRelativeTo(fe(e),v.httpSigningMiddlewareOptions)}}),me=(e,{session:t})=>{let[n,r]=t,{forcePathStyle:i,useAccelerateEndpoint:a,disableMultiregionAccessPoints:o,followRegionRedirects:s,s3ExpressIdentityProvider:c,bucketEndpoint:l,expectContinueHeader:u}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:a??!1,disableMultiregionAccessPoints:o??!1,followRegionRedirects:s??!1,s3ExpressIdentityProvider:c??new ee(async e=>n().send(new r({Bucket:e}))),bucketEndpoint:l??!1,expectContinueHeader:u??2097152})},he={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},ge=e=>(t,r)=>async a=>{let o=await t(a),{response:s}=o;if(!n.HttpResponse.isInstance(s))return o;let{statusCode:c,body:l}=s;if(c<200||c>=300||!(typeof l?.stream==`function`||typeof l?.pipe==`function`||typeof l?.tee==`function`))return o;let u=l,d=l;l&&typeof l==`object`&&!(l instanceof Uint8Array)&&([u,d]=await i.splitStream(l)),s.body=d;let f=await _e(u,{streamCollector:async e=>i.headStream(e,3e3)});typeof u?.destroy==`function`&&u.destroy();let p=e.utf8Encoder(f.subarray(f.length-16));if(f.length===0&&he[r.commandName]){let e=Error(`S3 aborted request`);throw e.name=`InternalError`,e}return p&&p.endsWith(``)&&(s.statusCode=400),o},_e=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),U={relation:`after`,toMiddleware:`deserializerMiddleware`,tags:[`THROW_200_EXCEPTIONS`,`S3`],name:`throw200ExceptionsMiddleware`,override:!0},ve=e=>({applyToStack:t=>{t.addRelativeTo(ge(e),U)}});function ye(e){return(t,n)=>async r=>{if(e.bucketEndpoint){let e=n.endpointV2;if(e){let t=r.input.Bucket;if(typeof t==`string`)try{let r=new URL(t);n.endpointV2={...e,url:r}}catch(e){let r=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${t} could not be parsed as URL.`;throw n.logger?.constructor?.name===`NoOpLogger`?console.warn(r):n.logger?.warn?.(r),e}}}return t(r)}}let be={name:`bucketEndpointMiddleware`,override:!0,relation:`after`,toMiddleware:`endpointV2Middleware`};function xe({bucketEndpoint:e}){return t=>async n=>{let{input:{Bucket:r}}=n;if(!e&&typeof r==`string`&&!c.validate(r)&&r.indexOf(`/`)>=0){let e=Error(`Bucket name shouldn't contain '/', received '${r}'`);throw e.name=`InvalidBucketName`,e}return t({...n})}}let Se={step:`initialize`,tags:[`VALIDATE_BUCKET_NAME`],name:`validateBucketNameMiddleware`,override:!0},Ce=e=>({applyToStack:t=>{t.add(xe(e),Se),t.addRelativeTo(ye(e),be)}});var we=class extends l.AwsRestXmlProtocol{async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n),i=u.NormalizedSchema.of(e.input),a=i.getSchema(),o=0,s=a[6]??0;if(t&&typeof t==`object`)for(let[e,n]of i.structIterator()){if(++o>s)break;if(e===`Bucket`){if(!t.Bucket&&n.getMergedTraits().httpLabel)throw Error(`No value provided for input HTTP label: Bucket.`);break}}return r}};t.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS=V,t.S3ExpressIdentityCache=R,t.S3ExpressIdentityCacheEntry=z,t.S3ExpressIdentityProviderImpl=ee,t.S3RestXmlProtocol=we,t.SignatureV4S3Express=re,t.checkContentLengthHeader=w,t.checkContentLengthHeaderMiddlewareOptions=D,t.getCheckContentLengthHeaderPlugin=O,t.getRegionRedirectMiddlewarePlugin=P,t.getS3ExpiresMiddlewarePlugin=L,t.getS3ExpressHttpSigningPlugin=pe,t.getS3ExpressPlugin=se,t.getThrow200ExceptionsPlugin=ve,t.getValidateBucketNamePlugin=Ce,t.regionRedirectEndpointMiddleware=A,t.regionRedirectEndpointMiddlewareOptions=j,t.regionRedirectMiddleware=M,t.regionRedirectMiddlewareOptions=N,t.resolveS3Config=me,t.s3ExpiresMiddleware=F,t.s3ExpiresMiddlewareOptions=I,t.s3ExpressHttpSigningMiddleware=fe,t.s3ExpressHttpSigningMiddlewareOptions=de,t.s3ExpressMiddleware=ae,t.s3ExpressMiddlewareOptions=oe,t.throw200ExceptionsMiddleware=ge,t.throw200ExceptionsMiddlewareOptions=U,t.validateBucketNameMiddleware=xe,t.validateBucketNameMiddlewareOptions=Se})),Fs=i((e=>{e.resolveEventStreamSerdeConfig=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)})})),Is=i((e=>{var t=Ps(),n=S();let r={CrtSignerV4:null};e.SignatureV4MultiRegion=class{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return typeof r.CrtSignerV4==`function`?`crt`:typeof n.signatureV4aContainer.SignatureV4a==`function`?`js`:`none`}constructor(e){this.sigv4Signer=new t.SignatureV4S3Express(e),this.signerOptions=e}async sign(e,t={}){return t.signingRegion===`*`?this.getSigv4aSigner().sign(e,t):this.sigv4Signer.sign(e,t)}async signWithCredentials(e,t,n={}){if(n.signingRegion===`*`){let i=this.getSigv4aSigner(),a=r.CrtSignerV4;if(a&&i instanceof a)return i.signWithCredentials(e,t,n);throw 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,t,n)}async presign(e,t={}){if(t.signingRegion===`*`){let n=this.getSigv4aSigner(),i=r.CrtSignerV4;if(i&&n instanceof i)return n.presign(e,t);throw 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,t)}async presignWithCredentials(e,t,n={}){if(n.signingRegion===`*`)throw Error(`Method presignWithCredentials is not supported for [signingRegion=*].`);return this.sigv4Signer.presignWithCredentials(e,t,n)}getSigv4aSigner(){if(!this.sigv4aSigner){let e=r.CrtSignerV4,t=n.signatureV4aContainer.SignatureV4a;if(this.signerOptions.runtime===`node`){if(!e&&!t)throw Error(`Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);if(e&&typeof e==`function`)this.sigv4aSigner=new e({...this.signerOptions,signingAlgorithm:1});else if(t&&typeof t==`function`)this.sigv4aSigner=new t({...this.signerOptions});else throw Error(`Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}else{if(!t||typeof t!=`function`)throw Error(`JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a`);this.sigv4aSigner=new t({...this.signerOptions})}}return this.sigv4aSigner}},e.signatureV4CrtContainer=r})),Ls=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ruleSet=void 0;let t=`required`,n=`type`,r=`rules`,i=`conditions`,a=`argv`,o=`assign`,s=`properties`,c=`backend`,l=`authSchemes`,u=`disableDoubleEncoding`,d=`signingName`,f=`signingRegion`,p=`headers`,m=`signingRegionSet`,h=`isSet`,g=`booleanEquals`,v=`error`,y=`aws.partition`,b=`stringEquals`,x=`getAttr`,S=`name`,C=`substring`,w=`bucketSuffix`,T=`parseURL`,E=`endpoint`,D=`tree`,O=`aws.isVirtualHostableS3Bucket`,k=`{url#scheme}://{Bucket}.{url#authority}{url#path}`,A=`accessPointSuffix`,j=`{url#scheme}://{url#authority}{url#path}`,M=`hardwareType`,N=`regionPrefix`,P=`bucketAliasSuffix`,F=`outpostId`,I=`isValidHostLabel`,L=`sigv4a`,R=`s3-outposts`,z=`{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}`,ee=`https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}`,B=`https://{Bucket}.s3.{partitionResult#dnsSuffix}`,te=`aws.parseArn`,V=`bucketArn`,ne=`arnType`,re=`s3-object-lambda`,H=`accesspoint`,ie=`accessPointName`,ae=`{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}`,oe=`mrapPartition`,se=`outpostType`,ce=`arnPrefix`,le=`{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}`,ue=`https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,de=`https://s3.{partitionResult#dnsSuffix}`,fe={[t]:!1,[n]:`string`},pe={[t]:!0,default:!1,[n]:`boolean`},me={[t]:!1,[n]:`boolean`},he={fn:g,[a]:[{ref:`Accelerate`},!0]},ge={fn:g,[a]:[{ref:`UseFIPS`},!0]},_e={fn:g,[a]:[{ref:`UseDualStack`},!0]},U={fn:h,[a]:[{ref:`Endpoint`}]},ve={fn:y,[a]:[{ref:`Region`}],[o]:`partitionResult`},ye={fn:b,[a]:[{fn:x,[a]:[{ref:`partitionResult`},S]},`aws-cn`]},be={fn:h,[a]:[{ref:`Bucket`}]},xe={ref:`Bucket`},Se={[i]:[he],[v]:`S3Express does not support S3 Accelerate.`,[n]:v},Ce={[i]:[U,{fn:T,[a]:[{ref:`Endpoint`}],[o]:`url`}],[r]:[{[i]:[{fn:h,[a]:[{ref:`DisableS3ExpressSessionAuth`}]},{fn:g,[a]:[{ref:`DisableS3ExpressSessionAuth`},!0]}],[r]:[{[i]:[{fn:g,[a]:[{fn:x,[a]:[{ref:`url`},`isIp`]},!0]}],[r]:[{[i]:[{fn:`uriEncode`,[a]:[xe],[o]:`uri_encoded_bucket`}],[r]:[{[E]:{url:`{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}`,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E}],[n]:D}],[n]:D},{[i]:[{fn:O,[a]:[xe,!1]}],[r]:[{[E]:{url:k,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E}],[n]:D},{[v]:`S3Express bucket name is not a valid virtual hostable name.`,[n]:v}],[n]:D},{[i]:[{fn:g,[a]:[{fn:x,[a]:[{ref:`url`},`isIp`]},!0]}],[r]:[{[i]:[{fn:`uriEncode`,[a]:[xe],[o]:`uri_encoded_bucket`}],[r]:[{[E]:{url:`{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}`,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4-s3express`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E}],[n]:D}],[n]:D},{[i]:[{fn:O,[a]:[xe,!1]}],[r]:[{[E]:{url:k,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4-s3express`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E}],[n]:D},{[v]:`S3Express bucket name is not a valid virtual hostable name.`,[n]:v}],[n]:D},we={fn:T,[a]:[{ref:`Endpoint`}],[o]:`url`},Te={fn:g,[a]:[{fn:x,[a]:[{ref:`url`},`isIp`]},!0]},Ee={ref:`url`},De={fn:`uriEncode`,[a]:[xe],[o]:`uri_encoded_bucket`},Oe={[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3express`,[f]:`{Region}`}]},W={},ke={fn:O,[a]:[xe,!1]},Ae={[v]:`S3Express bucket name is not a valid virtual hostable name.`,[n]:v},je={fn:h,[a]:[{ref:`UseS3ExpressControlEndpoint`}]},Me={fn:g,[a]:[{ref:`UseS3ExpressControlEndpoint`},!0]},Ne={fn:`not`,[a]:[U]},Pe={fn:g,[a]:[{ref:`UseDualStack`},!1]},Fe={fn:g,[a]:[{ref:`UseFIPS`},!1]},Ie={[v]:`Unrecognized S3Express bucket name format.`,[n]:v},Le={fn:`not`,[a]:[be]},Re={ref:M},ze={[i]:[Ne],[v]:`Expected a endpoint to be specified but no endpoint was found`,[n]:v},Be={[l]:[{[u]:!0,[S]:L,[d]:R,[m]:[`*`]},{[u]:!0,[S]:`sigv4`,[d]:R,[f]:`{Region}`}]},Ve={fn:g,[a]:[{ref:`ForcePathStyle`},!1]},He={ref:`ForcePathStyle`},Ue={fn:g,[a]:[{ref:`Accelerate`},!1]},We={fn:b,[a]:[{ref:`Region`},`aws-global`]},Ge={[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3`,[f]:`us-east-1`}]},Ke={fn:`not`,[a]:[We]},qe={fn:g,[a]:[{ref:`UseGlobalEndpoint`},!0]},Je={url:`https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:{[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3`,[f]:`{Region}`}]},[p]:{}},G={[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3`,[f]:`{Region}`}]},Ye={fn:g,[a]:[{ref:`UseGlobalEndpoint`},!1]},Xe={url:`https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},Ze={url:`https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},Qe={url:`https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},$e={fn:g,[a]:[{fn:x,[a]:[Ee,`isIp`]},!1]},et={url:z,[s]:G,[p]:{}},tt={url:k,[s]:G,[p]:{}},nt={[E]:tt,[n]:E},rt={url:ee,[s]:G,[p]:{}},it={url:`https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},at={[v]:`Invalid region: region was not a valid DNS name.`,[n]:v},ot={ref:V},st={ref:ne},ct={fn:x,[a]:[ot,`service`]},lt={ref:ie},ut={[i]:[_e],[v]:`S3 Object Lambda does not support Dual-stack`,[n]:v},dt={[i]:[he],[v]:`S3 Object Lambda does not support S3 Accelerate`,[n]:v},ft={[i]:[{fn:h,[a]:[{ref:`DisableAccessPoints`}]},{fn:g,[a]:[{ref:`DisableAccessPoints`},!0]}],[v]:`Access points are not supported for this operation`,[n]:v},pt={[i]:[{fn:h,[a]:[{ref:`UseArnRegion`}]},{fn:g,[a]:[{ref:`UseArnRegion`},!1]},{fn:`not`,[a]:[{fn:b,[a]:[{fn:x,[a]:[ot,`region`]},`{Region}`]}]}],[v]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[n]:v},mt={fn:x,[a]:[{ref:`bucketPartition`},S]},ht={fn:x,[a]:[ot,`accountId`]},gt={[l]:[{[u]:!0,[S]:`sigv4`,[d]:re,[f]:`{bucketArn#region}`}]},_t={[v]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[n]:v},vt={[v]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[n]:v},yt={[v]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[n]:v},bt={[v]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[n]:v},xt={[v]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[n]:v},St={[v]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[n]:v},Ct={[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3`,[f]:`{bucketArn#region}`}]},wt={[l]:[{[u]:!0,[S]:L,[d]:R,[m]:[`*`]},{[u]:!0,[S]:`sigv4`,[d]:R,[f]:`{bucketArn#region}`}]},Tt={fn:te,[a]:[xe]},Et={url:`https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:G,[p]:{}},Dt={url:`https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:G,[p]:{}},Ot={url:`https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:G,[p]:{}},kt={url:le,[s]:G,[p]:{}},At={url:`https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:G,[p]:{}},jt={ref:`UseObjectLambdaEndpoint`},Mt={[l]:[{[u]:!0,[S]:`sigv4`,[d]:re,[f]:`{Region}`}]},Nt={url:`https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},Pt={url:`https://s3-fips.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},Ft={url:`https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},It={url:j,[s]:G,[p]:{}},Lt={url:`https://s3.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},Rt=[{ref:`Region`}],zt=[{ref:`Endpoint`}],Bt=[xe],Vt=[he],Ht=[U,we],Ut=[{fn:h,[a]:[{ref:`DisableS3ExpressSessionAuth`}]},{fn:g,[a]:[{ref:`DisableS3ExpressSessionAuth`},!0]}],Wt=[De],Gt=[ke],Kt=[ve],qt=[ge,_e],Jt=[ge,Pe],Yt=[Fe,_e],Xt=[Fe,Pe],Zt=[{fn:C,[a]:[xe,6,14,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,14,16,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],Qt=[{[i]:[ge,_e],[E]:{url:`https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:{}},[n]:E},{[i]:Jt,[E]:{url:`https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:{}},[n]:E},{[i]:Yt,[E]:{url:`https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:{}},[n]:E},{[i]:Xt,[E]:{url:`https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:{}},[n]:E}],$t=[{fn:C,[a]:[xe,6,15,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,15,17,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],en=[{fn:C,[a]:[xe,6,19,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,19,21,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],tn=[{fn:C,[a]:[xe,6,20,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,20,22,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],nn=[{fn:C,[a]:[xe,6,26,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,26,28,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],rn=[{[i]:[ge,_e],[E]:{url:`https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4-s3express`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E},{[i]:Jt,[E]:{url:`https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}`,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4-s3express`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E},{[i]:Yt,[E]:{url:`https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4-s3express`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E},{[i]:Xt,[E]:{url:`https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}`,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4-s3express`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E}],an=[xe,0,7,!0],on=[{fn:C,[a]:[xe,7,15,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,15,17,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],sn=[{fn:C,[a]:[xe,7,16,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,16,18,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],cn=[{fn:C,[a]:[xe,7,20,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,20,22,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],ln=[{fn:C,[a]:[xe,7,21,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,21,23,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],un=[{fn:C,[a]:[xe,7,27,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,27,29,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],dn=[be],fn=[{fn:I,[a]:[{ref:F},!1]}],pn=[{fn:b,[a]:[{ref:N},`beta`]}],mn=[`*`],hn=[{fn:I,[a]:[{ref:`Region`},!1]}],gn=[{fn:b,[a]:[{ref:`Region`},`us-east-1`]}],_n=[{fn:b,[a]:[st,H]}],vn=[{fn:x,[a]:[ot,`resourceId[1]`],[o]:ie},{fn:`not`,[a]:[{fn:b,[a]:[lt,``]}]}],yn=[ot,`resourceId[1]`],bn=[_e],xn=[{fn:`not`,[a]:[{fn:b,[a]:[{fn:x,[a]:[ot,`region`]},``]}]}],Sn=[{fn:`not`,[a]:[{fn:h,[a]:[{fn:x,[a]:[ot,`resourceId[2]`]}]}]}],Cn=[ot,`resourceId[2]`],wn=[{fn:y,[a]:[{fn:x,[a]:[ot,`region`]}],[o]:`bucketPartition`}],Tn=[{fn:b,[a]:[mt,{fn:x,[a]:[{ref:`partitionResult`},S]}]}],En=[{fn:I,[a]:[{fn:x,[a]:[ot,`region`]},!0]}],Dn=[{fn:I,[a]:[ht,!1]}],On=[{fn:I,[a]:[lt,!1]}],kn=[ge],An=[{fn:I,[a]:[{ref:`Region`},!0]}];e.ruleSet={version:`1.0`,parameters:{Bucket:fe,Region:fe,UseFIPS:pe,UseDualStack:pe,Endpoint:fe,ForcePathStyle:pe,Accelerate:pe,UseGlobalEndpoint:pe,UseObjectLambdaEndpoint:me,Key:fe,Prefix:fe,CopySource:fe,DisableAccessPoints:me,DisableMultiRegionAccessPoints:pe,UseArnRegion:me,UseS3ExpressControlEndpoint:me,DisableS3ExpressSessionAuth:me},[r]:[{[i]:[{fn:h,[a]:Rt}],[r]:[{[i]:[he,ge],error:`Accelerate cannot be used with FIPS`,[n]:v},{[i]:[_e,U],error:`Cannot set dual-stack in combination with a custom endpoint.`,[n]:v},{[i]:[U,ge],error:`A custom endpoint cannot be combined with FIPS`,[n]:v},{[i]:[U,he],error:`A custom endpoint cannot be combined with S3 Accelerate`,[n]:v},{[i]:[ge,ve,ye],error:`Partition does not support FIPS`,[n]:v},{[i]:[be,{fn:C,[a]:[xe,0,6,!0],[o]:w},{fn:b,[a]:[{ref:w},`--x-s3`]}],[r]:[Se,Ce,{[i]:[je,Me],[r]:[{[i]:Kt,[r]:[{[i]:[De,Ne],[r]:[{[i]:qt,endpoint:{url:`https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Oe,[p]:W},[n]:E},{[i]:Jt,endpoint:{url:`https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Oe,[p]:W},[n]:E},{[i]:Yt,endpoint:{url:`https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Oe,[p]:W},[n]:E},{[i]:Xt,endpoint:{url:`https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Oe,[p]:W},[n]:E}],[n]:D}],[n]:D}],[n]:D},{[i]:Gt,[r]:[{[i]:Kt,[r]:[{[i]:Ut,[r]:[{[i]:Zt,[r]:Qt,[n]:D},{[i]:$t,[r]:Qt,[n]:D},{[i]:en,[r]:Qt,[n]:D},{[i]:tn,[r]:Qt,[n]:D},{[i]:nn,[r]:Qt,[n]:D},Ie],[n]:D},{[i]:Zt,[r]:rn,[n]:D},{[i]:$t,[r]:rn,[n]:D},{[i]:en,[r]:rn,[n]:D},{[i]:tn,[r]:rn,[n]:D},{[i]:nn,[r]:rn,[n]:D},Ie],[n]:D}],[n]:D},Ae],[n]:D},{[i]:[be,{fn:C,[a]:an,[o]:A},{fn:b,[a]:[{ref:A},`--xa-s3`]}],[r]:[Se,Ce,{[i]:Gt,[r]:[{[i]:Kt,[r]:[{[i]:Ut,[r]:[{[i]:on,[r]:Qt,[n]:D},{[i]:sn,[r]:Qt,[n]:D},{[i]:cn,[r]:Qt,[n]:D},{[i]:ln,[r]:Qt,[n]:D},{[i]:un,[r]:Qt,[n]:D},Ie],[n]:D},{[i]:on,[r]:rn,[n]:D},{[i]:sn,[r]:rn,[n]:D},{[i]:cn,[r]:rn,[n]:D},{[i]:ln,[r]:rn,[n]:D},{[i]:un,[r]:rn,[n]:D},Ie],[n]:D}],[n]:D},Ae],[n]:D},{[i]:[Le,je,Me],[r]:[{[i]:Kt,[r]:[{[i]:Ht,endpoint:{url:j,[s]:Oe,[p]:W},[n]:E},{[i]:qt,endpoint:{url:`https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:W},[n]:E},{[i]:Jt,endpoint:{url:`https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:W},[n]:E},{[i]:Yt,endpoint:{url:`https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:W},[n]:E},{[i]:Xt,endpoint:{url:`https://s3express-control.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:W},[n]:E}],[n]:D}],[n]:D},{[i]:[be,{fn:C,[a]:[xe,49,50,!0],[o]:M},{fn:C,[a]:[xe,8,12,!0],[o]:N},{fn:C,[a]:an,[o]:P},{fn:C,[a]:[xe,32,49,!0],[o]:F},{fn:y,[a]:Rt,[o]:`regionPartition`},{fn:b,[a]:[{ref:P},`--op-s3`]}],[r]:[{[i]:fn,[r]:[{[i]:Gt,[r]:[{[i]:[{fn:b,[a]:[Re,`e`]}],[r]:[{[i]:pn,[r]:[ze,{[i]:Ht,endpoint:{url:`https://{Bucket}.ec2.{url#authority}`,[s]:Be,[p]:W},[n]:E}],[n]:D},{endpoint:{url:`https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}`,[s]:Be,[p]:W},[n]:E}],[n]:D},{[i]:[{fn:b,[a]:[Re,`o`]}],[r]:[{[i]:pn,[r]:[ze,{[i]:Ht,endpoint:{url:`https://{Bucket}.op-{outpostId}.{url#authority}`,[s]:Be,[p]:W},[n]:E}],[n]:D},{endpoint:{url:`https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}`,[s]:Be,[p]:W},[n]:E}],[n]:D},{error:`Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"`,[n]:v}],[n]:D},{error:`Invalid Outposts Bucket alias - it must be a valid bucket name.`,[n]:v}],[n]:D},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[n]:v}],[n]:D},{[i]:dn,[r]:[{[i]:[U,{fn:`not`,[a]:[{fn:h,[a]:[{fn:T,[a]:zt}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[n]:v},{[i]:[Ve,ke],[r]:[{[i]:Kt,[r]:[{[i]:hn,[r]:[{[i]:[he,ye],error:`S3 Accelerate cannot be used in this region`,[n]:v},{[i]:[_e,ge,Ue,Ne,We],endpoint:{url:`https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[_e,ge,Ue,Ne,Ke,qe],[r]:[{endpoint:Je,[n]:E}],[n]:D},{[i]:[_e,ge,Ue,Ne,Ke,Ye],endpoint:Je,[n]:E},{[i]:[Pe,ge,Ue,Ne,We],endpoint:{url:`https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,ge,Ue,Ne,Ke,qe],[r]:[{endpoint:Xe,[n]:E}],[n]:D},{[i]:[Pe,ge,Ue,Ne,Ke,Ye],endpoint:Xe,[n]:E},{[i]:[_e,Fe,he,Ne,We],endpoint:{url:`https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[_e,Fe,he,Ne,Ke,qe],[r]:[{endpoint:Ze,[n]:E}],[n]:D},{[i]:[_e,Fe,he,Ne,Ke,Ye],endpoint:Ze,[n]:E},{[i]:[_e,Fe,Ue,Ne,We],endpoint:{url:`https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[_e,Fe,Ue,Ne,Ke,qe],[r]:[{endpoint:Qe,[n]:E}],[n]:D},{[i]:[_e,Fe,Ue,Ne,Ke,Ye],endpoint:Qe,[n]:E},{[i]:[Pe,Fe,Ue,U,we,Te,We],endpoint:{url:z,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,Fe,Ue,U,we,$e,We],endpoint:{url:k,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,Fe,Ue,U,we,Te,Ke,qe],[r]:[{[i]:gn,endpoint:et,[n]:E},{endpoint:et,[n]:E}],[n]:D},{[i]:[Pe,Fe,Ue,U,we,$e,Ke,qe],[r]:[{[i]:gn,endpoint:tt,[n]:E},nt],[n]:D},{[i]:[Pe,Fe,Ue,U,we,Te,Ke,Ye],endpoint:et,[n]:E},{[i]:[Pe,Fe,Ue,U,we,$e,Ke,Ye],endpoint:tt,[n]:E},{[i]:[Pe,Fe,he,Ne,We],endpoint:{url:ee,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,Fe,he,Ne,Ke,qe],[r]:[{[i]:gn,endpoint:rt,[n]:E},{endpoint:rt,[n]:E}],[n]:D},{[i]:[Pe,Fe,he,Ne,Ke,Ye],endpoint:rt,[n]:E},{[i]:[Pe,Fe,Ue,Ne,We],endpoint:{url:B,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,Fe,Ue,Ne,Ke,qe],[r]:[{[i]:gn,endpoint:{url:B,[s]:G,[p]:W},[n]:E},{endpoint:it,[n]:E}],[n]:D},{[i]:[Pe,Fe,Ue,Ne,Ke,Ye],endpoint:it,[n]:E}],[n]:D},at],[n]:D}],[n]:D},{[i]:[U,we,{fn:b,[a]:[{fn:x,[a]:[Ee,`scheme`]},`http`]},{fn:O,[a]:[xe,!0]},Ve,Fe,Pe,Ue],[r]:[{[i]:Kt,[r]:[{[i]:hn,[r]:[nt],[n]:D},at],[n]:D}],[n]:D},{[i]:[Ve,{fn:te,[a]:Bt,[o]:V}],[r]:[{[i]:[{fn:x,[a]:[ot,`resourceId[0]`],[o]:ne},{fn:`not`,[a]:[{fn:b,[a]:[st,``]}]}],[r]:[{[i]:[{fn:b,[a]:[ct,re]}],[r]:[{[i]:_n,[r]:[{[i]:vn,[r]:[ut,dt,{[i]:xn,[r]:[ft,{[i]:Sn,[r]:[pt,{[i]:wn,[r]:[{[i]:Kt,[r]:[{[i]:Tn,[r]:[{[i]:En,[r]:[{[i]:[{fn:b,[a]:[ht,``]}],error:`Invalid ARN: Missing account id`,[n]:v},{[i]:Dn,[r]:[{[i]:On,[r]:[{[i]:Ht,endpoint:{url:ae,[s]:gt,[p]:W},[n]:E},{[i]:kn,endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:gt,[p]:W},[n]:E},{endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:gt,[p]:W},[n]:E}],[n]:D},_t],[n]:D},vt],[n]:D},yt],[n]:D},bt],[n]:D}],[n]:D}],[n]:D},xt],[n]:D},{error:`Invalid ARN: bucket ARN is missing a region`,[n]:v}],[n]:D},St],[n]:D},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[n]:v}],[n]:D},{[i]:_n,[r]:[{[i]:vn,[r]:[{[i]:xn,[r]:[{[i]:_n,[r]:[{[i]:xn,[r]:[ft,{[i]:Sn,[r]:[pt,{[i]:wn,[r]:[{[i]:Kt,[r]:[{[i]:[{fn:b,[a]:[mt,`{partitionResult#name}`]}],[r]:[{[i]:En,[r]:[{[i]:[{fn:b,[a]:[ct,`s3`]}],[r]:[{[i]:Dn,[r]:[{[i]:On,[r]:[{[i]:Vt,error:`Access Points do not support S3 Accelerate`,[n]:v},{[i]:qt,endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:Ct,[p]:W},[n]:E},{[i]:Jt,endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:Ct,[p]:W},[n]:E},{[i]:Yt,endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:Ct,[p]:W},[n]:E},{[i]:[Fe,Pe,U,we],endpoint:{url:ae,[s]:Ct,[p]:W},[n]:E},{[i]:Xt,endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:Ct,[p]:W},[n]:E}],[n]:D},_t],[n]:D},vt],[n]:D},{error:`Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}`,[n]:v}],[n]:D},yt],[n]:D},bt],[n]:D}],[n]:D}],[n]:D},xt],[n]:D}],[n]:D}],[n]:D},{[i]:[{fn:I,[a]:[lt,!0]}],[r]:[{[i]:bn,error:`S3 MRAP does not support dual-stack`,[n]:v},{[i]:kn,error:`S3 MRAP does not support FIPS`,[n]:v},{[i]:Vt,error:`S3 MRAP does not support S3 Accelerate`,[n]:v},{[i]:[{fn:g,[a]:[{ref:`DisableMultiRegionAccessPoints`},!0]}],error:`Invalid configuration: Multi-Region Access Point ARNs are disabled.`,[n]:v},{[i]:[{fn:y,[a]:Rt,[o]:oe}],[r]:[{[i]:[{fn:b,[a]:[{fn:x,[a]:[{ref:oe},S]},{fn:x,[a]:[ot,`partition`]}]}],[r]:[{endpoint:{url:`https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}`,[s]:{[l]:[{[u]:!0,name:L,[d]:`s3`,[m]:mn}]},[p]:W},[n]:E}],[n]:D},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[n]:v}],[n]:D}],[n]:D},{error:`Invalid Access Point Name`,[n]:v}],[n]:D},St],[n]:D},{[i]:[{fn:b,[a]:[ct,R]}],[r]:[{[i]:bn,error:`S3 Outposts does not support Dual-stack`,[n]:v},{[i]:kn,error:`S3 Outposts does not support FIPS`,[n]:v},{[i]:Vt,error:`S3 Outposts does not support S3 Accelerate`,[n]:v},{[i]:[{fn:h,[a]:[{fn:x,[a]:[ot,`resourceId[4]`]}]}],error:`Invalid Arn: Outpost Access Point ARN contains sub resources`,[n]:v},{[i]:[{fn:x,[a]:yn,[o]:F}],[r]:[{[i]:fn,[r]:[pt,{[i]:wn,[r]:[{[i]:Kt,[r]:[{[i]:Tn,[r]:[{[i]:En,[r]:[{[i]:Dn,[r]:[{[i]:[{fn:x,[a]:Cn,[o]:se}],[r]:[{[i]:[{fn:x,[a]:[ot,`resourceId[3]`],[o]:ie}],[r]:[{[i]:[{fn:b,[a]:[{ref:se},H]}],[r]:[{[i]:Ht,endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}`,[s]:wt,[p]:W},[n]:E},{endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:wt,[p]:W},[n]:E}],[n]:D},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[n]:v}],[n]:D},{error:`Invalid ARN: expected an access point name`,[n]:v}],[n]:D},{error:`Invalid ARN: Expected a 4-component resource`,[n]:v}],[n]:D},vt],[n]:D},yt],[n]:D},bt],[n]:D}],[n]:D}],[n]:D},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[n]:v}],[n]:D},{error:`Invalid ARN: The Outpost Id was not set`,[n]:v}],[n]:D},{error:`Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})`,[n]:v}],[n]:D},{error:`Invalid ARN: No ARN type specified`,[n]:v}],[n]:D},{[i]:[{fn:C,[a]:[xe,0,4,!1],[o]:ce},{fn:b,[a]:[{ref:ce},`arn:`]},{fn:`not`,[a]:[{fn:h,[a]:[Tt]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[n]:v},{[i]:[{fn:g,[a]:[He,!0]},Tt],error:`Path-style addressing cannot be used with ARN buckets`,[n]:v},{[i]:Wt,[r]:[{[i]:Kt,[r]:[{[i]:[Ue],[r]:[{[i]:[_e,Ne,ge,We],endpoint:{url:`https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Ge,[p]:W},[n]:E},{[i]:[_e,Ne,ge,Ke,qe],[r]:[{endpoint:Et,[n]:E}],[n]:D},{[i]:[_e,Ne,ge,Ke,Ye],endpoint:Et,[n]:E},{[i]:[Pe,Ne,ge,We],endpoint:{url:`https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,Ne,ge,Ke,qe],[r]:[{endpoint:Dt,[n]:E}],[n]:D},{[i]:[Pe,Ne,ge,Ke,Ye],endpoint:Dt,[n]:E},{[i]:[_e,Ne,Fe,We],endpoint:{url:`https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Ge,[p]:W},[n]:E},{[i]:[_e,Ne,Fe,Ke,qe],[r]:[{endpoint:Ot,[n]:E}],[n]:D},{[i]:[_e,Ne,Fe,Ke,Ye],endpoint:Ot,[n]:E},{[i]:[Pe,U,we,Fe,We],endpoint:{url:le,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,U,we,Fe,Ke,qe],[r]:[{[i]:gn,endpoint:kt,[n]:E},{endpoint:kt,[n]:E}],[n]:D},{[i]:[Pe,U,we,Fe,Ke,Ye],endpoint:kt,[n]:E},{[i]:[Pe,Ne,Fe,We],endpoint:{url:ue,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,Ne,Fe,Ke,qe],[r]:[{[i]:gn,endpoint:{url:ue,[s]:G,[p]:W},[n]:E},{endpoint:At,[n]:E}],[n]:D},{[i]:[Pe,Ne,Fe,Ke,Ye],endpoint:At,[n]:E}],[n]:D},{error:`Path-style addressing cannot be used with S3 Accelerate`,[n]:v}],[n]:D}],[n]:D}],[n]:D},{[i]:[{fn:h,[a]:[jt]},{fn:g,[a]:[jt,!0]}],[r]:[{[i]:Kt,[r]:[{[i]:An,[r]:[ut,dt,{[i]:Ht,endpoint:{url:j,[s]:Mt,[p]:W},[n]:E},{[i]:kn,endpoint:{url:`https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}`,[s]:Mt,[p]:W},[n]:E},{endpoint:{url:`https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}`,[s]:Mt,[p]:W},[n]:E}],[n]:D},at],[n]:D}],[n]:D},{[i]:[Le],[r]:[{[i]:Kt,[r]:[{[i]:An,[r]:[{[i]:[ge,_e,Ne,We],endpoint:{url:`https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[ge,_e,Ne,Ke,qe],[r]:[{endpoint:Nt,[n]:E}],[n]:D},{[i]:[ge,_e,Ne,Ke,Ye],endpoint:Nt,[n]:E},{[i]:[ge,Pe,Ne,We],endpoint:{url:`https://s3-fips.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[ge,Pe,Ne,Ke,qe],[r]:[{endpoint:Pt,[n]:E}],[n]:D},{[i]:[ge,Pe,Ne,Ke,Ye],endpoint:Pt,[n]:E},{[i]:[Fe,_e,Ne,We],endpoint:{url:`https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[Fe,_e,Ne,Ke,qe],[r]:[{endpoint:Ft,[n]:E}],[n]:D},{[i]:[Fe,_e,Ne,Ke,Ye],endpoint:Ft,[n]:E},{[i]:[Fe,Pe,U,we,We],endpoint:{url:j,[s]:Ge,[p]:W},[n]:E},{[i]:[Fe,Pe,U,we,Ke,qe],[r]:[{[i]:gn,endpoint:It,[n]:E},{endpoint:It,[n]:E}],[n]:D},{[i]:[Fe,Pe,U,we,Ke,Ye],endpoint:It,[n]:E},{[i]:[Fe,Pe,Ne,We],endpoint:{url:de,[s]:Ge,[p]:W},[n]:E},{[i]:[Fe,Pe,Ne,Ke,qe],[r]:[{[i]:gn,endpoint:{url:de,[s]:G,[p]:W},[n]:E},{endpoint:Lt,[n]:E}],[n]:D},{[i]:[Fe,Pe,Ne,Ke,Ye],endpoint:Lt,[n]:E}],[n]:D},at],[n]:D}],[n]:D}],[n]:D},{error:`A region must be set when sending requests to S3.`,[n]:v}]}})),Rs=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.defaultEndpointResolver=void 0;let t=D(),n=V(),r=Ls(),i=new n.EndpointCache({size:50,params:[`Accelerate`,`Bucket`,`DisableAccessPoints`,`DisableMultiRegionAccessPoints`,`DisableS3ExpressSessionAuth`,`Endpoint`,`ForcePathStyle`,`Region`,`UseArnRegion`,`UseDualStack`,`UseFIPS`,`UseGlobalEndpoint`,`UseObjectLambdaEndpoint`,`UseS3ExpressControlEndpoint`]});e.defaultEndpointResolver=(e,t={})=>i.get(e,()=>(0,n.resolveEndpoint)(r.ruleSet,{endpointParams:e,logger:t.logger})),n.customEndpointFunctions.aws=t.awsEndpointFunctions})),zs=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.resolveHttpAuthSchemeConfig=t.defaultS3HttpAuthSchemeProvider=t.defaultS3HttpAuthSchemeParametersProvider=void 0;let n=(B(),e(R)),r=Is(),i=j(),a=h(),o=Rs();t.defaultS3HttpAuthSchemeParametersProvider=(e=>async(t,n,r)=>{if(!r)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let o=await e(t,n,r),s=(0,a.getSmithyContext)(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!s)throw Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);let c=await(0,i.resolveParams)(r,{getEndpointParameterInstructions:s},t);return Object.assign(o,c)})(async(e,t,n)=>({operation:(0,a.getSmithyContext)(t).operation,region:await(0,a.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}));function s(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`s3`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function c(e){return{schemeId:`aws.auth#sigv4a`,signingProperties:{name:`s3`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}t.defaultS3HttpAuthSchemeProvider=((e,t,n)=>i=>{let a=e(i).properties?.authSchemes;if(!a)return t(i);let o=[];for(let e of a){let{name:t,properties:s={},...c}=e,l=t.toLowerCase();t!==l&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${t}' to '${l}'`);let u;if(l===`sigv4a`){u=`aws.auth#sigv4a`;let e=a.find(e=>{let t=e.name.toLowerCase();return t!==`sigv4a`&&t.startsWith(`sigv4`)});if(r.SignatureV4MultiRegion.sigv4aDependency()===`none`&&e)continue}else if(l.startsWith(`sigv4`))u=`aws.auth#sigv4`;else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${l}'`);let d=n[u];if(!d)throw Error(`Could not find HttpAuthOption create function for '${u}'`);let f=d(i);f.schemeId=u,f.signingProperties={...f.signingProperties||{},...c,...s},o.push(f)}return o})(o.defaultEndpointResolver,e=>{let t=[];switch(e.operation){default:t.push(s(e)),t.push(c(e))}return t},{"aws.auth#sigv4":s,"aws.auth#sigv4a":c}),t.resolveHttpAuthSchemeConfig=e=>{let t=(0,n.resolveAwsSdkSigV4Config)(e),r=(0,n.resolveAwsSdkSigV4AConfig)(t);return Object.assign(r,{authSchemePreference:(0,a.normalizeProvider)(e.authSchemePreference??[])})}})),Bs=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.S3ServiceException=e.__ServiceException=void 0;let t=b();Object.defineProperty(e,`__ServiceException`,{enumerable:!0,get:function(){return t.ServiceException}}),e.S3ServiceException=class e extends t.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),Vs=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ObjectAlreadyInActiveTierError=e.IdempotencyParameterMismatch=e.TooManyParts=e.InvalidWriteOffset=e.InvalidRequest=e.EncryptionTypeMismatch=e.NotFound=e.NoSuchKey=e.InvalidObjectState=e.NoSuchBucket=e.BucketAlreadyOwnedByYou=e.BucketAlreadyExists=e.ObjectNotInActiveTierError=e.AccessDenied=e.NoSuchUpload=void 0;let t=Bs();e.NoSuchUpload=class e extends t.S3ServiceException{name=`NoSuchUpload`;$fault=`client`;constructor(t){super({name:`NoSuchUpload`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.AccessDenied=class e extends t.S3ServiceException{name=`AccessDenied`;$fault=`client`;constructor(t){super({name:`AccessDenied`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.ObjectNotInActiveTierError=class e extends t.S3ServiceException{name=`ObjectNotInActiveTierError`;$fault=`client`;constructor(t){super({name:`ObjectNotInActiveTierError`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.BucketAlreadyExists=class e extends t.S3ServiceException{name=`BucketAlreadyExists`;$fault=`client`;constructor(t){super({name:`BucketAlreadyExists`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.BucketAlreadyOwnedByYou=class e extends t.S3ServiceException{name=`BucketAlreadyOwnedByYou`;$fault=`client`;constructor(t){super({name:`BucketAlreadyOwnedByYou`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.NoSuchBucket=class e extends t.S3ServiceException{name=`NoSuchBucket`;$fault=`client`;constructor(t){super({name:`NoSuchBucket`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.InvalidObjectState=class e extends t.S3ServiceException{name=`InvalidObjectState`;$fault=`client`;StorageClass;AccessTier;constructor(t){super({name:`InvalidObjectState`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}},e.NoSuchKey=class e extends t.S3ServiceException{name=`NoSuchKey`;$fault=`client`;constructor(t){super({name:`NoSuchKey`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.NotFound=class e extends t.S3ServiceException{name=`NotFound`;$fault=`client`;constructor(t){super({name:`NotFound`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.EncryptionTypeMismatch=class e extends t.S3ServiceException{name=`EncryptionTypeMismatch`;$fault=`client`;constructor(t){super({name:`EncryptionTypeMismatch`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.InvalidRequest=class e extends t.S3ServiceException{name=`InvalidRequest`;$fault=`client`;constructor(t){super({name:`InvalidRequest`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.InvalidWriteOffset=class e extends t.S3ServiceException{name=`InvalidWriteOffset`;$fault=`client`;constructor(t){super({name:`InvalidWriteOffset`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.TooManyParts=class e extends t.S3ServiceException{name=`TooManyParts`;$fault=`client`;constructor(t){super({name:`TooManyParts`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.IdempotencyParameterMismatch=class e extends t.S3ServiceException{name=`IdempotencyParameterMismatch`;$fault=`client`;constructor(t){super({name:`IdempotencyParameterMismatch`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.ObjectAlreadyInActiveTierError=class e extends t.S3ServiceException{name=`ObjectAlreadyInActiveTierError`;$fault=`client`;constructor(t){super({name:`ObjectAlreadyInActiveTierError`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}}})),Hs=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.CreateBucketMetadataTableConfigurationRequest$=t.CreateBucketMetadataConfigurationRequest$=t.CreateBucketConfiguration$=t.CORSRule$=t.CORSConfiguration$=t.CopyPartResult$=t.CopyObjectResult$=t.CopyObjectRequest$=t.CopyObjectOutput$=t.ContinuationEvent$=t.Condition$=t.CompleteMultipartUploadRequest$=t.CompleteMultipartUploadOutput$=t.CompletedPart$=t.CompletedMultipartUpload$=t.CommonPrefix$=t.Checksum$=t.BucketLoggingStatus$=t.BucketLifecycleConfiguration$=t.BucketInfo$=t.Bucket$=t.BlockedEncryptionTypes$=t.AnalyticsS3BucketDestination$=t.AnalyticsExportDestination$=t.AnalyticsConfiguration$=t.AnalyticsAndOperator$=t.AccessControlTranslation$=t.AccessControlPolicy$=t.AccelerateConfiguration$=t.AbortMultipartUploadRequest$=t.AbortMultipartUploadOutput$=t.AbortIncompleteMultipartUpload$=t.AbacStatus$=t.errorTypeRegistries=t.TooManyParts$=t.ObjectNotInActiveTierError$=t.ObjectAlreadyInActiveTierError$=t.NotFound$=t.NoSuchUpload$=t.NoSuchKey$=t.NoSuchBucket$=t.InvalidWriteOffset$=t.InvalidRequest$=t.InvalidObjectState$=t.IdempotencyParameterMismatch$=t.EncryptionTypeMismatch$=t.BucketAlreadyOwnedByYou$=t.BucketAlreadyExists$=t.AccessDenied$=t.S3ServiceException$=void 0,t.GetBucketAccelerateConfigurationRequest$=t.GetBucketAccelerateConfigurationOutput$=t.GetBucketAbacRequest$=t.GetBucketAbacOutput$=t.FilterRule$=t.ExistingObjectReplication$=t.EventBridgeConfiguration$=t.ErrorDocument$=t.ErrorDetails$=t._Error$=t.EndEvent$=t.EncryptionConfiguration$=t.Encryption$=t.DestinationResult$=t.Destination$=t.DeletePublicAccessBlockRequest$=t.DeleteObjectTaggingRequest$=t.DeleteObjectTaggingOutput$=t.DeleteObjectsRequest$=t.DeleteObjectsOutput$=t.DeleteObjectRequest$=t.DeleteObjectOutput$=t.DeleteMarkerReplication$=t.DeleteMarkerEntry$=t.DeletedObject$=t.DeleteBucketWebsiteRequest$=t.DeleteBucketTaggingRequest$=t.DeleteBucketRequest$=t.DeleteBucketReplicationRequest$=t.DeleteBucketPolicyRequest$=t.DeleteBucketOwnershipControlsRequest$=t.DeleteBucketMetricsConfigurationRequest$=t.DeleteBucketMetadataTableConfigurationRequest$=t.DeleteBucketMetadataConfigurationRequest$=t.DeleteBucketLifecycleRequest$=t.DeleteBucketInventoryConfigurationRequest$=t.DeleteBucketIntelligentTieringConfigurationRequest$=t.DeleteBucketEncryptionRequest$=t.DeleteBucketCorsRequest$=t.DeleteBucketAnalyticsConfigurationRequest$=t.Delete$=t.DefaultRetention$=t.CSVOutput$=t.CSVInput$=t.CreateSessionRequest$=t.CreateSessionOutput$=t.CreateMultipartUploadRequest$=t.CreateMultipartUploadOutput$=t.CreateBucketRequest$=t.CreateBucketOutput$=void 0,t.GetObjectLegalHoldRequest$=t.GetObjectLegalHoldOutput$=t.GetObjectAttributesRequest$=t.GetObjectAttributesParts$=t.GetObjectAttributesOutput$=t.GetObjectAclRequest$=t.GetObjectAclOutput$=t.GetBucketWebsiteRequest$=t.GetBucketWebsiteOutput$=t.GetBucketVersioningRequest$=t.GetBucketVersioningOutput$=t.GetBucketTaggingRequest$=t.GetBucketTaggingOutput$=t.GetBucketRequestPaymentRequest$=t.GetBucketRequestPaymentOutput$=t.GetBucketReplicationRequest$=t.GetBucketReplicationOutput$=t.GetBucketPolicyStatusRequest$=t.GetBucketPolicyStatusOutput$=t.GetBucketPolicyRequest$=t.GetBucketPolicyOutput$=t.GetBucketOwnershipControlsRequest$=t.GetBucketOwnershipControlsOutput$=t.GetBucketNotificationConfigurationRequest$=t.GetBucketMetricsConfigurationRequest$=t.GetBucketMetricsConfigurationOutput$=t.GetBucketMetadataTableConfigurationResult$=t.GetBucketMetadataTableConfigurationRequest$=t.GetBucketMetadataTableConfigurationOutput$=t.GetBucketMetadataConfigurationResult$=t.GetBucketMetadataConfigurationRequest$=t.GetBucketMetadataConfigurationOutput$=t.GetBucketLoggingRequest$=t.GetBucketLoggingOutput$=t.GetBucketLocationRequest$=t.GetBucketLocationOutput$=t.GetBucketLifecycleConfigurationRequest$=t.GetBucketLifecycleConfigurationOutput$=t.GetBucketInventoryConfigurationRequest$=t.GetBucketInventoryConfigurationOutput$=t.GetBucketIntelligentTieringConfigurationRequest$=t.GetBucketIntelligentTieringConfigurationOutput$=t.GetBucketEncryptionRequest$=t.GetBucketEncryptionOutput$=t.GetBucketCorsRequest$=t.GetBucketCorsOutput$=t.GetBucketAnalyticsConfigurationRequest$=t.GetBucketAnalyticsConfigurationOutput$=t.GetBucketAclRequest$=t.GetBucketAclOutput$=void 0,t.ListBucketInventoryConfigurationsRequest$=t.ListBucketInventoryConfigurationsOutput$=t.ListBucketIntelligentTieringConfigurationsRequest$=t.ListBucketIntelligentTieringConfigurationsOutput$=t.ListBucketAnalyticsConfigurationsRequest$=t.ListBucketAnalyticsConfigurationsOutput$=t.LifecycleRuleFilter$=t.LifecycleRuleAndOperator$=t.LifecycleRule$=t.LifecycleExpiration$=t.LambdaFunctionConfiguration$=t.JSONOutput$=t.JSONInput$=t.JournalTableConfigurationUpdates$=t.JournalTableConfigurationResult$=t.JournalTableConfiguration$=t.InventoryTableConfigurationUpdates$=t.InventoryTableConfigurationResult$=t.InventoryTableConfiguration$=t.InventorySchedule$=t.InventoryS3BucketDestination$=t.InventoryFilter$=t.InventoryEncryption$=t.InventoryDestination$=t.InventoryConfiguration$=t.IntelligentTieringFilter$=t.IntelligentTieringConfiguration$=t.IntelligentTieringAndOperator$=t.InputSerialization$=t.Initiator$=t.IndexDocument$=t.HeadObjectRequest$=t.HeadObjectOutput$=t.HeadBucketRequest$=t.HeadBucketOutput$=t.Grantee$=t.Grant$=t.GlacierJobParameters$=t.GetPublicAccessBlockRequest$=t.GetPublicAccessBlockOutput$=t.GetObjectTorrentRequest$=t.GetObjectTorrentOutput$=t.GetObjectTaggingRequest$=t.GetObjectTaggingOutput$=t.GetObjectRetentionRequest$=t.GetObjectRetentionOutput$=t.GetObjectRequest$=t.GetObjectOutput$=t.GetObjectLockConfigurationRequest$=t.GetObjectLockConfigurationOutput$=void 0,t.Progress$=t.PolicyStatus$=t.PartitionedPrefix$=t.Part$=t.ParquetInput$=t.OwnershipControlsRule$=t.OwnershipControls$=t.Owner$=t.OutputSerialization$=t.OutputLocation$=t.ObjectVersion$=t.ObjectPart$=t.ObjectLockRule$=t.ObjectLockRetention$=t.ObjectLockLegalHold$=t.ObjectLockConfiguration$=t.ObjectIdentifier$=t._Object$=t.NotificationConfigurationFilter$=t.NotificationConfiguration$=t.NoncurrentVersionTransition$=t.NoncurrentVersionExpiration$=t.MultipartUpload$=t.MetricsConfiguration$=t.MetricsAndOperator$=t.Metrics$=t.MetadataTableEncryptionConfiguration$=t.MetadataTableConfigurationResult$=t.MetadataTableConfiguration$=t.MetadataEntry$=t.MetadataConfigurationResult$=t.MetadataConfiguration$=t.LoggingEnabled$=t.LocationInfo$=t.ListPartsRequest$=t.ListPartsOutput$=t.ListObjectVersionsRequest$=t.ListObjectVersionsOutput$=t.ListObjectsV2Request$=t.ListObjectsV2Output$=t.ListObjectsRequest$=t.ListObjectsOutput$=t.ListMultipartUploadsRequest$=t.ListMultipartUploadsOutput$=t.ListDirectoryBucketsRequest$=t.ListDirectoryBucketsOutput$=t.ListBucketsRequest$=t.ListBucketsOutput$=t.ListBucketMetricsConfigurationsRequest$=t.ListBucketMetricsConfigurationsOutput$=void 0,t.RequestPaymentConfiguration$=t.ReplicationTimeValue$=t.ReplicationTime$=t.ReplicationRuleFilter$=t.ReplicationRuleAndOperator$=t.ReplicationRule$=t.ReplicationConfiguration$=t.ReplicaModifications$=t.RenameObjectRequest$=t.RenameObjectOutput$=t.RedirectAllRequestsTo$=t.Redirect$=t.RecordsEvent$=t.RecordExpiration$=t.QueueConfiguration$=t.PutPublicAccessBlockRequest$=t.PutObjectTaggingRequest$=t.PutObjectTaggingOutput$=t.PutObjectRetentionRequest$=t.PutObjectRetentionOutput$=t.PutObjectRequest$=t.PutObjectOutput$=t.PutObjectLockConfigurationRequest$=t.PutObjectLockConfigurationOutput$=t.PutObjectLegalHoldRequest$=t.PutObjectLegalHoldOutput$=t.PutObjectAclRequest$=t.PutObjectAclOutput$=t.PutBucketWebsiteRequest$=t.PutBucketVersioningRequest$=t.PutBucketTaggingRequest$=t.PutBucketRequestPaymentRequest$=t.PutBucketReplicationRequest$=t.PutBucketPolicyRequest$=t.PutBucketOwnershipControlsRequest$=t.PutBucketNotificationConfigurationRequest$=t.PutBucketMetricsConfigurationRequest$=t.PutBucketLoggingRequest$=t.PutBucketLifecycleConfigurationRequest$=t.PutBucketLifecycleConfigurationOutput$=t.PutBucketInventoryConfigurationRequest$=t.PutBucketIntelligentTieringConfigurationRequest$=t.PutBucketEncryptionRequest$=t.PutBucketCorsRequest$=t.PutBucketAnalyticsConfigurationRequest$=t.PutBucketAclRequest$=t.PutBucketAccelerateConfigurationRequest$=t.PutBucketAbacRequest$=t.PublicAccessBlockConfiguration$=t.ProgressEvent$=void 0,t.SelectObjectContentEventStream$=t.ObjectEncryption$=t.MetricsFilter$=t.AnalyticsFilter$=t.WriteGetObjectResponseRequest$=t.WebsiteConfiguration$=t.VersioningConfiguration$=t.UploadPartRequest$=t.UploadPartOutput$=t.UploadPartCopyRequest$=t.UploadPartCopyOutput$=t.UpdateObjectEncryptionResponse$=t.UpdateObjectEncryptionRequest$=t.UpdateBucketMetadataJournalTableConfigurationRequest$=t.UpdateBucketMetadataInventoryTableConfigurationRequest$=t.Transition$=t.TopicConfiguration$=t.Tiering$=t.TargetObjectKeyFormat$=t.TargetGrant$=t.Tagging$=t.Tag$=t.StorageClassAnalysisDataExport$=t.StorageClassAnalysis$=t.StatsEvent$=t.Stats$=t.SSES3$=t.SSEKMSEncryption$=t.SseKmsEncryptedObjects$=t.SSEKMS$=t.SourceSelectionCriteria$=t.SimplePrefix$=t.SessionCredentials$=t.ServerSideEncryptionRule$=t.ServerSideEncryptionConfiguration$=t.ServerSideEncryptionByDefault$=t.SelectParameters$=t.SelectObjectContentRequest$=t.SelectObjectContentOutput$=t.ScanRange$=t.S3TablesDestinationResult$=t.S3TablesDestination$=t.S3Location$=t.S3KeyFilter$=t.RoutingRule$=t.RestoreStatus$=t.RestoreRequest$=t.RestoreObjectRequest$=t.RestoreObjectOutput$=t.RequestProgress$=void 0,t.GetBucketWebsite$=t.GetBucketVersioning$=t.GetBucketTagging$=t.GetBucketRequestPayment$=t.GetBucketReplication$=t.GetBucketPolicyStatus$=t.GetBucketPolicy$=t.GetBucketOwnershipControls$=t.GetBucketNotificationConfiguration$=t.GetBucketMetricsConfiguration$=t.GetBucketMetadataTableConfiguration$=t.GetBucketMetadataConfiguration$=t.GetBucketLogging$=t.GetBucketLocation$=t.GetBucketLifecycleConfiguration$=t.GetBucketInventoryConfiguration$=t.GetBucketIntelligentTieringConfiguration$=t.GetBucketEncryption$=t.GetBucketCors$=t.GetBucketAnalyticsConfiguration$=t.GetBucketAcl$=t.GetBucketAccelerateConfiguration$=t.GetBucketAbac$=t.DeletePublicAccessBlock$=t.DeleteObjectTagging$=t.DeleteObjects$=t.DeleteObject$=t.DeleteBucketWebsite$=t.DeleteBucketTagging$=t.DeleteBucketReplication$=t.DeleteBucketPolicy$=t.DeleteBucketOwnershipControls$=t.DeleteBucketMetricsConfiguration$=t.DeleteBucketMetadataTableConfiguration$=t.DeleteBucketMetadataConfiguration$=t.DeleteBucketLifecycle$=t.DeleteBucketInventoryConfiguration$=t.DeleteBucketIntelligentTieringConfiguration$=t.DeleteBucketEncryption$=t.DeleteBucketCors$=t.DeleteBucketAnalyticsConfiguration$=t.DeleteBucket$=t.CreateSession$=t.CreateMultipartUpload$=t.CreateBucketMetadataTableConfiguration$=t.CreateBucketMetadataConfiguration$=t.CreateBucket$=t.CopyObject$=t.CompleteMultipartUpload$=t.AbortMultipartUpload$=void 0,t.RestoreObject$=t.RenameObject$=t.PutPublicAccessBlock$=t.PutObjectTagging$=t.PutObjectRetention$=t.PutObjectLockConfiguration$=t.PutObjectLegalHold$=t.PutObjectAcl$=t.PutObject$=t.PutBucketWebsite$=t.PutBucketVersioning$=t.PutBucketTagging$=t.PutBucketRequestPayment$=t.PutBucketReplication$=t.PutBucketPolicy$=t.PutBucketOwnershipControls$=t.PutBucketNotificationConfiguration$=t.PutBucketMetricsConfiguration$=t.PutBucketLogging$=t.PutBucketLifecycleConfiguration$=t.PutBucketInventoryConfiguration$=t.PutBucketIntelligentTieringConfiguration$=t.PutBucketEncryption$=t.PutBucketCors$=t.PutBucketAnalyticsConfiguration$=t.PutBucketAcl$=t.PutBucketAccelerateConfiguration$=t.PutBucketAbac$=t.ListParts$=t.ListObjectVersions$=t.ListObjectsV2$=t.ListObjects$=t.ListMultipartUploads$=t.ListDirectoryBuckets$=t.ListBuckets$=t.ListBucketMetricsConfigurations$=t.ListBucketInventoryConfigurations$=t.ListBucketIntelligentTieringConfigurations$=t.ListBucketAnalyticsConfigurations$=t.HeadObject$=t.HeadBucket$=t.GetPublicAccessBlock$=t.GetObjectTorrent$=t.GetObjectTagging$=t.GetObjectRetention$=t.GetObjectLockConfiguration$=t.GetObjectLegalHold$=t.GetObjectAttributes$=t.GetObjectAcl$=t.GetObject$=void 0,t.WriteGetObjectResponse$=t.UploadPartCopy$=t.UploadPart$=t.UpdateObjectEncryption$=t.UpdateBucketMetadataJournalTableConfiguration$=t.UpdateBucketMetadataInventoryTableConfiguration$=t.SelectObjectContent$=void 0;let n=`AccelerateConfiguration`,r=`AccessControlList`,i=`AnalyticsConfigurationList`,a=`AccessControlPolicy`,o=`AccessControlTranslation`,s=`AnalyticsConfiguration`,c=`AbortDate`,l=`AbortIncompleteMultipartUpload`,u=`AccessKeyId`,f=`AccessPointArn`,p=`AcceptRanges`,m=`AbortRuleId`,h=`AbacStatus`,g=`AccessTier`,v=`Bucket`,b=`BucketArn`,x=`BlockedEncryptionTypes`,S=`BypassGovernanceRetention`,C=`BucketKeyEnabled`,w=`BucketLoggingStatus`,T=`BytesProcessed`,E=`BlockPublicAcls`,D=`BlockPublicPolicy`,O=`BucketRegion`,k=`BytesReturned`,A=`BytesScanned`,j=`Body`,M=`Buckets`,N=`Checksum`,P=`ChecksumAlgorithm`,F=`CreateBucketConfiguration`,I=`CacheControl`,L=`ChecksumCRC32`,R=`ChecksumCRC32C`,z=`ChecksumCRC64NVME`,ee=`Cache-Control`,B=`Content-Disposition`,te=`ContentDisposition`,V=`Content-Encoding`,ne=`ContentEncoding`,re=`ContentLanguage`,H=`Content-Language`,ie=`Content-Length`,ae=`ContentLength`,oe=`Content-MD5`,se=`ContentMD5`,ce=`CompleteMultipartUpload`,le=`ChecksumMode`,ue=`CopyObjectResult`,de=`CORSConfiguration`,fe=`CORSRules`,pe=`CORSRule`,me=`CopyPartResult`,he=`CommonPrefixes`,ge=`ContentRange`,_e=`Content-Range`,U=`CopySource`,ve=`ChecksumSHA1`,ye=`ChecksumSHA256`,be=`CopySourceIfMatch`,xe=`CopySourceIfModifiedSince`,Se=`CopySourceIfNoneMatch`,Ce=`CopySourceIfUnmodifiedSince`,we=`CopySourceSSECustomerAlgorithm`,Te=`CopySourceSSECustomerKey`,Ee=`CopySourceSSECustomerKeyMD5`,De=`CopySourceVersionId`,Oe=`ConfigurationState`,W=`ChecksumType`,ke=`Content-Type`,Ae=`ContentType`,je=`ContinuationToken`,Me=`Condition`,Ne=`Contents`,Pe=`Credentials`,Fe=`Days`,Ie=`DeleteMarker`,Le=`DeleteMarkerReplication`,Re=`DeleteMarkers`,ze=`DisplayName`,Be=`DefaultRetention`,Ve=`DestinationResult`,He=`Date`,Ue=`Delete`,We=`Delimiter`,Ge=`Destination`,Ke=`Details`,qe=`Expiration`,Je=`EventBridgeConfiguration`,G=`ExpectedBucketOwner`,Ye=`EncryptionConfiguration`,Xe=`ErrorCode`,Ze=`ErrorDocument`,Qe=`ErrorMessage`,$e=`ExistingObjectReplication`,et=`ExpiresString`,tt=`ExpectedSourceBucketOwner`,nt=`EncryptionType`,rt=`ETag`,it=`EncodingType`,at=`ExpressionType`,ot=`Encryption`,st=`Errors`,ct=`Error`,lt=`Events`,ut=`Event`,dt=`Expires`,ft=`Expression`,pt=`Filter`,mt=`FieldDelimiter`,ht=`FilterRule`,gt=`Format`,_t=`Grants`,vt=`GetBucketMetadataConfigurationResult`,yt=`GetBucketMetadataTableConfigurationResult`,bt=`GrantFullControl`,xt=`GlacierJobParameters`,St=`GrantRead`,Ct=`GrantReadACP`,wt=`GrantWrite`,Tt=`GrantWriteACP`,Et=`Grant`,Dt=`Grantee`,Ot=`HostName`,kt=`InventoryConfiguration`,At=`InventoryConfigurationList`,jt=`IndexDocument`,Mt=`IsLatest`,Nt=`IfMatch`,Pt=`If-Modified-Since`,Ft=`IfModifiedSince`,It=`If-Match`,Lt=`IfNoneMatch`,Rt=`If-None-Match`,zt=`IsPublic`,Bt=`IgnorePublicAcls`,Vt=`InputSerialization`,Ht=`IsTruncated`,Ut=`IntelligentTieringConfiguration`,Wt=`IntelligentTieringConfigurationList`,Gt=`InventoryTableConfigurationResult`,Kt=`InventoryTableConfiguration`,qt=`IfUnmodifiedSince`,Jt=`If-Unmodified-Since`,Yt=`Initiator`,Xt=`JSON`,Zt=`JournalTableConfiguration`,Qt=`JournalTableConfigurationResult`,$t=`KeyMarker`,en=`Location`,tn=`ListBucketResult`,nn=`LocationConstraint`,rn=`LifecycleConfiguration`,an=`LoggingEnabled`,on=`LegalHold`,sn=`LastModified`,cn=`Last-Modified`,ln=`Metadata`,un=`MetadataConfiguration`,dn=`MetricsConfigurationList`,fn=`MetadataConfigurationResult`,pn=`MetricsConfiguration`,mn=`MfaDelete`,hn=`MetadataEntry`,gn=`MFADelete`,_n=`MaxKeys`,vn=`MissingMeta`,yn=`MaxParts`,bn=`MetadataTableConfiguration`,xn=`MetadataTableConfigurationResult`,Sn=`MultipartUpload`,Cn=`MaxUploads`,wn=`Marker`,Tn=`Metrics`,En=`Mode`,Dn=`Name`,On=`NotificationConfiguration`,kn=`NextContinuationToken`,An=`NoncurrentDays`,jn=`NextKeyMarker`,Mn=`NewerNoncurrentVersions`,Nn=`NextPartNumberMarker`,Pn=`NoncurrentVersionExpiration`,Fn=`NoncurrentVersionTransition`,In=`Owner`,Ln=`OwnershipControls`,Rn=`ObjectEncryption`,zn=`OutputLocation`,Bn=`ObjectLockConfiguration`,Vn=`ObjectLockLegalHoldStatus`,Hn=`ObjectLockMode`,Un=`ObjectLockRetainUntilDate`,Wn=`ObjectOwnership`,Gn=`OptionalObjectAttributes`,Kn=`ObjectSizeGreaterThan`,qn=`ObjectSizeLessThan`,Jn=`OutputSerialization`,Yn=`Object`,Xn=`Prefix`,Zn=`PublicAccessBlockConfiguration`,Qn=`PartsCount`,$n=`PartNumber`,er=`PartNumberMarker`,tr=`PartitionedPrefix`,nr=`PolicyStatus`,rr=`Parts`,ir=`Part`,ar=`Payer`,or=`Payload`,sr=`Permission`,cr=`Policy`,lr=`Progress`,ur=`Protocol`,dr=`QuoteCharacter`,fr=`QueueConfiguration`,pr=`QuoteEscapeCharacter`,mr=`Rules`,hr=`RedirectAllRequestsTo`,gr=`RequestCharged`,_r=`ResponseCacheControl`,vr=`ResponseContentDisposition`,yr=`ResponseContentEncoding`,br=`ResponseContentLanguage`,xr=`ResponseContentType`,Sr=`ReplicationConfiguration`,Cr=`RecordDelimiter`,wr=`ResponseExpires`,Tr=`RecordExpiration`,Er=`ReplicaModifications`,Dr=`RequestPayer`,Or=`RestrictPublicBuckets`,kr=`RequestPaymentConfiguration`,Ar=`RequestProgress`,jr=`RoutingRules`,Mr=`RestoreRequest`,Nr=`RoutingRule`,Pr=`ReplicationStatus`,Fr=`RestoreStatus`,Ir=`ReplicationTime`,Lr=`Range`,Rr=`Restore`,zr=`Redirect`,Br=`Retention`,Vr=`Rule`,Hr=`Status`,Ur=`StartAfter`,Wr=`SecretAccessKey`,Gr=`S3BucketDestination`,Kr=`StorageClass`,qr=`StorageClassAnalysis`,Jr=`SSE-KMS`,Yr=`SseKmsEncryptedObjects`,Xr=`SelectParameters`,Zr=`SimplePrefix`,Qr=`ScanRange`,$r=`SSE-S3`,ei=`SourceSelectionCriteria`,ti=`ServerSideEncryption`,ni=`ServerSideEncryptionConfiguration`,ri=`SSECustomerAlgorithm`,ii=`SSECustomerKey`,ai=`SSECustomerKeyMD5`,oi=`SSEKMS`,si=`SSEKMSEncryptionContext`,ci=`SSEKMSKeyId`,li=`SSES3`,ui=`SessionToken`,di=`S3TablesDestination`,fi=`S3TablesDestinationResult`,pi=`Size`,mi=`Stats`,hi=`Tags`,K=`TableArn`,gi=`TableBucketArn`,_i=`TagCount`,vi=`TopicConfiguration`,yi=`TransitionDefaultMinimumObjectSize`,bi=`TargetGrants`,xi=`TableNamespace`,Si=`TableName`,Ci=`TargetObjectKeyFormat`,wi=`TagSet`,Ti=`TableStatus`,Ei=`Tagging`,Di=`Tier`,Oi=`Tiering`,ki=`Token`,Ai=`Transition`,ji=`Type`,Mi=`UploadId`,Ni=`UploadIdMarker`,Pi=`UserMetadata`,Fi=`Value`,Ii=`VersioningConfiguration`,Li=`VersionId`,Ri=`VersionIdMarker`,zi=`WebsiteConfiguration`,Bi=`WebsiteRedirectLocation`,Vi=`accept-ranges`,Hi=`client`,Ui=`continuation-token`,Wi=`delimiter`,Gi=`error`,Ki=`eventPayload`,qi=`encoding-type`,q=`http`,Ji=`httpChecksum`,Yi=`httpError`,J=`httpHeader`,Xi=`httpPayload`,Zi=`httpPrefixHeaders`,Y=`httpQuery`,Qi=`http://www.w3.org/2001/XMLSchema-instance`,$i=`key-marker`,ea=`max-keys`,ta=`prefix`,na=`partNumber`,ra=`response-cache-control`,ia=`response-content-disposition`,aa=`response-content-encoding`,oa=`response-content-language`,sa=`response-content-type`,ca=`response-expires`,la=`smithy.ts.sdk.synthetic.com.amazonaws.s3`,ua=`streaming`,da=`uploadId`,fa=`versionId`,pa=`xmlFlattened`,X=`xmlName`,ma=`xmlNamespace`,ha=`x-amz-acl`,ga=`x-amz-abort-date`,_a=`x-amz-abort-rule-id`,va=`x-amz-bucket-arn`,ya=`x-amz-bypass-governance-retention`,ba=`x-amz-bucket-object-lock-token`,xa=`x-amz-checksum-algorithm`,Sa=`x-amz-checksum-crc32`,Ca=`x-amz-checksum-crc32c`,wa=`x-amz-checksum-crc64nvme`,Ta=`x-amz-checksum-mode`,Ea=`x-amz-checksum-sha1`,Da=`x-amz-checksum-sha256`,Oa=`x-amz-copy-source`,ka=`x-amz-copy-source-if-match`,Aa=`x-amz-copy-source-if-modified-since`,ja=`x-amz-copy-source-if-none-match`,Ma=`x-amz-copy-source-if-unmodified-since`,Na=`x-amz-copy-source-server-side-encryption-customer-algorithm`,Pa=`x-amz-copy-source-server-side-encryption-customer-key`,Fa=`x-amz-copy-source-server-side-encryption-customer-key-MD5`,Ia=`x-amz-copy-source-version-id`,La=`x-amz-checksum-type`,Ra=`x-amz-delete-marker`,za=`x-amz-expiration`,Z=`x-amz-expected-bucket-owner`,Ba=`x-amz-grant-full-control`,Va=`x-amz-grant-read`,Ha=`x-amz-grant-read-acp`,Ua=`x-amz-grant-write`,Wa=`x-amz-grant-write-acp`,Ga=`x-amz-meta-`,Ka=`x-amz-mfa`,qa=`x-amz-missing-meta`,Ja=`x-amz-mp-parts-count`,Ya=`x-amz-object-lock-legal-hold`,Xa=`x-amz-object-lock-mode`,Za=`x-amz-object-lock-retain-until-date`,Qa=`x-amz-optional-object-attributes`,$a=`x-amz-restore`,eo=`x-amz-request-charged`,to=`x-amz-request-payer`,no=`x-amz-replication-status`,ro=`x-amz-storage-class`,io=`x-amz-sdk-checksum-algorithm`,ao=`x-amz-source-expected-bucket-owner`,oo=`x-amz-server-side-encryption`,so=`x-amz-server-side-encryption-aws-kms-key-id`,co=`x-amz-server-side-encryption-bucket-key-enabled`,lo=`x-amz-server-side-encryption-context`,uo=`x-amz-server-side-encryption-customer-algorithm`,fo=`x-amz-server-side-encryption-customer-key`,po=`x-amz-server-side-encryption-customer-key-MD5`,mo=`x-amz-tagging`,ho=`x-amz-tagging-count`,go=`x-amz-transition-default-minimum-object-size`,_o=`x-amz-version-id`,vo=`x-amz-website-redirect-location`,Q=`com.amazonaws.s3`,yo=(y(),e(d)),bo=Vs(),xo=Bs(),So=yo.TypeRegistry.for(la);t.S3ServiceException$=[-3,la,`S3ServiceException`,0,[],[]],So.registerError(t.S3ServiceException$,xo.S3ServiceException);let Co=yo.TypeRegistry.for(Q);t.AccessDenied$=[-3,Q,`AccessDenied`,{[Gi]:Hi,[Yi]:403},[],[]],Co.registerError(t.AccessDenied$,bo.AccessDenied),t.BucketAlreadyExists$=[-3,Q,`BucketAlreadyExists`,{[Gi]:Hi,[Yi]:409},[],[]],Co.registerError(t.BucketAlreadyExists$,bo.BucketAlreadyExists),t.BucketAlreadyOwnedByYou$=[-3,Q,`BucketAlreadyOwnedByYou`,{[Gi]:Hi,[Yi]:409},[],[]],Co.registerError(t.BucketAlreadyOwnedByYou$,bo.BucketAlreadyOwnedByYou),t.EncryptionTypeMismatch$=[-3,Q,`EncryptionTypeMismatch`,{[Gi]:Hi,[Yi]:400},[],[]],Co.registerError(t.EncryptionTypeMismatch$,bo.EncryptionTypeMismatch),t.IdempotencyParameterMismatch$=[-3,Q,`IdempotencyParameterMismatch`,{[Gi]:Hi,[Yi]:400},[],[]],Co.registerError(t.IdempotencyParameterMismatch$,bo.IdempotencyParameterMismatch),t.InvalidObjectState$=[-3,Q,`InvalidObjectState`,{[Gi]:Hi,[Yi]:403},[Kr,g],[0,0]],Co.registerError(t.InvalidObjectState$,bo.InvalidObjectState),t.InvalidRequest$=[-3,Q,`InvalidRequest`,{[Gi]:Hi,[Yi]:400},[],[]],Co.registerError(t.InvalidRequest$,bo.InvalidRequest),t.InvalidWriteOffset$=[-3,Q,`InvalidWriteOffset`,{[Gi]:Hi,[Yi]:400},[],[]],Co.registerError(t.InvalidWriteOffset$,bo.InvalidWriteOffset),t.NoSuchBucket$=[-3,Q,`NoSuchBucket`,{[Gi]:Hi,[Yi]:404},[],[]],Co.registerError(t.NoSuchBucket$,bo.NoSuchBucket),t.NoSuchKey$=[-3,Q,`NoSuchKey`,{[Gi]:Hi,[Yi]:404},[],[]],Co.registerError(t.NoSuchKey$,bo.NoSuchKey),t.NoSuchUpload$=[-3,Q,`NoSuchUpload`,{[Gi]:Hi,[Yi]:404},[],[]],Co.registerError(t.NoSuchUpload$,bo.NoSuchUpload),t.NotFound$=[-3,Q,`NotFound`,{[Gi]:Hi},[],[]],Co.registerError(t.NotFound$,bo.NotFound),t.ObjectAlreadyInActiveTierError$=[-3,Q,`ObjectAlreadyInActiveTierError`,{[Gi]:Hi,[Yi]:403},[],[]],Co.registerError(t.ObjectAlreadyInActiveTierError$,bo.ObjectAlreadyInActiveTierError),t.ObjectNotInActiveTierError$=[-3,Q,`ObjectNotInActiveTierError`,{[Gi]:Hi,[Yi]:403},[],[]],Co.registerError(t.ObjectNotInActiveTierError$,bo.ObjectNotInActiveTierError),t.TooManyParts$=[-3,Q,`TooManyParts`,{[Gi]:Hi,[Yi]:400},[],[]],Co.registerError(t.TooManyParts$,bo.TooManyParts),t.errorTypeRegistries=[So,Co];var wo=[0,Q,Te,8,0],To=[0,Q,`NonEmptyKmsKeyArnString`,8,0],Eo=[0,Q,`SessionCredentialValue`,8,0],Do=[0,Q,ii,8,0],Oo=[0,Q,si,8,0],ko=[0,Q,ci,8,0],Ao=[0,Q,`StreamingBlob`,{[ua]:1},42];t.AbacStatus$=[3,Q,h,0,[Hr],[0]],t.AbortIncompleteMultipartUpload$=[3,Q,l,0,[`DaysAfterInitiation`],[1]],t.AbortMultipartUploadOutput$=[3,Q,`AbortMultipartUploadOutput`,0,[gr],[[0,{[J]:eo}]]],t.AbortMultipartUploadRequest$=[3,Q,`AbortMultipartUploadRequest`,0,[v,`Key`,Mi,Dr,G,`IfMatchInitiatedTime`],[[0,1],[0,1],[0,{[Y]:da}],[0,{[J]:to}],[0,{[J]:Z}],[6,{[J]:`x-amz-if-match-initiated-time`}]],3],t.AccelerateConfiguration$=[3,Q,n,0,[Hr],[0]],t.AccessControlPolicy$=[3,Q,a,0,[_t,In],[[()=>Ho,{[X]:r}],()=>t.Owner$]],t.AccessControlTranslation$=[3,Q,o,0,[In],[0],1],t.AnalyticsAndOperator$=[3,Q,`AnalyticsAndOperator`,0,[Xn,hi],[0,[()=>ss,{[pa]:1,[X]:`Tag`}]]],t.AnalyticsConfiguration$=[3,Q,s,0,[`Id`,qr,pt],[0,()=>t.StorageClassAnalysis$,[()=>t.AnalyticsFilter$,0]],2],t.AnalyticsExportDestination$=[3,Q,`AnalyticsExportDestination`,0,[Gr],[()=>t.AnalyticsS3BucketDestination$],1],t.AnalyticsS3BucketDestination$=[3,Q,`AnalyticsS3BucketDestination`,0,[gt,v,`BucketAccountId`,Xn],[0,0,0,0],2],t.BlockedEncryptionTypes$=[3,Q,x,0,[nt],[[()=>zo,{[pa]:1}]]],t.Bucket$=[3,Q,v,0,[Dn,`CreationDate`,O,b],[0,4,0,0]],t.BucketInfo$=[3,Q,`BucketInfo`,0,[`DataRedundancy`,ji],[0,0]],t.BucketLifecycleConfiguration$=[3,Q,`BucketLifecycleConfiguration`,0,[mr],[[()=>qo,{[pa]:1,[X]:Vr}]],1],t.BucketLoggingStatus$=[3,Q,w,0,[an],[[()=>t.LoggingEnabled$,0]]],t.Checksum$=[3,Q,N,0,[L,R,z,ve,ye,W],[0,0,0,0,0,0]],t.CommonPrefix$=[3,Q,`CommonPrefix`,0,[Xn],[0]],t.CompletedMultipartUpload$=[3,Q,`CompletedMultipartUpload`,0,[rr],[[()=>Fo,{[pa]:1,[X]:ir}]]],t.CompletedPart$=[3,Q,`CompletedPart`,0,[rt,L,R,z,ve,ye,$n],[0,0,0,0,0,0,1]],t.CompleteMultipartUploadOutput$=[3,Q,`CompleteMultipartUploadOutput`,{[X]:`CompleteMultipartUploadResult`},[en,v,`Key`,qe,rt,L,R,z,ve,ye,W,ti,Li,ci,C,gr],[0,0,0,[0,{[J]:za}],0,0,0,0,0,0,0,[0,{[J]:oo}],[0,{[J]:_o}],[()=>ko,{[J]:so}],[2,{[J]:co}],[0,{[J]:eo}]]],t.CompleteMultipartUploadRequest$=[3,Q,`CompleteMultipartUploadRequest`,0,[v,`Key`,Mi,Sn,L,R,z,ve,ye,W,`MpuObjectSize`,Dr,G,Nt,Lt,ri,ii,ai],[[0,1],[0,1],[0,{[Y]:da}],[()=>t.CompletedMultipartUpload$,{[Xi]:1,[X]:ce}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[0,{[J]:La}],[1,{[J]:`x-amz-mp-object-size`}],[0,{[J]:to}],[0,{[J]:Z}],[0,{[J]:It}],[0,{[J]:Rt}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}]],3],t.Condition$=[3,Q,Me,0,[`HttpErrorCodeReturnedEquals`,`KeyPrefixEquals`],[0,0]],t.ContinuationEvent$=[3,Q,`ContinuationEvent`,0,[],[]],t.CopyObjectOutput$=[3,Q,`CopyObjectOutput`,0,[ue,qe,De,Li,ti,ri,ai,ci,si,C,gr],[[()=>t.CopyObjectResult$,16],[0,{[J]:za}],[0,{[J]:Ia}],[0,{[J]:_o}],[0,{[J]:oo}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}],[0,{[J]:eo}]]],t.CopyObjectRequest$=[3,Q,`CopyObjectRequest`,0,[v,U,`Key`,`ACL`,I,P,te,ne,re,Ae,be,xe,Se,Ce,dt,bt,St,Ct,Tt,Nt,Lt,ln,`MetadataDirective`,`TaggingDirective`,ti,Kr,Bi,ri,ii,ai,ci,si,C,we,Te,Ee,Dr,Ei,Hn,Un,Vn,G,tt],[[0,1],[0,{[J]:Oa}],[0,1],[0,{[J]:ha}],[0,{[J]:ee}],[0,{[J]:xa}],[0,{[J]:B}],[0,{[J]:V}],[0,{[J]:H}],[0,{[J]:ke}],[0,{[J]:ka}],[4,{[J]:Aa}],[0,{[J]:ja}],[4,{[J]:Ma}],[4,{[J]:dt}],[0,{[J]:Ba}],[0,{[J]:Va}],[0,{[J]:Ha}],[0,{[J]:Wa}],[0,{[J]:It}],[0,{[J]:Rt}],[128,{[Zi]:Ga}],[0,{[J]:`x-amz-metadata-directive`}],[0,{[J]:`x-amz-tagging-directive`}],[0,{[J]:oo}],[0,{[J]:ro}],[0,{[J]:vo}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}],[0,{[J]:Na}],[()=>wo,{[J]:Pa}],[0,{[J]:Fa}],[0,{[J]:to}],[0,{[J]:mo}],[0,{[J]:Xa}],[5,{[J]:Za}],[0,{[J]:Ya}],[0,{[J]:Z}],[0,{[J]:ao}]],3],t.CopyObjectResult$=[3,Q,ue,0,[rt,sn,W,L,R,z,ve,ye],[0,4,0,0,0,0,0,0]],t.CopyPartResult$=[3,Q,me,0,[rt,sn,L,R,z,ve,ye],[0,4,0,0,0,0,0]],t.CORSConfiguration$=[3,Q,de,0,[fe],[[()=>Io,{[pa]:1,[X]:pe}]],1],t.CORSRule$=[3,Q,pe,0,[`AllowedMethods`,`AllowedOrigins`,`ID`,`AllowedHeaders`,`ExposeHeaders`,`MaxAgeSeconds`],[[64,{[pa]:1,[X]:`AllowedMethod`}],[64,{[pa]:1,[X]:`AllowedOrigin`}],0,[64,{[pa]:1,[X]:`AllowedHeader`}],[64,{[pa]:1,[X]:`ExposeHeader`}],1],2],t.CreateBucketConfiguration$=[3,Q,F,0,[nn,en,v,hi],[0,()=>t.LocationInfo$,()=>t.BucketInfo$,[()=>ss,0]]],t.CreateBucketMetadataConfigurationRequest$=[3,Q,`CreateBucketMetadataConfigurationRequest`,0,[v,un,se,P,G],[[0,1],[()=>t.MetadataConfiguration$,{[Xi]:1,[X]:un}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.CreateBucketMetadataTableConfigurationRequest$=[3,Q,`CreateBucketMetadataTableConfigurationRequest`,0,[v,bn,se,P,G],[[0,1],[()=>t.MetadataTableConfiguration$,{[Xi]:1,[X]:bn}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.CreateBucketOutput$=[3,Q,`CreateBucketOutput`,0,[en,b],[[0,{[J]:en}],[0,{[J]:va}]]],t.CreateBucketRequest$=[3,Q,`CreateBucketRequest`,0,[v,`ACL`,F,bt,St,Ct,wt,Tt,`ObjectLockEnabledForBucket`,Wn,`BucketNamespace`],[[0,1],[0,{[J]:ha}],[()=>t.CreateBucketConfiguration$,{[Xi]:1,[X]:F}],[0,{[J]:Ba}],[0,{[J]:Va}],[0,{[J]:Ha}],[0,{[J]:Ua}],[0,{[J]:Wa}],[2,{[J]:`x-amz-bucket-object-lock-enabled`}],[0,{[J]:`x-amz-object-ownership`}],[0,{[J]:`x-amz-bucket-namespace`}]],1],t.CreateMultipartUploadOutput$=[3,Q,`CreateMultipartUploadOutput`,{[X]:`InitiateMultipartUploadResult`},[c,m,v,`Key`,Mi,ti,ri,ai,ci,si,C,gr,P,W],[[4,{[J]:ga}],[0,{[J]:_a}],[0,{[X]:v}],0,0,[0,{[J]:oo}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}],[0,{[J]:eo}],[0,{[J]:xa}],[0,{[J]:La}]]],t.CreateMultipartUploadRequest$=[3,Q,`CreateMultipartUploadRequest`,0,[v,`Key`,`ACL`,I,te,ne,re,Ae,dt,bt,St,Ct,Tt,ln,ti,Kr,Bi,ri,ii,ai,ci,si,C,Dr,Ei,Hn,Un,Vn,G,P,W],[[0,1],[0,1],[0,{[J]:ha}],[0,{[J]:ee}],[0,{[J]:B}],[0,{[J]:V}],[0,{[J]:H}],[0,{[J]:ke}],[4,{[J]:dt}],[0,{[J]:Ba}],[0,{[J]:Va}],[0,{[J]:Ha}],[0,{[J]:Wa}],[128,{[Zi]:Ga}],[0,{[J]:oo}],[0,{[J]:ro}],[0,{[J]:vo}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}],[0,{[J]:to}],[0,{[J]:mo}],[0,{[J]:Xa}],[5,{[J]:Za}],[0,{[J]:Ya}],[0,{[J]:Z}],[0,{[J]:xa}],[0,{[J]:La}]],2],t.CreateSessionOutput$=[3,Q,`CreateSessionOutput`,{[X]:`CreateSessionResult`},[Pe,ti,ci,si,C],[[()=>t.SessionCredentials$,{[X]:Pe}],[0,{[J]:oo}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}]],1],t.CreateSessionRequest$=[3,Q,`CreateSessionRequest`,0,[v,`SessionMode`,ti,ci,si,C],[[0,1],[0,{[J]:`x-amz-create-session-mode`}],[0,{[J]:oo}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}]],1],t.CSVInput$=[3,Q,`CSVInput`,0,[`FileHeaderInfo`,`Comments`,pr,Cr,mt,dr,`AllowQuotedRecordDelimiter`],[0,0,0,0,0,0,2]],t.CSVOutput$=[3,Q,`CSVOutput`,0,[`QuoteFields`,pr,Cr,mt,dr],[0,0,0,0,0]],t.DefaultRetention$=[3,Q,Be,0,[En,Fe,`Years`],[0,1,1]],t.Delete$=[3,Q,Ue,0,[`Objects`,`Quiet`],[[()=>Zo,{[pa]:1,[X]:Yn}],2],1],t.DeleteBucketAnalyticsConfigurationRequest$=[3,Q,`DeleteBucketAnalyticsConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.DeleteBucketCorsRequest$=[3,Q,`DeleteBucketCorsRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketEncryptionRequest$=[3,Q,`DeleteBucketEncryptionRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketIntelligentTieringConfigurationRequest$=[3,Q,`DeleteBucketIntelligentTieringConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.DeleteBucketInventoryConfigurationRequest$=[3,Q,`DeleteBucketInventoryConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.DeleteBucketLifecycleRequest$=[3,Q,`DeleteBucketLifecycleRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketMetadataConfigurationRequest$=[3,Q,`DeleteBucketMetadataConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketMetadataTableConfigurationRequest$=[3,Q,`DeleteBucketMetadataTableConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketMetricsConfigurationRequest$=[3,Q,`DeleteBucketMetricsConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.DeleteBucketOwnershipControlsRequest$=[3,Q,`DeleteBucketOwnershipControlsRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketPolicyRequest$=[3,Q,`DeleteBucketPolicyRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketReplicationRequest$=[3,Q,`DeleteBucketReplicationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketRequest$=[3,Q,`DeleteBucketRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketTaggingRequest$=[3,Q,`DeleteBucketTaggingRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketWebsiteRequest$=[3,Q,`DeleteBucketWebsiteRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeletedObject$=[3,Q,`DeletedObject`,0,[`Key`,Li,Ie,`DeleteMarkerVersionId`],[0,0,2,0]],t.DeleteMarkerEntry$=[3,Q,`DeleteMarkerEntry`,0,[In,`Key`,Li,Mt,sn],[()=>t.Owner$,0,0,2,4]],t.DeleteMarkerReplication$=[3,Q,Le,0,[Hr],[0]],t.DeleteObjectOutput$=[3,Q,`DeleteObjectOutput`,0,[Ie,Li,gr],[[2,{[J]:Ra}],[0,{[J]:_o}],[0,{[J]:eo}]]],t.DeleteObjectRequest$=[3,Q,`DeleteObjectRequest`,0,[v,`Key`,`MFA`,Li,Dr,S,G,Nt,`IfMatchLastModifiedTime`,`IfMatchSize`],[[0,1],[0,1],[0,{[J]:Ka}],[0,{[Y]:fa}],[0,{[J]:to}],[2,{[J]:ya}],[0,{[J]:Z}],[0,{[J]:It}],[6,{[J]:`x-amz-if-match-last-modified-time`}],[1,{[J]:`x-amz-if-match-size`}]],2],t.DeleteObjectsOutput$=[3,Q,`DeleteObjectsOutput`,{[X]:`DeleteResult`},[`Deleted`,gr,st],[[()=>Lo,{[pa]:1}],[0,{[J]:eo}],[()=>Bo,{[pa]:1,[X]:ct}]]],t.DeleteObjectsRequest$=[3,Q,`DeleteObjectsRequest`,0,[v,Ue,`MFA`,Dr,S,G,P],[[0,1],[()=>t.Delete$,{[Xi]:1,[X]:Ue}],[0,{[J]:Ka}],[0,{[J]:to}],[2,{[J]:ya}],[0,{[J]:Z}],[0,{[J]:io}]],2],t.DeleteObjectTaggingOutput$=[3,Q,`DeleteObjectTaggingOutput`,0,[Li],[[0,{[J]:_o}]]],t.DeleteObjectTaggingRequest$=[3,Q,`DeleteObjectTaggingRequest`,0,[v,`Key`,Li,G],[[0,1],[0,1],[0,{[Y]:fa}],[0,{[J]:Z}]],2],t.DeletePublicAccessBlockRequest$=[3,Q,`DeletePublicAccessBlockRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.Destination$=[3,Q,Ge,0,[v,`Account`,Kr,o,Ye,Ir,Tn],[0,0,0,()=>t.AccessControlTranslation$,()=>t.EncryptionConfiguration$,()=>t.ReplicationTime$,()=>t.Metrics$],1],t.DestinationResult$=[3,Q,Ve,0,[`TableBucketType`,gi,xi],[0,0,0]],t.Encryption$=[3,Q,ot,0,[nt,`KMSKeyId`,`KMSContext`],[0,[()=>ko,0],0],1],t.EncryptionConfiguration$=[3,Q,Ye,0,[`ReplicaKmsKeyID`],[0]],t.EndEvent$=[3,Q,`EndEvent`,0,[],[]],t._Error$=[3,Q,ct,0,[`Key`,Li,`Code`,`Message`],[0,0,0,0]],t.ErrorDetails$=[3,Q,`ErrorDetails`,0,[Xe,Qe],[0,0]],t.ErrorDocument$=[3,Q,Ze,0,[`Key`],[0],1],t.EventBridgeConfiguration$=[3,Q,Je,0,[],[]],t.ExistingObjectReplication$=[3,Q,$e,0,[Hr],[0],1],t.FilterRule$=[3,Q,ht,0,[Dn,Fi],[0,0]],t.GetBucketAbacOutput$=[3,Q,`GetBucketAbacOutput`,0,[h],[[()=>t.AbacStatus$,16]]],t.GetBucketAbacRequest$=[3,Q,`GetBucketAbacRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketAccelerateConfigurationOutput$=[3,Q,`GetBucketAccelerateConfigurationOutput`,{[X]:n},[Hr,gr],[0,[0,{[J]:eo}]]],t.GetBucketAccelerateConfigurationRequest$=[3,Q,`GetBucketAccelerateConfigurationRequest`,0,[v,G,Dr],[[0,1],[0,{[J]:Z}],[0,{[J]:to}]],1],t.GetBucketAclOutput$=[3,Q,`GetBucketAclOutput`,{[X]:a},[In,_t],[()=>t.Owner$,[()=>Ho,{[X]:r}]]],t.GetBucketAclRequest$=[3,Q,`GetBucketAclRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketAnalyticsConfigurationOutput$=[3,Q,`GetBucketAnalyticsConfigurationOutput`,0,[s],[[()=>t.AnalyticsConfiguration$,16]]],t.GetBucketAnalyticsConfigurationRequest$=[3,Q,`GetBucketAnalyticsConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.GetBucketCorsOutput$=[3,Q,`GetBucketCorsOutput`,{[X]:de},[fe],[[()=>Io,{[pa]:1,[X]:pe}]]],t.GetBucketCorsRequest$=[3,Q,`GetBucketCorsRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketEncryptionOutput$=[3,Q,`GetBucketEncryptionOutput`,0,[ni],[[()=>t.ServerSideEncryptionConfiguration$,16]]],t.GetBucketEncryptionRequest$=[3,Q,`GetBucketEncryptionRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketIntelligentTieringConfigurationOutput$=[3,Q,`GetBucketIntelligentTieringConfigurationOutput`,0,[Ut],[[()=>t.IntelligentTieringConfiguration$,16]]],t.GetBucketIntelligentTieringConfigurationRequest$=[3,Q,`GetBucketIntelligentTieringConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.GetBucketInventoryConfigurationOutput$=[3,Q,`GetBucketInventoryConfigurationOutput`,0,[kt],[[()=>t.InventoryConfiguration$,16]]],t.GetBucketInventoryConfigurationRequest$=[3,Q,`GetBucketInventoryConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.GetBucketLifecycleConfigurationOutput$=[3,Q,`GetBucketLifecycleConfigurationOutput`,{[X]:rn},[mr,yi],[[()=>qo,{[pa]:1,[X]:Vr}],[0,{[J]:go}]]],t.GetBucketLifecycleConfigurationRequest$=[3,Q,`GetBucketLifecycleConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketLocationOutput$=[3,Q,`GetBucketLocationOutput`,{[X]:nn},[nn],[0]],t.GetBucketLocationRequest$=[3,Q,`GetBucketLocationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketLoggingOutput$=[3,Q,`GetBucketLoggingOutput`,{[X]:w},[an],[[()=>t.LoggingEnabled$,0]]],t.GetBucketLoggingRequest$=[3,Q,`GetBucketLoggingRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketMetadataConfigurationOutput$=[3,Q,`GetBucketMetadataConfigurationOutput`,0,[vt],[[()=>t.GetBucketMetadataConfigurationResult$,16]]],t.GetBucketMetadataConfigurationRequest$=[3,Q,`GetBucketMetadataConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketMetadataConfigurationResult$=[3,Q,vt,0,[fn],[()=>t.MetadataConfigurationResult$],1],t.GetBucketMetadataTableConfigurationOutput$=[3,Q,`GetBucketMetadataTableConfigurationOutput`,0,[yt],[[()=>t.GetBucketMetadataTableConfigurationResult$,16]]],t.GetBucketMetadataTableConfigurationRequest$=[3,Q,`GetBucketMetadataTableConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketMetadataTableConfigurationResult$=[3,Q,yt,0,[xn,Hr,ct],[()=>t.MetadataTableConfigurationResult$,0,()=>t.ErrorDetails$],2],t.GetBucketMetricsConfigurationOutput$=[3,Q,`GetBucketMetricsConfigurationOutput`,0,[pn],[[()=>t.MetricsConfiguration$,16]]],t.GetBucketMetricsConfigurationRequest$=[3,Q,`GetBucketMetricsConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.GetBucketNotificationConfigurationRequest$=[3,Q,`GetBucketNotificationConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketOwnershipControlsOutput$=[3,Q,`GetBucketOwnershipControlsOutput`,0,[Ln],[[()=>t.OwnershipControls$,16]]],t.GetBucketOwnershipControlsRequest$=[3,Q,`GetBucketOwnershipControlsRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketPolicyOutput$=[3,Q,`GetBucketPolicyOutput`,0,[cr],[[0,16]]],t.GetBucketPolicyRequest$=[3,Q,`GetBucketPolicyRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketPolicyStatusOutput$=[3,Q,`GetBucketPolicyStatusOutput`,0,[nr],[[()=>t.PolicyStatus$,16]]],t.GetBucketPolicyStatusRequest$=[3,Q,`GetBucketPolicyStatusRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketReplicationOutput$=[3,Q,`GetBucketReplicationOutput`,0,[Sr],[[()=>t.ReplicationConfiguration$,16]]],t.GetBucketReplicationRequest$=[3,Q,`GetBucketReplicationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketRequestPaymentOutput$=[3,Q,`GetBucketRequestPaymentOutput`,{[X]:kr},[ar],[0]],t.GetBucketRequestPaymentRequest$=[3,Q,`GetBucketRequestPaymentRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketTaggingOutput$=[3,Q,`GetBucketTaggingOutput`,{[X]:Ei},[wi],[[()=>ss,0]],1],t.GetBucketTaggingRequest$=[3,Q,`GetBucketTaggingRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketVersioningOutput$=[3,Q,`GetBucketVersioningOutput`,{[X]:Ii},[Hr,gn],[0,[0,{[X]:mn}]]],t.GetBucketVersioningRequest$=[3,Q,`GetBucketVersioningRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketWebsiteOutput$=[3,Q,`GetBucketWebsiteOutput`,{[X]:zi},[hr,jt,Ze,jr],[()=>t.RedirectAllRequestsTo$,()=>t.IndexDocument$,()=>t.ErrorDocument$,[()=>as,0]]],t.GetBucketWebsiteRequest$=[3,Q,`GetBucketWebsiteRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetObjectAclOutput$=[3,Q,`GetObjectAclOutput`,{[X]:a},[In,_t,gr],[()=>t.Owner$,[()=>Ho,{[X]:r}],[0,{[J]:eo}]]],t.GetObjectAclRequest$=[3,Q,`GetObjectAclRequest`,0,[v,`Key`,Li,Dr,G],[[0,1],[0,1],[0,{[Y]:fa}],[0,{[J]:to}],[0,{[J]:Z}]],2],t.GetObjectAttributesOutput$=[3,Q,`GetObjectAttributesOutput`,{[X]:`GetObjectAttributesResponse`},[Ie,sn,Li,gr,rt,N,`ObjectParts`,Kr,`ObjectSize`],[[2,{[J]:Ra}],[4,{[J]:cn}],[0,{[J]:_o}],[0,{[J]:eo}],0,()=>t.Checksum$,[()=>t.GetObjectAttributesParts$,0],0,1]],t.GetObjectAttributesParts$=[3,Q,`GetObjectAttributesParts`,0,[`TotalPartsCount`,er,Nn,yn,Ht,rr],[[1,{[X]:Qn}],0,0,1,2,[()=>ns,{[pa]:1,[X]:ir}]]],t.GetObjectAttributesRequest$=[3,Q,`GetObjectAttributesRequest`,0,[v,`Key`,`ObjectAttributes`,Li,yn,er,ri,ii,ai,Dr,G],[[0,1],[0,1],[64,{[J]:`x-amz-object-attributes`}],[0,{[Y]:fa}],[1,{[J]:`x-amz-max-parts`}],[0,{[J]:`x-amz-part-number-marker`}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[0,{[J]:to}],[0,{[J]:Z}]],3],t.GetObjectLegalHoldOutput$=[3,Q,`GetObjectLegalHoldOutput`,0,[on],[[()=>t.ObjectLockLegalHold$,{[Xi]:1,[X]:on}]]],t.GetObjectLegalHoldRequest$=[3,Q,`GetObjectLegalHoldRequest`,0,[v,`Key`,Li,Dr,G],[[0,1],[0,1],[0,{[Y]:fa}],[0,{[J]:to}],[0,{[J]:Z}]],2],t.GetObjectLockConfigurationOutput$=[3,Q,`GetObjectLockConfigurationOutput`,0,[Bn],[[()=>t.ObjectLockConfiguration$,16]]],t.GetObjectLockConfigurationRequest$=[3,Q,`GetObjectLockConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetObjectOutput$=[3,Q,`GetObjectOutput`,0,[j,Ie,p,qe,Rr,sn,ae,rt,L,R,z,ve,ye,W,vn,Li,I,te,ne,re,ge,Ae,dt,et,Bi,ti,ln,ri,ai,ci,C,Kr,gr,Pr,Qn,_i,Hn,Un,Vn],[[()=>Ao,16],[2,{[J]:Ra}],[0,{[J]:Vi}],[0,{[J]:za}],[0,{[J]:$a}],[4,{[J]:cn}],[1,{[J]:ie}],[0,{[J]:rt}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[0,{[J]:La}],[1,{[J]:qa}],[0,{[J]:_o}],[0,{[J]:ee}],[0,{[J]:B}],[0,{[J]:V}],[0,{[J]:H}],[0,{[J]:_e}],[0,{[J]:ke}],[4,{[J]:dt}],[0,{[J]:et}],[0,{[J]:vo}],[0,{[J]:oo}],[128,{[Zi]:Ga}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[2,{[J]:co}],[0,{[J]:ro}],[0,{[J]:eo}],[0,{[J]:no}],[1,{[J]:Ja}],[1,{[J]:ho}],[0,{[J]:Xa}],[5,{[J]:Za}],[0,{[J]:Ya}]]],t.GetObjectRequest$=[3,Q,`GetObjectRequest`,0,[v,`Key`,Nt,Ft,Lt,qt,Lr,_r,vr,yr,br,xr,wr,Li,ri,ii,ai,Dr,$n,G,le],[[0,1],[0,1],[0,{[J]:It}],[4,{[J]:Pt}],[0,{[J]:Rt}],[4,{[J]:Jt}],[0,{[J]:Lr}],[0,{[Y]:ra}],[0,{[Y]:ia}],[0,{[Y]:aa}],[0,{[Y]:oa}],[0,{[Y]:sa}],[6,{[Y]:ca}],[0,{[Y]:fa}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[0,{[J]:to}],[1,{[Y]:na}],[0,{[J]:Z}],[0,{[J]:Ta}]],2],t.GetObjectRetentionOutput$=[3,Q,`GetObjectRetentionOutput`,0,[Br],[[()=>t.ObjectLockRetention$,{[Xi]:1,[X]:Br}]]],t.GetObjectRetentionRequest$=[3,Q,`GetObjectRetentionRequest`,0,[v,`Key`,Li,Dr,G],[[0,1],[0,1],[0,{[Y]:fa}],[0,{[J]:to}],[0,{[J]:Z}]],2],t.GetObjectTaggingOutput$=[3,Q,`GetObjectTaggingOutput`,{[X]:Ei},[wi,Li],[[()=>ss,0],[0,{[J]:_o}]],1],t.GetObjectTaggingRequest$=[3,Q,`GetObjectTaggingRequest`,0,[v,`Key`,Li,G,Dr],[[0,1],[0,1],[0,{[Y]:fa}],[0,{[J]:Z}],[0,{[J]:to}]],2],t.GetObjectTorrentOutput$=[3,Q,`GetObjectTorrentOutput`,0,[j,gr],[[()=>Ao,16],[0,{[J]:eo}]]],t.GetObjectTorrentRequest$=[3,Q,`GetObjectTorrentRequest`,0,[v,`Key`,Dr,G],[[0,1],[0,1],[0,{[J]:to}],[0,{[J]:Z}]],2],t.GetPublicAccessBlockOutput$=[3,Q,`GetPublicAccessBlockOutput`,0,[Zn],[[()=>t.PublicAccessBlockConfiguration$,16]]],t.GetPublicAccessBlockRequest$=[3,Q,`GetPublicAccessBlockRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GlacierJobParameters$=[3,Q,xt,0,[Di],[0],1],t.Grant$=[3,Q,Et,0,[Dt,sr],[[()=>t.Grantee$,{[ma]:[`xsi`,Qi]}],0]],t.Grantee$=[3,Q,Dt,0,[ji,ze,`EmailAddress`,`ID`,`URI`],[[0,{xmlAttribute:1,[X]:`xsi:type`}],0,0,0,0],1],t.HeadBucketOutput$=[3,Q,`HeadBucketOutput`,0,[b,`BucketLocationType`,`BucketLocationName`,O,`AccessPointAlias`],[[0,{[J]:va}],[0,{[J]:`x-amz-bucket-location-type`}],[0,{[J]:`x-amz-bucket-location-name`}],[0,{[J]:`x-amz-bucket-region`}],[2,{[J]:`x-amz-access-point-alias`}]]],t.HeadBucketRequest$=[3,Q,`HeadBucketRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.HeadObjectOutput$=[3,Q,`HeadObjectOutput`,0,[Ie,p,qe,Rr,`ArchiveStatus`,sn,ae,L,R,z,ve,ye,W,rt,vn,Li,I,te,ne,re,Ae,ge,dt,et,Bi,ti,ln,ri,ai,ci,C,Kr,gr,Pr,Qn,_i,Hn,Un,Vn],[[2,{[J]:Ra}],[0,{[J]:Vi}],[0,{[J]:za}],[0,{[J]:$a}],[0,{[J]:`x-amz-archive-status`}],[4,{[J]:cn}],[1,{[J]:ie}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[0,{[J]:La}],[0,{[J]:rt}],[1,{[J]:qa}],[0,{[J]:_o}],[0,{[J]:ee}],[0,{[J]:B}],[0,{[J]:V}],[0,{[J]:H}],[0,{[J]:ke}],[0,{[J]:_e}],[4,{[J]:dt}],[0,{[J]:et}],[0,{[J]:vo}],[0,{[J]:oo}],[128,{[Zi]:Ga}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[2,{[J]:co}],[0,{[J]:ro}],[0,{[J]:eo}],[0,{[J]:no}],[1,{[J]:Ja}],[1,{[J]:ho}],[0,{[J]:Xa}],[5,{[J]:Za}],[0,{[J]:Ya}]]],t.HeadObjectRequest$=[3,Q,`HeadObjectRequest`,0,[v,`Key`,Nt,Ft,Lt,qt,Lr,_r,vr,yr,br,xr,wr,Li,ri,ii,ai,Dr,$n,G,le],[[0,1],[0,1],[0,{[J]:It}],[4,{[J]:Pt}],[0,{[J]:Rt}],[4,{[J]:Jt}],[0,{[J]:Lr}],[0,{[Y]:ra}],[0,{[Y]:ia}],[0,{[Y]:aa}],[0,{[Y]:oa}],[0,{[Y]:sa}],[6,{[Y]:ca}],[0,{[Y]:fa}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[0,{[J]:to}],[1,{[Y]:na}],[0,{[J]:Z}],[0,{[J]:Ta}]],2],t.IndexDocument$=[3,Q,jt,0,[`Suffix`],[0],1],t.Initiator$=[3,Q,Yt,0,[`ID`,ze],[0,0]],t.InputSerialization$=[3,Q,Vt,0,[`CSV`,`CompressionType`,Xt,`Parquet`],[()=>t.CSVInput$,0,()=>t.JSONInput$,()=>t.ParquetInput$]],t.IntelligentTieringAndOperator$=[3,Q,`IntelligentTieringAndOperator`,0,[Xn,hi],[0,[()=>ss,{[pa]:1,[X]:`Tag`}]]],t.IntelligentTieringConfiguration$=[3,Q,Ut,0,[`Id`,Hr,`Tierings`,pt],[0,0,[()=>ls,{[pa]:1,[X]:Oi}],[()=>t.IntelligentTieringFilter$,0]],3],t.IntelligentTieringFilter$=[3,Q,`IntelligentTieringFilter`,0,[Xn,`Tag`,`And`],[0,()=>t.Tag$,[()=>t.IntelligentTieringAndOperator$,0]]],t.InventoryConfiguration$=[3,Q,kt,0,[Ge,`IsEnabled`,`Id`,`IncludedObjectVersions`,`Schedule`,pt,`OptionalFields`],[[()=>t.InventoryDestination$,0],2,0,0,()=>t.InventorySchedule$,()=>t.InventoryFilter$,[()=>Go,0]],5],t.InventoryDestination$=[3,Q,`InventoryDestination`,0,[Gr],[[()=>t.InventoryS3BucketDestination$,0]],1],t.InventoryEncryption$=[3,Q,`InventoryEncryption`,0,[li,oi],[[()=>t.SSES3$,{[X]:$r}],[()=>t.SSEKMS$,{[X]:Jr}]]],t.InventoryFilter$=[3,Q,`InventoryFilter`,0,[Xn],[0],1],t.InventoryS3BucketDestination$=[3,Q,`InventoryS3BucketDestination`,0,[v,gt,`AccountId`,Xn,ot],[0,0,0,0,[()=>t.InventoryEncryption$,0]],2],t.InventorySchedule$=[3,Q,`InventorySchedule`,0,[`Frequency`],[0],1],t.InventoryTableConfiguration$=[3,Q,Kt,0,[Oe,Ye],[0,()=>t.MetadataTableEncryptionConfiguration$],1],t.InventoryTableConfigurationResult$=[3,Q,Gt,0,[Oe,Ti,ct,Si,K],[0,0,()=>t.ErrorDetails$,0,0],1],t.InventoryTableConfigurationUpdates$=[3,Q,`InventoryTableConfigurationUpdates`,0,[Oe,Ye],[0,()=>t.MetadataTableEncryptionConfiguration$],1],t.JournalTableConfiguration$=[3,Q,Zt,0,[Tr,Ye],[()=>t.RecordExpiration$,()=>t.MetadataTableEncryptionConfiguration$],1],t.JournalTableConfigurationResult$=[3,Q,Qt,0,[Ti,Si,Tr,ct,K],[0,0,()=>t.RecordExpiration$,()=>t.ErrorDetails$,0],3],t.JournalTableConfigurationUpdates$=[3,Q,`JournalTableConfigurationUpdates`,0,[Tr],[()=>t.RecordExpiration$],1],t.JSONInput$=[3,Q,`JSONInput`,0,[ji],[0]],t.JSONOutput$=[3,Q,`JSONOutput`,0,[Cr],[0]],t.LambdaFunctionConfiguration$=[3,Q,`LambdaFunctionConfiguration`,0,[`LambdaFunctionArn`,lt,`Id`,pt],[[0,{[X]:`CloudFunction`}],[64,{[pa]:1,[X]:ut}],0,[()=>t.NotificationConfigurationFilter$,0]],2],t.LifecycleExpiration$=[3,Q,`LifecycleExpiration`,0,[He,Fe,`ExpiredObjectDeleteMarker`],[5,1,2]],t.LifecycleRule$=[3,Q,`LifecycleRule`,0,[Hr,qe,`ID`,Xn,pt,`Transitions`,`NoncurrentVersionTransitions`,Pn,l],[0,()=>t.LifecycleExpiration$,0,0,[()=>t.LifecycleRuleFilter$,0],[()=>ds,{[pa]:1,[X]:Ai}],[()=>Xo,{[pa]:1,[X]:Fn}],()=>t.NoncurrentVersionExpiration$,()=>t.AbortIncompleteMultipartUpload$],1],t.LifecycleRuleAndOperator$=[3,Q,`LifecycleRuleAndOperator`,0,[Xn,hi,Kn,qn],[0,[()=>ss,{[pa]:1,[X]:`Tag`}],1,1]],t.LifecycleRuleFilter$=[3,Q,`LifecycleRuleFilter`,0,[Xn,`Tag`,Kn,qn,`And`],[0,()=>t.Tag$,1,1,[()=>t.LifecycleRuleAndOperator$,0]]],t.ListBucketAnalyticsConfigurationsOutput$=[3,Q,`ListBucketAnalyticsConfigurationsOutput`,{[X]:`ListBucketAnalyticsConfigurationResult`},[Ht,je,kn,i],[2,0,0,[()=>Mo,{[pa]:1,[X]:s}]]],t.ListBucketAnalyticsConfigurationsRequest$=[3,Q,`ListBucketAnalyticsConfigurationsRequest`,0,[v,je,G],[[0,1],[0,{[Y]:Ui}],[0,{[J]:Z}]],1],t.ListBucketIntelligentTieringConfigurationsOutput$=[3,Q,`ListBucketIntelligentTieringConfigurationsOutput`,0,[Ht,je,kn,Wt],[2,0,0,[()=>Uo,{[pa]:1,[X]:Ut}]]],t.ListBucketIntelligentTieringConfigurationsRequest$=[3,Q,`ListBucketIntelligentTieringConfigurationsRequest`,0,[v,je,G],[[0,1],[0,{[Y]:Ui}],[0,{[J]:Z}]],1],t.ListBucketInventoryConfigurationsOutput$=[3,Q,`ListBucketInventoryConfigurationsOutput`,{[X]:`ListInventoryConfigurationsResult`},[je,At,Ht,kn],[0,[()=>Wo,{[pa]:1,[X]:kt}],2,0]],t.ListBucketInventoryConfigurationsRequest$=[3,Q,`ListBucketInventoryConfigurationsRequest`,0,[v,je,G],[[0,1],[0,{[Y]:Ui}],[0,{[J]:Z}]],1],t.ListBucketMetricsConfigurationsOutput$=[3,Q,`ListBucketMetricsConfigurationsOutput`,{[X]:`ListMetricsConfigurationsResult`},[Ht,je,kn,dn],[2,0,0,[()=>Jo,{[pa]:1,[X]:pn}]]],t.ListBucketMetricsConfigurationsRequest$=[3,Q,`ListBucketMetricsConfigurationsRequest`,0,[v,je,G],[[0,1],[0,{[Y]:Ui}],[0,{[J]:Z}]],1],t.ListBucketsOutput$=[3,Q,`ListBucketsOutput`,{[X]:`ListAllMyBucketsResult`},[M,In,je,Xn],[[()=>No,0],()=>t.Owner$,0,0]],t.ListBucketsRequest$=[3,Q,`ListBucketsRequest`,0,[`MaxBuckets`,je,Xn,O],[[1,{[Y]:`max-buckets`}],[0,{[Y]:Ui}],[0,{[Y]:ta}],[0,{[Y]:`bucket-region`}]]],t.ListDirectoryBucketsOutput$=[3,Q,`ListDirectoryBucketsOutput`,{[X]:`ListAllMyDirectoryBucketsResult`},[M,je],[[()=>No,0],0]],t.ListDirectoryBucketsRequest$=[3,Q,`ListDirectoryBucketsRequest`,0,[je,`MaxDirectoryBuckets`],[[0,{[Y]:Ui}],[1,{[Y]:`max-directory-buckets`}]]],t.ListMultipartUploadsOutput$=[3,Q,`ListMultipartUploadsOutput`,{[X]:`ListMultipartUploadsResult`},[v,$t,Ni,jn,Xn,We,`NextUploadIdMarker`,Cn,Ht,`Uploads`,he,it,gr],[0,0,0,0,0,0,0,1,2,[()=>Yo,{[pa]:1,[X]:`Upload`}],[()=>Po,{[pa]:1}],0,[0,{[J]:eo}]]],t.ListMultipartUploadsRequest$=[3,Q,`ListMultipartUploadsRequest`,0,[v,We,it,$t,Cn,Xn,Ni,G,Dr],[[0,1],[0,{[Y]:Wi}],[0,{[Y]:qi}],[0,{[Y]:$i}],[1,{[Y]:`max-uploads`}],[0,{[Y]:ta}],[0,{[Y]:`upload-id-marker`}],[0,{[J]:Z}],[0,{[J]:to}]],1],t.ListObjectsOutput$=[3,Q,`ListObjectsOutput`,{[X]:tn},[Ht,wn,`NextMarker`,Ne,Dn,Xn,We,_n,he,it,gr],[2,0,0,[()=>Qo,{[pa]:1}],0,0,0,1,[()=>Po,{[pa]:1}],0,[0,{[J]:eo}]]],t.ListObjectsRequest$=[3,Q,`ListObjectsRequest`,0,[v,We,it,wn,_n,Xn,Dr,G,Gn],[[0,1],[0,{[Y]:Wi}],[0,{[Y]:qi}],[0,{[Y]:`marker`}],[1,{[Y]:ea}],[0,{[Y]:ta}],[0,{[J]:to}],[0,{[J]:Z}],[64,{[J]:Qa}]],1],t.ListObjectsV2Output$=[3,Q,`ListObjectsV2Output`,{[X]:tn},[Ht,Ne,Dn,Xn,We,_n,he,it,`KeyCount`,je,kn,Ur,gr],[2,[()=>Qo,{[pa]:1}],0,0,0,1,[()=>Po,{[pa]:1}],0,1,0,0,0,[0,{[J]:eo}]]],t.ListObjectsV2Request$=[3,Q,`ListObjectsV2Request`,0,[v,We,it,_n,Xn,je,`FetchOwner`,Ur,Dr,G,Gn],[[0,1],[0,{[Y]:Wi}],[0,{[Y]:qi}],[1,{[Y]:ea}],[0,{[Y]:ta}],[0,{[Y]:Ui}],[2,{[Y]:`fetch-owner`}],[0,{[Y]:`start-after`}],[0,{[J]:to}],[0,{[J]:Z}],[64,{[J]:Qa}]],1],t.ListObjectVersionsOutput$=[3,Q,`ListObjectVersionsOutput`,{[X]:`ListVersionsResult`},[Ht,$t,Ri,jn,`NextVersionIdMarker`,`Versions`,Re,Dn,Xn,We,_n,he,it,gr],[2,0,0,0,0,[()=>$o,{[pa]:1,[X]:`Version`}],[()=>Ro,{[pa]:1,[X]:Ie}],0,0,0,1,[()=>Po,{[pa]:1}],0,[0,{[J]:eo}]]],t.ListObjectVersionsRequest$=[3,Q,`ListObjectVersionsRequest`,0,[v,We,it,$t,_n,Xn,Ri,G,Dr,Gn],[[0,1],[0,{[Y]:Wi}],[0,{[Y]:qi}],[0,{[Y]:$i}],[1,{[Y]:ea}],[0,{[Y]:ta}],[0,{[Y]:`version-id-marker`}],[0,{[J]:Z}],[0,{[J]:to}],[64,{[J]:Qa}]],1],t.ListPartsOutput$=[3,Q,`ListPartsOutput`,{[X]:`ListPartsResult`},[c,m,v,`Key`,Mi,er,Nn,yn,Ht,rr,Yt,In,Kr,gr,P,W],[[4,{[J]:ga}],[0,{[J]:_a}],0,0,0,0,0,1,2,[()=>ts,{[pa]:1,[X]:ir}],()=>t.Initiator$,()=>t.Owner$,0,[0,{[J]:eo}],0,0]],t.ListPartsRequest$=[3,Q,`ListPartsRequest`,0,[v,`Key`,Mi,yn,er,Dr,G,ri,ii,ai],[[0,1],[0,1],[0,{[Y]:da}],[1,{[Y]:`max-parts`}],[0,{[Y]:`part-number-marker`}],[0,{[J]:to}],[0,{[J]:Z}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}]],3],t.LocationInfo$=[3,Q,`LocationInfo`,0,[ji,Dn],[0,0]],t.LoggingEnabled$=[3,Q,an,0,[`TargetBucket`,`TargetPrefix`,bi,Ci],[0,0,[()=>cs,0],[()=>t.TargetObjectKeyFormat$,0]],2],t.MetadataConfiguration$=[3,Q,un,0,[Zt,Kt],[()=>t.JournalTableConfiguration$,()=>t.InventoryTableConfiguration$],1],t.MetadataConfigurationResult$=[3,Q,fn,0,[Ve,Qt,Gt],[()=>t.DestinationResult$,()=>t.JournalTableConfigurationResult$,()=>t.InventoryTableConfigurationResult$],1],t.MetadataEntry$=[3,Q,hn,0,[Dn,Fi],[0,0]],t.MetadataTableConfiguration$=[3,Q,bn,0,[di],[()=>t.S3TablesDestination$],1],t.MetadataTableConfigurationResult$=[3,Q,xn,0,[fi],[()=>t.S3TablesDestinationResult$],1],t.MetadataTableEncryptionConfiguration$=[3,Q,`MetadataTableEncryptionConfiguration`,0,[`SseAlgorithm`,`KmsKeyArn`],[0,0],1],t.Metrics$=[3,Q,Tn,0,[Hr,`EventThreshold`],[0,()=>t.ReplicationTimeValue$],1],t.MetricsAndOperator$=[3,Q,`MetricsAndOperator`,0,[Xn,hi,f],[0,[()=>ss,{[pa]:1,[X]:`Tag`}],0]],t.MetricsConfiguration$=[3,Q,pn,0,[`Id`,pt],[0,[()=>t.MetricsFilter$,0]],1],t.MultipartUpload$=[3,Q,Sn,0,[Mi,`Key`,`Initiated`,Kr,In,Yt,P,W],[0,0,4,0,()=>t.Owner$,()=>t.Initiator$,0,0]],t.NoncurrentVersionExpiration$=[3,Q,Pn,0,[An,Mn],[1,1]],t.NoncurrentVersionTransition$=[3,Q,Fn,0,[An,Kr,Mn],[1,0,1]],t.NotificationConfiguration$=[3,Q,On,0,[`TopicConfigurations`,`QueueConfigurations`,`LambdaFunctionConfigurations`,Je],[[()=>us,{[pa]:1,[X]:vi}],[()=>rs,{[pa]:1,[X]:fr}],[()=>Ko,{[pa]:1,[X]:`CloudFunctionConfiguration`}],()=>t.EventBridgeConfiguration$]],t.NotificationConfigurationFilter$=[3,Q,`NotificationConfigurationFilter`,0,[`Key`],[[()=>t.S3KeyFilter$,{[X]:`S3Key`}]]],t._Object$=[3,Q,Yn,0,[`Key`,sn,rt,P,W,pi,Kr,In,Fr],[0,4,0,[64,{[pa]:1}],0,1,0,()=>t.Owner$,()=>t.RestoreStatus$]],t.ObjectIdentifier$=[3,Q,`ObjectIdentifier`,0,[`Key`,Li,rt,`LastModifiedTime`,pi],[0,0,0,6,1],1],t.ObjectLockConfiguration$=[3,Q,Bn,0,[`ObjectLockEnabled`,Vr],[0,()=>t.ObjectLockRule$]],t.ObjectLockLegalHold$=[3,Q,`ObjectLockLegalHold`,0,[Hr],[0]],t.ObjectLockRetention$=[3,Q,`ObjectLockRetention`,0,[En,`RetainUntilDate`],[0,5]],t.ObjectLockRule$=[3,Q,`ObjectLockRule`,0,[Be],[()=>t.DefaultRetention$]],t.ObjectPart$=[3,Q,`ObjectPart`,0,[$n,pi,L,R,z,ve,ye],[1,1,0,0,0,0,0]],t.ObjectVersion$=[3,Q,`ObjectVersion`,0,[rt,P,W,pi,Kr,`Key`,Li,Mt,sn,In,Fr],[0,[64,{[pa]:1}],0,1,0,0,0,2,4,()=>t.Owner$,()=>t.RestoreStatus$]],t.OutputLocation$=[3,Q,zn,0,[`S3`],[[()=>t.S3Location$,0]]],t.OutputSerialization$=[3,Q,Jn,0,[`CSV`,Xt],[()=>t.CSVOutput$,()=>t.JSONOutput$]],t.Owner$=[3,Q,In,0,[ze,`ID`],[0,0]],t.OwnershipControls$=[3,Q,Ln,0,[mr],[[()=>es,{[pa]:1,[X]:Vr}]],1],t.OwnershipControlsRule$=[3,Q,`OwnershipControlsRule`,0,[Wn],[0],1],t.ParquetInput$=[3,Q,`ParquetInput`,0,[],[]],t.Part$=[3,Q,ir,0,[$n,sn,rt,pi,L,R,z,ve,ye],[1,4,0,1,0,0,0,0,0]],t.PartitionedPrefix$=[3,Q,tr,{[X]:tr},[`PartitionDateSource`],[0]],t.PolicyStatus$=[3,Q,nr,0,[zt],[[2,{[X]:zt}]]],t.Progress$=[3,Q,lr,0,[A,T,k],[1,1,1]],t.ProgressEvent$=[3,Q,`ProgressEvent`,0,[Ke],[[()=>t.Progress$,{[Ki]:1}]]],t.PublicAccessBlockConfiguration$=[3,Q,Zn,0,[E,Bt,D,Or],[[2,{[X]:E}],[2,{[X]:Bt}],[2,{[X]:D}],[2,{[X]:Or}]]],t.PutBucketAbacRequest$=[3,Q,`PutBucketAbacRequest`,0,[v,h,se,P,G],[[0,1],[()=>t.AbacStatus$,{[Xi]:1,[X]:h}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutBucketAccelerateConfigurationRequest$=[3,Q,`PutBucketAccelerateConfigurationRequest`,0,[v,n,G,P],[[0,1],[()=>t.AccelerateConfiguration$,{[Xi]:1,[X]:n}],[0,{[J]:Z}],[0,{[J]:io}]],2],t.PutBucketAclRequest$=[3,Q,`PutBucketAclRequest`,0,[v,`ACL`,a,se,P,bt,St,Ct,wt,Tt,G],[[0,1],[0,{[J]:ha}],[()=>t.AccessControlPolicy$,{[Xi]:1,[X]:a}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Ba}],[0,{[J]:Va}],[0,{[J]:Ha}],[0,{[J]:Ua}],[0,{[J]:Wa}],[0,{[J]:Z}]],1],t.PutBucketAnalyticsConfigurationRequest$=[3,Q,`PutBucketAnalyticsConfigurationRequest`,0,[v,`Id`,s,G],[[0,1],[0,{[Y]:`id`}],[()=>t.AnalyticsConfiguration$,{[Xi]:1,[X]:s}],[0,{[J]:Z}]],3],t.PutBucketCorsRequest$=[3,Q,`PutBucketCorsRequest`,0,[v,de,se,P,G],[[0,1],[()=>t.CORSConfiguration$,{[Xi]:1,[X]:de}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutBucketEncryptionRequest$=[3,Q,`PutBucketEncryptionRequest`,0,[v,ni,se,P,G],[[0,1],[()=>t.ServerSideEncryptionConfiguration$,{[Xi]:1,[X]:ni}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutBucketIntelligentTieringConfigurationRequest$=[3,Q,`PutBucketIntelligentTieringConfigurationRequest`,0,[v,`Id`,Ut,G],[[0,1],[0,{[Y]:`id`}],[()=>t.IntelligentTieringConfiguration$,{[Xi]:1,[X]:Ut}],[0,{[J]:Z}]],3],t.PutBucketInventoryConfigurationRequest$=[3,Q,`PutBucketInventoryConfigurationRequest`,0,[v,`Id`,kt,G],[[0,1],[0,{[Y]:`id`}],[()=>t.InventoryConfiguration$,{[Xi]:1,[X]:kt}],[0,{[J]:Z}]],3],t.PutBucketLifecycleConfigurationOutput$=[3,Q,`PutBucketLifecycleConfigurationOutput`,0,[yi],[[0,{[J]:go}]]],t.PutBucketLifecycleConfigurationRequest$=[3,Q,`PutBucketLifecycleConfigurationRequest`,0,[v,P,rn,G,yi],[[0,1],[0,{[J]:io}],[()=>t.BucketLifecycleConfiguration$,{[Xi]:1,[X]:rn}],[0,{[J]:Z}],[0,{[J]:go}]],1],t.PutBucketLoggingRequest$=[3,Q,`PutBucketLoggingRequest`,0,[v,w,se,P,G],[[0,1],[()=>t.BucketLoggingStatus$,{[Xi]:1,[X]:w}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutBucketMetricsConfigurationRequest$=[3,Q,`PutBucketMetricsConfigurationRequest`,0,[v,`Id`,pn,G],[[0,1],[0,{[Y]:`id`}],[()=>t.MetricsConfiguration$,{[Xi]:1,[X]:pn}],[0,{[J]:Z}]],3],t.PutBucketNotificationConfigurationRequest$=[3,Q,`PutBucketNotificationConfigurationRequest`,0,[v,On,G,`SkipDestinationValidation`],[[0,1],[()=>t.NotificationConfiguration$,{[Xi]:1,[X]:On}],[0,{[J]:Z}],[2,{[J]:`x-amz-skip-destination-validation`}]],2],t.PutBucketOwnershipControlsRequest$=[3,Q,`PutBucketOwnershipControlsRequest`,0,[v,Ln,se,G,P],[[0,1],[()=>t.OwnershipControls$,{[Xi]:1,[X]:Ln}],[0,{[J]:oe}],[0,{[J]:Z}],[0,{[J]:io}]],2],t.PutBucketPolicyRequest$=[3,Q,`PutBucketPolicyRequest`,0,[v,cr,se,P,`ConfirmRemoveSelfBucketAccess`,G],[[0,1],[0,16],[0,{[J]:oe}],[0,{[J]:io}],[2,{[J]:`x-amz-confirm-remove-self-bucket-access`}],[0,{[J]:Z}]],2],t.PutBucketReplicationRequest$=[3,Q,`PutBucketReplicationRequest`,0,[v,Sr,se,P,ki,G],[[0,1],[()=>t.ReplicationConfiguration$,{[Xi]:1,[X]:Sr}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:ba}],[0,{[J]:Z}]],2],t.PutBucketRequestPaymentRequest$=[3,Q,`PutBucketRequestPaymentRequest`,0,[v,kr,se,P,G],[[0,1],[()=>t.RequestPaymentConfiguration$,{[Xi]:1,[X]:kr}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutBucketTaggingRequest$=[3,Q,`PutBucketTaggingRequest`,0,[v,Ei,se,P,G],[[0,1],[()=>t.Tagging$,{[Xi]:1,[X]:Ei}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutBucketVersioningRequest$=[3,Q,`PutBucketVersioningRequest`,0,[v,Ii,se,P,`MFA`,G],[[0,1],[()=>t.VersioningConfiguration$,{[Xi]:1,[X]:Ii}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Ka}],[0,{[J]:Z}]],2],t.PutBucketWebsiteRequest$=[3,Q,`PutBucketWebsiteRequest`,0,[v,zi,se,P,G],[[0,1],[()=>t.WebsiteConfiguration$,{[Xi]:1,[X]:zi}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutObjectAclOutput$=[3,Q,`PutObjectAclOutput`,0,[gr],[[0,{[J]:eo}]]],t.PutObjectAclRequest$=[3,Q,`PutObjectAclRequest`,0,[v,`Key`,`ACL`,a,se,P,bt,St,Ct,wt,Tt,Dr,Li,G],[[0,1],[0,1],[0,{[J]:ha}],[()=>t.AccessControlPolicy$,{[Xi]:1,[X]:a}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Ba}],[0,{[J]:Va}],[0,{[J]:Ha}],[0,{[J]:Ua}],[0,{[J]:Wa}],[0,{[J]:to}],[0,{[Y]:fa}],[0,{[J]:Z}]],2],t.PutObjectLegalHoldOutput$=[3,Q,`PutObjectLegalHoldOutput`,0,[gr],[[0,{[J]:eo}]]],t.PutObjectLegalHoldRequest$=[3,Q,`PutObjectLegalHoldRequest`,0,[v,`Key`,on,Dr,Li,se,P,G],[[0,1],[0,1],[()=>t.ObjectLockLegalHold$,{[Xi]:1,[X]:on}],[0,{[J]:to}],[0,{[Y]:fa}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutObjectLockConfigurationOutput$=[3,Q,`PutObjectLockConfigurationOutput`,0,[gr],[[0,{[J]:eo}]]],t.PutObjectLockConfigurationRequest$=[3,Q,`PutObjectLockConfigurationRequest`,0,[v,Bn,Dr,ki,se,P,G],[[0,1],[()=>t.ObjectLockConfiguration$,{[Xi]:1,[X]:Bn}],[0,{[J]:to}],[0,{[J]:ba}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],1],t.PutObjectOutput$=[3,Q,`PutObjectOutput`,0,[qe,rt,L,R,z,ve,ye,W,ti,Li,ri,ai,ci,si,C,pi,gr],[[0,{[J]:za}],[0,{[J]:rt}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[0,{[J]:La}],[0,{[J]:oo}],[0,{[J]:_o}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}],[1,{[J]:`x-amz-object-size`}],[0,{[J]:eo}]]],t.PutObjectRequest$=[3,Q,`PutObjectRequest`,0,[v,`Key`,`ACL`,j,I,te,ne,re,ae,se,Ae,P,L,R,z,ve,ye,dt,Nt,Lt,bt,St,Ct,Tt,`WriteOffsetBytes`,ln,ti,Kr,Bi,ri,ii,ai,ci,si,C,Dr,Ei,Hn,Un,Vn,G],[[0,1],[0,1],[0,{[J]:ha}],[()=>Ao,16],[0,{[J]:ee}],[0,{[J]:B}],[0,{[J]:V}],[0,{[J]:H}],[1,{[J]:ie}],[0,{[J]:oe}],[0,{[J]:ke}],[0,{[J]:io}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[4,{[J]:dt}],[0,{[J]:It}],[0,{[J]:Rt}],[0,{[J]:Ba}],[0,{[J]:Va}],[0,{[J]:Ha}],[0,{[J]:Wa}],[1,{[J]:`x-amz-write-offset-bytes`}],[128,{[Zi]:Ga}],[0,{[J]:oo}],[0,{[J]:ro}],[0,{[J]:vo}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}],[0,{[J]:to}],[0,{[J]:mo}],[0,{[J]:Xa}],[5,{[J]:Za}],[0,{[J]:Ya}],[0,{[J]:Z}]],2],t.PutObjectRetentionOutput$=[3,Q,`PutObjectRetentionOutput`,0,[gr],[[0,{[J]:eo}]]],t.PutObjectRetentionRequest$=[3,Q,`PutObjectRetentionRequest`,0,[v,`Key`,Br,Dr,Li,S,se,P,G],[[0,1],[0,1],[()=>t.ObjectLockRetention$,{[Xi]:1,[X]:Br}],[0,{[J]:to}],[0,{[Y]:fa}],[2,{[J]:ya}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutObjectTaggingOutput$=[3,Q,`PutObjectTaggingOutput`,0,[Li],[[0,{[J]:_o}]]],t.PutObjectTaggingRequest$=[3,Q,`PutObjectTaggingRequest`,0,[v,`Key`,Ei,Li,se,P,G,Dr],[[0,1],[0,1],[()=>t.Tagging$,{[Xi]:1,[X]:Ei}],[0,{[Y]:fa}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}],[0,{[J]:to}]],3],t.PutPublicAccessBlockRequest$=[3,Q,`PutPublicAccessBlockRequest`,0,[v,Zn,se,P,G],[[0,1],[()=>t.PublicAccessBlockConfiguration$,{[Xi]:1,[X]:Zn}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.QueueConfiguration$=[3,Q,fr,0,[`QueueArn`,lt,`Id`,pt],[[0,{[X]:`Queue`}],[64,{[pa]:1,[X]:ut}],0,[()=>t.NotificationConfigurationFilter$,0]],2],t.RecordExpiration$=[3,Q,Tr,0,[qe,Fe],[0,1],1],t.RecordsEvent$=[3,Q,`RecordsEvent`,0,[or],[[21,{[Ki]:1}]]],t.Redirect$=[3,Q,zr,0,[Ot,`HttpRedirectCode`,ur,`ReplaceKeyPrefixWith`,`ReplaceKeyWith`],[0,0,0,0,0]],t.RedirectAllRequestsTo$=[3,Q,hr,0,[Ot,ur],[0,0],1],t.RenameObjectOutput$=[3,Q,`RenameObjectOutput`,0,[],[]],t.RenameObjectRequest$=[3,Q,`RenameObjectRequest`,0,[v,`Key`,`RenameSource`,`DestinationIfMatch`,`DestinationIfNoneMatch`,`DestinationIfModifiedSince`,`DestinationIfUnmodifiedSince`,`SourceIfMatch`,`SourceIfNoneMatch`,`SourceIfModifiedSince`,`SourceIfUnmodifiedSince`,`ClientToken`],[[0,1],[0,1],[0,{[J]:`x-amz-rename-source`}],[0,{[J]:It}],[0,{[J]:Rt}],[4,{[J]:Pt}],[4,{[J]:Jt}],[0,{[J]:`x-amz-rename-source-if-match`}],[0,{[J]:`x-amz-rename-source-if-none-match`}],[6,{[J]:`x-amz-rename-source-if-modified-since`}],[6,{[J]:`x-amz-rename-source-if-unmodified-since`}],[0,{[J]:`x-amz-client-token`,idempotencyToken:1}]],3],t.ReplicaModifications$=[3,Q,Er,0,[Hr],[0],1],t.ReplicationConfiguration$=[3,Q,Sr,0,[`Role`,mr],[0,[()=>is,{[pa]:1,[X]:Vr}]],2],t.ReplicationRule$=[3,Q,`ReplicationRule`,0,[Hr,Ge,`ID`,`Priority`,Xn,pt,ei,$e,Le],[0,()=>t.Destination$,0,1,0,[()=>t.ReplicationRuleFilter$,0],()=>t.SourceSelectionCriteria$,()=>t.ExistingObjectReplication$,()=>t.DeleteMarkerReplication$],2],t.ReplicationRuleAndOperator$=[3,Q,`ReplicationRuleAndOperator`,0,[Xn,hi],[0,[()=>ss,{[pa]:1,[X]:`Tag`}]]],t.ReplicationRuleFilter$=[3,Q,`ReplicationRuleFilter`,0,[Xn,`Tag`,`And`],[0,()=>t.Tag$,[()=>t.ReplicationRuleAndOperator$,0]]],t.ReplicationTime$=[3,Q,Ir,0,[Hr,`Time`],[0,()=>t.ReplicationTimeValue$],2],t.ReplicationTimeValue$=[3,Q,`ReplicationTimeValue`,0,[`Minutes`],[1]],t.RequestPaymentConfiguration$=[3,Q,kr,0,[ar],[0],1],t.RequestProgress$=[3,Q,Ar,0,[`Enabled`],[2]],t.RestoreObjectOutput$=[3,Q,`RestoreObjectOutput`,0,[gr,`RestoreOutputPath`],[[0,{[J]:eo}],[0,{[J]:`x-amz-restore-output-path`}]]],t.RestoreObjectRequest$=[3,Q,`RestoreObjectRequest`,0,[v,`Key`,Li,Mr,Dr,P,G],[[0,1],[0,1],[0,{[Y]:fa}],[()=>t.RestoreRequest$,{[Xi]:1,[X]:Mr}],[0,{[J]:to}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.RestoreRequest$=[3,Q,Mr,0,[Fe,xt,ji,Di,`Description`,Xr,zn],[1,()=>t.GlacierJobParameters$,0,0,0,()=>t.SelectParameters$,[()=>t.OutputLocation$,0]]],t.RestoreStatus$=[3,Q,Fr,0,[`IsRestoreInProgress`,`RestoreExpiryDate`],[2,4]],t.RoutingRule$=[3,Q,Nr,0,[zr,Me],[()=>t.Redirect$,()=>t.Condition$],1],t.S3KeyFilter$=[3,Q,`S3KeyFilter`,0,[`FilterRules`],[[()=>Vo,{[pa]:1,[X]:ht}]]],t.S3Location$=[3,Q,`S3Location`,0,[`BucketName`,Xn,ot,`CannedACL`,r,Ei,Pi,Kr],[0,0,[()=>t.Encryption$,0],0,[()=>Ho,0],[()=>t.Tagging$,0],[()=>fs,0],0],2],t.S3TablesDestination$=[3,Q,di,0,[gi,Si],[0,0],2],t.S3TablesDestinationResult$=[3,Q,fi,0,[gi,Si,K,xi],[0,0,0,0],4],t.ScanRange$=[3,Q,Qr,0,[`Start`,`End`],[1,1]],t.SelectObjectContentOutput$=[3,Q,`SelectObjectContentOutput`,0,[or],[[()=>t.SelectObjectContentEventStream$,16]]],t.SelectObjectContentRequest$=[3,Q,`SelectObjectContentRequest`,0,[v,`Key`,ft,at,Vt,Jn,ri,ii,ai,Ar,Qr,G],[[0,1],[0,1],0,0,()=>t.InputSerialization$,()=>t.OutputSerialization$,[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],()=>t.RequestProgress$,()=>t.ScanRange$,[0,{[J]:Z}]],6],t.SelectParameters$=[3,Q,Xr,0,[Vt,at,ft,Jn],[()=>t.InputSerialization$,0,0,()=>t.OutputSerialization$],4],t.ServerSideEncryptionByDefault$=[3,Q,`ServerSideEncryptionByDefault`,0,[`SSEAlgorithm`,`KMSMasterKeyID`],[0,[()=>ko,0]],1],t.ServerSideEncryptionConfiguration$=[3,Q,ni,0,[mr],[[()=>os,{[pa]:1,[X]:Vr}]],1],t.ServerSideEncryptionRule$=[3,Q,`ServerSideEncryptionRule`,0,[`ApplyServerSideEncryptionByDefault`,C,x],[[()=>t.ServerSideEncryptionByDefault$,0],2,[()=>t.BlockedEncryptionTypes$,0]]],t.SessionCredentials$=[3,Q,`SessionCredentials`,0,[u,Wr,ui,qe],[[0,{[X]:u}],[()=>Eo,{[X]:Wr}],[()=>Eo,{[X]:ui}],[4,{[X]:qe}]],4],t.SimplePrefix$=[3,Q,Zr,{[X]:Zr},[],[]],t.SourceSelectionCriteria$=[3,Q,ei,0,[Yr,Er],[()=>t.SseKmsEncryptedObjects$,()=>t.ReplicaModifications$]],t.SSEKMS$=[3,Q,oi,{[X]:Jr},[`KeyId`],[[()=>ko,0]],1],t.SseKmsEncryptedObjects$=[3,Q,Yr,0,[Hr],[0],1],t.SSEKMSEncryption$=[3,Q,`SSEKMSEncryption`,{[X]:Jr},[`KMSKeyArn`,C],[[()=>To,0],2],1],t.SSES3$=[3,Q,li,{[X]:$r},[],[]],t.Stats$=[3,Q,mi,0,[A,T,k],[1,1,1]],t.StatsEvent$=[3,Q,`StatsEvent`,0,[Ke],[[()=>t.Stats$,{[Ki]:1}]]],t.StorageClassAnalysis$=[3,Q,qr,0,[`DataExport`],[()=>t.StorageClassAnalysisDataExport$]],t.StorageClassAnalysisDataExport$=[3,Q,`StorageClassAnalysisDataExport`,0,[`OutputSchemaVersion`,Ge],[0,()=>t.AnalyticsExportDestination$],2],t.Tag$=[3,Q,`Tag`,0,[`Key`,Fi],[0,0],2],t.Tagging$=[3,Q,Ei,0,[wi],[[()=>ss,0]],1],t.TargetGrant$=[3,Q,`TargetGrant`,0,[Dt,sr],[[()=>t.Grantee$,{[ma]:[`xsi`,Qi]}],0]],t.TargetObjectKeyFormat$=[3,Q,Ci,0,[Zr,tr],[[()=>t.SimplePrefix$,{[X]:Zr}],[()=>t.PartitionedPrefix$,{[X]:tr}]]],t.Tiering$=[3,Q,Oi,0,[Fe,g],[1,0],2],t.TopicConfiguration$=[3,Q,vi,0,[`TopicArn`,lt,`Id`,pt],[[0,{[X]:`Topic`}],[64,{[pa]:1,[X]:ut}],0,[()=>t.NotificationConfigurationFilter$,0]],2],t.Transition$=[3,Q,Ai,0,[He,Fe,Kr],[5,1,0]],t.UpdateBucketMetadataInventoryTableConfigurationRequest$=[3,Q,`UpdateBucketMetadataInventoryTableConfigurationRequest`,0,[v,Kt,se,P,G],[[0,1],[()=>t.InventoryTableConfigurationUpdates$,{[Xi]:1,[X]:Kt}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.UpdateBucketMetadataJournalTableConfigurationRequest$=[3,Q,`UpdateBucketMetadataJournalTableConfigurationRequest`,0,[v,Zt,se,P,G],[[0,1],[()=>t.JournalTableConfigurationUpdates$,{[Xi]:1,[X]:Zt}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.UpdateObjectEncryptionRequest$=[3,Q,`UpdateObjectEncryptionRequest`,0,[v,`Key`,Rn,Li,Dr,G,se,P],[[0,1],[0,1],[()=>t.ObjectEncryption$,16],[0,{[Y]:fa}],[0,{[J]:to}],[0,{[J]:Z}],[0,{[J]:oe}],[0,{[J]:io}]],3],t.UpdateObjectEncryptionResponse$=[3,Q,`UpdateObjectEncryptionResponse`,0,[gr],[[0,{[J]:eo}]]],t.UploadPartCopyOutput$=[3,Q,`UploadPartCopyOutput`,0,[De,me,ti,ri,ai,ci,C,gr],[[0,{[J]:Ia}],[()=>t.CopyPartResult$,16],[0,{[J]:oo}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[2,{[J]:co}],[0,{[J]:eo}]]],t.UploadPartCopyRequest$=[3,Q,`UploadPartCopyRequest`,0,[v,U,`Key`,$n,Mi,be,xe,Se,Ce,`CopySourceRange`,ri,ii,ai,we,Te,Ee,Dr,G,tt],[[0,1],[0,{[J]:Oa}],[0,1],[1,{[Y]:na}],[0,{[Y]:da}],[0,{[J]:ka}],[4,{[J]:Aa}],[0,{[J]:ja}],[4,{[J]:Ma}],[0,{[J]:`x-amz-copy-source-range`}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[0,{[J]:Na}],[()=>wo,{[J]:Pa}],[0,{[J]:Fa}],[0,{[J]:to}],[0,{[J]:Z}],[0,{[J]:ao}]],5],t.UploadPartOutput$=[3,Q,`UploadPartOutput`,0,[ti,rt,L,R,z,ve,ye,ri,ai,ci,C,gr],[[0,{[J]:oo}],[0,{[J]:rt}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[2,{[J]:co}],[0,{[J]:eo}]]],t.UploadPartRequest$=[3,Q,`UploadPartRequest`,0,[v,`Key`,$n,Mi,j,ae,se,P,L,R,z,ve,ye,ri,ii,ai,Dr,G],[[0,1],[0,1],[1,{[Y]:na}],[0,{[Y]:da}],[()=>Ao,16],[1,{[J]:ie}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[0,{[J]:to}],[0,{[J]:Z}]],4],t.VersioningConfiguration$=[3,Q,Ii,0,[gn,Hr],[[0,{[X]:mn}],0]],t.WebsiteConfiguration$=[3,Q,zi,0,[Ze,jt,hr,jr],[()=>t.ErrorDocument$,()=>t.IndexDocument$,()=>t.RedirectAllRequestsTo$,[()=>as,0]]],t.WriteGetObjectResponseRequest$=[3,Q,`WriteGetObjectResponseRequest`,0,[`RequestRoute`,`RequestToken`,j,`StatusCode`,Xe,Qe,p,I,te,ne,re,ae,ge,Ae,L,R,z,ve,ye,Ie,rt,dt,qe,sn,vn,ln,Hn,Vn,Un,Qn,Pr,gr,Rr,ti,ri,ci,ai,Kr,_i,Li,C],[[0,{hostLabel:1,[J]:`x-amz-request-route`}],[0,{[J]:`x-amz-request-token`}],[()=>Ao,16],[1,{[J]:`x-amz-fwd-status`}],[0,{[J]:`x-amz-fwd-error-code`}],[0,{[J]:`x-amz-fwd-error-message`}],[0,{[J]:`x-amz-fwd-header-accept-ranges`}],[0,{[J]:`x-amz-fwd-header-Cache-Control`}],[0,{[J]:`x-amz-fwd-header-Content-Disposition`}],[0,{[J]:`x-amz-fwd-header-Content-Encoding`}],[0,{[J]:`x-amz-fwd-header-Content-Language`}],[1,{[J]:ie}],[0,{[J]:`x-amz-fwd-header-Content-Range`}],[0,{[J]:`x-amz-fwd-header-Content-Type`}],[0,{[J]:`x-amz-fwd-header-x-amz-checksum-crc32`}],[0,{[J]:`x-amz-fwd-header-x-amz-checksum-crc32c`}],[0,{[J]:`x-amz-fwd-header-x-amz-checksum-crc64nvme`}],[0,{[J]:`x-amz-fwd-header-x-amz-checksum-sha1`}],[0,{[J]:`x-amz-fwd-header-x-amz-checksum-sha256`}],[2,{[J]:`x-amz-fwd-header-x-amz-delete-marker`}],[0,{[J]:`x-amz-fwd-header-ETag`}],[4,{[J]:`x-amz-fwd-header-Expires`}],[0,{[J]:`x-amz-fwd-header-x-amz-expiration`}],[4,{[J]:`x-amz-fwd-header-Last-Modified`}],[1,{[J]:`x-amz-fwd-header-x-amz-missing-meta`}],[128,{[Zi]:Ga}],[0,{[J]:`x-amz-fwd-header-x-amz-object-lock-mode`}],[0,{[J]:`x-amz-fwd-header-x-amz-object-lock-legal-hold`}],[5,{[J]:`x-amz-fwd-header-x-amz-object-lock-retain-until-date`}],[1,{[J]:`x-amz-fwd-header-x-amz-mp-parts-count`}],[0,{[J]:`x-amz-fwd-header-x-amz-replication-status`}],[0,{[J]:`x-amz-fwd-header-x-amz-request-charged`}],[0,{[J]:`x-amz-fwd-header-x-amz-restore`}],[0,{[J]:`x-amz-fwd-header-x-amz-server-side-encryption`}],[0,{[J]:`x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm`}],[()=>ko,{[J]:`x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id`}],[0,{[J]:`x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5`}],[0,{[J]:`x-amz-fwd-header-x-amz-storage-class`}],[1,{[J]:`x-amz-fwd-header-x-amz-tagging-count`}],[0,{[J]:`x-amz-fwd-header-x-amz-version-id`}],[2,{[J]:`x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled`}]],2];var jo=`unit`,Mo=[1,Q,i,0,[()=>t.AnalyticsConfiguration$,0]],No=[1,Q,M,0,[()=>t.Bucket$,{[X]:v}]],Po=[1,Q,`CommonPrefixList`,0,()=>t.CommonPrefix$],Fo=[1,Q,`CompletedPartList`,0,()=>t.CompletedPart$],Io=[1,Q,fe,0,[()=>t.CORSRule$,0]],Lo=[1,Q,`DeletedObjects`,0,()=>t.DeletedObject$],Ro=[1,Q,Re,0,()=>t.DeleteMarkerEntry$],zo=[1,Q,`EncryptionTypeList`,0,[0,{[X]:nt}]],Bo=[1,Q,st,0,()=>t._Error$],Vo=[1,Q,`FilterRuleList`,0,()=>t.FilterRule$],Ho=[1,Q,_t,0,[()=>t.Grant$,{[X]:Et}]],Uo=[1,Q,Wt,0,[()=>t.IntelligentTieringConfiguration$,0]],Wo=[1,Q,At,0,[()=>t.InventoryConfiguration$,0]],Go=[1,Q,`InventoryOptionalFields`,0,[0,{[X]:`Field`}]],Ko=[1,Q,`LambdaFunctionConfigurationList`,0,[()=>t.LambdaFunctionConfiguration$,0]],qo=[1,Q,`LifecycleRules`,0,[()=>t.LifecycleRule$,0]],Jo=[1,Q,dn,0,[()=>t.MetricsConfiguration$,0]],Yo=[1,Q,`MultipartUploadList`,0,()=>t.MultipartUpload$],Xo=[1,Q,`NoncurrentVersionTransitionList`,0,()=>t.NoncurrentVersionTransition$],Zo=[1,Q,`ObjectIdentifierList`,0,()=>t.ObjectIdentifier$],Qo=[1,Q,`ObjectList`,0,[()=>t._Object$,0]],$o=[1,Q,`ObjectVersionList`,0,[()=>t.ObjectVersion$,0]],es=[1,Q,`OwnershipControlsRules`,0,()=>t.OwnershipControlsRule$],ts=[1,Q,rr,0,()=>t.Part$],ns=[1,Q,`PartsList`,0,()=>t.ObjectPart$],rs=[1,Q,`QueueConfigurationList`,0,[()=>t.QueueConfiguration$,0]],is=[1,Q,`ReplicationRules`,0,[()=>t.ReplicationRule$,0]],as=[1,Q,jr,0,[()=>t.RoutingRule$,{[X]:Nr}]],os=[1,Q,`ServerSideEncryptionRules`,0,[()=>t.ServerSideEncryptionRule$,0]],ss=[1,Q,wi,0,[()=>t.Tag$,{[X]:`Tag`}]],cs=[1,Q,bi,0,[()=>t.TargetGrant$,{[X]:Et}]],ls=[1,Q,`TieringList`,0,()=>t.Tiering$],us=[1,Q,`TopicConfigurationList`,0,[()=>t.TopicConfiguration$,0]],ds=[1,Q,`TransitionList`,0,()=>t.Transition$],fs=[1,Q,Pi,0,[()=>t.MetadataEntry$,{[X]:hn}]];t.AnalyticsFilter$=[4,Q,`AnalyticsFilter`,0,[Xn,`Tag`,`And`],[0,()=>t.Tag$,[()=>t.AnalyticsAndOperator$,0]]],t.MetricsFilter$=[4,Q,`MetricsFilter`,0,[Xn,`Tag`,f,`And`],[0,()=>t.Tag$,0,[()=>t.MetricsAndOperator$,0]]],t.ObjectEncryption$=[4,Q,Rn,0,[oi],[[()=>t.SSEKMSEncryption$,{[X]:Jr}]]],t.SelectObjectContentEventStream$=[4,Q,`SelectObjectContentEventStream`,{[ua]:1},[`Records`,mi,lr,`Cont`,`End`],[[()=>t.RecordsEvent$,0],[()=>t.StatsEvent$,0],[()=>t.ProgressEvent$,0],()=>t.ContinuationEvent$,()=>t.EndEvent$]],t.AbortMultipartUpload$=[9,Q,`AbortMultipartUpload`,{[q]:[`DELETE`,`/{Key+}?x-id=AbortMultipartUpload`,204]},()=>t.AbortMultipartUploadRequest$,()=>t.AbortMultipartUploadOutput$],t.CompleteMultipartUpload$=[9,Q,ce,{[q]:[`POST`,`/{Key+}`,200]},()=>t.CompleteMultipartUploadRequest$,()=>t.CompleteMultipartUploadOutput$],t.CopyObject$=[9,Q,`CopyObject`,{[q]:[`PUT`,`/{Key+}?x-id=CopyObject`,200]},()=>t.CopyObjectRequest$,()=>t.CopyObjectOutput$],t.CreateBucket$=[9,Q,`CreateBucket`,{[q]:[`PUT`,`/`,200]},()=>t.CreateBucketRequest$,()=>t.CreateBucketOutput$],t.CreateBucketMetadataConfiguration$=[9,Q,`CreateBucketMetadataConfiguration`,{[Ji]:`-`,[q]:[`POST`,`/?metadataConfiguration`,200]},()=>t.CreateBucketMetadataConfigurationRequest$,()=>jo],t.CreateBucketMetadataTableConfiguration$=[9,Q,`CreateBucketMetadataTableConfiguration`,{[Ji]:`-`,[q]:[`POST`,`/?metadataTable`,200]},()=>t.CreateBucketMetadataTableConfigurationRequest$,()=>jo],t.CreateMultipartUpload$=[9,Q,`CreateMultipartUpload`,{[q]:[`POST`,`/{Key+}?uploads`,200]},()=>t.CreateMultipartUploadRequest$,()=>t.CreateMultipartUploadOutput$],t.CreateSession$=[9,Q,`CreateSession`,{[q]:[`GET`,`/?session`,200]},()=>t.CreateSessionRequest$,()=>t.CreateSessionOutput$],t.DeleteBucket$=[9,Q,`DeleteBucket`,{[q]:[`DELETE`,`/`,204]},()=>t.DeleteBucketRequest$,()=>jo],t.DeleteBucketAnalyticsConfiguration$=[9,Q,`DeleteBucketAnalyticsConfiguration`,{[q]:[`DELETE`,`/?analytics`,204]},()=>t.DeleteBucketAnalyticsConfigurationRequest$,()=>jo],t.DeleteBucketCors$=[9,Q,`DeleteBucketCors`,{[q]:[`DELETE`,`/?cors`,204]},()=>t.DeleteBucketCorsRequest$,()=>jo],t.DeleteBucketEncryption$=[9,Q,`DeleteBucketEncryption`,{[q]:[`DELETE`,`/?encryption`,204]},()=>t.DeleteBucketEncryptionRequest$,()=>jo],t.DeleteBucketIntelligentTieringConfiguration$=[9,Q,`DeleteBucketIntelligentTieringConfiguration`,{[q]:[`DELETE`,`/?intelligent-tiering`,204]},()=>t.DeleteBucketIntelligentTieringConfigurationRequest$,()=>jo],t.DeleteBucketInventoryConfiguration$=[9,Q,`DeleteBucketInventoryConfiguration`,{[q]:[`DELETE`,`/?inventory`,204]},()=>t.DeleteBucketInventoryConfigurationRequest$,()=>jo],t.DeleteBucketLifecycle$=[9,Q,`DeleteBucketLifecycle`,{[q]:[`DELETE`,`/?lifecycle`,204]},()=>t.DeleteBucketLifecycleRequest$,()=>jo],t.DeleteBucketMetadataConfiguration$=[9,Q,`DeleteBucketMetadataConfiguration`,{[q]:[`DELETE`,`/?metadataConfiguration`,204]},()=>t.DeleteBucketMetadataConfigurationRequest$,()=>jo],t.DeleteBucketMetadataTableConfiguration$=[9,Q,`DeleteBucketMetadataTableConfiguration`,{[q]:[`DELETE`,`/?metadataTable`,204]},()=>t.DeleteBucketMetadataTableConfigurationRequest$,()=>jo],t.DeleteBucketMetricsConfiguration$=[9,Q,`DeleteBucketMetricsConfiguration`,{[q]:[`DELETE`,`/?metrics`,204]},()=>t.DeleteBucketMetricsConfigurationRequest$,()=>jo],t.DeleteBucketOwnershipControls$=[9,Q,`DeleteBucketOwnershipControls`,{[q]:[`DELETE`,`/?ownershipControls`,204]},()=>t.DeleteBucketOwnershipControlsRequest$,()=>jo],t.DeleteBucketPolicy$=[9,Q,`DeleteBucketPolicy`,{[q]:[`DELETE`,`/?policy`,204]},()=>t.DeleteBucketPolicyRequest$,()=>jo],t.DeleteBucketReplication$=[9,Q,`DeleteBucketReplication`,{[q]:[`DELETE`,`/?replication`,204]},()=>t.DeleteBucketReplicationRequest$,()=>jo],t.DeleteBucketTagging$=[9,Q,`DeleteBucketTagging`,{[q]:[`DELETE`,`/?tagging`,204]},()=>t.DeleteBucketTaggingRequest$,()=>jo],t.DeleteBucketWebsite$=[9,Q,`DeleteBucketWebsite`,{[q]:[`DELETE`,`/?website`,204]},()=>t.DeleteBucketWebsiteRequest$,()=>jo],t.DeleteObject$=[9,Q,`DeleteObject`,{[q]:[`DELETE`,`/{Key+}?x-id=DeleteObject`,204]},()=>t.DeleteObjectRequest$,()=>t.DeleteObjectOutput$],t.DeleteObjects$=[9,Q,`DeleteObjects`,{[Ji]:`-`,[q]:[`POST`,`/?delete`,200]},()=>t.DeleteObjectsRequest$,()=>t.DeleteObjectsOutput$],t.DeleteObjectTagging$=[9,Q,`DeleteObjectTagging`,{[q]:[`DELETE`,`/{Key+}?tagging`,204]},()=>t.DeleteObjectTaggingRequest$,()=>t.DeleteObjectTaggingOutput$],t.DeletePublicAccessBlock$=[9,Q,`DeletePublicAccessBlock`,{[q]:[`DELETE`,`/?publicAccessBlock`,204]},()=>t.DeletePublicAccessBlockRequest$,()=>jo],t.GetBucketAbac$=[9,Q,`GetBucketAbac`,{[q]:[`GET`,`/?abac`,200]},()=>t.GetBucketAbacRequest$,()=>t.GetBucketAbacOutput$],t.GetBucketAccelerateConfiguration$=[9,Q,`GetBucketAccelerateConfiguration`,{[q]:[`GET`,`/?accelerate`,200]},()=>t.GetBucketAccelerateConfigurationRequest$,()=>t.GetBucketAccelerateConfigurationOutput$],t.GetBucketAcl$=[9,Q,`GetBucketAcl`,{[q]:[`GET`,`/?acl`,200]},()=>t.GetBucketAclRequest$,()=>t.GetBucketAclOutput$],t.GetBucketAnalyticsConfiguration$=[9,Q,`GetBucketAnalyticsConfiguration`,{[q]:[`GET`,`/?analytics&x-id=GetBucketAnalyticsConfiguration`,200]},()=>t.GetBucketAnalyticsConfigurationRequest$,()=>t.GetBucketAnalyticsConfigurationOutput$],t.GetBucketCors$=[9,Q,`GetBucketCors`,{[q]:[`GET`,`/?cors`,200]},()=>t.GetBucketCorsRequest$,()=>t.GetBucketCorsOutput$],t.GetBucketEncryption$=[9,Q,`GetBucketEncryption`,{[q]:[`GET`,`/?encryption`,200]},()=>t.GetBucketEncryptionRequest$,()=>t.GetBucketEncryptionOutput$],t.GetBucketIntelligentTieringConfiguration$=[9,Q,`GetBucketIntelligentTieringConfiguration`,{[q]:[`GET`,`/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration`,200]},()=>t.GetBucketIntelligentTieringConfigurationRequest$,()=>t.GetBucketIntelligentTieringConfigurationOutput$],t.GetBucketInventoryConfiguration$=[9,Q,`GetBucketInventoryConfiguration`,{[q]:[`GET`,`/?inventory&x-id=GetBucketInventoryConfiguration`,200]},()=>t.GetBucketInventoryConfigurationRequest$,()=>t.GetBucketInventoryConfigurationOutput$],t.GetBucketLifecycleConfiguration$=[9,Q,`GetBucketLifecycleConfiguration`,{[q]:[`GET`,`/?lifecycle`,200]},()=>t.GetBucketLifecycleConfigurationRequest$,()=>t.GetBucketLifecycleConfigurationOutput$],t.GetBucketLocation$=[9,Q,`GetBucketLocation`,{[q]:[`GET`,`/?location`,200]},()=>t.GetBucketLocationRequest$,()=>t.GetBucketLocationOutput$],t.GetBucketLogging$=[9,Q,`GetBucketLogging`,{[q]:[`GET`,`/?logging`,200]},()=>t.GetBucketLoggingRequest$,()=>t.GetBucketLoggingOutput$],t.GetBucketMetadataConfiguration$=[9,Q,`GetBucketMetadataConfiguration`,{[q]:[`GET`,`/?metadataConfiguration`,200]},()=>t.GetBucketMetadataConfigurationRequest$,()=>t.GetBucketMetadataConfigurationOutput$],t.GetBucketMetadataTableConfiguration$=[9,Q,`GetBucketMetadataTableConfiguration`,{[q]:[`GET`,`/?metadataTable`,200]},()=>t.GetBucketMetadataTableConfigurationRequest$,()=>t.GetBucketMetadataTableConfigurationOutput$],t.GetBucketMetricsConfiguration$=[9,Q,`GetBucketMetricsConfiguration`,{[q]:[`GET`,`/?metrics&x-id=GetBucketMetricsConfiguration`,200]},()=>t.GetBucketMetricsConfigurationRequest$,()=>t.GetBucketMetricsConfigurationOutput$],t.GetBucketNotificationConfiguration$=[9,Q,`GetBucketNotificationConfiguration`,{[q]:[`GET`,`/?notification`,200]},()=>t.GetBucketNotificationConfigurationRequest$,()=>t.NotificationConfiguration$],t.GetBucketOwnershipControls$=[9,Q,`GetBucketOwnershipControls`,{[q]:[`GET`,`/?ownershipControls`,200]},()=>t.GetBucketOwnershipControlsRequest$,()=>t.GetBucketOwnershipControlsOutput$],t.GetBucketPolicy$=[9,Q,`GetBucketPolicy`,{[q]:[`GET`,`/?policy`,200]},()=>t.GetBucketPolicyRequest$,()=>t.GetBucketPolicyOutput$],t.GetBucketPolicyStatus$=[9,Q,`GetBucketPolicyStatus`,{[q]:[`GET`,`/?policyStatus`,200]},()=>t.GetBucketPolicyStatusRequest$,()=>t.GetBucketPolicyStatusOutput$],t.GetBucketReplication$=[9,Q,`GetBucketReplication`,{[q]:[`GET`,`/?replication`,200]},()=>t.GetBucketReplicationRequest$,()=>t.GetBucketReplicationOutput$],t.GetBucketRequestPayment$=[9,Q,`GetBucketRequestPayment`,{[q]:[`GET`,`/?requestPayment`,200]},()=>t.GetBucketRequestPaymentRequest$,()=>t.GetBucketRequestPaymentOutput$],t.GetBucketTagging$=[9,Q,`GetBucketTagging`,{[q]:[`GET`,`/?tagging`,200]},()=>t.GetBucketTaggingRequest$,()=>t.GetBucketTaggingOutput$],t.GetBucketVersioning$=[9,Q,`GetBucketVersioning`,{[q]:[`GET`,`/?versioning`,200]},()=>t.GetBucketVersioningRequest$,()=>t.GetBucketVersioningOutput$],t.GetBucketWebsite$=[9,Q,`GetBucketWebsite`,{[q]:[`GET`,`/?website`,200]},()=>t.GetBucketWebsiteRequest$,()=>t.GetBucketWebsiteOutput$],t.GetObject$=[9,Q,`GetObject`,{[Ji]:`-`,[q]:[`GET`,`/{Key+}?x-id=GetObject`,200]},()=>t.GetObjectRequest$,()=>t.GetObjectOutput$],t.GetObjectAcl$=[9,Q,`GetObjectAcl`,{[q]:[`GET`,`/{Key+}?acl`,200]},()=>t.GetObjectAclRequest$,()=>t.GetObjectAclOutput$],t.GetObjectAttributes$=[9,Q,`GetObjectAttributes`,{[q]:[`GET`,`/{Key+}?attributes`,200]},()=>t.GetObjectAttributesRequest$,()=>t.GetObjectAttributesOutput$],t.GetObjectLegalHold$=[9,Q,`GetObjectLegalHold`,{[q]:[`GET`,`/{Key+}?legal-hold`,200]},()=>t.GetObjectLegalHoldRequest$,()=>t.GetObjectLegalHoldOutput$],t.GetObjectLockConfiguration$=[9,Q,`GetObjectLockConfiguration`,{[q]:[`GET`,`/?object-lock`,200]},()=>t.GetObjectLockConfigurationRequest$,()=>t.GetObjectLockConfigurationOutput$],t.GetObjectRetention$=[9,Q,`GetObjectRetention`,{[q]:[`GET`,`/{Key+}?retention`,200]},()=>t.GetObjectRetentionRequest$,()=>t.GetObjectRetentionOutput$],t.GetObjectTagging$=[9,Q,`GetObjectTagging`,{[q]:[`GET`,`/{Key+}?tagging`,200]},()=>t.GetObjectTaggingRequest$,()=>t.GetObjectTaggingOutput$],t.GetObjectTorrent$=[9,Q,`GetObjectTorrent`,{[q]:[`GET`,`/{Key+}?torrent`,200]},()=>t.GetObjectTorrentRequest$,()=>t.GetObjectTorrentOutput$],t.GetPublicAccessBlock$=[9,Q,`GetPublicAccessBlock`,{[q]:[`GET`,`/?publicAccessBlock`,200]},()=>t.GetPublicAccessBlockRequest$,()=>t.GetPublicAccessBlockOutput$],t.HeadBucket$=[9,Q,`HeadBucket`,{[q]:[`HEAD`,`/`,200]},()=>t.HeadBucketRequest$,()=>t.HeadBucketOutput$],t.HeadObject$=[9,Q,`HeadObject`,{[q]:[`HEAD`,`/{Key+}`,200]},()=>t.HeadObjectRequest$,()=>t.HeadObjectOutput$],t.ListBucketAnalyticsConfigurations$=[9,Q,`ListBucketAnalyticsConfigurations`,{[q]:[`GET`,`/?analytics&x-id=ListBucketAnalyticsConfigurations`,200]},()=>t.ListBucketAnalyticsConfigurationsRequest$,()=>t.ListBucketAnalyticsConfigurationsOutput$],t.ListBucketIntelligentTieringConfigurations$=[9,Q,`ListBucketIntelligentTieringConfigurations`,{[q]:[`GET`,`/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations`,200]},()=>t.ListBucketIntelligentTieringConfigurationsRequest$,()=>t.ListBucketIntelligentTieringConfigurationsOutput$],t.ListBucketInventoryConfigurations$=[9,Q,`ListBucketInventoryConfigurations`,{[q]:[`GET`,`/?inventory&x-id=ListBucketInventoryConfigurations`,200]},()=>t.ListBucketInventoryConfigurationsRequest$,()=>t.ListBucketInventoryConfigurationsOutput$],t.ListBucketMetricsConfigurations$=[9,Q,`ListBucketMetricsConfigurations`,{[q]:[`GET`,`/?metrics&x-id=ListBucketMetricsConfigurations`,200]},()=>t.ListBucketMetricsConfigurationsRequest$,()=>t.ListBucketMetricsConfigurationsOutput$],t.ListBuckets$=[9,Q,`ListBuckets`,{[q]:[`GET`,`/?x-id=ListBuckets`,200]},()=>t.ListBucketsRequest$,()=>t.ListBucketsOutput$],t.ListDirectoryBuckets$=[9,Q,`ListDirectoryBuckets`,{[q]:[`GET`,`/?x-id=ListDirectoryBuckets`,200]},()=>t.ListDirectoryBucketsRequest$,()=>t.ListDirectoryBucketsOutput$],t.ListMultipartUploads$=[9,Q,`ListMultipartUploads`,{[q]:[`GET`,`/?uploads`,200]},()=>t.ListMultipartUploadsRequest$,()=>t.ListMultipartUploadsOutput$],t.ListObjects$=[9,Q,`ListObjects`,{[q]:[`GET`,`/`,200]},()=>t.ListObjectsRequest$,()=>t.ListObjectsOutput$],t.ListObjectsV2$=[9,Q,`ListObjectsV2`,{[q]:[`GET`,`/?list-type=2`,200]},()=>t.ListObjectsV2Request$,()=>t.ListObjectsV2Output$],t.ListObjectVersions$=[9,Q,`ListObjectVersions`,{[q]:[`GET`,`/?versions`,200]},()=>t.ListObjectVersionsRequest$,()=>t.ListObjectVersionsOutput$],t.ListParts$=[9,Q,`ListParts`,{[q]:[`GET`,`/{Key+}?x-id=ListParts`,200]},()=>t.ListPartsRequest$,()=>t.ListPartsOutput$],t.PutBucketAbac$=[9,Q,`PutBucketAbac`,{[Ji]:`-`,[q]:[`PUT`,`/?abac`,200]},()=>t.PutBucketAbacRequest$,()=>jo],t.PutBucketAccelerateConfiguration$=[9,Q,`PutBucketAccelerateConfiguration`,{[Ji]:`-`,[q]:[`PUT`,`/?accelerate`,200]},()=>t.PutBucketAccelerateConfigurationRequest$,()=>jo],t.PutBucketAcl$=[9,Q,`PutBucketAcl`,{[Ji]:`-`,[q]:[`PUT`,`/?acl`,200]},()=>t.PutBucketAclRequest$,()=>jo],t.PutBucketAnalyticsConfiguration$=[9,Q,`PutBucketAnalyticsConfiguration`,{[q]:[`PUT`,`/?analytics`,200]},()=>t.PutBucketAnalyticsConfigurationRequest$,()=>jo],t.PutBucketCors$=[9,Q,`PutBucketCors`,{[Ji]:`-`,[q]:[`PUT`,`/?cors`,200]},()=>t.PutBucketCorsRequest$,()=>jo],t.PutBucketEncryption$=[9,Q,`PutBucketEncryption`,{[Ji]:`-`,[q]:[`PUT`,`/?encryption`,200]},()=>t.PutBucketEncryptionRequest$,()=>jo],t.PutBucketIntelligentTieringConfiguration$=[9,Q,`PutBucketIntelligentTieringConfiguration`,{[q]:[`PUT`,`/?intelligent-tiering`,200]},()=>t.PutBucketIntelligentTieringConfigurationRequest$,()=>jo],t.PutBucketInventoryConfiguration$=[9,Q,`PutBucketInventoryConfiguration`,{[q]:[`PUT`,`/?inventory`,200]},()=>t.PutBucketInventoryConfigurationRequest$,()=>jo],t.PutBucketLifecycleConfiguration$=[9,Q,`PutBucketLifecycleConfiguration`,{[Ji]:`-`,[q]:[`PUT`,`/?lifecycle`,200]},()=>t.PutBucketLifecycleConfigurationRequest$,()=>t.PutBucketLifecycleConfigurationOutput$],t.PutBucketLogging$=[9,Q,`PutBucketLogging`,{[Ji]:`-`,[q]:[`PUT`,`/?logging`,200]},()=>t.PutBucketLoggingRequest$,()=>jo],t.PutBucketMetricsConfiguration$=[9,Q,`PutBucketMetricsConfiguration`,{[q]:[`PUT`,`/?metrics`,200]},()=>t.PutBucketMetricsConfigurationRequest$,()=>jo],t.PutBucketNotificationConfiguration$=[9,Q,`PutBucketNotificationConfiguration`,{[q]:[`PUT`,`/?notification`,200]},()=>t.PutBucketNotificationConfigurationRequest$,()=>jo],t.PutBucketOwnershipControls$=[9,Q,`PutBucketOwnershipControls`,{[Ji]:`-`,[q]:[`PUT`,`/?ownershipControls`,200]},()=>t.PutBucketOwnershipControlsRequest$,()=>jo],t.PutBucketPolicy$=[9,Q,`PutBucketPolicy`,{[Ji]:`-`,[q]:[`PUT`,`/?policy`,200]},()=>t.PutBucketPolicyRequest$,()=>jo],t.PutBucketReplication$=[9,Q,`PutBucketReplication`,{[Ji]:`-`,[q]:[`PUT`,`/?replication`,200]},()=>t.PutBucketReplicationRequest$,()=>jo],t.PutBucketRequestPayment$=[9,Q,`PutBucketRequestPayment`,{[Ji]:`-`,[q]:[`PUT`,`/?requestPayment`,200]},()=>t.PutBucketRequestPaymentRequest$,()=>jo],t.PutBucketTagging$=[9,Q,`PutBucketTagging`,{[Ji]:`-`,[q]:[`PUT`,`/?tagging`,200]},()=>t.PutBucketTaggingRequest$,()=>jo],t.PutBucketVersioning$=[9,Q,`PutBucketVersioning`,{[Ji]:`-`,[q]:[`PUT`,`/?versioning`,200]},()=>t.PutBucketVersioningRequest$,()=>jo],t.PutBucketWebsite$=[9,Q,`PutBucketWebsite`,{[Ji]:`-`,[q]:[`PUT`,`/?website`,200]},()=>t.PutBucketWebsiteRequest$,()=>jo],t.PutObject$=[9,Q,`PutObject`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?x-id=PutObject`,200]},()=>t.PutObjectRequest$,()=>t.PutObjectOutput$],t.PutObjectAcl$=[9,Q,`PutObjectAcl`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?acl`,200]},()=>t.PutObjectAclRequest$,()=>t.PutObjectAclOutput$],t.PutObjectLegalHold$=[9,Q,`PutObjectLegalHold`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?legal-hold`,200]},()=>t.PutObjectLegalHoldRequest$,()=>t.PutObjectLegalHoldOutput$],t.PutObjectLockConfiguration$=[9,Q,`PutObjectLockConfiguration`,{[Ji]:`-`,[q]:[`PUT`,`/?object-lock`,200]},()=>t.PutObjectLockConfigurationRequest$,()=>t.PutObjectLockConfigurationOutput$],t.PutObjectRetention$=[9,Q,`PutObjectRetention`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?retention`,200]},()=>t.PutObjectRetentionRequest$,()=>t.PutObjectRetentionOutput$],t.PutObjectTagging$=[9,Q,`PutObjectTagging`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?tagging`,200]},()=>t.PutObjectTaggingRequest$,()=>t.PutObjectTaggingOutput$],t.PutPublicAccessBlock$=[9,Q,`PutPublicAccessBlock`,{[Ji]:`-`,[q]:[`PUT`,`/?publicAccessBlock`,200]},()=>t.PutPublicAccessBlockRequest$,()=>jo],t.RenameObject$=[9,Q,`RenameObject`,{[q]:[`PUT`,`/{Key+}?renameObject`,200]},()=>t.RenameObjectRequest$,()=>t.RenameObjectOutput$],t.RestoreObject$=[9,Q,`RestoreObject`,{[Ji]:`-`,[q]:[`POST`,`/{Key+}?restore`,200]},()=>t.RestoreObjectRequest$,()=>t.RestoreObjectOutput$],t.SelectObjectContent$=[9,Q,`SelectObjectContent`,{[q]:[`POST`,`/{Key+}?select&select-type=2`,200]},()=>t.SelectObjectContentRequest$,()=>t.SelectObjectContentOutput$],t.UpdateBucketMetadataInventoryTableConfiguration$=[9,Q,`UpdateBucketMetadataInventoryTableConfiguration`,{[Ji]:`-`,[q]:[`PUT`,`/?metadataInventoryTable`,200]},()=>t.UpdateBucketMetadataInventoryTableConfigurationRequest$,()=>jo],t.UpdateBucketMetadataJournalTableConfiguration$=[9,Q,`UpdateBucketMetadataJournalTableConfiguration`,{[Ji]:`-`,[q]:[`PUT`,`/?metadataJournalTable`,200]},()=>t.UpdateBucketMetadataJournalTableConfigurationRequest$,()=>jo],t.UpdateObjectEncryption$=[9,Q,`UpdateObjectEncryption`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?encryption`,200]},()=>t.UpdateObjectEncryptionRequest$,()=>t.UpdateObjectEncryptionResponse$],t.UploadPart$=[9,Q,`UploadPart`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?x-id=UploadPart`,200]},()=>t.UploadPartRequest$,()=>t.UploadPartOutput$],t.UploadPartCopy$=[9,Q,`UploadPartCopy`,{[q]:[`PUT`,`/{Key+}?x-id=UploadPartCopy`,200]},()=>t.UploadPartCopyRequest$,()=>t.UploadPartCopyOutput$],t.WriteGetObjectResponse$=[9,Q,`WriteGetObjectResponse`,{endpoint:[`{RequestRoute}.`],[q]:[`POST`,`/WriteGetObjectResponse`,200]},()=>t.WriteGetObjectResponseRequest$,()=>jo]})),Us=i(((e,t)=>{t.exports={name:`@aws-sdk/client-s3`,description:`AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native`,version:`3.1031.0`,scripts:{build:`concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs`,"build:cjs":`node ../../scripts/compilation/inline client-s3`,"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`,"extract:docs":`api-extractor run --local`,"generate:client":`node ../../scripts/generate-clients/single-service --solo s3`,test:`yarn g:vitest run`,"test:browser":`node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.mts`,"test:browser:watch":`node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.mts`,"test:e2e":`yarn g:vitest run -c vitest.config.e2e.mts && yarn test:browser`,"test:e2e:watch":`yarn g:vitest watch -c vitest.config.e2e.mts`,"test:index":`tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs`,"test:integration":`yarn g:vitest run -c vitest.config.integ.mts`,"test:integration:watch":`yarn g:vitest watch -c vitest.config.integ.mts`,"test:watch":`yarn g:vitest watch`},main:`./dist-cjs/index.js`,types:`./dist-types/index.d.ts`,module:`./dist-es/index.js`,sideEffects:!1,dependencies:{"@aws-crypto/sha1-browser":`5.2.0`,"@aws-crypto/sha256-browser":`5.2.0`,"@aws-crypto/sha256-js":`5.2.0`,"@aws-sdk/core":`^3.974.0`,"@aws-sdk/credential-provider-node":`^3.972.31`,"@aws-sdk/middleware-bucket-endpoint":`^3.972.10`,"@aws-sdk/middleware-expect-continue":`^3.972.10`,"@aws-sdk/middleware-flexible-checksums":`^3.974.8`,"@aws-sdk/middleware-host-header":`^3.972.10`,"@aws-sdk/middleware-location-constraint":`^3.972.10`,"@aws-sdk/middleware-logger":`^3.972.10`,"@aws-sdk/middleware-recursion-detection":`^3.972.11`,"@aws-sdk/middleware-sdk-s3":`^3.972.29`,"@aws-sdk/middleware-ssec":`^3.972.10`,"@aws-sdk/middleware-user-agent":`^3.972.30`,"@aws-sdk/region-config-resolver":`^3.972.12`,"@aws-sdk/signature-v4-multi-region":`^3.996.17`,"@aws-sdk/types":`^3.973.8`,"@aws-sdk/util-endpoints":`^3.996.7`,"@aws-sdk/util-user-agent-browser":`^3.972.10`,"@aws-sdk/util-user-agent-node":`^3.973.16`,"@smithy/config-resolver":`^4.4.16`,"@smithy/core":`^3.23.15`,"@smithy/eventstream-serde-browser":`^4.2.14`,"@smithy/eventstream-serde-config-resolver":`^4.3.14`,"@smithy/eventstream-serde-node":`^4.2.14`,"@smithy/fetch-http-handler":`^5.3.17`,"@smithy/hash-blob-browser":`^4.2.15`,"@smithy/hash-node":`^4.2.14`,"@smithy/hash-stream-node":`^4.2.14`,"@smithy/invalid-dependency":`^4.2.14`,"@smithy/md5-js":`^4.2.14`,"@smithy/middleware-content-length":`^4.2.14`,"@smithy/middleware-endpoint":`^4.4.30`,"@smithy/middleware-retry":`^4.5.3`,"@smithy/middleware-serde":`^4.2.18`,"@smithy/middleware-stack":`^4.2.14`,"@smithy/node-config-provider":`^4.3.14`,"@smithy/node-http-handler":`^4.5.3`,"@smithy/protocol-http":`^5.3.14`,"@smithy/smithy-client":`^4.12.11`,"@smithy/types":`^4.14.1`,"@smithy/url-parser":`^4.2.14`,"@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.47`,"@smithy/util-defaults-mode-node":`^4.2.52`,"@smithy/util-endpoints":`^3.4.1`,"@smithy/util-middleware":`^4.2.14`,"@smithy/util-retry":`^4.3.2`,"@smithy/util-stream":`^4.5.23`,"@smithy/util-utf8":`^4.2.2`,"@smithy/util-waiter":`^4.2.16`,tslib:`^2.6.2`},devDependencies:{"@aws-sdk/signature-v4-crt":`3.1031.0`,"@smithy/snapshot-testing":`^2.0.6`,"@tsconfig/node20":`20.1.8`,"@types/node":`^20.14.8`,concurrently:`7.0.0`,"downlevel-dts":`0.10.1`,premove:`4.0.0`,typescript:`~5.8.3`,vitest:`^4.0.17`},engines:{node:`>=20.0.0`},typesVersions:{"<4.5":{"dist-types/*":[`dist-types/ts3.4/*`]}},files:[`dist-*/**`],author:{name:`AWS SDK for JavaScript Team`,url:`https://aws.amazon.com/javascript/`},license:`Apache-2.0`,browser:{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.browser`},"react-native":{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.native`},homepage:`https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3`,repository:{type:`git`,url:`https://github.com/aws/aws-sdk-js-v3.git`,directory:`clients/client-s3`}}})),Ws=i((e=>{var t=oe(),r=H(),i=ie();let a=`AWS_EC2_METADATA_DISABLED`,o=async e=>{let{ENV_CMDS_FULL_URI:t,ENV_CMDS_RELATIVE_URI:i,fromContainerMetadata:o,fromInstanceMetadata:s}=await import(`./dist-cjs-Cp2qKG5f.js`).then(e=>n(e.default));if(process.env[i]||process.env[t]){e.logger?.debug(`@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata`);let{fromHttp:t}=await import(`./dist-cjs-B9IZmIkA.js`).then(e=>n(e.default));return r.chain(t(e),o(e))}return process.env[a]&&process.env[a]!==`false`?async()=>{throw new r.CredentialsProviderError(`EC2 Instance Metadata Service access disabled`,{logger:e.logger})}:(e.logger?.debug(`@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata`),s(e))};function s(e,t){let n=c(e),r,i,a,o=async e=>{if(e?.forceRefresh)return await n(e);if(a?.expiration&&a?.expiration?.getTime(){a=e}).finally(()=>{i=void 0});else return r=n(e).then(e=>{a=e}).finally(()=>{r=void 0}),o(e);return a};return o}let c=e=>async t=>{let n;for(let r of e)try{return await r(t)}catch(e){if(n=e,e?.tryNextLink)continue;throw e}throw n},l=!1,u=(e={})=>s([async()=>{if(e.profile??process.env[i.ENV_PROFILE])throw process.env[t.ENV_KEY]&&process.env[t.ENV_SECRET]&&(l||=((e.logger?.warn&&e.logger?.constructor?.name!==`NoOpLogger`?e.logger.warn.bind(e.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING: + 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. + + 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. +`),!0)),new r.CredentialsProviderError(`AWS_PROFILE is set, skipping fromEnv provider.`,{logger:e.logger,tryNextLink:!0});return e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv`),t.fromEnv(e)()},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromSSO`);let{ssoStartUrl:i,ssoAccountId:a,ssoRegion:o,ssoRoleName:s,ssoSession:c}=e;if(!i&&!a&&!o&&!s&&!c)throw new r.CredentialsProviderError(`Skipping SSO provider in default chain (inputs do not include SSO fields).`,{logger:e.logger});let{fromSSO:l}=await import(`./dist-cjs-DiCA1R3I.js`).then(e=>n(e.default));return l(e)(t)},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromIni`);let{fromIni:r}=await import(`./dist-cjs-Cv87UihW.js`).then(e=>n(e.default));return r(e)(t)},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromProcess`);let{fromProcess:r}=await import(`./dist-cjs-Bvzte9iG.js`).then(e=>n(e.default));return r(e)(t)},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile`);let{fromTokenFile:r}=await import(`./dist-cjs-PmUTcsyT.js`).then(e=>n(e.default));return r(e)(t)},async()=>(e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::remoteProvider`),(await o(e))()),async()=>{throw new r.CredentialsProviderError(`Could not load credentials from any providers`,{tryNextLink:!1,logger:e.logger})}],f),d=e=>e?.expiration!==void 0,f=e=>e?.expiration!==void 0&&e.expiration.getTime()-Date.now()<3e5;e.credentialsTreatedAsExpired=f,e.credentialsWillNeedRefresh=d,e.defaultProvider=u})),Gs=i((e=>{var t=E(),n=Ns(),r=a();let i=`AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS`,o=`s3_disable_multiregion_access_points`,s={environmentVariableSelector:e=>t.booleanSelector(e,i,t.SelectorType.ENV),configFileSelector:e=>t.booleanSelector(e,o,t.SelectorType.CONFIG),default:!1},c=`AWS_S3_USE_ARN_REGION`,l=`s3_use_arn_region`,u={environmentVariableSelector:e=>t.booleanSelector(e,c,t.SelectorType.ENV),configFileSelector:e=>t.booleanSelector(e,l,t.SelectorType.CONFIG),default:void 0},d=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,f=/(\d+\.){3}\d+/,p=/\.\./,m=/\./,h=/^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./,g=/^s3(-external-1)?\.amazonaws\.com$/,v=`amazonaws.com`,y=e=>typeof e.bucketName==`string`,b=e=>d.test(e)&&!f.test(e)&&!p.test(e),x=e=>{let t=e.match(h);return[t[4],e.replace(RegExp(`^${t[0]}`),``)]},S=e=>g.test(e)?[`us-east-1`,v]:x(e),C=e=>g.test(e)?[e.replace(`.${v}`,``),v]:x(e),w=e=>{if(e.pathStyleEndpoint)throw Error(`Path-style S3 endpoint is not supported when bucket is an ARN`);if(e.accelerateEndpoint)throw Error(`Accelerate endpoint is not supported when bucket is an ARN`);if(!e.tlsCompatible)throw Error(`HTTPS is required when bucket is an ARN`)},T=e=>{if(e!==`s3`&&e!==`s3-outposts`&&e!==`s3-object-lambda`)throw Error(`Expect 's3' or 's3-outposts' or 's3-object-lambda' in ARN service component`)},D=e=>{if(e!==`s3`)throw Error(`Expect 's3' in Accesspoint ARN service component`)},O=e=>{if(e!==`s3-outposts`)throw Error(`Expect 's3-posts' in Outpost ARN service component`)},k=(e,t)=>{if(e!==t.clientPartition)throw Error(`Partition in ARN is incompatible, got "${e}" but expected "${t.clientPartition}"`)},A=(e,t)=>{},j=e=>{if([`s3-external-1`,`aws-global`].includes(e))throw Error(`Client region ${e} is not regional`)},M=e=>{if(!/[0-9]{12}/.exec(e))throw Error(`Access point ARN accountID does not match regex '[0-9]{12}'`)},N=(e,t={tlsCompatible:!0})=>{if(e.length>=64||!/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(e)||/(\d+\.){3}\d+/.test(e)||/[.-]{2}/.test(e)||t?.tlsCompatible&&m.test(e))throw Error(`Invalid DNS label ${e}`)},P=e=>{if(e.isCustomEndpoint){if(e.dualstackEndpoint)throw Error(`Dualstack endpoint is not supported with custom endpoint`);if(e.accelerateEndpoint)throw Error(`Accelerate endpoint is not supported with custom endpoint`)}},F=e=>{let t=e.includes(`:`)?`:`:`/`,[n,...r]=e.split(t);if(n===`accesspoint`){if(r.length!==1||r[0]===``)throw Error(`Access Point ARN should have one resource accesspoint${t}{accesspointname}`);return{accesspointName:r[0]}}else if(n===`outpost`){if(!r[0]||r[1]!==`accesspoint`||!r[2]||r.length!==3)throw Error(`Outpost ARN should have resource outpost${t}{outpostId}${t}accesspoint${t}{accesspointName}`);let[e,n,i]=r;return{outpostId:e,accesspointName:i}}else throw Error(`ARN resource should begin with 'accesspoint${t}' or 'outpost${t}'`)},I=e=>{},L=e=>{if(e)throw Error(`FIPS region is not supported with Outpost.`)},R=e=>{try{e.split(`.`).forEach(e=>{N(e)})}catch{throw Error(`"${e}" is not a DNS compatible name.`)}},z=e=>(P(e),y(e)?ee(e):B(e)),ee=({accelerateEndpoint:e=!1,clientRegion:t,baseHostname:n,bucketName:r,dualstackEndpoint:i=!1,fipsEndpoint:a=!1,pathStyleEndpoint:o=!1,tlsCompatible:s=!0,isCustomEndpoint:c=!1})=>{let[l,u]=c?[t,n]:S(n);return o||!b(r)||s&&m.test(r)?{bucketEndpoint:!1,hostname:i?`s3.dualstack.${l}.${u}`:n}:(e?n=`s3-accelerate${i?`.dualstack`:``}.${u}`:i&&(n=`s3.dualstack.${l}.${u}`),{bucketEndpoint:!0,hostname:`${r}.${n}`})},B=e=>{let{isCustomEndpoint:t,baseHostname:n,clientRegion:r}=e,i=t?n:C(n)[1],{pathStyleEndpoint:a,accelerateEndpoint:o=!1,fipsEndpoint:s=!1,tlsCompatible:c=!0,bucketName:l,clientPartition:u=`aws`}=e;w({pathStyleEndpoint:a,accelerateEndpoint:o,tlsCompatible:c});let{service:d,partition:f,accountId:p,region:m,resource:h}=l;T(d),k(f,{clientPartition:u}),M(p);let{accesspointName:g,outpostId:v}=F(h);return d===`s3-object-lambda`?te({...e,tlsCompatible:c,bucketName:l,accesspointName:g,hostnameSuffix:i}):m===``?V({...e,mrapAlias:g,hostnameSuffix:i}):v?ne({...e,clientRegion:r,outpostId:v,accesspointName:g,hostnameSuffix:i}):re({...e,clientRegion:r,accesspointName:g,hostnameSuffix:i})},te=({dualstackEndpoint:e=!1,fipsEndpoint:t=!1,tlsCompatible:n=!0,useArnRegion:r,clientRegion:i,clientSigningRegion:a=i,accesspointName:o,bucketName:s,hostnameSuffix:c})=>{let{accountId:l,region:u,service:d}=s;j(i);let f=`${o}-${l}`;N(f,{tlsCompatible:n});let p=r?u:i,m=r?u:a;return{bucketEndpoint:!0,hostname:`${f}.${d}${t?`-fips`:``}.${p}.${c}`,signingRegion:m,signingService:d}},V=({disableMultiregionAccessPoints:e,dualstackEndpoint:t=!1,isCustomEndpoint:n,mrapAlias:r,hostnameSuffix:i})=>{if(e===!0)throw Error(`SDK is attempting to use a MRAP ARN. Please enable to feature.`);return R(r),{bucketEndpoint:!0,hostname:`${r}${n?``:`.accesspoint.s3-global`}.${i}`,signingRegion:`*`}},ne=({useArnRegion:e,clientRegion:t,clientSigningRegion:n=t,bucketName:r,outpostId:i,dualstackEndpoint:a=!1,fipsEndpoint:o=!1,tlsCompatible:s=!0,accesspointName:c,isCustomEndpoint:l,hostnameSuffix:u})=>{j(t);let d=`${c}-${r.accountId}`;N(d,{tlsCompatible:s});let f=e?r.region:t,p=e?r.region:n;return O(r.service),N(i,{tlsCompatible:s}),L(o),{bucketEndpoint:!0,hostname:`${`${d}.${i}`}${l?``:`.s3-outposts.${f}`}.${u}`,signingRegion:p,signingService:`s3-outposts`}},re=({useArnRegion:e,clientRegion:t,clientSigningRegion:n=t,bucketName:r,dualstackEndpoint:i=!1,fipsEndpoint:a=!1,tlsCompatible:o=!0,accesspointName:s,isCustomEndpoint:c,hostnameSuffix:l})=>{j(t);let u=`${s}-${r.accountId}`;N(u,{tlsCompatible:o});let d=e?r.region:t,f=e?r.region:n;return D(r.service),{bucketEndpoint:!0,hostname:`${u}${c?``:`.s3-accesspoint${a?`-fips`:``}${i?`.dualstack`:``}.${d}`}.${l}`,signingRegion:f}},H=e=>(t,i)=>async a=>{let{Bucket:o}=a.input,s=e.bucketEndpoint,c=a.request;if(r.HttpRequest.isInstance(c)){if(e.bucketEndpoint)c.hostname=o;else if(n.validate(o)){let t=n.parse(o),r=await e.region(),a=await e.useDualstackEndpoint(),l=await e.useFipsEndpoint(),{partition:u,signingRegion:d=r}=await e.regionInfoProvider(r,{useDualstackEndpoint:a,useFipsEndpoint:l})||{},f=await e.useArnRegion(),{hostname:p,bucketEndpoint:m,signingRegion:h,signingService:g}=z({bucketName:t,baseHostname:c.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:a,fipsEndpoint:l,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:c.protocol===`https:`,useArnRegion:f,clientPartition:u,clientSigningRegion:d,clientRegion:r,isCustomEndpoint:e.isCustomEndpoint,disableMultiregionAccessPoints:await e.disableMultiregionAccessPoints()});h&&h!==d&&(i.signing_region=h),g&&g!==`s3`&&(i.signing_service=g),c.hostname=p,s=m}else{let t=await e.region(),n=await e.useDualstackEndpoint(),r=await e.useFipsEndpoint(),{hostname:i,bucketEndpoint:a}=z({bucketName:o,clientRegion:t,baseHostname:c.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:n,fipsEndpoint:r,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:c.protocol===`https:`,isCustomEndpoint:e.isCustomEndpoint});c.hostname=i,s=a}s&&(c.path=c.path.replace(/^(\/)?[^\/]+/,``),c.path===``&&(c.path=`/`))}return t({...a,request:c})},ie={tags:[`BUCKET_ENDPOINT`],name:`bucketEndpointMiddleware`,relation:`before`,toMiddleware:`hostHeaderMiddleware`,override:!0},ae=e=>({applyToStack:t=>{t.addRelativeTo(H(e),ie)}});function oe(e){let{bucketEndpoint:t=!1,forcePathStyle:n=!1,useAccelerateEndpoint:r=!1,useArnRegion:i,disableMultiregionAccessPoints:a=!1}=e;return Object.assign(e,{bucketEndpoint:t,forcePathStyle:n,useAccelerateEndpoint:r,useArnRegion:typeof i==`function`?i:()=>Promise.resolve(i),disableMultiregionAccessPoints:typeof a==`function`?a:()=>Promise.resolve(a)})}e.NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS=s,e.NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME=i,e.NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME=o,e.NODE_USE_ARN_REGION_CONFIG_OPTIONS=u,e.NODE_USE_ARN_REGION_ENV_NAME=c,e.NODE_USE_ARN_REGION_INI_NAME=l,e.bucketEndpointMiddleware=H,e.bucketEndpointMiddlewareOptions=ie,e.bucketHostname=z,e.getArnResources=F,e.getBucketEndpointPlugin=ae,e.getSuffixForArnEndpoint=C,e.resolveBucketEndpointConfig=oe,e.validateAccountId=M,e.validateDNSHostLabel=N,e.validateNoDualstack=I,e.validateNoFIPS=L,e.validateOutpostService=O,e.validatePartition=k,e.validateRegion=A})),Ks=i((e=>{var t=As(),n=m(),r=class e{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw Error(`Int64 buffers must be exactly 8 bytes`)}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let n=new Uint8Array(8);for(let e=7,r=Math.abs(Math.round(t));e>-1&&r>0;e--,r/=256)n[e]=r;return t<0&&i(n),new e(n)}valueOf(){let e=this.bytes.slice(0),t=e[0]&128;return t&&i(e),parseInt(n.toHex(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function i(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}var a=class{toUtf8;fromUtf8;constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){let t=[];for(let n of Object.keys(e)){let r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}let n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0)),r=0;for(let e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case`boolean`:return Uint8Array.from([+!e.value]);case`byte`:return Uint8Array.from([2,e.value]);case`short`:let t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case`integer`:let i=new DataView(new ArrayBuffer(5));return i.setUint8(0,4),i.setInt32(1,e.value,!1),new Uint8Array(i.buffer);case`long`:let a=new Uint8Array(9);return a[0]=5,a.set(e.value.bytes,1),a;case`binary`:let o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);let s=new Uint8Array(o.buffer);return s.set(e.value,3),s;case`string`:let c=this.fromUtf8(e.value),l=new DataView(new ArrayBuffer(3+c.byteLength));l.setUint8(0,7),l.setUint16(1,c.byteLength,!1);let u=new Uint8Array(l.buffer);return u.set(c,3),u;case`timestamp`:let d=new Uint8Array(9);return d[0]=8,d.set(r.fromNumber(e.value.valueOf()).bytes,1),d;case`uuid`:if(!v.test(e.value))throw Error(`Invalid UUID received: ${e.value}`);let f=new Uint8Array(17);return f[0]=9,f.set(n.fromHex(e.value.replace(/\-/g,``)),1),f}}parse(e){let t={},i=0;for(;i{var t=Ks();function n(e){let t=0,n=0,r=null,i=null,a=e=>{if(typeof e!=`number`)throw Error(`Attempted to allocate an event message where size was not a number: `+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)},o=async function*(){let o=e[Symbol.asyncIterator]();for(;;){let{value:e,done:s}=await o.next();if(s){if(!t)return;if(t===n)yield r;else throw Error(`Truncated event message received.`);return}let c=e.length,l=0;for(;lnew i(e)})),Js=i((e=>{var n=qs(),r=t(`stream`);async function*i(e){let t=!1,n=!1,r=[];for(e.on(`error`,e=>{if(t||=!0,e)throw e}),e.on(`data`,e=>{r.push(e)}),e.on(`end`,()=>{t=!0});!n;){let e=await new Promise(e=>setTimeout(()=>e(r.shift()),0));e&&(yield e),n=t&&r.length===0}}var a=class{universalMarshaller;constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new n.EventStreamMarshaller({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){let n=typeof e[Symbol.asyncIterator]==`function`?e:i(e);return this.universalMarshaller.deserialize(n,t)}serialize(e,t){return r.Readable.from(this.universalMarshaller.serialize(e,t))}};e.EventStreamMarshaller=a,e.eventStreamSerdeProvider=e=>new a(e)})),Ys=i((e=>{var n=t(`fs`),r=l(),i=t(`stream`),a=class extends i.Writable{hash;constructor(e,t){super(t),this.hash=e}_write(e,t,n){try{this.hash.update(r.toUint8Array(e))}catch(e){return n(e)}n()}};let o=(e,t)=>new Promise((r,i)=>{if(!s(t)){i(Error(`Unable to calculate hash for non-file streams.`));return}let o=n.createReadStream(t.path,{start:t.start,end:t.end}),c=new e,l=new a(c);o.pipe(l),o.on(`error`,e=>{l.end(),i(e)}),l.on(`error`,i),l.on(`finish`,function(){c.digest().then(r).catch(i)})}),s=e=>typeof e.path==`string`;e.fileStreamHasher=o,e.readableStreamHasher=(e,t)=>{if(t.readableFlowing!==null)throw Error(`Unable to calculate hash for flowing readable stream`);let n=new e,r=new a(n);return t.pipe(r),new Promise((e,i)=>{t.on(`error`,e=>{r.end(),i(e)}),r.on(`error`,i),r.on(`finish`,()=>{n.digest().then(e).catch(i)})})}})),Xs=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.getRuntimeConfig=void 0;let n=(B(),e(R)),r=Ps(),i=Is(),a=b(),o=re(),s=u(),c=p(),d=l(),f=zs(),m=Rs(),h=Hs();t.getRuntimeConfig=e=>({apiVersion:`2006-03-01`,base64Decoder:e?.base64Decoder??s.fromBase64,base64Encoder:e?.base64Encoder??s.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??m.defaultEndpointResolver,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??c.getAwsChunkedEncodingStream,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??f.defaultS3HttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new n.AwsSdkSigV4Signer},{schemeId:`aws.auth#sigv4a`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4a`),signer:new n.AwsSdkSigV4ASigner}],logger:e?.logger??new a.NoOpLogger,protocol:e?.protocol??r.S3RestXmlProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.s3`,errorTypeRegistries:h.errorTypeRegistries,xmlNamespace:`http://s3.amazonaws.com/doc/2006-03-01/`,version:`2006-03-01`,serviceTarget:`AmazonS3`},sdkStreamMixin:e?.sdkStreamMixin??c.sdkStreamMixin,serviceId:e?.serviceId??`S3`,signerConstructor:e?.signerConstructor??i.SignatureV4MultiRegion,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??o.parseUrl,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??d.fromUtf8,utf8Encoder:e?.utf8Encoder??d.toUtf8})})),Zs=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.getRuntimeConfig=void 0;let n=(g(),e(f)).__importDefault(Us()),r=(o(),e(s)),i=(B(),e(R)),a=Ws(),c=Gs(),l=Ms(),u=Ps(),d=O(),p=I(),m=Js(),h=P(),y=Ys(),x=A(),S=ae(),C=v(),w=b(),T=ee(),E=L(),D=M(),k=Xs();t.getRuntimeConfig=e=>{(0,w.emitWarningIfUnsupportedVersion)(process.version);let t=(0,E.resolveDefaultsModeConfig)(e),o=()=>t().then(w.loadConfigsForDefaultMode),s=(0,k.getRuntimeConfig)(e);(0,r.emitWarningIfUnsupportedVersion)(process.version);let f={profile:e?.profile,logger:s.logger};return{...s,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,S.loadConfig)(i.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,f),bodyLengthChecker:e?.bodyLengthChecker??T.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??a.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,d.createDefaultUserAgentProvider)({serviceId:s.serviceId,clientVersion:n.default.version}),disableS3ExpressSessionAuth:e?.disableS3ExpressSessionAuth??(0,S.loadConfig)(u.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS,f),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??m.eventStreamSerdeProvider,maxAttempts:e?.maxAttempts??(0,S.loadConfig)(x.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),md5:e?.md5??h.Hash.bind(null,`md5`),region:e?.region??(0,S.loadConfig)(p.NODE_REGION_CONFIG_OPTIONS,{...p.NODE_REGION_CONFIG_FILE_OPTIONS,...f}),requestChecksumCalculation:e?.requestChecksumCalculation??(0,S.loadConfig)(l.NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS,f),requestHandler:C.NodeHttpHandler.create(e?.requestHandler??o),responseChecksumValidation:e?.responseChecksumValidation??(0,S.loadConfig)(l.NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS,f),retryMode:e?.retryMode??(0,S.loadConfig)({...x.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await o()).retryMode||D.DEFAULT_RETRY_MODE},e),sha1:e?.sha1??h.Hash.bind(null,`sha1`),sha256:e?.sha256??h.Hash.bind(null,`sha256`),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??(0,S.loadConfig)(i.NODE_SIGV4A_CONFIG_OPTIONS,f),streamCollector:e?.streamCollector??C.streamCollector,streamHasher:e?.streamHasher??y.readableStreamHasher,useArnRegion:e?.useArnRegion??(0,S.loadConfig)(c.NODE_USE_ARN_REGION_CONFIG_OPTIONS,f),useDualstackEndpoint:e?.useDualstackEndpoint??(0,S.loadConfig)(p.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,f),useFipsEndpoint:e?.useFipsEndpoint??(0,S.loadConfig)(p.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,f),userAgentAppId:e?.userAgentAppId??(0,S.loadConfig)(d.NODE_APP_ID_CONFIG_OPTIONS,f)}}})),Qs=i((e=>{function t(e){return t=>async n=>{let r={...n.input};for(let t of[{target:`SSECustomerKey`,hash:`SSECustomerKeyMD5`},{target:`CopySourceSSECustomerKey`,hash:`CopySourceSSECustomerKeyMD5`}]){let n=r[t.target];if(n){let a;typeof n==`string`?i(n,e)?a=e.base64Decoder(n):(a=e.utf8Decoder(n),r[t.target]=e.base64Encoder(a)):(a=ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n),r[t.target]=e.base64Encoder(a));let o=new e.md5;o.update(a),r[t.hash]=e.base64Encoder(await o.digest())}}return t({...n,input:r})}}let n={name:`ssecMiddleware`,step:`initialize`,tags:[`SSE`],override:!0},r=e=>({applyToStack:r=>{r.add(t(e),n)}});function i(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return t.base64Decoder(e).length===32}catch{return!1}}e.getSsecPlugin=r,e.isValidBase64EncodedSSECustomerKey=i,e.ssecMiddleware=t,e.ssecMiddlewareOptions=n})),$s=i((e=>{function t(e){return t=>async n=>{let{CreateBucketConfiguration:r}=n.input,i=await e.region();return!r?.LocationConstraint&&!r?.Location&&i!==`us-east-1`&&(n.input.CreateBucketConfiguration=n.input.CreateBucketConfiguration??{},n.input.CreateBucketConfiguration.LocationConstraint=i),t(n)}}let n={step:`initialize`,tags:[`LOCATION_CONSTRAINT`,`CREATE_BUCKET_CONFIGURATION`],name:`locationConstraintMiddleware`,override:!0};e.getLocationConstraintPlugin=e=>({applyToStack:r=>{r.add(t(e),n)}}),e.locationConstraintMiddleware=t,e.locationConstraintMiddlewareOptions=n})),ec=i((e=>{let t=()=>{let e=new WeakSet;return(t,n)=>{if(typeof n==`object`&&n){if(e.has(n))return`[Circular]`;e.add(n)}return n}},n=e=>new Promise(t=>setTimeout(t,e*1e3)),r={minDelay:2,maxDelay:120};e.WaiterState=void 0,(function(e){e.ABORTED=`ABORTED`,e.FAILURE=`FAILURE`,e.SUCCESS=`SUCCESS`,e.RETRY=`RETRY`,e.TIMEOUT=`TIMEOUT`})(e.WaiterState||={});let i=n=>{if(n.state===e.WaiterState.ABORTED){let e=Error(`${JSON.stringify({...n,reason:`Request was aborted`},t())}`);throw e.name=`AbortError`,e}else if(n.state===e.WaiterState.TIMEOUT){let e=Error(`${JSON.stringify({...n,reason:`Waiter has timed out`},t())}`);throw e.name=`TimeoutError`,e}else if(n.state!==e.WaiterState.SUCCESS)throw Error(`${JSON.stringify(n,t())}`);return n},a=(e,t,n,r)=>r>n?t:o(e,e*2**(r-1)),o=(e,t)=>e+Math.random()*(t-e),s=async({minDelay:t,maxDelay:r,maxWaitTime:i,abortController:o,client:s,abortSignal:l},u,d)=>{let f={},{state:p,reason:m}=await d(s,u);if(m){let e=c(m);f[e]|=0,f[e]+=1}if(p!==e.WaiterState.RETRY)return{state:p,reason:m,observedResponses:f};let h=1,g=Date.now()+i*1e3,v=Math.log(r/t)/Math.log(2)+1;for(;;){if(o?.signal?.aborted||l?.aborted){let t=`AbortController signal aborted.`;return f[t]|=0,f[t]+=1,{state:e.WaiterState.ABORTED,observedResponses:f}}let i=a(t,r,v,h);if(Date.now()+i*1e3>g)return{state:e.WaiterState.TIMEOUT,observedResponses:f};await n(i);let{state:p,reason:m}=await d(s,u);if(m){let e=c(m);f[e]|=0,f[e]+=1}if(p!==e.WaiterState.RETRY)return{state:p,reason:m,observedResponses:f};h+=1}},c=e=>e?.$responseBodyText?`Deserialization error for body: ${e.$responseBodyText}`:e?.$metadata?.httpStatusCode?e.$response||e.message?`${e.$response?.statusCode??e.$metadata.httpStatusCode??`Unknown`}: ${e.message}`:`${e.$metadata.httpStatusCode}: OK`:String(e?.message??JSON.stringify(e,t())??`Unknown`),l=e=>{if(e.maxWaitTime<=0)throw Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);if(e.minDelay<=0)throw Error(`WaiterConfiguration.minDelay must be greater than 0`);if(e.maxDelay<=0)throw Error(`WaiterConfiguration.maxDelay must be greater than 0`);if(e.maxWaitTime<=e.minDelay)throw Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);if(e.maxDelay{let n;return{clearListener(){typeof t.removeEventListener==`function`&&t.removeEventListener(`abort`,n)},aborted:new Promise(r=>{n=()=>r({state:e.WaiterState.ABORTED}),typeof t.addEventListener==`function`?t.addEventListener(`abort`,n):t.onabort=n})}};e.checkExceptions=i,e.createWaiter=async(e,t,n)=>{let i={...r,...e};l(i);let a=[s(i,t,n)],o=[];if(e.abortSignal){let{aborted:t,clearListener:n}=u(e.abortSignal);o.push(n),a.push(t)}if(e.abortController?.signal){let{aborted:t,clearListener:n}=u(e.abortController.signal);o.push(n),a.push(t)}return Promise.race(a).then(e=>{for(let e of o)e();return e})},e.waiterServiceDefaults=r})),tc=i((t=>{var n=_s(),r=Ms(),i=w(),o=C(),s=F(),c=Ps(),l=N(),u=I(),f=(k(),e(ne)),p=(y(),e(d)),m=Fs(),h=z(),g=j(),v=A(),x=b(),S=zs(),T=Hs(),E=Zs(),D=te(),O=a(),M=Qs(),P=$s(),L=ec(),R=Vs(),ee=Bs();let B=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:`s3`,clientContextParams:e.clientContextParams??{}}),V={ForcePathStyle:{type:`clientContextParams`,name:`forcePathStyle`},UseArnRegion:{type:`clientContextParams`,name:`useArnRegion`},DisableMultiRegionAccessPoints:{type:`clientContextParams`,name:`disableMultiregionAccessPoints`},Accelerate:{type:`clientContextParams`,name:`useAccelerateEndpoint`},DisableS3ExpressSessionAuth:{type:`clientContextParams`,name:`disableS3ExpressSessionAuth`},UseGlobalEndpoint:{type:`builtInParams`,name:`useGlobalEndpoint`},UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}};var re=class extends x.Command.classBuilder().ep({...V,DisableS3ExpressSessionAuth:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`CreateSession`,{}).n(`S3Client`,`CreateSessionCommand`).sc(T.CreateSession$).build(){};let H=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},ie=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),ae=(e,t)=>{let n=Object.assign(D.getAwsRegionExtensionConfiguration(e),x.getDefaultExtensionConfiguration(e),O.getHttpHandlerExtensionConfiguration(e),H(e));return t.forEach(e=>e.configure(n)),Object.assign(e,D.resolveAwsRegionExtensionConfiguration(n),x.resolveDefaultRuntimeConfig(n),O.resolveHttpHandlerRuntimeConfig(n),ie(n))};var oe=class extends x.Client{config;constructor(...[e]){let t=E.getRuntimeConfig(e||{});super(t),this.initConfig=t;let a=B(t),d=l.resolveUserAgentConfig(a),y=r.resolveFlexibleChecksumsConfig(d),b=v.resolveRetryConfig(y),x=u.resolveRegionConfig(b),C=i.resolveHostHeaderConfig(x),w=g.resolveEndpointConfig(C),T=m.resolveEventStreamSerdeConfig(w),D=S.resolveHttpAuthSchemeConfig(T),O=ae(c.resolveS3Config(D,{session:[()=>this,re]}),e?.extensions||[]);this.config=O,this.middlewareStack.use(p.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(l.getUserAgentPlugin(this.config)),this.middlewareStack.use(v.getRetryPlugin(this.config)),this.middlewareStack.use(h.getContentLengthPlugin(this.config)),this.middlewareStack.use(i.getHostHeaderPlugin(this.config)),this.middlewareStack.use(o.getLoggerPlugin(this.config)),this.middlewareStack.use(s.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(f.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:S.defaultS3HttpAuthSchemeParametersProvider,identityProviderConfigProvider:async e=>new f.DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials,"aws.auth#sigv4a":e.credentials})})),this.middlewareStack.use(f.getHttpSigningPlugin(this.config)),this.middlewareStack.use(c.getValidateBucketNamePlugin(this.config)),this.middlewareStack.use(n.getAddExpectContinuePlugin(this.config)),this.middlewareStack.use(c.getRegionRedirectMiddlewarePlugin(this.config)),this.middlewareStack.use(c.getS3ExpressPlugin(this.config)),this.middlewareStack.use(c.getS3ExpressHttpSigningPlugin(this.config))}destroy(){super.destroy()}},se=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`AbortMultipartUpload`,{}).n(`S3Client`,`AbortMultipartUploadCommand`).sc(T.AbortMultipartUpload$).build(){},ce=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`CompleteMultipartUpload`,{}).n(`S3Client`,`CompleteMultipartUploadCommand`).sc(T.CompleteMultipartUpload$).build(){},le=class extends x.Command.classBuilder().ep({...V,DisableS3ExpressSessionAuth:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`},CopySource:{type:`contextParams`,name:`CopySource`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`CopyObject`,{}).n(`S3Client`,`CopyObjectCommand`).sc(T.CopyObject$).build(){},ue=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},DisableAccessPoints:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),P.getLocationConstraintPlugin(n)]}).s(`AmazonS3`,`CreateBucket`,{}).n(`S3Client`,`CreateBucketCommand`).sc(T.CreateBucket$).build(){},de=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`CreateBucketMetadataConfiguration`,{}).n(`S3Client`,`CreateBucketMetadataConfigurationCommand`).sc(T.CreateBucketMetadataConfiguration$).build(){},fe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`CreateBucketMetadataTableConfiguration`,{}).n(`S3Client`,`CreateBucketMetadataTableConfigurationCommand`).sc(T.CreateBucketMetadataTableConfiguration$).build(){},pe=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`CreateMultipartUpload`,{}).n(`S3Client`,`CreateMultipartUploadCommand`).sc(T.CreateMultipartUpload$).build(){},me=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketAnalyticsConfiguration`,{}).n(`S3Client`,`DeleteBucketAnalyticsConfigurationCommand`).sc(T.DeleteBucketAnalyticsConfiguration$).build(){},he=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucket`,{}).n(`S3Client`,`DeleteBucketCommand`).sc(T.DeleteBucket$).build(){},ge=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketCors`,{}).n(`S3Client`,`DeleteBucketCorsCommand`).sc(T.DeleteBucketCors$).build(){},_e=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketEncryption`,{}).n(`S3Client`,`DeleteBucketEncryptionCommand`).sc(T.DeleteBucketEncryption$).build(){},U=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketIntelligentTieringConfiguration`,{}).n(`S3Client`,`DeleteBucketIntelligentTieringConfigurationCommand`).sc(T.DeleteBucketIntelligentTieringConfiguration$).build(){},ve=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketInventoryConfiguration`,{}).n(`S3Client`,`DeleteBucketInventoryConfigurationCommand`).sc(T.DeleteBucketInventoryConfiguration$).build(){},ye=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketLifecycle`,{}).n(`S3Client`,`DeleteBucketLifecycleCommand`).sc(T.DeleteBucketLifecycle$).build(){},be=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketMetadataConfiguration`,{}).n(`S3Client`,`DeleteBucketMetadataConfigurationCommand`).sc(T.DeleteBucketMetadataConfiguration$).build(){},xe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketMetadataTableConfiguration`,{}).n(`S3Client`,`DeleteBucketMetadataTableConfigurationCommand`).sc(T.DeleteBucketMetadataTableConfiguration$).build(){},Se=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketMetricsConfiguration`,{}).n(`S3Client`,`DeleteBucketMetricsConfigurationCommand`).sc(T.DeleteBucketMetricsConfiguration$).build(){},Ce=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketOwnershipControls`,{}).n(`S3Client`,`DeleteBucketOwnershipControlsCommand`).sc(T.DeleteBucketOwnershipControls$).build(){},we=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketPolicy`,{}).n(`S3Client`,`DeleteBucketPolicyCommand`).sc(T.DeleteBucketPolicy$).build(){},Te=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketReplication`,{}).n(`S3Client`,`DeleteBucketReplicationCommand`).sc(T.DeleteBucketReplication$).build(){},Ee=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketTagging`,{}).n(`S3Client`,`DeleteBucketTaggingCommand`).sc(T.DeleteBucketTagging$).build(){},De=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketWebsite`,{}).n(`S3Client`,`DeleteBucketWebsiteCommand`).sc(T.DeleteBucketWebsite$).build(){},Oe=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`DeleteObject`,{}).n(`S3Client`,`DeleteObjectCommand`).sc(T.DeleteObject$).build(){},W=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`DeleteObjects`,{}).n(`S3Client`,`DeleteObjectsCommand`).sc(T.DeleteObjects$).build(){},ke=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`DeleteObjectTagging`,{}).n(`S3Client`,`DeleteObjectTaggingCommand`).sc(T.DeleteObjectTagging$).build(){},Ae=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeletePublicAccessBlock`,{}).n(`S3Client`,`DeletePublicAccessBlockCommand`).sc(T.DeletePublicAccessBlock$).build(){},je=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketAbac`,{}).n(`S3Client`,`GetBucketAbacCommand`).sc(T.GetBucketAbac$).build(){},Me=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketAccelerateConfiguration`,{}).n(`S3Client`,`GetBucketAccelerateConfigurationCommand`).sc(T.GetBucketAccelerateConfiguration$).build(){},Ne=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketAcl`,{}).n(`S3Client`,`GetBucketAclCommand`).sc(T.GetBucketAcl$).build(){},Pe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketAnalyticsConfiguration`,{}).n(`S3Client`,`GetBucketAnalyticsConfigurationCommand`).sc(T.GetBucketAnalyticsConfiguration$).build(){},Fe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketCors`,{}).n(`S3Client`,`GetBucketCorsCommand`).sc(T.GetBucketCors$).build(){},Ie=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketEncryption`,{}).n(`S3Client`,`GetBucketEncryptionCommand`).sc(T.GetBucketEncryption$).build(){},Le=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketIntelligentTieringConfiguration`,{}).n(`S3Client`,`GetBucketIntelligentTieringConfigurationCommand`).sc(T.GetBucketIntelligentTieringConfiguration$).build(){},Re=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketInventoryConfiguration`,{}).n(`S3Client`,`GetBucketInventoryConfigurationCommand`).sc(T.GetBucketInventoryConfiguration$).build(){},ze=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketLifecycleConfiguration`,{}).n(`S3Client`,`GetBucketLifecycleConfigurationCommand`).sc(T.GetBucketLifecycleConfiguration$).build(){},Be=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketLocation`,{}).n(`S3Client`,`GetBucketLocationCommand`).sc(T.GetBucketLocation$).build(){},Ve=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketLogging`,{}).n(`S3Client`,`GetBucketLoggingCommand`).sc(T.GetBucketLogging$).build(){},He=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketMetadataConfiguration`,{}).n(`S3Client`,`GetBucketMetadataConfigurationCommand`).sc(T.GetBucketMetadataConfiguration$).build(){},Ue=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketMetadataTableConfiguration`,{}).n(`S3Client`,`GetBucketMetadataTableConfigurationCommand`).sc(T.GetBucketMetadataTableConfiguration$).build(){},We=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketMetricsConfiguration`,{}).n(`S3Client`,`GetBucketMetricsConfigurationCommand`).sc(T.GetBucketMetricsConfiguration$).build(){},Ge=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketNotificationConfiguration`,{}).n(`S3Client`,`GetBucketNotificationConfigurationCommand`).sc(T.GetBucketNotificationConfiguration$).build(){},Ke=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketOwnershipControls`,{}).n(`S3Client`,`GetBucketOwnershipControlsCommand`).sc(T.GetBucketOwnershipControls$).build(){},qe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketPolicy`,{}).n(`S3Client`,`GetBucketPolicyCommand`).sc(T.GetBucketPolicy$).build(){},Je=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketPolicyStatus`,{}).n(`S3Client`,`GetBucketPolicyStatusCommand`).sc(T.GetBucketPolicyStatus$).build(){},G=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketReplication`,{}).n(`S3Client`,`GetBucketReplicationCommand`).sc(T.GetBucketReplication$).build(){},Ye=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketRequestPayment`,{}).n(`S3Client`,`GetBucketRequestPaymentCommand`).sc(T.GetBucketRequestPayment$).build(){},Xe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketTagging`,{}).n(`S3Client`,`GetBucketTaggingCommand`).sc(T.GetBucketTagging$).build(){},Ze=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketVersioning`,{}).n(`S3Client`,`GetBucketVersioningCommand`).sc(T.GetBucketVersioning$).build(){},Qe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketWebsite`,{}).n(`S3Client`,`GetBucketWebsiteCommand`).sc(T.GetBucketWebsite$).build(){},$e=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetObjectAcl`,{}).n(`S3Client`,`GetObjectAclCommand`).sc(T.GetObjectAcl$).build(){},et=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`GetObjectAttributes`,{}).n(`S3Client`,`GetObjectAttributesCommand`).sc(T.GetObjectAttributes$).build(){},tt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestChecksumRequired:!1,requestValidationModeMember:`ChecksumMode`,responseAlgorithms:[`CRC64NVME`,`CRC32`,`CRC32C`,`SHA256`,`SHA1`]}),M.getSsecPlugin(n),c.getS3ExpiresMiddlewarePlugin(n)]}).s(`AmazonS3`,`GetObject`,{}).n(`S3Client`,`GetObjectCommand`).sc(T.GetObject$).build(){},nt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetObjectLegalHold`,{}).n(`S3Client`,`GetObjectLegalHoldCommand`).sc(T.GetObjectLegalHold$).build(){},rt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetObjectLockConfiguration`,{}).n(`S3Client`,`GetObjectLockConfigurationCommand`).sc(T.GetObjectLockConfiguration$).build(){},it=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetObjectRetention`,{}).n(`S3Client`,`GetObjectRetentionCommand`).sc(T.GetObjectRetention$).build(){},at=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetObjectTagging`,{}).n(`S3Client`,`GetObjectTaggingCommand`).sc(T.GetObjectTagging$).build(){},ot=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`GetObjectTorrent`,{}).n(`S3Client`,`GetObjectTorrentCommand`).sc(T.GetObjectTorrent$).build(){},st=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetPublicAccessBlock`,{}).n(`S3Client`,`GetPublicAccessBlockCommand`).sc(T.GetPublicAccessBlock$).build(){},ct=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`HeadBucket`,{}).n(`S3Client`,`HeadBucketCommand`).sc(T.HeadBucket$).build(){},lt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n),c.getS3ExpiresMiddlewarePlugin(n)]}).s(`AmazonS3`,`HeadObject`,{}).n(`S3Client`,`HeadObjectCommand`).sc(T.HeadObject$).build(){},ut=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListBucketAnalyticsConfigurations`,{}).n(`S3Client`,`ListBucketAnalyticsConfigurationsCommand`).sc(T.ListBucketAnalyticsConfigurations$).build(){},dt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListBucketIntelligentTieringConfigurations`,{}).n(`S3Client`,`ListBucketIntelligentTieringConfigurationsCommand`).sc(T.ListBucketIntelligentTieringConfigurations$).build(){},ft=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListBucketInventoryConfigurations`,{}).n(`S3Client`,`ListBucketInventoryConfigurationsCommand`).sc(T.ListBucketInventoryConfigurations$).build(){},pt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListBucketMetricsConfigurations`,{}).n(`S3Client`,`ListBucketMetricsConfigurationsCommand`).sc(T.ListBucketMetricsConfigurations$).build(){},mt=class extends x.Command.classBuilder().ep(V).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListBuckets`,{}).n(`S3Client`,`ListBucketsCommand`).sc(T.ListBuckets$).build(){},ht=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListDirectoryBuckets`,{}).n(`S3Client`,`ListDirectoryBucketsCommand`).sc(T.ListDirectoryBuckets$).build(){},gt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListMultipartUploads`,{}).n(`S3Client`,`ListMultipartUploadsCommand`).sc(T.ListMultipartUploads$).build(){},_t=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListObjects`,{}).n(`S3Client`,`ListObjectsCommand`).sc(T.ListObjects$).build(){},vt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListObjectsV2`,{}).n(`S3Client`,`ListObjectsV2Command`).sc(T.ListObjectsV2$).build(){},yt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListObjectVersions`,{}).n(`S3Client`,`ListObjectVersionsCommand`).sc(T.ListObjectVersions$).build(){},bt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`ListParts`,{}).n(`S3Client`,`ListPartsCommand`).sc(T.ListParts$).build(){},xt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1})]}).s(`AmazonS3`,`PutBucketAbac`,{}).n(`S3Client`,`PutBucketAbacCommand`).sc(T.PutBucketAbac$).build(){},St=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1})]}).s(`AmazonS3`,`PutBucketAccelerateConfiguration`,{}).n(`S3Client`,`PutBucketAccelerateConfigurationCommand`).sc(T.PutBucketAccelerateConfiguration$).build(){},Ct=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketAcl`,{}).n(`S3Client`,`PutBucketAclCommand`).sc(T.PutBucketAcl$).build(){},wt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`PutBucketAnalyticsConfiguration`,{}).n(`S3Client`,`PutBucketAnalyticsConfigurationCommand`).sc(T.PutBucketAnalyticsConfiguration$).build(){},Tt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketCors`,{}).n(`S3Client`,`PutBucketCorsCommand`).sc(T.PutBucketCors$).build(){},Et=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketEncryption`,{}).n(`S3Client`,`PutBucketEncryptionCommand`).sc(T.PutBucketEncryption$).build(){},Dt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`PutBucketIntelligentTieringConfiguration`,{}).n(`S3Client`,`PutBucketIntelligentTieringConfigurationCommand`).sc(T.PutBucketIntelligentTieringConfiguration$).build(){},Ot=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`PutBucketInventoryConfiguration`,{}).n(`S3Client`,`PutBucketInventoryConfigurationCommand`).sc(T.PutBucketInventoryConfiguration$).build(){},kt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`PutBucketLifecycleConfiguration`,{}).n(`S3Client`,`PutBucketLifecycleConfigurationCommand`).sc(T.PutBucketLifecycleConfiguration$).build(){},At=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketLogging`,{}).n(`S3Client`,`PutBucketLoggingCommand`).sc(T.PutBucketLogging$).build(){},jt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`PutBucketMetricsConfiguration`,{}).n(`S3Client`,`PutBucketMetricsConfigurationCommand`).sc(T.PutBucketMetricsConfiguration$).build(){},Mt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`PutBucketNotificationConfiguration`,{}).n(`S3Client`,`PutBucketNotificationConfigurationCommand`).sc(T.PutBucketNotificationConfiguration$).build(){},Nt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketOwnershipControls`,{}).n(`S3Client`,`PutBucketOwnershipControlsCommand`).sc(T.PutBucketOwnershipControls$).build(){},Pt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketPolicy`,{}).n(`S3Client`,`PutBucketPolicyCommand`).sc(T.PutBucketPolicy$).build(){},Ft=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketReplication`,{}).n(`S3Client`,`PutBucketReplicationCommand`).sc(T.PutBucketReplication$).build(){},It=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketRequestPayment`,{}).n(`S3Client`,`PutBucketRequestPaymentCommand`).sc(T.PutBucketRequestPayment$).build(){},Lt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketTagging`,{}).n(`S3Client`,`PutBucketTaggingCommand`).sc(T.PutBucketTagging$).build(){},Rt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketVersioning`,{}).n(`S3Client`,`PutBucketVersioningCommand`).sc(T.PutBucketVersioning$).build(){},zt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketWebsite`,{}).n(`S3Client`,`PutBucketWebsiteCommand`).sc(T.PutBucketWebsite$).build(){},Bt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`PutObjectAcl`,{}).n(`S3Client`,`PutObjectAclCommand`).sc(T.PutObjectAcl$).build(){},Vt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1}),c.getCheckContentLengthHeaderPlugin(n),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`PutObject`,{}).n(`S3Client`,`PutObjectCommand`).sc(T.PutObject$).build(){},Ht=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`PutObjectLegalHold`,{}).n(`S3Client`,`PutObjectLegalHoldCommand`).sc(T.PutObjectLegalHold$).build(){},Ut=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`PutObjectLockConfiguration`,{}).n(`S3Client`,`PutObjectLockConfigurationCommand`).sc(T.PutObjectLockConfiguration$).build(){},Wt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`PutObjectRetention`,{}).n(`S3Client`,`PutObjectRetentionCommand`).sc(T.PutObjectRetention$).build(){},Gt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`PutObjectTagging`,{}).n(`S3Client`,`PutObjectTaggingCommand`).sc(T.PutObjectTagging$).build(){},Kt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutPublicAccessBlock`,{}).n(`S3Client`,`PutPublicAccessBlockCommand`).sc(T.PutPublicAccessBlock$).build(){},qt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`RenameObject`,{}).n(`S3Client`,`RenameObjectCommand`).sc(T.RenameObject$).build(){},Jt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`RestoreObject`,{}).n(`S3Client`,`RestoreObjectCommand`).sc(T.RestoreObject$).build(){},Yt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`SelectObjectContent`,{eventStream:{output:!0}}).n(`S3Client`,`SelectObjectContentCommand`).sc(T.SelectObjectContent$).build(){},Xt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`UpdateBucketMetadataInventoryTableConfiguration`,{}).n(`S3Client`,`UpdateBucketMetadataInventoryTableConfigurationCommand`).sc(T.UpdateBucketMetadataInventoryTableConfiguration$).build(){},Zt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`UpdateBucketMetadataJournalTableConfiguration`,{}).n(`S3Client`,`UpdateBucketMetadataJournalTableConfigurationCommand`).sc(T.UpdateBucketMetadataJournalTableConfiguration$).build(){},Qt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`UpdateObjectEncryption`,{}).n(`S3Client`,`UpdateObjectEncryptionCommand`).sc(T.UpdateObjectEncryption$).build(){},$t=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1}),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`UploadPart`,{}).n(`S3Client`,`UploadPartCommand`).sc(T.UploadPart$).build(){},en=class extends x.Command.classBuilder().ep({...V,DisableS3ExpressSessionAuth:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`UploadPartCopy`,{}).n(`S3Client`,`UploadPartCopyCommand`).sc(T.UploadPartCopy$).build(){},tn=class extends x.Command.classBuilder().ep({...V,UseObjectLambdaEndpoint:{type:`staticContextParams`,value:!0}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`WriteGetObjectResponse`,{}).n(`S3Client`,`WriteGetObjectResponseCommand`).sc(T.WriteGetObjectResponse$).build(){};let nn=f.createPaginator(oe,mt,`ContinuationToken`,`ContinuationToken`,`MaxBuckets`),rn=f.createPaginator(oe,ht,`ContinuationToken`,`ContinuationToken`,`MaxDirectoryBuckets`),an=f.createPaginator(oe,vt,`ContinuationToken`,`NextContinuationToken`,`MaxKeys`),on=f.createPaginator(oe,bt,`PartNumberMarker`,`NextPartNumberMarker`,`MaxParts`),sn=async(e,t)=>{let n;try{return n=await e.send(new ct(t)),{state:L.WaiterState.SUCCESS,reason:n}}catch(e){if(n=e,e.name&&e.name==`NotFound`)return{state:L.WaiterState.RETRY,reason:n}}return{state:L.WaiterState.RETRY,reason:n}},cn=async(e,t)=>L.createWaiter({minDelay:5,maxDelay:120,...e},t,sn),ln=async(e,t)=>{let n=await L.createWaiter({minDelay:5,maxDelay:120,...e},t,sn);return L.checkExceptions(n)},un=async(e,t)=>{let n;try{n=await e.send(new ct(t))}catch(e){if(n=e,e.name&&e.name==`NotFound`)return{state:L.WaiterState.SUCCESS,reason:n}}return{state:L.WaiterState.RETRY,reason:n}},dn=async(e,t)=>L.createWaiter({minDelay:5,maxDelay:120,...e},t,un),fn=async(e,t)=>{let n=await L.createWaiter({minDelay:5,maxDelay:120,...e},t,un);return L.checkExceptions(n)},pn=async(e,t)=>{let n;try{return n=await e.send(new lt(t)),{state:L.WaiterState.SUCCESS,reason:n}}catch(e){if(n=e,e.name&&e.name==`NotFound`)return{state:L.WaiterState.RETRY,reason:n}}return{state:L.WaiterState.RETRY,reason:n}},mn=async(e,t)=>L.createWaiter({minDelay:5,maxDelay:120,...e},t,pn),hn=async(e,t)=>{let n=await L.createWaiter({minDelay:5,maxDelay:120,...e},t,pn);return L.checkExceptions(n)},gn=async(e,t)=>{let n;try{n=await e.send(new lt(t))}catch(e){if(n=e,e.name&&e.name==`NotFound`)return{state:L.WaiterState.SUCCESS,reason:n}}return{state:L.WaiterState.RETRY,reason:n}},_n=async(e,t)=>L.createWaiter({minDelay:5,maxDelay:120,...e},t,gn),vn=async(e,t)=>{let n=await L.createWaiter({minDelay:5,maxDelay:120,...e},t,gn);return L.checkExceptions(n)},yn={AbortMultipartUploadCommand:se,CompleteMultipartUploadCommand:ce,CopyObjectCommand:le,CreateBucketCommand:ue,CreateBucketMetadataConfigurationCommand:de,CreateBucketMetadataTableConfigurationCommand:fe,CreateMultipartUploadCommand:pe,CreateSessionCommand:re,DeleteBucketCommand:he,DeleteBucketAnalyticsConfigurationCommand:me,DeleteBucketCorsCommand:ge,DeleteBucketEncryptionCommand:_e,DeleteBucketIntelligentTieringConfigurationCommand:U,DeleteBucketInventoryConfigurationCommand:ve,DeleteBucketLifecycleCommand:ye,DeleteBucketMetadataConfigurationCommand:be,DeleteBucketMetadataTableConfigurationCommand:xe,DeleteBucketMetricsConfigurationCommand:Se,DeleteBucketOwnershipControlsCommand:Ce,DeleteBucketPolicyCommand:we,DeleteBucketReplicationCommand:Te,DeleteBucketTaggingCommand:Ee,DeleteBucketWebsiteCommand:De,DeleteObjectCommand:Oe,DeleteObjectsCommand:W,DeleteObjectTaggingCommand:ke,DeletePublicAccessBlockCommand:Ae,GetBucketAbacCommand:je,GetBucketAccelerateConfigurationCommand:Me,GetBucketAclCommand:Ne,GetBucketAnalyticsConfigurationCommand:Pe,GetBucketCorsCommand:Fe,GetBucketEncryptionCommand:Ie,GetBucketIntelligentTieringConfigurationCommand:Le,GetBucketInventoryConfigurationCommand:Re,GetBucketLifecycleConfigurationCommand:ze,GetBucketLocationCommand:Be,GetBucketLoggingCommand:Ve,GetBucketMetadataConfigurationCommand:He,GetBucketMetadataTableConfigurationCommand:Ue,GetBucketMetricsConfigurationCommand:We,GetBucketNotificationConfigurationCommand:Ge,GetBucketOwnershipControlsCommand:Ke,GetBucketPolicyCommand:qe,GetBucketPolicyStatusCommand:Je,GetBucketReplicationCommand:G,GetBucketRequestPaymentCommand:Ye,GetBucketTaggingCommand:Xe,GetBucketVersioningCommand:Ze,GetBucketWebsiteCommand:Qe,GetObjectCommand:tt,GetObjectAclCommand:$e,GetObjectAttributesCommand:et,GetObjectLegalHoldCommand:nt,GetObjectLockConfigurationCommand:rt,GetObjectRetentionCommand:it,GetObjectTaggingCommand:at,GetObjectTorrentCommand:ot,GetPublicAccessBlockCommand:st,HeadBucketCommand:ct,HeadObjectCommand:lt,ListBucketAnalyticsConfigurationsCommand:ut,ListBucketIntelligentTieringConfigurationsCommand:dt,ListBucketInventoryConfigurationsCommand:ft,ListBucketMetricsConfigurationsCommand:pt,ListBucketsCommand:mt,ListDirectoryBucketsCommand:ht,ListMultipartUploadsCommand:gt,ListObjectsCommand:_t,ListObjectsV2Command:vt,ListObjectVersionsCommand:yt,ListPartsCommand:bt,PutBucketAbacCommand:xt,PutBucketAccelerateConfigurationCommand:St,PutBucketAclCommand:Ct,PutBucketAnalyticsConfigurationCommand:wt,PutBucketCorsCommand:Tt,PutBucketEncryptionCommand:Et,PutBucketIntelligentTieringConfigurationCommand:Dt,PutBucketInventoryConfigurationCommand:Ot,PutBucketLifecycleConfigurationCommand:kt,PutBucketLoggingCommand:At,PutBucketMetricsConfigurationCommand:jt,PutBucketNotificationConfigurationCommand:Mt,PutBucketOwnershipControlsCommand:Nt,PutBucketPolicyCommand:Pt,PutBucketReplicationCommand:Ft,PutBucketRequestPaymentCommand:It,PutBucketTaggingCommand:Lt,PutBucketVersioningCommand:Rt,PutBucketWebsiteCommand:zt,PutObjectCommand:Vt,PutObjectAclCommand:Bt,PutObjectLegalHoldCommand:Ht,PutObjectLockConfigurationCommand:Ut,PutObjectRetentionCommand:Wt,PutObjectTaggingCommand:Gt,PutPublicAccessBlockCommand:Kt,RenameObjectCommand:qt,RestoreObjectCommand:Jt,SelectObjectContentCommand:Yt,UpdateBucketMetadataInventoryTableConfigurationCommand:Xt,UpdateBucketMetadataJournalTableConfigurationCommand:Zt,UpdateObjectEncryptionCommand:Qt,UploadPartCommand:$t,UploadPartCopyCommand:en,WriteGetObjectResponseCommand:tn},bn={paginateListBuckets:nn,paginateListDirectoryBuckets:rn,paginateListObjectsV2:an,paginateListParts:on},xn={waitUntilBucketExists:ln,waitUntilBucketNotExists:fn,waitUntilObjectExists:hn,waitUntilObjectNotExists:vn};var Sn=class extends oe{};x.createAggregatedClient(yn,Sn,{paginators:bn,waiters:xn}),t.$Command=x.Command,t.__Client=x.Client,t.S3ServiceException=ee.S3ServiceException,t.AbortMultipartUploadCommand=se,t.AnalyticsS3ExportFileFormat={CSV:`CSV`},t.ArchiveStatus={ARCHIVE_ACCESS:`ARCHIVE_ACCESS`,DEEP_ARCHIVE_ACCESS:`DEEP_ARCHIVE_ACCESS`},t.BucketAbacStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.BucketAccelerateStatus={Enabled:`Enabled`,Suspended:`Suspended`},t.BucketCannedACL={authenticated_read:`authenticated-read`,private:`private`,public_read:`public-read`,public_read_write:`public-read-write`},t.BucketLocationConstraint={EU:`EU`,af_south_1:`af-south-1`,ap_east_1:`ap-east-1`,ap_east_2:`ap-east-2`,ap_northeast_1:`ap-northeast-1`,ap_northeast_2:`ap-northeast-2`,ap_northeast_3:`ap-northeast-3`,ap_south_1:`ap-south-1`,ap_south_2:`ap-south-2`,ap_southeast_1:`ap-southeast-1`,ap_southeast_2:`ap-southeast-2`,ap_southeast_3:`ap-southeast-3`,ap_southeast_4:`ap-southeast-4`,ap_southeast_5:`ap-southeast-5`,ap_southeast_6:`ap-southeast-6`,ap_southeast_7:`ap-southeast-7`,ca_central_1:`ca-central-1`,ca_west_1:`ca-west-1`,cn_north_1:`cn-north-1`,cn_northwest_1:`cn-northwest-1`,eu_central_1:`eu-central-1`,eu_central_2:`eu-central-2`,eu_north_1:`eu-north-1`,eu_south_1:`eu-south-1`,eu_south_2:`eu-south-2`,eu_west_1:`eu-west-1`,eu_west_2:`eu-west-2`,eu_west_3:`eu-west-3`,il_central_1:`il-central-1`,me_central_1:`me-central-1`,me_south_1:`me-south-1`,mx_central_1:`mx-central-1`,sa_east_1:`sa-east-1`,us_east_2:`us-east-2`,us_gov_east_1:`us-gov-east-1`,us_gov_west_1:`us-gov-west-1`,us_west_1:`us-west-1`,us_west_2:`us-west-2`},t.BucketLogsPermission={FULL_CONTROL:`FULL_CONTROL`,READ:`READ`,WRITE:`WRITE`},t.BucketNamespace={ACCOUNT_REGIONAL:`account-regional`,GLOBAL:`global`},t.BucketType={Directory:`Directory`},t.BucketVersioningStatus={Enabled:`Enabled`,Suspended:`Suspended`},t.ChecksumAlgorithm={CRC32:`CRC32`,CRC32C:`CRC32C`,CRC64NVME:`CRC64NVME`,SHA1:`SHA1`,SHA256:`SHA256`},t.ChecksumMode={ENABLED:`ENABLED`},t.ChecksumType={COMPOSITE:`COMPOSITE`,FULL_OBJECT:`FULL_OBJECT`},t.CompleteMultipartUploadCommand=ce,t.CompressionType={BZIP2:`BZIP2`,GZIP:`GZIP`,NONE:`NONE`},t.CopyObjectCommand=le,t.CreateBucketCommand=ue,t.CreateBucketMetadataConfigurationCommand=de,t.CreateBucketMetadataTableConfigurationCommand=fe,t.CreateMultipartUploadCommand=pe,t.CreateSessionCommand=re,t.DataRedundancy={SingleAvailabilityZone:`SingleAvailabilityZone`,SingleLocalZone:`SingleLocalZone`},t.DeleteBucketAnalyticsConfigurationCommand=me,t.DeleteBucketCommand=he,t.DeleteBucketCorsCommand=ge,t.DeleteBucketEncryptionCommand=_e,t.DeleteBucketIntelligentTieringConfigurationCommand=U,t.DeleteBucketInventoryConfigurationCommand=ve,t.DeleteBucketLifecycleCommand=ye,t.DeleteBucketMetadataConfigurationCommand=be,t.DeleteBucketMetadataTableConfigurationCommand=xe,t.DeleteBucketMetricsConfigurationCommand=Se,t.DeleteBucketOwnershipControlsCommand=Ce,t.DeleteBucketPolicyCommand=we,t.DeleteBucketReplicationCommand=Te,t.DeleteBucketTaggingCommand=Ee,t.DeleteBucketWebsiteCommand=De,t.DeleteMarkerReplicationStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.DeleteObjectCommand=Oe,t.DeleteObjectTaggingCommand=ke,t.DeleteObjectsCommand=W,t.DeletePublicAccessBlockCommand=Ae,t.EncodingType={url:`url`},t.EncryptionType={NONE:`NONE`,SSE_C:`SSE-C`},t.Event={s3_IntelligentTiering:`s3:IntelligentTiering`,s3_LifecycleExpiration_:`s3:LifecycleExpiration:*`,s3_LifecycleExpiration_Delete:`s3:LifecycleExpiration:Delete`,s3_LifecycleExpiration_DeleteMarkerCreated:`s3:LifecycleExpiration:DeleteMarkerCreated`,s3_LifecycleTransition:`s3:LifecycleTransition`,s3_ObjectAcl_Put:`s3:ObjectAcl:Put`,s3_ObjectCreated_:`s3:ObjectCreated:*`,s3_ObjectCreated_CompleteMultipartUpload:`s3:ObjectCreated:CompleteMultipartUpload`,s3_ObjectCreated_Copy:`s3:ObjectCreated:Copy`,s3_ObjectCreated_Post:`s3:ObjectCreated:Post`,s3_ObjectCreated_Put:`s3:ObjectCreated:Put`,s3_ObjectRemoved_:`s3:ObjectRemoved:*`,s3_ObjectRemoved_Delete:`s3:ObjectRemoved:Delete`,s3_ObjectRemoved_DeleteMarkerCreated:`s3:ObjectRemoved:DeleteMarkerCreated`,s3_ObjectRestore_:`s3:ObjectRestore:*`,s3_ObjectRestore_Completed:`s3:ObjectRestore:Completed`,s3_ObjectRestore_Delete:`s3:ObjectRestore:Delete`,s3_ObjectRestore_Post:`s3:ObjectRestore:Post`,s3_ObjectTagging_:`s3:ObjectTagging:*`,s3_ObjectTagging_Delete:`s3:ObjectTagging:Delete`,s3_ObjectTagging_Put:`s3:ObjectTagging:Put`,s3_ReducedRedundancyLostObject:`s3:ReducedRedundancyLostObject`,s3_Replication_:`s3:Replication:*`,s3_Replication_OperationFailedReplication:`s3:Replication:OperationFailedReplication`,s3_Replication_OperationMissedThreshold:`s3:Replication:OperationMissedThreshold`,s3_Replication_OperationNotTracked:`s3:Replication:OperationNotTracked`,s3_Replication_OperationReplicatedAfterThreshold:`s3:Replication:OperationReplicatedAfterThreshold`},t.ExistingObjectReplicationStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.ExpirationState={DISABLED:`DISABLED`,ENABLED:`ENABLED`},t.ExpirationStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.ExpressionType={SQL:`SQL`},t.FileHeaderInfo={IGNORE:`IGNORE`,NONE:`NONE`,USE:`USE`},t.FilterRuleName={prefix:`prefix`,suffix:`suffix`},t.GetBucketAbacCommand=je,t.GetBucketAccelerateConfigurationCommand=Me,t.GetBucketAclCommand=Ne,t.GetBucketAnalyticsConfigurationCommand=Pe,t.GetBucketCorsCommand=Fe,t.GetBucketEncryptionCommand=Ie,t.GetBucketIntelligentTieringConfigurationCommand=Le,t.GetBucketInventoryConfigurationCommand=Re,t.GetBucketLifecycleConfigurationCommand=ze,t.GetBucketLocationCommand=Be,t.GetBucketLoggingCommand=Ve,t.GetBucketMetadataConfigurationCommand=He,t.GetBucketMetadataTableConfigurationCommand=Ue,t.GetBucketMetricsConfigurationCommand=We,t.GetBucketNotificationConfigurationCommand=Ge,t.GetBucketOwnershipControlsCommand=Ke,t.GetBucketPolicyCommand=qe,t.GetBucketPolicyStatusCommand=Je,t.GetBucketReplicationCommand=G,t.GetBucketRequestPaymentCommand=Ye,t.GetBucketTaggingCommand=Xe,t.GetBucketVersioningCommand=Ze,t.GetBucketWebsiteCommand=Qe,t.GetObjectAclCommand=$e,t.GetObjectAttributesCommand=et,t.GetObjectCommand=tt,t.GetObjectLegalHoldCommand=nt,t.GetObjectLockConfigurationCommand=rt,t.GetObjectRetentionCommand=it,t.GetObjectTaggingCommand=at,t.GetObjectTorrentCommand=ot,t.GetPublicAccessBlockCommand=st,t.HeadBucketCommand=ct,t.HeadObjectCommand=lt,t.IntelligentTieringAccessTier={ARCHIVE_ACCESS:`ARCHIVE_ACCESS`,DEEP_ARCHIVE_ACCESS:`DEEP_ARCHIVE_ACCESS`},t.IntelligentTieringStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.InventoryConfigurationState={DISABLED:`DISABLED`,ENABLED:`ENABLED`},t.InventoryFormat={CSV:`CSV`,ORC:`ORC`,Parquet:`Parquet`},t.InventoryFrequency={Daily:`Daily`,Weekly:`Weekly`},t.InventoryIncludedObjectVersions={All:`All`,Current:`Current`},t.InventoryOptionalField={BucketKeyStatus:`BucketKeyStatus`,ChecksumAlgorithm:`ChecksumAlgorithm`,ETag:`ETag`,EncryptionStatus:`EncryptionStatus`,IntelligentTieringAccessTier:`IntelligentTieringAccessTier`,IsMultipartUploaded:`IsMultipartUploaded`,LastModifiedDate:`LastModifiedDate`,LifecycleExpirationDate:`LifecycleExpirationDate`,ObjectAccessControlList:`ObjectAccessControlList`,ObjectLockLegalHoldStatus:`ObjectLockLegalHoldStatus`,ObjectLockMode:`ObjectLockMode`,ObjectLockRetainUntilDate:`ObjectLockRetainUntilDate`,ObjectOwner:`ObjectOwner`,ReplicationStatus:`ReplicationStatus`,Size:`Size`,StorageClass:`StorageClass`},t.JSONType={DOCUMENT:`DOCUMENT`,LINES:`LINES`},t.ListBucketAnalyticsConfigurationsCommand=ut,t.ListBucketIntelligentTieringConfigurationsCommand=dt,t.ListBucketInventoryConfigurationsCommand=ft,t.ListBucketMetricsConfigurationsCommand=pt,t.ListBucketsCommand=mt,t.ListDirectoryBucketsCommand=ht,t.ListMultipartUploadsCommand=gt,t.ListObjectVersionsCommand=yt,t.ListObjectsCommand=_t,t.ListObjectsV2Command=vt,t.ListPartsCommand=bt,t.LocationType={AvailabilityZone:`AvailabilityZone`,LocalZone:`LocalZone`},t.MFADelete={Disabled:`Disabled`,Enabled:`Enabled`},t.MFADeleteStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.MetadataDirective={COPY:`COPY`,REPLACE:`REPLACE`},t.MetricsStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.ObjectAttributes={CHECKSUM:`Checksum`,ETAG:`ETag`,OBJECT_PARTS:`ObjectParts`,OBJECT_SIZE:`ObjectSize`,STORAGE_CLASS:`StorageClass`},t.ObjectCannedACL={authenticated_read:`authenticated-read`,aws_exec_read:`aws-exec-read`,bucket_owner_full_control:`bucket-owner-full-control`,bucket_owner_read:`bucket-owner-read`,private:`private`,public_read:`public-read`,public_read_write:`public-read-write`},t.ObjectLockEnabled={Enabled:`Enabled`},t.ObjectLockLegalHoldStatus={OFF:`OFF`,ON:`ON`},t.ObjectLockMode={COMPLIANCE:`COMPLIANCE`,GOVERNANCE:`GOVERNANCE`},t.ObjectLockRetentionMode={COMPLIANCE:`COMPLIANCE`,GOVERNANCE:`GOVERNANCE`},t.ObjectOwnership={BucketOwnerEnforced:`BucketOwnerEnforced`,BucketOwnerPreferred:`BucketOwnerPreferred`,ObjectWriter:`ObjectWriter`},t.ObjectStorageClass={DEEP_ARCHIVE:`DEEP_ARCHIVE`,EXPRESS_ONEZONE:`EXPRESS_ONEZONE`,FSX_ONTAP:`FSX_ONTAP`,FSX_OPENZFS:`FSX_OPENZFS`,GLACIER:`GLACIER`,GLACIER_IR:`GLACIER_IR`,INTELLIGENT_TIERING:`INTELLIGENT_TIERING`,ONEZONE_IA:`ONEZONE_IA`,OUTPOSTS:`OUTPOSTS`,REDUCED_REDUNDANCY:`REDUCED_REDUNDANCY`,SNOW:`SNOW`,STANDARD:`STANDARD`,STANDARD_IA:`STANDARD_IA`},t.ObjectVersionStorageClass={STANDARD:`STANDARD`},t.OptionalObjectAttributes={RESTORE_STATUS:`RestoreStatus`},t.OwnerOverride={Destination:`Destination`},t.PartitionDateSource={DeliveryTime:`DeliveryTime`,EventTime:`EventTime`},t.Payer={BucketOwner:`BucketOwner`,Requester:`Requester`},t.Permission={FULL_CONTROL:`FULL_CONTROL`,READ:`READ`,READ_ACP:`READ_ACP`,WRITE:`WRITE`,WRITE_ACP:`WRITE_ACP`},t.Protocol={http:`http`,https:`https`},t.PutBucketAbacCommand=xt,t.PutBucketAccelerateConfigurationCommand=St,t.PutBucketAclCommand=Ct,t.PutBucketAnalyticsConfigurationCommand=wt,t.PutBucketCorsCommand=Tt,t.PutBucketEncryptionCommand=Et,t.PutBucketIntelligentTieringConfigurationCommand=Dt,t.PutBucketInventoryConfigurationCommand=Ot,t.PutBucketLifecycleConfigurationCommand=kt,t.PutBucketLoggingCommand=At,t.PutBucketMetricsConfigurationCommand=jt,t.PutBucketNotificationConfigurationCommand=Mt,t.PutBucketOwnershipControlsCommand=Nt,t.PutBucketPolicyCommand=Pt,t.PutBucketReplicationCommand=Ft,t.PutBucketRequestPaymentCommand=It,t.PutBucketTaggingCommand=Lt,t.PutBucketVersioningCommand=Rt,t.PutBucketWebsiteCommand=zt,t.PutObjectAclCommand=Bt,t.PutObjectCommand=Vt,t.PutObjectLegalHoldCommand=Ht,t.PutObjectLockConfigurationCommand=Ut,t.PutObjectRetentionCommand=Wt,t.PutObjectTaggingCommand=Gt,t.PutPublicAccessBlockCommand=Kt,t.QuoteFields={ALWAYS:`ALWAYS`,ASNEEDED:`ASNEEDED`},t.RenameObjectCommand=qt,t.ReplicaModificationsStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.ReplicationRuleStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.ReplicationStatus={COMPLETE:`COMPLETE`,COMPLETED:`COMPLETED`,FAILED:`FAILED`,PENDING:`PENDING`,REPLICA:`REPLICA`},t.ReplicationTimeStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.RequestCharged={requester:`requester`},t.RequestPayer={requester:`requester`},t.RestoreObjectCommand=Jt,t.RestoreRequestType={SELECT:`SELECT`},t.S3=Sn,t.S3Client=oe,t.S3TablesBucketType={aws:`aws`,customer:`customer`},t.SelectObjectContentCommand=Yt,t.ServerSideEncryption={AES256:`AES256`,aws_fsx:`aws:fsx`,aws_kms:`aws:kms`,aws_kms_dsse:`aws:kms:dsse`},t.SessionMode={ReadOnly:`ReadOnly`,ReadWrite:`ReadWrite`},t.SseKmsEncryptedObjectsStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.StorageClass={DEEP_ARCHIVE:`DEEP_ARCHIVE`,EXPRESS_ONEZONE:`EXPRESS_ONEZONE`,FSX_ONTAP:`FSX_ONTAP`,FSX_OPENZFS:`FSX_OPENZFS`,GLACIER:`GLACIER`,GLACIER_IR:`GLACIER_IR`,INTELLIGENT_TIERING:`INTELLIGENT_TIERING`,ONEZONE_IA:`ONEZONE_IA`,OUTPOSTS:`OUTPOSTS`,REDUCED_REDUNDANCY:`REDUCED_REDUNDANCY`,SNOW:`SNOW`,STANDARD:`STANDARD`,STANDARD_IA:`STANDARD_IA`},t.StorageClassAnalysisSchemaVersion={V_1:`V_1`},t.TableSseAlgorithm={AES256:`AES256`,aws_kms:`aws:kms`},t.TaggingDirective={COPY:`COPY`,REPLACE:`REPLACE`},t.Tier={Bulk:`Bulk`,Expedited:`Expedited`,Standard:`Standard`},t.TransitionDefaultMinimumObjectSize={all_storage_classes_128K:`all_storage_classes_128K`,varies_by_storage_class:`varies_by_storage_class`},t.TransitionStorageClass={DEEP_ARCHIVE:`DEEP_ARCHIVE`,GLACIER:`GLACIER`,GLACIER_IR:`GLACIER_IR`,INTELLIGENT_TIERING:`INTELLIGENT_TIERING`,ONEZONE_IA:`ONEZONE_IA`,STANDARD_IA:`STANDARD_IA`},t.Type={AmazonCustomerByEmail:`AmazonCustomerByEmail`,CanonicalUser:`CanonicalUser`,Group:`Group`},t.UpdateBucketMetadataInventoryTableConfigurationCommand=Xt,t.UpdateBucketMetadataJournalTableConfigurationCommand=Zt,t.UpdateObjectEncryptionCommand=Qt,t.UploadPartCommand=$t,t.UploadPartCopyCommand=en,t.WriteGetObjectResponseCommand=tn,t.paginateListBuckets=nn,t.paginateListDirectoryBuckets=rn,t.paginateListObjectsV2=an,t.paginateListParts=on,t.waitForBucketExists=cn,t.waitForBucketNotExists=dn,t.waitForObjectExists=mn,t.waitForObjectNotExists=_n,t.waitUntilBucketExists=ln,t.waitUntilBucketNotExists=fn,t.waitUntilObjectExists=hn,t.waitUntilObjectNotExists=vn,Object.prototype.hasOwnProperty.call(T,`__proto__`)&&!Object.prototype.hasOwnProperty.call(t,`__proto__`)&&Object.defineProperty(t,`__proto__`,{enumerable:!0,value:T.__proto__}),Object.keys(T).forEach(function(e){e!==`default`&&!Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=T[e])}),Object.prototype.hasOwnProperty.call(R,`__proto__`)&&!Object.prototype.hasOwnProperty.call(t,`__proto__`)&&Object.defineProperty(t,`__proto__`,{enumerable:!0,value:R.__proto__}),Object.keys(R).forEach(function(e){e!==`default`&&!Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=R[e])})}))();function nc(e){return e.replaceAll(/X-Amz-[A-Za-z0-9-]+=[^&\s]+/g,`X-Amz-REDACTED=[REDACTED]`).replaceAll(/Authorization([:=]\s*)(Bearer\s+)?[^,\s]+/gi,`Authorization$1$2[REDACTED]`).slice(0,500)}function rc(e,t,n){let r=typeof n==`object`&&n&&`Code`in n?String(n.Code):void 0,i=n instanceof Error?n.name:`UnknownError`,a=typeof n==`object`&&n&&`$metadata`in n&&typeof n.$metadata==`object`&&n.$metadata!=null&&`httpStatusCode`in n.$metadata?Number(n.$metadata.httpStatusCode):void 0,o=nc(n instanceof Error?n.message:String(n));return e.warning(`Object store ${t} failed`,{errorCode:r,errorName:i,httpStatusCode:a,message:o}),qo(`Object store ${t} failed: ${o}`)}function ic(e){return e.region.length>0?e.region:void 0}function ac(e){let t=ic(e);return e.endpoint==null?new tc.S3Client({maxAttempts:3,region:t}):new tc.S3Client({endpoint:e.endpoint,forcePathStyle:!0,maxAttempts:3,region:t})}function oc(e){return e.sseEncryption==null?e.endpoint==null?`aws:kms`:`AES256`:e.sseEncryption}function sc(e,t){let n=ac(e),r=oc(e);return{upload:async(i,a)=>{t.debug(`Uploading object store file`,{key:i,localPath:a});try{let o={Body:Ge.createReadStream(a),Bucket:e.bucket,ExpectedBucketOwner:e.expectedBucketOwner,Key:i,ServerSideEncryption:r};r===`aws:kms`&&e.sseKmsKeyId!=null&&(o.SSEKMSKeyId=e.sseKmsKeyId);let s=new tc.PutObjectCommand({...o});return await n.send(s),t.info(`Uploaded object store file`,{key:i}),Lo(void 0)}catch(e){return Ro(rc(t,`upload`,e))}},download:async(r,i)=>{t.debug(`Downloading object store file`,{key:r,localPath:i});try{await ze.mkdir(Be.dirname(i),{recursive:!0});let a=await n.send(new tc.GetObjectCommand({Bucket:e.bucket,ExpectedBucketOwner:e.expectedBucketOwner,Key:r}));return a.Body instanceof W?(await qe(a.Body,Ge.createWriteStream(i)),t.info(`Downloaded object store file`,{key:r,localPath:i}),Lo(void 0)):Ro(qo(`Object store download failed: response body was not readable`))}catch(e){return Ro(rc(t,`download`,e))}},list:async r=>{t.debug(`Listing object store keys`,{prefix:r});try{let i=[],a,o=0;do{if(o>=100){t.warning(`Object store list hit iteration cap, truncating result`,{prefix:r,maxIterations:100,keysReturned:i.length});break}o++;let s=await n.send(new tc.ListObjectsV2Command({Bucket:e.bucket,ContinuationToken:a,ExpectedBucketOwner:e.expectedBucketOwner,Prefix:r}));for(let e of s.Contents??[])e.Key!=null&&i.push(e.Key);a=s.IsTruncated===!0?s.NextContinuationToken:void 0}while(a!=null);return t.info(`Listed object store keys`,{count:i.length,prefix:r}),Lo(i)}catch(e){return Ro(rc(t,`list`,e))}}}}const cc=[`token`,`password`,`secret`,`key`,`auth`,`credential`,`bearer`,`apikey`,`api_key`,`access_token`,`refresh_token`,`private`];function lc(e,t){let n=e.toLowerCase();return t.some(e=>n.includes(e.toLowerCase()))}function uc(e,t=cc){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return e.map(e=>uc(e,t));let n={};for(let[r,i]of Object.entries(e))lc(r,t)&&typeof i==`string`?n[r]=`[REDACTED]`:typeof i==`object`&&i?n[r]=uc(i,t):n[r]=i;return n}function dc(e,t,n,r){let i=uc({...n,...r},cc),a={timestamp:new Date().toISOString(),level:e,message:t,...i};if(r!=null&&`error`in r&&r.error instanceof Error){let e=r.error;a.error={message:e.message,name:e.name,stack:e.stack}}return JSON.stringify(a)}function fc(e){return{debug:(t,n)=>{K(dc(`debug`,t,e,n))},info:(t,n)=>{vi(dc(`info`,t,e,n))},warning:(t,n)=>{_i(dc(`warning`,t,e,n))},error:(t,n)=>{gi(dc(`error`,t,e,n))}}}const pc={SHOULD_SAVE_CACHE:`shouldSaveCache`,SESSION_ID:`sessionId`,CACHE_SAVED:`cacheSaved`,ARTIFACT_UPLOADED:`artifactUploaded`,OPENCODE_VERSION:`opencodeVersion`,S3_ENABLED:`storeConfig.enabled`,S3_BUCKET:`storeConfig.bucket`,S3_REGION:`storeConfig.region`,S3_PREFIX:`storeConfig.prefix`,S3_ENDPOINT:`storeConfig.endpoint`,S3_EXPECTED_BUCKET_OWNER:`storeConfig.expectedBucketOwner`,S3_ALLOW_INSECURE_ENDPOINT:`storeConfig.allowInsecureEndpoint`,S3_SSE_ENCRYPTION:`storeConfig.sseEncryption`,S3_SSE_KMS_KEY_ID:`storeConfig.sseKmsKeyId`};var mc=class{constructor(){if(this.payload={},process.env.GITHUB_EVENT_PATH)if(me(process.env.GITHUB_EVENT_PATH))this.payload=JSON.parse(ge(process.env.GITHUB_EVENT_PATH,{encoding:`utf8`}));else{let e=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${e} does not exist${ue}`)}this.eventName=process.env.GITHUB_EVENT_NAME,this.sha=process.env.GITHUB_SHA,this.ref=process.env.GITHUB_REF,this.workflow=process.env.GITHUB_WORKFLOW,this.action=process.env.GITHUB_ACTION,this.actor=process.env.GITHUB_ACTOR,this.job=process.env.GITHUB_JOB,this.runAttempt=parseInt(process.env.GITHUB_RUN_ATTEMPT,10),this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10),this.runId=parseInt(process.env.GITHUB_RUN_ID,10),this.apiUrl=process.env.GITHUB_API_URL??`https://api.github.com`,this.serverUrl=process.env.GITHUB_SERVER_URL??`https://github.com`,this.graphqlUrl=process.env.GITHUB_GRAPHQL_URL??`https://api.github.com/graphql`}get issue(){let e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){let[e,t]=process.env.GITHUB_REPOSITORY.split(`/`);return{owner:e,repo:t}}if(this.payload.repository)return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name};throw Error(`context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'`)}},hc=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getProxyUrl=t,e.checkBypass=n;function t(e){let t=e.protocol===`https:`;if(n(e))return;let r=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new i(r)}catch{if(!r.startsWith(`http://`)&&!r.startsWith(`https://`))return new i(`http://${r}`)}else return}function n(e){if(!e.hostname)return!1;let t=e.hostname;if(r(t))return!0;let n=process.env.no_proxy||process.env.NO_PROXY||``;if(!n)return!1;let i;e.port?i=Number(e.port):e.protocol===`http:`?i=80:e.protocol===`https:`&&(i=443);let a=[e.hostname.toUpperCase()];typeof i==`number`&&a.push(`${a[0]}:${i}`);for(let e of n.split(`,`).map(e=>e.trim().toUpperCase()).filter(e=>e))if(e===`*`||a.some(t=>t===e||t.endsWith(`.${e}`)||e.startsWith(`.`)&&t.endsWith(`${e}`)))return!0;return!1}function r(e){let t=e.toLowerCase();return t===`localhost`||t.startsWith(`127.`)||t.startsWith(`[::1]`)||t.startsWith(`[0:0:0:0:0:0:0:1]`)}var i=class extends URL{constructor(e,t){super(e,t),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}})),gc=n(i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var a=e(t),o=0;oa(this,void 0,void 0,function*(){let t=Buffer.alloc(0);this.message.on(`data`,e=>{t=Buffer.concat([t,e])}),this.message.on(`end`,()=>{e(t.toString())})}))})}readBodyBuffer(){return a(this,void 0,void 0,function*(){return new Promise(e=>a(this,void 0,void 0,function*(){let t=[];this.message.on(`data`,e=>{t.push(e)}),this.message.on(`end`,()=>{e(Buffer.concat(t))})}))})}};e.HttpClientResponse=b;function x(e){return new URL(e).protocol===`https:`}e.HttpClient=class{constructor(e,t,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=this._getUserAgentWithOrchestrationId(e),this.handlers=t||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries))}options(e,t){return a(this,void 0,void 0,function*(){return this.request(`OPTIONS`,e,null,t||{})})}get(e,t){return a(this,void 0,void 0,function*(){return this.request(`GET`,e,null,t||{})})}del(e,t){return a(this,void 0,void 0,function*(){return this.request(`DELETE`,e,null,t||{})})}post(e,t,n){return a(this,void 0,void 0,function*(){return this.request(`POST`,e,t,n||{})})}patch(e,t,n){return a(this,void 0,void 0,function*(){return this.request(`PATCH`,e,t,n||{})})}put(e,t,n){return a(this,void 0,void 0,function*(){return this.request(`PUT`,e,t,n||{})})}head(e,t){return a(this,void 0,void 0,function*(){return this.request(`HEAD`,e,null,t||{})})}sendStream(e,t,n,r){return a(this,void 0,void 0,function*(){return this.request(e,t,n,r)})}getJson(e){return a(this,arguments,void 0,function*(e,t={}){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);let n=yield this.get(e,t);return this._processResponse(n,this.requestOptions)})}postJson(e,t){return a(this,arguments,void 0,function*(e,t,n={}){let r=JSON.stringify(t,null,2);n[f.Accept]=this._getExistingOrDefaultHeader(n,f.Accept,p.ApplicationJson),n[f.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,p.ApplicationJson);let i=yield this.post(e,r,n);return this._processResponse(i,this.requestOptions)})}putJson(e,t){return a(this,arguments,void 0,function*(e,t,n={}){let r=JSON.stringify(t,null,2);n[f.Accept]=this._getExistingOrDefaultHeader(n,f.Accept,p.ApplicationJson),n[f.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,p.ApplicationJson);let i=yield this.put(e,r,n);return this._processResponse(i,this.requestOptions)})}patchJson(e,t){return a(this,arguments,void 0,function*(e,t,n={}){let r=JSON.stringify(t,null,2);n[f.Accept]=this._getExistingOrDefaultHeader(n,f.Accept,p.ApplicationJson),n[f.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,p.ApplicationJson);let i=yield this.patch(e,r,n);return this._processResponse(i,this.requestOptions)})}request(e,t,n,r){return a(this,void 0,void 0,function*(){if(this._disposed)throw Error(`Client has already been disposed.`);let i=new URL(t),a=this._prepareRequest(e,i,r),o=this._allowRetries&&v.includes(e)?this._maxRetries+1:1,s=0,c;do{if(c=yield this.requestRaw(a,n),c&&c.message&&c.message.statusCode===d.Unauthorized){let e;for(let t of this.handlers)if(t.canHandleAuthentication(c)){e=t;break}return e?e.handleAuthentication(this,a,n):c}let t=this._maxRedirects;for(;c.message.statusCode&&h.includes(c.message.statusCode)&&this._allowRedirects&&t>0;){let o=c.message.headers.location;if(!o)break;let s=new URL(o);if(i.protocol===`https:`&&i.protocol!==s.protocol&&!this._allowRedirectDowngrade)throw Error(`Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.`);if(yield c.readBody(),s.hostname!==i.hostname)for(let e in r)e.toLowerCase()===`authorization`&&delete r[e];a=this._prepareRequest(e,s,r),c=yield this.requestRaw(a,n),t--}if(!c.message.statusCode||!g.includes(c.message.statusCode))return c;s+=1,s{function i(e,t){e?r(e):t?n(t):r(Error(`Unknown error`))}this.requestRawWithCallback(e,t,i)})})}requestRawWithCallback(e,t,n){typeof t==`string`&&(e.options.headers||(e.options.headers={}),e.options.headers[`Content-Length`]=Buffer.byteLength(t,`utf8`));let r=!1;function i(e,t){r||(r=!0,n(e,t))}let a=e.httpModule.request(e.options,e=>{i(void 0,new b(e))}),o;a.on(`socket`,e=>{o=e}),a.setTimeout(this._socketTimeout||3*6e4,()=>{o&&o.end(),i(Error(`Request timeout: ${e.options.path}`))}),a.on(`error`,function(e){i(e)}),t&&typeof t==`string`&&a.write(t,`utf8`),t&&typeof t!=`string`?(t.on(`close`,function(){a.end()}),t.pipe(a)):a.end()}getAgent(e){let t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){let t=new URL(e),n=c.getProxyUrl(t);if(n&&n.hostname)return this._getProxyAgentDispatcher(t,n)}_prepareRequest(e,t,n){let r={};r.parsedUrl=t;let i=r.parsedUrl.protocol===`https:`;r.httpModule=i?s:o;let a=i?443:80;if(r.options={},r.options.host=r.parsedUrl.hostname,r.options.port=r.parsedUrl.port?parseInt(r.parsedUrl.port):a,r.options.path=(r.parsedUrl.pathname||``)+(r.parsedUrl.search||``),r.options.method=e,r.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(r.options.headers[`user-agent`]=this.userAgent),r.options.agent=this._getAgent(r.parsedUrl),this.handlers)for(let e of this.handlers)e.prepareRequest(r.options);return r}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},S(this.requestOptions.headers),S(e||{})):S(e||{})}_getExistingOrDefaultHeader(e,t,n){let r;if(this.requestOptions&&this.requestOptions.headers){let e=S(this.requestOptions.headers)[t];e&&(r=typeof e==`number`?e.toString():e)}let i=e[t];return i===void 0?r===void 0?n:r:typeof i==`number`?i.toString():i}_getExistingOrDefaultContentTypeHeader(e,t){let n;if(this.requestOptions&&this.requestOptions.headers){let e=S(this.requestOptions.headers)[f.ContentType];e&&(n=typeof e==`number`?String(e):Array.isArray(e)?e.join(`, `):e)}let r=e[f.ContentType];return r===void 0?n===void 0?t:n:typeof r==`number`?String(r):Array.isArray(r)?r.join(`, `):r}_getAgent(e){let t,n=c.getProxyUrl(e),r=n&&n.hostname;if(this._keepAlive&&r&&(t=this._proxyAgent),r||(t=this._agent),t)return t;let i=e.protocol===`https:`,a=100;if(this.requestOptions&&(a=this.requestOptions.maxSockets||o.globalAgent.maxSockets),n&&n.hostname){let e={maxSockets:a,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})},r,o=n.protocol===`https:`;r=i?o?l.httpsOverHttps:l.httpsOverHttp:o?l.httpOverHttps:l.httpOverHttp,t=r(e),this._proxyAgent=t}if(!t){let e={keepAlive:this._keepAlive,maxSockets:a};t=i?new s.Agent(e):new o.Agent(e),this._agent=t}return i&&this._ignoreSslError&&(t.options=Object.assign(t.options||{},{rejectUnauthorized:!1})),t}_getProxyAgentDispatcher(e,t){let n;if(this._keepAlive&&(n=this._proxyAgentDispatcher),n)return n;let r=e.protocol===`https:`;return n=new u.ProxyAgent(Object.assign({uri:t.href,pipelining:+!!this._keepAlive},(t.username||t.password)&&{token:`Basic ${Buffer.from(`${t.username}:${t.password}`).toString(`base64`)}`})),this._proxyAgentDispatcher=n,r&&this._ignoreSslError&&(n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:!1})),n}_getUserAgentWithOrchestrationId(e){let t=e||`actions/http-client`,n=process.env.ACTIONS_ORCHESTRATION_ID;return n?`${t} actions_orchestration_id/${n.replace(/[^a-z0-9_.-]/gi,`_`)}`:t}_performExponentialBackoff(e){return a(this,void 0,void 0,function*(){e=Math.min(10,e);let t=5*2**e;return new Promise(e=>setTimeout(()=>e(),t))})}_processResponse(e,t){return a(this,void 0,void 0,function*(){return new Promise((n,r)=>a(this,void 0,void 0,function*(){let i=e.message.statusCode||0,a={statusCode:i,result:null,headers:{}};i===d.NotFound&&n(a);function o(e,t){if(typeof t==`string`){let e=new Date(t);if(!isNaN(e.valueOf()))return e}return t}let s,c;try{c=yield e.readBody(),c&&c.length>0&&(s=t&&t.deserializeDates?JSON.parse(c,o):JSON.parse(c),a.result=s),a.headers=e.message.headers}catch{}if(i>299){let e;e=s&&s.message?s.message:c&&c.length>0?c:`Failed request: (${i})`;let t=new y(e,i);t.result=a.result,r(t)}else n(a)}))})}};let S=e=>Object.keys(e).reduce((t,n)=>(t[n.toLowerCase()]=e[n],t),{})}))(),1),_c=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function vc(e,t){if(!e&&!t.auth)throw Error(`Parameter token or opts.auth is required`);if(e&&t.auth)throw Error(`Parameters token and opts.auth may not both be specified`);return typeof t.auth==`string`?t.auth:`token ${e}`}function yc(e){return new gc.HttpClient().getAgent(e)}function bc(e){return new gc.HttpClient().getAgentDispatcher(e)}function xc(e){let t=bc(e);return(e,n)=>_c(this,void 0,void 0,function*(){return(0,ar.fetch)(e,Object.assign(Object.assign({},n),{dispatcher:t}))})}function Sc(){return process.env.GITHUB_API_URL||`https://api.github.com`}function Cc(e){let t=process.env.ACTIONS_ORCHESTRATION_ID?.trim();if(t){let n=`actions_orchestration_id/${t.replace(/[^a-z0-9_.-]/gi,`_`)}`;return e?.includes(n)?e:`${e?`${e} `:``}${n}`}return e}function wc(){return typeof navigator==`object`&&`userAgent`in navigator?navigator.userAgent:typeof process==`object`&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:``}function Tc(e,t,n,r){if(typeof n!=`function`)throw Error(`method for before hook must be a function`);return r||={},Array.isArray(t)?t.reverse().reduce((t,n)=>Tc.bind(null,e,n,t,r),n)():Promise.resolve().then(()=>e.registry[t]?e.registry[t].reduce((e,t)=>t.hook.bind(null,e,r),n)():n(r))}function Ec(e,t,n,r){let i=r;e.registry[n]||(e.registry[n]=[]),t===`before`&&(r=(e,t)=>Promise.resolve().then(i.bind(null,t)).then(e.bind(null,t))),t===`after`&&(r=(e,t)=>{let n;return Promise.resolve().then(e.bind(null,t)).then(e=>(n=e,i(n,t))).then(()=>n)}),t===`error`&&(r=(e,t)=>Promise.resolve().then(e.bind(null,t)).catch(e=>i(e,t))),e.registry[n].push({hook:r,orig:i})}function Dc(e,t,n){if(!e.registry[t])return;let r=e.registry[t].map(e=>e.orig).indexOf(n);r!==-1&&e.registry[t].splice(r,1)}const Oc=Function.bind,kc=Oc.bind(Oc);function Ac(e,t,n){let r=kc(Dc,null).apply(null,n?[t,n]:[t]);e.api={remove:r},e.remove=r,[`before`,`error`,`after`,`wrap`].forEach(r=>{let i=n?[t,r,n]:[t,r];e[r]=e.api[r]=kc(Ec,null).apply(null,i)})}function jc(){let e=Symbol(`Singular`),t={registry:{}},n=Tc.bind(null,t,e);return Ac(n,t,e),n}function Mc(){let e={registry:{}},t=Tc.bind(null,e);return Ac(t,e),t}var Nc={Singular:jc,Collection:Mc},Pc={method:`GET`,baseUrl:`https://api.github.com`,headers:{accept:`application/vnd.github.v3+json`,"user-agent":`octokit-endpoint.js/0.0.0-development ${wc()}`},mediaType:{format:``}};function Fc(e){return e?Object.keys(e).reduce((t,n)=>(t[n.toLowerCase()]=e[n],t),{}):{}}function Ic(e){if(typeof e!=`object`||!e||Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=Object.prototype.hasOwnProperty.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Function.prototype.call(n)===Function.prototype.call(e)}function Lc(e,t){let n=Object.assign({},e);return Object.keys(t).forEach(r=>{Ic(t[r])&&r in e?n[r]=Lc(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}function Rc(e){for(let t in e)e[t]===void 0&&delete e[t];return e}function zc(e,t,n){if(typeof t==`string`){let[e,r]=t.split(` `);n=Object.assign(r?{method:e,url:r}:{url:e},n)}else n=Object.assign({},t);n.headers=Fc(n.headers),Rc(n),Rc(n.headers);let r=Lc(e||{},n);return n.url===`/graphql`&&(e&&e.mediaType.previews?.length&&(r.mediaType.previews=e.mediaType.previews.filter(e=>!r.mediaType.previews.includes(e)).concat(r.mediaType.previews)),r.mediaType.previews=(r.mediaType.previews||[]).map(e=>e.replace(/-preview/,``))),r}function Bc(e,t){let n=/\?/.test(e)?`&`:`?`,r=Object.keys(t);return r.length===0?e:e+n+r.map(e=>e===`q`?`q=`+t.q.split(`+`).map(encodeURIComponent).join(`+`):`${e}=${encodeURIComponent(t[e])}`).join(`&`)}var Vc=/\{[^{}}]+\}/g;function Hc(e){return e.replace(/(?:^\W+)|(?:(?e.concat(t),[]):[]}function Wc(e,t){let n={__proto__:null};for(let r of Object.keys(e))t.indexOf(r)===-1&&(n[r]=e[r]);return n}function Gc(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,`[`).replace(/%5D/g,`]`)),e}).join(``)}function Kc(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return`%`+e.charCodeAt(0).toString(16).toUpperCase()})}function qc(e,t,n){return t=e===`+`||e===`#`?Gc(t):Kc(t),n?Kc(n)+`=`+t:t}function Jc(e){return e!=null}function Yc(e){return e===`;`||e===`&`||e===`?`}function Xc(e,t,n,r){var i=e[n],a=[];if(Jc(i)&&i!==``)if(typeof i==`string`||typeof i==`number`||typeof i==`bigint`||typeof i==`boolean`)i=i.toString(),r&&r!==`*`&&(i=i.substring(0,parseInt(r,10))),a.push(qc(t,i,Yc(t)?n:``));else if(r===`*`)Array.isArray(i)?i.filter(Jc).forEach(function(e){a.push(qc(t,e,Yc(t)?n:``))}):Object.keys(i).forEach(function(e){Jc(i[e])&&a.push(qc(t,i[e],e))});else{let e=[];Array.isArray(i)?i.filter(Jc).forEach(function(n){e.push(qc(t,n))}):Object.keys(i).forEach(function(n){Jc(i[n])&&(e.push(Kc(n)),e.push(qc(t,i[n].toString())))}),Yc(t)?a.push(Kc(n)+`=`+e.join(`,`)):e.length!==0&&a.push(e.join(`,`))}else t===`;`?Jc(i)&&a.push(Kc(n)):i===``&&(t===`&`||t===`?`)?a.push(Kc(n)+`=`):i===``&&a.push(``);return a}function Zc(e){return{expand:Qc.bind(null,e)}}function Qc(e,t){var n=[`+`,`#`,`.`,`/`,`;`,`?`,`&`];return e=e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(e,r,i){if(r){let e=``,i=[];if(n.indexOf(r.charAt(0))!==-1&&(e=r.charAt(0),r=r.substr(1)),r.split(/,/g).forEach(function(n){var r=/([^:\*]*)(?::(\d+)|(\*))?/.exec(n);i.push(Xc(t,e,r[1],r[2]||r[3]))}),e&&e!==`+`){var a=`,`;return e===`?`?a=`&`:e!==`#`&&(a=e),(i.length===0?``:e)+i.join(a)}else return i.join(`,`)}else return Gc(i)}),e===`/`?e:e.replace(/\/$/,``)}function $c(e){let t=e.method.toUpperCase(),n=(e.url||`/`).replace(/:([a-z]\w+)/g,`{$1}`),r=Object.assign({},e.headers),i,a=Wc(e,[`method`,`baseUrl`,`url`,`headers`,`request`,`mediaType`]),o=Uc(n);n=Zc(n).expand(a),/^http/.test(n)||(n=e.baseUrl+n);let s=Wc(a,Object.keys(e).filter(e=>o.includes(e)).concat(`baseUrl`));return/application\/octet-stream/i.test(r.accept)||(e.mediaType.format&&(r.accept=r.accept.split(/,/).map(t=>t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`)).join(`,`)),n.endsWith(`/graphql`)&&e.mediaType.previews?.length&&(r.accept=(r.accept.match(/(?`application/vnd.github.${t}-preview${e.mediaType.format?`.${e.mediaType.format}`:`+json`}`).join(`,`))),[`GET`,`HEAD`].includes(t)?n=Bc(n,s):`data`in s?i=s.data:Object.keys(s).length&&(i=s),!r[`content-type`]&&i!==void 0&&(r[`content-type`]=`application/json; charset=utf-8`),[`PATCH`,`PUT`].includes(t)&&i===void 0&&(i=``),Object.assign({method:t,url:n,headers:r},i===void 0?null:{body:i},e.request?{request:e.request}:null)}function el(e,t,n){return $c(zc(e,t,n))}function tl(e,t){let n=zc(e,t),r=el.bind(null,n);return Object.assign(r,{DEFAULTS:n,defaults:tl.bind(null,n),merge:zc.bind(null,n),parse:$c})}var nl=tl(null,Pc),rl=i(((e,t)=>{let n=function(){};n.prototype=Object.create(null);let r=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,i=/\\([\v\u0020-\u00ff])/gu,a=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,o={type:``,parameters:new n};Object.freeze(o.parameters),Object.freeze(o);function s(e){if(typeof e!=`string`)throw TypeError(`argument header is required and must be a string`);let t=e.indexOf(`;`),o=t===-1?e.trim():e.slice(0,t).trim();if(a.test(o)===!1)throw TypeError(`invalid media type`);let s={type:o.toLowerCase(),parameters:new n};if(t===-1)return s;let c,l,u;for(r.lastIndex=t;l=r.exec(e);){if(l.index!==t)throw TypeError(`invalid parameter format`);t+=l[0].length,c=l[1].toLowerCase(),u=l[2],u[0]===`"`&&(u=u.slice(1,u.length-1),i.test(u)&&(u=u.replace(i,`$1`))),s.parameters[c]=u}if(t!==e.length)throw TypeError(`invalid parameter format`);return s}function c(e){if(typeof e!=`string`)return o;let t=e.indexOf(`;`),s=t===-1?e.trim():e.slice(0,t).trim();if(a.test(s)===!1)return o;let c={type:s.toLowerCase(),parameters:new n};if(t===-1)return c;let l,u,d;for(r.lastIndex=t;u=r.exec(e);){if(u.index!==t)return o;t+=u[0].length,l=u[1].toLowerCase(),d=u[2],d[0]===`"`&&(d=d.slice(1,d.length-1),i.test(d)&&(d=d.replace(i,`$1`))),c.parameters[l]=d}return t===e.length?c:o}t.exports.default={parse:s,safeParse:c},t.exports.parse=s,t.exports.safeParse=c,t.exports.defaultContentType=o}))();const il=/^-?\d+$/,al=/^-?\d+n+$/,ol=JSON.stringify,sl=JSON.parse,cl=/^-?\d+n$/,ll=/([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g,ul=/([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g,dl=(e,t,n)=>`rawJSON`in JSON?ol(e,(e,n)=>typeof n==`bigint`?JSON.rawJSON(n.toString()):typeof t==`function`?t(e,n):(Array.isArray(t)&&t.includes(e),n),n):e?ol(e,(e,n)=>typeof n==`string`&&n.match(al)||typeof n==`bigint`?n.toString()+`n`:typeof t==`function`?t(e,n):(Array.isArray(t)&&t.includes(e),n),n).replace(ll,`$1$2$3`).replace(ul,`$1$2$3`):ol(e,t,n),fl=()=>JSON.parse(`1`,(e,t,n)=>!!n&&n.source===`1`),pl=(e,t,n,r)=>typeof t==`string`&&t.match(cl)?BigInt(t.slice(0,-1)):typeof t==`string`&&t.match(al)?t.slice(0,-1):typeof r==`function`?r(e,t,n):t,ml=(e,t)=>JSON.parse(e,(e,n,r)=>{let i=typeof n==`number`&&(n>2**53-1||n<-(2**53-1)),a=r&&il.test(r.source);return i&&a?BigInt(r.source):typeof t==`function`?t(e,n,r):n}),hl=(2**53-1).toString(),gl=hl.length,_l=/"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g,vl=/^"-?\d+n+"$/,yl=(e,t)=>e?fl()?ml(e,t):sl(e.replace(_l,(e,t,n,r)=>{let i=e[0]===`"`;if(i&&e.match(vl))return e.substring(0,e.length-1)+`n"`;let a=n||r,o=t&&(t.lengthpl(e,n,r,t)):sl(e,t);var bl=class extends Error{name;status;request;response;constructor(e,t,n){super(e,{cause:n.cause}),this.name=`HttpError`,this.status=Number.parseInt(t),Number.isNaN(this.status)&&(this.status=0),`response`in n&&(this.response=n.response);let r=Object.assign({},n.request);n.request.headers.authorization&&(r.headers=Object.assign({},n.request.headers,{authorization:n.request.headers.authorization.replace(/(?``;async function wl(e){let t=e.request?.fetch||globalThis.fetch;if(!t)throw Error(`fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing`);let n=e.request?.log||console,r=e.request?.parseSuccessResponseBody!==!1,i=Sl(e.body)||Array.isArray(e.body)?dl(e.body):e.body,a=Object.fromEntries(Object.entries(e.headers).map(([e,t])=>[e,String(t)])),o;try{o=await t(e.url,{method:e.method,body:i,redirect:e.request?.redirect,headers:a,signal:e.request?.signal,...e.body&&{duplex:`half`}})}catch(t){let n=`Unknown Error`;if(t instanceof Error){if(t.name===`AbortError`)throw t.status=500,t;n=t.message,t.name===`TypeError`&&`cause`in t&&(t.cause instanceof Error?n=t.cause.message:typeof t.cause==`string`&&(n=t.cause))}let r=new bl(n,500,{request:e});throw r.cause=t,r}let s=o.status,c=o.url,l={};for(let[e,t]of o.headers)l[e]=t;let u={url:c,status:s,headers:l,data:``};if(`deprecation`in l){let t=l.link&&l.link.match(/<([^<>]+)>; rel="deprecation"/),r=t&&t.pop();n.warn(`[@octokit/request] "${e.method} ${e.url}" is deprecated. It is scheduled to be removed on ${l.sunset}${r?`. See ${r}`:``}`)}if(s===204||s===205)return u;if(e.method===`HEAD`){if(s<400)return u;throw new bl(o.statusText,s,{response:u,request:e})}if(s===304)throw u.data=await Tl(o),new bl(`Not modified`,s,{response:u,request:e});if(s>=400)throw u.data=await Tl(o),new bl(Dl(u.data),s,{response:u,request:e});return u.data=r?await Tl(o):o.body,u}async function Tl(e){let t=e.headers.get(`content-type`);if(!t)return e.text().catch(Cl);let n=(0,rl.safeParse)(t);if(El(n)){let t=``;try{return t=await e.text(),yl(t)}catch{return t}}else if(n.type.startsWith(`text/`)||n.parameters.charset?.toLowerCase()===`utf-8`)return e.text().catch(Cl);else return e.arrayBuffer().catch(()=>new ArrayBuffer(0))}function El(e){return e.type===`application/json`||e.type===`application/scim+json`}function Dl(e){if(typeof e==`string`)return e;if(e instanceof ArrayBuffer)return`Unknown error`;if(`message`in e){let t=`documentation_url`in e?` - ${e.documentation_url}`:``;return Array.isArray(e.errors)?`${e.message}: ${e.errors.map(e=>JSON.stringify(e)).join(`, `)}${t}`:`${e.message}${t}`}return`Unknown error: ${JSON.stringify(e)}`}function Ol(e,t){let n=e.defaults(t);return Object.assign(function(e,t){let r=n.merge(e,t);if(!r.request||!r.request.hook)return wl(n.parse(r));let i=(e,t)=>wl(n.parse(n.merge(e,t)));return Object.assign(i,{endpoint:n,defaults:Ol.bind(null,n)}),r.request.hook(i,r)},{endpoint:n,defaults:Ol.bind(null,n)})}var kl=Ol(nl,xl),Al=`0.0.0-development`;function jl(e){return`Request failed due to following response errors: `+e.errors.map(e=>` - ${e.message}`).join(` -`)}var co=class extends Error{constructor(e,t,n){super(so(n)),this.request=e,this.headers=t,this.response=n,this.errors=n.errors,this.data=n.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name=`GraphqlResponseError`;errors;data},lo=[`method`,`baseUrl`,`url`,`headers`,`request`,`query`,`mediaType`,`operationName`],uo=[`query`,`method`,`url`],fo=/\/api\/v3\/?$/;function po(e,t,n){if(n){if(typeof t==`string`&&`query`in n)return Promise.reject(Error(`[@octokit/graphql] "query" cannot be used as variable name`));for(let e in n)if(uo.includes(e))return Promise.reject(Error(`[@octokit/graphql] "${e}" cannot be used as variable name`))}let r=typeof t==`string`?Object.assign({query:t},n):t,i=Object.keys(r).reduce((e,t)=>lo.includes(t)?(e[t]=r[t],e):(e.variables||={},e.variables[t]=r[t],e),{}),a=r.baseUrl||e.endpoint.DEFAULTS.baseUrl;return fo.test(a)&&(i.url=a.replace(fo,`/api/graphql`)),e(i).then(e=>{if(e.data.errors){let t={};for(let n of Object.keys(e.headers))t[n]=e.headers[n];throw new co(i,t,e.data)}return e.data.data})}function mo(e,t){let n=e.defaults(t);return Object.assign((e,t)=>po(n,e,t),{defaults:mo.bind(null,n),endpoint:n.endpoint})}mo(ao,{headers:{"user-agent":`octokit-graphql.js/${oo} ${na()}`},method:`POST`,url:`/graphql`});function ho(e){return mo(e,{method:`POST`,url:`/graphql`})}var go=`(?:[a-zA-Z0-9_-]+)`,_o=`\\.`,vo=RegExp(`^${go}${_o}${go}${_o}${go}$`),Q=vo.test.bind(vo);async function yo(e){let t=Q(e),n=e.startsWith(`v1.`)||e.startsWith(`ghs_`),r=e.startsWith(`ghu_`);return{type:`token`,token:e,tokenType:t?`app`:n?`installation`:r?`user-to-server`:`oauth`}}function bo(e){return e.split(/\./).length===3?`bearer ${e}`:`token ${e}`}async function xo(e,t,n,r){let i=t.endpoint.merge(n,r);return i.headers.authorization=bo(e),t(i)}var So=function(e){if(!e)throw Error(`[@octokit/auth-token] No token passed to createTokenAuth`);if(typeof e!=`string`)throw Error(`[@octokit/auth-token] Token passed to createTokenAuth is not a string`);return e=e.replace(/^(token|bearer) +/i,``),Object.assign(yo.bind(null,e),{hook:xo.bind(null,e)})};const Co=`7.0.6`,wo=()=>{},To=console.warn.bind(console),Eo=console.error.bind(console);function Do(e={}){return typeof e.debug!=`function`&&(e.debug=wo),typeof e.info!=`function`&&(e.info=wo),typeof e.warn!=`function`&&(e.warn=To),typeof e.error!=`function`&&(e.error=Eo),e}const Oo=`octokit-core.js/${Co} ${na()}`;var ko=class{static VERSION=Co;static defaults(e){return class extends this{constructor(...t){let n=t[0]||{};if(typeof e==`function`){super(e(n));return}super(Object.assign({},e,n,n.userAgent&&e.userAgent?{userAgent:`${n.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let t=this.plugins;return class extends this{static plugins=t.concat(e.filter(e=>!t.includes(e)))}}constructor(e={}){let t=new da.Collection,n={baseUrl:ao.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:t.bind(null,`request`)}),mediaType:{previews:[],format:``}};if(n.headers[`user-agent`]=e.userAgent?`${e.userAgent} ${Oo}`:Oo,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers[`time-zone`]=e.timeZone),this.request=ao.defaults(n),this.graphql=ho(this.request).defaults(n),this.log=Do(e.log),this.hook=t,e.authStrategy){let{authStrategy:n,...r}=e,i=n(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:r},e.auth));t.wrap(`request`,i.hook),this.auth=i}else if(!e.auth)this.auth=async()=>({type:`unauthenticated`});else{let n=So(e.auth);t.wrap(`request`,n.hook),this.auth=n}let r=this.constructor;for(let t=0;t({async next(){if(!s)return{done:!0};try{let e=zo(await i({method:a,url:s,headers:o}));if(s=((e.headers.link||``).match(/<([^<>]+)>;\s*rel="next"/)||[])[1],!s&&`total_commits`in e.data){let t=new URL(e.url),n=t.searchParams,r=parseInt(n.get(`page`)||`1`,10);r*parseInt(n.get(`per_page`)||`250`,10){if(i.done)return t;let a=!1;function o(){a=!0}return t=t.concat(r?r(i.value,o):i.value.data),a?t:Ho(e,t,n,r)})}Object.assign(Vo,{iterator:Bo});function Uo(e){return{paginate:Object.assign(Vo.bind(null,e),{iterator:Bo.bind(null,e)})}}Uo.VERSION=Ro,new Ji;const Wo=ea(),Go={baseUrl:Wo,request:{agent:Y(Wo),fetch:$i(Wo)}},Ko=ko.plugin(Io,Uo).defaults(Go);function qo(e,t){let n=Object.assign({},t||{}),r=Zi(e,n);r&&(n.auth=r);let i=ta(n.userAgent);return i&&(n.userAgent=i),n}const Jo=new Ji;function Yo(e,t,...n){return new(Ko.plugin(...n))(qo(e,t))}var Xo=i(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),Zo=i(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),Qo=i(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=Xo(),a=Zo();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),$o=i(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),es=i(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:er(t,e)}})),ts=i(((e,t)=>{let n=Zo(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=Xo(),{safeRe:a,t:o}=Qo(),s=$o(),{compareIdentifiers:c}=es();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&tt.major?1:this.minort.minor?1:this.patcht.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),ns=i(((e,t)=>{let n=ts();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),rs=i(((e,t)=>{let n=ns();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),is=i(((e,t)=>{let n=ns();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),as=i(((e,t)=>{let n=ts();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),os=i(((e,t)=>{let n=ns();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),ss=i(((e,t)=>{let n=ts();t.exports=(e,t)=>new n(e,t).major})),cs=i(((e,t)=>{let n=ts();t.exports=(e,t)=>new n(e,t).minor})),ls=i(((e,t)=>{let n=ts();t.exports=(e,t)=>new n(e,t).patch})),us=i(((e,t)=>{let n=ns();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),ds=i(((e,t)=>{let n=ts();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),fs=i(((e,t)=>{let n=ds();t.exports=(e,t,r)=>n(t,e,r)})),ps=i(((e,t)=>{let n=ds();t.exports=(e,t)=>n(e,t,!0)})),ms=i(((e,t)=>{let n=ts();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),hs=i(((e,t)=>{let n=ms();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),gs=i(((e,t)=>{let n=ms();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),_s=i(((e,t)=>{let n=ds();t.exports=(e,t,r)=>n(e,t,r)>0})),vs=i(((e,t)=>{let n=ds();t.exports=(e,t,r)=>n(e,t,r)<0})),ys=i(((e,t)=>{let n=ds();t.exports=(e,t,r)=>n(e,t,r)===0})),bs=i(((e,t)=>{let n=ds();t.exports=(e,t,r)=>n(e,t,r)!==0})),xs=i(((e,t)=>{let n=ds();t.exports=(e,t,r)=>n(e,t,r)>=0})),Ss=i(((e,t)=>{let n=ds();t.exports=(e,t,r)=>n(e,t,r)<=0})),Cs=i(((e,t)=>{let n=ys(),r=bs(),i=_s(),a=xs(),o=vs(),s=Ss();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),ws=i(((e,t)=>{let n=ts(),r=ns(),{safeRe:i,t:a}=Qo();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),Ts=i(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),Es=i(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,k(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>y(e,this.options)).join(` `).split(/\s+/).map(e=>O(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let v=new Map,b=g.map(e=>new a(e,this.options));for(let e of b){if(h(e))return[e];v.set(e.value,e)}v.size>1&&v.has(``)&&v.delete(``);let x=[...v.values()];return r.set(t,x),x}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>v(e,n)&&t.set.some(t=>v(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;te.value===`<0.0.0-0`,g=e=>e.value===``,v=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},y=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=C(e,t),o(`caret`,e),e=x(e,t),o(`tildes`,e),e=T(e,t),o(`xrange`,e),e=D(e,t),o(`stars`,e),e),b=e=>!e||e.toLowerCase()===`x`||e===`*`,x=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(` `),S=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return b(n)?s=``:b(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:b(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},C=(e,t)=>e.trim().split(/\s+/).map(e=>w(e,t)).join(` `),w=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return b(n)?c=``:b(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:b(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},T=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>E(e,t)).join(` `)),E=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=b(i),u=l||b(a),d=u||b(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},D=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),O=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),k=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=b(r)?``:b(i)?`>=${r}.0.0${e?`-0`:``}`:b(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=b(l)?``:b(u)?`<${+l+1}.0.0-0`:b(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),A=(e,t,n)=>{for(let n=0;n0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),Ds=i(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=$o(),{safeRe:i,t:a}=Qo(),o=Cs(),s=Zo(),c=ts(),l=Es()})),Os=i(((e,t)=>{let n=Es();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),ks=i(((e,t)=>{let n=Es();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),As=i(((e,t)=>{let n=ts(),r=Es();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),js=i(((e,t)=>{let n=ts(),r=Es();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),Ms=i(((e,t)=>{let n=ts(),r=Es(),i=_s();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),Ns=i(((e,t)=>{let n=Es();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),Ps=i(((e,t)=>{let n=ts(),r=Ds(),{ANY:i}=r,a=Es(),o=Os(),s=_s(),c=vs(),l=Ss(),u=xs();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,v;switch(d){case`>`:p=s,m=l,h=c,g=`>`,v=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,v=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===v||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===v&&h(e,s.semver))return!1}return!0}})),Fs=i(((e,t)=>{let n=Ps();t.exports=(e,t,r)=>n(e,t,`>`,r)})),Is=i(((e,t)=>{let n=Ps();t.exports=(e,t,r)=>n(e,t,`<`,r)})),Ls=i(((e,t)=>{let n=Es();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),Rs=i(((e,t)=>{let n=Os(),r=ds();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length{let n=Es(),r=Ds(),{ANY:i}=r,a=Os(),o=ds(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,v,y=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,b=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;y&&y.prerelease.length===1&&u.operator===`<`&&y.prerelease[0]===0&&(y=!1);for(let e of t){if(v=v||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&v&&!s&&p!==0||b||y)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),Bs=i(((e,t)=>{let n=Qo(),r=Xo(),i=ts(),a=es();t.exports={parse:ns(),valid:rs(),clean:is(),inc:as(),diff:os(),major:ss(),minor:cs(),patch:ls(),prerelease:us(),compare:ds(),rcompare:fs(),compareLoose:ps(),compareBuild:ms(),sort:hs(),rsort:gs(),gt:_s(),lt:vs(),eq:ys(),neq:bs(),gte:xs(),lte:Ss(),cmp:Cs(),coerce:ws(),Comparator:Ds(),Range:Es(),satisfies:Os(),toComparators:ks(),maxSatisfying:As(),minSatisfying:js(),minVersion:Ms(),validRange:Ns(),outside:Ps(),gtr:Fs(),ltr:Is(),intersects:Ls(),simplifyRange:Rs(),subset:zs(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}));function Vs(e){let t={followSymbolicLinks:!0,implicitDescendants:!0,matchDirectories:!0,omitBrokenSymbolicLinks:!0,excludeHiddenFiles:!1};return e&&(typeof e.followSymbolicLinks==`boolean`&&(t.followSymbolicLinks=e.followSymbolicLinks,K(`followSymbolicLinks '${t.followSymbolicLinks}'`)),typeof e.implicitDescendants==`boolean`&&(t.implicitDescendants=e.implicitDescendants,K(`implicitDescendants '${t.implicitDescendants}'`)),typeof e.matchDirectories==`boolean`&&(t.matchDirectories=e.matchDirectories,K(`matchDirectories '${t.matchDirectories}'`)),typeof e.omitBrokenSymbolicLinks==`boolean`&&(t.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks,K(`omitBrokenSymbolicLinks '${t.omitBrokenSymbolicLinks}'`)),typeof e.excludeHiddenFiles==`boolean`&&(t.excludeHiddenFiles=e.excludeHiddenFiles,K(`excludeHiddenFiles '${t.excludeHiddenFiles}'`))),t}const Hs=process.platform===`win32`;function Us(e){if(e=Js(e),Hs&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e))return e;let t=U.dirname(e);return Hs&&/^\\\\[^\\]+\\[^\\]+\\$/.test(t)&&(t=Js(t)),t}function Ws(e,t){if(we(e,`ensureAbsoluteRoot parameter 'root' must not be empty`),we(t,`ensureAbsoluteRoot parameter 'itemPath' must not be empty`),Gs(t))return t;if(Hs){if(t.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();return we(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`),t[0].toUpperCase()===e[0].toUpperCase()?t.length===2?`${t[0]}:\\${e.substr(3)}`:(e.endsWith(`\\`)||(e+=`\\`),`${t[0]}:\\${e.substr(3)}${t.substr(2)}`):`${t[0]}:\\${t.substr(2)}`}else if(qs(t).match(/^\\$|^\\[^\\]/)){let e=process.cwd();return we(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`),`${e[0]}:\\${t.substr(1)}`}}return we(Gs(e),`ensureAbsoluteRoot parameter 'root' must have an absolute root`),e.endsWith(`/`)||Hs&&e.endsWith(`\\`)||(e+=U.sep),e+t}function Gs(e){return we(e,`hasAbsoluteRoot parameter 'itemPath' must not be empty`),e=qs(e),Hs?e.startsWith(`\\\\`)||/^[A-Z]:\\/i.test(e):e.startsWith(`/`)}function Ks(e){return we(e,`isRooted parameter 'itemPath' must not be empty`),e=qs(e),Hs?e.startsWith(`\\`)||/^[A-Z]:/i.test(e):e.startsWith(`/`)}function qs(e){return e||=``,Hs?(e=e.replace(/\//g,`\\`),(/^\\\\+[^\\]/.test(e)?`\\`:``)+e.replace(/\\\\+/g,`\\`)):e.replace(/\/\/+/g,`/`)}function Js(e){return e?(e=qs(e),!e.endsWith(U.sep)||e===U.sep||Hs&&/^[A-Z]:\\$/i.test(e)?e:e.substr(0,e.length-1)):``}var Ys;(function(e){e[e.None=0]=`None`,e[e.Directory=1]=`Directory`,e[e.File=2]=`File`,e[e.All=3]=`All`})(Ys||={});const Xs=process.platform===`win32`;function Zs(e){e=e.filter(e=>!e.negate);let t={};for(let n of e){let e=Xs?n.searchPath.toUpperCase():n.searchPath;t[e]=`candidate`}let n=[];for(let r of e){let e=Xs?r.searchPath.toUpperCase():r.searchPath;if(t[e]===`included`)continue;let i=!1,a=e,o=Us(a);for(;o!==a;){if(t[o]){i=!0;break}a=o,o=Us(a)}i||(n.push(r.searchPath),t[e]=`included`)}return n}function Qs(e,t){let n=Ys.None;for(let r of e)r.negate?n&=~r.match(t):n|=r.match(t);return n}function $s(e,t){return e.some(e=>!e.negate&&e.partialMatch(t))}var ec=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.range=e.balanced=void 0,e.balanced=(n,r,i)=>{let a=n instanceof RegExp?t(n,i):n,o=r instanceof RegExp?t(r,i):r,s=a!==null&&o!=null&&(0,e.range)(a,o,i);return s&&{start:s[0],end:s[1],pre:i.slice(0,s[0]),body:i.slice(s[0]+a.length,s[1]),post:i.slice(s[1]+o.length)}};let t=(e,t)=>{let n=t.match(e);return n?n[0]:null};e.range=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s}})),tc=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EXPANSION_MAX=void 0,e.expand=S;let t=ec(),n=`\0SLASH`+Math.random()+`\0`,r=`\0OPEN`+Math.random()+`\0`,i=`\0CLOSE`+Math.random()+`\0`,a=`\0COMMA`+Math.random()+`\0`,o=`\0PERIOD`+Math.random()+`\0`,s=new RegExp(n,`g`),c=new RegExp(r,`g`),l=new RegExp(i,`g`),u=new RegExp(a,`g`),d=new RegExp(o,`g`),f=/\\\\/g,p=/\\{/g,m=/\\}/g,h=/\\,/g,g=/\\\./g;e.EXPANSION_MAX=1e5;function v(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function y(e){return e.replace(f,n).replace(p,r).replace(m,i).replace(h,a).replace(g,o)}function b(e){return e.replace(s,`\\`).replace(c,`{`).replace(l,`}`).replace(u,`,`).replace(d,`.`)}function x(e){if(!e)return[``];let n=[],r=(0,t.balanced)(`{`,`}`,e);if(!r)return e.split(`,`);let{pre:i,body:a,post:o}=r,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;let c=x(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),n.push.apply(n,s),n}function S(t,n={}){if(!t)return[];let{max:r=e.EXPANSION_MAX}=n;return t.slice(0,2)===`{}`&&(t=`\\{\\}`+t.slice(2)),D(y(t),r,!0).map(b)}function C(e){return`{`+e+`}`}function w(e){return/^-?0\d/.test(e)}function T(e,t){return e<=t}function E(e,t){return e>=t}function D(e,n,r){let a=[],o=(0,t.balanced)(`{`,`}`,e);if(!o)return[e];let s=o.pre,c=o.post.length?D(o.post,n,!1):[``];if(/\$$/.test(o.pre))for(let e=0;e=0;if(!u&&!d)return o.post.match(/,(?!,).*\}/)?(e=o.pre+`{`+o.body+i+o.post,D(e,n,!0)):[e];let f;if(u)f=o.body.split(/\.\./);else if(f=x(o.body),f.length===1&&f[0]!==void 0&&(f=D(f[0],n,!1).map(C),f.length===1))return c.map(e=>o.pre+f[0]+e);let p;if(u&&f[0]!==void 0&&f[1]!==void 0){let e=v(f[0]),t=v(f[1]),n=Math.max(f[0].length,f[1].length),r=f.length===3&&f[2]!==void 0?Math.max(Math.abs(v(f[2])),1):1,i=T;t0){let n=Array(t+1).join(`0`);e=o<0?`-`+n+e.slice(1):n+e}}p.push(e)}}else{p=[];for(let e=0;e{n.exports=g,g.Minimatch=v;var r=function(){try{return t(`path`)}catch{}}()||{sep:`/`};g.sep=r.sep;var i=g.GLOBSTAR=v.GLOBSTAR={},a=tc(),o={"!":{open:`(?:(?!(?:`,close:`))[^/]*?)`},"?":{open:`(?:`,close:`)?`},"+":{open:`(?:`,close:`)+`},"*":{open:`(?:`,close:`)*`},"@":{open:`(?:`,close:`)`}},s=`[^/]`,c=s+`*?`,l=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,u=`(?:(?!(?:\\/|^)\\.).)*?`,d=f(`().*{}+?[]^$\\!`);function f(e){return e.split(``).reduce(function(e,t){return e[t]=!0,e},{})}var p=/\/+/;g.filter=m;function m(e,t){return t||={},function(n,r,i){return g(n,e,t)}}function h(e,t){t||={};var n={};return Object.keys(e).forEach(function(t){n[t]=e[t]}),Object.keys(t).forEach(function(e){n[e]=t[e]}),n}g.defaults=function(e){if(!e||typeof e!=`object`||!Object.keys(e).length)return g;var t=g,n=function(n,r,i){return t(n,r,h(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,h(e,r))},n.Minimatch.defaults=function(n){return t.defaults(h(e,n)).Minimatch},n.filter=function(n,r){return t.filter(n,h(e,r))},n.defaults=function(n){return t.defaults(h(e,n))},n.makeRe=function(n,r){return t.makeRe(n,h(e,r))},n.braceExpand=function(n,r){return t.braceExpand(n,h(e,r))},n.match=function(n,r,i){return t.match(n,r,h(e,i))},n},v.defaults=function(e){return g.defaults(e).Minimatch};function g(e,t,n){return C(t),n||={},!n.nocomment&&t.charAt(0)===`#`?!1:new v(t,n).match(e)}function v(e,t){if(!(this instanceof v))return new v(e,t);C(e),t||={},e=e.trim(),!t.allowWindowsEscape&&r.sep!==`/`&&(e=e.split(r.sep).join(`/`)),this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion===void 0?200:t.maxGlobstarRecursion,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}v.prototype.debug=function(){},v.prototype.make=y;function y(){var e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,n),n=this.globParts=n.map(function(e){return e.split(p)}),this.debug(this.pattern,n),n=n.map(function(e,t,n){return e.map(this.parse,this)},this),this.debug(this.pattern,n),n=n.filter(function(e){return e.indexOf(!1)===-1}),this.debug(this.pattern,n),this.set=n}v.prototype.parseNegate=b;function b(){var e=this.pattern,t=!1,n=this.options,r=0;if(!n.nonegate){for(var i=0,a=e.length;iS)throw TypeError(`pattern is too long`)};v.prototype.parse=T;var w={};function T(e,t){C(e);var n=this.options;if(e===`**`)if(n.noglobstar)e=`*`;else return i;if(e===``)return``;var r=``,a=!!n.nocase,l=!1,u=[],f=[],p,m=!1,h=-1,g=-1,v=e.charAt(0)===`.`?``:n.dot?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,y=this;function b(){if(p){switch(p){case`*`:r+=c,a=!0;break;case`?`:r+=s,a=!0;break;default:r+=`\\`+p;break}y.debug(`clearStateChar %j %j`,p,r),p=!1}}for(var x=0,S=e.length,T;x-1;N--){var P=f[N],F=r.slice(0,P.reStart),I=r.slice(P.reStart,P.reEnd-8),L=r.slice(P.reEnd-8,P.reEnd),R=r.slice(P.reEnd);L+=R;var z=F.split(`(`).length-1,ee=R;for(x=0;x=0&&(a=e[o],!a);o--);for(o=0;o=0;o--)if(t[o]===i){c=o;break}var l=t.slice(a,s),u=n?t.slice(s+1):t.slice(s+1,c),d=n?[]:t.slice(c+1);if(l.length){var f=e.slice(r,r+l.length);if(!this._matchOne(f,l,n,0,0))return!1;r+=l.length}var p=0;if(d.length){if(d.length+r>e.length)return!1;var m=e.length-d.length;if(this._matchOne(e,d,n,m,0))p=d.length;else{if(e[e.length-1]!==``||r+d.length===e.length||(m--,!this._matchOne(e,d,n,m,0)))return!1;p=d.length+1}}if(!u.length){var h=!!p;for(o=r;o0,`Parameter 'itemPath' must not be an empty array`);for(let t=0;te.getLiteral(t)).filter(e=>!o&&!(o=e===``));this.searchPath=new ic(s).toString(),this.rootRegExp=new RegExp(e.regExpEscape(s[0]),oc?`i`:``),this.isImplicitPattern=n;let c={dot:!0,nobrace:!0,nocase:oc,nocomment:!0,noext:!0,nonegate:!0};a=oc?a.replace(/\\/g,`/`):a,this.minimatch=new ac(a,c)}match(e){return this.segments[this.segments.length-1]===`**`?(e=qs(e),!e.endsWith(U.sep)&&this.isImplicitPattern===!1&&(e=`${e}${U.sep}`)):e=Js(e),this.minimatch.match(e)?this.trailingSeparator?Ys.Directory:Ys.All:Ys.None}partialMatch(e){return e=Js(e),Us(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(oc?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(oc?e:e.replace(/\\/g,`\\\\`)).replace(/(\[)(?=[^/]+\])/g,`[[]`).replace(/\?/g,`[?]`).replace(/\*/g,`[*]`)}static fixupPattern(t,n){we(t,`pattern cannot be empty`);let r=new ic(t).segments.map(t=>e.getLiteral(t));if(we(r.every((e,t)=>(e!==`.`||t===0)&&e!==`..`),`Invalid pattern '${t}'. Relative pathing '.' and '..' is not allowed.`),we(!Ks(t)||r[0],`Invalid pattern '${t}'. Root segment must not contain globs.`),t=qs(t),t===`.`||t.startsWith(`.${U.sep}`))t=e.globEscape(process.cwd())+t.substr(1);else if(t===`~`||t.startsWith(`~${U.sep}`))n||=ce.homedir(),we(n,`Unable to determine HOME directory`),we(Gs(n),`Expected HOME directory to be a rooted path. Actual '${n}'`),t=e.globEscape(n)+t.substr(1);else if(oc&&(t.match(/^[A-Z]:$/i)||t.match(/^[A-Z]:[^\\]/i))){let n=Ws(`C:\\dummy-root`,t.substr(0,2));t.length>2&&!n.endsWith(`\\`)&&(n+=`\\`),t=e.globEscape(n)+t.substr(2)}else if(oc&&(t===`\\`||t.match(/^\\[^\\]/))){let n=Ws(`C:\\dummy-root`,`\\`);n.endsWith(`\\`)||(n+=`\\`),t=e.globEscape(n)+t.substr(1)}else t=Ws(e.globEscape(process.cwd()),t);return qs(t)}static getLiteral(e){let t=``;for(let n=0;n=0){if(r.length>1)return``;if(r){t+=r,n=i;continue}}}t+=r}return t}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,`\\$&`)}},cc=class{constructor(e,t){this.path=e,this.level=t}},lc=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},uc=function(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values==`function`?__values(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}},dc=function(e){return this instanceof dc?(this.v=e,this):new dc(e)},fc=function(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof dc?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}};const pc=process.platform===`win32`;var mc=class e{constructor(e){this.patterns=[],this.searchPaths=[],this.options=Vs(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){return lc(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=uc(this.globGenerator()),s;s=yield o.next(),e=s.done,!e;a=!0){r=s.value,a=!1;let e=r;i.push(e)}}catch(e){t={error:e}}finally{try{!a&&!e&&(n=o.return)&&(yield n.call(o))}finally{if(t)throw t.error}}return i})}globGenerator(){return fc(this,arguments,function*(){let t=Vs(this.options),n=[];for(let e of this.patterns)n.push(e),t.implicitDescendants&&(e.trailingSeparator||e.segments[e.segments.length-1]!==`**`)&&n.push(new sc(e.negate,!0,e.segments.concat(`**`)));let r=[];for(let e of Zs(n)){K(`Search path '${e}'`);try{yield dc(fe.promises.lstat(e))}catch(e){if(e.code===`ENOENT`)continue;throw e}r.unshift(new cc(e,1))}let i=[];for(;r.length;){let a=r.pop(),o=Qs(n,a.path),s=!!o||$s(n,a.path);if(!o&&!s)continue;let c=yield dc(e.stat(a,t,i));if(c&&!(t.excludeHiddenFiles&&U.basename(a.path).match(/^\./)))if(c.isDirectory()){if(o&Ys.Directory&&t.matchDirectories)yield yield dc(a.path);else if(!s)continue;let e=a.level+1,n=(yield dc(fe.promises.readdir(a.path))).map(t=>new cc(U.join(a.path,t),e));r.push(...n.reverse())}else o&Ys.File&&(yield yield dc(a.path))}})}static create(t,n){return lc(this,void 0,void 0,function*(){let r=new e(n);pc&&(t=t.replace(/\r\n/g,` +`)}var Ml=class extends Error{constructor(e,t,n){super(jl(n)),this.request=e,this.headers=t,this.response=n,this.errors=n.errors,this.data=n.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name=`GraphqlResponseError`;errors;data},Nl=[`method`,`baseUrl`,`url`,`headers`,`request`,`query`,`mediaType`,`operationName`],Pl=[`query`,`method`,`url`],Fl=/\/api\/v3\/?$/;function Il(e,t,n){if(n){if(typeof t==`string`&&`query`in n)return Promise.reject(Error(`[@octokit/graphql] "query" cannot be used as variable name`));for(let e in n)if(Pl.includes(e))return Promise.reject(Error(`[@octokit/graphql] "${e}" cannot be used as variable name`))}let r=typeof t==`string`?Object.assign({query:t},n):t,i=Object.keys(r).reduce((e,t)=>Nl.includes(t)?(e[t]=r[t],e):(e.variables||={},e.variables[t]=r[t],e),{}),a=r.baseUrl||e.endpoint.DEFAULTS.baseUrl;return Fl.test(a)&&(i.url=a.replace(Fl,`/api/graphql`)),e(i).then(e=>{if(e.data.errors){let t={};for(let n of Object.keys(e.headers))t[n]=e.headers[n];throw new Ml(i,t,e.data)}return e.data.data})}function Ll(e,t){let n=e.defaults(t);return Object.assign((e,t)=>Il(n,e,t),{defaults:Ll.bind(null,n),endpoint:n.endpoint})}Ll(kl,{headers:{"user-agent":`octokit-graphql.js/${Al} ${wc()}`},method:`POST`,url:`/graphql`});function Rl(e){return Ll(e,{method:`POST`,url:`/graphql`})}var zl=`(?:[a-zA-Z0-9_-]+)`,Bl=`\\.`,Vl=RegExp(`^${zl}${Bl}${zl}${Bl}${zl}$`),Hl=Vl.test.bind(Vl);async function Ul(e){let t=Hl(e),n=e.startsWith(`v1.`)||e.startsWith(`ghs_`),r=e.startsWith(`ghu_`);return{type:`token`,token:e,tokenType:t?`app`:n?`installation`:r?`user-to-server`:`oauth`}}function Wl(e){return e.split(/\./).length===3?`bearer ${e}`:`token ${e}`}async function Gl(e,t,n,r){let i=t.endpoint.merge(n,r);return i.headers.authorization=Wl(e),t(i)}var Kl=function(e){if(!e)throw Error(`[@octokit/auth-token] No token passed to createTokenAuth`);if(typeof e!=`string`)throw Error(`[@octokit/auth-token] Token passed to createTokenAuth is not a string`);return e=e.replace(/^(token|bearer) +/i,``),Object.assign(Ul.bind(null,e),{hook:Gl.bind(null,e)})};const ql=`7.0.6`,Jl=()=>{},Yl=console.warn.bind(console),Xl=console.error.bind(console);function Zl(e={}){return typeof e.debug!=`function`&&(e.debug=Jl),typeof e.info!=`function`&&(e.info=Jl),typeof e.warn!=`function`&&(e.warn=Yl),typeof e.error!=`function`&&(e.error=Xl),e}const Ql=`octokit-core.js/${ql} ${wc()}`;var $l=class{static VERSION=ql;static defaults(e){return class extends this{constructor(...t){let n=t[0]||{};if(typeof e==`function`){super(e(n));return}super(Object.assign({},e,n,n.userAgent&&e.userAgent?{userAgent:`${n.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let t=this.plugins;return class extends this{static plugins=t.concat(e.filter(e=>!t.includes(e)))}}constructor(e={}){let t=new Nc.Collection,n={baseUrl:kl.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:t.bind(null,`request`)}),mediaType:{previews:[],format:``}};if(n.headers[`user-agent`]=e.userAgent?`${e.userAgent} ${Ql}`:Ql,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers[`time-zone`]=e.timeZone),this.request=kl.defaults(n),this.graphql=Rl(this.request).defaults(n),this.log=Zl(e.log),this.hook=t,e.authStrategy){let{authStrategy:n,...r}=e,i=n(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:r},e.auth));t.wrap(`request`,i.hook),this.auth=i}else if(!e.auth)this.auth=async()=>({type:`unauthenticated`});else{let n=Kl(e.auth);t.wrap(`request`,n.hook),this.auth=n}let r=this.constructor;for(let t=0;t({async next(){if(!s)return{done:!0};try{let e=lu(await i({method:a,url:s,headers:o}));if(s=((e.headers.link||``).match(/<([^<>]+)>;\s*rel="next"/)||[])[1],!s&&`total_commits`in e.data){let t=new URL(e.url),n=t.searchParams,r=parseInt(n.get(`page`)||`1`,10);r*parseInt(n.get(`per_page`)||`250`,10){if(i.done)return t;let a=!1;function o(){a=!0}return t=t.concat(r?r(i.value,o):i.value.data),a?t:fu(e,t,n,r)})}Object.assign(du,{iterator:uu});function pu(e){return{paginate:Object.assign(du.bind(null,e),{iterator:uu.bind(null,e)})}}pu.VERSION=cu,new mc;const mu=Sc(),hu={baseUrl:mu,request:{agent:yc(mu),fetch:xc(mu)}},gu=$l.plugin(ou,pu).defaults(hu);function _u(e,t){let n=Object.assign({},t||{}),r=vc(e,n);r&&(n.auth=r);let i=Cc(n.userAgent);return i&&(n.userAgent=i),n}const vu=new mc;function yu(e,t,...n){return new(gu.plugin(...n))(_u(e,t))}var bu=i(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),xu=i(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),Su=i(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=bu(),a=xu();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),Cu=i(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),wu=i(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:er(t,e)}})),Tu=i(((e,t)=>{let n=xu(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=bu(),{safeRe:a,t:o}=Su(),s=Cu(),{compareIdentifiers:c}=wu();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&tt.major?1:this.minort.minor?1:this.patcht.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),Eu=i(((e,t)=>{let n=Tu();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),Du=i(((e,t)=>{let n=Eu();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),Ou=i(((e,t)=>{let n=Eu();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),ku=i(((e,t)=>{let n=Tu();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),Au=i(((e,t)=>{let n=Eu();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),ju=i(((e,t)=>{let n=Tu();t.exports=(e,t)=>new n(e,t).major})),Mu=i(((e,t)=>{let n=Tu();t.exports=(e,t)=>new n(e,t).minor})),Nu=i(((e,t)=>{let n=Tu();t.exports=(e,t)=>new n(e,t).patch})),Pu=i(((e,t)=>{let n=Eu();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),Fu=i(((e,t)=>{let n=Tu();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),Iu=i(((e,t)=>{let n=Fu();t.exports=(e,t,r)=>n(t,e,r)})),Lu=i(((e,t)=>{let n=Fu();t.exports=(e,t)=>n(e,t,!0)})),Ru=i(((e,t)=>{let n=Tu();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),zu=i(((e,t)=>{let n=Ru();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),Bu=i(((e,t)=>{let n=Ru();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),Vu=i(((e,t)=>{let n=Fu();t.exports=(e,t,r)=>n(e,t,r)>0})),Hu=i(((e,t)=>{let n=Fu();t.exports=(e,t,r)=>n(e,t,r)<0})),Uu=i(((e,t)=>{let n=Fu();t.exports=(e,t,r)=>n(e,t,r)===0})),Wu=i(((e,t)=>{let n=Fu();t.exports=(e,t,r)=>n(e,t,r)!==0})),Gu=i(((e,t)=>{let n=Fu();t.exports=(e,t,r)=>n(e,t,r)>=0})),Ku=i(((e,t)=>{let n=Fu();t.exports=(e,t,r)=>n(e,t,r)<=0})),qu=i(((e,t)=>{let n=Uu(),r=Wu(),i=Vu(),a=Gu(),o=Hu(),s=Ku();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),Ju=i(((e,t)=>{let n=Tu(),r=Eu(),{safeRe:i,t:a}=Su();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),Yu=i(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),Xu=i(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,k(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>y(e,this.options)).join(` `).split(/\s+/).map(e=>O(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let v=new Map,b=g.map(e=>new a(e,this.options));for(let e of b){if(h(e))return[e];v.set(e.value,e)}v.size>1&&v.has(``)&&v.delete(``);let x=[...v.values()];return r.set(t,x),x}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>v(e,n)&&t.set.some(t=>v(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;te.value===`<0.0.0-0`,g=e=>e.value===``,v=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},y=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=C(e,t),o(`caret`,e),e=x(e,t),o(`tildes`,e),e=T(e,t),o(`xrange`,e),e=D(e,t),o(`stars`,e),e),b=e=>!e||e.toLowerCase()===`x`||e===`*`,x=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(` `),S=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return b(n)?s=``:b(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:b(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},C=(e,t)=>e.trim().split(/\s+/).map(e=>w(e,t)).join(` `),w=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return b(n)?c=``:b(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:b(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},T=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>E(e,t)).join(` `)),E=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=b(i),u=l||b(a),d=u||b(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},D=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),O=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),k=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=b(r)?``:b(i)?`>=${r}.0.0${e?`-0`:``}`:b(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=b(l)?``:b(u)?`<${+l+1}.0.0-0`:b(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),A=(e,t,n)=>{for(let n=0;n0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),Zu=i(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=Cu(),{safeRe:i,t:a}=Su(),o=qu(),s=xu(),c=Tu(),l=Xu()})),Qu=i(((e,t)=>{let n=Xu();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),$u=i(((e,t)=>{let n=Xu();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),ed=i(((e,t)=>{let n=Tu(),r=Xu();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),td=i(((e,t)=>{let n=Tu(),r=Xu();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),nd=i(((e,t)=>{let n=Tu(),r=Xu(),i=Vu();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),rd=i(((e,t)=>{let n=Xu();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),id=i(((e,t)=>{let n=Tu(),r=Zu(),{ANY:i}=r,a=Xu(),o=Qu(),s=Vu(),c=Hu(),l=Ku(),u=Gu();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,v;switch(d){case`>`:p=s,m=l,h=c,g=`>`,v=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,v=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===v||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===v&&h(e,s.semver))return!1}return!0}})),ad=i(((e,t)=>{let n=id();t.exports=(e,t,r)=>n(e,t,`>`,r)})),od=i(((e,t)=>{let n=id();t.exports=(e,t,r)=>n(e,t,`<`,r)})),sd=i(((e,t)=>{let n=Xu();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),cd=i(((e,t)=>{let n=Qu(),r=Fu();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length{let n=Xu(),r=Zu(),{ANY:i}=r,a=Qu(),o=Fu(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,v,y=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,b=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;y&&y.prerelease.length===1&&u.operator===`<`&&y.prerelease[0]===0&&(y=!1);for(let e of t){if(v=v||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&v&&!s&&p!==0||b||y)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),ud=i(((e,t)=>{let n=Su(),r=bu(),i=Tu(),a=wu();t.exports={parse:Eu(),valid:Du(),clean:Ou(),inc:ku(),diff:Au(),major:ju(),minor:Mu(),patch:Nu(),prerelease:Pu(),compare:Fu(),rcompare:Iu(),compareLoose:Lu(),compareBuild:Ru(),sort:zu(),rsort:Bu(),gt:Vu(),lt:Hu(),eq:Uu(),neq:Wu(),gte:Gu(),lte:Ku(),cmp:qu(),coerce:Ju(),Comparator:Zu(),Range:Xu(),satisfies:Qu(),toComparators:$u(),maxSatisfying:ed(),minSatisfying:td(),minVersion:nd(),validRange:rd(),outside:id(),gtr:ad(),ltr:od(),intersects:sd(),simplifyRange:cd(),subset:ld(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}));function dd(e){let t={followSymbolicLinks:!0,implicitDescendants:!0,matchDirectories:!0,omitBrokenSymbolicLinks:!0,excludeHiddenFiles:!1};return e&&(typeof e.followSymbolicLinks==`boolean`&&(t.followSymbolicLinks=e.followSymbolicLinks,K(`followSymbolicLinks '${t.followSymbolicLinks}'`)),typeof e.implicitDescendants==`boolean`&&(t.implicitDescendants=e.implicitDescendants,K(`implicitDescendants '${t.implicitDescendants}'`)),typeof e.matchDirectories==`boolean`&&(t.matchDirectories=e.matchDirectories,K(`matchDirectories '${t.matchDirectories}'`)),typeof e.omitBrokenSymbolicLinks==`boolean`&&(t.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks,K(`omitBrokenSymbolicLinks '${t.omitBrokenSymbolicLinks}'`)),typeof e.excludeHiddenFiles==`boolean`&&(t.excludeHiddenFiles=e.excludeHiddenFiles,K(`excludeHiddenFiles '${t.excludeHiddenFiles}'`))),t}const fd=process.platform===`win32`;function pd(e){if(e=vd(e),fd&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e))return e;let t=U.dirname(e);return fd&&/^\\\\[^\\]+\\[^\\]+\\$/.test(t)&&(t=vd(t)),t}function md(e,t){if(we(e,`ensureAbsoluteRoot parameter 'root' must not be empty`),we(t,`ensureAbsoluteRoot parameter 'itemPath' must not be empty`),hd(t))return t;if(fd){if(t.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();return we(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`),t[0].toUpperCase()===e[0].toUpperCase()?t.length===2?`${t[0]}:\\${e.substr(3)}`:(e.endsWith(`\\`)||(e+=`\\`),`${t[0]}:\\${e.substr(3)}${t.substr(2)}`):`${t[0]}:\\${t.substr(2)}`}else if(_d(t).match(/^\\$|^\\[^\\]/)){let e=process.cwd();return we(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`),`${e[0]}:\\${t.substr(1)}`}}return we(hd(e),`ensureAbsoluteRoot parameter 'root' must have an absolute root`),e.endsWith(`/`)||fd&&e.endsWith(`\\`)||(e+=U.sep),e+t}function hd(e){return we(e,`hasAbsoluteRoot parameter 'itemPath' must not be empty`),e=_d(e),fd?e.startsWith(`\\\\`)||/^[A-Z]:\\/i.test(e):e.startsWith(`/`)}function gd(e){return we(e,`isRooted parameter 'itemPath' must not be empty`),e=_d(e),fd?e.startsWith(`\\`)||/^[A-Z]:/i.test(e):e.startsWith(`/`)}function _d(e){return e||=``,fd?(e=e.replace(/\//g,`\\`),(/^\\\\+[^\\]/.test(e)?`\\`:``)+e.replace(/\\\\+/g,`\\`)):e.replace(/\/\/+/g,`/`)}function vd(e){return e?(e=_d(e),!e.endsWith(U.sep)||e===U.sep||fd&&/^[A-Z]:\\$/i.test(e)?e:e.substr(0,e.length-1)):``}var yd;(function(e){e[e.None=0]=`None`,e[e.Directory=1]=`Directory`,e[e.File=2]=`File`,e[e.All=3]=`All`})(yd||={});const bd=process.platform===`win32`;function xd(e){e=e.filter(e=>!e.negate);let t={};for(let n of e){let e=bd?n.searchPath.toUpperCase():n.searchPath;t[e]=`candidate`}let n=[];for(let r of e){let e=bd?r.searchPath.toUpperCase():r.searchPath;if(t[e]===`included`)continue;let i=!1,a=e,o=pd(a);for(;o!==a;){if(t[o]){i=!0;break}a=o,o=pd(a)}i||(n.push(r.searchPath),t[e]=`included`)}return n}function Sd(e,t){let n=yd.None;for(let r of e)r.negate?n&=~r.match(t):n|=r.match(t);return n}function Cd(e,t){return e.some(e=>!e.negate&&e.partialMatch(t))}var wd=i(((e,t)=>{t.exports=function(e,t){for(var r=[],i=0;i{t.exports=n;function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var a=i(e,t,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+e.length,a[1]),post:n.slice(a[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}n.range=i;function i(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i=0?c:l;r.length&&(s=[a,o])}return s}})),Ed=i(((e,t)=>{var n=wd(),r=Td();t.exports=p;var i=`\0SLASH`+Math.random()+`\0`,a=`\0OPEN`+Math.random()+`\0`,o=`\0CLOSE`+Math.random()+`\0`,s=`\0COMMA`+Math.random()+`\0`,c=`\0PERIOD`+Math.random()+`\0`;function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(`\\\\`).join(i).split(`\\{`).join(a).split(`\\}`).join(o).split(`\\,`).join(s).split(`\\.`).join(c)}function d(e){return e.split(i).join(`\\`).split(a).join(`{`).split(o).join(`}`).split(s).join(`,`).split(c).join(`.`)}function f(e){if(!e)return[``];var t=[],n=r(`{`,`}`,e);if(!n)return e.split(`,`);var i=n.pre,a=n.body,o=n.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=f(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function p(e,t){if(!e)return[];t||={};var n=t.max==null?1/0:t.max;return e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),y(u(e),n,!0).map(d)}function m(e){return`{`+e+`}`}function h(e){return/^-?0\d/.test(e)}function g(e,t){return e<=t}function v(e,t){return e>=t}function y(e,t,i){var a=[],s=r(`{`,`}`,e);if(!s||/\$$/.test(s.pre))return[e];var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),d=c||u,p=s.body.indexOf(`,`)>=0;if(!d&&!p)return s.post.match(/,(?!,).*\}/)?(e=s.pre+`{`+s.body+o+s.post,y(e,t,!0)):[e];var b;if(d)b=s.body.split(/\.\./);else if(b=f(s.body),b.length===1&&(b=y(b[0],t,!1).map(m),b.length===1)){var x=s.post.length?y(s.post,t,!1):[``];return x.map(function(e){return s.pre+b[0]+e})}var S=s.pre,x=s.post.length?y(s.post,t,!1):[``],C;if(d){var w=l(b[0]),T=l(b[1]),E=Math.max(b[0].length,b[1].length),D=b.length==3?Math.max(Math.abs(l(b[2])),1):1,O=g;T0){var N=Array(M+1).join(`0`);j=A<0?`-`+N+j.slice(1):N+j}}C.push(j)}}else C=n(b,function(e){return y(e,t,!1)});for(var P=0;P{n.exports=g,g.Minimatch=v;var r=function(){try{return t(`path`)}catch{}}()||{sep:`/`};g.sep=r.sep;var i=g.GLOBSTAR=v.GLOBSTAR={},a=Ed(),o={"!":{open:`(?:(?!(?:`,close:`))[^/]*?)`},"?":{open:`(?:`,close:`)?`},"+":{open:`(?:`,close:`)+`},"*":{open:`(?:`,close:`)*`},"@":{open:`(?:`,close:`)`}},s=`[^/]`,c=s+`*?`,l=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,u=`(?:(?!(?:\\/|^)\\.).)*?`,d=f(`().*{}+?[]^$\\!`);function f(e){return e.split(``).reduce(function(e,t){return e[t]=!0,e},{})}var p=/\/+/;g.filter=m;function m(e,t){return t||={},function(n,r,i){return g(n,e,t)}}function h(e,t){t||={};var n={};return Object.keys(e).forEach(function(t){n[t]=e[t]}),Object.keys(t).forEach(function(e){n[e]=t[e]}),n}g.defaults=function(e){if(!e||typeof e!=`object`||!Object.keys(e).length)return g;var t=g,n=function(n,r,i){return t(n,r,h(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,h(e,r))},n.Minimatch.defaults=function(n){return t.defaults(h(e,n)).Minimatch},n.filter=function(n,r){return t.filter(n,h(e,r))},n.defaults=function(n){return t.defaults(h(e,n))},n.makeRe=function(n,r){return t.makeRe(n,h(e,r))},n.braceExpand=function(n,r){return t.braceExpand(n,h(e,r))},n.match=function(n,r,i){return t.match(n,r,h(e,i))},n},v.defaults=function(e){return g.defaults(e).Minimatch};function g(e,t,n){return C(t),n||={},!n.nocomment&&t.charAt(0)===`#`?!1:new v(t,n).match(e)}function v(e,t){if(!(this instanceof v))return new v(e,t);C(e),t||={},e=e.trim(),!t.allowWindowsEscape&&r.sep!==`/`&&(e=e.split(r.sep).join(`/`)),this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion===void 0?200:t.maxGlobstarRecursion,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}v.prototype.debug=function(){},v.prototype.make=y;function y(){var e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,n),n=this.globParts=n.map(function(e){return e.split(p)}),this.debug(this.pattern,n),n=n.map(function(e,t,n){return e.map(this.parse,this)},this),this.debug(this.pattern,n),n=n.filter(function(e){return e.indexOf(!1)===-1}),this.debug(this.pattern,n),this.set=n}v.prototype.parseNegate=b;function b(){var e=this.pattern,t=!1,n=this.options,r=0;if(!n.nonegate){for(var i=0,a=e.length;iS)throw TypeError(`pattern is too long`)};v.prototype.parse=T;var w={};function T(e,t){C(e);var n=this.options;if(e===`**`)if(n.noglobstar)e=`*`;else return i;if(e===``)return``;var r=``,a=!!n.nocase,l=!1,u=[],f=[],p,m=!1,h=-1,g=-1,v=e.charAt(0)===`.`?``:n.dot?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,y=this;function b(){if(p){switch(p){case`*`:r+=c,a=!0;break;case`?`:r+=s,a=!0;break;default:r+=`\\`+p;break}y.debug(`clearStateChar %j %j`,p,r),p=!1}}for(var x=0,S=e.length,T;x-1;N--){var P=f[N],F=r.slice(0,P.reStart),I=r.slice(P.reStart,P.reEnd-8),L=r.slice(P.reEnd-8,P.reEnd),R=r.slice(P.reEnd);L+=R;var z=F.split(`(`).length-1,ee=R;for(x=0;x=0&&(a=e[o],!a);o--);for(o=0;o=0;o--)if(t[o]===i){c=o;break}var l=t.slice(a,s),u=n?t.slice(s+1):t.slice(s+1,c),d=n?[]:t.slice(c+1);if(l.length){var f=e.slice(r,r+l.length);if(!this._matchOne(f,l,n,0,0))return!1;r+=l.length}var p=0;if(d.length){if(d.length+r>e.length)return!1;var m=e.length-d.length;if(this._matchOne(e,d,n,m,0))p=d.length;else{if(e[e.length-1]!==``||r+d.length===e.length||(m--,!this._matchOne(e,d,n,m,0)))return!1;p=d.length+1}}if(!u.length){var h=!!p;for(o=r;o0,`Parameter 'itemPath' must not be an empty array`);for(let t=0;te.getLiteral(t)).filter(e=>!o&&!(o=e===``));this.searchPath=new kd(s).toString(),this.rootRegExp=new RegExp(e.regExpEscape(s[0]),jd?`i`:``),this.isImplicitPattern=n;let c={dot:!0,nobrace:!0,nocase:jd,nocomment:!0,noext:!0,nonegate:!0};a=jd?a.replace(/\\/g,`/`):a,this.minimatch=new Ad(a,c)}match(e){return this.segments[this.segments.length-1]===`**`?(e=_d(e),!e.endsWith(U.sep)&&this.isImplicitPattern===!1&&(e=`${e}${U.sep}`)):e=vd(e),this.minimatch.match(e)?this.trailingSeparator?yd.Directory:yd.All:yd.None}partialMatch(e){return e=vd(e),pd(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(jd?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(jd?e:e.replace(/\\/g,`\\\\`)).replace(/(\[)(?=[^/]+\])/g,`[[]`).replace(/\?/g,`[?]`).replace(/\*/g,`[*]`)}static fixupPattern(t,n){we(t,`pattern cannot be empty`);let r=new kd(t).segments.map(t=>e.getLiteral(t));if(we(r.every((e,t)=>(e!==`.`||t===0)&&e!==`..`),`Invalid pattern '${t}'. Relative pathing '.' and '..' is not allowed.`),we(!gd(t)||r[0],`Invalid pattern '${t}'. Root segment must not contain globs.`),t=_d(t),t===`.`||t.startsWith(`.${U.sep}`))t=e.globEscape(process.cwd())+t.substr(1);else if(t===`~`||t.startsWith(`~${U.sep}`))n||=ce.homedir(),we(n,`Unable to determine HOME directory`),we(hd(n),`Expected HOME directory to be a rooted path. Actual '${n}'`),t=e.globEscape(n)+t.substr(1);else if(jd&&(t.match(/^[A-Z]:$/i)||t.match(/^[A-Z]:[^\\]/i))){let n=md(`C:\\dummy-root`,t.substr(0,2));t.length>2&&!n.endsWith(`\\`)&&(n+=`\\`),t=e.globEscape(n)+t.substr(2)}else if(jd&&(t===`\\`||t.match(/^\\[^\\]/))){let n=md(`C:\\dummy-root`,`\\`);n.endsWith(`\\`)||(n+=`\\`),t=e.globEscape(n)+t.substr(1)}else t=md(e.globEscape(process.cwd()),t);return _d(t)}static getLiteral(e){let t=``;for(let n=0;n=0){if(r.length>1)return``;if(r){t+=r,n=i;continue}}}t+=r}return t}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,`\\$&`)}},Nd=class{constructor(e,t){this.path=e,this.level=t}},Pd=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Fd=function(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values==`function`?__values(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}},Id=function(e){return this instanceof Id?(this.v=e,this):new Id(e)},Ld=function(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof Id?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}};const Rd=process.platform===`win32`;var zd=class e{constructor(e){this.patterns=[],this.searchPaths=[],this.options=dd(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){return Pd(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=Fd(this.globGenerator()),s;s=yield o.next(),e=s.done,!e;a=!0){r=s.value,a=!1;let e=r;i.push(e)}}catch(e){t={error:e}}finally{try{!a&&!e&&(n=o.return)&&(yield n.call(o))}finally{if(t)throw t.error}}return i})}globGenerator(){return Ld(this,arguments,function*(){let t=dd(this.options),n=[];for(let e of this.patterns)n.push(e),t.implicitDescendants&&(e.trailingSeparator||e.segments[e.segments.length-1]!==`**`)&&n.push(new Md(e.negate,!0,e.segments.concat(`**`)));let r=[];for(let e of xd(n)){K(`Search path '${e}'`);try{yield Id(fe.promises.lstat(e))}catch(e){if(e.code===`ENOENT`)continue;throw e}r.unshift(new Nd(e,1))}let i=[];for(;r.length;){let a=r.pop(),o=Sd(n,a.path),s=!!o||Cd(n,a.path);if(!o&&!s)continue;let c=yield Id(e.stat(a,t,i));if(c&&!(t.excludeHiddenFiles&&U.basename(a.path).match(/^\./)))if(c.isDirectory()){if(o&yd.Directory&&t.matchDirectories)yield yield Id(a.path);else if(!s)continue;let e=a.level+1,n=(yield Id(fe.promises.readdir(a.path))).map(t=>new Nd(U.join(a.path,t),e));r.push(...n.reverse())}else o&yd.File&&(yield yield Id(a.path))}})}static create(t,n){return Pd(this,void 0,void 0,function*(){let r=new e(n);Rd&&(t=t.replace(/\r\n/g,` `),t=t.replace(/\r/g,` `));let i=t.split(` -`).map(e=>e.trim());for(let e of i)if(!e||e.startsWith(`#`))continue;else r.patterns.push(new sc(e));return r.searchPaths.push(...Zs(r.patterns)),r})}static stat(e,t,n){return lc(this,void 0,void 0,function*(){let r;if(t.followSymbolicLinks)try{r=yield fe.promises.stat(e.path)}catch(n){if(n.code===`ENOENT`){if(t.omitBrokenSymbolicLinks){K(`Broken symlink '${e.path}'`);return}throw Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw n}else r=yield fe.promises.lstat(e.path);if(r.isDirectory()&&t.followSymbolicLinks){let t=yield fe.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(e=>e===t)){K(`Symlink cycle detected for path '${e.path}' and realpath '${t}'`);return}n.push(t)}return r})}},hc=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function gc(e,t){return hc(this,void 0,void 0,function*(){return yield mc.create(e,t)})}var _c=n(Bs(),1),vc;(function(e){e.Gzip=`cache.tgz`,e.Zstd=`cache.tzst`})(vc||={});var yc;(function(e){e.Gzip=`gzip`,e.ZstdWithoutLong=`zstd-without-long`,e.Zstd=`zstd`})(yc||={});var bc;(function(e){e.GNU=`gnu`,e.BSD=`bsd`})(bc||={});const xc=5e3,Sc=5e3,Cc=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,wc=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,Tc=`cache.tar`,Ec=`manifest.txt`;var Dc=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Oc=function(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values==`function`?__values(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}};function kc(){return Dc(this,void 0,void 0,function*(){let e=process.platform===`win32`,t=process.env.RUNNER_TEMP||``;if(!t){let n;n=e?process.env.USERPROFILE||`C:\\`:process.platform===`darwin`?`/Users`:`/home`,t=U.join(n,`actions`,`temp`)}let n=U.join(t,de.randomUUID());return yield Kr(n),n})}function Ac(e){return fe.statSync(e).size}function jc(e){return Dc(this,void 0,void 0,function*(){var t,n,r,i;let a=[],o=process.env.GITHUB_WORKSPACE??process.cwd(),s=yield gc(e.join(` -`),{implicitDescendants:!1});try{for(var c=!0,l=Oc(s.globGenerator()),u;u=yield l.next(),t=u.done,!t;c=!0){i=u.value,c=!1;let e=i,t=U.relative(o,e).replace(RegExp(`\\${U.sep}`,`g`),`/`);K(`Matched: ${t}`),t===``?a.push(`.`):a.push(`${t}`)}}catch(e){n={error:e}}finally{try{!c&&!t&&(r=l.return)&&(yield r.call(l))}finally{if(n)throw n.error}}return a})}function Mc(e){return Dc(this,void 0,void 0,function*(){return Ee.promisify(fe.unlink)(e)})}function Nc(e){return Dc(this,arguments,void 0,function*(e,t=[]){let n=``;t.push(`--version`),K(`Checking ${e} ${t.join(` `)}`);try{yield ii(`${e}`,t,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>n+=e.toString(),stderr:e=>n+=e.toString()}})}catch(e){K(e.message)}return n=n.trim(),K(n),n})}function Pc(){return Dc(this,void 0,void 0,function*(){let e=yield Nc(`zstd`,[`--quiet`]);return K(`zstd version: ${_c.clean(e)}`),e===``?yc.Gzip:yc.ZstdWithoutLong})}function Fc(e){return e===yc.Gzip?vc.Gzip:vc.Zstd}function Ic(){return Dc(this,void 0,void 0,function*(){return fe.existsSync(Cc)?Cc:(yield Nc(`tar`)).toLowerCase().includes(`gnu tar`)?qr(`tar`):``})}function Lc(e,t){if(t===void 0)throw Error(`Expected ${e} but value was undefiend`);return t}function Rc(e,t,n=!1){let r=e.slice();return t&&r.push(t),process.platform===`win32`&&!n&&r.push(`windows-only`),r.push(`1.0`),de.createHash(`sha256`).update(r.join(`|`)).digest(`hex`)}function zc(){let e=process.env.ACTIONS_RUNTIME_TOKEN;if(!e)throw Error(`Unable to get the ACTIONS_RUNTIME_TOKEN env variable`);return e}var Bc=class extends Error{constructor(e){super(e),this.name=`AbortError`}};function Vc(e,...t){se.stderr.write(`${je.format(e,...t)}${He}`)}const Hc=typeof process<`u`&&process.env&&process.env.DEBUG||void 0;let Uc,Wc=[],Gc=[];const Kc=[];Hc&&Jc(Hc);const qc=Object.assign(e=>Qc(e),{enable:Jc,enabled:Yc,disable:Zc,log:Vc});function Jc(e){Uc=e,Wc=[],Gc=[];let t=e.split(`,`).map(e=>e.trim());for(let e of t)e.startsWith(`-`)?Gc.push(e.substring(1)):Wc.push(e);for(let e of Kc)e.enabled=Yc(e.namespace)}function Yc(e){if(e.endsWith(`*`))return!0;for(let t of Gc)if(Xc(e,t))return!1;for(let t of Wc)if(Xc(e,t))return!0;return!1}function Xc(e,t){if(t.indexOf(`*`)===-1)return e===t;let n=t;if(t.indexOf(`**`)!==-1){let e=[],r=``;for(let n of t)if(n===`*`&&r===`*`)continue;else r=n,e.push(n);n=e.join(``)}let r=0,i=0,a=n.length,o=e.length,s=-1,c=-1;for(;r=0){if(i=s+1,r=c+1,r===o)return!1;for(;e[r]!==n[i];)if(r++,r===o)return!1;c=r,r++,i++;continue}else return!1;let l=r===e.length,u=i===n.length,d=i===n.length-1&&n[i]===`*`;return l&&(u||d)}function Zc(){let e=Uc||``;return Jc(``),e}function Qc(e){let t=Object.assign(n,{enabled:Yc(e),destroy:$c,log:qc.log,namespace:e,extend:el});function n(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}return Kc.push(t),t}function $c(){let e=Kc.indexOf(this);return e>=0?(Kc.splice(e,1),!0):!1}function el(e){let t=Qc(`${this.namespace}:${e}`);return t.log=this.log,t}const tl=[`verbose`,`info`,`warning`,`error`],nl={verbose:400,info:300,warning:200,error:100};function rl(e,t){t.log=(...t)=>{e.log(...t)}}function il(e){return tl.includes(e)}function al(e){let t=new Set,n=typeof process<`u`&&process.env&&process.env[e.logLevelEnvVarName]||void 0,r,i=qc(e.namespace);i.log=(...e)=>{qc.log(...e)};function a(e){if(e&&!il(e))throw Error(`Unknown log level '${e}'. Acceptable values: ${tl.join(`,`)}`);r=e;let n=[];for(let e of t)o(e)&&n.push(e.namespace);qc.enable(n.join(`,`))}n&&(il(n)?a(n):console.error(`${e.logLevelEnvVarName} set to unknown log level '${n}'; logging is not enabled. Acceptable values: ${tl.join(`, `)}.`));function o(e){return!!(r&&nl[e.level]<=nl[r])}function s(e,n){let r=Object.assign(e.extend(n),{level:n});if(rl(e,r),o(r)){let e=qc.disable();qc.enable(e+`,`+r.namespace)}return t.add(r),r}function c(){return r}function l(e){let t=i.extend(e);return rl(i,t),{error:s(t,`error`),warning:s(t,`warning`),info:s(t,`info`),verbose:s(t,`verbose`)}}return{setLogLevel:a,getLogLevel:c,createClientLogger:l,logger:i}}const ol=al({logLevelEnvVarName:`TYPESPEC_RUNTIME_LOG_LEVEL`,namespace:`typeSpecRuntime`});ol.logger;function sl(e){return ol.createClientLogger(e)}function cl(e){return e.toLowerCase()}function*ll(e){for(let t of e.values())yield[t.name,t.value]}var ul=class{_headersMap;constructor(e){if(this._headersMap=new Map,e)for(let t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(cl(e),{name:e,value:String(t).trim()})}get(e){return this._headersMap.get(cl(e))?.value}has(e){return this._headersMap.has(cl(e))}delete(e){this._headersMap.delete(cl(e))}toJSON(e={}){let t={};if(e.preserveCase)for(let e of this._headersMap.values())t[e.name]=e.value;else for(let[e,n]of this._headersMap)t[e]=n.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return ll(this._headersMap)}};function dl(e){return new ul(e)}function fl(){return crypto.randomUUID()}var pl=class{url;method;headers;timeout;withCredentials;body;multipartBody;formData;streamResponseStatusCodes;enableBrowserStreams;proxySettings;disableKeepAlive;abortSignal;requestId;allowInsecureConnection;onUploadProgress;onDownloadProgress;requestOverrides;authSchemes;constructor(e){this.url=e.url,this.body=e.body,this.headers=e.headers??dl(),this.method=e.method??`GET`,this.timeout=e.timeout??0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=e.disableKeepAlive??!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=e.withCredentials??!1,this.abortSignal=e.abortSignal,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||fl(),this.allowInsecureConnection=e.allowInsecureConnection??!1,this.enableBrowserStreams=e.enableBrowserStreams??!1,this.requestOverrides=e.requestOverrides,this.authSchemes=e.authSchemes}};function ml(e){return new pl(e)}const hl=new Set([`Deserialize`,`Serialize`,`Retry`,`Sign`]);var gl=class e{_policies=[];_orderedPolicies;constructor(e){this._policies=e?.slice(0)??[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw Error(`Policies inside a phase cannot specify afterPhase.`);if(t.phase&&!hl.has(t.phase))throw Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!hl.has(t.afterPhase))throw Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){let t=[];return this._policies=this._policies.filter(n=>e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase?(t.push(n.policy),!1):!0),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight((e,t)=>n=>t.sendRequest(n,e),t=>e.sendRequest(t))(t)}getOrderedPolicies(){return this._orderedPolicies||=this.orderPolicies(),this._orderedPolicies}clone(){return new e(this._policies)}static create(){return new e}orderPolicies(){let e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}let r=n(`Serialize`),i=n(`None`),a=n(`Deserialize`),o=n(`Retry`),s=n(`Sign`),c=[r,i,a,o,s];function l(e){return e===`Retry`?o:e===`Serialize`?r:e===`Deserialize`?a:e===`Sign`?s:i}for(let e of this._policies){let n=e.policy,r=e.options,i=n.name;if(t.has(i))throw Error(`Duplicate policy names not allowed in pipeline`);let a={policy:n,dependsOn:new Set,dependants:new Set};r.afterPhase&&(a.afterPhase=l(r.afterPhase),a.afterPhase.hasAfterPolicies=!0),t.set(i,a),l(r.phase).policies.add(a)}for(let e of this._policies){let{policy:n,options:r}=e,i=n.name,a=t.get(i);if(!a)throw Error(`Missing node for policy ${i}`);if(r.afterPolicies)for(let e of r.afterPolicies){let n=t.get(e);n&&(a.dependsOn.add(n),n.dependants.add(a))}if(r.beforePolicies)for(let e of r.beforePolicies){let n=t.get(e);n&&(n.dependsOn.add(a),a.dependants.add(n))}}function u(n){n.hasRun=!0;for(let r of n.policies)if(!(r.afterPhase&&(!r.afterPhase.hasRun||r.afterPhase.policies.size))&&r.dependsOn.size===0){e.push(r.policy);for(let e of r.dependants)e.dependsOn.delete(r);t.delete(r.policy.name),n.policies.delete(r)}}function d(){for(let e of c){if(u(e),e.policies.size>0&&e!==i){i.hasRun||u(i);return}e.hasAfterPolicies&&u(i)}}let f=0;for(;t.size>0;){f++;let t=e.length;if(d(),e.length<=t&&f>1)throw Error(`Cannot satisfy policy dependencies due to requirements cycle.`)}return e}};function _l(){return gl.create()}function vl(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function yl(e){if(vl(e)){let t=typeof e.name==`string`,n=typeof e.message==`string`;return t&&n}return!1}const bl=Me.custom,xl=`REDACTED`,Sl=`x-ms-client-request-id.x-ms-return-client-request-id.x-ms-useragent.x-ms-correlation-request-id.x-ms-request-id.client-request-id.ms-cv.return-client-request-id.traceparent.Access-Control-Allow-Credentials.Access-Control-Allow-Headers.Access-Control-Allow-Methods.Access-Control-Allow-Origin.Access-Control-Expose-Headers.Access-Control-Max-Age.Access-Control-Request-Headers.Access-Control-Request-Method.Origin.Accept.Accept-Encoding.Cache-Control.Connection.Content-Length.Content-Type.Date.ETag.Expires.If-Match.If-Modified-Since.If-None-Match.If-Unmodified-Since.Last-Modified.Pragma.Request-Id.Retry-After.Server.Transfer-Encoding.User-Agent.WWW-Authenticate`.split(`.`),Cl=[`api-version`];var wl=class{allowedHeaderNames;allowedQueryParameters;constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=Sl.concat(e),t=Cl.concat(t),this.allowedHeaderNames=new Set(e.map(e=>e.toLowerCase())),this.allowedQueryParameters=new Set(t.map(e=>e.toLowerCase()))}sanitize(e){let t=new Set;return JSON.stringify(e,(e,n)=>{if(n instanceof Error)return{...n,name:n.name,message:n.message};if(e===`headers`)return this.sanitizeHeaders(n);if(e===`url`)return this.sanitizeUrl(n);if(e===`query`)return this.sanitizeQuery(n);if(e!==`body`&&e!==`response`&&e!==`operationSpec`){if(Array.isArray(n)||vl(n)){if(t.has(n))return`[Circular]`;t.add(n)}return n}},2)}sanitizeUrl(e){if(typeof e!=`string`||e===null||e===``)return e;let t=new URL(e);if(!t.search)return e;for(let[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,xl);return t.toString()}sanitizeHeaders(e){let t={};for(let n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=xl;return t}sanitizeQuery(e){if(typeof e!=`object`||!e)return e;let t={};for(let n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?t[n]=e[n]:t[n]=xl;return t}};const Tl=new wl;var El=class e extends Error{static REQUEST_SEND_ERROR=`REQUEST_SEND_ERROR`;static PARSE_ERROR=`PARSE_ERROR`;code;statusCode;request;response;details;constructor(t,n={}){super(t),this.name=`RestError`,this.code=n.code,this.statusCode=n.statusCode,Object.defineProperty(this,`request`,{value:n.request,enumerable:!1}),Object.defineProperty(this,`response`,{value:n.response,enumerable:!1});let r=this.request?.agent?{maxFreeSockets:this.request.agent.maxFreeSockets,maxSockets:this.request.agent.maxSockets}:void 0;Object.defineProperty(this,bl,{value:()=>`RestError: ${this.message} \n ${Tl.sanitize({...this,request:{...this.request,agent:r},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,e.prototype)}};function Dl(e){return e instanceof El?!0:yl(e)&&e.name===`RestError`}function Ol(e,t){return Buffer.from(e,t)}const kl=sl(`ts-http-runtime`),Al={};function jl(e){return e&&typeof e.pipe==`function`}function Ml(e){return e.readable===!1?Promise.resolve():new Promise(t=>{let n=()=>{t(),e.removeListener(`close`,n),e.removeListener(`end`,n),e.removeListener(`error`,n)};e.on(`close`,n),e.on(`end`,n),e.on(`error`,n)})}function Nl(e){return e&&typeof e.byteLength==`number`}var Pl=class extends ke{loadedBytes=0;progressCallback;_transform(e,t,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(e){n(e)}}constructor(e){super(),this.progressCallback=e}},Fl=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let t=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Bc(`The operation was aborted. Request has already been canceled.`);n=e=>{e.type===`abort`&&t.abort()},e.abortSignal.addEventListener(`abort`,n)}let r;e.timeout>0&&(r=setTimeout(()=>{let n=new wl;kl.info(`request to '${n.sanitizeUrl(e.url)}' timed out. canceling...`),t.abort()},e.timeout));let i=e.headers.get(`Accept-Encoding`),a=i?.includes(`gzip`)||i?.includes(`deflate`),o=typeof e.body==`function`?e.body():e.body;if(o&&!e.headers.has(`Content-Length`)){let t=zl(o);t!==null&&e.headers.set(`Content-Length`,t)}let s;try{if(o&&e.onUploadProgress){let t=e.onUploadProgress,n=new Pl(t);n.on(`error`,e=>{kl.error(`Error in upload progress`,e)}),jl(o)?o.pipe(n):n.end(o),o=n}let n=await this.makeRequest(e,t,o);r!==void 0&&clearTimeout(r);let i=Il(n),c={status:n.statusCode??0,headers:i,request:e};if(e.method===`HEAD`)return n.resume(),c;s=a?Ll(n,i):n;let l=e.onDownloadProgress;if(l){let e=new Pl(l);e.on(`error`,e=>{kl.error(`Error in download progress`,e)}),s.pipe(e),s=e}return e.streamResponseStatusCodes?.has(1/0)||e.streamResponseStatusCodes?.has(c.status)?c.readableStreamBody=s:c.bodyAsText=await Rl(s),c}finally{if(e.abortSignal&&n){let t=Promise.resolve();jl(o)&&(t=Ml(o));let r=Promise.resolve();jl(s)&&(r=Ml(s)),Promise.all([t,r]).then(()=>{n&&e.abortSignal?.removeEventListener(`abort`,n)}).catch(e=>{kl.warning(`Error when cleaning up abortListener on httpRequest`,e)})}}}makeRequest(e,t,n){let r=new URL(e.url),i=r.protocol!==`https:`;if(i&&!e.allowInsecureConnection)throw Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let a={agent:e.agent??this.getOrCreateAgent(e,i),hostname:r.hostname,path:`${r.pathname}${r.search}`,port:r.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((r,o)=>{let s=i?Oe.request(a,r):Ke.request(a,r);s.once(`error`,t=>{o(new El(t.message,{code:t.code??El.REQUEST_SEND_ERROR,request:e}))}),t.signal.addEventListener(`abort`,()=>{let e=new Bc(`The operation was aborted. Rejecting from abort signal callback while making request.`);s.destroy(e),o(e)}),n&&jl(n)?n.pipe(s):n?typeof n==`string`||Buffer.isBuffer(n)?s.end(n):Nl(n)?s.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(kl.error(`Unrecognized body type`,n),o(new El(`Unrecognized body type`))):s.end()})}getOrCreateAgent(e,t){let n=e.disableKeepAlive;if(t)return n?Oe.globalAgent:(this.cachedHttpAgent||=new Oe.Agent({keepAlive:!0}),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return Ke.globalAgent;let t=e.tlsSettings??Al,r=this.cachedHttpsAgents.get(t);return r&&r.options.keepAlive===!n?r:(kl.info(`No cached TLS Agent exist, creating a new Agent`),r=new Ke.Agent({keepAlive:!n,...t}),this.cachedHttpsAgents.set(t,r),r)}}};function Il(e){let t=dl();for(let n of Object.keys(e.headers)){let r=e.headers[n];Array.isArray(r)?r.length>0&&t.set(n,r[0]):r&&t.set(n,r)}return t}function Ll(e,t){let n=t.get(`Content-Encoding`);if(n===`gzip`){let t=Ne.createGunzip();return e.pipe(t),t}else if(n===`deflate`){let t=Ne.createInflate();return e.pipe(t),t}return e}function Rl(e){return new Promise((t,n)=>{let r=[];e.on(`data`,e=>{Buffer.isBuffer(e)?r.push(e):r.push(Buffer.from(e))}),e.on(`end`,()=>{t(Buffer.concat(r).toString(`utf8`))}),e.on(`error`,e=>{e&&e?.name===`AbortError`?n(e):n(new El(`Error reading response as text: ${e.message}`,{code:El.PARSE_ERROR}))})})}function zl(e){return e?Buffer.isBuffer(e)?e.length:jl(e)?null:Nl(e)?e.byteLength:typeof e==`string`?Buffer.from(e).length:null:0}function Bl(){return new Fl}function Vl(){return Bl()}function Hl(e={}){let t=e.logger??kl.info,n=new wl({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:`logPolicy`,async sendRequest(e,r){if(!t.enabled)return r(e);t(`Request: ${n.sanitize(e)}`);let i=await r(e);return t(`Response status code: ${i.status}`),t(`Headers: ${n.sanitize(i.headers)}`),i}}}const Ul=[`GET`,`HEAD`];function Wl(e={}){let{maxRetries:t=20,allowCrossOriginRedirects:n=!1}=e;return{name:`redirectPolicy`,async sendRequest(e,r){return Gl(r,await r(e),t,n)}}}async function Gl(e,t,n,r,i=0){let{request:a,status:o,headers:s}=t,c=s.get(`location`);if(c&&(o===300||o===301&&Ul.includes(a.method)||o===302&&Ul.includes(a.method)||o===303&&a.method===`POST`||o===307)&&i{let a,o,s=()=>i(new Bc(n?.abortErrorMsg?n?.abortErrorMsg:`The operation was aborted.`)),c=()=>{n?.abortSignal&&o&&n.abortSignal.removeEventListener(`abort`,o)};if(o=()=>(a&&clearTimeout(a),c(),s()),n?.abortSignal&&n.abortSignal.aborted)return s();a=setTimeout(()=>{c(),r(t)},e),n?.abortSignal&&n.abortSignal.addEventListener(`abort`,o)})}function Xl(e,t){let n=e.headers.get(t);if(!n)return;let r=Number(n);if(!Number.isNaN(r))return r}const Zl=`Retry-After`,Ql=[`retry-after-ms`,`x-ms-retry-after-ms`,Zl];function $l(e){if(e&&[429,503].includes(e.status))try{for(let t of Ql){let n=Xl(e,t);if(n===0||n)return n*(t===Zl?1e3:1)}let t=e.headers.get(Zl);if(!t)return;let n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch{return}}function eu(e){return Number.isFinite($l(e))}function tu(){return{name:`throttlingRetryStrategy`,retry({response:e}){let t=$l(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}}}function nu(e={}){let t=e.retryDelayInMs??1e3,n=e.maxRetryDelayInMs??64e3;return{name:`exponentialRetryStrategy`,retry({retryCount:r,response:i,responseError:a}){let o=iu(a),s=o&&e.ignoreSystemErrors,c=ru(i),l=c&&e.ignoreHttpStatusCodes;return i&&(eu(i)||!c)||l||s?{skipStrategy:!0}:a&&!o&&!c?{errorToThrow:a}:Jl(r,{retryDelayInMs:t,maxRetryDelayInMs:n})}}}function ru(e){return!!(e&&e.status!==void 0&&(e.status>=500||e.status===408)&&e.status!==501&&e.status!==505)}function iu(e){return e?e.code===`ETIMEDOUT`||e.code===`ESOCKETTIMEDOUT`||e.code===`ECONNREFUSED`||e.code===`ECONNRESET`||e.code===`ENOENT`||e.code===`ENOTFOUND`:!1}const au=sl(`ts-http-runtime retryPolicy`);function ou(e,t={maxRetries:3}){let n=t.logger||au;return{name:`retryPolicy`,async sendRequest(r,i){let a,o,s=-1;retryRequest:for(;;){s+=1,a=void 0,o=void 0;try{n.info(`Retry ${s}: Attempting to send request`,r.requestId),a=await i(r),n.info(`Retry ${s}: Received a response from request`,r.requestId)}catch(e){if(n.error(`Retry ${s}: Received an error from request`,r.requestId),o=e,!e||o.name!==`RestError`)throw e;a=o.response}if(r.abortSignal?.aborted)throw n.error(`Retry ${s}: Request aborted.`),new Bc;if(s>=(t.maxRetries??3)){if(n.info(`Retry ${s}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),o)throw o;if(a)return a;throw Error(`Maximum retries reached with no response or error to throw`)}n.info(`Retry ${s}: Processing ${e.length} retry strategies.`);strategiesLoop:for(let t of e){let e=t.logger||n;e.info(`Retry ${s}: Processing retry strategy ${t.name}.`);let i=t.retry({retryCount:s,response:a,responseError:o});if(i.skipStrategy){e.info(`Retry ${s}: Skipped.`);continue strategiesLoop}let{errorToThrow:c,retryAfterInMs:l,redirectTo:u}=i;if(c)throw e.error(`Retry ${s}: Retry strategy ${t.name} throws error:`,c),c;if(l||l===0){e.info(`Retry ${s}: Retry strategy ${t.name} retries after ${l}`),await Yl(l,void 0,{abortSignal:r.abortSignal});continue retryRequest}if(u){e.info(`Retry ${s}: Retry strategy ${t.name} redirects to ${u}`),r.url=u;continue retryRequest}}if(o)throw n.info(`None of the retry strategies could work with the received error. Throwing it.`),o;if(a)return n.info(`None of the retry strategies could work with the received response. Returning it.`),a}}}}function su(e={}){return{name:`defaultRetryPolicy`,sendRequest:ou([tu(),nu(e)],{maxRetries:e.maxRetries??3}).sendRequest}}typeof window<`u`&&window.document,typeof self==`object`&&typeof self?.importScripts==`function`&&(self.constructor?.name===`DedicatedWorkerGlobalScope`||self.constructor?.name===`ServiceWorkerGlobalScope`||self.constructor?.name),typeof Deno<`u`&&Deno.version!==void 0&&Deno.version.deno,typeof Bun<`u`&&Bun.version;const cu=globalThis.process!==void 0&&!!globalThis.process.version&&!!globalThis.process.versions?.node;typeof navigator<`u`&&navigator?.product;function lu(e){let t={};for(let[n,r]of e.entries())t[n]??=[],t[n].push(r);return t}function uu(){return{name:`formDataPolicy`,async sendRequest(e,t){if(cu&&typeof FormData<`u`&&e.body instanceof FormData&&(e.formData=lu(e.body),e.body=void 0),e.formData){let t=e.headers.get(`Content-Type`);t&&t.indexOf(`application/x-www-form-urlencoded`)!==-1?e.body=du(e.formData):await fu(e.formData,e),e.formData=void 0}return t(e)}}}function du(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(n,e.toString());else t.append(n,r.toString());return t.toString()}async function fu(e,t){let n=t.headers.get(`Content-Type`);if(n&&!n.startsWith(`multipart/form-data`))return;t.headers.set(`Content-Type`,n??`multipart/form-data`);let r=[];for(let[t,n]of Object.entries(e))for(let e of Array.isArray(n)?n:[n])if(typeof e==`string`)r.push({headers:dl({"Content-Disposition":`form-data; name="${t}"`}),body:Ol(e,`utf-8`)});else if(typeof e!=`object`||!e)throw Error(`Unexpected value for key ${t}: ${e}. Value should be serialized to string first.`);else{let n=e.name||`blob`,i=dl();i.set(`Content-Disposition`,`form-data; name="${t}"; filename="${n}"`),i.set(`Content-Type`,e.type||`application/octet-stream`),r.push({headers:i,body:e})}t.multipartBody={parts:r}}var pu=i(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}})),mu=i(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=o,n.enable=i,n.enabled=s,n.humanize=pu(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),hu=i(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=mu()(e);let{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}})),gu=i(((e,t)=>{t.exports=(e,t)=>{t||=process.argv;let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1?!0:r{let r=t(`os`),i=gu(),a=process.env,o;i(`no-color`)||i(`no-colors`)||i(`color=false`)?o=!1:(i(`color`)||i(`colors`)||i(`color=true`)||i(`color=always`))&&(o=!0),`FORCE_COLOR`in a&&(o=a.FORCE_COLOR.length===0||parseInt(a.FORCE_COLOR,10)!==0);function s(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function c(e){if(o===!1)return 0;if(i(`color=16m`)||i(`color=full`)||i(`color=truecolor`))return 3;if(i(`color=256`))return 2;if(e&&!e.isTTY&&o!==!0)return 0;let t=+!!o;if(process.platform===`win32`){let e=r.release().split(`.`);return Number(process.versions.node.split(`.`)[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in a)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`].some(e=>e in a)||a.CI_NAME===`codeship`?1:t;if(`TEAMCITY_VERSION`in a)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION);if(a.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in a){let e=parseInt((a.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(a.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||`COLORTERM`in a?1:(a.TERM,t)}function l(e){return s(c(e))}n.exports={supportsColor:l,stdout:l(process.stdout),stderr:l(process.stderr)}})),vu=i(((e,n)=>{let r=t(`tty`),i=t(`util`);e.init=d,e.log=c,e.formatArgs=o,e.save=l,e.load=u,e.useColors=a,e.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let t=_u();t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function a(){return`colors`in e.inspectOpts?!!e.inspectOpts.colors:r.isatty(process.stderr.fd)}function o(e){let{namespace:t,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${t} \u001B[0m`;e[0]=a+e[0].split(` +`).map(e=>e.trim());for(let e of i)if(!e||e.startsWith(`#`))continue;else r.patterns.push(new Md(e));return r.searchPaths.push(...xd(r.patterns)),r})}static stat(e,t,n){return Pd(this,void 0,void 0,function*(){let r;if(t.followSymbolicLinks)try{r=yield fe.promises.stat(e.path)}catch(n){if(n.code===`ENOENT`){if(t.omitBrokenSymbolicLinks){K(`Broken symlink '${e.path}'`);return}throw Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw n}else r=yield fe.promises.lstat(e.path);if(r.isDirectory()&&t.followSymbolicLinks){let t=yield fe.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(e=>e===t)){K(`Symlink cycle detected for path '${e.path}' and realpath '${t}'`);return}n.push(t)}return r})}},Bd=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function Vd(e,t){return Bd(this,void 0,void 0,function*(){return yield zd.create(e,t)})}var Hd=n(ud(),1),Ud;(function(e){e.Gzip=`cache.tgz`,e.Zstd=`cache.tzst`})(Ud||={});var Wd;(function(e){e.Gzip=`gzip`,e.ZstdWithoutLong=`zstd-without-long`,e.Zstd=`zstd`})(Wd||={});var Gd;(function(e){e.GNU=`gnu`,e.BSD=`bsd`})(Gd||={});const Kd=5e3,qd=5e3,Jd=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,Yd=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,Xd=`cache.tar`,Zd=`manifest.txt`;var Qd=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},$d=function(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values==`function`?__values(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}};function ef(){return Qd(this,void 0,void 0,function*(){let e=process.platform===`win32`,t=process.env.RUNNER_TEMP||``;if(!t){let n;n=e?process.env.USERPROFILE||`C:\\`:process.platform===`darwin`?`/Users`:`/home`,t=U.join(n,`actions`,`temp`)}let n=U.join(t,de.randomUUID());return yield Jr(n),n})}function tf(e){return fe.statSync(e).size}function nf(e){return Qd(this,void 0,void 0,function*(){var t,n,r,i;let a=[],o=process.env.GITHUB_WORKSPACE??process.cwd(),s=yield Vd(e.join(` +`),{implicitDescendants:!1});try{for(var c=!0,l=$d(s.globGenerator()),u;u=yield l.next(),t=u.done,!t;c=!0){i=u.value,c=!1;let e=i,t=U.relative(o,e).replace(RegExp(`\\${U.sep}`,`g`),`/`);K(`Matched: ${t}`),t===``?a.push(`.`):a.push(`${t}`)}}catch(e){n={error:e}}finally{try{!c&&!t&&(r=l.return)&&(yield r.call(l))}finally{if(n)throw n.error}}return a})}function rf(e){return Qd(this,void 0,void 0,function*(){return Ee.promisify(fe.unlink)(e)})}function af(e){return Qd(this,arguments,void 0,function*(e,t=[]){let n=``;t.push(`--version`),K(`Checking ${e} ${t.join(` `)}`);try{yield oi(`${e}`,t,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>n+=e.toString(),stderr:e=>n+=e.toString()}})}catch(e){K(e.message)}return n=n.trim(),K(n),n})}function of(){return Qd(this,void 0,void 0,function*(){let e=yield af(`zstd`,[`--quiet`]);return K(`zstd version: ${Hd.clean(e)}`),e===``?Wd.Gzip:Wd.ZstdWithoutLong})}function sf(e){return e===Wd.Gzip?Ud.Gzip:Ud.Zstd}function cf(){return Qd(this,void 0,void 0,function*(){return fe.existsSync(Jd)?Jd:(yield af(`tar`)).toLowerCase().includes(`gnu tar`)?Yr(`tar`):``})}function lf(e,t){if(t===void 0)throw Error(`Expected ${e} but value was undefiend`);return t}function uf(e,t,n=!1){let r=e.slice();return t&&r.push(t),process.platform===`win32`&&!n&&r.push(`windows-only`),r.push(`1.0`),de.createHash(`sha256`).update(r.join(`|`)).digest(`hex`)}function df(){let e=process.env.ACTIONS_RUNTIME_TOKEN;if(!e)throw Error(`Unable to get the ACTIONS_RUNTIME_TOKEN env variable`);return e}var ff=class extends Error{constructor(e){super(e),this.name=`AbortError`}};function pf(e,...t){se.stderr.write(`${je.format(e,...t)}${We}`)}const mf=typeof process<`u`&&process.env&&process.env.DEBUG||void 0;let hf,gf=[],_f=[];const vf=[];mf&&bf(mf);const yf=Object.assign(e=>wf(e),{enable:bf,enabled:xf,disable:Cf,log:pf});function bf(e){hf=e,gf=[],_f=[];let t=e.split(`,`).map(e=>e.trim());for(let e of t)e.startsWith(`-`)?_f.push(e.substring(1)):gf.push(e);for(let e of vf)e.enabled=xf(e.namespace)}function xf(e){if(e.endsWith(`*`))return!0;for(let t of _f)if(Sf(e,t))return!1;for(let t of gf)if(Sf(e,t))return!0;return!1}function Sf(e,t){if(t.indexOf(`*`)===-1)return e===t;let n=t;if(t.indexOf(`**`)!==-1){let e=[],r=``;for(let n of t)if(n===`*`&&r===`*`)continue;else r=n,e.push(n);n=e.join(``)}let r=0,i=0,a=n.length,o=e.length,s=-1,c=-1;for(;r=0){if(i=s+1,r=c+1,r===o)return!1;for(;e[r]!==n[i];)if(r++,r===o)return!1;c=r,r++,i++;continue}else return!1;let l=r===e.length,u=i===n.length,d=i===n.length-1&&n[i]===`*`;return l&&(u||d)}function Cf(){let e=hf||``;return bf(``),e}function wf(e){let t=Object.assign(n,{enabled:xf(e),destroy:Tf,log:yf.log,namespace:e,extend:Ef});function n(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}return vf.push(t),t}function Tf(){let e=vf.indexOf(this);return e>=0?(vf.splice(e,1),!0):!1}function Ef(e){let t=wf(`${this.namespace}:${e}`);return t.log=this.log,t}const Df=[`verbose`,`info`,`warning`,`error`],Of={verbose:400,info:300,warning:200,error:100};function kf(e,t){t.log=(...t)=>{e.log(...t)}}function Af(e){return Df.includes(e)}function jf(e){let t=new Set,n=typeof process<`u`&&process.env&&process.env[e.logLevelEnvVarName]||void 0,r,i=yf(e.namespace);i.log=(...e)=>{yf.log(...e)};function a(e){if(e&&!Af(e))throw Error(`Unknown log level '${e}'. Acceptable values: ${Df.join(`,`)}`);r=e;let n=[];for(let e of t)o(e)&&n.push(e.namespace);yf.enable(n.join(`,`))}n&&(Af(n)?a(n):console.error(`${e.logLevelEnvVarName} set to unknown log level '${n}'; logging is not enabled. Acceptable values: ${Df.join(`, `)}.`));function o(e){return!!(r&&Of[e.level]<=Of[r])}function s(e,n){let r=Object.assign(e.extend(n),{level:n});if(kf(e,r),o(r)){let e=yf.disable();yf.enable(e+`,`+r.namespace)}return t.add(r),r}function c(){return r}function l(e){let t=i.extend(e);return kf(i,t),{error:s(t,`error`),warning:s(t,`warning`),info:s(t,`info`),verbose:s(t,`verbose`)}}return{setLogLevel:a,getLogLevel:c,createClientLogger:l,logger:i}}const Mf=jf({logLevelEnvVarName:`TYPESPEC_RUNTIME_LOG_LEVEL`,namespace:`typeSpecRuntime`});Mf.logger;function Nf(e){return Mf.createClientLogger(e)}function Pf(e){return e.toLowerCase()}function*Ff(e){for(let t of e.values())yield[t.name,t.value]}var If=class{_headersMap;constructor(e){if(this._headersMap=new Map,e)for(let t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(Pf(e),{name:e,value:String(t).trim()})}get(e){return this._headersMap.get(Pf(e))?.value}has(e){return this._headersMap.has(Pf(e))}delete(e){this._headersMap.delete(Pf(e))}toJSON(e={}){let t={};if(e.preserveCase)for(let e of this._headersMap.values())t[e.name]=e.value;else for(let[e,n]of this._headersMap)t[e]=n.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return Ff(this._headersMap)}};function Lf(e){return new If(e)}function Rf(){return crypto.randomUUID()}var zf=class{url;method;headers;timeout;withCredentials;body;multipartBody;formData;streamResponseStatusCodes;enableBrowserStreams;proxySettings;disableKeepAlive;abortSignal;requestId;allowInsecureConnection;onUploadProgress;onDownloadProgress;requestOverrides;authSchemes;constructor(e){this.url=e.url,this.body=e.body,this.headers=e.headers??Lf(),this.method=e.method??`GET`,this.timeout=e.timeout??0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=e.disableKeepAlive??!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=e.withCredentials??!1,this.abortSignal=e.abortSignal,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||Rf(),this.allowInsecureConnection=e.allowInsecureConnection??!1,this.enableBrowserStreams=e.enableBrowserStreams??!1,this.requestOverrides=e.requestOverrides,this.authSchemes=e.authSchemes}};function Bf(e){return new zf(e)}const Vf=new Set([`Deserialize`,`Serialize`,`Retry`,`Sign`]);var Hf=class e{_policies=[];_orderedPolicies;constructor(e){this._policies=e?.slice(0)??[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw Error(`Policies inside a phase cannot specify afterPhase.`);if(t.phase&&!Vf.has(t.phase))throw Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!Vf.has(t.afterPhase))throw Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){let t=[];return this._policies=this._policies.filter(n=>e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase?(t.push(n.policy),!1):!0),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight((e,t)=>n=>t.sendRequest(n,e),t=>e.sendRequest(t))(t)}getOrderedPolicies(){return this._orderedPolicies||=this.orderPolicies(),this._orderedPolicies}clone(){return new e(this._policies)}static create(){return new e}orderPolicies(){let e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}let r=n(`Serialize`),i=n(`None`),a=n(`Deserialize`),o=n(`Retry`),s=n(`Sign`),c=[r,i,a,o,s];function l(e){return e===`Retry`?o:e===`Serialize`?r:e===`Deserialize`?a:e===`Sign`?s:i}for(let e of this._policies){let n=e.policy,r=e.options,i=n.name;if(t.has(i))throw Error(`Duplicate policy names not allowed in pipeline`);let a={policy:n,dependsOn:new Set,dependants:new Set};r.afterPhase&&(a.afterPhase=l(r.afterPhase),a.afterPhase.hasAfterPolicies=!0),t.set(i,a),l(r.phase).policies.add(a)}for(let e of this._policies){let{policy:n,options:r}=e,i=n.name,a=t.get(i);if(!a)throw Error(`Missing node for policy ${i}`);if(r.afterPolicies)for(let e of r.afterPolicies){let n=t.get(e);n&&(a.dependsOn.add(n),n.dependants.add(a))}if(r.beforePolicies)for(let e of r.beforePolicies){let n=t.get(e);n&&(n.dependsOn.add(a),a.dependants.add(n))}}function u(n){n.hasRun=!0;for(let r of n.policies)if(!(r.afterPhase&&(!r.afterPhase.hasRun||r.afterPhase.policies.size))&&r.dependsOn.size===0){e.push(r.policy);for(let e of r.dependants)e.dependsOn.delete(r);t.delete(r.policy.name),n.policies.delete(r)}}function d(){for(let e of c){if(u(e),e.policies.size>0&&e!==i){i.hasRun||u(i);return}e.hasAfterPolicies&&u(i)}}let f=0;for(;t.size>0;){f++;let t=e.length;if(d(),e.length<=t&&f>1)throw Error(`Cannot satisfy policy dependencies due to requirements cycle.`)}return e}};function Uf(){return Hf.create()}function Wf(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function Gf(e){if(Wf(e)){let t=typeof e.name==`string`,n=typeof e.message==`string`;return t&&n}return!1}const Kf=Me.custom,qf=`REDACTED`,Jf=`x-ms-client-request-id.x-ms-return-client-request-id.x-ms-useragent.x-ms-correlation-request-id.x-ms-request-id.client-request-id.ms-cv.return-client-request-id.traceparent.Access-Control-Allow-Credentials.Access-Control-Allow-Headers.Access-Control-Allow-Methods.Access-Control-Allow-Origin.Access-Control-Expose-Headers.Access-Control-Max-Age.Access-Control-Request-Headers.Access-Control-Request-Method.Origin.Accept.Accept-Encoding.Cache-Control.Connection.Content-Length.Content-Type.Date.ETag.Expires.If-Match.If-Modified-Since.If-None-Match.If-Unmodified-Since.Last-Modified.Pragma.Request-Id.Retry-After.Server.Transfer-Encoding.User-Agent.WWW-Authenticate`.split(`.`),Yf=[`api-version`];var Xf=class{allowedHeaderNames;allowedQueryParameters;constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=Jf.concat(e),t=Yf.concat(t),this.allowedHeaderNames=new Set(e.map(e=>e.toLowerCase())),this.allowedQueryParameters=new Set(t.map(e=>e.toLowerCase()))}sanitize(e){let t=new Set;return JSON.stringify(e,(e,n)=>{if(n instanceof Error)return{...n,name:n.name,message:n.message};if(e===`headers`)return this.sanitizeHeaders(n);if(e===`url`)return this.sanitizeUrl(n);if(e===`query`)return this.sanitizeQuery(n);if(e!==`body`&&e!==`response`&&e!==`operationSpec`){if(Array.isArray(n)||Wf(n)){if(t.has(n))return`[Circular]`;t.add(n)}return n}},2)}sanitizeUrl(e){if(typeof e!=`string`||e===null||e===``)return e;let t=new URL(e);if(!t.search)return e;for(let[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,qf);return t.toString()}sanitizeHeaders(e){let t={};for(let n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=qf;return t}sanitizeQuery(e){if(typeof e!=`object`||!e)return e;let t={};for(let n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?t[n]=e[n]:t[n]=qf;return t}};const Zf=new Xf;var Qf=class e extends Error{static REQUEST_SEND_ERROR=`REQUEST_SEND_ERROR`;static PARSE_ERROR=`PARSE_ERROR`;code;statusCode;request;response;details;constructor(t,n={}){super(t),this.name=`RestError`,this.code=n.code,this.statusCode=n.statusCode,Object.defineProperty(this,`request`,{value:n.request,enumerable:!1}),Object.defineProperty(this,`response`,{value:n.response,enumerable:!1});let r=this.request?.agent?{maxFreeSockets:this.request.agent.maxFreeSockets,maxSockets:this.request.agent.maxSockets}:void 0;Object.defineProperty(this,Kf,{value:()=>`RestError: ${this.message} \n ${Zf.sanitize({...this,request:{...this.request,agent:r},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,e.prototype)}};function $f(e){return e instanceof Qf?!0:Gf(e)&&e.name===`RestError`}function ep(e,t){return Buffer.from(e,t)}const tp=Nf(`ts-http-runtime`),np={};function rp(e){return e&&typeof e.pipe==`function`}function ip(e){return e.readable===!1?Promise.resolve():new Promise(t=>{let n=()=>{t(),e.removeListener(`close`,n),e.removeListener(`end`,n),e.removeListener(`error`,n)};e.on(`close`,n),e.on(`end`,n),e.on(`error`,n)})}function ap(e){return e&&typeof e.byteLength==`number`}var op=class extends ke{loadedBytes=0;progressCallback;_transform(e,t,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(e){n(e)}}constructor(e){super(),this.progressCallback=e}},sp=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let t=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new ff(`The operation was aborted. Request has already been canceled.`);n=e=>{e.type===`abort`&&t.abort()},e.abortSignal.addEventListener(`abort`,n)}let r;e.timeout>0&&(r=setTimeout(()=>{let n=new Xf;tp.info(`request to '${n.sanitizeUrl(e.url)}' timed out. canceling...`),t.abort()},e.timeout));let i=e.headers.get(`Accept-Encoding`),a=i?.includes(`gzip`)||i?.includes(`deflate`),o=typeof e.body==`function`?e.body():e.body;if(o&&!e.headers.has(`Content-Length`)){let t=dp(o);t!==null&&e.headers.set(`Content-Length`,t)}let s;try{if(o&&e.onUploadProgress){let t=e.onUploadProgress,n=new op(t);n.on(`error`,e=>{tp.error(`Error in upload progress`,e)}),rp(o)?o.pipe(n):n.end(o),o=n}let n=await this.makeRequest(e,t,o);r!==void 0&&clearTimeout(r);let i=cp(n),c={status:n.statusCode??0,headers:i,request:e};if(e.method===`HEAD`)return n.resume(),c;s=a?lp(n,i):n;let l=e.onDownloadProgress;if(l){let e=new op(l);e.on(`error`,e=>{tp.error(`Error in download progress`,e)}),s.pipe(e),s=e}return e.streamResponseStatusCodes?.has(1/0)||e.streamResponseStatusCodes?.has(c.status)?c.readableStreamBody=s:c.bodyAsText=await up(s),c}finally{if(e.abortSignal&&n){let t=Promise.resolve();rp(o)&&(t=ip(o));let r=Promise.resolve();rp(s)&&(r=ip(s)),Promise.all([t,r]).then(()=>{n&&e.abortSignal?.removeEventListener(`abort`,n)}).catch(e=>{tp.warning(`Error when cleaning up abortListener on httpRequest`,e)})}}}makeRequest(e,t,n){let r=new URL(e.url),i=r.protocol!==`https:`;if(i&&!e.allowInsecureConnection)throw Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let a={agent:e.agent??this.getOrCreateAgent(e,i),hostname:r.hostname,path:`${r.pathname}${r.search}`,port:r.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((r,o)=>{let s=i?Oe.request(a,r):Ze.request(a,r);s.once(`error`,t=>{o(new Qf(t.message,{code:t.code??Qf.REQUEST_SEND_ERROR,request:e}))}),t.signal.addEventListener(`abort`,()=>{let e=new ff(`The operation was aborted. Rejecting from abort signal callback while making request.`);s.destroy(e),o(e)}),n&&rp(n)?n.pipe(s):n?typeof n==`string`||Buffer.isBuffer(n)?s.end(n):ap(n)?s.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(tp.error(`Unrecognized body type`,n),o(new Qf(`Unrecognized body type`))):s.end()})}getOrCreateAgent(e,t){let n=e.disableKeepAlive;if(t)return n?Oe.globalAgent:(this.cachedHttpAgent||=new Oe.Agent({keepAlive:!0}),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return Ze.globalAgent;let t=e.tlsSettings??np,r=this.cachedHttpsAgents.get(t);return r&&r.options.keepAlive===!n?r:(tp.info(`No cached TLS Agent exist, creating a new Agent`),r=new Ze.Agent({keepAlive:!n,...t}),this.cachedHttpsAgents.set(t,r),r)}}};function cp(e){let t=Lf();for(let n of Object.keys(e.headers)){let r=e.headers[n];Array.isArray(r)?r.length>0&&t.set(n,r[0]):r&&t.set(n,r)}return t}function lp(e,t){let n=t.get(`Content-Encoding`);if(n===`gzip`){let t=Ne.createGunzip();return e.pipe(t),t}else if(n===`deflate`){let t=Ne.createInflate();return e.pipe(t),t}return e}function up(e){return new Promise((t,n)=>{let r=[];e.on(`data`,e=>{Buffer.isBuffer(e)?r.push(e):r.push(Buffer.from(e))}),e.on(`end`,()=>{t(Buffer.concat(r).toString(`utf8`))}),e.on(`error`,e=>{e&&e?.name===`AbortError`?n(e):n(new Qf(`Error reading response as text: ${e.message}`,{code:Qf.PARSE_ERROR}))})})}function dp(e){return e?Buffer.isBuffer(e)?e.length:rp(e)?null:ap(e)?e.byteLength:typeof e==`string`?Buffer.from(e).length:null:0}function fp(){return new sp}function pp(){return fp()}function mp(e={}){let t=e.logger??tp.info,n=new Xf({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:`logPolicy`,async sendRequest(e,r){if(!t.enabled)return r(e);t(`Request: ${n.sanitize(e)}`);let i=await r(e);return t(`Response status code: ${i.status}`),t(`Headers: ${n.sanitize(i.headers)}`),i}}}const hp=[`GET`,`HEAD`];function gp(e={}){let{maxRetries:t=20,allowCrossOriginRedirects:n=!1}=e;return{name:`redirectPolicy`,async sendRequest(e,r){return _p(r,await r(e),t,n)}}}async function _p(e,t,n,r,i=0){let{request:a,status:o,headers:s}=t,c=s.get(`location`);if(c&&(o===300||o===301&&hp.includes(a.method)||o===302&&hp.includes(a.method)||o===303&&a.method===`POST`||o===307)&&i{let a,o,s=()=>i(new ff(n?.abortErrorMsg?n?.abortErrorMsg:`The operation was aborted.`)),c=()=>{n?.abortSignal&&o&&n.abortSignal.removeEventListener(`abort`,o)};if(o=()=>(a&&clearTimeout(a),c(),s()),n?.abortSignal&&n.abortSignal.aborted)return s();a=setTimeout(()=>{c(),r(t)},e),n?.abortSignal&&n.abortSignal.addEventListener(`abort`,o)})}function Sp(e,t){let n=e.headers.get(t);if(!n)return;let r=Number(n);if(!Number.isNaN(r))return r}const Cp=`Retry-After`,wp=[`retry-after-ms`,`x-ms-retry-after-ms`,Cp];function Tp(e){if(e&&[429,503].includes(e.status))try{for(let t of wp){let n=Sp(e,t);if(n===0||n)return n*(t===Cp?1e3:1)}let t=e.headers.get(Cp);if(!t)return;let n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch{return}}function Ep(e){return Number.isFinite(Tp(e))}function Dp(){return{name:`throttlingRetryStrategy`,retry({response:e}){let t=Tp(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}}}function Op(e={}){let t=e.retryDelayInMs??1e3,n=e.maxRetryDelayInMs??64e3;return{name:`exponentialRetryStrategy`,retry({retryCount:r,response:i,responseError:a}){let o=Ap(a),s=o&&e.ignoreSystemErrors,c=kp(i),l=c&&e.ignoreHttpStatusCodes;return i&&(Ep(i)||!c)||l||s?{skipStrategy:!0}:a&&!o&&!c?{errorToThrow:a}:bp(r,{retryDelayInMs:t,maxRetryDelayInMs:n})}}}function kp(e){return!!(e&&e.status!==void 0&&(e.status>=500||e.status===408)&&e.status!==501&&e.status!==505)}function Ap(e){return e?e.code===`ETIMEDOUT`||e.code===`ESOCKETTIMEDOUT`||e.code===`ECONNREFUSED`||e.code===`ECONNRESET`||e.code===`ENOENT`||e.code===`ENOTFOUND`:!1}const jp=Nf(`ts-http-runtime retryPolicy`);function Mp(e,t={maxRetries:3}){let n=t.logger||jp;return{name:`retryPolicy`,async sendRequest(r,i){let a,o,s=-1;retryRequest:for(;;){s+=1,a=void 0,o=void 0;try{n.info(`Retry ${s}: Attempting to send request`,r.requestId),a=await i(r),n.info(`Retry ${s}: Received a response from request`,r.requestId)}catch(e){if(n.error(`Retry ${s}: Received an error from request`,r.requestId),o=e,!e||o.name!==`RestError`)throw e;a=o.response}if(r.abortSignal?.aborted)throw n.error(`Retry ${s}: Request aborted.`),new ff;if(s>=(t.maxRetries??3)){if(n.info(`Retry ${s}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),o)throw o;if(a)return a;throw Error(`Maximum retries reached with no response or error to throw`)}n.info(`Retry ${s}: Processing ${e.length} retry strategies.`);strategiesLoop:for(let t of e){let e=t.logger||n;e.info(`Retry ${s}: Processing retry strategy ${t.name}.`);let i=t.retry({retryCount:s,response:a,responseError:o});if(i.skipStrategy){e.info(`Retry ${s}: Skipped.`);continue strategiesLoop}let{errorToThrow:c,retryAfterInMs:l,redirectTo:u}=i;if(c)throw e.error(`Retry ${s}: Retry strategy ${t.name} throws error:`,c),c;if(l||l===0){e.info(`Retry ${s}: Retry strategy ${t.name} retries after ${l}`),await xp(l,void 0,{abortSignal:r.abortSignal});continue retryRequest}if(u){e.info(`Retry ${s}: Retry strategy ${t.name} redirects to ${u}`),r.url=u;continue retryRequest}}if(o)throw n.info(`None of the retry strategies could work with the received error. Throwing it.`),o;if(a)return n.info(`None of the retry strategies could work with the received response. Returning it.`),a}}}}function Np(e={}){return{name:`defaultRetryPolicy`,sendRequest:Mp([Dp(),Op(e)],{maxRetries:e.maxRetries??3}).sendRequest}}typeof window<`u`&&window.document,typeof self==`object`&&typeof self?.importScripts==`function`&&(self.constructor?.name===`DedicatedWorkerGlobalScope`||self.constructor?.name===`ServiceWorkerGlobalScope`||self.constructor?.name),typeof Deno<`u`&&Deno.version!==void 0&&Deno.version.deno,typeof Bun<`u`&&Bun.version;const Pp=globalThis.process!==void 0&&!!globalThis.process.version&&!!globalThis.process.versions?.node;typeof navigator<`u`&&navigator?.product;function Fp(e){let t={};for(let[n,r]of e.entries())t[n]??=[],t[n].push(r);return t}function Ip(){return{name:`formDataPolicy`,async sendRequest(e,t){if(Pp&&typeof FormData<`u`&&e.body instanceof FormData&&(e.formData=Fp(e.body),e.body=void 0),e.formData){let t=e.headers.get(`Content-Type`);t&&t.indexOf(`application/x-www-form-urlencoded`)!==-1?e.body=Lp(e.formData):await Rp(e.formData,e),e.formData=void 0}return t(e)}}}function Lp(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(n,e.toString());else t.append(n,r.toString());return t.toString()}async function Rp(e,t){let n=t.headers.get(`Content-Type`);if(n&&!n.startsWith(`multipart/form-data`))return;t.headers.set(`Content-Type`,n??`multipart/form-data`);let r=[];for(let[t,n]of Object.entries(e))for(let e of Array.isArray(n)?n:[n])if(typeof e==`string`)r.push({headers:Lf({"Content-Disposition":`form-data; name="${t}"`}),body:ep(e,`utf-8`)});else if(typeof e!=`object`||!e)throw Error(`Unexpected value for key ${t}: ${e}. Value should be serialized to string first.`);else{let n=e.name||`blob`,i=Lf();i.set(`Content-Disposition`,`form-data; name="${t}"; filename="${n}"`),i.set(`Content-Type`,e.type||`application/octet-stream`),r.push({headers:i,body:e})}t.multipartBody={parts:r}}var zp=i(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}})),Bp=i(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=o,n.enable=i,n.enabled=s,n.humanize=zp(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),Vp=i(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=Bp()(e);let{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}})),Hp=i(((e,t)=>{t.exports=(e,t)=>{t||=process.argv;let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1?!0:r{let r=t(`os`),i=Hp(),a=process.env,o;i(`no-color`)||i(`no-colors`)||i(`color=false`)?o=!1:(i(`color`)||i(`colors`)||i(`color=true`)||i(`color=always`))&&(o=!0),`FORCE_COLOR`in a&&(o=a.FORCE_COLOR.length===0||parseInt(a.FORCE_COLOR,10)!==0);function s(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function c(e){if(o===!1)return 0;if(i(`color=16m`)||i(`color=full`)||i(`color=truecolor`))return 3;if(i(`color=256`))return 2;if(e&&!e.isTTY&&o!==!0)return 0;let t=+!!o;if(process.platform===`win32`){let e=r.release().split(`.`);return Number(process.versions.node.split(`.`)[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in a)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`].some(e=>e in a)||a.CI_NAME===`codeship`?1:t;if(`TEAMCITY_VERSION`in a)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION);if(a.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in a){let e=parseInt((a.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(a.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||`COLORTERM`in a?1:(a.TERM,t)}function l(e){return s(c(e))}n.exports={supportsColor:l,stdout:l(process.stdout),stderr:l(process.stderr)}})),Wp=i(((e,n)=>{let r=t(`tty`),i=t(`util`);e.init=d,e.log=c,e.formatArgs=o,e.save=l,e.load=u,e.useColors=a,e.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let t=Up();t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function a(){return`colors`in e.inspectOpts?!!e.inspectOpts.colors:r.isatty(process.stderr.fd)}function o(e){let{namespace:t,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${t} \u001B[0m`;e[0]=a+e[0].split(` `).join(` `+a),e.push(i+`m+`+n.exports.humanize(this.diff)+`\x1B[0m`)}else e[0]=s()+t+` `+e[0]}function s(){return e.inspectOpts.hideDate?``:new Date().toISOString()+` `}function c(...t){return process.stderr.write(i.formatWithOptions(e.inspectOpts,...t)+` -`)}function l(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function u(){return process.env.DEBUG}function d(t){t.inspectOpts={};let n=Object.keys(e.inspectOpts);for(let r=0;re.trim()).join(` `)},f.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}})),yu=i(((e,t)=>{typeof process>`u`||process.type===`renderer`||process.browser===!0||process.__nwjs?t.exports=hu():t.exports=vu()})),bu=i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t};Object.defineProperty(e,`__esModule`,{value:!0}),e.req=e.json=e.toBuffer=void 0;let a=i(t(`http`)),o=i(t(`https`));async function s(e){let t=0,n=[];for await(let r of e)t+=r.length,n.push(r);return Buffer.concat(n,t)}e.toBuffer=s;async function c(e){let t=(await s(e)).toString(`utf8`);try{return JSON.parse(t)}catch(e){let n=e;throw n.message+=` (input: ${t})`,n}}e.json=c;function l(e,t={}){let n=((typeof e==`string`?e:e.href).startsWith(`https:`)?o:a).request(e,t),r=new Promise((e,t)=>{n.once(`response`,e).once(`error`,t).end()});return n.then=r.then.bind(r),n}e.req=l})),xu=i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t},a=e&&e.__exportStar||function(e,t){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(t,r)&&n(t,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.Agent=void 0;let o=i(t(`net`)),s=i(t(`http`)),c=t(`https`);a(bu(),e);let l=Symbol(`AgentBaseInternalState`);e.Agent=class extends s.Agent{constructor(e){super(e),this[l]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==`boolean`)return e.secureEndpoint;if(typeof e.protocol==`string`)return e.protocol===`https:`}let{stack:t}=Error();return typeof t==`string`?t.split(` -`).some(e=>e.indexOf(`(https.js:`)!==-1||e.indexOf(`node:https:`)!==-1):!1}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new o.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let n=this.sockets[e],r=n.indexOf(t);r!==-1&&(n.splice(r,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?c.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,n){let r={...t,secureEndpoint:this.isSecureEndpoint(t)},i=this.getName(r),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,r)).then(o=>{if(this.decrementSockets(i,a),o instanceof s.Agent)try{return o.addRequest(e,r)}catch(e){return n(e)}this[l].currentSocket=o,super.createSocket(e,t,n)},e=>{this.decrementSockets(i,a),n(e)})}createConnection(){let e=this[l].currentSocket;if(this[l].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[l].defaultPort??(this.protocol===`https:`?443:80)}set defaultPort(e){this[l]&&(this[l].defaultPort=e)}get protocol(){return this[l].protocol??(this.isSecureEndpoint()?`https:`:`http:`)}set protocol(e){this[l]&&(this[l].protocol=e)}}})),Su=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.parseProxyResponse=void 0;let n=(0,t(yu()).default)(`https-proxy-agent:parse-proxy-response`);function r(e){return new Promise((t,r)=>{let i=0,a=[];function o(){let t=e.read();t?u(t):e.once(`readable`,o)}function s(){e.removeListener(`end`,c),e.removeListener(`error`,l),e.removeListener(`readable`,o)}function c(){s(),n(`onend`),r(Error(`Proxy connection ended before receiving CONNECT response`))}function l(e){s(),n(`onerror %o`,e),r(e)}function u(c){a.push(c),i+=c.length;let l=Buffer.concat(a,i),u=l.indexOf(`\r +`)}function l(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function u(){return process.env.DEBUG}function d(t){t.inspectOpts={};let n=Object.keys(e.inspectOpts);for(let r=0;re.trim()).join(` `)},f.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}})),Gp=i(((e,t)=>{typeof process>`u`||process.type===`renderer`||process.browser===!0||process.__nwjs?t.exports=Vp():t.exports=Wp()})),Kp=i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t};Object.defineProperty(e,`__esModule`,{value:!0}),e.req=e.json=e.toBuffer=void 0;let a=i(t(`http`)),o=i(t(`https`));async function s(e){let t=0,n=[];for await(let r of e)t+=r.length,n.push(r);return Buffer.concat(n,t)}e.toBuffer=s;async function c(e){let t=(await s(e)).toString(`utf8`);try{return JSON.parse(t)}catch(e){let n=e;throw n.message+=` (input: ${t})`,n}}e.json=c;function l(e,t={}){let n=((typeof e==`string`?e:e.href).startsWith(`https:`)?o:a).request(e,t),r=new Promise((e,t)=>{n.once(`response`,e).once(`error`,t).end()});return n.then=r.then.bind(r),n}e.req=l})),qp=i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t},a=e&&e.__exportStar||function(e,t){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(t,r)&&n(t,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.Agent=void 0;let o=i(t(`net`)),s=i(t(`http`)),c=t(`https`);a(Kp(),e);let l=Symbol(`AgentBaseInternalState`);e.Agent=class extends s.Agent{constructor(e){super(e),this[l]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==`boolean`)return e.secureEndpoint;if(typeof e.protocol==`string`)return e.protocol===`https:`}let{stack:t}=Error();return typeof t==`string`?t.split(` +`).some(e=>e.indexOf(`(https.js:`)!==-1||e.indexOf(`node:https:`)!==-1):!1}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new o.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let n=this.sockets[e],r=n.indexOf(t);r!==-1&&(n.splice(r,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?c.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,n){let r={...t,secureEndpoint:this.isSecureEndpoint(t)},i=this.getName(r),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,r)).then(o=>{if(this.decrementSockets(i,a),o instanceof s.Agent)try{return o.addRequest(e,r)}catch(e){return n(e)}this[l].currentSocket=o,super.createSocket(e,t,n)},e=>{this.decrementSockets(i,a),n(e)})}createConnection(){let e=this[l].currentSocket;if(this[l].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[l].defaultPort??(this.protocol===`https:`?443:80)}set defaultPort(e){this[l]&&(this[l].defaultPort=e)}get protocol(){return this[l].protocol??(this.isSecureEndpoint()?`https:`:`http:`)}set protocol(e){this[l]&&(this[l].protocol=e)}}})),Jp=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.parseProxyResponse=void 0;let n=(0,t(Gp()).default)(`https-proxy-agent:parse-proxy-response`);function r(e){return new Promise((t,r)=>{let i=0,a=[];function o(){let t=e.read();t?u(t):e.once(`readable`,o)}function s(){e.removeListener(`end`,c),e.removeListener(`error`,l),e.removeListener(`readable`,o)}function c(){s(),n(`onend`),r(Error(`Proxy connection ended before receiving CONNECT response`))}function l(e){s(),n(`onerror %o`,e),r(e)}function u(c){a.push(c),i+=c.length;let l=Buffer.concat(a,i),u=l.indexOf(`\r \r `);if(u===-1){n(`have not received end of HTTP headers yet...`),o();return}let d=l.slice(0,u).toString(`ascii`).split(`\r -`),f=d.shift();if(!f)return e.destroy(),r(Error(`No header received from proxy CONNECT response`));let p=f.split(` `),m=+p[1],h=p.slice(2).join(` `),g={};for(let t of d){if(!t)continue;let n=t.indexOf(`:`);if(n===-1)return e.destroy(),r(Error(`Invalid header from proxy CONNECT response: "${t}"`));let i=t.slice(0,n).toLowerCase(),a=t.slice(n+1).trimStart(),o=g[i];typeof o==`string`?g[i]=[o,a]:Array.isArray(o)?o.push(a):g[i]=a}n(`got proxy server response: %o %o`,f,g),s(),t({connect:{statusCode:m,statusText:h,headers:g},buffered:l})}e.on(`error`,l),e.on(`end`,c),o()})}e.parseProxyResponse=r})),Cu=i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.HttpsProxyAgent=void 0;let o=i(t(`net`)),s=i(t(`tls`)),c=a(t(`assert`)),l=a(yu()),u=xu(),d=t(`url`),f=Su(),p=(0,l.default)(`https-proxy-agent`),m=e=>e.servername===void 0&&e.host&&!o.isIP(e.host)?{...e,servername:e.host}:e;var h=class extends u.Agent{constructor(e,t){super(t),this.options={path:void 0},this.proxy=typeof e==`string`?new d.URL(e):e,this.proxyHeaders=t?.headers??{},p(`Creating new HttpsProxyAgent instance: %o`,this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,``),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol===`https:`?443:80;this.connectOpts={ALPNProtocols:[`http/1.1`],...t?v(t,`headers`):null,host:n,port:r}}async connect(e,t){let{proxy:n}=this;if(!t.host)throw TypeError(`No "host" provided`);let r;n.protocol===`https:`?(p("Creating `tls.Socket`: %o",this.connectOpts),r=s.connect(m(this.connectOpts))):(p("Creating `net.Socket`: %o",this.connectOpts),r=o.connect(this.connectOpts));let i=typeof this.proxyHeaders==`function`?this.proxyHeaders():{...this.proxyHeaders},a=o.isIPv6(t.host)?`[${t.host}]`:t.host,l=`CONNECT ${a}:${t.port} HTTP/1.1\r\n`;if(n.username||n.password){let e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i[`Proxy-Authorization`]=`Basic ${Buffer.from(e).toString(`base64`)}`}i.Host=`${a}:${t.port}`,i[`Proxy-Connection`]||=this.keepAlive?`Keep-Alive`:`close`;for(let e of Object.keys(i))l+=`${e}: ${i[e]}\r\n`;let u=(0,f.parseProxyResponse)(r);r.write(`${l}\r\n`);let{connect:d,buffered:h}=await u;if(e.emit(`proxyConnect`,d),this.emit(`proxyConnect`,d,e),d.statusCode===200)return e.once(`socket`,g),t.secureEndpoint?(p(`Upgrading socket connection to TLS`),s.connect({...v(m(t),`host`,`path`,`port`),socket:r})):r;r.destroy();let y=new o.Socket({writable:!1});return y.readable=!0,e.once(`socket`,e=>{p(`Replaying proxy buffer for failed request`),(0,c.default)(e.listenerCount(`data`)>0),e.push(h),e.push(null)}),y}};h.protocols=[`http`,`https`],e.HttpsProxyAgent=h;function g(e){e.resume()}function v(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}})),wu=i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.HttpProxyAgent=void 0;let o=i(t(`net`)),s=i(t(`tls`)),c=a(yu()),l=t(`events`),u=xu(),d=t(`url`),f=(0,c.default)(`http-proxy-agent`);var p=class extends u.Agent{constructor(e,t){super(t),this.proxy=typeof e==`string`?new d.URL(e):e,this.proxyHeaders=t?.headers??{},f(`Creating new HttpProxyAgent instance: %o`,this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,``),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol===`https:`?443:80;this.connectOpts={...t?m(t,`headers`):null,host:n,port:r}}addRequest(e,t){e._header=null,this.setRequestProps(e,t),super.addRequest(e,t)}setRequestProps(e,t){let{proxy:n}=this,r=`${t.secureEndpoint?`https:`:`http:`}//${e.getHeader(`host`)||`localhost`}`,i=new d.URL(e.path,r);t.port!==80&&(i.port=String(t.port)),e.path=String(i);let a=typeof this.proxyHeaders==`function`?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;a[`Proxy-Authorization`]=`Basic ${Buffer.from(e).toString(`base64`)}`}a[`Proxy-Connection`]||=this.keepAlive?`Keep-Alive`:`close`;for(let t of Object.keys(a)){let n=a[t];n&&e.setHeader(t,n)}}async connect(e,t){e._header=null,e.path.includes(`://`)||this.setRequestProps(e,t);let n,r;f(`Regenerating stored HTTP header string for request`),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(f(`Patching connection write() output buffer with updated header`),n=e.outputData[0].data,r=n.indexOf(`\r +`),f=d.shift();if(!f)return e.destroy(),r(Error(`No header received from proxy CONNECT response`));let p=f.split(` `),m=+p[1],h=p.slice(2).join(` `),g={};for(let t of d){if(!t)continue;let n=t.indexOf(`:`);if(n===-1)return e.destroy(),r(Error(`Invalid header from proxy CONNECT response: "${t}"`));let i=t.slice(0,n).toLowerCase(),a=t.slice(n+1).trimStart(),o=g[i];typeof o==`string`?g[i]=[o,a]:Array.isArray(o)?o.push(a):g[i]=a}n(`got proxy server response: %o %o`,f,g),s(),t({connect:{statusCode:m,statusText:h,headers:g},buffered:l})}e.on(`error`,l),e.on(`end`,c),o()})}e.parseProxyResponse=r})),Yp=i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.HttpsProxyAgent=void 0;let o=i(t(`net`)),s=i(t(`tls`)),c=a(t(`assert`)),l=a(Gp()),u=qp(),d=t(`url`),f=Jp(),p=(0,l.default)(`https-proxy-agent`),m=e=>e.servername===void 0&&e.host&&!o.isIP(e.host)?{...e,servername:e.host}:e;var h=class extends u.Agent{constructor(e,t){super(t),this.options={path:void 0},this.proxy=typeof e==`string`?new d.URL(e):e,this.proxyHeaders=t?.headers??{},p(`Creating new HttpsProxyAgent instance: %o`,this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,``),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol===`https:`?443:80;this.connectOpts={ALPNProtocols:[`http/1.1`],...t?v(t,`headers`):null,host:n,port:r}}async connect(e,t){let{proxy:n}=this;if(!t.host)throw TypeError(`No "host" provided`);let r;n.protocol===`https:`?(p("Creating `tls.Socket`: %o",this.connectOpts),r=s.connect(m(this.connectOpts))):(p("Creating `net.Socket`: %o",this.connectOpts),r=o.connect(this.connectOpts));let i=typeof this.proxyHeaders==`function`?this.proxyHeaders():{...this.proxyHeaders},a=o.isIPv6(t.host)?`[${t.host}]`:t.host,l=`CONNECT ${a}:${t.port} HTTP/1.1\r\n`;if(n.username||n.password){let e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i[`Proxy-Authorization`]=`Basic ${Buffer.from(e).toString(`base64`)}`}i.Host=`${a}:${t.port}`,i[`Proxy-Connection`]||=this.keepAlive?`Keep-Alive`:`close`;for(let e of Object.keys(i))l+=`${e}: ${i[e]}\r\n`;let u=(0,f.parseProxyResponse)(r);r.write(`${l}\r\n`);let{connect:d,buffered:h}=await u;if(e.emit(`proxyConnect`,d),this.emit(`proxyConnect`,d,e),d.statusCode===200)return e.once(`socket`,g),t.secureEndpoint?(p(`Upgrading socket connection to TLS`),s.connect({...v(m(t),`host`,`path`,`port`),socket:r})):r;r.destroy();let y=new o.Socket({writable:!1});return y.readable=!0,e.once(`socket`,e=>{p(`Replaying proxy buffer for failed request`),(0,c.default)(e.listenerCount(`data`)>0),e.push(h),e.push(null)}),y}};h.protocols=[`http`,`https`],e.HttpsProxyAgent=h;function g(e){e.resume()}function v(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}})),Xp=i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.HttpProxyAgent=void 0;let o=i(t(`net`)),s=i(t(`tls`)),c=a(Gp()),l=t(`events`),u=qp(),d=t(`url`),f=(0,c.default)(`http-proxy-agent`);var p=class extends u.Agent{constructor(e,t){super(t),this.proxy=typeof e==`string`?new d.URL(e):e,this.proxyHeaders=t?.headers??{},f(`Creating new HttpProxyAgent instance: %o`,this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,``),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol===`https:`?443:80;this.connectOpts={...t?m(t,`headers`):null,host:n,port:r}}addRequest(e,t){e._header=null,this.setRequestProps(e,t),super.addRequest(e,t)}setRequestProps(e,t){let{proxy:n}=this,r=`${t.secureEndpoint?`https:`:`http:`}//${e.getHeader(`host`)||`localhost`}`,i=new d.URL(e.path,r);t.port!==80&&(i.port=String(t.port)),e.path=String(i);let a=typeof this.proxyHeaders==`function`?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;a[`Proxy-Authorization`]=`Basic ${Buffer.from(e).toString(`base64`)}`}a[`Proxy-Connection`]||=this.keepAlive?`Keep-Alive`:`close`;for(let t of Object.keys(a)){let n=a[t];n&&e.setHeader(t,n)}}async connect(e,t){e._header=null,e.path.includes(`://`)||this.setRequestProps(e,t);let n,r;f(`Regenerating stored HTTP header string for request`),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(f(`Patching connection write() output buffer with updated header`),n=e.outputData[0].data,r=n.indexOf(`\r \r -`)+4,e.outputData[0].data=e._header+n.substring(r),f(`Output buffer: %o`,e.outputData[0].data));let i;return this.proxy.protocol===`https:`?(f("Creating `tls.Socket`: %o",this.connectOpts),i=s.connect(this.connectOpts)):(f("Creating `net.Socket`: %o",this.connectOpts),i=o.connect(this.connectOpts)),await(0,l.once)(i,`connect`),i}};p.protocols=[`http`,`https`],e.HttpProxyAgent=p;function m(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}})),Tu=Cu(),Eu=wu();const Du=[];let Ou=!1;const ku=new Map;function Au(e){if(process.env[e])return process.env[e];if(process.env[e.toLowerCase()])return process.env[e.toLowerCase()]}function ju(){if(!process)return;let e=Au(`HTTPS_PROXY`),t=Au(`ALL_PROXY`),n=Au(`HTTP_PROXY`);return e||t||n}function Mu(e,t,n){if(t.length===0)return!1;let r=new URL(e).hostname;if(n?.has(r))return n.get(r);let i=!1;for(let e of t)e[0]===`.`?(r.endsWith(e)||r.length===e.length-1&&r===e.slice(1))&&(i=!0):r===e&&(i=!0);return n?.set(r,i),i}function Nu(){let e=Au(`NO_PROXY`);return Ou=!0,e?e.split(`,`).map(e=>e.trim()).filter(e=>e.length):[]}function Pu(e){if(!e&&(e=ju(),!e))return;let t=new URL(e);return{host:(t.protocol?t.protocol+`//`:``)+t.hostname,port:Number.parseInt(t.port||`80`),username:t.username,password:t.password}}function Fu(){let e=ju();return e?new URL(e):void 0}function Iu(e){let t;try{t=new URL(e.host)}catch{throw Error(`Expecting a valid host string in proxy settings, but found "${e.host}".`)}return t.port=String(e.port),e.username&&(t.username=e.username),e.password&&(t.password=e.password),t}function Lu(e,t,n){if(e.agent)return;let r=new URL(e.url).protocol!==`https:`;e.tlsSettings&&kl.warning(`TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.`);let i=e.headers.toJSON();r?(t.httpProxyAgent||=new Eu.HttpProxyAgent(n,{headers:i}),e.agent=t.httpProxyAgent):(t.httpsProxyAgent||=new Tu.HttpsProxyAgent(n,{headers:i}),e.agent=t.httpsProxyAgent)}function Ru(e,t){Ou||Du.push(...Nu());let n=e?Iu(e):Fu(),r={};return{name:`proxyPolicy`,async sendRequest(e,i){return!e.proxySettings&&n&&!Mu(e.url,t?.customNoProxyList??Du,t?.customNoProxyList?void 0:ku)?Lu(e,r,n):e.proxySettings&&Lu(e,r,Iu(e.proxySettings)),i(e)}}}function zu(e){return{name:`agentPolicy`,sendRequest:async(t,n)=>(t.agent||=e,n(t))}}function Bu(e){return{name:`tlsPolicy`,sendRequest:async(t,n)=>(t.tlsSettings||=e,n(t))}}function Vu(e){return typeof e.stream==`function`}async function*Hu(){let e=this.getReader();try{for(;;){let{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}function Uu(e){e[Symbol.asyncIterator]||(e[Symbol.asyncIterator]=Hu.bind(e)),e.values||=Hu.bind(e)}function Wu(e){return e instanceof ReadableStream?(Uu(e),We.fromWeb(e)):e}function Gu(e){return e instanceof Uint8Array?We.from(Buffer.from(e)):Vu(e)?Wu(e.stream()):Wu(e)}async function Ku(e){return function(){let t=e.map(e=>typeof e==`function`?e():e).map(Gu);return We.from((async function*(){for(let e of t)for await(let t of e)yield t})())}}function qu(){return`----AzSDKFormBoundary${fl()}`}function Ju(e){let t=``;for(let[n,r]of e)t+=`${n}: ${r}\r\n`;return t}function Yu(e){if(e instanceof Uint8Array)return e.byteLength;if(Vu(e))return e.size===-1?void 0:e.size}function Xu(e){let t=0;for(let n of e){let e=Yu(n);if(e===void 0)return;t+=e}return t}async function Zu(e,t,n){let r=[Ol(`--${n}`,`utf-8`),...t.flatMap(e=>[Ol(`\r -`,`utf-8`),Ol(Ju(e.headers),`utf-8`),Ol(`\r -`,`utf-8`),e.body,Ol(`\r\n--${n}`,`utf-8`)]),Ol(`--\r +`)+4,e.outputData[0].data=e._header+n.substring(r),f(`Output buffer: %o`,e.outputData[0].data));let i;return this.proxy.protocol===`https:`?(f("Creating `tls.Socket`: %o",this.connectOpts),i=s.connect(this.connectOpts)):(f("Creating `net.Socket`: %o",this.connectOpts),i=o.connect(this.connectOpts)),await(0,l.once)(i,`connect`),i}};p.protocols=[`http`,`https`],e.HttpProxyAgent=p;function m(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}})),Zp=Yp(),Qp=Xp();const $p=[];let em=!1;const tm=new Map;function nm(e){if(process.env[e])return process.env[e];if(process.env[e.toLowerCase()])return process.env[e.toLowerCase()]}function rm(){if(!process)return;let e=nm(`HTTPS_PROXY`),t=nm(`ALL_PROXY`),n=nm(`HTTP_PROXY`);return e||t||n}function im(e,t,n){if(t.length===0)return!1;let r=new URL(e).hostname;if(n?.has(r))return n.get(r);let i=!1;for(let e of t)e[0]===`.`?(r.endsWith(e)||r.length===e.length-1&&r===e.slice(1))&&(i=!0):r===e&&(i=!0);return n?.set(r,i),i}function am(){let e=nm(`NO_PROXY`);return em=!0,e?e.split(`,`).map(e=>e.trim()).filter(e=>e.length):[]}function om(e){if(!e&&(e=rm(),!e))return;let t=new URL(e);return{host:(t.protocol?t.protocol+`//`:``)+t.hostname,port:Number.parseInt(t.port||`80`),username:t.username,password:t.password}}function sm(){let e=rm();return e?new URL(e):void 0}function cm(e){let t;try{t=new URL(e.host)}catch{throw Error(`Expecting a valid host string in proxy settings, but found "${e.host}".`)}return t.port=String(e.port),e.username&&(t.username=e.username),e.password&&(t.password=e.password),t}function lm(e,t,n){if(e.agent)return;let r=new URL(e.url).protocol!==`https:`;e.tlsSettings&&tp.warning(`TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.`);let i=e.headers.toJSON();r?(t.httpProxyAgent||=new Qp.HttpProxyAgent(n,{headers:i}),e.agent=t.httpProxyAgent):(t.httpsProxyAgent||=new Zp.HttpsProxyAgent(n,{headers:i}),e.agent=t.httpsProxyAgent)}function um(e,t){em||$p.push(...am());let n=e?cm(e):sm(),r={};return{name:`proxyPolicy`,async sendRequest(e,i){return!e.proxySettings&&n&&!im(e.url,t?.customNoProxyList??$p,t?.customNoProxyList?void 0:tm)?lm(e,r,n):e.proxySettings&&lm(e,r,cm(e.proxySettings)),i(e)}}}function dm(e){return{name:`agentPolicy`,sendRequest:async(t,n)=>(t.agent||=e,n(t))}}function fm(e){return{name:`tlsPolicy`,sendRequest:async(t,n)=>(t.tlsSettings||=e,n(t))}}function pm(e){return typeof e.stream==`function`}async function*mm(){let e=this.getReader();try{for(;;){let{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}function hm(e){e[Symbol.asyncIterator]||(e[Symbol.asyncIterator]=mm.bind(e)),e.values||=mm.bind(e)}function gm(e){return e instanceof ReadableStream?(hm(e),Xe.fromWeb(e)):e}function _m(e){return e instanceof Uint8Array?Xe.from(Buffer.from(e)):pm(e)?gm(e.stream()):gm(e)}async function vm(e){return function(){let t=e.map(e=>typeof e==`function`?e():e).map(_m);return Xe.from((async function*(){for(let e of t)for await(let t of e)yield t})())}}function ym(){return`----AzSDKFormBoundary${Rf()}`}function bm(e){let t=``;for(let[n,r]of e)t+=`${n}: ${r}\r\n`;return t}function xm(e){if(e instanceof Uint8Array)return e.byteLength;if(pm(e))return e.size===-1?void 0:e.size}function Sm(e){let t=0;for(let n of e){let e=xm(n);if(e===void 0)return;t+=e}return t}async function Cm(e,t,n){let r=[ep(`--${n}`,`utf-8`),...t.flatMap(e=>[ep(`\r +`,`utf-8`),ep(bm(e.headers),`utf-8`),ep(`\r +`,`utf-8`),e.body,ep(`\r\n--${n}`,`utf-8`)]),ep(`--\r \r -`,`utf-8`)],i=Xu(r);i&&e.headers.set(`Content-Length`,i),e.body=await Ku(r)}const Qu=`multipartPolicy`,$u=new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`);function ed(e){if(e.length>70)throw Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some(e=>!$u.has(e)))throw Error(`Multipart boundary "${e}" contains invalid characters`)}function td(){return{name:Qu,async sendRequest(e,t){if(!e.multipartBody)return t(e);if(e.body)throw Error(`multipartBody and regular body cannot be set at the same time`);let n=e.multipartBody.boundary,r=e.headers.get(`Content-Type`)??`multipart/mixed`,i=r.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw Error(`Got multipart request body, but content-type header was not multipart: ${r}`);let[,a,o]=i;if(o&&n&&o!==n)throw Error(`Multipart boundary was specified as ${o} in the header, but got ${n} in the request body`);return n??=o,n?ed(n):n=qu(),e.headers.set(`Content-Type`,`${a}; boundary=${n}`),await Zu(e,e.multipartBody.parts,n),e.multipartBody=void 0,t(e)}}}function nd(){return _l()}const rd=al({logLevelEnvVarName:`AZURE_LOG_LEVEL`,namespace:`azure`});rd.logger;function id(e){return rd.createClientLogger(e)}const ad=id(`core-rest-pipeline`);function od(e={}){return Hl({logger:ad.info,...e})}function sd(e={}){return Wl(e)}function cd(){return`User-Agent`}async function ld(e){if(se&&se.versions){let t=`${Ve.type()} ${Ve.release()}; ${Ve.arch()}`,n=se.versions;n.bun?e.set(`Bun`,`${n.bun} (${t})`):n.deno?e.set(`Deno`,`${n.deno} (${t})`):n.node&&e.set(`Node`,`${n.node} (${t})`)}}const ud=`1.22.3`;function dd(e){let t=[];for(let[n,r]of e){let e=r?`${n}/${r}`:n;t.push(e)}return t.join(` `)}function fd(){return cd()}async function pd(e){let t=new Map;t.set(`core-rest-pipeline`,ud),await ld(t);let n=dd(t);return e?`${e} ${n}`:n}const md=fd();function hd(e={}){let t=pd(e.userAgentPrefix);return{name:`userAgentPolicy`,async sendRequest(e,n){return e.headers.has(md)||e.headers.set(md,await t),n(e)}}}var gd=class extends Error{constructor(e){super(e),this.name=`AbortError`}};function _d(e,t){let{cleanupBeforeAbort:n,abortSignal:r,abortErrorMsg:i}=t??{};return new Promise((t,a)=>{function o(){a(new gd(i??`The operation was aborted.`))}function s(){r?.removeEventListener(`abort`,c)}function c(){n?.(),s(),o()}if(r?.aborted)return o();try{e(e=>{s(),t(e)},e=>{s(),a(e)})}catch(e){a(e)}r?.addEventListener(`abort`,c)})}function vd(e,t){let n,{abortSignal:r,abortErrorMsg:i}=t??{};return _d(t=>{n=setTimeout(t,e)},{cleanupBeforeAbort:()=>clearTimeout(n),abortSignal:r,abortErrorMsg:i??`The delay was aborted.`})}function yd(e){if(yl(e))return e.message;{let t;try{t=typeof e==`object`&&e?JSON.stringify(e):String(e)}catch{t=`[unable to stringify input]`}return`Unknown error ${t}`}}function bd(e){return yl(e)}function xd(){return fl()}const Sd=cu,Cd=Symbol(`rawContent`);function wd(e){return typeof e[Cd]==`function`}function Td(e){return wd(e)?e[Cd]():e}const Ed=Qu;function Dd(){let e=td();return{name:Ed,sendRequest:async(t,n)=>{if(t.multipartBody)for(let e of t.multipartBody.parts)wd(e.body)&&(e.body=Td(e.body));return e.sendRequest(t,n)}}}function Od(){return Kl()}function kd(e={}){return su(e)}function Ad(){return uu()}function jd(e){return Pu(e)}function Md(e,t){return Ru(e,t)}function Nd(e=`x-ms-client-request-id`){return{name:`setClientRequestIdPolicy`,async sendRequest(t,n){return t.headers.has(e)||t.headers.set(e,t.requestId),n(t)}}}function Pd(e){return zu(e)}function Fd(e){return Bu(e)}const Id={span:Symbol.for(`@azure/core-tracing span`),namespace:Symbol.for(`@azure/core-tracing namespace`)};function Ld(e={}){let t=new Rd(e.parentContext);return e.span&&(t=t.setValue(Id.span,e.span)),e.namespace&&(t=t.setValue(Id.namespace,e.namespace)),t}var Rd=class e{_contextMap;constructor(t){this._contextMap=t instanceof e?new Map(t._contextMap):new Map}setValue(t,n){let r=new e(this);return r._contextMap.set(t,n),r}getValue(e){return this._contextMap.get(e)}deleteValue(t){let n=new e(this);return n._contextMap.delete(t),n}};const zd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.state=void 0,e.state={instrumenterImplementation:void 0}}))().state;function Bd(){return{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}}}function Vd(){return{createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:Bd(),tracingContext:Ld({parentContext:t.tracingContext})}),withContext(e,t,...n){return t(...n)}}}function Hd(){return zd.instrumenterImplementation||=Vd(),zd.instrumenterImplementation}function Ud(e){let{namespace:t,packageName:n,packageVersion:r}=e;function i(e,i,a){let o=Hd().startSpan(e,{...a,packageName:n,packageVersion:r,tracingContext:i?.tracingOptions?.tracingContext}),s=o.tracingContext,c=o.span;return s.getValue(Id.namespace)||(s=s.setValue(Id.namespace,t)),c.setAttribute(`az.namespace`,s.getValue(Id.namespace)),{span:c,updatedOptions:Object.assign({},i,{tracingOptions:{...i?.tracingOptions,tracingContext:s}})}}async function a(e,t,n,r){let{span:a,updatedOptions:s}=i(e,t,r);try{let e=await o(s.tracingOptions.tracingContext,()=>Promise.resolve(n(s,a)));return a.setStatus({status:`success`}),e}catch(e){throw a.setStatus({status:`error`,error:e}),e}finally{a.end()}}function o(e,t,...n){return Hd().withContext(e,t,...n)}function s(e){return Hd().parseTraceparentHeader(e)}function c(e){return Hd().createRequestHeaders(e)}return{startSpan:i,withSpan:a,withContext:o,parseTraceparentHeader:s,createRequestHeaders:c}}const Wd=El;function Gd(e){return Dl(e)}function Kd(e={}){let t=pd(e.userAgentPrefix),n=new wl({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),r=qd();return{name:`tracingPolicy`,async sendRequest(e,i){if(!r)return i(e);let a=await t,o={"http.url":n.sanitizeUrl(e.url),"http.method":e.method,"http.user_agent":a,requestId:e.requestId};a&&(o[`http.user_agent`]=a);let{span:s,tracingContext:c}=Jd(r,e,o)??{};if(!s||!c)return i(e);try{let t=await r.withContext(c,i,e);return Xd(s,t),t}catch(e){throw Yd(s,e),e}}}}function qd(){try{return Ud({namespace:``,packageName:`@azure/core-rest-pipeline`,packageVersion:ud})}catch(e){ad.warning(`Error when creating the TracingClient: ${yd(e)}`);return}}function Jd(e,t,n){try{let{span:r,updatedOptions:i}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:`client`,spanAttributes:n});if(!r.isRecording()){r.end();return}let a=e.createRequestHeaders(i.tracingOptions.tracingContext);for(let[e,n]of Object.entries(a))t.headers.set(e,n);return{span:r,tracingContext:i.tracingOptions.tracingContext}}catch(e){ad.warning(`Skipping creating a tracing span due to an error: ${yd(e)}`);return}}function Yd(e,t){try{e.setStatus({status:`error`,error:bd(t)?t:void 0}),Gd(t)&&t.statusCode&&e.setAttribute(`http.status_code`,t.statusCode),e.end()}catch(e){ad.warning(`Skipping tracing span processing due to an error: ${yd(e)}`)}}function Xd(e,t){try{e.setAttribute(`http.status_code`,t.status);let n=t.headers.get(`x-ms-request-id`);n&&e.setAttribute(`serviceRequestId`,n),t.status>=400&&e.setStatus({status:`error`}),e.end()}catch(e){ad.warning(`Skipping tracing span processing due to an error: ${yd(e)}`)}}function Zd(e){if(e instanceof AbortSignal)return{abortSignal:e};if(e.aborted)return{abortSignal:AbortSignal.abort(e.reason)};let t=new AbortController,n=!0;function r(){n&&=(e.removeEventListener(`abort`,i),!1)}function i(){t.abort(e.reason),r()}return e.addEventListener(`abort`,i),{abortSignal:t.signal,cleanup:r}}function Qd(){return{name:`wrapAbortSignalLikePolicy`,sendRequest:async(e,t)=>{if(!e.abortSignal)return t(e);let{abortSignal:n,cleanup:r}=Zd(e.abortSignal);e.abortSignal=n;try{return await t(e)}finally{r?.()}}}}function $d(e){let t=nd();return Sd&&(e.agent&&t.addPolicy(Pd(e.agent)),e.tlsOptions&&t.addPolicy(Fd(e.tlsOptions)),t.addPolicy(Md(e.proxyOptions)),t.addPolicy(Od())),t.addPolicy(Qd()),t.addPolicy(Ad(),{beforePolicies:[Ed]}),t.addPolicy(hd(e.userAgentOptions)),t.addPolicy(Nd(e.telemetryOptions?.clientRequestIdHeaderName)),t.addPolicy(Dd(),{afterPhase:`Deserialize`}),t.addPolicy(kd(e.retryOptions),{phase:`Retry`}),t.addPolicy(Kd({...e.userAgentOptions,...e.loggingOptions}),{afterPhase:`Retry`}),Sd&&t.addPolicy(sd(e.redirectOptions),{afterPhase:`Retry`}),t.addPolicy(od(e.loggingOptions),{afterPhase:`Sign`}),t}function ef(){let e=Vl();return{async sendRequest(t){let{abortSignal:n,cleanup:r}=t.abortSignal?Zd(t.abortSignal):{};try{return t.abortSignal=n,await e.sendRequest(t)}finally{r?.()}}}}function tf(e){return dl(e)}function nf(e){return ml(e)}const rf={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function af(e,t,n){async function r(){if(Date.now()e.getToken(t,s),a.retryIntervalInMs,r?.expiresOnTimestamp??Date.now()).then(e=>(n=null,r=e,i=s.tenantId,r)).catch(e=>{throw n=null,r=null,i=void 0,e})),n}return async(e,t)=>{let n=!!t.claims,a=i!==t.tenantId;return n&&(r=null),a||n||o.mustRefresh?s(e,t):(o.shouldRefresh&&s(e,t),r)}}async function sf(e,t){try{return[await t(e),void 0]}catch(e){if(Gd(e)&&e.response)return[e.response,e];throw e}}async function cf(e){let{scopes:t,getAccessToken:n,request:r}=e,i=await n(t,{abortSignal:r.abortSignal,tracingOptions:r.tracingOptions,enableCae:!0});i&&e.request.headers.set(`Authorization`,`Bearer ${i.token}`)}function lf(e){return e.status===401&&e.headers.has(`WWW-Authenticate`)}async function uf(e,t){let{scopes:n}=e,r=await e.getAccessToken(n,{enableCae:!0,claims:t});return r?(e.request.headers.set(`Authorization`,`${r.tokenType??`Bearer`} ${r.token}`),!0):!1}function df(e){let{credential:t,scopes:n,challengeCallbacks:r}=e,i=e.logger||ad,a={authorizeRequest:r?.authorizeRequest?.bind(r)??cf,authorizeRequestOnChallenge:r?.authorizeRequestOnChallenge?.bind(r)},o=t?of(t):()=>Promise.resolve(null);return{name:`bearerTokenAuthenticationPolicy`,async sendRequest(e,t){if(!e.url.toLowerCase().startsWith(`https://`))throw Error(`Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.`);await a.authorizeRequest({scopes:Array.isArray(n)?n:[n],request:e,getAccessToken:o,logger:i});let r,s,c;if([r,s]=await sf(e,t),lf(r)){let l=pf(r.headers.get(`WWW-Authenticate`));if(l){let a;try{a=atob(l)}catch{return i.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${l}`),r}c=await uf({scopes:Array.isArray(n)?n:[n],response:r,request:e,getAccessToken:o,logger:i},a),c&&([r,s]=await sf(e,t))}else if(a.authorizeRequestOnChallenge&&(c=await a.authorizeRequestOnChallenge({scopes:Array.isArray(n)?n:[n],request:e,response:r,getAccessToken:o,logger:i}),c&&([r,s]=await sf(e,t)),lf(r)&&(l=pf(r.headers.get(`WWW-Authenticate`)),l))){let a;try{a=atob(l)}catch{return i.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${l}`),r}c=await uf({scopes:Array.isArray(n)?n:[n],response:r,request:e,getAccessToken:o,logger:i},a),c&&([r,s]=await sf(e,t))}}if(s)throw s;return r}}}function ff(e){let t=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,n=/(\w+)="([^"]*)"/g,r=[],i;for(;(i=t.exec(e))!==null;){let e=i[1],t=i[2],a={},o;for(;(o=n.exec(t))!==null;)a[o[1]]=o[2];r.push({scheme:e,params:a})}return r}function pf(e){if(e)return ff(e).find(e=>e.scheme===`Bearer`&&e.params.claims&&e.params.error===`insufficient_claims`)?.params.claims}function mf(e){let t=e;return t&&typeof t.getToken==`function`&&(t.signRequest===void 0||t.getToken.length>0)}const hf=`DisableKeepAlivePolicy`;function gf(){return{name:hf,async sendRequest(e,t){return e.disableKeepAlive=!0,t(e)}}}function _f(e){return e.getOrderedPolicies().some(e=>e.name===hf)}function vf(e){return(e instanceof Buffer?e:Buffer.from(e.buffer)).toString(`base64`)}function yf(e){return Buffer.from(e,`base64`)}function bf(e,t){return t!==`Composite`&&t!==`Dictionary`&&(typeof e==`string`||typeof e==`number`||typeof e==`boolean`||t?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)!==null||e==null)}const xf=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Sf(e){return xf.test(e)}const Cf=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function wf(e){return Cf.test(e)}function Tf(e){let t={...e.headers,...e.body};return e.hasNullableType&&Object.getOwnPropertyNames(t).length===0?e.shouldWrapBody?{body:null}:null:e.shouldWrapBody?{...e.headers,body:e.body}:t}function Ef(e,t){let n=e.parsedHeaders;if(e.request.method===`HEAD`)return{...n,body:e.parsedBody};let r=t&&t.bodyMapper,i=!!r?.nullable,a=r?.type.name;if(a===`Stream`)return{...n,blobBody:e.blobBody,readableStreamBody:e.readableStreamBody};let o=a===`Composite`&&r.type.modelProperties||{},s=Object.keys(o).some(e=>o[e].serializedName===``);if(a===`Sequence`||s){let t=e.parsedBody??[];for(let n of Object.keys(o))o[n].serializedName&&(t[n]=e.parsedBody?.[n]);if(n)for(let e of Object.keys(n))t[e]=n[e];return i&&!e.parsedBody&&!n&&Object.getOwnPropertyNames(o).length===0?null:t}return Tf({body:e.parsedBody,headers:n,hasNullableType:i,shouldWrapBody:bf(e.parsedBody,a)})}var Df=class{modelMappers;isXML;constructor(e={},t=!1){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,n){let r=(e,r)=>{throw Error(`"${n}" with value "${t}" should satisfy the constraint "${e}": ${r}.`)};if(e.constraints&&t!=null){let{ExclusiveMaximum:n,ExclusiveMinimum:i,InclusiveMaximum:a,InclusiveMinimum:o,MaxItems:s,MaxLength:c,MinItems:l,MinLength:u,MultipleOf:d,Pattern:f,UniqueItems:p}=e.constraints;if(n!==void 0&&t>=n&&r(`ExclusiveMaximum`,n),i!==void 0&&t<=i&&r(`ExclusiveMinimum`,i),a!==void 0&&t>a&&r(`InclusiveMaximum`,a),o!==void 0&&ts&&r(`MaxItems`,s),c!==void 0&&t.length>c&&r(`MaxLength`,c),l!==void 0&&t.lengthn.indexOf(e)!==t)&&r(`UniqueItems`,p)}}serialize(e,t,n,r={xml:{}}){let i={xml:{rootName:r.xml.rootName??``,includeRoot:r.xml.includeRoot??!1,xmlCharKey:r.xml.xmlCharKey??`_`}},a={},o=e.type.name;n||=e.serializedName,o.match(/^Sequence$/i)!==null&&(a=[]),e.isConstant&&(t=e.defaultValue);let{required:s,nullable:c}=e;if(s&&c&&t===void 0)throw Error(`${n} cannot be undefined.`);if(s&&!c&&t==null)throw Error(`${n} cannot be null or undefined.`);if(!s&&c===!1&&t===null)throw Error(`${n} cannot be null.`);return t==null?a=t:o.match(/^any$/i)===null?o.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)===null?o.match(/^Enum$/i)===null?o.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)===null?o.match(/^ByteArray$/i)===null?o.match(/^Base64Url$/i)===null?o.match(/^Sequence$/i)===null?o.match(/^Dictionary$/i)===null?o.match(/^Composite$/i)!==null&&(a=Gf(this,e,t,n,!!this.isXML,i)):a=Vf(this,e,t,n,!!this.isXML,i):a=Bf(this,e,t,n,!!this.isXML,i):a=Rf(n,t):a=Lf(n,t):a=zf(o,t,n):a=If(n,e.type.allowedValues,t):a=Ff(o,n,t):a=t,a}deserialize(e,t,n,r={xml:{}}){let i={xml:{rootName:r.xml.rootName??``,includeRoot:r.xml.includeRoot??!1,xmlCharKey:r.xml.xmlCharKey??`_`},ignoreUnknownProperties:r.ignoreUnknownProperties??!1};if(t==null)return this.isXML&&e.type.name===`Sequence`&&!e.xmlIsWrapped&&(t=[]),e.defaultValue!==void 0&&(t=e.defaultValue),t;let a,o=e.type.name;if(n||=e.serializedName,o.match(/^Composite$/i)!==null)a=Jf(this,e,t,n,i);else{if(this.isXML){let e=i.xml.xmlCharKey;t.$!==void 0&&t[e]!==void 0&&(t=t[e])}o.match(/^Number$/i)===null?o.match(/^Boolean$/i)===null?o.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)===null?o.match(/^(Date|DateTime|DateTimeRfc1123)$/i)===null?o.match(/^UnixTime$/i)===null?o.match(/^ByteArray$/i)===null?o.match(/^Base64Url$/i)===null?o.match(/^Sequence$/i)===null?o.match(/^Dictionary$/i)!==null&&(a=Yf(this,e,t,n,i)):a=Xf(this,e,t,n,i):a=jf(t):a=yf(t):a=Pf(t):a=new Date(t):a=t:a=t===`true`?!0:t===`false`?!1:t:(a=parseFloat(t),isNaN(a)&&(a=t))}return e.isConstant&&(a=e.defaultValue),a}};function Of(e={},t=!1){return new Df(e,t)}function kf(e,t){let n=e.length;for(;n-1>=0&&e[n-1]===t;)--n;return e.substr(0,n)}function Af(e){if(e){if(!(e instanceof Uint8Array))throw Error(`Please provide an input of type Uint8Array for converting to Base64Url.`);return kf(vf(e),`=`).replace(/\+/g,`-`).replace(/\//g,`_`)}}function jf(e){if(e){if(e&&typeof e.valueOf()!=`string`)throw Error(`Please provide an input of type string for converting to Uint8Array`);return e=e.replace(/-/g,`+`).replace(/_/g,`/`),yf(e)}}function Mf(e){let t=[],n=``;if(e){let r=e.split(`.`);for(let e of r)e.charAt(e.length-1)===`\\`?n+=e.substr(0,e.length-1)+`.`:(n+=e,t.push(n),n=``)}return t}function Nf(e){if(e)return typeof e.valueOf()==`string`&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}function Pf(e){if(e)return new Date(e*1e3)}function Ff(e,t,n){if(n!=null){if(e.match(/^Number$/i)!==null){if(typeof n!=`number`)throw Error(`${t} with value ${n} must be of type number.`)}else if(e.match(/^String$/i)!==null){if(typeof n.valueOf()!=`string`)throw Error(`${t} with value "${n}" must be of type string.`)}else if(e.match(/^Uuid$/i)!==null){if(!(typeof n.valueOf()==`string`&&wf(n)))throw Error(`${t} with value "${n}" must be of type string and a valid uuid.`)}else if(e.match(/^Boolean$/i)!==null){if(typeof n!=`boolean`)throw Error(`${t} with value ${n} must be of type boolean.`)}else if(e.match(/^Stream$/i)!==null){let e=typeof n;if(e!==`string`&&typeof n.pipe!=`function`&&typeof n.tee!=`function`&&!(n instanceof ArrayBuffer)&&!ArrayBuffer.isView(n)&&!((typeof Blob==`function`||typeof Blob==`object`)&&n instanceof Blob)&&e!==`function`)throw Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}}return n}function If(e,t,n){if(!t)throw Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some(e=>typeof e.valueOf()==`string`?e.toLowerCase()===n.toLowerCase():e===n))throw Error(`${n} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return n}function Lf(e,t){if(t!=null){if(!(t instanceof Uint8Array))throw Error(`${e} must be of type Uint8Array.`);t=vf(t)}return t}function Rf(e,t){if(t!=null){if(!(t instanceof Uint8Array))throw Error(`${e} must be of type Uint8Array.`);t=Af(t)}return t}function zf(e,t,n){if(t!=null){if(e.match(/^Date$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==`string`&&!isNaN(Date.parse(t))))throw Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(e.match(/^DateTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==`string`&&!isNaN(Date.parse(t))))throw Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(e.match(/^DateTimeRfc1123$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==`string`&&!isNaN(Date.parse(t))))throw Error(`${n} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(e.match(/^UnixTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==`string`&&!isNaN(Date.parse(t))))throw Error(`${n} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=Nf(t)}else if(e.match(/^TimeSpan$/i)!==null&&!Sf(t))throw Error(`${n} must be a string in ISO 8601 format. Instead was "${t}".`)}return t}function Bf(e,t,n,r,i,a){if(!Array.isArray(n))throw Error(`${r} must be of type Array.`);let o=t.type.element;if(!o||typeof o!=`object`)throw Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}.`);o.type.name===`Composite`&&o.type.className&&(o=e.modelMappers[o.type.className]??o);let s=[];for(let t=0;te!==i)&&(o[i]=e.serialize(c,n[i],r+`["`+i+`"]`,a))}return o}return n}function Kf(e,t,n,r){if(!n||!e.xmlNamespace)return t;let i={[e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:`xmlns`]:e.xmlNamespace};if([`Composite`].includes(e.type.name)){if(t.$)return t;{let e={...t};return e.$=i,e}}let a={};return a[r.xml.xmlCharKey]=t,a.$=i,a}function qf(e,t){return[`$`,t.xml.xmlCharKey].includes(e)}function Jf(e,t,n,r,i){let a=i.xml.xmlCharKey??`_`;$f(e,t)&&(t=Qf(e,t,n,`serializedName`));let o=Wf(e,t,r),s={},c=[];for(let l of Object.keys(o)){let u=o[l],d=Mf(o[l].serializedName);c.push(d[0]);let{serializedName:f,xmlName:p,xmlElementName:m}=u,h=r;f!==``&&f!==void 0&&(h=r+`.`+f);let g=u.headerCollectionPrefix;if(g){let t={};for(let r of Object.keys(n))r.startsWith(g)&&(t[r.substring(g.length)]=e.deserialize(u.type.value,n[r],h,i)),c.push(r);s[l]=t}else if(e.isXML)if(u.xmlIsAttribute&&n.$)s[l]=e.deserialize(u,n.$[p],h,i);else if(u.xmlIsMsText)n[a]===void 0?typeof n==`string`&&(s[l]=n):s[l]=n[a];else{let t=m||p||f;if(u.xmlIsWrapped){let t=n[p]?.[m]??[];s[l]=e.deserialize(u,t,h,i),c.push(p)}else{let r=n[t];s[l]=e.deserialize(u,r,h,i),c.push(t)}}else{let r,a=n,c=0;for(let e of d){if(!a)break;c++,a=a[e]}a===null&&c{for(let t in o)if(Mf(o[t].serializedName)[0]===e)return!1;return!0};for(let a in n)t(a)&&(s[a]=e.deserialize(l,n[a],r+`["`+a+`"]`,i))}else if(n&&!i.ignoreUnknownProperties)for(let e of Object.keys(n))s[e]===void 0&&!c.includes(e)&&!qf(e,i)&&(s[e]=n[e]);return s}function Yf(e,t,n,r,i){let a=t.type.value;if(!a||typeof a!=`object`)throw Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}`);if(n){let t={};for(let o of Object.keys(n))t[o]=e.deserialize(a,n[o],r,i);return t}return n}function Xf(e,t,n,r,i){let a=t.type.element;if(!a||typeof a!=`object`)throw Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}`);if(n){Array.isArray(n)||(n=[n]),a.type.name===`Composite`&&a.type.className&&(a=e.modelMappers[a.type.className]??a);let t=[];for(let o=0;o{Object.defineProperty(e,`__esModule`,{value:!0}),e.state=void 0,e.state={operationRequestMap:new WeakMap}}))().state;function rp(e,t,n){let r=t.parameterPath,i=t.mapper,a;if(typeof r==`string`&&(r=[r]),Array.isArray(r)){if(r.length>0)if(i.isConstant)a=i.defaultValue;else{let t=ip(e,r);!t.propertyFound&&n&&(t=ip(n,r));let o=!1;t.propertyFound||(o=i.required||r[0]===`options`&&r.length===2),a=o?i.defaultValue:t.propertyValue}}else{i.required&&(a={});for(let t in r){let o=i.type.modelProperties[t],s=r[t],c=rp(e,{parameterPath:s,mapper:o},n);c!==void 0&&(a||={},a[t]=c)}}return a}function ip(e,t){let n={propertyFound:!1},r=0;for(;r=200&&n.status<300);s.headersMapper&&(a.parsedHeaders=o.serializer.deserialize(s.headersMapper,a.headers.toJSON(),`operationRes.parsedHeaders`,{xml:{},ignoreUnknownProperties:!0}))}return a}function mp(e){let t=Object.keys(e.responses);return t.length===0||t.length===1&&t[0]===`default`}function hp(e,t,n,r){let i=200<=e.status&&e.status<300;if(mp(t)?i:n)if(n){if(!n.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let a=n??t.responses.default,o=new Wd(e.request.streamResponseStatusCodes?.has(e.status)?`Unexpected status code: ${e.status}`:e.bodyAsText,{statusCode:e.status,request:e.request,response:e});if(!a&&!(e.parsedBody?.error?.code&&e.parsedBody?.error?.message))throw o;let s=a?.bodyMapper,c=a?.headersMapper;try{if(e.parsedBody){let n=e.parsedBody,i;if(s){let e=n;if(t.isXML&&s.type.name===tp.Sequence){e=[];let t=s.xmlElementName;typeof n==`object`&&t&&(e=n[t])}i=t.serializer.deserialize(s,e,`error.response.parsedBody`,r)}let a=n.error||i||n;o.code=a.code,a.message&&(o.message=a.message),s&&(o.response.parsedBody=i)}e.headers&&c&&(o.response.parsedHeaders=t.serializer.deserialize(c,e.headers.toJSON(),`operationRes.parsedHeaders`))}catch(t){o.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:o,shouldReturnResponse:!1}}async function gp(e,t,n,r,i){if(!n.request.streamResponseStatusCodes?.has(n.status)&&n.bodyAsText){let a=n.bodyAsText,o=n.headers.get(`Content-Type`)||``,s=o?o.split(`;`).map(e=>e.toLowerCase()):[];try{if(s.length===0||s.some(t=>e.indexOf(t)!==-1))return n.parsedBody=JSON.parse(a),n;if(s.some(e=>t.indexOf(e)!==-1)){if(!i)throw Error(`Parsing XML not supported.`);return n.parsedBody=await i(a,r.xml),n}}catch(e){throw new Wd(`Error "${e}" occurred while parsing the response body - ${n.bodyAsText}.`,{code:e.code||Wd.PARSE_ERROR,statusCode:n.status,request:n.request,response:n})}}return n}function _p(e){let t=new Set;for(let n in e.responses){let r=e.responses[n];r.bodyMapper&&r.bodyMapper.type.name===tp.Stream&&t.add(Number(n))}return t}function vp(e){let{parameterPath:t,mapper:n}=e,r;return r=typeof t==`string`?t:Array.isArray(t)?t.join(`.`):n.serializedName,r}function yp(e={}){let t=e.stringifyXML;return{name:`serializationPolicy`,async sendRequest(e,n){let r=sp(e),i=r?.operationSpec,a=r?.operationArguments;return i&&a&&(bp(e,a,i),xp(e,a,i,t)),n(e)}}}function bp(e,t,n){if(n.headerParameters)for(let r of n.headerParameters){let i=rp(t,r);if(i!=null||r.mapper.required){i=n.serializer.serialize(r.mapper,i,vp(r));let t=r.mapper.headerCollectionPrefix;if(t)for(let n of Object.keys(i))e.headers.set(t+n,i[n]);else e.headers.set(r.mapper.serializedName||vp(r),i)}}let r=t.options?.requestOptions?.customHeaders;if(r)for(let t of Object.keys(r))e.headers.set(t,r[t])}function xp(e,t,n,r=function(){throw Error(`XML serialization unsupported!`)}){let i=t.options?.serializerOptions,a={xml:{rootName:i?.xml.rootName??``,includeRoot:i?.xml.includeRoot??!1,xmlCharKey:i?.xml.xmlCharKey??`_`}},o=a.xml.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){e.body=rp(t,n.requestBody);let i=n.requestBody.mapper,{required:s,serializedName:c,xmlName:l,xmlElementName:u,xmlNamespace:d,xmlNamespacePrefix:f,nullable:p}=i,m=i.type.name;try{if(e.body!==void 0&&e.body!==null||p&&e.body===null||s){let t=vp(n.requestBody);e.body=n.serializer.serialize(i,e.body,t,a);let s=m===tp.Stream;if(n.isXML){let t=f?`xmlns:${f}`:`xmlns`,n=Sp(d,t,m,e.body,a);m===tp.Sequence?e.body=r(Cp(n,u||l||c,t,d),{rootName:l||c,xmlCharKey:o}):s||(e.body=r(n,{rootName:l||c,xmlCharKey:o}))}else if(m===tp.String&&(n.contentType?.match(`text/plain`)||n.mediaType===`text`))return;else s||(e.body=JSON.stringify(e.body))}}catch(e){throw Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(c,void 0,` `)}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){e.formData={};for(let r of n.formDataParameters){let i=rp(t,r);if(i!=null){let t=r.mapper.serializedName||vp(r);e.formData[t]=n.serializer.serialize(r.mapper,i,vp(r),a)}}}}function Sp(e,t,n,r,i){if(e&&![`Composite`,`Sequence`,`Dictionary`].includes(n)){let n={};return n[i.xml.xmlCharKey]=r,n.$={[t]:e},n}return r}function Cp(e,t,n,r){if(Array.isArray(e)||(e=[e]),!n||!r)return{[t]:e};let i={[t]:e};return i.$={[n]:r},i}function wp(e={}){let t=$d(e??{});return e.credentialOptions&&t.addPolicy(df({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(yp(e.serializationOptions),{phase:`Serialize`}),t.addPolicy(up(e.deserializationOptions),{phase:`Deserialize`}),t}let Tp;function Ep(){return Tp||=ef(),Tp}const Dp={CSV:`,`,SSV:` `,Multi:`Multi`,TSV:` `,Pipes:`|`};function Op(e,t,n,r){let i=Ap(t,n,r),a=!1,o=kp(e,i);if(t.path){let e=kp(t.path,i);t.path===`/{nextLink}`&&e.startsWith(`/`)&&(e=e.substring(1)),jp(e)?(o=e,a=!0):o=Mp(o,e)}let{queryParams:s,sequenceParams:c}=Np(t,n,r);return o=Fp(o,s,c,a),o}function kp(e,t){let n=e;for(let[e,r]of t)n=n.split(e).join(r);return n}function Ap(e,t,n){let r=new Map;if(e.urlParameters?.length)for(let i of e.urlParameters){let a=rp(t,i,n),o=vp(i);a=e.serializer.serialize(i.mapper,a,o),i.skipEncoding||(a=encodeURIComponent(a)),r.set(`{${i.mapper.serializedName||o}}`,a)}return r}function jp(e){return e.includes(`://`)}function Mp(e,t){if(!t)return e;let n=new URL(e),r=n.pathname;r.endsWith(`/`)||(r=`${r}/`),t.startsWith(`/`)&&(t=t.substring(1));let i=t.indexOf(`?`);if(i!==-1){let e=t.substring(0,i),a=t.substring(i+1);r+=e,a&&(n.search=n.search?`${n.search}&${a}`:a)}else r+=t;return n.pathname=r,n.toString()}function Np(e,t,n){let r=new Map,i=new Set;if(e.queryParameters?.length)for(let a of e.queryParameters){a.mapper.type.name===`Sequence`&&a.mapper.serializedName&&i.add(a.mapper.serializedName);let o=rp(t,a,n);if(o!=null||a.mapper.required){o=e.serializer.serialize(a.mapper,o,vp(a));let t=a.collectionFormat?Dp[a.collectionFormat]:``;if(Array.isArray(o)&&(o=o.map(e=>e??``)),a.collectionFormat===`Multi`&&o.length===0)continue;Array.isArray(o)&&(a.collectionFormat===`SSV`||a.collectionFormat===`TSV`)&&(o=o.join(t)),a.skipEncoding||(o=Array.isArray(o)?o.map(e=>encodeURIComponent(e)):encodeURIComponent(o)),Array.isArray(o)&&(a.collectionFormat===`CSV`||a.collectionFormat===`Pipes`)&&(o=o.join(t)),r.set(a.mapper.serializedName||vp(a),o)}}return{queryParams:r,sequenceParams:i}}function Pp(e){let t=new Map;if(!e||e[0]!==`?`)return t;e=e.slice(1);let n=e.split(`&`);for(let e of n){let[n,r]=e.split(`=`,2),i=t.get(n);i?Array.isArray(i)?i.push(r):t.set(n,[i,r]):t.set(n,r)}return t}function Fp(e,t,n,r=!1){if(t.size===0)return e;let i=new URL(e),a=Pp(i.search);for(let[e,i]of t){let t=a.get(e);if(Array.isArray(t))if(Array.isArray(i)){t.push(...i);let n=new Set(t);a.set(e,Array.from(n))}else t.push(i);else t?(Array.isArray(i)?i.unshift(t):n.has(e)&&a.set(e,[t,i]),r||a.set(e,i)):a.set(e,i)}let o=[];for(let[e,t]of a)if(typeof t==`string`)o.push(`${e}=${t}`);else if(Array.isArray(t))for(let n of t)o.push(`${e}=${n}`);else o.push(`${e}=${t}`);return i.search=o.length?`?${o.join(`&`)}`:``,i.toString()}const Ip=id(`core-client`);var Lp=class{_endpoint;_requestContentType;_allowInsecureConnection;_httpClient;pipeline;constructor(e={}){if(this._requestContentType=e.requestContentType,this._endpoint=e.endpoint??e.baseUri,e.baseUri&&Ip.warning(`The baseUri option for SDK Clients has been deprecated, please use endpoint instead.`),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||Ep(),this.pipeline=e.pipeline||Rp(e),e.additionalPolicies?.length)for(let{policy:t,position:n}of e.additionalPolicies){let e=n===`perRetry`?`Sign`:void 0;this.pipeline.addPolicy(t,{afterPhase:e})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){let n=t.baseUrl||this._endpoint;if(!n)throw Error(`If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.`);let r=nf({url:Op(n,t,e,this)});r.method=t.httpMethod;let i=sp(r);i.operationSpec=t,i.operationArguments=e;let a=t.contentType||this._requestContentType;a&&t.requestBody&&r.headers.set(`Content-Type`,a);let o=e.options;if(o){let e=o.requestOptions;e&&(e.timeout&&(r.timeout=e.timeout),e.onUploadProgress&&(r.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(r.onDownloadProgress=e.onDownloadProgress),e.shouldDeserialize!==void 0&&(i.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(r.allowInsecureConnection=!0)),o.abortSignal&&(r.abortSignal=o.abortSignal),o.tracingOptions&&(r.tracingOptions=o.tracingOptions)}this._allowInsecureConnection&&(r.allowInsecureConnection=!0),r.streamResponseStatusCodes===void 0&&(r.streamResponseStatusCodes=_p(t));try{let e=await this.sendRequest(r),n=Ef(e,t.responses[e.status]);return o?.onResponse&&o.onResponse(e,n),n}catch(e){if(typeof e==`object`&&e?.response){let n=e.response,r=Ef(n,t.responses[e.statusCode]||t.responses.default);e.details=r,o?.onResponse&&o.onResponse(n,r,e)}throw e}}};function Rp(e){let t=zp(e),n=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return wp({...e,credentialOptions:n})}function zp(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return`${e.endpoint}/.default`;if(e.baseUri)return`${e.baseUri}/.default`;if(e.credential&&!e.credentialScopes)throw Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`)}const Bp={DefaultScope:`/.default`,HeaderConstants:{AUTHORIZATION:`authorization`}};function Vp(e){return/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(e)}const Hp=async e=>{let t=qp(e.request),n=Gp(e.response);if(n){let r=Kp(n),i=Wp(e,r),a=Up(r);if(!a)return!1;let o=await e.getAccessToken(i,{...t,tenantId:a});return o?(e.request.headers.set(Bp.HeaderConstants.AUTHORIZATION,`${o.tokenType??`Bearer`} ${o.token}`),!0):!1}return!1};function Up(e){let t=new URL(e.authorization_uri).pathname.split(`/`)[1];if(t&&Vp(t))return t}function Wp(e,t){if(!t.resource_id)return e.scopes;let n=new URL(t.resource_id);n.pathname=Bp.DefaultScope;let r=n.toString();return r===`https://disk.azure.com/.default`&&(r=`https://disk.azure.com//.default`),[r]}function Gp(e){let t=e.headers.get(`WWW-Authenticate`);if(e.status===401&&t)return t}function Kp(e){return`${e.slice(7).trim()} `.split(` `).filter(e=>e).map(e=>(([e,t])=>({[e]:t}))(e.trim().split(`=`))).reduce((e,t)=>({...e,...t}),{})}function qp(e){return{abortSignal:e.abortSignal,requestOptions:{timeout:e.timeout},tracingOptions:e.tracingOptions}}const Jp=Symbol(`Original PipelineRequest`),Yp=Symbol.for(`@azure/core-client original request`);function Xp(e,t={}){let n=e[Jp],r=tf(e.headers.toJson({preserveCase:!0}));if(n)return n.headers=r,n;{let n=nf({url:e.url,method:e.method,headers:r,withCredentials:e.withCredentials,timeout:e.timeout,requestId:e.requestId,abortSignal:e.abortSignal,body:e.body,formData:e.formData,disableKeepAlive:!!e.keepAlive,onDownloadProgress:e.onDownloadProgress,onUploadProgress:e.onUploadProgress,proxySettings:e.proxySettings,streamResponseStatusCodes:e.streamResponseStatusCodes,agent:e.agent,requestOverrides:e.requestOverrides});return t.originalRequest&&(n[Yp]=t.originalRequest),n}}function Zp(e,t){let n=t?.originalRequest??e,r={url:e.url,method:e.method,headers:Qp(e.headers),withCredentials:e.withCredentials,timeout:e.timeout,requestId:e.headers.get(`x-ms-client-request-id`)||e.requestId,abortSignal:e.abortSignal,body:e.body,formData:e.formData,keepAlive:!!e.disableKeepAlive,onDownloadProgress:e.onDownloadProgress,onUploadProgress:e.onUploadProgress,proxySettings:e.proxySettings,streamResponseStatusCodes:e.streamResponseStatusCodes,agent:e.agent,requestOverrides:e.requestOverrides,clone(){throw Error(`Cannot clone a non-proxied WebResourceLike`)},prepare(){throw Error(`WebResourceLike.prepare() is not supported by @azure/core-http-compat`)},validateRequestProperties(){}};return t?.createProxy?new Proxy(r,{get(t,i,a){return i===Jp?e:i===`clone`?()=>Zp(Xp(r,{originalRequest:n}),{createProxy:!0,originalRequest:n}):Reflect.get(t,i,a)},set(t,n,r,i){return n===`keepAlive`&&(e.disableKeepAlive=!r),typeof n==`string`&&[`url`,`method`,`withCredentials`,`timeout`,`requestId`,`abortSignal`,`body`,`formData`,`onDownloadProgress`,`onUploadProgress`,`proxySettings`,`streamResponseStatusCodes`,`agent`,`requestOverrides`].includes(n)&&(e[n]=r),Reflect.set(t,n,r,i)}}):r}function Qp(e){return new em(e.toJSON({preserveCase:!0}))}function $p(e){return e.toLowerCase()}var em=class e{_headersMap;constructor(e){if(this._headersMap={},e)for(let t in e)this.set(t,e[t])}set(e,t){this._headersMap[$p(e)]={name:e,value:t.toString()}}get(e){let t=this._headersMap[$p(e)];return t?t.value:void 0}contains(e){return!!this._headersMap[$p(e)]}remove(e){let t=this.contains(e);return delete this._headersMap[$p(e)],t}rawHeaders(){return this.toJson({preserveCase:!0})}headersArray(){let e=[];for(let t in this._headersMap)e.push(this._headersMap[t]);return e}headerNames(){let e=[],t=this.headersArray();for(let n=0;nrm(await e.sendRequest(Zp(t,{createProxy:!0})))}}const lm=`:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD`;lm+``,``+lm;const um=RegExp(`^[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`);function dm(e,t){let n=[],r=t.exec(e);for(;r;){let i=[];i.startIndex=t.lastIndex-r[0].length;let a=r.length;for(let e=0;e`&&e[a]!==` `&&e[a]!==` `&&e[a]!==` -`&&e[a]!==`\r`;a++)c+=e[a];if(c=c.trim(),c[c.length-1]===`/`&&(c=c.substring(0,c.length-1),a--),!Om(c)){let t;return t=c.trim().length===0?`Invalid space after '<'.`:`Tag '`+c+`' is an invalid name.`,Em(`InvalidTag`,t,km(e,a))}let l=xm(e,a);if(l===!1)return Em(`InvalidAttr`,`Attributes for '`+c+`' have open quote.`,km(e,a));let u=l.value;if(a=l.index,u[u.length-1]===`/`){let n=a-u.length;u=u.substring(0,u.length-1);let i=Cm(u,t);if(i===!0)r=!0;else return Em(i.err.code,i.err.msg,km(e,n+i.err.line))}else if(s){if(!l.tagClosed)return Em(`InvalidTag`,`Closing tag '`+c+`' doesn't have proper closing.`,km(e,a));if(u.trim().length>0)return Em(`InvalidTag`,`Closing tag '`+c+`' can't have attributes or invalid starting.`,km(e,o));if(n.length===0)return Em(`InvalidTag`,`Closing tag '`+c+`' has not been opened.`,km(e,o));{let t=n.pop();if(c!==t.tagName){let n=km(e,t.tagStartPos);return Em(`InvalidTag`,`Expected closing tag '`+t.tagName+`' (opened in line `+n.line+`, col `+n.col+`) instead of closing tag '`+c+`'.`,km(e,o))}n.length==0&&(i=!0)}}else{let s=Cm(u,t);if(s!==!0)return Em(s.err.code,s.err.msg,km(e,a-u.length+s.err.line));if(i===!0)return Em(`InvalidXml`,`Multiple possible root nodes found.`,km(e,a));t.unpairedTags.indexOf(c)!==-1||n.push({tagName:c,tagStartPos:o}),r=!0}for(a++;a0?Em(`InvalidXml`,`Invalid '`+JSON.stringify(n.map(e=>e.tagName),null,4).replace(/\r?\n/g,``)+`' found.`,{line:1,col:1}):!0:Em(`InvalidXml`,`Start tag expected.`,1)}function vm(e){return e===` `||e===` `||e===` -`||e===`\r`}function ym(e,t){let n=t;for(;t5&&r===`xml`)return Em(`InvalidXml`,`XML declaration allowed only at the start of the document.`,km(e,t));if(e[t]==`?`&&e[t+1]==`>`){t++;break}else continue}return t}function bm(e,t){if(e.length>t+5&&e[t+1]===`-`&&e[t+2]===`-`){for(t+=3;t`){t+=2;break}}else if(e.length>t+8&&e[t+1]===`D`&&e[t+2]===`O`&&e[t+3]===`C`&&e[t+4]===`T`&&e[t+5]===`Y`&&e[t+6]===`P`&&e[t+7]===`E`){let n=1;for(t+=8;t`&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]===`[`&&e[t+2]===`C`&&e[t+3]===`D`&&e[t+4]===`A`&&e[t+5]===`T`&&e[t+6]===`A`&&e[t+7]===`[`){for(t+=8;t`){t+=2;break}}return t}function xm(e,t){let n=``,r=``,i=!1;for(;t`&&r===``){i=!0;break}n+=e[t]}return r===``?{value:n,index:t,tagClosed:i}:!1}const Sm=RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,`g`);function Cm(e,t){let n=dm(e,Sm),r={};for(let e=0;emm.includes(e)?`__`+e:e,Mm={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(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:jm};function Nm(e,t){if(typeof e!=`string`)return;let n=e.toLowerCase();if(mm.some(e=>n===e.toLowerCase())||hm.some(e=>n===e.toLowerCase()))throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function Pm(e){return typeof e==`boolean`?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof e==`object`&&e?{enabled:e.enabled!==!1,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??10),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1e3),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??100),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null}:Pm(!0)}const Fm=function(e){let t=Object.assign({},Mm,e),n=[{value:t.attributeNamePrefix,name:`attributeNamePrefix`},{value:t.attributesGroupName,name:`attributesGroupName`},{value:t.textNodeName,name:`textNodeName`},{value:t.cdataPropName,name:`cdataPropName`},{value:t.commentPropName,name:`commentPropName`}];for(let{value:e,name:t}of n)e&&Nm(e,t);return t.onDangerousProperty===null&&(t.onDangerousProperty=jm),t.processEntities=Pm(t.processEntities),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),t};let Im;Im=typeof Symbol==`function`?Symbol(`XML Node Metadata`):`@@xmlMetadata`;var Lm=class{constructor(e){this.tagname=e,this.child=[],this[`:@`]=Object.create(null)}add(e,t){e===`__proto__`&&(e=`#__proto__`),this.child.push({[e]:t})}addChild(e,t){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}),t!==void 0&&(this.child[this.child.length-1][Im]={startIndex:t})}static getMetaDataSymbol(){return Im}},Rm=class{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){let n=Object.create(null),r=0;if(e[t+3]===`O`&&e[t+4]===`C`&&e[t+5]===`T`&&e[t+6]===`Y`&&e[t+7]===`P`&&e[t+8]===`E`){t+=9;let i=1,a=!1,o=!1,s=``;for(;t=this.options.maxEntityCount)throw Error(`Entity count (${r+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);let e=i.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);n[i]={regx:RegExp(`&${e};`,`g`),val:a},r++}}else if(a&&Bm(e,`!ELEMENT`,t)){t+=8;let{index:n}=this.readElementExp(e,t+1);t=n}else if(a&&Bm(e,`!ATTLIST`,t))t+=8;else if(a&&Bm(e,`!NOTATION`,t)){t+=9;let{index:n}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=n}else if(Bm(e,`!--`,t))o=!0;else throw Error(`Invalid DOCTYPE`);i++,s=``}else if(e[t]===`>`){if(o?e[t-1]===`-`&&e[t-2]===`-`&&(o=!1,i--):i--,i===0)break}else e[t]===`[`?a=!0:s+=e[t];if(i!==0)throw Error(`Unclosed DOCTYPE`)}else throw Error(`Invalid Tag instead of DOCTYPE`);return{entities:n,i:t}}readEntityExp(e,t){t=zm(e,t);let n=t;for(;tthis.options.maxEntitySize)throw Error(`Entity "${r}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return t--,[r,i,t]}readNotationExp(e,t){t=zm(e,t);let n=t;for(;t{for(;t1||a.length===1&&!s))return e;{let r=Number(n),s=String(r);if(r===0)return r;if(s.search(/[eE]/)!==-1)return t.eNotation?r:e;if(n.indexOf(`.`)!==-1)return s===`0`||s===o||s===`${i}${o}`?r:e;let c=a?o:n;return a?c===s||i+c===s?r:e:c===s||c===i+s?r:e}}else return e}}const Km=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function qm(e,t,n){if(!n.eNotation)return e;let r=t.match(Km);if(r){let i=r[1]||``,a=r[3].indexOf(`e`)===-1?`E`:`e`,o=r[2],s=i?e[o.length+1]===a:e[o.length]===a;return o.length>1&&s?e:o.length===1&&(r[3].startsWith(`.${a}`)||r[3][0]===a)?Number(t):n.leadingZeros&&!s?(t=(r[1]||``)+r[3],Number(t)):e}else return e}function Jm(e){return e&&e.indexOf(`.`)!==-1?(e=e.replace(/0+$/,``),e===`.`?e=`0`:e[0]===`.`?e=`0`+e:e[e.length-1]===`.`&&(e=e.substring(0,e.length-1)),e):e}function Ym(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw Error(`parseInt, Number.parseInt, window.parseInt are not supported`)}function Xm(e,t,n){let r=t===1/0;switch(n.infinity.toLowerCase()){case`null`:return null;case`infinity`:return t;case`string`:return r?`Infinity`:`-Infinity`;default:return e}}function Zm(e){return typeof e==`function`?e:Array.isArray(e)?t=>{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}var Qm=class{constructor(e,t={}){this.pattern=e,this.separator=t.separator||`.`,this.segments=this._parse(e),this._hasDeepWildcard=this.segments.some(e=>e.type===`deep-wildcard`),this._hasAttributeCondition=this.segments.some(e=>e.attrName!==void 0),this._hasPositionSelector=this.segments.some(e=>e.position!==void 0)}_parse(e){let t=[],n=0,r=``;for(;n0){let e=this.path[this.path.length-1];e.values=void 0}let r=this.path.length;this.siblingStacks[r]||(this.siblingStacks[r]=new Map);let i=this.siblingStacks[r],a=n?`${n}:${e}`:e,o=i.get(a)||0,s=0;for(let e of i.values())s+=e;i.set(a,o+1);let c={tag:e,position:s,counter:o};n!=null&&(c.namespace=n),t!=null&&(c.values=t),this.path.push(c)}pop(){if(this.path.length===0)return;let e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){let t=this.path[this.path.length-1];e!=null&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let t=this.path[this.path.length-1];return t.values!==void 0&&e in t.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){let n=e||this.separator;return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n)}toArray(){return this.path.map(e=>e.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(e){let t=e.segments;return t.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t=0&&t>=0;){let r=e[n];if(r.type===`deep-wildcard`){if(n--,n<0)return!0;let r=e[n],i=!1;for(let e=t;e>=0;e--){let a=e===this.path.length-1;if(this._matchSegment(r,this.path[e],a)){t=e-1,n--,i=!0;break}}if(!i)return!1}else{let e=t===this.path.length-1;if(!this._matchSegment(r,this.path[t],e))return!1;t--,n--}}return n<0}_matchSegment(e,t,n){if(e.tag!==`*`&&e.tag!==t.tag||e.namespace!==void 0&&e.namespace!==`*`&&e.namespace!==t.namespace)return!1;if(e.attrName!==void 0){if(!n||!t.values||!(e.attrName in t.values))return!1;if(e.attrValue!==void 0){let n=t.values[e.attrName];if(String(n)!==String(e.attrValue))return!1}}if(e.position!==void 0){if(!n)return!1;let r=t.counter??0;if(e.position===`first`&&r!==0||e.position===`odd`&&r%2!=1||e.position===`even`&&r%2!=0||e.position===`nth`&&r!==e.positionValue)return!1}return!0}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>new Map(e))}readOnly(){let e=this;return new Proxy(e,{get(e,t,n){if($m.has(t))return()=>{throw TypeError(`Cannot call '${t}' on a read-only Matcher. Obtain a writable instance to mutate state.`)};let r=Reflect.get(e,t,n);return t===`path`||t===`siblingStacks`?Object.freeze(Array.isArray(r)?r.map(e=>e instanceof Map?Object.freeze(new Map(e)):Object.freeze({...e})):r):typeof r==`function`?r.bind(e):r},set(e,t){throw TypeError(`Cannot set property '${String(t)}' on a read-only Matcher.`)},deleteProperty(e,t){throw TypeError(`Cannot delete property '${String(t)}' from a read-only Matcher.`)}})}};function th(e,t){if(!e)return{};let n=t.attributesGroupName?e[t.attributesGroupName]:e;if(!n)return{};let r={};for(let e in n)if(e.startsWith(t.attributeNamePrefix)){let i=e.substring(t.attributeNamePrefix.length);r[i]=n[e]}else r[e]=n[e];return r}function nh(e){if(!e||typeof e!=`string`)return;let t=e.indexOf(`:`);if(t!==-1&&t>0){let n=e.substring(0,t);if(n!==`xmlns`)return n}}var rh=class{constructor(e){if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:`'`},gt:{regex:/&(gt|#62|#x3E);/g,val:`>`},lt:{regex:/&(lt|#60|#x3C);/g,val:`<`},quot:{regex:/&(quot|#34|#x22);/g,val:`"`}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:`&`},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:` `},cent:{regex:/&(cent|#162);/g,val:`¢`},pound:{regex:/&(pound|#163);/g,val:`£`},yen:{regex:/&(yen|#165);/g,val:`¥`},euro:{regex:/&(euro|#8364);/g,val:`€`},copyright:{regex:/&(copy|#169);/g,val:`©`},reg:{regex:/&(reg|#174);/g,val:`®`},inr:{regex:/&(inr|#8377);/g,val:`₹`},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>yh(t,10,`&#`)},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>yh(t,16,`&#x`)}},this.addExternalEntities=ih,this.parseXml=lh,this.parseTextData=ah,this.resolveNameSpace=oh,this.buildAttributesMap=ch,this.isItStopNode=ph,this.replaceEntitiesValue=dh,this.readStopNodeData=_h,this.saveTextToParentTag=fh,this.addChild=uh,this.ignoreAttributesFn=Zm(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.matcher=new eh,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodeExpressions=[];for(let e=0;e0)){o||(e=this.replaceEntitiesValue(e,t,n));let r=this.options.jPath?n.toString():n,s=this.options.tagValueProcessor(t,e,r,i,a);return s==null?e:typeof s!=typeof e||s!==e?s:this.options.trimValues||e.trim()===e?vh(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function oh(e){if(this.options.removeNSPrefix){let t=e.split(`:`),n=e.charAt(0)===`/`?`/`:``;if(t[0]===`xmlns`)return``;t.length===2&&(e=n+t[1])}return e}const sh=RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,`gm`);function ch(e,t,n){if(this.options.ignoreAttributes!==!0&&typeof e==`string`){let r=dm(e,sh),i=r.length,a={},o={};for(let e=0;e0&&typeof t==`object`&&t.updateCurrent&&t.updateCurrent(o);for(let e=0;e`,a,`Closing Tag is not closed.`),i=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){let e=i.indexOf(`:`);e!==-1&&(i=i.substr(e+1))}i=bh(this.options.transformTagName,i,``,this.options).tagName,n&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher));let o=this.matcher.getCurrentTag();if(i&&this.options.unpairedTags.indexOf(i)!==-1)throw Error(`Unpaired tag can not be used as closing tag: `);o&&this.options.unpairedTags.indexOf(o)!==-1&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,n=this.tagsNodeStack.pop(),r=``,a=t}else if(e[a+1]===`?`){let t=gh(e,a,!1,`?>`);if(!t)throw Error(`Pi Tag is not closed.`);if(r=this.saveTextToParentTag(r,n,this.readonlyMatcher),!(this.options.ignoreDeclaration&&t.tagName===`?xml`||this.options.ignorePiTags)){let e=new Lm(t.tagName);e.add(this.options.textNodeName,``),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[`:@`]=this.buildAttributesMap(t.tagExp,this.matcher,t.tagName)),this.addChild(n,e,this.readonlyMatcher,a)}a=t.closeIndex+1}else if(e.substr(a+1,3)===`!--`){let t=hh(e,`-->`,a+4,`Comment is not closed.`);if(this.options.commentPropName){let i=e.substring(a+4,t-2);r=this.saveTextToParentTag(r,n,this.readonlyMatcher),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}a=t}else if(e.substr(a+1,2)===`!D`){let t=i.readDocType(e,a);this.docTypeEntities=t.entities,a=t.i}else if(e.substr(a+1,2)===`![`){let t=hh(e,`]]>`,a,`CDATA is not closed.`)-2,i=e.substring(a+9,t);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let o=this.parseTextData(i,n.tagname,this.readonlyMatcher,!0,!1,!0,!0);o??=``,this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,o),a=t+2}else{let i=gh(e,a,this.options.removeNSPrefix);if(!i){let t=e.substring(Math.max(0,a-50),Math.min(e.length,a+50));throw Error(`readTagExp returned undefined at position ${a}. Context: "${t}"`)}let o=i.tagName,s=i.rawTagName,c=i.tagExp,l=i.attrExpPresent,u=i.closeIndex;if({tagName:o,tagExp:c}=bh(this.options.transformTagName,o,c,this.options),this.options.strictReservedNames&&(o===this.options.commentPropName||o===this.options.cdataPropName||o===this.options.textNodeName||o===this.options.attributesGroupName))throw Error(`Invalid tag name: ${o}`);n&&r&&n.tagname!==`!xml`&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher,!1));let d=n;d&&this.options.unpairedTags.indexOf(d.tagname)!==-1&&(n=this.tagsNodeStack.pop(),this.matcher.pop());let f=!1;c.length>0&&c.lastIndexOf(`/`)===c.length-1&&(f=!0,o[o.length-1]===`/`?(o=o.substr(0,o.length-1),c=o):c=c.substr(0,c.length-1),l=o!==c);let p=null,m;m=nh(s),o!==t.tagname&&this.matcher.push(o,{},m),o!==c&&l&&(p=this.buildAttributesMap(c,this.matcher,o),p&&th(p,this.options)),o!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));let h=a;if(this.isCurrentNodeStopNode){let t=``;if(f)a=i.closeIndex;else if(this.options.unpairedTags.indexOf(o)!==-1)a=i.closeIndex;else{let n=this.readStopNodeData(e,s,u+1);if(!n)throw Error(`Unexpected end of ${s}`);a=n.i,t=n.tagContent}let r=new Lm(o);p&&(r[`:@`]=p),r.add(this.options.textNodeName,t),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(n,r,this.readonlyMatcher,h)}else{if(f){({tagName:o,tagExp:c}=bh(this.options.transformTagName,o,c,this.options));let e=new Lm(o);p&&(e[`:@`]=p),this.addChild(n,e,this.readonlyMatcher,h),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(this.options.unpairedTags.indexOf(o)!==-1){let e=new Lm(o);p&&(e[`:@`]=p),this.addChild(n,e,this.readonlyMatcher,h),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=i.closeIndex;continue}else{let e=new Lm(o);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);this.tagsNodeStack.push(n),p&&(e[`:@`]=p),this.addChild(n,e,this.readonlyMatcher,h),n=e}r=``,a=u}}else r+=e[a];return t.child};function uh(e,t,n,r){this.options.captureMetaData||(r=void 0);let i=this.options.jPath?n.toString():n,a=this.options.updateTag(t.tagname,i,t[`:@`]);a===!1||(typeof a==`string`&&(t.tagname=a),e.addChild(t,r))}function dh(e,t,n){let r=this.options.processEntities;if(!r||!r.enabled)return e;if(r.allowedTags){let i=this.options.jPath?n.toString():n;if(!(Array.isArray(r.allowedTags)?r.allowedTags.includes(t):r.allowedTags(t,i)))return e}if(r.tagFilter){let i=this.options.jPath?n.toString():n;if(!r.tagFilter(t,i))return e}for(let t of Object.keys(this.docTypeEntities)){let n=this.docTypeEntities[t],i=e.match(n.regx);if(i){if(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);let t=e.length;if(e=e.replace(n.regx,n.val),r.maxExpandedLength&&(this.currentExpandedLength+=e.length-t,this.currentExpandedLength>r.maxExpandedLength))throw Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${r.maxExpandedLength}`)}}for(let t of Object.keys(this.lastEntities)){let n=this.lastEntities[t],i=e.match(n.regex);if(i&&(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions))throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);e=e.replace(n.regex,n.val)}if(e.indexOf(`&`)===-1)return e;if(this.options.htmlEntities)for(let t of Object.keys(this.htmlEntities)){let n=this.htmlEntities[t],i=e.match(n.regex);if(i&&(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions))throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);e=e.replace(n.regex,n.val)}return e=e.replace(this.ampEntity.regex,this.ampEntity.val),e}function fh(e,t,n,r){return e&&=(r===void 0&&(r=t.child.length===0),e=this.parseTextData(e,t.tagname,n,!1,t[`:@`]?Object.keys(t[`:@`]).length!==0:!1,r),e!==void 0&&e!==``&&t.add(this.options.textNodeName,e),``),e}function ph(e,t){if(!e||e.length===0)return!1;for(let n=0;n`){let r,i=``;for(let a=t;a`){let i=mh(e,t+1,r);if(!i)return;let a=i.data,o=i.index,s=a.search(/\s/),c=a,l=!0;s!==-1&&(c=a.substring(0,s),a=a.substring(s+1).trimStart());let u=c;if(n){let e=c.indexOf(`:`);e!==-1&&(c=c.substr(e+1),l=c!==i.data.substr(e+1))}return{tagName:c,tagExp:a,closeIndex:o,attrExpPresent:l,rawTagName:u}}function _h(e,t,n){let r=n,i=1;for(;n`,n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,i===0))return{tagContent:e.substring(r,n),i:a};n=a}else if(e[n+1]===`?`)n=hh(e,`?>`,n+1,`StopNode is not closed.`);else if(e.substr(n+1,3)===`!--`)n=hh(e,`-->`,n+3,`StopNode is not closed.`);else if(e.substr(n+1,2)===`![`)n=hh(e,`]]>`,n,`StopNode is not closed.`)-2;else{let r=gh(e,n,`>`);r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!==`/`&&i++,n=r.closeIndex)}}function vh(e,t,n){if(t&&typeof e==`string`){let t=e.trim();return t===`true`?!0:t===`false`?!1:Gm(e,n)}else if(pm(e))return e;else return``}function yh(e,t,n){let r=Number.parseInt(e,t);return r>=0&&r<=1114111?String.fromCodePoint(r):n+e+`;`}function bh(e,t,n,r){if(e){let r=e(t);n===t&&(n=r),t=r}return t=xh(t,r),{tagName:t,tagExp:n}}function xh(e,t){if(hm.includes(e))throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return mm.includes(e)?t.onDangerousProperty(e):e}const Sh=Lm.getMetaDataSymbol();function Ch(e,t){if(!e||typeof e!=`object`)return{};if(!t)return e;let n={};for(let r in e)if(r.startsWith(t)){let i=r.substring(t.length);n[i]=e[r]}else n[r]=e[r];return n}function wh(e,t,n,r){return Th(e,t,n,r)}function Th(e,t,n,r){let i,a={};for(let o=0;o0&&(a[t.textNodeName]=i):i!==void 0&&(a[t.textNodeName]=i),a}function Eh(e){let t=Object.keys(e);for(let e=0;e0&&(n=` -`);let r=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let e=0;et.maxNestedTags)throw Error(`Maximum nested tags exceeded`);if(!Array.isArray(e)){if(e!=null){let n=e.toString();return n=Rh(n,t),n}return``}for(let s=0;s`,o=!1,r.pop();continue}else if(l===t.commentPropName){a+=n+``,o=!0,r.pop();continue}else if(l[0]===`?`){let e=Ih(c[`:@`],t,d),i=l===`?xml`?``:n,s=c[l][0][t.textNodeName];s=s.length===0?``:` `+s,a+=i+`<${l}${s}${e}?>`,o=!0,r.pop();continue}let f=n;f!==``&&(f+=t.indentBy);let p=n+`<${l}${Ih(c[`:@`],t,d)}`,m;m=d?Nh(c[l],t):jh(c[l],t,f,r,i),t.unpairedTags.indexOf(l)===-1?(!m||m.length===0)&&t.suppressEmptyNode?a+=p+`/>`:m&&m.endsWith(`>`)?a+=p+`>${m}${n}`:(a+=p+`>`,m&&n!==``&&(m.includes(`/>`)||m.includes(``):t.suppressUnpairedNode?a+=p+`>`:a+=p+`/>`,o=!0,r.pop()}return a}function Mh(e,t){if(!e||t.ignoreAttributes)return null;let n={},r=!1;for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let a=i.startsWith(t.attributeNamePrefix)?i.substr(t.attributeNamePrefix.length):i;n[a]=e[i],r=!0}return r?n:null}function Nh(e,t){if(!Array.isArray(e))return e==null?``:e.toString();let n=``;for(let r=0;r`:n+=`<${a}${e}>${r}`}}return n}function Ph(e,t){let n=``;if(e&&!t.ignoreAttributes)for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=e[r];i===!0&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function Fh(e){let t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}const Bh={attributeNamePrefix:`@_`,attributesGroupName:!1,textNodeName:`#text`,ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:` `,suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp(`&`,`g`),val:`&`},{regex:RegExp(`>`,`g`),val:`>`},{regex:RegExp(`<`,`g`),val:`<`},{regex:RegExp(`'`,`g`),val:`'`},{regex:RegExp(`"`,`g`),val:`"`}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function Vh(e){if(this.options=Object.assign({},Bh,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e +`,`utf-8`)],i=Sm(r);i&&e.headers.set(`Content-Length`,i),e.body=await vm(r)}const wm=`multipartPolicy`,Tm=new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`);function Em(e){if(e.length>70)throw Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some(e=>!Tm.has(e)))throw Error(`Multipart boundary "${e}" contains invalid characters`)}function Dm(){return{name:wm,async sendRequest(e,t){if(!e.multipartBody)return t(e);if(e.body)throw Error(`multipartBody and regular body cannot be set at the same time`);let n=e.multipartBody.boundary,r=e.headers.get(`Content-Type`)??`multipart/mixed`,i=r.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw Error(`Got multipart request body, but content-type header was not multipart: ${r}`);let[,a,o]=i;if(o&&n&&o!==n)throw Error(`Multipart boundary was specified as ${o} in the header, but got ${n} in the request body`);return n??=o,n?Em(n):n=ym(),e.headers.set(`Content-Type`,`${a}; boundary=${n}`),await Cm(e,e.multipartBody.parts,n),e.multipartBody=void 0,t(e)}}}function Om(){return Uf()}const km=jf({logLevelEnvVarName:`AZURE_LOG_LEVEL`,namespace:`azure`});km.logger;function Am(e){return km.createClientLogger(e)}const jm=Am(`core-rest-pipeline`);function Mm(e={}){return mp({logger:jm.info,...e})}function Nm(e={}){return gp(e)}function Pm(){return`User-Agent`}async function Fm(e){if(se&&se.versions){let t=`${Ue.type()} ${Ue.release()}; ${Ue.arch()}`,n=se.versions;n.bun?e.set(`Bun`,`${n.bun} (${t})`):n.deno?e.set(`Deno`,`${n.deno} (${t})`):n.node&&e.set(`Node`,`${n.node} (${t})`)}}const Im=`1.22.3`;function Lm(e){let t=[];for(let[n,r]of e){let e=r?`${n}/${r}`:n;t.push(e)}return t.join(` `)}function Rm(){return Pm()}async function zm(e){let t=new Map;t.set(`core-rest-pipeline`,Im),await Fm(t);let n=Lm(t);return e?`${e} ${n}`:n}const Bm=Rm();function Vm(e={}){let t=zm(e.userAgentPrefix);return{name:`userAgentPolicy`,async sendRequest(e,n){return e.headers.has(Bm)||e.headers.set(Bm,await t),n(e)}}}var Hm=class extends Error{constructor(e){super(e),this.name=`AbortError`}};function Um(e,t){let{cleanupBeforeAbort:n,abortSignal:r,abortErrorMsg:i}=t??{};return new Promise((t,a)=>{function o(){a(new Hm(i??`The operation was aborted.`))}function s(){r?.removeEventListener(`abort`,c)}function c(){n?.(),s(),o()}if(r?.aborted)return o();try{e(e=>{s(),t(e)},e=>{s(),a(e)})}catch(e){a(e)}r?.addEventListener(`abort`,c)})}function Wm(e,t){let n,{abortSignal:r,abortErrorMsg:i}=t??{};return Um(t=>{n=setTimeout(t,e)},{cleanupBeforeAbort:()=>clearTimeout(n),abortSignal:r,abortErrorMsg:i??`The delay was aborted.`})}function Gm(e){if(Gf(e))return e.message;{let t;try{t=typeof e==`object`&&e?JSON.stringify(e):String(e)}catch{t=`[unable to stringify input]`}return`Unknown error ${t}`}}function Km(e){return Gf(e)}function qm(){return Rf()}const Jm=Pp,Ym=Symbol(`rawContent`);function Xm(e){return typeof e[Ym]==`function`}function Zm(e){return Xm(e)?e[Ym]():e}const Qm=wm;function $m(){let e=Dm();return{name:Qm,sendRequest:async(t,n)=>{if(t.multipartBody)for(let e of t.multipartBody.parts)Xm(e.body)&&(e.body=Zm(e.body));return e.sendRequest(t,n)}}}function eh(){return vp()}function th(e={}){return Np(e)}function nh(){return Ip()}function rh(e){return om(e)}function ih(e,t){return um(e,t)}function ah(e=`x-ms-client-request-id`){return{name:`setClientRequestIdPolicy`,async sendRequest(t,n){return t.headers.has(e)||t.headers.set(e,t.requestId),n(t)}}}function oh(e){return dm(e)}function sh(e){return fm(e)}const ch={span:Symbol.for(`@azure/core-tracing span`),namespace:Symbol.for(`@azure/core-tracing namespace`)};function lh(e={}){let t=new uh(e.parentContext);return e.span&&(t=t.setValue(ch.span,e.span)),e.namespace&&(t=t.setValue(ch.namespace,e.namespace)),t}var uh=class e{_contextMap;constructor(t){this._contextMap=t instanceof e?new Map(t._contextMap):new Map}setValue(t,n){let r=new e(this);return r._contextMap.set(t,n),r}getValue(e){return this._contextMap.get(e)}deleteValue(t){let n=new e(this);return n._contextMap.delete(t),n}};const dh=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.state=void 0,e.state={instrumenterImplementation:void 0}}))().state;function fh(){return{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}}}function ph(){return{createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:fh(),tracingContext:lh({parentContext:t.tracingContext})}),withContext(e,t,...n){return t(...n)}}}function mh(){return dh.instrumenterImplementation||=ph(),dh.instrumenterImplementation}function hh(e){let{namespace:t,packageName:n,packageVersion:r}=e;function i(e,i,a){let o=mh().startSpan(e,{...a,packageName:n,packageVersion:r,tracingContext:i?.tracingOptions?.tracingContext}),s=o.tracingContext,c=o.span;return s.getValue(ch.namespace)||(s=s.setValue(ch.namespace,t)),c.setAttribute(`az.namespace`,s.getValue(ch.namespace)),{span:c,updatedOptions:Object.assign({},i,{tracingOptions:{...i?.tracingOptions,tracingContext:s}})}}async function a(e,t,n,r){let{span:a,updatedOptions:s}=i(e,t,r);try{let e=await o(s.tracingOptions.tracingContext,()=>Promise.resolve(n(s,a)));return a.setStatus({status:`success`}),e}catch(e){throw a.setStatus({status:`error`,error:e}),e}finally{a.end()}}function o(e,t,...n){return mh().withContext(e,t,...n)}function s(e){return mh().parseTraceparentHeader(e)}function c(e){return mh().createRequestHeaders(e)}return{startSpan:i,withSpan:a,withContext:o,parseTraceparentHeader:s,createRequestHeaders:c}}const gh=Qf;function _h(e){return $f(e)}function vh(e={}){let t=zm(e.userAgentPrefix),n=new Xf({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),r=yh();return{name:`tracingPolicy`,async sendRequest(e,i){if(!r)return i(e);let a=await t,o={"http.url":n.sanitizeUrl(e.url),"http.method":e.method,"http.user_agent":a,requestId:e.requestId};a&&(o[`http.user_agent`]=a);let{span:s,tracingContext:c}=bh(r,e,o)??{};if(!s||!c)return i(e);try{let t=await r.withContext(c,i,e);return Sh(s,t),t}catch(e){throw xh(s,e),e}}}}function yh(){try{return hh({namespace:``,packageName:`@azure/core-rest-pipeline`,packageVersion:Im})}catch(e){jm.warning(`Error when creating the TracingClient: ${Gm(e)}`);return}}function bh(e,t,n){try{let{span:r,updatedOptions:i}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:`client`,spanAttributes:n});if(!r.isRecording()){r.end();return}let a=e.createRequestHeaders(i.tracingOptions.tracingContext);for(let[e,n]of Object.entries(a))t.headers.set(e,n);return{span:r,tracingContext:i.tracingOptions.tracingContext}}catch(e){jm.warning(`Skipping creating a tracing span due to an error: ${Gm(e)}`);return}}function xh(e,t){try{e.setStatus({status:`error`,error:Km(t)?t:void 0}),_h(t)&&t.statusCode&&e.setAttribute(`http.status_code`,t.statusCode),e.end()}catch(e){jm.warning(`Skipping tracing span processing due to an error: ${Gm(e)}`)}}function Sh(e,t){try{e.setAttribute(`http.status_code`,t.status);let n=t.headers.get(`x-ms-request-id`);n&&e.setAttribute(`serviceRequestId`,n),t.status>=400&&e.setStatus({status:`error`}),e.end()}catch(e){jm.warning(`Skipping tracing span processing due to an error: ${Gm(e)}`)}}function Ch(e){if(e instanceof AbortSignal)return{abortSignal:e};if(e.aborted)return{abortSignal:AbortSignal.abort(e.reason)};let t=new AbortController,n=!0;function r(){n&&=(e.removeEventListener(`abort`,i),!1)}function i(){t.abort(e.reason),r()}return e.addEventListener(`abort`,i),{abortSignal:t.signal,cleanup:r}}function wh(){return{name:`wrapAbortSignalLikePolicy`,sendRequest:async(e,t)=>{if(!e.abortSignal)return t(e);let{abortSignal:n,cleanup:r}=Ch(e.abortSignal);e.abortSignal=n;try{return await t(e)}finally{r?.()}}}}function Th(e){let t=Om();return Jm&&(e.agent&&t.addPolicy(oh(e.agent)),e.tlsOptions&&t.addPolicy(sh(e.tlsOptions)),t.addPolicy(ih(e.proxyOptions)),t.addPolicy(eh())),t.addPolicy(wh()),t.addPolicy(nh(),{beforePolicies:[Qm]}),t.addPolicy(Vm(e.userAgentOptions)),t.addPolicy(ah(e.telemetryOptions?.clientRequestIdHeaderName)),t.addPolicy($m(),{afterPhase:`Deserialize`}),t.addPolicy(th(e.retryOptions),{phase:`Retry`}),t.addPolicy(vh({...e.userAgentOptions,...e.loggingOptions}),{afterPhase:`Retry`}),Jm&&t.addPolicy(Nm(e.redirectOptions),{afterPhase:`Retry`}),t.addPolicy(Mm(e.loggingOptions),{afterPhase:`Sign`}),t}function Eh(){let e=pp();return{async sendRequest(t){let{abortSignal:n,cleanup:r}=t.abortSignal?Ch(t.abortSignal):{};try{return t.abortSignal=n,await e.sendRequest(t)}finally{r?.()}}}}function Dh(e){return Lf(e)}function Oh(e){return Bf(e)}const kh={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function Ah(e,t,n){async function r(){if(Date.now()e.getToken(t,s),a.retryIntervalInMs,r?.expiresOnTimestamp??Date.now()).then(e=>(n=null,r=e,i=s.tenantId,r)).catch(e=>{throw n=null,r=null,i=void 0,e})),n}return async(e,t)=>{let n=!!t.claims,a=i!==t.tenantId;return n&&(r=null),a||n||o.mustRefresh?s(e,t):(o.shouldRefresh&&s(e,t),r)}}async function Mh(e,t){try{return[await t(e),void 0]}catch(e){if(_h(e)&&e.response)return[e.response,e];throw e}}async function Nh(e){let{scopes:t,getAccessToken:n,request:r}=e,i=await n(t,{abortSignal:r.abortSignal,tracingOptions:r.tracingOptions,enableCae:!0});i&&e.request.headers.set(`Authorization`,`Bearer ${i.token}`)}function Ph(e){return e.status===401&&e.headers.has(`WWW-Authenticate`)}async function Fh(e,t){let{scopes:n}=e,r=await e.getAccessToken(n,{enableCae:!0,claims:t});return r?(e.request.headers.set(`Authorization`,`${r.tokenType??`Bearer`} ${r.token}`),!0):!1}function Ih(e){let{credential:t,scopes:n,challengeCallbacks:r}=e,i=e.logger||jm,a={authorizeRequest:r?.authorizeRequest?.bind(r)??Nh,authorizeRequestOnChallenge:r?.authorizeRequestOnChallenge?.bind(r)},o=t?jh(t):()=>Promise.resolve(null);return{name:`bearerTokenAuthenticationPolicy`,async sendRequest(e,t){if(!e.url.toLowerCase().startsWith(`https://`))throw Error(`Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.`);await a.authorizeRequest({scopes:Array.isArray(n)?n:[n],request:e,getAccessToken:o,logger:i});let r,s,c;if([r,s]=await Mh(e,t),Ph(r)){let l=Rh(r.headers.get(`WWW-Authenticate`));if(l){let a;try{a=atob(l)}catch{return i.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${l}`),r}c=await Fh({scopes:Array.isArray(n)?n:[n],response:r,request:e,getAccessToken:o,logger:i},a),c&&([r,s]=await Mh(e,t))}else if(a.authorizeRequestOnChallenge&&(c=await a.authorizeRequestOnChallenge({scopes:Array.isArray(n)?n:[n],request:e,response:r,getAccessToken:o,logger:i}),c&&([r,s]=await Mh(e,t)),Ph(r)&&(l=Rh(r.headers.get(`WWW-Authenticate`)),l))){let a;try{a=atob(l)}catch{return i.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${l}`),r}c=await Fh({scopes:Array.isArray(n)?n:[n],response:r,request:e,getAccessToken:o,logger:i},a),c&&([r,s]=await Mh(e,t))}}if(s)throw s;return r}}}function Lh(e){let t=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,n=/(\w+)="([^"]*)"/g,r=[],i;for(;(i=t.exec(e))!==null;){let e=i[1],t=i[2],a={},o;for(;(o=n.exec(t))!==null;)a[o[1]]=o[2];r.push({scheme:e,params:a})}return r}function Rh(e){if(e)return Lh(e).find(e=>e.scheme===`Bearer`&&e.params.claims&&e.params.error===`insufficient_claims`)?.params.claims}function zh(e){let t=e;return t&&typeof t.getToken==`function`&&(t.signRequest===void 0||t.getToken.length>0)}const Bh=`DisableKeepAlivePolicy`;function Vh(){return{name:Bh,async sendRequest(e,t){return e.disableKeepAlive=!0,t(e)}}}function Hh(e){return e.getOrderedPolicies().some(e=>e.name===Bh)}function Uh(e){return(e instanceof Buffer?e:Buffer.from(e.buffer)).toString(`base64`)}function Wh(e){return Buffer.from(e,`base64`)}function Gh(e,t){return t!==`Composite`&&t!==`Dictionary`&&(typeof e==`string`||typeof e==`number`||typeof e==`boolean`||t?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)!==null||e==null)}const Kh=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function qh(e){return Kh.test(e)}const Jh=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function Yh(e){return Jh.test(e)}function Xh(e){let t={...e.headers,...e.body};return e.hasNullableType&&Object.getOwnPropertyNames(t).length===0?e.shouldWrapBody?{body:null}:null:e.shouldWrapBody?{...e.headers,body:e.body}:t}function Zh(e,t){let n=e.parsedHeaders;if(e.request.method===`HEAD`)return{...n,body:e.parsedBody};let r=t&&t.bodyMapper,i=!!r?.nullable,a=r?.type.name;if(a===`Stream`)return{...n,blobBody:e.blobBody,readableStreamBody:e.readableStreamBody};let o=a===`Composite`&&r.type.modelProperties||{},s=Object.keys(o).some(e=>o[e].serializedName===``);if(a===`Sequence`||s){let t=e.parsedBody??[];for(let n of Object.keys(o))o[n].serializedName&&(t[n]=e.parsedBody?.[n]);if(n)for(let e of Object.keys(n))t[e]=n[e];return i&&!e.parsedBody&&!n&&Object.getOwnPropertyNames(o).length===0?null:t}return Xh({body:e.parsedBody,headers:n,hasNullableType:i,shouldWrapBody:Gh(e.parsedBody,a)})}var Qh=class{modelMappers;isXML;constructor(e={},t=!1){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,n){let r=(e,r)=>{throw Error(`"${n}" with value "${t}" should satisfy the constraint "${e}": ${r}.`)};if(e.constraints&&t!=null){let{ExclusiveMaximum:n,ExclusiveMinimum:i,InclusiveMaximum:a,InclusiveMinimum:o,MaxItems:s,MaxLength:c,MinItems:l,MinLength:u,MultipleOf:d,Pattern:f,UniqueItems:p}=e.constraints;if(n!==void 0&&t>=n&&r(`ExclusiveMaximum`,n),i!==void 0&&t<=i&&r(`ExclusiveMinimum`,i),a!==void 0&&t>a&&r(`InclusiveMaximum`,a),o!==void 0&&ts&&r(`MaxItems`,s),c!==void 0&&t.length>c&&r(`MaxLength`,c),l!==void 0&&t.lengthn.indexOf(e)!==t)&&r(`UniqueItems`,p)}}serialize(e,t,n,r={xml:{}}){let i={xml:{rootName:r.xml.rootName??``,includeRoot:r.xml.includeRoot??!1,xmlCharKey:r.xml.xmlCharKey??`_`}},a={},o=e.type.name;n||=e.serializedName,o.match(/^Sequence$/i)!==null&&(a=[]),e.isConstant&&(t=e.defaultValue);let{required:s,nullable:c}=e;if(s&&c&&t===void 0)throw Error(`${n} cannot be undefined.`);if(s&&!c&&t==null)throw Error(`${n} cannot be null or undefined.`);if(!s&&c===!1&&t===null)throw Error(`${n} cannot be null.`);return t==null?a=t:o.match(/^any$/i)===null?o.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)===null?o.match(/^Enum$/i)===null?o.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)===null?o.match(/^ByteArray$/i)===null?o.match(/^Base64Url$/i)===null?o.match(/^Sequence$/i)===null?o.match(/^Dictionary$/i)===null?o.match(/^Composite$/i)!==null&&(a=gg(this,e,t,n,!!this.isXML,i)):a=fg(this,e,t,n,!!this.isXML,i):a=dg(this,e,t,n,!!this.isXML,i):a=lg(n,t):a=cg(n,t):a=ug(o,t,n):a=sg(n,e.type.allowedValues,t):a=og(o,n,t):a=t,a}deserialize(e,t,n,r={xml:{}}){let i={xml:{rootName:r.xml.rootName??``,includeRoot:r.xml.includeRoot??!1,xmlCharKey:r.xml.xmlCharKey??`_`},ignoreUnknownProperties:r.ignoreUnknownProperties??!1};if(t==null)return this.isXML&&e.type.name===`Sequence`&&!e.xmlIsWrapped&&(t=[]),e.defaultValue!==void 0&&(t=e.defaultValue),t;let a,o=e.type.name;if(n||=e.serializedName,o.match(/^Composite$/i)!==null)a=yg(this,e,t,n,i);else{if(this.isXML){let e=i.xml.xmlCharKey;t.$!==void 0&&t[e]!==void 0&&(t=t[e])}o.match(/^Number$/i)===null?o.match(/^Boolean$/i)===null?o.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)===null?o.match(/^(Date|DateTime|DateTimeRfc1123)$/i)===null?o.match(/^UnixTime$/i)===null?o.match(/^ByteArray$/i)===null?o.match(/^Base64Url$/i)===null?o.match(/^Sequence$/i)===null?o.match(/^Dictionary$/i)!==null&&(a=bg(this,e,t,n,i)):a=xg(this,e,t,n,i):a=ng(t):a=Wh(t):a=ag(t):a=new Date(t):a=t:a=t===`true`?!0:t===`false`?!1:t:(a=parseFloat(t),isNaN(a)&&(a=t))}return e.isConstant&&(a=e.defaultValue),a}};function $h(e={},t=!1){return new Qh(e,t)}function eg(e,t){let n=e.length;for(;n-1>=0&&e[n-1]===t;)--n;return e.substr(0,n)}function tg(e){if(e){if(!(e instanceof Uint8Array))throw Error(`Please provide an input of type Uint8Array for converting to Base64Url.`);return eg(Uh(e),`=`).replace(/\+/g,`-`).replace(/\//g,`_`)}}function ng(e){if(e){if(e&&typeof e.valueOf()!=`string`)throw Error(`Please provide an input of type string for converting to Uint8Array`);return e=e.replace(/-/g,`+`).replace(/_/g,`/`),Wh(e)}}function rg(e){let t=[],n=``;if(e){let r=e.split(`.`);for(let e of r)e.charAt(e.length-1)===`\\`?n+=e.substr(0,e.length-1)+`.`:(n+=e,t.push(n),n=``)}return t}function ig(e){if(e)return typeof e.valueOf()==`string`&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}function ag(e){if(e)return new Date(e*1e3)}function og(e,t,n){if(n!=null){if(e.match(/^Number$/i)!==null){if(typeof n!=`number`)throw Error(`${t} with value ${n} must be of type number.`)}else if(e.match(/^String$/i)!==null){if(typeof n.valueOf()!=`string`)throw Error(`${t} with value "${n}" must be of type string.`)}else if(e.match(/^Uuid$/i)!==null){if(!(typeof n.valueOf()==`string`&&Yh(n)))throw Error(`${t} with value "${n}" must be of type string and a valid uuid.`)}else if(e.match(/^Boolean$/i)!==null){if(typeof n!=`boolean`)throw Error(`${t} with value ${n} must be of type boolean.`)}else if(e.match(/^Stream$/i)!==null){let e=typeof n;if(e!==`string`&&typeof n.pipe!=`function`&&typeof n.tee!=`function`&&!(n instanceof ArrayBuffer)&&!ArrayBuffer.isView(n)&&!((typeof Blob==`function`||typeof Blob==`object`)&&n instanceof Blob)&&e!==`function`)throw Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}}return n}function sg(e,t,n){if(!t)throw Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some(e=>typeof e.valueOf()==`string`?e.toLowerCase()===n.toLowerCase():e===n))throw Error(`${n} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return n}function cg(e,t){if(t!=null){if(!(t instanceof Uint8Array))throw Error(`${e} must be of type Uint8Array.`);t=Uh(t)}return t}function lg(e,t){if(t!=null){if(!(t instanceof Uint8Array))throw Error(`${e} must be of type Uint8Array.`);t=tg(t)}return t}function ug(e,t,n){if(t!=null){if(e.match(/^Date$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==`string`&&!isNaN(Date.parse(t))))throw Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(e.match(/^DateTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==`string`&&!isNaN(Date.parse(t))))throw Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(e.match(/^DateTimeRfc1123$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==`string`&&!isNaN(Date.parse(t))))throw Error(`${n} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(e.match(/^UnixTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==`string`&&!isNaN(Date.parse(t))))throw Error(`${n} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=ig(t)}else if(e.match(/^TimeSpan$/i)!==null&&!qh(t))throw Error(`${n} must be a string in ISO 8601 format. Instead was "${t}".`)}return t}function dg(e,t,n,r,i,a){if(!Array.isArray(n))throw Error(`${r} must be of type Array.`);let o=t.type.element;if(!o||typeof o!=`object`)throw Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}.`);o.type.name===`Composite`&&o.type.className&&(o=e.modelMappers[o.type.className]??o);let s=[];for(let t=0;te!==i)&&(o[i]=e.serialize(c,n[i],r+`["`+i+`"]`,a))}return o}return n}function _g(e,t,n,r){if(!n||!e.xmlNamespace)return t;let i={[e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:`xmlns`]:e.xmlNamespace};if([`Composite`].includes(e.type.name)){if(t.$)return t;{let e={...t};return e.$=i,e}}let a={};return a[r.xml.xmlCharKey]=t,a.$=i,a}function vg(e,t){return[`$`,t.xml.xmlCharKey].includes(e)}function yg(e,t,n,r,i){let a=i.xml.xmlCharKey??`_`;wg(e,t)&&(t=Cg(e,t,n,`serializedName`));let o=hg(e,t,r),s={},c=[];for(let l of Object.keys(o)){let u=o[l],d=rg(o[l].serializedName);c.push(d[0]);let{serializedName:f,xmlName:p,xmlElementName:m}=u,h=r;f!==``&&f!==void 0&&(h=r+`.`+f);let g=u.headerCollectionPrefix;if(g){let t={};for(let r of Object.keys(n))r.startsWith(g)&&(t[r.substring(g.length)]=e.deserialize(u.type.value,n[r],h,i)),c.push(r);s[l]=t}else if(e.isXML)if(u.xmlIsAttribute&&n.$)s[l]=e.deserialize(u,n.$[p],h,i);else if(u.xmlIsMsText)n[a]===void 0?typeof n==`string`&&(s[l]=n):s[l]=n[a];else{let t=m||p||f;if(u.xmlIsWrapped){let t=n[p]?.[m]??[];s[l]=e.deserialize(u,t,h,i),c.push(p)}else{let r=n[t];s[l]=e.deserialize(u,r,h,i),c.push(t)}}else{let r,a=n,c=0;for(let e of d){if(!a)break;c++,a=a[e]}a===null&&c{for(let t in o)if(rg(o[t].serializedName)[0]===e)return!1;return!0};for(let a in n)t(a)&&(s[a]=e.deserialize(l,n[a],r+`["`+a+`"]`,i))}else if(n&&!i.ignoreUnknownProperties)for(let e of Object.keys(n))s[e]===void 0&&!c.includes(e)&&!vg(e,i)&&(s[e]=n[e]);return s}function bg(e,t,n,r,i){let a=t.type.value;if(!a||typeof a!=`object`)throw Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}`);if(n){let t={};for(let o of Object.keys(n))t[o]=e.deserialize(a,n[o],r,i);return t}return n}function xg(e,t,n,r,i){let a=t.type.element;if(!a||typeof a!=`object`)throw Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}`);if(n){Array.isArray(n)||(n=[n]),a.type.name===`Composite`&&a.type.className&&(a=e.modelMappers[a.type.className]??a);let t=[];for(let o=0;o{Object.defineProperty(e,`__esModule`,{value:!0}),e.state=void 0,e.state={operationRequestMap:new WeakMap}}))().state;function Og(e,t,n){let r=t.parameterPath,i=t.mapper,a;if(typeof r==`string`&&(r=[r]),Array.isArray(r)){if(r.length>0)if(i.isConstant)a=i.defaultValue;else{let t=kg(e,r);!t.propertyFound&&n&&(t=kg(n,r));let o=!1;t.propertyFound||(o=i.required||r[0]===`options`&&r.length===2),a=o?i.defaultValue:t.propertyValue}}else{i.required&&(a={});for(let t in r){let o=i.type.modelProperties[t],s=r[t],c=Og(e,{parameterPath:s,mapper:o},n);c!==void 0&&(a||={},a[t]=c)}}return a}function kg(e,t){let n={propertyFound:!1},r=0;for(;r=200&&n.status<300);s.headersMapper&&(a.parsedHeaders=o.serializer.deserialize(s.headersMapper,a.headers.toJSON(),`operationRes.parsedHeaders`,{xml:{},ignoreUnknownProperties:!0}))}return a}function zg(e){let t=Object.keys(e.responses);return t.length===0||t.length===1&&t[0]===`default`}function Bg(e,t,n,r){let i=200<=e.status&&e.status<300;if(zg(t)?i:n)if(n){if(!n.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let a=n??t.responses.default,o=new gh(e.request.streamResponseStatusCodes?.has(e.status)?`Unexpected status code: ${e.status}`:e.bodyAsText,{statusCode:e.status,request:e.request,response:e});if(!a&&!(e.parsedBody?.error?.code&&e.parsedBody?.error?.message))throw o;let s=a?.bodyMapper,c=a?.headersMapper;try{if(e.parsedBody){let n=e.parsedBody,i;if(s){let e=n;if(t.isXML&&s.type.name===Eg.Sequence){e=[];let t=s.xmlElementName;typeof n==`object`&&t&&(e=n[t])}i=t.serializer.deserialize(s,e,`error.response.parsedBody`,r)}let a=n.error||i||n;o.code=a.code,a.message&&(o.message=a.message),s&&(o.response.parsedBody=i)}e.headers&&c&&(o.response.parsedHeaders=t.serializer.deserialize(c,e.headers.toJSON(),`operationRes.parsedHeaders`))}catch(t){o.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:o,shouldReturnResponse:!1}}async function Vg(e,t,n,r,i){if(!n.request.streamResponseStatusCodes?.has(n.status)&&n.bodyAsText){let a=n.bodyAsText,o=n.headers.get(`Content-Type`)||``,s=o?o.split(`;`).map(e=>e.toLowerCase()):[];try{if(s.length===0||s.some(t=>e.indexOf(t)!==-1))return n.parsedBody=JSON.parse(a),n;if(s.some(e=>t.indexOf(e)!==-1)){if(!i)throw Error(`Parsing XML not supported.`);return n.parsedBody=await i(a,r.xml),n}}catch(e){throw new gh(`Error "${e}" occurred while parsing the response body - ${n.bodyAsText}.`,{code:e.code||gh.PARSE_ERROR,statusCode:n.status,request:n.request,response:n})}}return n}function Hg(e){let t=new Set;for(let n in e.responses){let r=e.responses[n];r.bodyMapper&&r.bodyMapper.type.name===Eg.Stream&&t.add(Number(n))}return t}function Ug(e){let{parameterPath:t,mapper:n}=e,r;return r=typeof t==`string`?t:Array.isArray(t)?t.join(`.`):n.serializedName,r}function Wg(e={}){let t=e.stringifyXML;return{name:`serializationPolicy`,async sendRequest(e,n){let r=Mg(e),i=r?.operationSpec,a=r?.operationArguments;return i&&a&&(Gg(e,a,i),Kg(e,a,i,t)),n(e)}}}function Gg(e,t,n){if(n.headerParameters)for(let r of n.headerParameters){let i=Og(t,r);if(i!=null||r.mapper.required){i=n.serializer.serialize(r.mapper,i,Ug(r));let t=r.mapper.headerCollectionPrefix;if(t)for(let n of Object.keys(i))e.headers.set(t+n,i[n]);else e.headers.set(r.mapper.serializedName||Ug(r),i)}}let r=t.options?.requestOptions?.customHeaders;if(r)for(let t of Object.keys(r))e.headers.set(t,r[t])}function Kg(e,t,n,r=function(){throw Error(`XML serialization unsupported!`)}){let i=t.options?.serializerOptions,a={xml:{rootName:i?.xml.rootName??``,includeRoot:i?.xml.includeRoot??!1,xmlCharKey:i?.xml.xmlCharKey??`_`}},o=a.xml.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){e.body=Og(t,n.requestBody);let i=n.requestBody.mapper,{required:s,serializedName:c,xmlName:l,xmlElementName:u,xmlNamespace:d,xmlNamespacePrefix:f,nullable:p}=i,m=i.type.name;try{if(e.body!==void 0&&e.body!==null||p&&e.body===null||s){let t=Ug(n.requestBody);e.body=n.serializer.serialize(i,e.body,t,a);let s=m===Eg.Stream;if(n.isXML){let t=f?`xmlns:${f}`:`xmlns`,n=qg(d,t,m,e.body,a);m===Eg.Sequence?e.body=r(Jg(n,u||l||c,t,d),{rootName:l||c,xmlCharKey:o}):s||(e.body=r(n,{rootName:l||c,xmlCharKey:o}))}else if(m===Eg.String&&(n.contentType?.match(`text/plain`)||n.mediaType===`text`))return;else s||(e.body=JSON.stringify(e.body))}}catch(e){throw Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(c,void 0,` `)}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){e.formData={};for(let r of n.formDataParameters){let i=Og(t,r);if(i!=null){let t=r.mapper.serializedName||Ug(r);e.formData[t]=n.serializer.serialize(r.mapper,i,Ug(r),a)}}}}function qg(e,t,n,r,i){if(e&&![`Composite`,`Sequence`,`Dictionary`].includes(n)){let n={};return n[i.xml.xmlCharKey]=r,n.$={[t]:e},n}return r}function Jg(e,t,n,r){if(Array.isArray(e)||(e=[e]),!n||!r)return{[t]:e};let i={[t]:e};return i.$={[n]:r},i}function Yg(e={}){let t=Th(e??{});return e.credentialOptions&&t.addPolicy(Ih({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(Wg(e.serializationOptions),{phase:`Serialize`}),t.addPolicy(Fg(e.deserializationOptions),{phase:`Deserialize`}),t}let Xg;function Zg(){return Xg||=Eh(),Xg}const Qg={CSV:`,`,SSV:` `,Multi:`Multi`,TSV:` `,Pipes:`|`};function $g(e,t,n,r){let i=t_(t,n,r),a=!1,o=e_(e,i);if(t.path){let e=e_(t.path,i);t.path===`/{nextLink}`&&e.startsWith(`/`)&&(e=e.substring(1)),n_(e)?(o=e,a=!0):o=r_(o,e)}let{queryParams:s,sequenceParams:c}=i_(t,n,r);return o=o_(o,s,c,a),o}function e_(e,t){let n=e;for(let[e,r]of t)n=n.split(e).join(r);return n}function t_(e,t,n){let r=new Map;if(e.urlParameters?.length)for(let i of e.urlParameters){let a=Og(t,i,n),o=Ug(i);a=e.serializer.serialize(i.mapper,a,o),i.skipEncoding||(a=encodeURIComponent(a)),r.set(`{${i.mapper.serializedName||o}}`,a)}return r}function n_(e){return e.includes(`://`)}function r_(e,t){if(!t)return e;let n=new URL(e),r=n.pathname;r.endsWith(`/`)||(r=`${r}/`),t.startsWith(`/`)&&(t=t.substring(1));let i=t.indexOf(`?`);if(i!==-1){let e=t.substring(0,i),a=t.substring(i+1);r+=e,a&&(n.search=n.search?`${n.search}&${a}`:a)}else r+=t;return n.pathname=r,n.toString()}function i_(e,t,n){let r=new Map,i=new Set;if(e.queryParameters?.length)for(let a of e.queryParameters){a.mapper.type.name===`Sequence`&&a.mapper.serializedName&&i.add(a.mapper.serializedName);let o=Og(t,a,n);if(o!=null||a.mapper.required){o=e.serializer.serialize(a.mapper,o,Ug(a));let t=a.collectionFormat?Qg[a.collectionFormat]:``;if(Array.isArray(o)&&(o=o.map(e=>e??``)),a.collectionFormat===`Multi`&&o.length===0)continue;Array.isArray(o)&&(a.collectionFormat===`SSV`||a.collectionFormat===`TSV`)&&(o=o.join(t)),a.skipEncoding||(o=Array.isArray(o)?o.map(e=>encodeURIComponent(e)):encodeURIComponent(o)),Array.isArray(o)&&(a.collectionFormat===`CSV`||a.collectionFormat===`Pipes`)&&(o=o.join(t)),r.set(a.mapper.serializedName||Ug(a),o)}}return{queryParams:r,sequenceParams:i}}function a_(e){let t=new Map;if(!e||e[0]!==`?`)return t;e=e.slice(1);let n=e.split(`&`);for(let e of n){let[n,r]=e.split(`=`,2),i=t.get(n);i?Array.isArray(i)?i.push(r):t.set(n,[i,r]):t.set(n,r)}return t}function o_(e,t,n,r=!1){if(t.size===0)return e;let i=new URL(e),a=a_(i.search);for(let[e,i]of t){let t=a.get(e);if(Array.isArray(t))if(Array.isArray(i)){t.push(...i);let n=new Set(t);a.set(e,Array.from(n))}else t.push(i);else t?(Array.isArray(i)?i.unshift(t):n.has(e)&&a.set(e,[t,i]),r||a.set(e,i)):a.set(e,i)}let o=[];for(let[e,t]of a)if(typeof t==`string`)o.push(`${e}=${t}`);else if(Array.isArray(t))for(let n of t)o.push(`${e}=${n}`);else o.push(`${e}=${t}`);return i.search=o.length?`?${o.join(`&`)}`:``,i.toString()}const s_=Am(`core-client`);var c_=class{_endpoint;_requestContentType;_allowInsecureConnection;_httpClient;pipeline;constructor(e={}){if(this._requestContentType=e.requestContentType,this._endpoint=e.endpoint??e.baseUri,e.baseUri&&s_.warning(`The baseUri option for SDK Clients has been deprecated, please use endpoint instead.`),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||Zg(),this.pipeline=e.pipeline||l_(e),e.additionalPolicies?.length)for(let{policy:t,position:n}of e.additionalPolicies){let e=n===`perRetry`?`Sign`:void 0;this.pipeline.addPolicy(t,{afterPhase:e})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){let n=t.baseUrl||this._endpoint;if(!n)throw Error(`If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.`);let r=Oh({url:$g(n,t,e,this)});r.method=t.httpMethod;let i=Mg(r);i.operationSpec=t,i.operationArguments=e;let a=t.contentType||this._requestContentType;a&&t.requestBody&&r.headers.set(`Content-Type`,a);let o=e.options;if(o){let e=o.requestOptions;e&&(e.timeout&&(r.timeout=e.timeout),e.onUploadProgress&&(r.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(r.onDownloadProgress=e.onDownloadProgress),e.shouldDeserialize!==void 0&&(i.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(r.allowInsecureConnection=!0)),o.abortSignal&&(r.abortSignal=o.abortSignal),o.tracingOptions&&(r.tracingOptions=o.tracingOptions)}this._allowInsecureConnection&&(r.allowInsecureConnection=!0),r.streamResponseStatusCodes===void 0&&(r.streamResponseStatusCodes=Hg(t));try{let e=await this.sendRequest(r),n=Zh(e,t.responses[e.status]);return o?.onResponse&&o.onResponse(e,n),n}catch(e){if(typeof e==`object`&&e?.response){let n=e.response,r=Zh(n,t.responses[e.statusCode]||t.responses.default);e.details=r,o?.onResponse&&o.onResponse(n,r,e)}throw e}}};function l_(e){let t=u_(e),n=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return Yg({...e,credentialOptions:n})}function u_(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return`${e.endpoint}/.default`;if(e.baseUri)return`${e.baseUri}/.default`;if(e.credential&&!e.credentialScopes)throw Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`)}const d_={DefaultScope:`/.default`,HeaderConstants:{AUTHORIZATION:`authorization`}};function f_(e){return/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(e)}const p_=async e=>{let t=v_(e.request),n=g_(e.response);if(n){let r=__(n),i=h_(e,r),a=m_(r);if(!a)return!1;let o=await e.getAccessToken(i,{...t,tenantId:a});return o?(e.request.headers.set(d_.HeaderConstants.AUTHORIZATION,`${o.tokenType??`Bearer`} ${o.token}`),!0):!1}return!1};function m_(e){let t=new URL(e.authorization_uri).pathname.split(`/`)[1];if(t&&f_(t))return t}function h_(e,t){if(!t.resource_id)return e.scopes;let n=new URL(t.resource_id);n.pathname=d_.DefaultScope;let r=n.toString();return r===`https://disk.azure.com/.default`&&(r=`https://disk.azure.com//.default`),[r]}function g_(e){let t=e.headers.get(`WWW-Authenticate`);if(e.status===401&&t)return t}function __(e){return`${e.slice(7).trim()} `.split(` `).filter(e=>e).map(e=>(([e,t])=>({[e]:t}))(e.trim().split(`=`))).reduce((e,t)=>({...e,...t}),{})}function v_(e){return{abortSignal:e.abortSignal,requestOptions:{timeout:e.timeout},tracingOptions:e.tracingOptions}}const y_=Symbol(`Original PipelineRequest`),b_=Symbol.for(`@azure/core-client original request`);function x_(e,t={}){let n=e[y_],r=Dh(e.headers.toJson({preserveCase:!0}));if(n)return n.headers=r,n;{let n=Oh({url:e.url,method:e.method,headers:r,withCredentials:e.withCredentials,timeout:e.timeout,requestId:e.requestId,abortSignal:e.abortSignal,body:e.body,formData:e.formData,disableKeepAlive:!!e.keepAlive,onDownloadProgress:e.onDownloadProgress,onUploadProgress:e.onUploadProgress,proxySettings:e.proxySettings,streamResponseStatusCodes:e.streamResponseStatusCodes,agent:e.agent,requestOverrides:e.requestOverrides});return t.originalRequest&&(n[b_]=t.originalRequest),n}}function S_(e,t){let n=t?.originalRequest??e,r={url:e.url,method:e.method,headers:C_(e.headers),withCredentials:e.withCredentials,timeout:e.timeout,requestId:e.headers.get(`x-ms-client-request-id`)||e.requestId,abortSignal:e.abortSignal,body:e.body,formData:e.formData,keepAlive:!!e.disableKeepAlive,onDownloadProgress:e.onDownloadProgress,onUploadProgress:e.onUploadProgress,proxySettings:e.proxySettings,streamResponseStatusCodes:e.streamResponseStatusCodes,agent:e.agent,requestOverrides:e.requestOverrides,clone(){throw Error(`Cannot clone a non-proxied WebResourceLike`)},prepare(){throw Error(`WebResourceLike.prepare() is not supported by @azure/core-http-compat`)},validateRequestProperties(){}};return t?.createProxy?new Proxy(r,{get(t,i,a){return i===y_?e:i===`clone`?()=>S_(x_(r,{originalRequest:n}),{createProxy:!0,originalRequest:n}):Reflect.get(t,i,a)},set(t,n,r,i){return n===`keepAlive`&&(e.disableKeepAlive=!r),typeof n==`string`&&[`url`,`method`,`withCredentials`,`timeout`,`requestId`,`abortSignal`,`body`,`formData`,`onDownloadProgress`,`onUploadProgress`,`proxySettings`,`streamResponseStatusCodes`,`agent`,`requestOverrides`].includes(n)&&(e[n]=r),Reflect.set(t,n,r,i)}}):r}function C_(e){return new T_(e.toJSON({preserveCase:!0}))}function w_(e){return e.toLowerCase()}var T_=class e{_headersMap;constructor(e){if(this._headersMap={},e)for(let t in e)this.set(t,e[t])}set(e,t){this._headersMap[w_(e)]={name:e,value:t.toString()}}get(e){let t=this._headersMap[w_(e)];return t?t.value:void 0}contains(e){return!!this._headersMap[w_(e)]}remove(e){let t=this.contains(e);return delete this._headersMap[w_(e)],t}rawHeaders(){return this.toJson({preserveCase:!0})}headersArray(){let e=[];for(let t in this._headersMap)e.push(this._headersMap[t]);return e}headerNames(){let e=[],t=this.headersArray();for(let n=0;nO_(await e.sendRequest(S_(t,{createProxy:!0})))}}const P_=`:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD`;P_+``,``+P_;const F_=RegExp(`^[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`);function I_(e,t){let n=[],r=t.exec(e);for(;r;){let i=[];i.startIndex=t.lastIndex-r[0].length;let a=r.length;for(let e=0;e`&&e[a]!==` `&&e[a]!==` `&&e[a]!==` +`&&e[a]!==`\r`;a++)c+=e[a];if(c=c.trim(),c[c.length-1]===`/`&&(c=c.substring(0,c.length-1),a--),!$_(c)){let t;return t=c.trim().length===0?`Invalid space after '<'.`:`Tag '`+c+`' is an invalid name.`,Z_(`InvalidTag`,t,ev(e,a))}let l=K_(e,a);if(l===!1)return Z_(`InvalidAttr`,`Attributes for '`+c+`' have open quote.`,ev(e,a));let u=l.value;if(a=l.index,u[u.length-1]===`/`){let n=a-u.length;u=u.substring(0,u.length-1);let i=J_(u,t);if(i===!0)r=!0;else return Z_(i.err.code,i.err.msg,ev(e,n+i.err.line))}else if(s){if(!l.tagClosed)return Z_(`InvalidTag`,`Closing tag '`+c+`' doesn't have proper closing.`,ev(e,a));if(u.trim().length>0)return Z_(`InvalidTag`,`Closing tag '`+c+`' can't have attributes or invalid starting.`,ev(e,o));if(n.length===0)return Z_(`InvalidTag`,`Closing tag '`+c+`' has not been opened.`,ev(e,o));{let t=n.pop();if(c!==t.tagName){let n=ev(e,t.tagStartPos);return Z_(`InvalidTag`,`Expected closing tag '`+t.tagName+`' (opened in line `+n.line+`, col `+n.col+`) instead of closing tag '`+c+`'.`,ev(e,o))}n.length==0&&(i=!0)}}else{let s=J_(u,t);if(s!==!0)return Z_(s.err.code,s.err.msg,ev(e,a-u.length+s.err.line));if(i===!0)return Z_(`InvalidXml`,`Multiple possible root nodes found.`,ev(e,a));t.unpairedTags.indexOf(c)!==-1||n.push({tagName:c,tagStartPos:o}),r=!0}for(a++;a0?Z_(`InvalidXml`,`Invalid '`+JSON.stringify(n.map(e=>e.tagName),null,4).replace(/\r?\n/g,``)+`' found.`,{line:1,col:1}):!0:Z_(`InvalidXml`,`Start tag expected.`,1)}function U_(e){return e===` `||e===` `||e===` +`||e===`\r`}function W_(e,t){let n=t;for(;t5&&r===`xml`)return Z_(`InvalidXml`,`XML declaration allowed only at the start of the document.`,ev(e,t));if(e[t]==`?`&&e[t+1]==`>`){t++;break}else continue}return t}function G_(e,t){if(e.length>t+5&&e[t+1]===`-`&&e[t+2]===`-`){for(t+=3;t`){t+=2;break}}else if(e.length>t+8&&e[t+1]===`D`&&e[t+2]===`O`&&e[t+3]===`C`&&e[t+4]===`T`&&e[t+5]===`Y`&&e[t+6]===`P`&&e[t+7]===`E`){let n=1;for(t+=8;t`&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]===`[`&&e[t+2]===`C`&&e[t+3]===`D`&&e[t+4]===`A`&&e[t+5]===`T`&&e[t+6]===`A`&&e[t+7]===`[`){for(t+=8;t`){t+=2;break}}return t}function K_(e,t){let n=``,r=``,i=!1;for(;t`&&r===``){i=!0;break}n+=e[t]}return r===``?{value:n,index:t,tagClosed:i}:!1}const q_=RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,`g`);function J_(e,t){let n=I_(e,q_),r={};for(let e=0;e`,GT:`>`,quot:`"`,QUOT:`"`,apos:`'`,lsquo:`‘`,rsquo:`’`,ldquo:`“`,rdquo:`”`,lsquor:`‚`,rsquor:`’`,ldquor:`„`,bdquo:`„`,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:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,COPY:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,REG:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,half:`½`,frac34:`¾`,iquest:`¿`,times:`×`,div:`÷`,divide:`÷`},rv={Agrave:`À`,agrave:`à`,Aacute:`Á`,aacute:`á`,Acirc:`Â`,acirc:`â`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,Aring:`Å`,aring:`å`,AElig:`Æ`,aelig:`æ`,Ccedil:`Ç`,ccedil:`ç`,Egrave:`È`,egrave:`è`,Eacute:`É`,eacute:`é`,Ecirc:`Ê`,ecirc:`ê`,Euml:`Ë`,euml:`ë`,Igrave:`Ì`,igrave:`ì`,Iacute:`Í`,iacute:`í`,Icirc:`Î`,icirc:`î`,Iuml:`Ï`,iuml:`ï`,ETH:`Ð`,eth:`ð`,Ntilde:`Ñ`,ntilde:`ñ`,Ograve:`Ò`,ograve:`ò`,Oacute:`Ó`,oacute:`ó`,Ocirc:`Ô`,ocirc:`ô`,Otilde:`Õ`,otilde:`õ`,Ouml:`Ö`,ouml:`ö`,Oslash:`Ø`,oslash:`ø`,Ugrave:`Ù`,ugrave:`ù`,Uacute:`Ú`,uacute:`ú`,Ucirc:`Û`,ucirc:`û`,Uuml:`Ü`,uuml:`ü`,Yacute:`Ý`,yacute:`ý`,THORN:`Þ`,thorn:`þ`,szlig:`ß`,yuml:`ÿ`,Yuml:`Ÿ`},iv={Amacr:`Ā`,amacr:`ā`,Abreve:`Ă`,abreve:`ă`,Aogon:`Ą`,aogon:`ą`,Cacute:`Ć`,cacute:`ć`,Ccirc:`Ĉ`,ccirc:`ĉ`,Cdot:`Ċ`,cdot:`ċ`,Ccaron:`Č`,ccaron:`č`,Dcaron:`Ď`,dcaron:`ď`,Dstrok:`Đ`,dstrok:`đ`,Emacr:`Ē`,emacr:`ē`,Ecaron:`Ě`,ecaron:`ě`,Edot:`Ė`,edot:`ė`,Eogon:`Ę`,eogon:`ę`,Gcirc:`Ĝ`,gcirc:`ĝ`,Gbreve:`Ğ`,gbreve:`ğ`,Gdot:`Ġ`,gdot:`ġ`,Gcedil:`Ģ`,Hcirc:`Ĥ`,hcirc:`ĥ`,Hstrok:`Ħ`,hstrok:`ħ`,Itilde:`Ĩ`,itilde:`ĩ`,Imacr:`Ī`,imacr:`ī`,Iogon:`Į`,iogon:`į`,Idot:`İ`,IJlig:`IJ`,ijlig:`ij`,Jcirc:`Ĵ`,jcirc:`ĵ`,Kcedil:`Ķ`,kcedil:`ķ`,kgreen:`ĸ`,Lacute:`Ĺ`,lacute:`ĺ`,Lcedil:`Ļ`,lcedil:`ļ`,Lcaron:`Ľ`,lcaron:`ľ`,Lmidot:`Ŀ`,lmidot:`ŀ`,Lstrok:`Ł`,lstrok:`ł`,Nacute:`Ń`,nacute:`ń`,Ncaron:`Ň`,ncaron:`ň`,Ncedil:`Ņ`,ncedil:`ņ`,ENG:`Ŋ`,eng:`ŋ`,Omacr:`Ō`,omacr:`ō`,Odblac:`Ő`,odblac:`ő`,OElig:`Œ`,oelig:`œ`,Racute:`Ŕ`,racute:`ŕ`,Rcaron:`Ř`,rcaron:`ř`,Rcedil:`Ŗ`,rcedil:`ŗ`,Sacute:`Ś`,sacute:`ś`,Scirc:`Ŝ`,scirc:`ŝ`,Scedil:`Ş`,scedil:`ş`,Scaron:`Š`,scaron:`š`,Tcedil:`Ţ`,tcedil:`ţ`,Tcaron:`Ť`,tcaron:`ť`,Tstrok:`Ŧ`,tstrok:`ŧ`,Utilde:`Ũ`,utilde:`ũ`,Umacr:`Ū`,umacr:`ū`,Ubreve:`Ŭ`,ubreve:`ŭ`,Uring:`Ů`,uring:`ů`,Udblac:`Ű`,udblac:`ű`,Uogon:`Ų`,uogon:`ų`,Wcirc:`Ŵ`,wcirc:`ŵ`,Ycirc:`Ŷ`,ycirc:`ŷ`,Zacute:`Ź`,zacute:`ź`,Zdot:`Ż`,zdot:`ż`,Zcaron:`Ž`,zcaron:`ž`},av={Alpha:`Α`,alpha:`α`,Beta:`Β`,beta:`β`,Gamma:`Γ`,gamma:`γ`,Delta:`Δ`,delta:`δ`,Epsilon:`Ε`,epsilon:`ε`,epsiv:`ϵ`,varepsilon:`ϵ`,Zeta:`Ζ`,zeta:`ζ`,Eta:`Η`,eta:`η`,Theta:`Θ`,theta:`θ`,thetasym:`ϑ`,vartheta:`ϑ`,Iota:`Ι`,iota:`ι`,Kappa:`Κ`,kappa:`κ`,kappav:`ϰ`,varkappa:`ϰ`,Lambda:`Λ`,lambda:`λ`,Mu:`Μ`,mu:`μ`,Nu:`Ν`,nu:`ν`,Xi:`Ξ`,xi:`ξ`,Omicron:`Ο`,omicron:`ο`,Pi:`Π`,pi:`π`,piv:`ϖ`,varpi:`ϖ`,Rho:`Ρ`,rho:`ρ`,rhov:`ϱ`,varrho:`ϱ`,Sigma:`Σ`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,varsigma:`ς`,Tau:`Τ`,tau:`τ`,Upsilon:`Υ`,upsilon:`υ`,upsi:`υ`,Upsi:`ϒ`,upsih:`ϒ`,Phi:`Φ`,phi:`φ`,phiv:`ϕ`,varphi:`ϕ`,Chi:`Χ`,chi:`χ`,Psi:`Ψ`,psi:`ψ`,Omega:`Ω`,omega:`ω`,ohm:`Ω`,Gammad:`Ϝ`,gammad:`ϝ`,digamma:`ϝ`},ov={Afr:`𝔄`,afr:`𝔞`,Acy:`А`,acy:`а`,Bcy:`Б`,bcy:`б`,Vcy:`В`,vcy:`в`,Gcy:`Г`,gcy:`г`,Dcy:`Д`,dcy:`д`,IEcy:`Е`,iecy:`е`,IOcy:`Ё`,iocy:`ё`,ZHcy:`Ж`,zhcy:`ж`,Zcy:`З`,zcy:`з`,Icy:`И`,icy:`и`,Jcy:`Й`,jcy:`й`,Kcy:`К`,kcy:`к`,Lcy:`Л`,lcy:`л`,Mcy:`М`,mcy:`м`,Ncy:`Н`,ncy:`н`,Ocy:`О`,ocy:`о`,Pcy:`П`,pcy:`п`,Rcy:`Р`,rcy:`р`,Scy:`С`,scy:`с`,Tcy:`Т`,tcy:`т`,Ucy:`У`,ucy:`у`,Fcy:`Ф`,fcy:`ф`,KHcy:`Х`,khcy:`х`,TScy:`Ц`,tscy:`ц`,CHcy:`Ч`,chcy:`ч`,SHcy:`Ш`,shcy:`ш`,SHCHcy:`Щ`,shchcy:`щ`,HARDcy:`Ъ`,hardcy:`ъ`,Ycy:`Ы`,ycy:`ы`,SOFTcy:`Ь`,softcy:`ь`,Ecy:`Э`,ecy:`э`,YUcy:`Ю`,yucy:`ю`,YAcy:`Я`,yacy:`я`,DJcy:`Ђ`,djcy:`ђ`,GJcy:`Ѓ`,gjcy:`ѓ`,Jukcy:`Є`,jukcy:`є`,DScy:`Ѕ`,dscy:`ѕ`,Iukcy:`І`,iukcy:`і`,YIcy:`Ї`,yicy:`ї`,Jsercy:`Ј`,jsercy:`ј`,LJcy:`Љ`,ljcy:`љ`,NJcy:`Њ`,njcy:`њ`,TSHcy:`Ћ`,tshcy:`ћ`,KJcy:`Ќ`,kjcy:`ќ`,Ubrcy:`Ў`,ubrcy:`ў`,DZcy:`Џ`,dzcy:`џ`},sv={plus:`+`,minus:`−`,mnplus:`∓`,mp:`∓`,pm:`±`,times:`×`,div:`÷`,divide:`÷`,sdot:`⋅`,star:`☆`,starf:`★`,bigstar:`★`,lowast:`∗`,ast:`*`,midast:`*`,compfn:`∘`,smallcircle:`∘`,bullet:`•`,bull:`•`,nbsp:`\xA0`,hellip:`…`,mldr:`…`,prime:`′`,Prime:`″`,tprime:`‴`,bprime:`‵`,backprime:`‵`,minus:`−`,minusd:`∸`,dotminus:`∸`,plusdo:`∔`,dotplus:`∔`,plusmn:`±`,minusplus:`∓`,mnplus:`∓`,mp:`∓`,setminus:`∖`,smallsetminus:`∖`,Backslash:`∖`,setmn:`∖`,ssetmn:`∖`,lowbar:`_`,verbar:`|`,vert:`|`,VerticalLine:`|`,colon:`:`,Colon:`∷`,Proportion:`∷`,ratio:`∶`,equals:`=`,ne:`≠`,nequiv:`≢`,equiv:`≡`,Congruent:`≡`,sim:`∼`,thicksim:`∼`,thksim:`∼`,sime:`≃`,simeq:`≃`,TildeEqual:`≃`,asymp:`≈`,approx:`≈`,thickapprox:`≈`,thkap:`≈`,TildeTilde:`≈`,ncong:`≇`,cong:`≅`,TildeFullEqual:`≅`,asympeq:`≍`,CupCap:`≍`,bump:`≎`,Bumpeq:`≎`,HumpDownHump:`≎`,bumpe:`≏`,bumpeq:`≏`,HumpEqual:`≏`,dotminus:`∸`,minusd:`∸`,plusdo:`∔`,dotplus:`∔`,le:`≤`,LessEqual:`≤`,ge:`≥`,GreaterEqual:`≥`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,greater:`>`,less:`<`},cv={alefsym:`ℵ`,aleph:`ℵ`,beth:`ℶ`,gimel:`ℷ`,daleth:`ℸ`,forall:`∀`,ForAll:`∀`,part:`∂`,PartialD:`∂`,exist:`∃`,Exists:`∃`,nexist:`∄`,nexists:`∄`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,varnothing:`∅`,nabla:`∇`,Del:`∇`,isin:`∈`,isinv:`∈`,in:`∈`,Element:`∈`,notin:`∉`,notinva:`∉`,ni:`∋`,niv:`∋`,SuchThat:`∋`,ReverseElement:`∋`,notni:`∌`,notniva:`∌`,prod:`∏`,Product:`∏`,coprod:`∐`,Coproduct:`∐`,sum:`∑`,Sum:`∑`,minus:`−`,mp:`∓`,plusdo:`∔`,dotplus:`∔`,setminus:`∖`,lowast:`∗`,radic:`√`,Sqrt:`√`,prop:`∝`,propto:`∝`,Proportional:`∝`,varpropto:`∝`,infin:`∞`,infintie:`⧝`,ang:`∠`,angle:`∠`,angmsd:`∡`,measuredangle:`∡`,angsph:`∢`,mid:`∣`,VerticalBar:`∣`,nmid:`∤`,nsmid:`∤`,npar:`∦`,parallel:`∥`,spar:`∥`,nparallel:`∦`,nspar:`∦`,and:`∧`,wedge:`∧`,or:`∨`,vee:`∨`,cap:`∩`,cup:`∪`,int:`∫`,Integral:`∫`,conint:`∮`,ContourIntegral:`∮`,Conint:`∯`,DoubleContourIntegral:`∯`,Cconint:`∰`,there4:`∴`,therefore:`∴`,Therefore:`∴`,becaus:`∵`,because:`∵`,Because:`∵`,ratio:`∶`,Proportion:`∷`,minusd:`∸`,dotminus:`∸`,mDDot:`∺`,homtht:`∻`,sim:`∼`,bsimg:`∽`,backsim:`∽`,ac:`∾`,mstpos:`∾`,acd:`∿`,VerticalTilde:`≀`,wr:`≀`,wreath:`≀`,nsime:`≄`,nsimeq:`≄`,nsimeq:`≄`,ncong:`≇`,simne:`≆`,ncongdot:`⩭̸`,ngsim:`≵`,nsim:`≁`,napprox:`≉`,nap:`≉`,ngeq:`≱`,nge:`≱`,nleq:`≰`,nle:`≰`,ngtr:`≯`,ngt:`≯`,nless:`≮`,nlt:`≮`,nprec:`⊀`,npr:`⊀`,nsucc:`⊁`,nsc:`⊁`},lv={larr:`←`,leftarrow:`←`,LeftArrow:`←`,uarr:`↑`,uparrow:`↑`,UpArrow:`↑`,rarr:`→`,rightarrow:`→`,RightArrow:`→`,darr:`↓`,downarrow:`↓`,DownArrow:`↓`,harr:`↔`,leftrightarrow:`↔`,LeftRightArrow:`↔`,varr:`↕`,updownarrow:`↕`,UpDownArrow:`↕`,nwarr:`↖`,nwarrow:`↖`,UpperLeftArrow:`↖`,nearr:`↗`,nearrow:`↗`,UpperRightArrow:`↗`,searr:`↘`,searrow:`↘`,LowerRightArrow:`↘`,swarr:`↙`,swarrow:`↙`,LowerLeftArrow:`↙`,lArr:`⇐`,Leftarrow:`⇐`,uArr:`⇑`,Uparrow:`⇑`,rArr:`⇒`,Rightarrow:`⇒`,dArr:`⇓`,Downarrow:`⇓`,hArr:`⇔`,Leftrightarrow:`⇔`,iff:`⇔`,vArr:`⇕`,Updownarrow:`⇕`,lAarr:`⇚`,Lleftarrow:`⇚`,rAarr:`⇛`,Rrightarrow:`⇛`,lrarr:`⇆`,leftrightarrows:`⇆`,rlarr:`⇄`,rightleftarrows:`⇄`,lrhar:`⇋`,leftrightharpoons:`⇋`,ReverseEquilibrium:`⇋`,rlhar:`⇌`,rightleftharpoons:`⇌`,Equilibrium:`⇌`,udarr:`⇅`,UpArrowDownArrow:`⇅`,duarr:`⇵`,DownArrowUpArrow:`⇵`,llarr:`⇇`,leftleftarrows:`⇇`,rrarr:`⇉`,rightrightarrows:`⇉`,ddarr:`⇊`,downdownarrows:`⇊`,har:`↽`,lhard:`↽`,leftharpoondown:`↽`,lharu:`↼`,leftharpoonup:`↼`,rhard:`⇁`,rightharpoondown:`⇁`,rharu:`⇀`,rightharpoonup:`⇀`,lsh:`↰`,Lsh:`↰`,rsh:`↱`,Rsh:`↱`,ldsh:`↲`,rdsh:`↳`,hookleftarrow:`↩`,hookrightarrow:`↪`,mapstoleft:`↤`,mapstoup:`↥`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,crarr:`↵`,nwarrow:`↖`,nearrow:`↗`,searrow:`↘`,swarrow:`↙`,nleftarrow:`↚`,nleftrightarrow:`↮`,nrightarrow:`↛`,nrarr:`↛`,larrtl:`↢`,rarrtl:`↣`,leftarrowtail:`↢`,rightarrowtail:`↣`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,Larr:`↞`,Rarr:`↠`,larrhk:`↩`,rarrhk:`↪`,larrlp:`↫`,looparrowleft:`↫`,rarrlp:`↬`,looparrowright:`↬`,harrw:`↭`,leftrightsquigarrow:`↭`,nrarrw:`↝̸`,rarrw:`↝`,rightsquigarrow:`↝`,larrbfs:`⤟`,rarrbfs:`⤠`,nvHarr:`⤄`,nvlArr:`⤂`,nvrArr:`⤃`,larrfs:`⤝`,rarrfs:`⤞`,Map:`⤅`,larrsim:`⥳`,rarrsim:`⥴`,harrcir:`⥈`,Uarrocir:`⥉`,lurdshar:`⥊`,ldrdhar:`⥧`,ldrushar:`⥋`,rdldhar:`⥩`,lrhard:`⥭`,rlhar:`⇌`,uharr:`↾`,uharl:`↿`,dharr:`⇂`,dharl:`⇃`,Uarr:`↟`,Darr:`↡`,zigrarr:`⇝`,nwArr:`⇖`,neArr:`⇗`,seArr:`⇘`,swArr:`⇙`,nharr:`↮`,nhArr:`⇎`,nlarr:`↚`,nlArr:`⇍`,nrarr:`↛`,nrArr:`⇏`,larrb:`⇤`,LeftArrowBar:`⇤`,rarrb:`⇥`,RightArrowBar:`⇥`},uv={square:`□`,Square:`□`,squ:`□`,squf:`▪`,squarf:`▪`,blacksquar:`▪`,blacksquare:`▪`,FilledVerySmallSquare:`▪`,blk34:`▓`,blk12:`▒`,blk14:`░`,block:`█`,srect:`▭`,rect:`▭`,sdot:`⋅`,sdotb:`⊡`,dotsquare:`⊡`,triangle:`▵`,tri:`▵`,trine:`▵`,utri:`▵`,triangledown:`▿`,dtri:`▿`,tridown:`▿`,triangleleft:`◃`,ltri:`◃`,triangleright:`▹`,rtri:`▹`,blacktriangle:`▴`,utrif:`▴`,blacktriangledown:`▾`,dtrif:`▾`,blacktriangleleft:`◂`,ltrif:`◂`,blacktriangleright:`▸`,rtrif:`▸`,loz:`◊`,lozenge:`◊`,blacklozenge:`⧫`,lozf:`⧫`,bigcirc:`◯`,xcirc:`◯`,circ:`ˆ`,Circle:`○`,cir:`○`,o:`○`,bullet:`•`,bull:`•`,hellip:`…`,mldr:`…`,nldr:`‥`,boxh:`─`,HorizontalLine:`─`,boxv:`│`,boxdr:`┌`,boxdl:`┐`,boxur:`└`,boxul:`┘`,boxvr:`├`,boxvl:`┤`,boxhd:`┬`,boxhu:`┴`,boxvh:`┼`,boxH:`═`,boxV:`║`,boxdR:`╒`,boxDr:`╓`,boxDR:`╔`,boxDl:`╕`,boxdL:`╖`,boxDL:`╗`,boxuR:`╘`,boxUr:`╙`,boxUR:`╚`,boxUl:`╜`,boxuL:`╛`,boxUL:`╝`,boxvR:`╞`,boxVr:`╟`,boxVR:`╠`,boxVl:`╢`,boxvL:`╡`,boxVL:`╣`,boxHd:`╤`,boxhD:`╥`,boxHD:`╦`,boxHu:`╧`,boxhU:`╨`,boxHU:`╩`,boxvH:`╪`,boxVh:`╫`,boxVH:`╬`},dv={excl:`!`,iexcl:`¡`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,nbsp:`\xA0`,comma:`,`,period:`.`,colon:`:`,semi:`;`,vert:`|`,Verbar:`‖`,verbar:`|`,dblac:`˝`,circ:`ˆ`,caron:`ˇ`,breve:`˘`,dot:`˙`,ring:`˚`,ogon:`˛`,tilde:`˜`,DiacriticalGrave:"`",DiacriticalAcute:`´`,DiacriticalTilde:`˜`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,grave:"`",acute:`´`},fv={cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,euro:`€`,dollar:`$`,euro:`€`,fnof:`ƒ`,inr:`₹`,af:`؋`,birr:`ብር`,peso:`₱`,rub:`₽`,won:`₩`,yuan:`¥`,cedil:`¸`},pv={frac12:`½`,half:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`},mv={trade:`™`,TRADE:`™`,telrec:`⌕`,target:`⌖`,ulcorn:`⌜`,ulcorner:`⌜`,urcorn:`⌝`,urcorner:`⌝`,dlcorn:`⌞`,llcorner:`⌞`,drcorn:`⌟`,lrcorner:`⌟`,intercal:`⊺`,intcal:`⊺`,oplus:`⊕`,CirclePlus:`⊕`,ominus:`⊖`,CircleMinus:`⊖`,otimes:`⊗`,CircleTimes:`⊗`,osol:`⊘`,odot:`⊙`,CircleDot:`⊙`,oast:`⊛`,circledast:`⊛`,odash:`⊝`,circleddash:`⊝`,ocirc:`⊚`,circledcirc:`⊚`,boxplus:`⊞`,plusb:`⊞`,boxminus:`⊟`,minusb:`⊟`,boxtimes:`⊠`,timesb:`⊠`,boxdot:`⊡`,sdotb:`⊡`,veebar:`⊻`,vee:`∨`,barvee:`⊽`,and:`∧`,wedge:`∧`,Cap:`⋒`,Cup:`⋓`,Fork:`⋔`,pitchfork:`⋔`,epar:`⋕`,ltlarr:`⥶`,nvap:`≍⃒`,nvsim:`∼⃒`,nvge:`≥⃒`,nvle:`≤⃒`,nvlt:`<⃒`,nvgt:`>⃒`,nvltrie:`⊴⃒`,nvrtrie:`⊵⃒`,Vdash:`⊩`,dashv:`⊣`,vDash:`⊨`,Vdash:`⊩`,Vvdash:`⊪`,nvdash:`⊬`,nvDash:`⊭`,nVdash:`⊮`,nVDash:`⊯`};({...nv,...rv,...iv,...av,...ov,...sv,...cv,...lv,...uv,...dv,...fv,...pv,...mv});const hv={amp:`&`,apos:`'`,gt:`>`,lt:`<`,quot:`"`},gv={nbsp:`\xA0`,copy:`©`,reg:`®`,trade:`™`,mdash:`—`,ndash:`–`,hellip:`…`,laquo:`«`,raquo:`»`,lsquo:`‘`,rsquo:`’`,ldquo:`“`,rdquo:`”`,bull:`•`,para:`¶`,sect:`§`,deg:`°`,frac12:`½`,frac14:`¼`,frac34:`¾`},_v=new Set(`!?\\\\/[]$%{}^&*()<>|+`);function vv(e){if(e[0]===`#`)throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);for(let t of e)if(_v.has(t))throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);return e}function yv(...e){let t=Object.create(null);for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];if(typeof r==`string`)t[e]=r;else if(r&&typeof r==`object`&&r.val!==void 0){let n=r.val;typeof n==`string`&&(t[e]=n)}}return t}const bv=`external`,xv=`base`;function Sv(e){return!e||e===bv?new Set([bv]):e===`all`?new Set([`all`]):e===xv?new Set([xv]):Array.isArray(e)?new Set(e):new Set([bv])}const Cv=Object.freeze({allow:0,leave:1,remove:2,throw:3}),wv=new Set([9,10,13]);function Tv(e){if(!e)return{xmlVersion:1,onLevel:Cv.allow,nullLevel:Cv.remove};let t=e.xmlVersion===1.1?1.1:1,n=Cv[e.onNCR]??Cv.allow,r=Cv[e.nullNCR]??Cv.remove;return{xmlVersion:t,onLevel:n,nullLevel:Math.max(r,Cv.remove)}}var Ev=class{constructor(e={}){this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof e.postCheck==`function`?e.postCheck:e=>e,this._limitTiers=Sv(this._limit.applyLimitsTo??bv),this._numericAllowed=e.numericAllowed??!0,this._baseMap=yv(hv,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);let t=Tv(e.ncr);this._ncrXmlVersion=t.xmlVersion,this._ncrOnLevel=t.onLevel,this._ncrNullLevel=t.nullLevel}setExternalEntities(e){if(e)for(let t of Object.keys(e))vv(t);this._externalMap=yv(e)}addExternalEntity(e,t){vv(e),typeof t==`string`&&t.indexOf(`&`)===-1&&(this._externalMap[e]=t)}addInputEntities(e){this._totalExpansions=0,this._expandedLength=0,this._inputMap=yv(e)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=e===1.1?1.1:1}decode(e){if(typeof e!=`string`||e.length===0)return e;let t=e,n=[],r=e.length,i=0,a=0,o=this._maxTotalExpansions>0,s=this._maxExpandedLength>0,c=o||s;for(;a=r||e.charCodeAt(t)!==59){a++;continue}let l=e.slice(a+1,t);if(l.length===0){a++;continue}let u,d;if(this._removeSet.has(l))u=``,d===void 0&&(d=bv);else if(this._leaveSet.has(l)){a++;continue}else if(l.charCodeAt(0)===35){let e=this._resolveNCR(l);if(e===void 0){a++;continue}u=e,d=xv}else{let e=this._resolveName(l);u=e?.value,d=e?.tier}if(u===void 0){a++;continue}if(a>i&&n.push(e.slice(i,a)),n.push(u),i=t+1,a=i,c&&this._tierCounts(d)){if(o&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(s){let e=u.length-(l.length+2);if(e>0&&(this._expandedLength+=e,this._expandedLength>this._maxExpandedLength))throw Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}i=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!wv.has(e)?Cv.remove:-1}_applyNCRAction(e,t,n){switch(e){case Cv.allow:return String.fromCodePoint(n);case Cv.remove:return``;case Cv.leave:return;case Cv.throw:throw Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${n.toString(16).toUpperCase().padStart(4,`0`)})`);default:return String.fromCodePoint(n)}}_resolveNCR(e){let t=e.charCodeAt(1),n;if(n=t===120||t===88?parseInt(e.slice(2),16):parseInt(e.slice(1),10),Number.isNaN(n)||n<0||n>1114111)return;let r=this._classifyNCR(n);if(!this._numericAllowed&&rz_.includes(e)?`__`+e:e,Ov={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(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:Dv};function kv(e,t){if(typeof e!=`string`)return;let n=e.toLowerCase();if(z_.some(e=>n===e.toLowerCase())||B_.some(e=>n===e.toLowerCase()))throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function Av(e,t){return typeof e==`boolean`?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:`all`}:typeof e==`object`&&e?{enabled:e.enabled!==!1,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??1e3),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null,appliesTo:e.appliesTo??`all`}:Av(!0)}const jv=function(e){let t=Object.assign({},Ov,e),n=[{value:t.attributeNamePrefix,name:`attributeNamePrefix`},{value:t.attributesGroupName,name:`attributesGroupName`},{value:t.textNodeName,name:`textNodeName`},{value:t.cdataPropName,name:`cdataPropName`},{value:t.commentPropName,name:`commentPropName`}];for(let{value:e,name:t}of n)e&&kv(e,t);return t.onDangerousProperty===null&&(t.onDangerousProperty=Dv),t.processEntities=Av(t.processEntities,t.htmlEntities),t.unpairedTagsSet=new Set(t.unpairedTags),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),t};let Mv;Mv=typeof Symbol==`function`?Symbol(`XML Node Metadata`):`@@xmlMetadata`;var Nv=class{constructor(e){this.tagname=e,this.child=[],this[`:@`]=Object.create(null)}add(e,t){e===`__proto__`&&(e=`#__proto__`),this.child.push({[e]:t})}addChild(e,t){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}),t!==void 0&&(this.child[this.child.length-1][Mv]={startIndex:t})}static getMetaDataSymbol(){return Mv}},Pv=class{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){let n=Object.create(null),r=0;if(e[t+3]===`O`&&e[t+4]===`C`&&e[t+5]===`T`&&e[t+6]===`Y`&&e[t+7]===`P`&&e[t+8]===`E`){t+=9;let i=1,a=!1,o=!1,s=``;for(;t=this.options.maxEntityCount)throw Error(`Entity count (${r+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);n[i]=a,r++}}else if(a&&Iv(e,`!ELEMENT`,t)){t+=8;let{index:n}=this.readElementExp(e,t+1);t=n}else if(a&&Iv(e,`!ATTLIST`,t))t+=8;else if(a&&Iv(e,`!NOTATION`,t)){t+=9;let{index:n}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=n}else if(Iv(e,`!--`,t))o=!0;else throw Error(`Invalid DOCTYPE`);i++,s=``}else if(e[t]===`>`){if(o?e[t-1]===`-`&&e[t-2]===`-`&&(o=!1,i--):i--,i===0)break}else e[t]===`[`?a=!0:s+=e[t];if(i!==0)throw Error(`Unclosed DOCTYPE`)}else throw Error(`Invalid Tag instead of DOCTYPE`);return{entities:n,i:t}}readEntityExp(e,t){t=Fv(e,t);let n=t;for(;tthis.options.maxEntitySize)throw Error(`Entity "${r}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return t--,[r,i,t]}readNotationExp(e,t){t=Fv(e,t);let n=t;for(;t{for(;t1||a.length===1&&!s))return e;{let r=Number(n),s=String(r);if(r===0)return r;if(s.search(/[eE]/)!==-1)return t.eNotation?r:e;if(n.indexOf(`.`)!==-1)return s===`0`||s===o||s===`${i}${o}`?r:e;let c=a?o:n;return a?c===s||i+c===s?r:e:c===s||c===i+s?r:e}}else return e}}const Hv=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Uv(e,t,n){if(!n.eNotation)return e;let r=t.match(Hv);if(r){let i=r[1]||``,a=r[3].indexOf(`e`)===-1?`E`:`e`,o=r[2],s=i?e[o.length+1]===a:e[o.length]===a;return o.length>1&&s?e:o.length===1&&(r[3].startsWith(`.${a}`)||r[3][0]===a)?Number(t):o.length>0?n.leadingZeros&&!s?(t=(r[1]||``)+r[3],Number(t)):e:Number(t)}else return e}function Wv(e){return e&&e.indexOf(`.`)!==-1?(e=e.replace(/0+$/,``),e===`.`?e=`0`:e[0]===`.`?e=`0`+e:e[e.length-1]===`.`&&(e=e.substring(0,e.length-1)),e):e}function Gv(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw Error(`parseInt, Number.parseInt, window.parseInt are not supported`)}function Kv(e,t,n){let r=t===1/0;switch(n.infinity.toLowerCase()){case`null`:return null;case`infinity`:return t;case`string`:return r?`Infinity`:`-Infinity`;default:return e}}function qv(e){return typeof e==`function`?e:Array.isArray(e)?t=>{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}var Jv=class{constructor(e,t={},n){this.pattern=e,this.separator=t.separator||`.`,this.segments=this._parse(e),this.data=n,this._hasDeepWildcard=this.segments.some(e=>e.type===`deep-wildcard`),this._hasAttributeCondition=this.segments.some(e=>e.attrName!==void 0),this._hasPositionSelector=this.segments.some(e=>e.position!==void 0)}_parse(e){let t=[],n=0,r=``;for(;n0?e[e.length-1].tag:void 0}getCurrentNamespace(){let e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){let t=this._matcher.path;if(t.length!==0)return t[t.length-1].values?.[e]}hasAttr(e){let t=this._matcher.path;if(t.length===0)return!1;let n=t[t.length-1];return n.values!==void 0&&e in n.values}getPosition(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,t=!0){return this._matcher.toString(e,t)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}},Zv=class{constructor(e={}){this.separator=e.separator||`.`,this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new Xv(this)}push(e,t=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let r=this.path.length;this.siblingStacks[r]||(this.siblingStacks[r]=new Map);let i=this.siblingStacks[r],a=n?`${n}:${e}`:e,o=i.get(a)||0,s=0;for(let e of i.values())s+=e;i.set(a,o+1);let c={tag:e,position:s,counter:o};n!=null&&(c.namespace=n),t!=null&&(c.values=t),this.path.push(c)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){let t=this.path[this.path.length-1];e!=null&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let t=this.path[this.path.length-1];return t.values!==void 0&&e in t.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){let n=e||this.separator;if(n===this.separator&&t===!0){if(this._pathStringCache!==null)return this._pathStringCache;let e=this.path.map(e=>e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n);return this._pathStringCache=e,e}return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){let t=e.segments;return t.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t=0&&t>=0;){let r=e[n];if(r.type===`deep-wildcard`){if(n--,n<0)return!0;let r=e[n],i=!1;for(let e=t;e>=0;e--)if(this._matchSegment(r,this.path[e],e===this.path.length-1)){t=e-1,n--,i=!0;break}if(!i)return!1}else{if(!this._matchSegment(r,this.path[t],t===this.path.length-1))return!1;t--,n--}}return n<0}_matchSegment(e,t,n){if(e.tag!==`*`&&e.tag!==t.tag||e.namespace!==void 0&&e.namespace!==`*`&&e.namespace!==t.namespace||e.attrName!==void 0&&(!n||!t.values||!(e.attrName in t.values)||e.attrValue!==void 0&&String(t.values[e.attrName])!==String(e.attrValue)))return!1;if(e.position!==void 0){if(!n)return!1;let r=t.counter??0;if(e.position===`first`&&r!==0||e.position===`odd`&&r%2!=1||e.position===`even`&&r%2!=0||e.position===`nth`&&r!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>new Map(e))}readOnly(){return this._view}};function Qv(e,t){if(!e)return{};let n=t.attributesGroupName?e[t.attributesGroupName]:e;if(!n)return{};let r={};for(let e in n)if(e.startsWith(t.attributeNamePrefix)){let i=e.substring(t.attributeNamePrefix.length);r[i]=n[e]}else r[e]=n[e];return r}function $v(e){if(!e||typeof e!=`string`)return;let t=e.indexOf(`:`);if(t!==-1&&t>0){let n=e.substring(0,t);if(n!==`xmlns`)return n}}var ey=class{constructor(e,t){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=ay,this.parseTextData=ty,this.resolveNameSpace=ny,this.buildAttributesMap=iy,this.isItStopNode=ly,this.replaceEntitiesValue=sy,this.readStopNodeData=my,this.saveTextToParentTag=cy,this.addChild=oy,this.ignoreAttributesFn=qv(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0;let n={...hv};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities==`object`?n=this.options.htmlEntities:this.options.htmlEntities===!0&&(n={...gv,...fv}),this.entityDecoder=new Ev({namedEntities:{...n,...t},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new Zv,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new Yv;let r=this.options.stopNodes;if(r&&r.length>0){for(let e=0;e0)){o||(e=this.replaceEntitiesValue(e,t,n));let r=s.jPath?n.toString():n,c=s.tagValueProcessor(t,e,r,i,a);return c==null?e:typeof c!=typeof e||c!==e?c:s.trimValues||e.trim()===e?hy(e,s.parseTagValue,s.numberParseOptions):e}}function ny(e){if(this.options.removeNSPrefix){let t=e.split(`:`),n=e.charAt(0)===`/`?`/`:``;if(t[0]===`xmlns`)return``;t.length===2&&(e=n+t[1])}return e}const ry=RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,`gm`);function iy(e,t,n,r=!1){let i=this.options;if(r===!0||i.ignoreAttributes!==!0&&typeof e==`string`){let r=I_(e,ry),a=r.length,o={},s=Array(a),c=!1,l={};for(let e=0;e`,s,`Closing Tag is not closed.`),a=e.substring(s+2,t).trim();if(i.removeNSPrefix){let e=a.indexOf(`:`);e!==-1&&(a=a.substr(e+1))}a=gy(i.transformTagName,a,``,i).tagName,n&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher));let o=this.matcher.getCurrentTag();if(a&&i.unpairedTagsSet.has(a))throw Error(`Unpaired tag can not be used as closing tag: `);o&&i.unpairedTagsSet.has(o)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,n=this.tagsNodeStack.pop(),r=``,s=t}else if(c===63){let t=py(e,s,!1,`?>`);if(!t)throw Error(`Pi Tag is not closed.`);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let a=this.buildAttributesMap(t.tagExp,this.matcher,t.tagName,!0);if(a){let e=a[this.options.attributeNamePrefix+`version`];this.entityDecoder.setXmlVersion(Number(e)||1)}if(!(i.ignoreDeclaration&&t.tagName===`?xml`||i.ignorePiTags)){let e=new Nv(t.tagName);e.add(i.textNodeName,``),t.tagName!==t.tagExp&&t.attrExpPresent&&i.ignoreAttributes!==!0&&(e[`:@`]=a),this.addChild(n,e,this.readonlyMatcher,s)}s=t.closeIndex+1}else if(c===33&&e.charCodeAt(s+2)===45&&e.charCodeAt(s+3)===45){let t=dy(e,`-->`,s+4,`Comment is not closed.`);if(i.commentPropName){let a=e.substring(s+4,t-2);r=this.saveTextToParentTag(r,n,this.readonlyMatcher),n.add(i.commentPropName,[{[i.textNodeName]:a}])}s=t}else if(c===33&&e.charCodeAt(s+2)===68){let t=a.readDocType(e,s);this.entityDecoder.addInputEntities(t.entities),s=t.i}else if(c===33&&e.charCodeAt(s+2)===91){let t=dy(e,`]]>`,s,`CDATA is not closed.`)-2,a=e.substring(s+9,t);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let o=this.parseTextData(a,n.tagname,this.readonlyMatcher,!0,!1,!0,!0);o??=``,i.cdataPropName?n.add(i.cdataPropName,[{[i.textNodeName]:a}]):n.add(i.textNodeName,o),s=t+2}else{let a=py(e,s,i.removeNSPrefix);if(!a){let t=e.substring(Math.max(0,s-50),Math.min(o,s+50));throw Error(`readTagExp returned undefined at position ${s}. Context: "${t}"`)}let c=a.tagName,l=a.rawTagName,u=a.tagExp,d=a.attrExpPresent,f=a.closeIndex;if({tagName:c,tagExp:u}=gy(i.transformTagName,c,u,i),i.strictReservedNames&&(c===i.commentPropName||c===i.cdataPropName||c===i.textNodeName||c===i.attributesGroupName))throw Error(`Invalid tag name: ${c}`);n&&r&&n.tagname!==`!xml`&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher,!1));let p=n;p&&i.unpairedTagsSet.has(p.tagname)&&(n=this.tagsNodeStack.pop(),this.matcher.pop());let m=!1;u.length>0&&u.lastIndexOf(`/`)===u.length-1&&(m=!0,c[c.length-1]===`/`?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),d=c!==u);let h=null,g;g=$v(l),c!==t.tagname&&this.matcher.push(c,{},g),c!==u&&d&&(h=this.buildAttributesMap(u,this.matcher,c),h&&Qv(h,i)),c!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let v=s;if(this.isCurrentNodeStopNode){let t=``;if(m)s=a.closeIndex;else if(i.unpairedTagsSet.has(c))s=a.closeIndex;else{let n=this.readStopNodeData(e,l,f+1);if(!n)throw Error(`Unexpected end of ${l}`);s=n.i,t=n.tagContent}let r=new Nv(c);h&&(r[`:@`]=h),r.add(i.textNodeName,t),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(n,r,this.readonlyMatcher,v)}else{if(m){({tagName:c,tagExp:u}=gy(i.transformTagName,c,u,i));let e=new Nv(c);h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,v),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(i.unpairedTagsSet.has(c)){let e=new Nv(c);h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,v),this.matcher.pop(),this.isCurrentNodeStopNode=!1,s=a.closeIndex;continue}else{let e=new Nv(c);if(this.tagsNodeStack.length>i.maxNestedTags)throw Error(`Maximum nested tags exceeded`);this.tagsNodeStack.push(n),h&&(e[`:@`]=h),this.addChild(n,e,this.readonlyMatcher,v),n=e}r=``,s=f}}}else r+=e[s];return t.child};function oy(e,t,n,r){this.options.captureMetaData||(r=void 0);let i=this.options.jPath?n.toString():n,a=this.options.updateTag(t.tagname,i,t[`:@`]);a===!1||(typeof a==`string`&&(t.tagname=a),e.addChild(t,r))}function sy(e,t,n){let r=this.options.processEntities;if(!r||!r.enabled)return e;if(r.allowedTags){let i=this.options.jPath?n.toString():n;if(!(Array.isArray(r.allowedTags)?r.allowedTags.includes(t):r.allowedTags(t,i)))return e}if(r.tagFilter){let i=this.options.jPath?n.toString():n;if(!r.tagFilter(t,i))return e}return this.entityDecoder.decode(e)}function cy(e,t,n,r){return e&&=(r===void 0&&(r=t.child.length===0),e=this.parseTextData(e,t.tagname,n,!1,t[`:@`]?Object.keys(t[`:@`]).length!==0:!1,r),e!==void 0&&e!==``&&t.add(this.options.textNodeName,e),``),e}function ly(){return this.stopNodeExpressionsSet.size===0?!1:this.matcher.matchesAny(this.stopNodeExpressionsSet)}function uy(e,t,n=`>`){let r=0,i=e.length,a=n.charCodeAt(0),o=n.length>1?n.charCodeAt(1):-1,s=``,c=t;for(let n=t;n`){let i=uy(e,t+1,r);if(!i)return;let a=i.data,o=i.index,s=a.search(/\s/),c=a,l=!0;s!==-1&&(c=a.substring(0,s),a=a.substring(s+1).trimStart());let u=c;if(n){let e=c.indexOf(`:`);e!==-1&&(c=c.substr(e+1),l=c!==i.data.substr(e+1))}return{tagName:c,tagExp:a,closeIndex:o,attrExpPresent:l,rawTagName:u}}function my(e,t,n){let r=n,i=1,a=e.length;for(;n`,n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,i===0))return{tagContent:e.substring(r,n),i:a};n=a}else if(a===63)n=dy(e,`?>`,n+1,`StopNode is not closed.`);else if(a===33&&e.charCodeAt(n+2)===45&&e.charCodeAt(n+3)===45)n=dy(e,`-->`,n+3,`StopNode is not closed.`);else if(a===33&&e.charCodeAt(n+2)===91)n=dy(e,`]]>`,n,`StopNode is not closed.`)-2;else{let r=py(e,n,`>`);r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!==`/`&&i++,n=r.closeIndex)}}}function hy(e,t,n){if(t&&typeof e==`string`){let t=e.trim();return t===`true`?!0:t===`false`?!1:Vv(e,n)}else if(R_(e))return e;else return``}function gy(e,t,n,r){if(e){let r=e(t);n===t&&(n=r),t=r}return t=_y(t,r),{tagName:t,tagExp:n}}function _y(e,t){if(B_.includes(e))throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return z_.includes(e)?t.onDangerousProperty(e):e}const vy=Nv.getMetaDataSymbol();function yy(e,t){if(!e||typeof e!=`object`)return{};if(!t)return e;let n={};for(let r in e)if(r.startsWith(t)){let i=r.substring(t.length);n[i]=e[r]}else n[r]=e[r];return n}function by(e,t,n,r){return xy(e,t,n,r)}function xy(e,t,n,r){let i,a={};for(let o=0;o0&&(a[t.textNodeName]=i):i!==void 0&&(a[t.textNodeName]=i),a}function Sy(e){let t=Object.keys(e);for(let e=0;e0&&(n=` +`);let r=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let e=0;et.maxNestedTags)throw Error(`Maximum nested tags exceeded`);if(!Array.isArray(e)){if(e!=null){let n=e.toString();return n=Py(n,t),n}return``}for(let s=0;s/g,`]]]]>`);a+=``,o=!1,r.pop();continue}else if(l===t.commentPropName){let e=c[l][0][t.textNodeName],i=String(e).replace(/--/g,`- -`).replace(/-$/,`- `);a+=n+``,o=!0,r.pop();continue}else if(l[0]===`?`){let e=My(c[`:@`],t,d),i=l===`?xml`?``:n,s=c[l][0][t.textNodeName];s=s.length===0?``:` `+s,a+=i+`<${l}${s}${e}?>`,o=!0,r.pop();continue}let f=n;f!==``&&(f+=t.indentBy);let p=n+`<${l}${My(c[`:@`],t,d)}`,m;m=d?ky(c[l],t):Dy(c[l],t,f,r,i),t.unpairedTags.indexOf(l)===-1?(!m||m.length===0)&&t.suppressEmptyNode?a+=p+`/>`:m&&m.endsWith(`>`)?a+=p+`>${m}${n}`:(a+=p+`>`,m&&n!==``&&(m.includes(`/>`)||m.includes(``):t.suppressUnpairedNode?a+=p+`>`:a+=p+`/>`,o=!0,r.pop()}return a}function Oy(e,t){if(!e||t.ignoreAttributes)return null;let n={},r=!1;for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let a=i.startsWith(t.attributeNamePrefix)?i.substr(t.attributeNamePrefix.length):i;n[a]=e[i],r=!0}return r?n:null}function ky(e,t){if(!Array.isArray(e))return e==null?``:e.toString();let n=``;for(let r=0;r`:n+=`<${a}${e}>${r}`}}return n}function Ay(e,t){let n=``;if(e&&!t.ignoreAttributes)for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=e[r];i===!0&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function jy(e){let t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}const Iy={attributeNamePrefix:`@_`,attributesGroupName:!1,textNodeName:`#text`,ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:` `,suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp(`&`,`g`),val:`&`},{regex:RegExp(`>`,`g`),val:`>`},{regex:RegExp(`<`,`g`),val:`<`},{regex:RegExp(`'`,`g`),val:`'`},{regex:RegExp(`"`,`g`),val:`"`}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function Ly(e){if(this.options=Object.assign({},Iy,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e `,this.newLine=` -`):(this.indentate=function(){return``},this.tagEndChar=`>`,this.newLine=``)}Vh.prototype.build=function(e){if(this.options.preserveOrder)return Ah(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});let t=new eh;return this.j2x(e,0,t).val}},Vh.prototype.j2x=function(e,t,n){let r=``,i=``;if(this.options.maxNestedTags&&n.getDepth()>=this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);let a=this.options.jPath?n.toString():n,o=this.checkStopNode(n);for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(e[s]===void 0)this.isAttribute(s)&&(i+=``);else if(e[s]===null)this.isAttribute(s)||s===this.options.cdataPropName?i+=``:s[0]===`?`?i+=this.indentate(t)+`<`+s+`?`+this.tagEndChar:i+=this.indentate(t)+`<`+s+`/`+this.tagEndChar;else if(e[s]instanceof Date)i+=this.buildTextValNode(e[s],s,``,t,n);else if(typeof e[s]!=`object`){let c=this.isAttribute(s);if(c&&!this.ignoreAttributesFn(c,a))r+=this.buildAttrPairStr(c,``+e[s],o);else if(!c)if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,``+e[s]);i+=this.replaceEntitiesValue(t)}else{n.push(s);let r=this.checkStopNode(n);if(n.pop(),r){let n=``+e[s];n===``?i+=this.indentate(t)+`<`+s+this.closeTag(s)+this.tagEndChar:i+=this.indentate(t)+`<`+s+`>`+n+``+e+`${e}`;else if(typeof e==`object`&&e){let r=this.buildRawContent(e),i=this.buildAttributesForStopNode(e);r===``?t+=`<${n}${i}/>`:t+=`<${n}${i}>${r}`}}else if(typeof r==`object`&&r){let e=this.buildRawContent(r),i=this.buildAttributesForStopNode(r);e===``?t+=`<${n}${i}/>`:t+=`<${n}${i}>${e}`}else t+=`<${n}>${r}`}return t},Vh.prototype.buildAttributesForStopNode=function(e){if(!e||typeof e!=`object`)return``;let t=``;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){let n=e[this.options.attributesGroupName];for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;let r=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,i=n[e];i===!0&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+i+`"`}}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=this.isAttribute(n);if(r){let i=e[n];i===!0&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+i+`"`}}return t},Vh.prototype.buildObjectNode=function(e,t,n,r){if(e===``)return t[0]===`?`?this.indentate(r)+`<`+t+n+`?`+this.tagEndChar:this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar;{let i=``+e+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&a.length===0?this.indentate(r)+``+this.newLine:this.indentate(r)+`<`+t+n+a+this.tagEndChar+e+this.indentate(r)+i}},Vh.prototype.closeTag=function(e){let t=``;return this.options.unpairedTags.indexOf(e)===-1?t=this.options.suppressEmptyNode?`/`:`>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(r)+``+this.newLine;if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),i===``?this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+`<`+t+n+`>`+i+`0&&this.options.processEntities)for(let t=0;t${r.build(i)}`.replace(/\n/g,``)}async function Zh(e,t={}){if(!e)throw Error(`Document is empty`);let n=Kh.validate(e);if(n!==!0)throw n;let r=new kh(Yh(t)).parse(e);if(r[`?xml`]&&delete r[`?xml`],!t.includeRoot)for(let e of Object.keys(r)){let t=r[e];return typeof t==`object`?Object.assign({},t):t}return r}const Qh=id(`storage-blob`);var $h=class extends W{buffers;byteLength;byteOffsetInCurrentBuffer;bufferIndex;pushedBytesLength;constructor(e,t,n){super(n),this.buffers=e,this.byteLength=t,this.byteOffsetInCurrentBuffer=0,this.bufferIndex=0,this.pushedBytesLength=0;let r=0;for(let e of this.buffers)r+=e.byteLength;if(r=this.byteLength&&this.push(null),e||=this.readableHighWaterMark;let t=[],n=0;for(;ne-n){let r=this.byteOffsetInCurrentBuffer+e-n;t.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer,r)),this.pushedBytesLength+=e-n,this.byteOffsetInCurrentBuffer=r,n=e;break}else{let e=this.byteOffsetInCurrentBuffer+a;t.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer,e)),a===i?(this.byteOffsetInCurrentBuffer=0,this.bufferIndex++):this.byteOffsetInCurrentBuffer=e,this.pushedBytesLength+=a,n+=a}}t.length>1?this.push(Buffer.concat(t)):t.length===1&&this.push(t[0])}};const eg=Ae.constants.MAX_LENGTH;var tg=class{buffers=[];capacity;_size;get size(){return this._size}constructor(e,t,n){this.capacity=e,this._size=0;let r=Math.ceil(e/eg);for(let t=0;t0&&(e[0]=e[0].slice(a))}getReadableStream(){return new $h(this.buffers,this.size)}},ng=class{bufferSize;maxBuffers;readable;outgoingHandler;emitter=new Ce;concurrency;offset=0;isStreamEnd=!1;isError=!1;executingOutgoingHandlers=0;encoding;numBuffers=0;unresolvedDataArray=[];unresolvedLength=0;incoming=[];outgoing=[];constructor(e,t,n,r,i,a){if(t<=0)throw RangeError(`bufferSize must be larger than 0, current is ${t}`);if(n<=0)throw RangeError(`maxBuffers must be larger than 0, current is ${n}`);if(i<=0)throw RangeError(`concurrency must be larger than 0, current is ${i}`);this.bufferSize=t,this.maxBuffers=n,this.readable=e,this.outgoingHandler=r,this.concurrency=i,this.encoding=a}async do(){return new Promise((e,t)=>{this.readable.on(`data`,e=>{e=typeof e==`string`?Buffer.from(e,this.encoding):e,this.appendUnresolvedData(e),this.resolveData()||this.readable.pause()}),this.readable.on(`error`,e=>{this.emitter.emit(`error`,e)}),this.readable.on(`end`,()=>{this.isStreamEnd=!0,this.emitter.emit(`checkEnd`)}),this.emitter.on(`error`,e=>{this.isError=!0,this.readable.pause(),t(e)}),this.emitter.on(`checkEnd`,()=>{if(this.outgoing.length>0){this.triggerOutgoingHandlers();return}if(this.isStreamEnd&&this.executingOutgoingHandlers===0)if(this.unresolvedLength>0&&this.unresolvedLengthn.getReadableStream(),n.size,this.offset).then(e).catch(t)}else if(this.unresolvedLength>=this.bufferSize)return;else e()})})}appendUnresolvedData(e){this.unresolvedDataArray.push(e),this.unresolvedLength+=e.length}shiftBufferFromUnresolvedDataArray(e){return e?e.fill(this.unresolvedDataArray,this.unresolvedLength):e=new tg(this.bufferSize,this.unresolvedDataArray,this.unresolvedLength),this.unresolvedLength-=e.size,e}resolveData(){for(;this.unresolvedLength>=this.bufferSize;){let e;if(this.incoming.length>0)e=this.incoming.shift(),this.shiftBufferFromUnresolvedDataArray(e);else if(this.numBuffers=this.concurrency)return;e=this.outgoing.shift(),e&&this.triggerOutgoingHandler(e)}while(e)}async triggerOutgoingHandler(e){let t=e.size;this.executingOutgoingHandlers++,this.offset+=t;try{await this.outgoingHandler(()=>e.getReadableStream(),t,this.offset-t)}catch(e){this.emitter.emit(`error`,e);return}this.executingOutgoingHandlers--,this.reuseBuffer(e),this.emitter.emit(`checkEnd`)}reuseBuffer(e){this.incoming.push(e),!this.isError&&this.resolveData()&&!this.isStreamEnd&&this.readable.resume()}};let rg;function ig(){return rg||=ef(),rg}var ag=class{_nextPolicy;_options;constructor(e,t){this._nextPolicy=e,this._options=t}shouldLog(e){return this._options.shouldLog(e)}log(e,t){this._options.log(e,t)}};const og={Parameters:{FORCE_BROWSER_NO_CACHE:`_`,SIGNATURE:`sig`,SNAPSHOT:`snapshot`,VERSIONID:`versionid`,TIMEOUT:`timeout`}},sg={AUTHORIZATION:`Authorization`,AUTHORIZATION_SCHEME:`Bearer`,CONTENT_ENCODING:`Content-Encoding`,CONTENT_ID:`Content-ID`,CONTENT_LANGUAGE:`Content-Language`,CONTENT_LENGTH:`Content-Length`,CONTENT_MD5:`Content-Md5`,CONTENT_TRANSFER_ENCODING:`Content-Transfer-Encoding`,CONTENT_TYPE:`Content-Type`,COOKIE:`Cookie`,DATE:`date`,IF_MATCH:`if-match`,IF_MODIFIED_SINCE:`if-modified-since`,IF_NONE_MATCH:`if-none-match`,IF_UNMODIFIED_SINCE:`if-unmodified-since`,PREFIX_FOR_STORAGE:`x-ms-`,RANGE:`Range`,USER_AGENT:`User-Agent`,X_MS_CLIENT_REQUEST_ID:`x-ms-client-request-id`,X_MS_COPY_SOURCE:`x-ms-copy-source`,X_MS_DATE:`x-ms-date`,X_MS_ERROR_CODE:`x-ms-error-code`,X_MS_VERSION:`x-ms-version`,X_MS_CopySourceErrorCode:`x-ms-copy-source-error-code`};function cg(e,t,n){let r=new URL(e),i=encodeURIComponent(t),a=n?encodeURIComponent(n):void 0,o=r.search===``?`?`:r.search,s=[];for(let e of o.slice(1).split(`&`))if(e){let[t]=e.split(`=`,2);t!==i&&s.push(e)}return a&&s.push(`${i}=${a}`),r.search=s.length?`?${s.join(`&`)}`:``,r.toString()}function lg(e,t){let n=new URL(e);return n.hostname=t,n.toString()}function ug(e){try{return new URL(e).pathname}catch{return}}function dg(e){let t=new URL(e).search;if(!t)return{};t=t.trim(),t=t.startsWith(`?`)?t.substring(1):t;let n=t.split(`&`);n=n.filter(e=>{let t=e.indexOf(`=`),n=e.lastIndexOf(`=`);return t>0&&t===n&&n{let a,o=()=>{a!==void 0&&clearTimeout(a),i(n)};a=setTimeout(()=>{t!==void 0&&t.removeEventListener(`abort`,o),r()},e),t!==void 0&&t.addEventListener(`abort`,o)})}var pg=class extends ag{constructor(e,t){super(e,t)}async sendRequest(e){return Sd?this._nextPolicy.sendRequest(e):((e.method.toUpperCase()===`GET`||e.method.toUpperCase()===`HEAD`)&&(e.url=cg(e.url,og.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),e.headers.remove(sg.COOKIE),e.headers.remove(sg.CONTENT_LENGTH),this._nextPolicy.sendRequest(e))}},mg=class{create(e,t){return new pg(e,t)}},hg=class extends ag{sendRequest(e){return this._nextPolicy.sendRequest(this.signRequest(e))}signRequest(e){return e}},gg=class extends hg{constructor(e,t){super(e,t)}},_g=class{create(e,t){throw Error(`Method should be implemented in children classes.`)}},vg=class extends _g{create(e,t){return new gg(e,t)}};const yg=new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1820,0,1823,1825,1827,1829,0,0,0,1837,2051,0,0,1843,0,3331,3354,3356,3358,3360,3362,3364,3366,3368,3370,0,0,0,0,0,0,0,3586,3593,3594,3610,3617,3619,3621,3628,3634,3637,3638,3656,3665,3696,3708,3710,3721,3722,3729,3737,3743,3746,3748,3750,3751,3753,0,0,0,1859,1860,1864,3586,3593,3594,3610,3617,3619,3621,3628,3634,3637,3638,3656,3665,3696,3708,3710,3721,3722,3729,3737,3743,3746,3748,3750,3751,3753,0,1868,0,1872,0]),bg=new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),xg=new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32786,0,0,0,0,0,33298,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function Sg(e,t){return Cg(e,t)?-1:1}function Cg(e,t){let n=[yg,bg,xg],r=0,i=0,a=0;for(;ra;let o=i0&&e.headers.set(sg.CONTENT_LENGTH,Buffer.byteLength(e.body));let t=[e.method.toUpperCase(),this.getHeaderValueToSign(e,sg.CONTENT_LANGUAGE),this.getHeaderValueToSign(e,sg.CONTENT_ENCODING),this.getHeaderValueToSign(e,sg.CONTENT_LENGTH),this.getHeaderValueToSign(e,sg.CONTENT_MD5),this.getHeaderValueToSign(e,sg.CONTENT_TYPE),this.getHeaderValueToSign(e,sg.DATE),this.getHeaderValueToSign(e,sg.IF_MODIFIED_SINCE),this.getHeaderValueToSign(e,sg.IF_MATCH),this.getHeaderValueToSign(e,sg.IF_NONE_MATCH),this.getHeaderValueToSign(e,sg.IF_UNMODIFIED_SINCE),this.getHeaderValueToSign(e,sg.RANGE)].join(` +`):(this.indentate=function(){return``},this.tagEndChar=`>`,this.newLine=``)}Ly.prototype.build=function(e){if(this.options.preserveOrder)return Ey(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});let t=new Zv;return this.j2x(e,0,t).val}},Ly.prototype.j2x=function(e,t,n){let r=``,i=``;if(this.options.maxNestedTags&&n.getDepth()>=this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);let a=this.options.jPath?n.toString():n,o=this.checkStopNode(n);for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(e[s]===void 0)this.isAttribute(s)&&(i+=``);else if(e[s]===null)this.isAttribute(s)||s===this.options.cdataPropName?i+=``:s[0]===`?`?i+=this.indentate(t)+`<`+s+`?`+this.tagEndChar:i+=this.indentate(t)+`<`+s+`/`+this.tagEndChar;else if(e[s]instanceof Date)i+=this.buildTextValNode(e[s],s,``,t,n);else if(typeof e[s]!=`object`){let c=this.isAttribute(s);if(c&&!this.ignoreAttributesFn(c,a))r+=this.buildAttrPairStr(c,``+e[s],o);else if(!c)if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,``+e[s]);i+=this.replaceEntitiesValue(t)}else{n.push(s);let r=this.checkStopNode(n);if(n.pop(),r){let n=``+e[s];n===``?i+=this.indentate(t)+`<`+s+this.closeTag(s)+this.tagEndChar:i+=this.indentate(t)+`<`+s+`>`+n+``+e+`${e}`;else if(typeof e==`object`&&e){let r=this.buildRawContent(e),i=this.buildAttributesForStopNode(e);r===``?t+=`<${n}${i}/>`:t+=`<${n}${i}>${r}`}}else if(typeof r==`object`&&r){let e=this.buildRawContent(r),i=this.buildAttributesForStopNode(r);e===``?t+=`<${n}${i}/>`:t+=`<${n}${i}>${e}`}else t+=`<${n}>${r}`}return t},Ly.prototype.buildAttributesForStopNode=function(e){if(!e||typeof e!=`object`)return``;let t=``;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){let n=e[this.options.attributesGroupName];for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;let r=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,i=n[e];i===!0&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+i+`"`}}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=this.isAttribute(n);if(r){let i=e[n];i===!0&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+i+`"`}}return t},Ly.prototype.buildObjectNode=function(e,t,n,r){if(e===``)return t[0]===`?`?this.indentate(r)+`<`+t+n+`?`+this.tagEndChar:this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar;{let i=``+e+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&a.length===0?this.indentate(r)+``+this.newLine:this.indentate(r)+`<`+t+n+a+this.tagEndChar+e+this.indentate(r)+i}},Ly.prototype.closeTag=function(e){let t=``;return this.options.unpairedTags.indexOf(e)===-1?t=this.options.suppressEmptyNode?`/`:`>/g,`]]]]>`);return this.indentate(r)+``+this.newLine}else if(this.options.commentPropName!==!1&&t===this.options.commentPropName){let t=String(e).replace(/--/g,`- -`).replace(/-$/,`- `);return this.indentate(r)+``+this.newLine}else if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;else{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),i===``?this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+`<`+t+n+`>`+i+`0&&this.options.processEntities)for(let t=0;t${r.build(i)}`.replace(/\n/g,``)}async function qy(e,t={}){if(!e)throw Error(`Document is empty`);let n=Hy.validate(e);if(n!==!0)throw n;let r=new Ty(Gy(t)).parse(e);if(r[`?xml`]&&delete r[`?xml`],!t.includeRoot)for(let e of Object.keys(r)){let t=r[e];return typeof t==`object`?Object.assign({},t):t}return r}const Jy=Am(`storage-blob`);var Yy=class extends W{buffers;byteLength;byteOffsetInCurrentBuffer;bufferIndex;pushedBytesLength;constructor(e,t,n){super(n),this.buffers=e,this.byteLength=t,this.byteOffsetInCurrentBuffer=0,this.bufferIndex=0,this.pushedBytesLength=0;let r=0;for(let e of this.buffers)r+=e.byteLength;if(r=this.byteLength&&this.push(null),e||=this.readableHighWaterMark;let t=[],n=0;for(;ne-n){let r=this.byteOffsetInCurrentBuffer+e-n;t.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer,r)),this.pushedBytesLength+=e-n,this.byteOffsetInCurrentBuffer=r,n=e;break}else{let e=this.byteOffsetInCurrentBuffer+a;t.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer,e)),a===i?(this.byteOffsetInCurrentBuffer=0,this.bufferIndex++):this.byteOffsetInCurrentBuffer=e,this.pushedBytesLength+=a,n+=a}}t.length>1?this.push(Buffer.concat(t)):t.length===1&&this.push(t[0])}};const Xy=Ae.constants.MAX_LENGTH;var Zy=class{buffers=[];capacity;_size;get size(){return this._size}constructor(e,t,n){this.capacity=e,this._size=0;let r=Math.ceil(e/Xy);for(let t=0;t0&&(e[0]=e[0].slice(a))}getReadableStream(){return new Yy(this.buffers,this.size)}},Qy=class{bufferSize;maxBuffers;readable;outgoingHandler;emitter=new Ce;concurrency;offset=0;isStreamEnd=!1;isError=!1;executingOutgoingHandlers=0;encoding;numBuffers=0;unresolvedDataArray=[];unresolvedLength=0;incoming=[];outgoing=[];constructor(e,t,n,r,i,a){if(t<=0)throw RangeError(`bufferSize must be larger than 0, current is ${t}`);if(n<=0)throw RangeError(`maxBuffers must be larger than 0, current is ${n}`);if(i<=0)throw RangeError(`concurrency must be larger than 0, current is ${i}`);this.bufferSize=t,this.maxBuffers=n,this.readable=e,this.outgoingHandler=r,this.concurrency=i,this.encoding=a}async do(){return new Promise((e,t)=>{this.readable.on(`data`,e=>{e=typeof e==`string`?Buffer.from(e,this.encoding):e,this.appendUnresolvedData(e),this.resolveData()||this.readable.pause()}),this.readable.on(`error`,e=>{this.emitter.emit(`error`,e)}),this.readable.on(`end`,()=>{this.isStreamEnd=!0,this.emitter.emit(`checkEnd`)}),this.emitter.on(`error`,e=>{this.isError=!0,this.readable.pause(),t(e)}),this.emitter.on(`checkEnd`,()=>{if(this.outgoing.length>0){this.triggerOutgoingHandlers();return}if(this.isStreamEnd&&this.executingOutgoingHandlers===0)if(this.unresolvedLength>0&&this.unresolvedLengthn.getReadableStream(),n.size,this.offset).then(e).catch(t)}else if(this.unresolvedLength>=this.bufferSize)return;else e()})})}appendUnresolvedData(e){this.unresolvedDataArray.push(e),this.unresolvedLength+=e.length}shiftBufferFromUnresolvedDataArray(e){return e?e.fill(this.unresolvedDataArray,this.unresolvedLength):e=new Zy(this.bufferSize,this.unresolvedDataArray,this.unresolvedLength),this.unresolvedLength-=e.size,e}resolveData(){for(;this.unresolvedLength>=this.bufferSize;){let e;if(this.incoming.length>0)e=this.incoming.shift(),this.shiftBufferFromUnresolvedDataArray(e);else if(this.numBuffers=this.concurrency)return;e=this.outgoing.shift(),e&&this.triggerOutgoingHandler(e)}while(e)}async triggerOutgoingHandler(e){let t=e.size;this.executingOutgoingHandlers++,this.offset+=t;try{await this.outgoingHandler(()=>e.getReadableStream(),t,this.offset-t)}catch(e){this.emitter.emit(`error`,e);return}this.executingOutgoingHandlers--,this.reuseBuffer(e),this.emitter.emit(`checkEnd`)}reuseBuffer(e){this.incoming.push(e),!this.isError&&this.resolveData()&&!this.isStreamEnd&&this.readable.resume()}};let $y;function eb(){return $y||=Eh(),$y}var tb=class{_nextPolicy;_options;constructor(e,t){this._nextPolicy=e,this._options=t}shouldLog(e){return this._options.shouldLog(e)}log(e,t){this._options.log(e,t)}};const nb={Parameters:{FORCE_BROWSER_NO_CACHE:`_`,SIGNATURE:`sig`,SNAPSHOT:`snapshot`,VERSIONID:`versionid`,TIMEOUT:`timeout`}},rb={AUTHORIZATION:`Authorization`,AUTHORIZATION_SCHEME:`Bearer`,CONTENT_ENCODING:`Content-Encoding`,CONTENT_ID:`Content-ID`,CONTENT_LANGUAGE:`Content-Language`,CONTENT_LENGTH:`Content-Length`,CONTENT_MD5:`Content-Md5`,CONTENT_TRANSFER_ENCODING:`Content-Transfer-Encoding`,CONTENT_TYPE:`Content-Type`,COOKIE:`Cookie`,DATE:`date`,IF_MATCH:`if-match`,IF_MODIFIED_SINCE:`if-modified-since`,IF_NONE_MATCH:`if-none-match`,IF_UNMODIFIED_SINCE:`if-unmodified-since`,PREFIX_FOR_STORAGE:`x-ms-`,RANGE:`Range`,USER_AGENT:`User-Agent`,X_MS_CLIENT_REQUEST_ID:`x-ms-client-request-id`,X_MS_COPY_SOURCE:`x-ms-copy-source`,X_MS_DATE:`x-ms-date`,X_MS_ERROR_CODE:`x-ms-error-code`,X_MS_VERSION:`x-ms-version`,X_MS_CopySourceErrorCode:`x-ms-copy-source-error-code`};function ib(e,t,n){let r=new URL(e),i=encodeURIComponent(t),a=n?encodeURIComponent(n):void 0,o=r.search===``?`?`:r.search,s=[];for(let e of o.slice(1).split(`&`))if(e){let[t]=e.split(`=`,2);t!==i&&s.push(e)}return a&&s.push(`${i}=${a}`),r.search=s.length?`?${s.join(`&`)}`:``,r.toString()}function ab(e,t){let n=new URL(e);return n.hostname=t,n.toString()}function ob(e){try{return new URL(e).pathname}catch{return}}function sb(e){let t=new URL(e).search;if(!t)return{};t=t.trim(),t=t.startsWith(`?`)?t.substring(1):t;let n=t.split(`&`);n=n.filter(e=>{let t=e.indexOf(`=`),n=e.lastIndexOf(`=`);return t>0&&t===n&&n{let a,o=()=>{a!==void 0&&clearTimeout(a),i(n)};a=setTimeout(()=>{t!==void 0&&t.removeEventListener(`abort`,o),r()},e),t!==void 0&&t.addEventListener(`abort`,o)})}var lb=class extends tb{constructor(e,t){super(e,t)}async sendRequest(e){return Jm?this._nextPolicy.sendRequest(e):((e.method.toUpperCase()===`GET`||e.method.toUpperCase()===`HEAD`)&&(e.url=ib(e.url,nb.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),e.headers.remove(rb.COOKIE),e.headers.remove(rb.CONTENT_LENGTH),this._nextPolicy.sendRequest(e))}},ub=class{create(e,t){return new lb(e,t)}},db=class extends tb{sendRequest(e){return this._nextPolicy.sendRequest(this.signRequest(e))}signRequest(e){return e}},fb=class extends db{constructor(e,t){super(e,t)}},pb=class{create(e,t){throw Error(`Method should be implemented in children classes.`)}},mb=class extends pb{create(e,t){return new fb(e,t)}};const hb=new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1820,0,1823,1825,1827,1829,0,0,0,1837,2051,0,0,1843,0,3331,3354,3356,3358,3360,3362,3364,3366,3368,3370,0,0,0,0,0,0,0,3586,3593,3594,3610,3617,3619,3621,3628,3634,3637,3638,3656,3665,3696,3708,3710,3721,3722,3729,3737,3743,3746,3748,3750,3751,3753,0,0,0,1859,1860,1864,3586,3593,3594,3610,3617,3619,3621,3628,3634,3637,3638,3656,3665,3696,3708,3710,3721,3722,3729,3737,3743,3746,3748,3750,3751,3753,0,1868,0,1872,0]),gb=new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),_b=new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32786,0,0,0,0,0,33298,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function vb(e,t){return yb(e,t)?-1:1}function yb(e,t){let n=[hb,gb,_b],r=0,i=0,a=0;for(;ra;let o=i0&&e.headers.set(rb.CONTENT_LENGTH,Buffer.byteLength(e.body));let t=[e.method.toUpperCase(),this.getHeaderValueToSign(e,rb.CONTENT_LANGUAGE),this.getHeaderValueToSign(e,rb.CONTENT_ENCODING),this.getHeaderValueToSign(e,rb.CONTENT_LENGTH),this.getHeaderValueToSign(e,rb.CONTENT_MD5),this.getHeaderValueToSign(e,rb.CONTENT_TYPE),this.getHeaderValueToSign(e,rb.DATE),this.getHeaderValueToSign(e,rb.IF_MODIFIED_SINCE),this.getHeaderValueToSign(e,rb.IF_MATCH),this.getHeaderValueToSign(e,rb.IF_NONE_MATCH),this.getHeaderValueToSign(e,rb.IF_UNMODIFIED_SINCE),this.getHeaderValueToSign(e,rb.RANGE)].join(` `)+` -`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(t);return e.headers.set(sg.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,t){let n=e.headers.get(t);return!n||t===sg.CONTENT_LENGTH&&n===`0`?``:n}getCanonicalizedHeadersString(e){let t=e.headers.headersArray().filter(e=>e.name.toLowerCase().startsWith(sg.PREFIX_FOR_STORAGE));t.sort((e,t)=>Sg(e.name.toLowerCase(),t.name.toLowerCase())),t=t.filter((e,t,n)=>!(t>0&&e.name.toLowerCase()===n[t-1].name.toLowerCase()));let n=``;return t.forEach(e=>{n+=`${e.name.toLowerCase().trimRight()}:${e.value.trimLeft()}\n`}),n}getCanonicalizedResourceString(e){let t=ug(e.url)||`/`,n=``;n+=`/${this.factory.accountName}${t}`;let r=dg(e.url),i={};if(r){let e=[];for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)){let n=t.toLowerCase();i[n]=r[t],e.push(n)}e.sort();for(let t of e)n+=`\n${t}:${decodeURIComponent(i[t])}`}return n}},Tg=class extends _g{accountName;accountKey;constructor(e,t){super(),this.accountName=e,this.accountKey=Buffer.from(t,`base64`)}create(e,t){return new wg(e,t,this)}computeHMACSHA256(e){return Pe(`sha256`,this.accountKey).update(e,`utf8`).digest(`base64`)}};const Eg=id(`storage-common`);var Dg;(function(e){e[e.EXPONENTIAL=0]=`EXPONENTIAL`,e[e.FIXED=1]=`FIXED`})(Dg||={});const Og={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Dg.EXPONENTIAL,secondaryHost:``,tryTimeoutInMs:void 0},kg=new gd(`The operation was aborted.`);var Ag=class extends ag{retryOptions;constructor(e,t,n=Og){super(e,t),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:Og.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):Og.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:Og.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:Og.maxRetryDelayInMs):Og.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:Og.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:Og.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,t,n){let r=e.clone(),i=t||!this.retryOptions.secondaryHost||!(e.method===`GET`||e.method===`HEAD`||e.method===`OPTIONS`)||n%2==1;i||(r.url=lg(r.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(r.url=cg(r.url,og.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(Eg.info(`RetryPolicy: =====> Try=${n} ${i?`Primary`:`Secondary`}`),a=await this._nextPolicy.sendRequest(r),!this.shouldRetry(i,n,a))return a;t||=!i&&a.status===404}catch(e){if(Eg.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`),!this.shouldRetry(i,n,a,e))throw e}return await this.delay(i,n,e.abortSignal),this.attemptSendRequest(e,t,++n)}shouldRetry(e,t,n,r){if(t>=this.retryOptions.maxTries)return Eg.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let i=[`ETIMEDOUT`,`ESOCKETTIMEDOUT`,`ECONNREFUSED`,`ECONNRESET`,`ENOENT`,`ENOTFOUND`,`TIMEOUT`,`EPIPE`,`REQUEST_SEND_ERROR`];if(r){for(let e of i)if(r.name.toUpperCase().includes(e)||r.message.toUpperCase().includes(e)||r.code&&r.code.toString().toUpperCase()===e)return Eg.info(`RetryPolicy: Network error ${e} found, will retry.`),!0}if(n||r){let t=n?n.status:r?r.statusCode:0;if(!e&&t===404)return Eg.info(`RetryPolicy: Secondary access with 404, will retry.`),!0;if(t===503||t===500)return Eg.info(`RetryPolicy: Will retry for status code ${t}.`),!0}if(n&&n?.status>=400){let e=n.headers.get(sg.X_MS_CopySourceErrorCode);if(e!==void 0)switch(e){case`InternalError`:case`OperationTimedOut`:case`ServerBusy`:return!0}}return r?.code===`PARSE_ERROR`&&r?.message.startsWith(`Error "Error: Unclosed root tag`)?(Eg.info(`RetryPolicy: Incomplete XML response likely due to service timeout, will retry.`),!0):!1}async delay(e,t,n){let r=0;if(e)switch(this.retryOptions.retryPolicyType){case Dg.EXPONENTIAL:r=Math.min((2**(t-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Dg.FIXED:r=this.retryOptions.retryDelayInMs;break}else r=Math.random()*1e3;return Eg.info(`RetryPolicy: Delay for ${r}ms`),fg(r,n,kg)}},jg=class{retryOptions;constructor(e){this.retryOptions=e}create(e,t){return new Ag(e,t,this.retryOptions)}};function Mg(){return{name:`storageBrowserPolicy`,async sendRequest(e,t){return Sd?t(e):((e.method===`GET`||e.method===`HEAD`)&&(e.url=cg(e.url,og.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),e.headers.delete(sg.COOKIE),e.headers.delete(sg.CONTENT_LENGTH),t(e))}}}function Ng(){function e(e){e.body&&(typeof e.body==`string`||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(sg.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:`StorageCorrectContentLengthPolicy`,async sendRequest(t,n){return e(t),n(t)}}}const Pg={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Dg.EXPONENTIAL,secondaryHost:``,tryTimeoutInMs:void 0},Fg=[`ETIMEDOUT`,`ESOCKETTIMEDOUT`,`ECONNREFUSED`,`ECONNRESET`,`ENOENT`,`ENOTFOUND`,`TIMEOUT`,`EPIPE`,`REQUEST_SEND_ERROR`],Ig=new gd(`The operation was aborted.`);function Lg(e={}){let t=e.retryPolicyType??Pg.retryPolicyType,n=e.maxTries??Pg.maxTries,r=e.retryDelayInMs??Pg.retryDelayInMs,i=e.maxRetryDelayInMs??Pg.maxRetryDelayInMs,a=e.secondaryHost??Pg.secondaryHost,o=e.tryTimeoutInMs??Pg.tryTimeoutInMs;function s({isPrimaryRetry:e,attempt:t,response:r,error:i}){if(t>=n)return Eg.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${n}, no further try.`),!1;if(i){for(let e of Fg)if(i.name.toUpperCase().includes(e)||i.message.toUpperCase().includes(e)||i.code&&i.code.toString().toUpperCase()===e)return Eg.info(`RetryPolicy: Network error ${e} found, will retry.`),!0;if(i?.code===`PARSE_ERROR`&&i?.message.startsWith(`Error "Error: Unclosed root tag`))return Eg.info(`RetryPolicy: Incomplete XML response likely due to service timeout, will retry.`),!0}if(r||i){let t=r?.status??i?.statusCode??0;if(!e&&t===404)return Eg.info(`RetryPolicy: Secondary access with 404, will retry.`),!0;if(t===503||t===500)return Eg.info(`RetryPolicy: Will retry for status code ${t}.`),!0}if(r&&r?.status>=400){let e=r.headers.get(sg.X_MS_CopySourceErrorCode);if(e!==void 0)switch(e){case`InternalError`:case`OperationTimedOut`:case`ServerBusy`:return!0}}return!1}function c(e,n){let a=0;if(e)switch(t){case Dg.EXPONENTIAL:a=Math.min((2**(n-1)-1)*r,i);break;case Dg.FIXED:a=r;break}else a=Math.random()*1e3;return Eg.info(`RetryPolicy: Delay for ${a}ms`),a}return{name:`storageRetryPolicy`,async sendRequest(e,t){o&&(e.url=cg(e.url,og.Parameters.TIMEOUT,String(Math.floor(o/1e3))));let n=e.url,r=a?lg(e.url,a):void 0,i=!1,l=1,u=!0,d,f;for(;u;){let a=i||!r||![`GET`,`HEAD`,`OPTIONS`].includes(e.method)||l%2==1;e.url=a?n:r,d=void 0,f=void 0;try{Eg.info(`RetryPolicy: =====> Try=${l} ${a?`Primary`:`Secondary`}`),d=await t(e),i||=!a&&d.status===404}catch(e){if(Gd(e))Eg.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`),f=e;else throw Eg.error(`RetryPolicy: Caught error, message: ${yd(e)}`),e}u=s({isPrimaryRetry:a,attempt:l,response:d,error:f}),u&&await fg(c(a,l),e.abortSignal,Ig),l++}if(d)return d;throw f??new Wd(`RetryPolicy failed without known error.`)}}}function Rg(e){function t(t){t.headers.set(sg.X_MS_DATE,new Date().toUTCString()),t.body&&(typeof t.body==`string`||Buffer.isBuffer(t.body))&&t.body.length>0&&t.headers.set(sg.CONTENT_LENGTH,Buffer.byteLength(t.body));let a=[t.method.toUpperCase(),n(t,sg.CONTENT_LANGUAGE),n(t,sg.CONTENT_ENCODING),n(t,sg.CONTENT_LENGTH),n(t,sg.CONTENT_MD5),n(t,sg.CONTENT_TYPE),n(t,sg.DATE),n(t,sg.IF_MODIFIED_SINCE),n(t,sg.IF_MATCH),n(t,sg.IF_NONE_MATCH),n(t,sg.IF_UNMODIFIED_SINCE),n(t,sg.RANGE)].join(` +`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(t);return e.headers.set(rb.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,t){let n=e.headers.get(t);return!n||t===rb.CONTENT_LENGTH&&n===`0`?``:n}getCanonicalizedHeadersString(e){let t=e.headers.headersArray().filter(e=>e.name.toLowerCase().startsWith(rb.PREFIX_FOR_STORAGE));t.sort((e,t)=>vb(e.name.toLowerCase(),t.name.toLowerCase())),t=t.filter((e,t,n)=>!(t>0&&e.name.toLowerCase()===n[t-1].name.toLowerCase()));let n=``;return t.forEach(e=>{n+=`${e.name.toLowerCase().trimRight()}:${e.value.trimLeft()}\n`}),n}getCanonicalizedResourceString(e){let t=ob(e.url)||`/`,n=``;n+=`/${this.factory.accountName}${t}`;let r=sb(e.url),i={};if(r){let e=[];for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)){let n=t.toLowerCase();i[n]=r[t],e.push(n)}e.sort();for(let t of e)n+=`\n${t}:${decodeURIComponent(i[t])}`}return n}},xb=class extends pb{accountName;accountKey;constructor(e,t){super(),this.accountName=e,this.accountKey=Buffer.from(t,`base64`)}create(e,t){return new bb(e,t,this)}computeHMACSHA256(e){return Pe(`sha256`,this.accountKey).update(e,`utf8`).digest(`base64`)}};const Sb=Am(`storage-common`);var Cb;(function(e){e[e.EXPONENTIAL=0]=`EXPONENTIAL`,e[e.FIXED=1]=`FIXED`})(Cb||={});const wb={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Cb.EXPONENTIAL,secondaryHost:``,tryTimeoutInMs:void 0},Tb=new Hm(`The operation was aborted.`);var Eb=class extends tb{retryOptions;constructor(e,t,n=wb){super(e,t),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:wb.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):wb.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:wb.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:wb.maxRetryDelayInMs):wb.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:wb.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:wb.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,t,n){let r=e.clone(),i=t||!this.retryOptions.secondaryHost||!(e.method===`GET`||e.method===`HEAD`||e.method===`OPTIONS`)||n%2==1;i||(r.url=ab(r.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(r.url=ib(r.url,nb.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(Sb.info(`RetryPolicy: =====> Try=${n} ${i?`Primary`:`Secondary`}`),a=await this._nextPolicy.sendRequest(r),!this.shouldRetry(i,n,a))return a;t||=!i&&a.status===404}catch(e){if(Sb.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`),!this.shouldRetry(i,n,a,e))throw e}return await this.delay(i,n,e.abortSignal),this.attemptSendRequest(e,t,++n)}shouldRetry(e,t,n,r){if(t>=this.retryOptions.maxTries)return Sb.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let i=[`ETIMEDOUT`,`ESOCKETTIMEDOUT`,`ECONNREFUSED`,`ECONNRESET`,`ENOENT`,`ENOTFOUND`,`TIMEOUT`,`EPIPE`,`REQUEST_SEND_ERROR`];if(r){for(let e of i)if(r.name.toUpperCase().includes(e)||r.message.toUpperCase().includes(e)||r.code&&r.code.toString().toUpperCase()===e)return Sb.info(`RetryPolicy: Network error ${e} found, will retry.`),!0}if(n||r){let t=n?n.status:r?r.statusCode:0;if(!e&&t===404)return Sb.info(`RetryPolicy: Secondary access with 404, will retry.`),!0;if(t===503||t===500)return Sb.info(`RetryPolicy: Will retry for status code ${t}.`),!0}if(n&&n?.status>=400){let e=n.headers.get(rb.X_MS_CopySourceErrorCode);if(e!==void 0)switch(e){case`InternalError`:case`OperationTimedOut`:case`ServerBusy`:return!0}}return r?.code===`PARSE_ERROR`&&r?.message.startsWith(`Error "Error: Unclosed root tag`)?(Sb.info(`RetryPolicy: Incomplete XML response likely due to service timeout, will retry.`),!0):!1}async delay(e,t,n){let r=0;if(e)switch(this.retryOptions.retryPolicyType){case Cb.EXPONENTIAL:r=Math.min((2**(t-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Cb.FIXED:r=this.retryOptions.retryDelayInMs;break}else r=Math.random()*1e3;return Sb.info(`RetryPolicy: Delay for ${r}ms`),cb(r,n,Tb)}},Db=class{retryOptions;constructor(e){this.retryOptions=e}create(e,t){return new Eb(e,t,this.retryOptions)}};function Ob(){return{name:`storageBrowserPolicy`,async sendRequest(e,t){return Jm?t(e):((e.method===`GET`||e.method===`HEAD`)&&(e.url=ib(e.url,nb.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),e.headers.delete(rb.COOKIE),e.headers.delete(rb.CONTENT_LENGTH),t(e))}}}function kb(){function e(e){e.body&&(typeof e.body==`string`||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(rb.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:`StorageCorrectContentLengthPolicy`,async sendRequest(t,n){return e(t),n(t)}}}const Ab={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Cb.EXPONENTIAL,secondaryHost:``,tryTimeoutInMs:void 0},jb=[`ETIMEDOUT`,`ESOCKETTIMEDOUT`,`ECONNREFUSED`,`ECONNRESET`,`ENOENT`,`ENOTFOUND`,`TIMEOUT`,`EPIPE`,`REQUEST_SEND_ERROR`],Mb=new Hm(`The operation was aborted.`);function Nb(e={}){let t=e.retryPolicyType??Ab.retryPolicyType,n=e.maxTries??Ab.maxTries,r=e.retryDelayInMs??Ab.retryDelayInMs,i=e.maxRetryDelayInMs??Ab.maxRetryDelayInMs,a=e.secondaryHost??Ab.secondaryHost,o=e.tryTimeoutInMs??Ab.tryTimeoutInMs;function s({isPrimaryRetry:e,attempt:t,response:r,error:i}){if(t>=n)return Sb.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${n}, no further try.`),!1;if(i){for(let e of jb)if(i.name.toUpperCase().includes(e)||i.message.toUpperCase().includes(e)||i.code&&i.code.toString().toUpperCase()===e)return Sb.info(`RetryPolicy: Network error ${e} found, will retry.`),!0;if(i?.code===`PARSE_ERROR`&&i?.message.startsWith(`Error "Error: Unclosed root tag`))return Sb.info(`RetryPolicy: Incomplete XML response likely due to service timeout, will retry.`),!0}if(r||i){let t=r?.status??i?.statusCode??0;if(!e&&t===404)return Sb.info(`RetryPolicy: Secondary access with 404, will retry.`),!0;if(t===503||t===500)return Sb.info(`RetryPolicy: Will retry for status code ${t}.`),!0}if(r&&r?.status>=400){let e=r.headers.get(rb.X_MS_CopySourceErrorCode);if(e!==void 0)switch(e){case`InternalError`:case`OperationTimedOut`:case`ServerBusy`:return!0}}return!1}function c(e,n){let a=0;if(e)switch(t){case Cb.EXPONENTIAL:a=Math.min((2**(n-1)-1)*r,i);break;case Cb.FIXED:a=r;break}else a=Math.random()*1e3;return Sb.info(`RetryPolicy: Delay for ${a}ms`),a}return{name:`storageRetryPolicy`,async sendRequest(e,t){o&&(e.url=ib(e.url,nb.Parameters.TIMEOUT,String(Math.floor(o/1e3))));let n=e.url,r=a?ab(e.url,a):void 0,i=!1,l=1,u=!0,d,f;for(;u;){let a=i||!r||![`GET`,`HEAD`,`OPTIONS`].includes(e.method)||l%2==1;e.url=a?n:r,d=void 0,f=void 0;try{Sb.info(`RetryPolicy: =====> Try=${l} ${a?`Primary`:`Secondary`}`),d=await t(e),i||=!a&&d.status===404}catch(e){if(_h(e))Sb.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`),f=e;else throw Sb.error(`RetryPolicy: Caught error, message: ${Gm(e)}`),e}u=s({isPrimaryRetry:a,attempt:l,response:d,error:f}),u&&await cb(c(a,l),e.abortSignal,Mb),l++}if(d)return d;throw f??new gh(`RetryPolicy failed without known error.`)}}}function Pb(e){function t(t){t.headers.set(rb.X_MS_DATE,new Date().toUTCString()),t.body&&(typeof t.body==`string`||Buffer.isBuffer(t.body))&&t.body.length>0&&t.headers.set(rb.CONTENT_LENGTH,Buffer.byteLength(t.body));let a=[t.method.toUpperCase(),n(t,rb.CONTENT_LANGUAGE),n(t,rb.CONTENT_ENCODING),n(t,rb.CONTENT_LENGTH),n(t,rb.CONTENT_MD5),n(t,rb.CONTENT_TYPE),n(t,rb.DATE),n(t,rb.IF_MODIFIED_SINCE),n(t,rb.IF_MATCH),n(t,rb.IF_NONE_MATCH),n(t,rb.IF_UNMODIFIED_SINCE),n(t,rb.RANGE)].join(` `)+` -`+r(t)+i(t),o=Pe(`sha256`,e.accountKey).update(a,`utf8`).digest(`base64`);t.headers.set(sg.AUTHORIZATION,`SharedKey ${e.accountName}:${o}`)}function n(e,t){let n=e.headers.get(t);return!n||t===sg.CONTENT_LENGTH&&n===`0`?``:n}function r(e){let t=[];for(let[n,r]of e.headers)n.toLowerCase().startsWith(sg.PREFIX_FOR_STORAGE)&&t.push({name:n,value:r});t.sort((e,t)=>Sg(e.name.toLowerCase(),t.name.toLowerCase())),t=t.filter((e,t,n)=>!(t>0&&e.name.toLowerCase()===n[t-1].name.toLowerCase()));let n=``;return t.forEach(e=>{n+=`${e.name.toLowerCase().trimRight()}:${e.value.trimLeft()}\n`}),n}function i(t){let n=ug(t.url)||`/`,r=``;r+=`/${e.accountName}${n}`;let i=dg(t.url),a={};if(i){let e=[];for(let t in i)if(Object.prototype.hasOwnProperty.call(i,t)){let n=t.toLowerCase();a[n]=i[t],e.push(n)}e.sort();for(let t of e)r+=`\n${t}:${decodeURIComponent(a[t])}`}return r}return{name:`storageSharedKeyCredentialPolicy`,async sendRequest(e,n){return t(e),n(e)}}}function zg(){return{name:`storageRequestFailureDetailsParserPolicy`,async sendRequest(e,t){try{return await t(e)}catch(e){throw typeof e==`object`&&e&&e.response&&e.response.parsedBody&&e.response.parsedBody.code===`InvalidHeaderValue`&&e.response.parsedBody.HeaderName===`x-ms-version`&&(e.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. -`),e}}}}var Bg=class{accountName;userDelegationKey;key;constructor(e,t){this.accountName=e,this.userDelegationKey=t,this.key=Buffer.from(t.value,`base64`)}computeHMACSHA256(e){return Pe(`sha256`,this.key).update(e,`utf8`).digest(`base64`)}};const Vg=`12.31.0`,Hg=`2026-02-06`,Ug=5e4,Wg=4*1024*1024,Gg={Parameters:{FORCE_BROWSER_NO_CACHE:`_`,SIGNATURE:`sig`,SNAPSHOT:`snapshot`,VERSIONID:`versionid`,TIMEOUT:`timeout`}},Kg=`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`.split(`.`),qg=`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`.split(`.`),Jg=[`10000`,`10001`,`10002`,`10003`,`10004`,`10100`,`10101`,`10102`,`10103`,`10104`,`11000`,`11001`,`11002`,`11003`,`11004`,`11100`,`11101`,`11102`,`11103`,`11104`];function Yg(e){if(!e||typeof e!=`object`)return!1;let t=e;return Array.isArray(t.factories)&&typeof t.options==`object`&&typeof t.toServiceClientOptions==`function`}var Xg=class{factories;options;constructor(e,t={}){this.factories=e,this.options=t}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function Zg(e,t={}){e||=new vg;let n=new Xg([],t);return n._credential=e,n}function Qg(e){let t=[n_,t_,r_,i_,a_,o_,c_];if(e.factories.length){let n=e.factories.filter(e=>!t.some(t=>t(e)));if(n.length){let e=n.some(e=>s_(e));return{wrappedPolicies:sm(n),afterRetry:e}}}}function $g(e){let{httpClient:t,...n}=e.options,r=e._coreHttpClient;r||(r=t?cm(t):ig(),e._coreHttpClient=r);let i=e._corePipeline;if(!i){let t=`azsdk-js-azure-storage-blob/${Vg}`,r=n.userAgentOptions&&n.userAgentOptions.userAgentPrefix?`${n.userAgentOptions.userAgentPrefix} ${t}`:`${t}`;i=wp({...n,loggingOptions:{additionalAllowedHeaderNames:Kg,additionalAllowedQueryParameters:qg,logger:Qh.info},userAgentOptions:{userAgentPrefix:r},serializationOptions:{stringifyXML:Xh,serializerOptions:{xml:{xmlCharKey:`#`}}},deserializationOptions:{parseXML:Zh,serializerOptions:{xml:{xmlCharKey:`#`}}}}),i.removePolicy({phase:`Retry`}),i.removePolicy({name:`decompressResponsePolicy`}),i.addPolicy(Ng()),i.addPolicy(Lg(n.retryOptions),{phase:`Retry`}),i.addPolicy(zg()),i.addPolicy(Mg());let a=Qg(e);a&&i.addPolicy(a.wrappedPolicies,a.afterRetry?{afterPhase:`Retry`}:void 0);let o=e_(e);mf(o)?i.addPolicy(df({credential:o,scopes:n.audience??`https://storage.azure.com/.default`,challengeCallbacks:{authorizeRequestOnChallenge:Hp}}),{phase:`Sign`}):o instanceof Tg&&i.addPolicy(Rg({accountName:o.accountName,accountKey:o.accountKey}),{phase:`Sign`}),e._corePipeline=i}return{...n,allowInsecureConnection:!0,httpClient:r,pipeline:i}}function e_(e){if(e._credential)return e._credential;let t=new vg;for(let n of e.factories)if(mf(n.credential))t=n.credential;else if(t_(n))return n;return t}function t_(e){return e instanceof Tg?!0:e.constructor.name===`StorageSharedKeyCredential`}function n_(e){return e instanceof vg?!0:e.constructor.name===`AnonymousCredential`}function r_(e){return mf(e.credential)}function i_(e){return e instanceof mg?!0:e.constructor.name===`StorageBrowserPolicyFactory`}function a_(e){return e instanceof jg?!0:e.constructor.name===`StorageRetryPolicyFactory`}function o_(e){return e.constructor.name===`TelemetryPolicyFactory`}function s_(e){return e.constructor.name===`InjectorPolicyFactory`}function c_(e){let t=[`GenerateClientRequestIdPolicy`,`TracingPolicy`,`LogPolicy`,`ProxyPolicy`,`DisableResponseDecompressionPolicy`,`KeepAlivePolicy`,`DeserializationPolicy`],n=e.create({sendRequest:async e=>({request:e,headers:e.headers.clone(),status:500})},{log(e,t){},shouldLog(e){return!1}}).constructor.name;return t.some(e=>n.startsWith(e))}var l_=r({AccessPolicy:()=>k_,AppendBlobAppendBlockExceptionHeaders:()=>ub,AppendBlobAppendBlockFromUrlExceptionHeaders:()=>fb,AppendBlobAppendBlockFromUrlHeaders:()=>db,AppendBlobAppendBlockHeaders:()=>lb,AppendBlobCreateExceptionHeaders:()=>cb,AppendBlobCreateHeaders:()=>sb,AppendBlobSealExceptionHeaders:()=>mb,AppendBlobSealHeaders:()=>pb,ArrowConfiguration:()=>Y_,ArrowField:()=>X_,BlobAbortCopyFromURLExceptionHeaders:()=>My,BlobAbortCopyFromURLHeaders:()=>jy,BlobAcquireLeaseExceptionHeaders:()=>gy,BlobAcquireLeaseHeaders:()=>hy,BlobBreakLeaseExceptionHeaders:()=>wy,BlobBreakLeaseHeaders:()=>Cy,BlobChangeLeaseExceptionHeaders:()=>Sy,BlobChangeLeaseHeaders:()=>xy,BlobCopyFromURLExceptionHeaders:()=>Ay,BlobCopyFromURLHeaders:()=>ky,BlobCreateSnapshotExceptionHeaders:()=>Ey,BlobCreateSnapshotHeaders:()=>Ty,BlobDeleteExceptionHeaders:()=>ey,BlobDeleteHeaders:()=>$v,BlobDeleteImmutabilityPolicyExceptionHeaders:()=>uy,BlobDeleteImmutabilityPolicyHeaders:()=>ly,BlobDownloadExceptionHeaders:()=>Xv,BlobDownloadHeaders:()=>Yv,BlobFlatListSegment:()=>j_,BlobGetAccountInfoExceptionHeaders:()=>Iy,BlobGetAccountInfoHeaders:()=>Fy,BlobGetPropertiesExceptionHeaders:()=>Qv,BlobGetPropertiesHeaders:()=>Zv,BlobGetTagsExceptionHeaders:()=>By,BlobGetTagsHeaders:()=>zy,BlobHierarchyListSegment:()=>I_,BlobItemInternal:()=>M_,BlobName:()=>N_,BlobPrefix:()=>L_,BlobPropertiesInternal:()=>P_,BlobQueryExceptionHeaders:()=>Ry,BlobQueryHeaders:()=>Ly,BlobReleaseLeaseExceptionHeaders:()=>vy,BlobReleaseLeaseHeaders:()=>_y,BlobRenewLeaseExceptionHeaders:()=>by,BlobRenewLeaseHeaders:()=>yy,BlobServiceProperties:()=>u_,BlobServiceStatistics:()=>__,BlobSetExpiryExceptionHeaders:()=>iy,BlobSetExpiryHeaders:()=>ry,BlobSetHttpHeadersExceptionHeaders:()=>oy,BlobSetHttpHeadersHeaders:()=>ay,BlobSetImmutabilityPolicyExceptionHeaders:()=>cy,BlobSetImmutabilityPolicyHeaders:()=>sy,BlobSetLegalHoldExceptionHeaders:()=>fy,BlobSetLegalHoldHeaders:()=>dy,BlobSetMetadataExceptionHeaders:()=>my,BlobSetMetadataHeaders:()=>py,BlobSetTagsExceptionHeaders:()=>Hy,BlobSetTagsHeaders:()=>Vy,BlobSetTierExceptionHeaders:()=>Py,BlobSetTierHeaders:()=>Ny,BlobStartCopyFromURLExceptionHeaders:()=>Oy,BlobStartCopyFromURLHeaders:()=>Dy,BlobTag:()=>D_,BlobTags:()=>E_,BlobUndeleteExceptionHeaders:()=>ny,BlobUndeleteHeaders:()=>ty,Block:()=>B_,BlockBlobCommitBlockListExceptionHeaders:()=>wb,BlockBlobCommitBlockListHeaders:()=>Cb,BlockBlobGetBlockListExceptionHeaders:()=>Eb,BlockBlobGetBlockListHeaders:()=>Tb,BlockBlobPutBlobFromUrlExceptionHeaders:()=>vb,BlockBlobPutBlobFromUrlHeaders:()=>_b,BlockBlobStageBlockExceptionHeaders:()=>bb,BlockBlobStageBlockFromURLExceptionHeaders:()=>Sb,BlockBlobStageBlockFromURLHeaders:()=>xb,BlockBlobStageBlockHeaders:()=>yb,BlockBlobUploadExceptionHeaders:()=>gb,BlockBlobUploadHeaders:()=>hb,BlockList:()=>z_,BlockLookupList:()=>R_,ClearRange:()=>U_,ContainerAcquireLeaseExceptionHeaders:()=>Pv,ContainerAcquireLeaseHeaders:()=>Nv,ContainerBreakLeaseExceptionHeaders:()=>Bv,ContainerBreakLeaseHeaders:()=>zv,ContainerChangeLeaseExceptionHeaders:()=>Hv,ContainerChangeLeaseHeaders:()=>Vv,ContainerCreateExceptionHeaders:()=>mv,ContainerCreateHeaders:()=>pv,ContainerDeleteExceptionHeaders:()=>vv,ContainerDeleteHeaders:()=>_v,ContainerFilterBlobsExceptionHeaders:()=>Mv,ContainerFilterBlobsHeaders:()=>jv,ContainerGetAccessPolicyExceptionHeaders:()=>Sv,ContainerGetAccessPolicyHeaders:()=>xv,ContainerGetAccountInfoExceptionHeaders:()=>Jv,ContainerGetAccountInfoHeaders:()=>qv,ContainerGetPropertiesExceptionHeaders:()=>gv,ContainerGetPropertiesHeaders:()=>hv,ContainerItem:()=>b_,ContainerListBlobFlatSegmentExceptionHeaders:()=>Wv,ContainerListBlobFlatSegmentHeaders:()=>Uv,ContainerListBlobHierarchySegmentExceptionHeaders:()=>Kv,ContainerListBlobHierarchySegmentHeaders:()=>Gv,ContainerProperties:()=>x_,ContainerReleaseLeaseExceptionHeaders:()=>Iv,ContainerReleaseLeaseHeaders:()=>Fv,ContainerRenameExceptionHeaders:()=>Ov,ContainerRenameHeaders:()=>Dv,ContainerRenewLeaseExceptionHeaders:()=>Rv,ContainerRenewLeaseHeaders:()=>Lv,ContainerRestoreExceptionHeaders:()=>Ev,ContainerRestoreHeaders:()=>Tv,ContainerSetAccessPolicyExceptionHeaders:()=>wv,ContainerSetAccessPolicyHeaders:()=>Cv,ContainerSetMetadataExceptionHeaders:()=>bv,ContainerSetMetadataHeaders:()=>yv,ContainerSubmitBatchExceptionHeaders:()=>Av,ContainerSubmitBatchHeaders:()=>kv,CorsRule:()=>m_,DelimitedTextConfiguration:()=>q_,FilterBlobItem:()=>T_,FilterBlobSegment:()=>w_,GeoReplication:()=>v_,JsonTextConfiguration:()=>J_,KeyInfo:()=>S_,ListBlobsFlatSegmentResponse:()=>A_,ListBlobsHierarchySegmentResponse:()=>F_,ListContainersSegmentResponse:()=>y_,Logging:()=>d_,Metrics:()=>p_,PageBlobClearPagesExceptionHeaders:()=>Jy,PageBlobClearPagesHeaders:()=>qy,PageBlobCopyIncrementalExceptionHeaders:()=>ob,PageBlobCopyIncrementalHeaders:()=>ab,PageBlobCreateExceptionHeaders:()=>Wy,PageBlobCreateHeaders:()=>Uy,PageBlobGetPageRangesDiffExceptionHeaders:()=>eb,PageBlobGetPageRangesDiffHeaders:()=>$y,PageBlobGetPageRangesExceptionHeaders:()=>Qy,PageBlobGetPageRangesHeaders:()=>Zy,PageBlobResizeExceptionHeaders:()=>nb,PageBlobResizeHeaders:()=>tb,PageBlobUpdateSequenceNumberExceptionHeaders:()=>ib,PageBlobUpdateSequenceNumberHeaders:()=>rb,PageBlobUploadPagesExceptionHeaders:()=>Ky,PageBlobUploadPagesFromURLExceptionHeaders:()=>Xy,PageBlobUploadPagesFromURLHeaders:()=>Yy,PageBlobUploadPagesHeaders:()=>Gy,PageList:()=>V_,PageRange:()=>H_,QueryFormat:()=>K_,QueryRequest:()=>W_,QuerySerialization:()=>G_,RetentionPolicy:()=>f_,ServiceFilterBlobsExceptionHeaders:()=>fv,ServiceFilterBlobsHeaders:()=>dv,ServiceGetAccountInfoExceptionHeaders:()=>cv,ServiceGetAccountInfoHeaders:()=>sv,ServiceGetPropertiesExceptionHeaders:()=>ev,ServiceGetPropertiesHeaders:()=>$_,ServiceGetStatisticsExceptionHeaders:()=>nv,ServiceGetStatisticsHeaders:()=>tv,ServiceGetUserDelegationKeyExceptionHeaders:()=>ov,ServiceGetUserDelegationKeyHeaders:()=>av,ServiceListContainersSegmentExceptionHeaders:()=>iv,ServiceListContainersSegmentHeaders:()=>rv,ServiceSetPropertiesExceptionHeaders:()=>Q_,ServiceSetPropertiesHeaders:()=>Z_,ServiceSubmitBatchExceptionHeaders:()=>uv,ServiceSubmitBatchHeaders:()=>lv,SignedIdentifier:()=>O_,StaticWebsite:()=>h_,StorageError:()=>g_,UserDelegationKey:()=>C_});const u_={serializedName:`BlobServiceProperties`,xmlName:`StorageServiceProperties`,type:{name:`Composite`,className:`BlobServiceProperties`,modelProperties:{blobAnalyticsLogging:{serializedName:`Logging`,xmlName:`Logging`,type:{name:`Composite`,className:`Logging`}},hourMetrics:{serializedName:`HourMetrics`,xmlName:`HourMetrics`,type:{name:`Composite`,className:`Metrics`}},minuteMetrics:{serializedName:`MinuteMetrics`,xmlName:`MinuteMetrics`,type:{name:`Composite`,className:`Metrics`}},cors:{serializedName:`Cors`,xmlName:`Cors`,xmlIsWrapped:!0,xmlElementName:`CorsRule`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`CorsRule`}}}},defaultServiceVersion:{serializedName:`DefaultServiceVersion`,xmlName:`DefaultServiceVersion`,type:{name:`String`}},deleteRetentionPolicy:{serializedName:`DeleteRetentionPolicy`,xmlName:`DeleteRetentionPolicy`,type:{name:`Composite`,className:`RetentionPolicy`}},staticWebsite:{serializedName:`StaticWebsite`,xmlName:`StaticWebsite`,type:{name:`Composite`,className:`StaticWebsite`}}}}},d_={serializedName:`Logging`,type:{name:`Composite`,className:`Logging`,modelProperties:{version:{serializedName:`Version`,required:!0,xmlName:`Version`,type:{name:`String`}},deleteProperty:{serializedName:`Delete`,required:!0,xmlName:`Delete`,type:{name:`Boolean`}},read:{serializedName:`Read`,required:!0,xmlName:`Read`,type:{name:`Boolean`}},write:{serializedName:`Write`,required:!0,xmlName:`Write`,type:{name:`Boolean`}},retentionPolicy:{serializedName:`RetentionPolicy`,xmlName:`RetentionPolicy`,type:{name:`Composite`,className:`RetentionPolicy`}}}}},f_={serializedName:`RetentionPolicy`,type:{name:`Composite`,className:`RetentionPolicy`,modelProperties:{enabled:{serializedName:`Enabled`,required:!0,xmlName:`Enabled`,type:{name:`Boolean`}},days:{constraints:{InclusiveMinimum:1},serializedName:`Days`,xmlName:`Days`,type:{name:`Number`}}}}},p_={serializedName:`Metrics`,type:{name:`Composite`,className:`Metrics`,modelProperties:{version:{serializedName:`Version`,xmlName:`Version`,type:{name:`String`}},enabled:{serializedName:`Enabled`,required:!0,xmlName:`Enabled`,type:{name:`Boolean`}},includeAPIs:{serializedName:`IncludeAPIs`,xmlName:`IncludeAPIs`,type:{name:`Boolean`}},retentionPolicy:{serializedName:`RetentionPolicy`,xmlName:`RetentionPolicy`,type:{name:`Composite`,className:`RetentionPolicy`}}}}},m_={serializedName:`CorsRule`,type:{name:`Composite`,className:`CorsRule`,modelProperties:{allowedOrigins:{serializedName:`AllowedOrigins`,required:!0,xmlName:`AllowedOrigins`,type:{name:`String`}},allowedMethods:{serializedName:`AllowedMethods`,required:!0,xmlName:`AllowedMethods`,type:{name:`String`}},allowedHeaders:{serializedName:`AllowedHeaders`,required:!0,xmlName:`AllowedHeaders`,type:{name:`String`}},exposedHeaders:{serializedName:`ExposedHeaders`,required:!0,xmlName:`ExposedHeaders`,type:{name:`String`}},maxAgeInSeconds:{constraints:{InclusiveMinimum:0},serializedName:`MaxAgeInSeconds`,required:!0,xmlName:`MaxAgeInSeconds`,type:{name:`Number`}}}}},h_={serializedName:`StaticWebsite`,type:{name:`Composite`,className:`StaticWebsite`,modelProperties:{enabled:{serializedName:`Enabled`,required:!0,xmlName:`Enabled`,type:{name:`Boolean`}},indexDocument:{serializedName:`IndexDocument`,xmlName:`IndexDocument`,type:{name:`String`}},errorDocument404Path:{serializedName:`ErrorDocument404Path`,xmlName:`ErrorDocument404Path`,type:{name:`String`}},defaultIndexDocumentPath:{serializedName:`DefaultIndexDocumentPath`,xmlName:`DefaultIndexDocumentPath`,type:{name:`String`}}}}},g_={serializedName:`StorageError`,type:{name:`Composite`,className:`StorageError`,modelProperties:{message:{serializedName:`Message`,xmlName:`Message`,type:{name:`String`}},copySourceStatusCode:{serializedName:`CopySourceStatusCode`,xmlName:`CopySourceStatusCode`,type:{name:`Number`}},copySourceErrorCode:{serializedName:`CopySourceErrorCode`,xmlName:`CopySourceErrorCode`,type:{name:`String`}},copySourceErrorMessage:{serializedName:`CopySourceErrorMessage`,xmlName:`CopySourceErrorMessage`,type:{name:`String`}},code:{serializedName:`Code`,xmlName:`Code`,type:{name:`String`}},authenticationErrorDetail:{serializedName:`AuthenticationErrorDetail`,xmlName:`AuthenticationErrorDetail`,type:{name:`String`}}}}},__={serializedName:`BlobServiceStatistics`,xmlName:`StorageServiceStats`,type:{name:`Composite`,className:`BlobServiceStatistics`,modelProperties:{geoReplication:{serializedName:`GeoReplication`,xmlName:`GeoReplication`,type:{name:`Composite`,className:`GeoReplication`}}}}},v_={serializedName:`GeoReplication`,type:{name:`Composite`,className:`GeoReplication`,modelProperties:{status:{serializedName:`Status`,required:!0,xmlName:`Status`,type:{name:`Enum`,allowedValues:[`live`,`bootstrap`,`unavailable`]}},lastSyncOn:{serializedName:`LastSyncTime`,required:!0,xmlName:`LastSyncTime`,type:{name:`DateTimeRfc1123`}}}}},y_={serializedName:`ListContainersSegmentResponse`,xmlName:`EnumerationResults`,type:{name:`Composite`,className:`ListContainersSegmentResponse`,modelProperties:{serviceEndpoint:{serializedName:`ServiceEndpoint`,required:!0,xmlName:`ServiceEndpoint`,xmlIsAttribute:!0,type:{name:`String`}},prefix:{serializedName:`Prefix`,xmlName:`Prefix`,type:{name:`String`}},marker:{serializedName:`Marker`,xmlName:`Marker`,type:{name:`String`}},maxPageSize:{serializedName:`MaxResults`,xmlName:`MaxResults`,type:{name:`Number`}},containerItems:{serializedName:`ContainerItems`,required:!0,xmlName:`Containers`,xmlIsWrapped:!0,xmlElementName:`Container`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`ContainerItem`}}}},continuationToken:{serializedName:`NextMarker`,xmlName:`NextMarker`,type:{name:`String`}}}}},b_={serializedName:`ContainerItem`,xmlName:`Container`,type:{name:`Composite`,className:`ContainerItem`,modelProperties:{name:{serializedName:`Name`,required:!0,xmlName:`Name`,type:{name:`String`}},deleted:{serializedName:`Deleted`,xmlName:`Deleted`,type:{name:`Boolean`}},version:{serializedName:`Version`,xmlName:`Version`,type:{name:`String`}},properties:{serializedName:`Properties`,xmlName:`Properties`,type:{name:`Composite`,className:`ContainerProperties`}},metadata:{serializedName:`Metadata`,xmlName:`Metadata`,type:{name:`Dictionary`,value:{type:{name:`String`}}}}}}},x_={serializedName:`ContainerProperties`,type:{name:`Composite`,className:`ContainerProperties`,modelProperties:{lastModified:{serializedName:`Last-Modified`,required:!0,xmlName:`Last-Modified`,type:{name:`DateTimeRfc1123`}},etag:{serializedName:`Etag`,required:!0,xmlName:`Etag`,type:{name:`String`}},leaseStatus:{serializedName:`LeaseStatus`,xmlName:`LeaseStatus`,type:{name:`Enum`,allowedValues:[`locked`,`unlocked`]}},leaseState:{serializedName:`LeaseState`,xmlName:`LeaseState`,type:{name:`Enum`,allowedValues:[`available`,`leased`,`expired`,`breaking`,`broken`]}},leaseDuration:{serializedName:`LeaseDuration`,xmlName:`LeaseDuration`,type:{name:`Enum`,allowedValues:[`infinite`,`fixed`]}},publicAccess:{serializedName:`PublicAccess`,xmlName:`PublicAccess`,type:{name:`Enum`,allowedValues:[`container`,`blob`]}},hasImmutabilityPolicy:{serializedName:`HasImmutabilityPolicy`,xmlName:`HasImmutabilityPolicy`,type:{name:`Boolean`}},hasLegalHold:{serializedName:`HasLegalHold`,xmlName:`HasLegalHold`,type:{name:`Boolean`}},defaultEncryptionScope:{serializedName:`DefaultEncryptionScope`,xmlName:`DefaultEncryptionScope`,type:{name:`String`}},preventEncryptionScopeOverride:{serializedName:`DenyEncryptionScopeOverride`,xmlName:`DenyEncryptionScopeOverride`,type:{name:`Boolean`}},deletedOn:{serializedName:`DeletedTime`,xmlName:`DeletedTime`,type:{name:`DateTimeRfc1123`}},remainingRetentionDays:{serializedName:`RemainingRetentionDays`,xmlName:`RemainingRetentionDays`,type:{name:`Number`}},isImmutableStorageWithVersioningEnabled:{serializedName:`ImmutableStorageWithVersioningEnabled`,xmlName:`ImmutableStorageWithVersioningEnabled`,type:{name:`Boolean`}}}}},S_={serializedName:`KeyInfo`,type:{name:`Composite`,className:`KeyInfo`,modelProperties:{startsOn:{serializedName:`Start`,required:!0,xmlName:`Start`,type:{name:`String`}},expiresOn:{serializedName:`Expiry`,required:!0,xmlName:`Expiry`,type:{name:`String`}}}}},C_={serializedName:`UserDelegationKey`,type:{name:`Composite`,className:`UserDelegationKey`,modelProperties:{signedObjectId:{serializedName:`SignedOid`,required:!0,xmlName:`SignedOid`,type:{name:`String`}},signedTenantId:{serializedName:`SignedTid`,required:!0,xmlName:`SignedTid`,type:{name:`String`}},signedStartsOn:{serializedName:`SignedStart`,required:!0,xmlName:`SignedStart`,type:{name:`String`}},signedExpiresOn:{serializedName:`SignedExpiry`,required:!0,xmlName:`SignedExpiry`,type:{name:`String`}},signedService:{serializedName:`SignedService`,required:!0,xmlName:`SignedService`,type:{name:`String`}},signedVersion:{serializedName:`SignedVersion`,required:!0,xmlName:`SignedVersion`,type:{name:`String`}},value:{serializedName:`Value`,required:!0,xmlName:`Value`,type:{name:`String`}}}}},w_={serializedName:`FilterBlobSegment`,xmlName:`EnumerationResults`,type:{name:`Composite`,className:`FilterBlobSegment`,modelProperties:{serviceEndpoint:{serializedName:`ServiceEndpoint`,required:!0,xmlName:`ServiceEndpoint`,xmlIsAttribute:!0,type:{name:`String`}},where:{serializedName:`Where`,required:!0,xmlName:`Where`,type:{name:`String`}},blobs:{serializedName:`Blobs`,required:!0,xmlName:`Blobs`,xmlIsWrapped:!0,xmlElementName:`Blob`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`FilterBlobItem`}}}},continuationToken:{serializedName:`NextMarker`,xmlName:`NextMarker`,type:{name:`String`}}}}},T_={serializedName:`FilterBlobItem`,xmlName:`Blob`,type:{name:`Composite`,className:`FilterBlobItem`,modelProperties:{name:{serializedName:`Name`,required:!0,xmlName:`Name`,type:{name:`String`}},containerName:{serializedName:`ContainerName`,required:!0,xmlName:`ContainerName`,type:{name:`String`}},tags:{serializedName:`Tags`,xmlName:`Tags`,type:{name:`Composite`,className:`BlobTags`}}}}},E_={serializedName:`BlobTags`,xmlName:`Tags`,type:{name:`Composite`,className:`BlobTags`,modelProperties:{blobTagSet:{serializedName:`BlobTagSet`,required:!0,xmlName:`TagSet`,xmlIsWrapped:!0,xmlElementName:`Tag`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`BlobTag`}}}}}}},D_={serializedName:`BlobTag`,xmlName:`Tag`,type:{name:`Composite`,className:`BlobTag`,modelProperties:{key:{serializedName:`Key`,required:!0,xmlName:`Key`,type:{name:`String`}},value:{serializedName:`Value`,required:!0,xmlName:`Value`,type:{name:`String`}}}}},O_={serializedName:`SignedIdentifier`,xmlName:`SignedIdentifier`,type:{name:`Composite`,className:`SignedIdentifier`,modelProperties:{id:{serializedName:`Id`,required:!0,xmlName:`Id`,type:{name:`String`}},accessPolicy:{serializedName:`AccessPolicy`,xmlName:`AccessPolicy`,type:{name:`Composite`,className:`AccessPolicy`}}}}},k_={serializedName:`AccessPolicy`,type:{name:`Composite`,className:`AccessPolicy`,modelProperties:{startsOn:{serializedName:`Start`,xmlName:`Start`,type:{name:`String`}},expiresOn:{serializedName:`Expiry`,xmlName:`Expiry`,type:{name:`String`}},permissions:{serializedName:`Permission`,xmlName:`Permission`,type:{name:`String`}}}}},A_={serializedName:`ListBlobsFlatSegmentResponse`,xmlName:`EnumerationResults`,type:{name:`Composite`,className:`ListBlobsFlatSegmentResponse`,modelProperties:{serviceEndpoint:{serializedName:`ServiceEndpoint`,required:!0,xmlName:`ServiceEndpoint`,xmlIsAttribute:!0,type:{name:`String`}},containerName:{serializedName:`ContainerName`,required:!0,xmlName:`ContainerName`,xmlIsAttribute:!0,type:{name:`String`}},prefix:{serializedName:`Prefix`,xmlName:`Prefix`,type:{name:`String`}},marker:{serializedName:`Marker`,xmlName:`Marker`,type:{name:`String`}},maxPageSize:{serializedName:`MaxResults`,xmlName:`MaxResults`,type:{name:`Number`}},segment:{serializedName:`Segment`,xmlName:`Blobs`,type:{name:`Composite`,className:`BlobFlatListSegment`}},continuationToken:{serializedName:`NextMarker`,xmlName:`NextMarker`,type:{name:`String`}}}}},j_={serializedName:`BlobFlatListSegment`,xmlName:`Blobs`,type:{name:`Composite`,className:`BlobFlatListSegment`,modelProperties:{blobItems:{serializedName:`BlobItems`,required:!0,xmlName:`BlobItems`,xmlElementName:`Blob`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`BlobItemInternal`}}}}}}},M_={serializedName:`BlobItemInternal`,xmlName:`Blob`,type:{name:`Composite`,className:`BlobItemInternal`,modelProperties:{name:{serializedName:`Name`,xmlName:`Name`,type:{name:`Composite`,className:`BlobName`}},deleted:{serializedName:`Deleted`,required:!0,xmlName:`Deleted`,type:{name:`Boolean`}},snapshot:{serializedName:`Snapshot`,required:!0,xmlName:`Snapshot`,type:{name:`String`}},versionId:{serializedName:`VersionId`,xmlName:`VersionId`,type:{name:`String`}},isCurrentVersion:{serializedName:`IsCurrentVersion`,xmlName:`IsCurrentVersion`,type:{name:`Boolean`}},properties:{serializedName:`Properties`,xmlName:`Properties`,type:{name:`Composite`,className:`BlobPropertiesInternal`}},metadata:{serializedName:`Metadata`,xmlName:`Metadata`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},blobTags:{serializedName:`BlobTags`,xmlName:`Tags`,type:{name:`Composite`,className:`BlobTags`}},objectReplicationMetadata:{serializedName:`ObjectReplicationMetadata`,xmlName:`OrMetadata`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},hasVersionsOnly:{serializedName:`HasVersionsOnly`,xmlName:`HasVersionsOnly`,type:{name:`Boolean`}}}}},N_={serializedName:`BlobName`,type:{name:`Composite`,className:`BlobName`,modelProperties:{encoded:{serializedName:`Encoded`,xmlName:`Encoded`,xmlIsAttribute:!0,type:{name:`Boolean`}},content:{serializedName:`content`,xmlName:`content`,xmlIsMsText:!0,type:{name:`String`}}}}},P_={serializedName:`BlobPropertiesInternal`,xmlName:`Properties`,type:{name:`Composite`,className:`BlobPropertiesInternal`,modelProperties:{createdOn:{serializedName:`Creation-Time`,xmlName:`Creation-Time`,type:{name:`DateTimeRfc1123`}},lastModified:{serializedName:`Last-Modified`,required:!0,xmlName:`Last-Modified`,type:{name:`DateTimeRfc1123`}},etag:{serializedName:`Etag`,required:!0,xmlName:`Etag`,type:{name:`String`}},contentLength:{serializedName:`Content-Length`,xmlName:`Content-Length`,type:{name:`Number`}},contentType:{serializedName:`Content-Type`,xmlName:`Content-Type`,type:{name:`String`}},contentEncoding:{serializedName:`Content-Encoding`,xmlName:`Content-Encoding`,type:{name:`String`}},contentLanguage:{serializedName:`Content-Language`,xmlName:`Content-Language`,type:{name:`String`}},contentMD5:{serializedName:`Content-MD5`,xmlName:`Content-MD5`,type:{name:`ByteArray`}},contentDisposition:{serializedName:`Content-Disposition`,xmlName:`Content-Disposition`,type:{name:`String`}},cacheControl:{serializedName:`Cache-Control`,xmlName:`Cache-Control`,type:{name:`String`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},blobType:{serializedName:`BlobType`,xmlName:`BlobType`,type:{name:`Enum`,allowedValues:[`BlockBlob`,`PageBlob`,`AppendBlob`]}},leaseStatus:{serializedName:`LeaseStatus`,xmlName:`LeaseStatus`,type:{name:`Enum`,allowedValues:[`locked`,`unlocked`]}},leaseState:{serializedName:`LeaseState`,xmlName:`LeaseState`,type:{name:`Enum`,allowedValues:[`available`,`leased`,`expired`,`breaking`,`broken`]}},leaseDuration:{serializedName:`LeaseDuration`,xmlName:`LeaseDuration`,type:{name:`Enum`,allowedValues:[`infinite`,`fixed`]}},copyId:{serializedName:`CopyId`,xmlName:`CopyId`,type:{name:`String`}},copyStatus:{serializedName:`CopyStatus`,xmlName:`CopyStatus`,type:{name:`Enum`,allowedValues:[`pending`,`success`,`aborted`,`failed`]}},copySource:{serializedName:`CopySource`,xmlName:`CopySource`,type:{name:`String`}},copyProgress:{serializedName:`CopyProgress`,xmlName:`CopyProgress`,type:{name:`String`}},copyCompletedOn:{serializedName:`CopyCompletionTime`,xmlName:`CopyCompletionTime`,type:{name:`DateTimeRfc1123`}},copyStatusDescription:{serializedName:`CopyStatusDescription`,xmlName:`CopyStatusDescription`,type:{name:`String`}},serverEncrypted:{serializedName:`ServerEncrypted`,xmlName:`ServerEncrypted`,type:{name:`Boolean`}},incrementalCopy:{serializedName:`IncrementalCopy`,xmlName:`IncrementalCopy`,type:{name:`Boolean`}},destinationSnapshot:{serializedName:`DestinationSnapshot`,xmlName:`DestinationSnapshot`,type:{name:`String`}},deletedOn:{serializedName:`DeletedTime`,xmlName:`DeletedTime`,type:{name:`DateTimeRfc1123`}},remainingRetentionDays:{serializedName:`RemainingRetentionDays`,xmlName:`RemainingRetentionDays`,type:{name:`Number`}},accessTier:{serializedName:`AccessTier`,xmlName:`AccessTier`,type:{name:`Enum`,allowedValues:[`P4`,`P6`,`P10`,`P15`,`P20`,`P30`,`P40`,`P50`,`P60`,`P70`,`P80`,`Hot`,`Cool`,`Archive`,`Cold`]}},accessTierInferred:{serializedName:`AccessTierInferred`,xmlName:`AccessTierInferred`,type:{name:`Boolean`}},archiveStatus:{serializedName:`ArchiveStatus`,xmlName:`ArchiveStatus`,type:{name:`Enum`,allowedValues:[`rehydrate-pending-to-hot`,`rehydrate-pending-to-cool`,`rehydrate-pending-to-cold`]}},customerProvidedKeySha256:{serializedName:`CustomerProvidedKeySha256`,xmlName:`CustomerProvidedKeySha256`,type:{name:`String`}},encryptionScope:{serializedName:`EncryptionScope`,xmlName:`EncryptionScope`,type:{name:`String`}},accessTierChangedOn:{serializedName:`AccessTierChangeTime`,xmlName:`AccessTierChangeTime`,type:{name:`DateTimeRfc1123`}},tagCount:{serializedName:`TagCount`,xmlName:`TagCount`,type:{name:`Number`}},expiresOn:{serializedName:`Expiry-Time`,xmlName:`Expiry-Time`,type:{name:`DateTimeRfc1123`}},isSealed:{serializedName:`Sealed`,xmlName:`Sealed`,type:{name:`Boolean`}},rehydratePriority:{serializedName:`RehydratePriority`,xmlName:`RehydratePriority`,type:{name:`Enum`,allowedValues:[`High`,`Standard`]}},lastAccessedOn:{serializedName:`LastAccessTime`,xmlName:`LastAccessTime`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyExpiresOn:{serializedName:`ImmutabilityPolicyUntilDate`,xmlName:`ImmutabilityPolicyUntilDate`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyMode:{serializedName:`ImmutabilityPolicyMode`,xmlName:`ImmutabilityPolicyMode`,type:{name:`Enum`,allowedValues:[`Mutable`,`Unlocked`,`Locked`]}},legalHold:{serializedName:`LegalHold`,xmlName:`LegalHold`,type:{name:`Boolean`}}}}},F_={serializedName:`ListBlobsHierarchySegmentResponse`,xmlName:`EnumerationResults`,type:{name:`Composite`,className:`ListBlobsHierarchySegmentResponse`,modelProperties:{serviceEndpoint:{serializedName:`ServiceEndpoint`,required:!0,xmlName:`ServiceEndpoint`,xmlIsAttribute:!0,type:{name:`String`}},containerName:{serializedName:`ContainerName`,required:!0,xmlName:`ContainerName`,xmlIsAttribute:!0,type:{name:`String`}},prefix:{serializedName:`Prefix`,xmlName:`Prefix`,type:{name:`String`}},marker:{serializedName:`Marker`,xmlName:`Marker`,type:{name:`String`}},maxPageSize:{serializedName:`MaxResults`,xmlName:`MaxResults`,type:{name:`Number`}},delimiter:{serializedName:`Delimiter`,xmlName:`Delimiter`,type:{name:`String`}},segment:{serializedName:`Segment`,xmlName:`Blobs`,type:{name:`Composite`,className:`BlobHierarchyListSegment`}},continuationToken:{serializedName:`NextMarker`,xmlName:`NextMarker`,type:{name:`String`}}}}},I_={serializedName:`BlobHierarchyListSegment`,xmlName:`Blobs`,type:{name:`Composite`,className:`BlobHierarchyListSegment`,modelProperties:{blobPrefixes:{serializedName:`BlobPrefixes`,xmlName:`BlobPrefixes`,xmlElementName:`BlobPrefix`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`BlobPrefix`}}}},blobItems:{serializedName:`BlobItems`,required:!0,xmlName:`BlobItems`,xmlElementName:`Blob`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`BlobItemInternal`}}}}}}},L_={serializedName:`BlobPrefix`,type:{name:`Composite`,className:`BlobPrefix`,modelProperties:{name:{serializedName:`Name`,xmlName:`Name`,type:{name:`Composite`,className:`BlobName`}}}}},R_={serializedName:`BlockLookupList`,xmlName:`BlockList`,type:{name:`Composite`,className:`BlockLookupList`,modelProperties:{committed:{serializedName:`Committed`,xmlName:`Committed`,xmlElementName:`Committed`,type:{name:`Sequence`,element:{type:{name:`String`}}}},uncommitted:{serializedName:`Uncommitted`,xmlName:`Uncommitted`,xmlElementName:`Uncommitted`,type:{name:`Sequence`,element:{type:{name:`String`}}}},latest:{serializedName:`Latest`,xmlName:`Latest`,xmlElementName:`Latest`,type:{name:`Sequence`,element:{type:{name:`String`}}}}}}},z_={serializedName:`BlockList`,type:{name:`Composite`,className:`BlockList`,modelProperties:{committedBlocks:{serializedName:`CommittedBlocks`,xmlName:`CommittedBlocks`,xmlIsWrapped:!0,xmlElementName:`Block`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`Block`}}}},uncommittedBlocks:{serializedName:`UncommittedBlocks`,xmlName:`UncommittedBlocks`,xmlIsWrapped:!0,xmlElementName:`Block`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`Block`}}}}}}},B_={serializedName:`Block`,type:{name:`Composite`,className:`Block`,modelProperties:{name:{serializedName:`Name`,required:!0,xmlName:`Name`,type:{name:`String`}},size:{serializedName:`Size`,required:!0,xmlName:`Size`,type:{name:`Number`}}}}},V_={serializedName:`PageList`,type:{name:`Composite`,className:`PageList`,modelProperties:{pageRange:{serializedName:`PageRange`,xmlName:`PageRange`,xmlElementName:`PageRange`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`PageRange`}}}},clearRange:{serializedName:`ClearRange`,xmlName:`ClearRange`,xmlElementName:`ClearRange`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`ClearRange`}}}},continuationToken:{serializedName:`NextMarker`,xmlName:`NextMarker`,type:{name:`String`}}}}},H_={serializedName:`PageRange`,xmlName:`PageRange`,type:{name:`Composite`,className:`PageRange`,modelProperties:{start:{serializedName:`Start`,required:!0,xmlName:`Start`,type:{name:`Number`}},end:{serializedName:`End`,required:!0,xmlName:`End`,type:{name:`Number`}}}}},U_={serializedName:`ClearRange`,xmlName:`ClearRange`,type:{name:`Composite`,className:`ClearRange`,modelProperties:{start:{serializedName:`Start`,required:!0,xmlName:`Start`,type:{name:`Number`}},end:{serializedName:`End`,required:!0,xmlName:`End`,type:{name:`Number`}}}}},W_={serializedName:`QueryRequest`,xmlName:`QueryRequest`,type:{name:`Composite`,className:`QueryRequest`,modelProperties:{queryType:{serializedName:`QueryType`,required:!0,xmlName:`QueryType`,type:{name:`String`}},expression:{serializedName:`Expression`,required:!0,xmlName:`Expression`,type:{name:`String`}},inputSerialization:{serializedName:`InputSerialization`,xmlName:`InputSerialization`,type:{name:`Composite`,className:`QuerySerialization`}},outputSerialization:{serializedName:`OutputSerialization`,xmlName:`OutputSerialization`,type:{name:`Composite`,className:`QuerySerialization`}}}}},G_={serializedName:`QuerySerialization`,type:{name:`Composite`,className:`QuerySerialization`,modelProperties:{format:{serializedName:`Format`,xmlName:`Format`,type:{name:`Composite`,className:`QueryFormat`}}}}},K_={serializedName:`QueryFormat`,type:{name:`Composite`,className:`QueryFormat`,modelProperties:{type:{serializedName:`Type`,required:!0,xmlName:`Type`,type:{name:`Enum`,allowedValues:[`delimited`,`json`,`arrow`,`parquet`]}},delimitedTextConfiguration:{serializedName:`DelimitedTextConfiguration`,xmlName:`DelimitedTextConfiguration`,type:{name:`Composite`,className:`DelimitedTextConfiguration`}},jsonTextConfiguration:{serializedName:`JsonTextConfiguration`,xmlName:`JsonTextConfiguration`,type:{name:`Composite`,className:`JsonTextConfiguration`}},arrowConfiguration:{serializedName:`ArrowConfiguration`,xmlName:`ArrowConfiguration`,type:{name:`Composite`,className:`ArrowConfiguration`}},parquetTextConfiguration:{serializedName:`ParquetTextConfiguration`,xmlName:`ParquetTextConfiguration`,type:{name:`Dictionary`,value:{type:{name:`any`}}}}}}},q_={serializedName:`DelimitedTextConfiguration`,xmlName:`DelimitedTextConfiguration`,type:{name:`Composite`,className:`DelimitedTextConfiguration`,modelProperties:{columnSeparator:{serializedName:`ColumnSeparator`,xmlName:`ColumnSeparator`,type:{name:`String`}},fieldQuote:{serializedName:`FieldQuote`,xmlName:`FieldQuote`,type:{name:`String`}},recordSeparator:{serializedName:`RecordSeparator`,xmlName:`RecordSeparator`,type:{name:`String`}},escapeChar:{serializedName:`EscapeChar`,xmlName:`EscapeChar`,type:{name:`String`}},headersPresent:{serializedName:`HeadersPresent`,xmlName:`HasHeaders`,type:{name:`Boolean`}}}}},J_={serializedName:`JsonTextConfiguration`,xmlName:`JsonTextConfiguration`,type:{name:`Composite`,className:`JsonTextConfiguration`,modelProperties:{recordSeparator:{serializedName:`RecordSeparator`,xmlName:`RecordSeparator`,type:{name:`String`}}}}},Y_={serializedName:`ArrowConfiguration`,xmlName:`ArrowConfiguration`,type:{name:`Composite`,className:`ArrowConfiguration`,modelProperties:{schema:{serializedName:`Schema`,required:!0,xmlName:`Schema`,xmlIsWrapped:!0,xmlElementName:`Field`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`ArrowField`}}}}}}},X_={serializedName:`ArrowField`,xmlName:`Field`,type:{name:`Composite`,className:`ArrowField`,modelProperties:{type:{serializedName:`Type`,required:!0,xmlName:`Type`,type:{name:`String`}},name:{serializedName:`Name`,xmlName:`Name`,type:{name:`String`}},precision:{serializedName:`Precision`,xmlName:`Precision`,type:{name:`Number`}},scale:{serializedName:`Scale`,xmlName:`Scale`,type:{name:`Number`}}}}},Z_={serializedName:`Service_setPropertiesHeaders`,type:{name:`Composite`,className:`ServiceSetPropertiesHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Q_={serializedName:`Service_setPropertiesExceptionHeaders`,type:{name:`Composite`,className:`ServiceSetPropertiesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},$_={serializedName:`Service_getPropertiesHeaders`,type:{name:`Composite`,className:`ServiceGetPropertiesHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ev={serializedName:`Service_getPropertiesExceptionHeaders`,type:{name:`Composite`,className:`ServiceGetPropertiesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},tv={serializedName:`Service_getStatisticsHeaders`,type:{name:`Composite`,className:`ServiceGetStatisticsHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},nv={serializedName:`Service_getStatisticsExceptionHeaders`,type:{name:`Composite`,className:`ServiceGetStatisticsExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},rv={serializedName:`Service_listContainersSegmentHeaders`,type:{name:`Composite`,className:`ServiceListContainersSegmentHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},iv={serializedName:`Service_listContainersSegmentExceptionHeaders`,type:{name:`Composite`,className:`ServiceListContainersSegmentExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},av={serializedName:`Service_getUserDelegationKeyHeaders`,type:{name:`Composite`,className:`ServiceGetUserDelegationKeyHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ov={serializedName:`Service_getUserDelegationKeyExceptionHeaders`,type:{name:`Composite`,className:`ServiceGetUserDelegationKeyExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},sv={serializedName:`Service_getAccountInfoHeaders`,type:{name:`Composite`,className:`ServiceGetAccountInfoHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},skuName:{serializedName:`x-ms-sku-name`,xmlName:`x-ms-sku-name`,type:{name:`Enum`,allowedValues:[`Standard_LRS`,`Standard_GRS`,`Standard_RAGRS`,`Standard_ZRS`,`Premium_LRS`]}},accountKind:{serializedName:`x-ms-account-kind`,xmlName:`x-ms-account-kind`,type:{name:`Enum`,allowedValues:[`Storage`,`BlobStorage`,`StorageV2`,`FileStorage`,`BlockBlobStorage`]}},isHierarchicalNamespaceEnabled:{serializedName:`x-ms-is-hns-enabled`,xmlName:`x-ms-is-hns-enabled`,type:{name:`Boolean`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},cv={serializedName:`Service_getAccountInfoExceptionHeaders`,type:{name:`Composite`,className:`ServiceGetAccountInfoExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},lv={serializedName:`Service_submitBatchHeaders`,type:{name:`Composite`,className:`ServiceSubmitBatchHeaders`,modelProperties:{contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},uv={serializedName:`Service_submitBatchExceptionHeaders`,type:{name:`Composite`,className:`ServiceSubmitBatchExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},dv={serializedName:`Service_filterBlobsHeaders`,type:{name:`Composite`,className:`ServiceFilterBlobsHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},fv={serializedName:`Service_filterBlobsExceptionHeaders`,type:{name:`Composite`,className:`ServiceFilterBlobsExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},pv={serializedName:`Container_createHeaders`,type:{name:`Composite`,className:`ContainerCreateHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},mv={serializedName:`Container_createExceptionHeaders`,type:{name:`Composite`,className:`ContainerCreateExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},hv={serializedName:`Container_getPropertiesHeaders`,type:{name:`Composite`,className:`ContainerGetPropertiesHeaders`,modelProperties:{metadata:{serializedName:`x-ms-meta`,headerCollectionPrefix:`x-ms-meta-`,xmlName:`x-ms-meta`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseDuration:{serializedName:`x-ms-lease-duration`,xmlName:`x-ms-lease-duration`,type:{name:`Enum`,allowedValues:[`infinite`,`fixed`]}},leaseState:{serializedName:`x-ms-lease-state`,xmlName:`x-ms-lease-state`,type:{name:`Enum`,allowedValues:[`available`,`leased`,`expired`,`breaking`,`broken`]}},leaseStatus:{serializedName:`x-ms-lease-status`,xmlName:`x-ms-lease-status`,type:{name:`Enum`,allowedValues:[`locked`,`unlocked`]}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},blobPublicAccess:{serializedName:`x-ms-blob-public-access`,xmlName:`x-ms-blob-public-access`,type:{name:`Enum`,allowedValues:[`container`,`blob`]}},hasImmutabilityPolicy:{serializedName:`x-ms-has-immutability-policy`,xmlName:`x-ms-has-immutability-policy`,type:{name:`Boolean`}},hasLegalHold:{serializedName:`x-ms-has-legal-hold`,xmlName:`x-ms-has-legal-hold`,type:{name:`Boolean`}},defaultEncryptionScope:{serializedName:`x-ms-default-encryption-scope`,xmlName:`x-ms-default-encryption-scope`,type:{name:`String`}},denyEncryptionScopeOverride:{serializedName:`x-ms-deny-encryption-scope-override`,xmlName:`x-ms-deny-encryption-scope-override`,type:{name:`Boolean`}},isImmutableStorageWithVersioningEnabled:{serializedName:`x-ms-immutable-storage-with-versioning-enabled`,xmlName:`x-ms-immutable-storage-with-versioning-enabled`,type:{name:`Boolean`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},gv={serializedName:`Container_getPropertiesExceptionHeaders`,type:{name:`Composite`,className:`ContainerGetPropertiesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},_v={serializedName:`Container_deleteHeaders`,type:{name:`Composite`,className:`ContainerDeleteHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},vv={serializedName:`Container_deleteExceptionHeaders`,type:{name:`Composite`,className:`ContainerDeleteExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},yv={serializedName:`Container_setMetadataHeaders`,type:{name:`Composite`,className:`ContainerSetMetadataHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},bv={serializedName:`Container_setMetadataExceptionHeaders`,type:{name:`Composite`,className:`ContainerSetMetadataExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},xv={serializedName:`Container_getAccessPolicyHeaders`,type:{name:`Composite`,className:`ContainerGetAccessPolicyHeaders`,modelProperties:{blobPublicAccess:{serializedName:`x-ms-blob-public-access`,xmlName:`x-ms-blob-public-access`,type:{name:`Enum`,allowedValues:[`container`,`blob`]}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Sv={serializedName:`Container_getAccessPolicyExceptionHeaders`,type:{name:`Composite`,className:`ContainerGetAccessPolicyExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Cv={serializedName:`Container_setAccessPolicyHeaders`,type:{name:`Composite`,className:`ContainerSetAccessPolicyHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},wv={serializedName:`Container_setAccessPolicyExceptionHeaders`,type:{name:`Composite`,className:`ContainerSetAccessPolicyExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Tv={serializedName:`Container_restoreHeaders`,type:{name:`Composite`,className:`ContainerRestoreHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Ev={serializedName:`Container_restoreExceptionHeaders`,type:{name:`Composite`,className:`ContainerRestoreExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Dv={serializedName:`Container_renameHeaders`,type:{name:`Composite`,className:`ContainerRenameHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Ov={serializedName:`Container_renameExceptionHeaders`,type:{name:`Composite`,className:`ContainerRenameExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},kv={serializedName:`Container_submitBatchHeaders`,type:{name:`Composite`,className:`ContainerSubmitBatchHeaders`,modelProperties:{contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}}}}},Av={serializedName:`Container_submitBatchExceptionHeaders`,type:{name:`Composite`,className:`ContainerSubmitBatchExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},jv={serializedName:`Container_filterBlobsHeaders`,type:{name:`Composite`,className:`ContainerFilterBlobsHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},Mv={serializedName:`Container_filterBlobsExceptionHeaders`,type:{name:`Composite`,className:`ContainerFilterBlobsExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Nv={serializedName:`Container_acquireLeaseHeaders`,type:{name:`Composite`,className:`ContainerAcquireLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseId:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},Pv={serializedName:`Container_acquireLeaseExceptionHeaders`,type:{name:`Composite`,className:`ContainerAcquireLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Fv={serializedName:`Container_releaseLeaseHeaders`,type:{name:`Composite`,className:`ContainerReleaseLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},Iv={serializedName:`Container_releaseLeaseExceptionHeaders`,type:{name:`Composite`,className:`ContainerReleaseLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Lv={serializedName:`Container_renewLeaseHeaders`,type:{name:`Composite`,className:`ContainerRenewLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseId:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},Rv={serializedName:`Container_renewLeaseExceptionHeaders`,type:{name:`Composite`,className:`ContainerRenewLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},zv={serializedName:`Container_breakLeaseHeaders`,type:{name:`Composite`,className:`ContainerBreakLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseTime:{serializedName:`x-ms-lease-time`,xmlName:`x-ms-lease-time`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},Bv={serializedName:`Container_breakLeaseExceptionHeaders`,type:{name:`Composite`,className:`ContainerBreakLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Vv={serializedName:`Container_changeLeaseHeaders`,type:{name:`Composite`,className:`ContainerChangeLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseId:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},Hv={serializedName:`Container_changeLeaseExceptionHeaders`,type:{name:`Composite`,className:`ContainerChangeLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Uv={serializedName:`Container_listBlobFlatSegmentHeaders`,type:{name:`Composite`,className:`ContainerListBlobFlatSegmentHeaders`,modelProperties:{contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Wv={serializedName:`Container_listBlobFlatSegmentExceptionHeaders`,type:{name:`Composite`,className:`ContainerListBlobFlatSegmentExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Gv={serializedName:`Container_listBlobHierarchySegmentHeaders`,type:{name:`Composite`,className:`ContainerListBlobHierarchySegmentHeaders`,modelProperties:{contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Kv={serializedName:`Container_listBlobHierarchySegmentExceptionHeaders`,type:{name:`Composite`,className:`ContainerListBlobHierarchySegmentExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},qv={serializedName:`Container_getAccountInfoHeaders`,type:{name:`Composite`,className:`ContainerGetAccountInfoHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},skuName:{serializedName:`x-ms-sku-name`,xmlName:`x-ms-sku-name`,type:{name:`Enum`,allowedValues:[`Standard_LRS`,`Standard_GRS`,`Standard_RAGRS`,`Standard_ZRS`,`Premium_LRS`]}},accountKind:{serializedName:`x-ms-account-kind`,xmlName:`x-ms-account-kind`,type:{name:`Enum`,allowedValues:[`Storage`,`BlobStorage`,`StorageV2`,`FileStorage`,`BlockBlobStorage`]}},isHierarchicalNamespaceEnabled:{serializedName:`x-ms-is-hns-enabled`,xmlName:`x-ms-is-hns-enabled`,type:{name:`Boolean`}}}}},Jv={serializedName:`Container_getAccountInfoExceptionHeaders`,type:{name:`Composite`,className:`ContainerGetAccountInfoExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Yv={serializedName:`Blob_downloadHeaders`,type:{name:`Composite`,className:`BlobDownloadHeaders`,modelProperties:{lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},createdOn:{serializedName:`x-ms-creation-time`,xmlName:`x-ms-creation-time`,type:{name:`DateTimeRfc1123`}},metadata:{serializedName:`x-ms-meta`,headerCollectionPrefix:`x-ms-meta-`,xmlName:`x-ms-meta`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},objectReplicationPolicyId:{serializedName:`x-ms-or-policy-id`,xmlName:`x-ms-or-policy-id`,type:{name:`String`}},objectReplicationRules:{serializedName:`x-ms-or`,headerCollectionPrefix:`x-ms-or-`,xmlName:`x-ms-or`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},contentLength:{serializedName:`content-length`,xmlName:`content-length`,type:{name:`Number`}},contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},contentRange:{serializedName:`content-range`,xmlName:`content-range`,type:{name:`String`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},contentEncoding:{serializedName:`content-encoding`,xmlName:`content-encoding`,type:{name:`String`}},cacheControl:{serializedName:`cache-control`,xmlName:`cache-control`,type:{name:`String`}},contentDisposition:{serializedName:`content-disposition`,xmlName:`content-disposition`,type:{name:`String`}},contentLanguage:{serializedName:`content-language`,xmlName:`content-language`,type:{name:`String`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},blobType:{serializedName:`x-ms-blob-type`,xmlName:`x-ms-blob-type`,type:{name:`Enum`,allowedValues:[`BlockBlob`,`PageBlob`,`AppendBlob`]}},copyCompletedOn:{serializedName:`x-ms-copy-completion-time`,xmlName:`x-ms-copy-completion-time`,type:{name:`DateTimeRfc1123`}},copyStatusDescription:{serializedName:`x-ms-copy-status-description`,xmlName:`x-ms-copy-status-description`,type:{name:`String`}},copyId:{serializedName:`x-ms-copy-id`,xmlName:`x-ms-copy-id`,type:{name:`String`}},copyProgress:{serializedName:`x-ms-copy-progress`,xmlName:`x-ms-copy-progress`,type:{name:`String`}},copySource:{serializedName:`x-ms-copy-source`,xmlName:`x-ms-copy-source`,type:{name:`String`}},copyStatus:{serializedName:`x-ms-copy-status`,xmlName:`x-ms-copy-status`,type:{name:`Enum`,allowedValues:[`pending`,`success`,`aborted`,`failed`]}},leaseDuration:{serializedName:`x-ms-lease-duration`,xmlName:`x-ms-lease-duration`,type:{name:`Enum`,allowedValues:[`infinite`,`fixed`]}},leaseState:{serializedName:`x-ms-lease-state`,xmlName:`x-ms-lease-state`,type:{name:`Enum`,allowedValues:[`available`,`leased`,`expired`,`breaking`,`broken`]}},leaseStatus:{serializedName:`x-ms-lease-status`,xmlName:`x-ms-lease-status`,type:{name:`Enum`,allowedValues:[`locked`,`unlocked`]}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},isCurrentVersion:{serializedName:`x-ms-is-current-version`,xmlName:`x-ms-is-current-version`,type:{name:`Boolean`}},acceptRanges:{serializedName:`accept-ranges`,xmlName:`accept-ranges`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},blobCommittedBlockCount:{serializedName:`x-ms-blob-committed-block-count`,xmlName:`x-ms-blob-committed-block-count`,type:{name:`Number`}},isServerEncrypted:{serializedName:`x-ms-server-encrypted`,xmlName:`x-ms-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},blobContentMD5:{serializedName:`x-ms-blob-content-md5`,xmlName:`x-ms-blob-content-md5`,type:{name:`ByteArray`}},tagCount:{serializedName:`x-ms-tag-count`,xmlName:`x-ms-tag-count`,type:{name:`Number`}},isSealed:{serializedName:`x-ms-blob-sealed`,xmlName:`x-ms-blob-sealed`,type:{name:`Boolean`}},lastAccessed:{serializedName:`x-ms-last-access-time`,xmlName:`x-ms-last-access-time`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyExpiresOn:{serializedName:`x-ms-immutability-policy-until-date`,xmlName:`x-ms-immutability-policy-until-date`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyMode:{serializedName:`x-ms-immutability-policy-mode`,xmlName:`x-ms-immutability-policy-mode`,type:{name:`Enum`,allowedValues:[`Mutable`,`Unlocked`,`Locked`]}},legalHold:{serializedName:`x-ms-legal-hold`,xmlName:`x-ms-legal-hold`,type:{name:`Boolean`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},contentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}}}}},Xv={serializedName:`Blob_downloadExceptionHeaders`,type:{name:`Composite`,className:`BlobDownloadExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Zv={serializedName:`Blob_getPropertiesHeaders`,type:{name:`Composite`,className:`BlobGetPropertiesHeaders`,modelProperties:{lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},createdOn:{serializedName:`x-ms-creation-time`,xmlName:`x-ms-creation-time`,type:{name:`DateTimeRfc1123`}},metadata:{serializedName:`x-ms-meta`,headerCollectionPrefix:`x-ms-meta-`,xmlName:`x-ms-meta`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},objectReplicationPolicyId:{serializedName:`x-ms-or-policy-id`,xmlName:`x-ms-or-policy-id`,type:{name:`String`}},objectReplicationRules:{serializedName:`x-ms-or`,headerCollectionPrefix:`x-ms-or-`,xmlName:`x-ms-or`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},blobType:{serializedName:`x-ms-blob-type`,xmlName:`x-ms-blob-type`,type:{name:`Enum`,allowedValues:[`BlockBlob`,`PageBlob`,`AppendBlob`]}},copyCompletedOn:{serializedName:`x-ms-copy-completion-time`,xmlName:`x-ms-copy-completion-time`,type:{name:`DateTimeRfc1123`}},copyStatusDescription:{serializedName:`x-ms-copy-status-description`,xmlName:`x-ms-copy-status-description`,type:{name:`String`}},copyId:{serializedName:`x-ms-copy-id`,xmlName:`x-ms-copy-id`,type:{name:`String`}},copyProgress:{serializedName:`x-ms-copy-progress`,xmlName:`x-ms-copy-progress`,type:{name:`String`}},copySource:{serializedName:`x-ms-copy-source`,xmlName:`x-ms-copy-source`,type:{name:`String`}},copyStatus:{serializedName:`x-ms-copy-status`,xmlName:`x-ms-copy-status`,type:{name:`Enum`,allowedValues:[`pending`,`success`,`aborted`,`failed`]}},isIncrementalCopy:{serializedName:`x-ms-incremental-copy`,xmlName:`x-ms-incremental-copy`,type:{name:`Boolean`}},destinationSnapshot:{serializedName:`x-ms-copy-destination-snapshot`,xmlName:`x-ms-copy-destination-snapshot`,type:{name:`String`}},leaseDuration:{serializedName:`x-ms-lease-duration`,xmlName:`x-ms-lease-duration`,type:{name:`Enum`,allowedValues:[`infinite`,`fixed`]}},leaseState:{serializedName:`x-ms-lease-state`,xmlName:`x-ms-lease-state`,type:{name:`Enum`,allowedValues:[`available`,`leased`,`expired`,`breaking`,`broken`]}},leaseStatus:{serializedName:`x-ms-lease-status`,xmlName:`x-ms-lease-status`,type:{name:`Enum`,allowedValues:[`locked`,`unlocked`]}},contentLength:{serializedName:`content-length`,xmlName:`content-length`,type:{name:`Number`}},contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},contentEncoding:{serializedName:`content-encoding`,xmlName:`content-encoding`,type:{name:`String`}},contentDisposition:{serializedName:`content-disposition`,xmlName:`content-disposition`,type:{name:`String`}},contentLanguage:{serializedName:`content-language`,xmlName:`content-language`,type:{name:`String`}},cacheControl:{serializedName:`cache-control`,xmlName:`cache-control`,type:{name:`String`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},acceptRanges:{serializedName:`accept-ranges`,xmlName:`accept-ranges`,type:{name:`String`}},blobCommittedBlockCount:{serializedName:`x-ms-blob-committed-block-count`,xmlName:`x-ms-blob-committed-block-count`,type:{name:`Number`}},isServerEncrypted:{serializedName:`x-ms-server-encrypted`,xmlName:`x-ms-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},accessTier:{serializedName:`x-ms-access-tier`,xmlName:`x-ms-access-tier`,type:{name:`String`}},accessTierInferred:{serializedName:`x-ms-access-tier-inferred`,xmlName:`x-ms-access-tier-inferred`,type:{name:`Boolean`}},archiveStatus:{serializedName:`x-ms-archive-status`,xmlName:`x-ms-archive-status`,type:{name:`String`}},accessTierChangedOn:{serializedName:`x-ms-access-tier-change-time`,xmlName:`x-ms-access-tier-change-time`,type:{name:`DateTimeRfc1123`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},isCurrentVersion:{serializedName:`x-ms-is-current-version`,xmlName:`x-ms-is-current-version`,type:{name:`Boolean`}},tagCount:{serializedName:`x-ms-tag-count`,xmlName:`x-ms-tag-count`,type:{name:`Number`}},expiresOn:{serializedName:`x-ms-expiry-time`,xmlName:`x-ms-expiry-time`,type:{name:`DateTimeRfc1123`}},isSealed:{serializedName:`x-ms-blob-sealed`,xmlName:`x-ms-blob-sealed`,type:{name:`Boolean`}},rehydratePriority:{serializedName:`x-ms-rehydrate-priority`,xmlName:`x-ms-rehydrate-priority`,type:{name:`Enum`,allowedValues:[`High`,`Standard`]}},lastAccessed:{serializedName:`x-ms-last-access-time`,xmlName:`x-ms-last-access-time`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyExpiresOn:{serializedName:`x-ms-immutability-policy-until-date`,xmlName:`x-ms-immutability-policy-until-date`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyMode:{serializedName:`x-ms-immutability-policy-mode`,xmlName:`x-ms-immutability-policy-mode`,type:{name:`Enum`,allowedValues:[`Mutable`,`Unlocked`,`Locked`]}},legalHold:{serializedName:`x-ms-legal-hold`,xmlName:`x-ms-legal-hold`,type:{name:`Boolean`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Qv={serializedName:`Blob_getPropertiesExceptionHeaders`,type:{name:`Composite`,className:`BlobGetPropertiesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},$v={serializedName:`Blob_deleteHeaders`,type:{name:`Composite`,className:`BlobDeleteHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ey={serializedName:`Blob_deleteExceptionHeaders`,type:{name:`Composite`,className:`BlobDeleteExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ty={serializedName:`Blob_undeleteHeaders`,type:{name:`Composite`,className:`BlobUndeleteHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ny={serializedName:`Blob_undeleteExceptionHeaders`,type:{name:`Composite`,className:`BlobUndeleteExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ry={serializedName:`Blob_setExpiryHeaders`,type:{name:`Composite`,className:`BlobSetExpiryHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},iy={serializedName:`Blob_setExpiryExceptionHeaders`,type:{name:`Composite`,className:`BlobSetExpiryExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ay={serializedName:`Blob_setHttpHeadersHeaders`,type:{name:`Composite`,className:`BlobSetHttpHeadersHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},oy={serializedName:`Blob_setHttpHeadersExceptionHeaders`,type:{name:`Composite`,className:`BlobSetHttpHeadersExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},sy={serializedName:`Blob_setImmutabilityPolicyHeaders`,type:{name:`Composite`,className:`BlobSetImmutabilityPolicyHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyExpiry:{serializedName:`x-ms-immutability-policy-until-date`,xmlName:`x-ms-immutability-policy-until-date`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyMode:{serializedName:`x-ms-immutability-policy-mode`,xmlName:`x-ms-immutability-policy-mode`,type:{name:`Enum`,allowedValues:[`Mutable`,`Unlocked`,`Locked`]}}}}},cy={serializedName:`Blob_setImmutabilityPolicyExceptionHeaders`,type:{name:`Composite`,className:`BlobSetImmutabilityPolicyExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ly={serializedName:`Blob_deleteImmutabilityPolicyHeaders`,type:{name:`Composite`,className:`BlobDeleteImmutabilityPolicyHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},uy={serializedName:`Blob_deleteImmutabilityPolicyExceptionHeaders`,type:{name:`Composite`,className:`BlobDeleteImmutabilityPolicyExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},dy={serializedName:`Blob_setLegalHoldHeaders`,type:{name:`Composite`,className:`BlobSetLegalHoldHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},legalHold:{serializedName:`x-ms-legal-hold`,xmlName:`x-ms-legal-hold`,type:{name:`Boolean`}}}}},fy={serializedName:`Blob_setLegalHoldExceptionHeaders`,type:{name:`Composite`,className:`BlobSetLegalHoldExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},py={serializedName:`Blob_setMetadataHeaders`,type:{name:`Composite`,className:`BlobSetMetadataHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},my={serializedName:`Blob_setMetadataExceptionHeaders`,type:{name:`Composite`,className:`BlobSetMetadataExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},hy={serializedName:`Blob_acquireLeaseHeaders`,type:{name:`Composite`,className:`BlobAcquireLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseId:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},gy={serializedName:`Blob_acquireLeaseExceptionHeaders`,type:{name:`Composite`,className:`BlobAcquireLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},_y={serializedName:`Blob_releaseLeaseHeaders`,type:{name:`Composite`,className:`BlobReleaseLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},vy={serializedName:`Blob_releaseLeaseExceptionHeaders`,type:{name:`Composite`,className:`BlobReleaseLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},yy={serializedName:`Blob_renewLeaseHeaders`,type:{name:`Composite`,className:`BlobRenewLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseId:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},by={serializedName:`Blob_renewLeaseExceptionHeaders`,type:{name:`Composite`,className:`BlobRenewLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},xy={serializedName:`Blob_changeLeaseHeaders`,type:{name:`Composite`,className:`BlobChangeLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},leaseId:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},Sy={serializedName:`Blob_changeLeaseExceptionHeaders`,type:{name:`Composite`,className:`BlobChangeLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Cy={serializedName:`Blob_breakLeaseHeaders`,type:{name:`Composite`,className:`BlobBreakLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseTime:{serializedName:`x-ms-lease-time`,xmlName:`x-ms-lease-time`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},wy={serializedName:`Blob_breakLeaseExceptionHeaders`,type:{name:`Composite`,className:`BlobBreakLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Ty={serializedName:`Blob_createSnapshotHeaders`,type:{name:`Composite`,className:`BlobCreateSnapshotHeaders`,modelProperties:{snapshot:{serializedName:`x-ms-snapshot`,xmlName:`x-ms-snapshot`,type:{name:`String`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Ey={serializedName:`Blob_createSnapshotExceptionHeaders`,type:{name:`Composite`,className:`BlobCreateSnapshotExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Dy={serializedName:`Blob_startCopyFromURLHeaders`,type:{name:`Composite`,className:`BlobStartCopyFromURLHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},copyId:{serializedName:`x-ms-copy-id`,xmlName:`x-ms-copy-id`,type:{name:`String`}},copyStatus:{serializedName:`x-ms-copy-status`,xmlName:`x-ms-copy-status`,type:{name:`Enum`,allowedValues:[`pending`,`success`,`aborted`,`failed`]}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Oy={serializedName:`Blob_startCopyFromURLExceptionHeaders`,type:{name:`Composite`,className:`BlobStartCopyFromURLExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},copySourceErrorCode:{serializedName:`x-ms-copy-source-error-code`,xmlName:`x-ms-copy-source-error-code`,type:{name:`String`}},copySourceStatusCode:{serializedName:`x-ms-copy-source-status-code`,xmlName:`x-ms-copy-source-status-code`,type:{name:`Number`}}}}},ky={serializedName:`Blob_copyFromURLHeaders`,type:{name:`Composite`,className:`BlobCopyFromURLHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},copyId:{serializedName:`x-ms-copy-id`,xmlName:`x-ms-copy-id`,type:{name:`String`}},copyStatus:{defaultValue:`success`,isConstant:!0,serializedName:`x-ms-copy-status`,type:{name:`String`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Ay={serializedName:`Blob_copyFromURLExceptionHeaders`,type:{name:`Composite`,className:`BlobCopyFromURLExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},copySourceErrorCode:{serializedName:`x-ms-copy-source-error-code`,xmlName:`x-ms-copy-source-error-code`,type:{name:`String`}},copySourceStatusCode:{serializedName:`x-ms-copy-source-status-code`,xmlName:`x-ms-copy-source-status-code`,type:{name:`Number`}}}}},jy={serializedName:`Blob_abortCopyFromURLHeaders`,type:{name:`Composite`,className:`BlobAbortCopyFromURLHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},My={serializedName:`Blob_abortCopyFromURLExceptionHeaders`,type:{name:`Composite`,className:`BlobAbortCopyFromURLExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Ny={serializedName:`Blob_setTierHeaders`,type:{name:`Composite`,className:`BlobSetTierHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Py={serializedName:`Blob_setTierExceptionHeaders`,type:{name:`Composite`,className:`BlobSetTierExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Fy={serializedName:`Blob_getAccountInfoHeaders`,type:{name:`Composite`,className:`BlobGetAccountInfoHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},skuName:{serializedName:`x-ms-sku-name`,xmlName:`x-ms-sku-name`,type:{name:`Enum`,allowedValues:[`Standard_LRS`,`Standard_GRS`,`Standard_RAGRS`,`Standard_ZRS`,`Premium_LRS`]}},accountKind:{serializedName:`x-ms-account-kind`,xmlName:`x-ms-account-kind`,type:{name:`Enum`,allowedValues:[`Storage`,`BlobStorage`,`StorageV2`,`FileStorage`,`BlockBlobStorage`]}},isHierarchicalNamespaceEnabled:{serializedName:`x-ms-is-hns-enabled`,xmlName:`x-ms-is-hns-enabled`,type:{name:`Boolean`}}}}},Iy={serializedName:`Blob_getAccountInfoExceptionHeaders`,type:{name:`Composite`,className:`BlobGetAccountInfoExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Ly={serializedName:`Blob_queryHeaders`,type:{name:`Composite`,className:`BlobQueryHeaders`,modelProperties:{lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},metadata:{serializedName:`x-ms-meta`,headerCollectionPrefix:`x-ms-meta-`,xmlName:`x-ms-meta`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},contentLength:{serializedName:`content-length`,xmlName:`content-length`,type:{name:`Number`}},contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},contentRange:{serializedName:`content-range`,xmlName:`content-range`,type:{name:`String`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},contentEncoding:{serializedName:`content-encoding`,xmlName:`content-encoding`,type:{name:`String`}},cacheControl:{serializedName:`cache-control`,xmlName:`cache-control`,type:{name:`String`}},contentDisposition:{serializedName:`content-disposition`,xmlName:`content-disposition`,type:{name:`String`}},contentLanguage:{serializedName:`content-language`,xmlName:`content-language`,type:{name:`String`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},blobType:{serializedName:`x-ms-blob-type`,xmlName:`x-ms-blob-type`,type:{name:`Enum`,allowedValues:[`BlockBlob`,`PageBlob`,`AppendBlob`]}},copyCompletionTime:{serializedName:`x-ms-copy-completion-time`,xmlName:`x-ms-copy-completion-time`,type:{name:`DateTimeRfc1123`}},copyStatusDescription:{serializedName:`x-ms-copy-status-description`,xmlName:`x-ms-copy-status-description`,type:{name:`String`}},copyId:{serializedName:`x-ms-copy-id`,xmlName:`x-ms-copy-id`,type:{name:`String`}},copyProgress:{serializedName:`x-ms-copy-progress`,xmlName:`x-ms-copy-progress`,type:{name:`String`}},copySource:{serializedName:`x-ms-copy-source`,xmlName:`x-ms-copy-source`,type:{name:`String`}},copyStatus:{serializedName:`x-ms-copy-status`,xmlName:`x-ms-copy-status`,type:{name:`Enum`,allowedValues:[`pending`,`success`,`aborted`,`failed`]}},leaseDuration:{serializedName:`x-ms-lease-duration`,xmlName:`x-ms-lease-duration`,type:{name:`Enum`,allowedValues:[`infinite`,`fixed`]}},leaseState:{serializedName:`x-ms-lease-state`,xmlName:`x-ms-lease-state`,type:{name:`Enum`,allowedValues:[`available`,`leased`,`expired`,`breaking`,`broken`]}},leaseStatus:{serializedName:`x-ms-lease-status`,xmlName:`x-ms-lease-status`,type:{name:`Enum`,allowedValues:[`locked`,`unlocked`]}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},acceptRanges:{serializedName:`accept-ranges`,xmlName:`accept-ranges`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},blobCommittedBlockCount:{serializedName:`x-ms-blob-committed-block-count`,xmlName:`x-ms-blob-committed-block-count`,type:{name:`Number`}},isServerEncrypted:{serializedName:`x-ms-server-encrypted`,xmlName:`x-ms-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},blobContentMD5:{serializedName:`x-ms-blob-content-md5`,xmlName:`x-ms-blob-content-md5`,type:{name:`ByteArray`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},contentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}}}}},Ry={serializedName:`Blob_queryExceptionHeaders`,type:{name:`Composite`,className:`BlobQueryExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},zy={serializedName:`Blob_getTagsHeaders`,type:{name:`Composite`,className:`BlobGetTagsHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},By={serializedName:`Blob_getTagsExceptionHeaders`,type:{name:`Composite`,className:`BlobGetTagsExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Vy={serializedName:`Blob_setTagsHeaders`,type:{name:`Composite`,className:`BlobSetTagsHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Hy={serializedName:`Blob_setTagsExceptionHeaders`,type:{name:`Composite`,className:`BlobSetTagsExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Uy={serializedName:`PageBlob_createHeaders`,type:{name:`Composite`,className:`PageBlobCreateHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Wy={serializedName:`PageBlob_createExceptionHeaders`,type:{name:`Composite`,className:`PageBlobCreateExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Gy={serializedName:`PageBlob_uploadPagesHeaders`,type:{name:`Composite`,className:`PageBlobUploadPagesHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Ky={serializedName:`PageBlob_uploadPagesExceptionHeaders`,type:{name:`Composite`,className:`PageBlobUploadPagesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},qy={serializedName:`PageBlob_clearPagesHeaders`,type:{name:`Composite`,className:`PageBlobClearPagesHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Jy={serializedName:`PageBlob_clearPagesExceptionHeaders`,type:{name:`Composite`,className:`PageBlobClearPagesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Yy={serializedName:`PageBlob_uploadPagesFromURLHeaders`,type:{name:`Composite`,className:`PageBlobUploadPagesFromURLHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Xy={serializedName:`PageBlob_uploadPagesFromURLExceptionHeaders`,type:{name:`Composite`,className:`PageBlobUploadPagesFromURLExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},copySourceErrorCode:{serializedName:`x-ms-copy-source-error-code`,xmlName:`x-ms-copy-source-error-code`,type:{name:`String`}},copySourceStatusCode:{serializedName:`x-ms-copy-source-status-code`,xmlName:`x-ms-copy-source-status-code`,type:{name:`Number`}}}}},Zy={serializedName:`PageBlob_getPageRangesHeaders`,type:{name:`Composite`,className:`PageBlobGetPageRangesHeaders`,modelProperties:{lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},blobContentLength:{serializedName:`x-ms-blob-content-length`,xmlName:`x-ms-blob-content-length`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Qy={serializedName:`PageBlob_getPageRangesExceptionHeaders`,type:{name:`Composite`,className:`PageBlobGetPageRangesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},$y={serializedName:`PageBlob_getPageRangesDiffHeaders`,type:{name:`Composite`,className:`PageBlobGetPageRangesDiffHeaders`,modelProperties:{lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},blobContentLength:{serializedName:`x-ms-blob-content-length`,xmlName:`x-ms-blob-content-length`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},eb={serializedName:`PageBlob_getPageRangesDiffExceptionHeaders`,type:{name:`Composite`,className:`PageBlobGetPageRangesDiffExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},tb={serializedName:`PageBlob_resizeHeaders`,type:{name:`Composite`,className:`PageBlobResizeHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},nb={serializedName:`PageBlob_resizeExceptionHeaders`,type:{name:`Composite`,className:`PageBlobResizeExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},rb={serializedName:`PageBlob_updateSequenceNumberHeaders`,type:{name:`Composite`,className:`PageBlobUpdateSequenceNumberHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ib={serializedName:`PageBlob_updateSequenceNumberExceptionHeaders`,type:{name:`Composite`,className:`PageBlobUpdateSequenceNumberExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ab={serializedName:`PageBlob_copyIncrementalHeaders`,type:{name:`Composite`,className:`PageBlobCopyIncrementalHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},copyId:{serializedName:`x-ms-copy-id`,xmlName:`x-ms-copy-id`,type:{name:`String`}},copyStatus:{serializedName:`x-ms-copy-status`,xmlName:`x-ms-copy-status`,type:{name:`Enum`,allowedValues:[`pending`,`success`,`aborted`,`failed`]}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ob={serializedName:`PageBlob_copyIncrementalExceptionHeaders`,type:{name:`Composite`,className:`PageBlobCopyIncrementalExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},sb={serializedName:`AppendBlob_createHeaders`,type:{name:`Composite`,className:`AppendBlobCreateHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},cb={serializedName:`AppendBlob_createExceptionHeaders`,type:{name:`Composite`,className:`AppendBlobCreateExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},lb={serializedName:`AppendBlob_appendBlockHeaders`,type:{name:`Composite`,className:`AppendBlobAppendBlockHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},blobAppendOffset:{serializedName:`x-ms-blob-append-offset`,xmlName:`x-ms-blob-append-offset`,type:{name:`String`}},blobCommittedBlockCount:{serializedName:`x-ms-blob-committed-block-count`,xmlName:`x-ms-blob-committed-block-count`,type:{name:`Number`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ub={serializedName:`AppendBlob_appendBlockExceptionHeaders`,type:{name:`Composite`,className:`AppendBlobAppendBlockExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},db={serializedName:`AppendBlob_appendBlockFromUrlHeaders`,type:{name:`Composite`,className:`AppendBlobAppendBlockFromUrlHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},blobAppendOffset:{serializedName:`x-ms-blob-append-offset`,xmlName:`x-ms-blob-append-offset`,type:{name:`String`}},blobCommittedBlockCount:{serializedName:`x-ms-blob-committed-block-count`,xmlName:`x-ms-blob-committed-block-count`,type:{name:`Number`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},fb={serializedName:`AppendBlob_appendBlockFromUrlExceptionHeaders`,type:{name:`Composite`,className:`AppendBlobAppendBlockFromUrlExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},copySourceErrorCode:{serializedName:`x-ms-copy-source-error-code`,xmlName:`x-ms-copy-source-error-code`,type:{name:`String`}},copySourceStatusCode:{serializedName:`x-ms-copy-source-status-code`,xmlName:`x-ms-copy-source-status-code`,type:{name:`Number`}}}}},pb={serializedName:`AppendBlob_sealHeaders`,type:{name:`Composite`,className:`AppendBlobSealHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isSealed:{serializedName:`x-ms-blob-sealed`,xmlName:`x-ms-blob-sealed`,type:{name:`Boolean`}}}}},mb={serializedName:`AppendBlob_sealExceptionHeaders`,type:{name:`Composite`,className:`AppendBlobSealExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},hb={serializedName:`BlockBlob_uploadHeaders`,type:{name:`Composite`,className:`BlockBlobUploadHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},gb={serializedName:`BlockBlob_uploadExceptionHeaders`,type:{name:`Composite`,className:`BlockBlobUploadExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},_b={serializedName:`BlockBlob_putBlobFromUrlHeaders`,type:{name:`Composite`,className:`BlockBlobPutBlobFromUrlHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},vb={serializedName:`BlockBlob_putBlobFromUrlExceptionHeaders`,type:{name:`Composite`,className:`BlockBlobPutBlobFromUrlExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},copySourceErrorCode:{serializedName:`x-ms-copy-source-error-code`,xmlName:`x-ms-copy-source-error-code`,type:{name:`String`}},copySourceStatusCode:{serializedName:`x-ms-copy-source-status-code`,xmlName:`x-ms-copy-source-status-code`,type:{name:`Number`}}}}},yb={serializedName:`BlockBlob_stageBlockHeaders`,type:{name:`Composite`,className:`BlockBlobStageBlockHeaders`,modelProperties:{contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},bb={serializedName:`BlockBlob_stageBlockExceptionHeaders`,type:{name:`Composite`,className:`BlockBlobStageBlockExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},xb={serializedName:`BlockBlob_stageBlockFromURLHeaders`,type:{name:`Composite`,className:`BlockBlobStageBlockFromURLHeaders`,modelProperties:{contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Sb={serializedName:`BlockBlob_stageBlockFromURLExceptionHeaders`,type:{name:`Composite`,className:`BlockBlobStageBlockFromURLExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},copySourceErrorCode:{serializedName:`x-ms-copy-source-error-code`,xmlName:`x-ms-copy-source-error-code`,type:{name:`String`}},copySourceStatusCode:{serializedName:`x-ms-copy-source-status-code`,xmlName:`x-ms-copy-source-status-code`,type:{name:`Number`}}}}},Cb={serializedName:`BlockBlob_commitBlockListHeaders`,type:{name:`Composite`,className:`BlockBlobCommitBlockListHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},wb={serializedName:`BlockBlob_commitBlockListExceptionHeaders`,type:{name:`Composite`,className:`BlockBlobCommitBlockListExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Tb={serializedName:`BlockBlob_getBlockListHeaders`,type:{name:`Composite`,className:`BlockBlobGetBlockListHeaders`,modelProperties:{lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},blobContentLength:{serializedName:`x-ms-blob-content-length`,xmlName:`x-ms-blob-content-length`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Eb={serializedName:`BlockBlob_getBlockListExceptionHeaders`,type:{name:`Composite`,className:`BlockBlobGetBlockListExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Db={parameterPath:[`options`,`contentType`],mapper:{defaultValue:`application/xml`,isConstant:!0,serializedName:`Content-Type`,type:{name:`String`}}},Ob={parameterPath:`blobServiceProperties`,mapper:u_},kb={parameterPath:`accept`,mapper:{defaultValue:`application/xml`,isConstant:!0,serializedName:`Accept`,type:{name:`String`}}},Ab={parameterPath:`url`,mapper:{serializedName:`url`,required:!0,xmlName:`url`,type:{name:`String`}},skipEncoding:!0},jb={parameterPath:`restype`,mapper:{defaultValue:`service`,isConstant:!0,serializedName:`restype`,type:{name:`String`}}},Mb={parameterPath:`comp`,mapper:{defaultValue:`properties`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},Nb={parameterPath:[`options`,`timeoutInSeconds`],mapper:{constraints:{InclusiveMinimum:0},serializedName:`timeout`,xmlName:`timeout`,type:{name:`Number`}}},Pb={parameterPath:`version`,mapper:{defaultValue:`2026-02-06`,isConstant:!0,serializedName:`x-ms-version`,type:{name:`String`}}},Fb={parameterPath:[`options`,`requestId`],mapper:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}}},Ib={parameterPath:`accept`,mapper:{defaultValue:`application/xml`,isConstant:!0,serializedName:`Accept`,type:{name:`String`}}},Lb={parameterPath:`comp`,mapper:{defaultValue:`stats`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},Rb={parameterPath:`comp`,mapper:{defaultValue:`list`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},zb={parameterPath:[`options`,`prefix`],mapper:{serializedName:`prefix`,xmlName:`prefix`,type:{name:`String`}}},Bb={parameterPath:[`options`,`marker`],mapper:{serializedName:`marker`,xmlName:`marker`,type:{name:`String`}}},Vb={parameterPath:[`options`,`maxPageSize`],mapper:{constraints:{InclusiveMinimum:1},serializedName:`maxresults`,xmlName:`maxresults`,type:{name:`Number`}}},Hb={parameterPath:[`options`,`include`],mapper:{serializedName:`include`,xmlName:`include`,xmlElementName:`ListContainersIncludeType`,type:{name:`Sequence`,element:{type:{name:`Enum`,allowedValues:[`metadata`,`deleted`,`system`]}}}},collectionFormat:`CSV`},Ub={parameterPath:`keyInfo`,mapper:S_},Wb={parameterPath:`comp`,mapper:{defaultValue:`userdelegationkey`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},Gb={parameterPath:`restype`,mapper:{defaultValue:`account`,isConstant:!0,serializedName:`restype`,type:{name:`String`}}},Kb={parameterPath:`body`,mapper:{serializedName:`body`,required:!0,xmlName:`body`,type:{name:`Stream`}}},qb={parameterPath:`comp`,mapper:{defaultValue:`batch`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},Jb={parameterPath:`contentLength`,mapper:{serializedName:`Content-Length`,required:!0,xmlName:`Content-Length`,type:{name:`Number`}}},Yb={parameterPath:`multipartContentType`,mapper:{serializedName:`Content-Type`,required:!0,xmlName:`Content-Type`,type:{name:`String`}}},Xb={parameterPath:`comp`,mapper:{defaultValue:`blobs`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},Zb={parameterPath:[`options`,`where`],mapper:{serializedName:`where`,xmlName:`where`,type:{name:`String`}}},Qb={parameterPath:`restype`,mapper:{defaultValue:`container`,isConstant:!0,serializedName:`restype`,type:{name:`String`}}},$b={parameterPath:[`options`,`metadata`],mapper:{serializedName:`x-ms-meta`,xmlName:`x-ms-meta`,headerCollectionPrefix:`x-ms-meta-`,type:{name:`Dictionary`,value:{type:{name:`String`}}}}},ex={parameterPath:[`options`,`access`],mapper:{serializedName:`x-ms-blob-public-access`,xmlName:`x-ms-blob-public-access`,type:{name:`Enum`,allowedValues:[`container`,`blob`]}}},tx={parameterPath:[`options`,`containerEncryptionScope`,`defaultEncryptionScope`],mapper:{serializedName:`x-ms-default-encryption-scope`,xmlName:`x-ms-default-encryption-scope`,type:{name:`String`}}},nx={parameterPath:[`options`,`containerEncryptionScope`,`preventEncryptionScopeOverride`],mapper:{serializedName:`x-ms-deny-encryption-scope-override`,xmlName:`x-ms-deny-encryption-scope-override`,type:{name:`Boolean`}}},rx={parameterPath:[`options`,`leaseAccessConditions`,`leaseId`],mapper:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}}},ix={parameterPath:[`options`,`modifiedAccessConditions`,`ifModifiedSince`],mapper:{serializedName:`If-Modified-Since`,xmlName:`If-Modified-Since`,type:{name:`DateTimeRfc1123`}}},ax={parameterPath:[`options`,`modifiedAccessConditions`,`ifUnmodifiedSince`],mapper:{serializedName:`If-Unmodified-Since`,xmlName:`If-Unmodified-Since`,type:{name:`DateTimeRfc1123`}}},ox={parameterPath:`comp`,mapper:{defaultValue:`metadata`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},sx={parameterPath:`comp`,mapper:{defaultValue:`acl`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},cx={parameterPath:[`options`,`containerAcl`],mapper:{serializedName:`containerAcl`,xmlName:`SignedIdentifiers`,xmlIsWrapped:!0,xmlElementName:`SignedIdentifier`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`SignedIdentifier`}}}}},lx={parameterPath:`comp`,mapper:{defaultValue:`undelete`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},ux={parameterPath:[`options`,`deletedContainerName`],mapper:{serializedName:`x-ms-deleted-container-name`,xmlName:`x-ms-deleted-container-name`,type:{name:`String`}}},dx={parameterPath:[`options`,`deletedContainerVersion`],mapper:{serializedName:`x-ms-deleted-container-version`,xmlName:`x-ms-deleted-container-version`,type:{name:`String`}}},fx={parameterPath:`comp`,mapper:{defaultValue:`rename`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},px={parameterPath:`sourceContainerName`,mapper:{serializedName:`x-ms-source-container-name`,required:!0,xmlName:`x-ms-source-container-name`,type:{name:`String`}}},mx={parameterPath:[`options`,`sourceLeaseId`],mapper:{serializedName:`x-ms-source-lease-id`,xmlName:`x-ms-source-lease-id`,type:{name:`String`}}},hx={parameterPath:`comp`,mapper:{defaultValue:`lease`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},gx={parameterPath:`action`,mapper:{defaultValue:`acquire`,isConstant:!0,serializedName:`x-ms-lease-action`,type:{name:`String`}}},_x={parameterPath:[`options`,`duration`],mapper:{serializedName:`x-ms-lease-duration`,xmlName:`x-ms-lease-duration`,type:{name:`Number`}}},vx={parameterPath:[`options`,`proposedLeaseId`],mapper:{serializedName:`x-ms-proposed-lease-id`,xmlName:`x-ms-proposed-lease-id`,type:{name:`String`}}},yx={parameterPath:`action`,mapper:{defaultValue:`release`,isConstant:!0,serializedName:`x-ms-lease-action`,type:{name:`String`}}},bx={parameterPath:`leaseId`,mapper:{serializedName:`x-ms-lease-id`,required:!0,xmlName:`x-ms-lease-id`,type:{name:`String`}}},xx={parameterPath:`action`,mapper:{defaultValue:`renew`,isConstant:!0,serializedName:`x-ms-lease-action`,type:{name:`String`}}},Sx={parameterPath:`action`,mapper:{defaultValue:`break`,isConstant:!0,serializedName:`x-ms-lease-action`,type:{name:`String`}}},Cx={parameterPath:[`options`,`breakPeriod`],mapper:{serializedName:`x-ms-lease-break-period`,xmlName:`x-ms-lease-break-period`,type:{name:`Number`}}},wx={parameterPath:`action`,mapper:{defaultValue:`change`,isConstant:!0,serializedName:`x-ms-lease-action`,type:{name:`String`}}},Tx={parameterPath:`proposedLeaseId`,mapper:{serializedName:`x-ms-proposed-lease-id`,required:!0,xmlName:`x-ms-proposed-lease-id`,type:{name:`String`}}},Ex={parameterPath:[`options`,`include`],mapper:{serializedName:`include`,xmlName:`include`,xmlElementName:`ListBlobsIncludeItem`,type:{name:`Sequence`,element:{type:{name:`Enum`,allowedValues:[`copy`,`deleted`,`metadata`,`snapshots`,`uncommittedblobs`,`versions`,`tags`,`immutabilitypolicy`,`legalhold`,`deletedwithversions`]}}}},collectionFormat:`CSV`},Dx={parameterPath:[`options`,`startFrom`],mapper:{serializedName:`startFrom`,xmlName:`startFrom`,type:{name:`String`}}},Ox={parameterPath:`delimiter`,mapper:{serializedName:`delimiter`,required:!0,xmlName:`delimiter`,type:{name:`String`}}},kx={parameterPath:[`options`,`snapshot`],mapper:{serializedName:`snapshot`,xmlName:`snapshot`,type:{name:`String`}}},Ax={parameterPath:[`options`,`versionId`],mapper:{serializedName:`versionid`,xmlName:`versionid`,type:{name:`String`}}},jx={parameterPath:[`options`,`range`],mapper:{serializedName:`x-ms-range`,xmlName:`x-ms-range`,type:{name:`String`}}},Mx={parameterPath:[`options`,`rangeGetContentMD5`],mapper:{serializedName:`x-ms-range-get-content-md5`,xmlName:`x-ms-range-get-content-md5`,type:{name:`Boolean`}}},Nx={parameterPath:[`options`,`rangeGetContentCRC64`],mapper:{serializedName:`x-ms-range-get-content-crc64`,xmlName:`x-ms-range-get-content-crc64`,type:{name:`Boolean`}}},Px={parameterPath:[`options`,`cpkInfo`,`encryptionKey`],mapper:{serializedName:`x-ms-encryption-key`,xmlName:`x-ms-encryption-key`,type:{name:`String`}}},Fx={parameterPath:[`options`,`cpkInfo`,`encryptionKeySha256`],mapper:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}}},Ix={parameterPath:[`options`,`cpkInfo`,`encryptionAlgorithm`],mapper:{serializedName:`x-ms-encryption-algorithm`,xmlName:`x-ms-encryption-algorithm`,type:{name:`String`}}},Lx={parameterPath:[`options`,`modifiedAccessConditions`,`ifMatch`],mapper:{serializedName:`If-Match`,xmlName:`If-Match`,type:{name:`String`}}},Rx={parameterPath:[`options`,`modifiedAccessConditions`,`ifNoneMatch`],mapper:{serializedName:`If-None-Match`,xmlName:`If-None-Match`,type:{name:`String`}}},zx={parameterPath:[`options`,`modifiedAccessConditions`,`ifTags`],mapper:{serializedName:`x-ms-if-tags`,xmlName:`x-ms-if-tags`,type:{name:`String`}}},Bx={parameterPath:[`options`,`deleteSnapshots`],mapper:{serializedName:`x-ms-delete-snapshots`,xmlName:`x-ms-delete-snapshots`,type:{name:`Enum`,allowedValues:[`include`,`only`]}}},Vx={parameterPath:[`options`,`blobDeleteType`],mapper:{serializedName:`deletetype`,xmlName:`deletetype`,type:{name:`String`}}},Hx={parameterPath:`comp`,mapper:{defaultValue:`expiry`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},Ux={parameterPath:`expiryOptions`,mapper:{serializedName:`x-ms-expiry-option`,required:!0,xmlName:`x-ms-expiry-option`,type:{name:`String`}}},Wx={parameterPath:[`options`,`expiresOn`],mapper:{serializedName:`x-ms-expiry-time`,xmlName:`x-ms-expiry-time`,type:{name:`String`}}},Gx={parameterPath:[`options`,`blobHttpHeaders`,`blobCacheControl`],mapper:{serializedName:`x-ms-blob-cache-control`,xmlName:`x-ms-blob-cache-control`,type:{name:`String`}}},Kx={parameterPath:[`options`,`blobHttpHeaders`,`blobContentType`],mapper:{serializedName:`x-ms-blob-content-type`,xmlName:`x-ms-blob-content-type`,type:{name:`String`}}},qx={parameterPath:[`options`,`blobHttpHeaders`,`blobContentMD5`],mapper:{serializedName:`x-ms-blob-content-md5`,xmlName:`x-ms-blob-content-md5`,type:{name:`ByteArray`}}},Jx={parameterPath:[`options`,`blobHttpHeaders`,`blobContentEncoding`],mapper:{serializedName:`x-ms-blob-content-encoding`,xmlName:`x-ms-blob-content-encoding`,type:{name:`String`}}},Yx={parameterPath:[`options`,`blobHttpHeaders`,`blobContentLanguage`],mapper:{serializedName:`x-ms-blob-content-language`,xmlName:`x-ms-blob-content-language`,type:{name:`String`}}},Xx={parameterPath:[`options`,`blobHttpHeaders`,`blobContentDisposition`],mapper:{serializedName:`x-ms-blob-content-disposition`,xmlName:`x-ms-blob-content-disposition`,type:{name:`String`}}},Zx={parameterPath:`comp`,mapper:{defaultValue:`immutabilityPolicies`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},Qx={parameterPath:[`options`,`immutabilityPolicyExpiry`],mapper:{serializedName:`x-ms-immutability-policy-until-date`,xmlName:`x-ms-immutability-policy-until-date`,type:{name:`DateTimeRfc1123`}}},$x={parameterPath:[`options`,`immutabilityPolicyMode`],mapper:{serializedName:`x-ms-immutability-policy-mode`,xmlName:`x-ms-immutability-policy-mode`,type:{name:`Enum`,allowedValues:[`Mutable`,`Unlocked`,`Locked`]}}},eS={parameterPath:`comp`,mapper:{defaultValue:`legalhold`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},tS={parameterPath:`legalHold`,mapper:{serializedName:`x-ms-legal-hold`,required:!0,xmlName:`x-ms-legal-hold`,type:{name:`Boolean`}}},nS={parameterPath:[`options`,`encryptionScope`],mapper:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}}},rS={parameterPath:`comp`,mapper:{defaultValue:`snapshot`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},iS={parameterPath:[`options`,`tier`],mapper:{serializedName:`x-ms-access-tier`,xmlName:`x-ms-access-tier`,type:{name:`Enum`,allowedValues:[`P4`,`P6`,`P10`,`P15`,`P20`,`P30`,`P40`,`P50`,`P60`,`P70`,`P80`,`Hot`,`Cool`,`Archive`,`Cold`]}}},aS={parameterPath:[`options`,`rehydratePriority`],mapper:{serializedName:`x-ms-rehydrate-priority`,xmlName:`x-ms-rehydrate-priority`,type:{name:`Enum`,allowedValues:[`High`,`Standard`]}}},oS={parameterPath:[`options`,`sourceModifiedAccessConditions`,`sourceIfModifiedSince`],mapper:{serializedName:`x-ms-source-if-modified-since`,xmlName:`x-ms-source-if-modified-since`,type:{name:`DateTimeRfc1123`}}},sS={parameterPath:[`options`,`sourceModifiedAccessConditions`,`sourceIfUnmodifiedSince`],mapper:{serializedName:`x-ms-source-if-unmodified-since`,xmlName:`x-ms-source-if-unmodified-since`,type:{name:`DateTimeRfc1123`}}},cS={parameterPath:[`options`,`sourceModifiedAccessConditions`,`sourceIfMatch`],mapper:{serializedName:`x-ms-source-if-match`,xmlName:`x-ms-source-if-match`,type:{name:`String`}}},lS={parameterPath:[`options`,`sourceModifiedAccessConditions`,`sourceIfNoneMatch`],mapper:{serializedName:`x-ms-source-if-none-match`,xmlName:`x-ms-source-if-none-match`,type:{name:`String`}}},uS={parameterPath:[`options`,`sourceModifiedAccessConditions`,`sourceIfTags`],mapper:{serializedName:`x-ms-source-if-tags`,xmlName:`x-ms-source-if-tags`,type:{name:`String`}}},dS={parameterPath:`copySource`,mapper:{serializedName:`x-ms-copy-source`,required:!0,xmlName:`x-ms-copy-source`,type:{name:`String`}}},fS={parameterPath:[`options`,`blobTagsString`],mapper:{serializedName:`x-ms-tags`,xmlName:`x-ms-tags`,type:{name:`String`}}},pS={parameterPath:[`options`,`sealBlob`],mapper:{serializedName:`x-ms-seal-blob`,xmlName:`x-ms-seal-blob`,type:{name:`Boolean`}}},mS={parameterPath:[`options`,`legalHold`],mapper:{serializedName:`x-ms-legal-hold`,xmlName:`x-ms-legal-hold`,type:{name:`Boolean`}}},hS={parameterPath:`xMsRequiresSync`,mapper:{defaultValue:`true`,isConstant:!0,serializedName:`x-ms-requires-sync`,type:{name:`String`}}},gS={parameterPath:[`options`,`sourceContentMD5`],mapper:{serializedName:`x-ms-source-content-md5`,xmlName:`x-ms-source-content-md5`,type:{name:`ByteArray`}}},_S={parameterPath:[`options`,`copySourceAuthorization`],mapper:{serializedName:`x-ms-copy-source-authorization`,xmlName:`x-ms-copy-source-authorization`,type:{name:`String`}}},vS={parameterPath:[`options`,`copySourceTags`],mapper:{serializedName:`x-ms-copy-source-tag-option`,xmlName:`x-ms-copy-source-tag-option`,type:{name:`Enum`,allowedValues:[`REPLACE`,`COPY`]}}},yS={parameterPath:[`options`,`fileRequestIntent`],mapper:{serializedName:`x-ms-file-request-intent`,xmlName:`x-ms-file-request-intent`,type:{name:`String`}}},bS={parameterPath:`comp`,mapper:{defaultValue:`copy`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},xS={parameterPath:`copyActionAbortConstant`,mapper:{defaultValue:`abort`,isConstant:!0,serializedName:`x-ms-copy-action`,type:{name:`String`}}},SS={parameterPath:`copyId`,mapper:{serializedName:`copyid`,required:!0,xmlName:`copyid`,type:{name:`String`}}},CS={parameterPath:`comp`,mapper:{defaultValue:`tier`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},wS={parameterPath:`tier`,mapper:{serializedName:`x-ms-access-tier`,required:!0,xmlName:`x-ms-access-tier`,type:{name:`Enum`,allowedValues:[`P4`,`P6`,`P10`,`P15`,`P20`,`P30`,`P40`,`P50`,`P60`,`P70`,`P80`,`Hot`,`Cool`,`Archive`,`Cold`]}}},TS={parameterPath:[`options`,`queryRequest`],mapper:W_},ES={parameterPath:`comp`,mapper:{defaultValue:`query`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},DS={parameterPath:`comp`,mapper:{defaultValue:`tags`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},OS={parameterPath:[`options`,`blobModifiedAccessConditions`,`ifModifiedSince`],mapper:{serializedName:`x-ms-blob-if-modified-since`,xmlName:`x-ms-blob-if-modified-since`,type:{name:`DateTimeRfc1123`}}},kS={parameterPath:[`options`,`blobModifiedAccessConditions`,`ifUnmodifiedSince`],mapper:{serializedName:`x-ms-blob-if-unmodified-since`,xmlName:`x-ms-blob-if-unmodified-since`,type:{name:`DateTimeRfc1123`}}},AS={parameterPath:[`options`,`blobModifiedAccessConditions`,`ifMatch`],mapper:{serializedName:`x-ms-blob-if-match`,xmlName:`x-ms-blob-if-match`,type:{name:`String`}}},jS={parameterPath:[`options`,`blobModifiedAccessConditions`,`ifNoneMatch`],mapper:{serializedName:`x-ms-blob-if-none-match`,xmlName:`x-ms-blob-if-none-match`,type:{name:`String`}}},MS={parameterPath:[`options`,`tags`],mapper:E_},NS={parameterPath:[`options`,`transactionalContentMD5`],mapper:{serializedName:`Content-MD5`,xmlName:`Content-MD5`,type:{name:`ByteArray`}}},PS={parameterPath:[`options`,`transactionalContentCrc64`],mapper:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}}},FS={parameterPath:`blobType`,mapper:{defaultValue:`PageBlob`,isConstant:!0,serializedName:`x-ms-blob-type`,type:{name:`String`}}},IS={parameterPath:`blobContentLength`,mapper:{serializedName:`x-ms-blob-content-length`,required:!0,xmlName:`x-ms-blob-content-length`,type:{name:`Number`}}},LS={parameterPath:[`options`,`blobSequenceNumber`],mapper:{defaultValue:0,serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}}},RS={parameterPath:[`options`,`contentType`],mapper:{defaultValue:`application/octet-stream`,isConstant:!0,serializedName:`Content-Type`,type:{name:`String`}}},zS={parameterPath:`body`,mapper:{serializedName:`body`,required:!0,xmlName:`body`,type:{name:`Stream`}}},BS={parameterPath:`accept`,mapper:{defaultValue:`application/xml`,isConstant:!0,serializedName:`Accept`,type:{name:`String`}}},VS={parameterPath:`comp`,mapper:{defaultValue:`page`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},HS={parameterPath:`pageWrite`,mapper:{defaultValue:`update`,isConstant:!0,serializedName:`x-ms-page-write`,type:{name:`String`}}},US={parameterPath:[`options`,`sequenceNumberAccessConditions`,`ifSequenceNumberLessThanOrEqualTo`],mapper:{serializedName:`x-ms-if-sequence-number-le`,xmlName:`x-ms-if-sequence-number-le`,type:{name:`Number`}}},WS={parameterPath:[`options`,`sequenceNumberAccessConditions`,`ifSequenceNumberLessThan`],mapper:{serializedName:`x-ms-if-sequence-number-lt`,xmlName:`x-ms-if-sequence-number-lt`,type:{name:`Number`}}},GS={parameterPath:[`options`,`sequenceNumberAccessConditions`,`ifSequenceNumberEqualTo`],mapper:{serializedName:`x-ms-if-sequence-number-eq`,xmlName:`x-ms-if-sequence-number-eq`,type:{name:`Number`}}},KS={parameterPath:`pageWrite`,mapper:{defaultValue:`clear`,isConstant:!0,serializedName:`x-ms-page-write`,type:{name:`String`}}},qS={parameterPath:`sourceUrl`,mapper:{serializedName:`x-ms-copy-source`,required:!0,xmlName:`x-ms-copy-source`,type:{name:`String`}}},JS={parameterPath:`sourceRange`,mapper:{serializedName:`x-ms-source-range`,required:!0,xmlName:`x-ms-source-range`,type:{name:`String`}}},YS={parameterPath:[`options`,`sourceContentCrc64`],mapper:{serializedName:`x-ms-source-content-crc64`,xmlName:`x-ms-source-content-crc64`,type:{name:`ByteArray`}}},XS={parameterPath:`range`,mapper:{serializedName:`x-ms-range`,required:!0,xmlName:`x-ms-range`,type:{name:`String`}}},ZS={parameterPath:`comp`,mapper:{defaultValue:`pagelist`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},QS={parameterPath:[`options`,`prevsnapshot`],mapper:{serializedName:`prevsnapshot`,xmlName:`prevsnapshot`,type:{name:`String`}}},$S={parameterPath:[`options`,`prevSnapshotUrl`],mapper:{serializedName:`x-ms-previous-snapshot-url`,xmlName:`x-ms-previous-snapshot-url`,type:{name:`String`}}},eC={parameterPath:`sequenceNumberAction`,mapper:{serializedName:`x-ms-sequence-number-action`,required:!0,xmlName:`x-ms-sequence-number-action`,type:{name:`Enum`,allowedValues:[`max`,`update`,`increment`]}}},tC={parameterPath:`comp`,mapper:{defaultValue:`incrementalcopy`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},nC={parameterPath:`blobType`,mapper:{defaultValue:`AppendBlob`,isConstant:!0,serializedName:`x-ms-blob-type`,type:{name:`String`}}},rC={parameterPath:`comp`,mapper:{defaultValue:`appendblock`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},iC={parameterPath:[`options`,`appendPositionAccessConditions`,`maxSize`],mapper:{serializedName:`x-ms-blob-condition-maxsize`,xmlName:`x-ms-blob-condition-maxsize`,type:{name:`Number`}}},aC={parameterPath:[`options`,`appendPositionAccessConditions`,`appendPosition`],mapper:{serializedName:`x-ms-blob-condition-appendpos`,xmlName:`x-ms-blob-condition-appendpos`,type:{name:`Number`}}},oC={parameterPath:[`options`,`sourceRange`],mapper:{serializedName:`x-ms-source-range`,xmlName:`x-ms-source-range`,type:{name:`String`}}},sC={parameterPath:`comp`,mapper:{defaultValue:`seal`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},cC={parameterPath:`blobType`,mapper:{defaultValue:`BlockBlob`,isConstant:!0,serializedName:`x-ms-blob-type`,type:{name:`String`}}},lC={parameterPath:[`options`,`copySourceBlobProperties`],mapper:{serializedName:`x-ms-copy-source-blob-properties`,xmlName:`x-ms-copy-source-blob-properties`,type:{name:`Boolean`}}},uC={parameterPath:`comp`,mapper:{defaultValue:`block`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},dC={parameterPath:`blockId`,mapper:{serializedName:`blockid`,required:!0,xmlName:`blockid`,type:{name:`String`}}},fC={parameterPath:`blocks`,mapper:R_},pC={parameterPath:`comp`,mapper:{defaultValue:`blocklist`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},mC={parameterPath:`listType`,mapper:{defaultValue:`committed`,serializedName:`blocklisttype`,required:!0,xmlName:`blocklisttype`,type:{name:`Enum`,allowedValues:[`committed`,`uncommitted`,`all`]}}};var hC=class{client;constructor(e){this.client=e}setProperties(e,t){return this.client.sendOperationRequest({blobServiceProperties:e,options:t},_C)}getProperties(e){return this.client.sendOperationRequest({options:e},vC)}getStatistics(e){return this.client.sendOperationRequest({options:e},yC)}listContainersSegment(e){return this.client.sendOperationRequest({options:e},bC)}getUserDelegationKey(e,t){return this.client.sendOperationRequest({keyInfo:e,options:t},xC)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},SC)}submitBatch(e,t,n,r){return this.client.sendOperationRequest({contentLength:e,multipartContentType:t,body:n,options:r},CC)}filterBlobs(e){return this.client.sendOperationRequest({options:e},wC)}};const gC=Of(l_,!0),_C={path:`/`,httpMethod:`PUT`,responses:{202:{headersMapper:Z_},default:{bodyMapper:g_,headersMapper:Q_}},requestBody:Ob,queryParameters:[jb,Mb,Nb],urlParameters:[Ab],headerParameters:[Db,kb,Pb,Fb],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:gC},vC={path:`/`,httpMethod:`GET`,responses:{200:{bodyMapper:u_,headersMapper:$_},default:{bodyMapper:g_,headersMapper:ev}},queryParameters:[jb,Mb,Nb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib],isXML:!0,serializer:gC},yC={path:`/`,httpMethod:`GET`,responses:{200:{bodyMapper:__,headersMapper:tv},default:{bodyMapper:g_,headersMapper:nv}},queryParameters:[jb,Nb,Lb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib],isXML:!0,serializer:gC},bC={path:`/`,httpMethod:`GET`,responses:{200:{bodyMapper:y_,headersMapper:rv},default:{bodyMapper:g_,headersMapper:iv}},queryParameters:[Nb,Rb,zb,Bb,Vb,Hb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib],isXML:!0,serializer:gC},xC={path:`/`,httpMethod:`POST`,responses:{200:{bodyMapper:C_,headersMapper:av},default:{bodyMapper:g_,headersMapper:ov}},requestBody:Ub,queryParameters:[jb,Nb,Wb],urlParameters:[Ab],headerParameters:[Db,kb,Pb,Fb],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:gC},SC={path:`/`,httpMethod:`GET`,responses:{200:{headersMapper:sv},default:{bodyMapper:g_,headersMapper:cv}},queryParameters:[Mb,Nb,Gb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib],isXML:!0,serializer:gC},CC={path:`/`,httpMethod:`POST`,responses:{202:{bodyMapper:{type:{name:`Stream`},serializedName:`parsedResponse`},headersMapper:lv},default:{bodyMapper:g_,headersMapper:uv}},requestBody:Kb,queryParameters:[Nb,qb],urlParameters:[Ab],headerParameters:[kb,Pb,Fb,Jb,Yb],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:gC},wC={path:`/`,httpMethod:`GET`,responses:{200:{bodyMapper:w_,headersMapper:dv},default:{bodyMapper:g_,headersMapper:fv}},queryParameters:[Nb,Bb,Vb,Xb,Zb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib],isXML:!0,serializer:gC};var TC=class{client;constructor(e){this.client=e}create(e){return this.client.sendOperationRequest({options:e},DC)}getProperties(e){return this.client.sendOperationRequest({options:e},OC)}delete(e){return this.client.sendOperationRequest({options:e},kC)}setMetadata(e){return this.client.sendOperationRequest({options:e},AC)}getAccessPolicy(e){return this.client.sendOperationRequest({options:e},jC)}setAccessPolicy(e){return this.client.sendOperationRequest({options:e},MC)}restore(e){return this.client.sendOperationRequest({options:e},NC)}rename(e,t){return this.client.sendOperationRequest({sourceContainerName:e,options:t},PC)}submitBatch(e,t,n,r){return this.client.sendOperationRequest({contentLength:e,multipartContentType:t,body:n,options:r},FC)}filterBlobs(e){return this.client.sendOperationRequest({options:e},IC)}acquireLease(e){return this.client.sendOperationRequest({options:e},LC)}releaseLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},RC)}renewLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},zC)}breakLease(e){return this.client.sendOperationRequest({options:e},BC)}changeLease(e,t,n){return this.client.sendOperationRequest({leaseId:e,proposedLeaseId:t,options:n},VC)}listBlobFlatSegment(e){return this.client.sendOperationRequest({options:e},HC)}listBlobHierarchySegment(e,t){return this.client.sendOperationRequest({delimiter:e,options:t},UC)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},WC)}};const EC=Of(l_,!0),DC={path:`/{containerName}`,httpMethod:`PUT`,responses:{201:{headersMapper:pv},default:{bodyMapper:g_,headersMapper:mv}},queryParameters:[Nb,Qb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,$b,ex,tx,nx],isXML:!0,serializer:EC},OC={path:`/{containerName}`,httpMethod:`GET`,responses:{200:{headersMapper:hv},default:{bodyMapper:g_,headersMapper:gv}},queryParameters:[Nb,Qb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx],isXML:!0,serializer:EC},kC={path:`/{containerName}`,httpMethod:`DELETE`,responses:{202:{headersMapper:_v},default:{bodyMapper:g_,headersMapper:vv}},queryParameters:[Nb,Qb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,ix,ax],isXML:!0,serializer:EC},AC={path:`/{containerName}`,httpMethod:`PUT`,responses:{200:{headersMapper:yv},default:{bodyMapper:g_,headersMapper:bv}},queryParameters:[Nb,Qb,ox],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,$b,rx,ix],isXML:!0,serializer:EC},jC={path:`/{containerName}`,httpMethod:`GET`,responses:{200:{bodyMapper:{type:{name:`Sequence`,element:{type:{name:`Composite`,className:`SignedIdentifier`}}},serializedName:`SignedIdentifiers`,xmlName:`SignedIdentifiers`,xmlIsWrapped:!0,xmlElementName:`SignedIdentifier`},headersMapper:xv},default:{bodyMapper:g_,headersMapper:Sv}},queryParameters:[Nb,Qb,sx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx],isXML:!0,serializer:EC},MC={path:`/{containerName}`,httpMethod:`PUT`,responses:{200:{headersMapper:Cv},default:{bodyMapper:g_,headersMapper:wv}},requestBody:cx,queryParameters:[Nb,Qb,sx],urlParameters:[Ab],headerParameters:[Db,kb,Pb,Fb,ex,rx,ix,ax],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:EC},NC={path:`/{containerName}`,httpMethod:`PUT`,responses:{201:{headersMapper:Tv},default:{bodyMapper:g_,headersMapper:Ev}},queryParameters:[Nb,Qb,lx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ux,dx],isXML:!0,serializer:EC},PC={path:`/{containerName}`,httpMethod:`PUT`,responses:{200:{headersMapper:Dv},default:{bodyMapper:g_,headersMapper:Ov}},queryParameters:[Nb,Qb,fx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,px,mx],isXML:!0,serializer:EC},FC={path:`/{containerName}`,httpMethod:`POST`,responses:{202:{bodyMapper:{type:{name:`Stream`},serializedName:`parsedResponse`},headersMapper:kv},default:{bodyMapper:g_,headersMapper:Av}},requestBody:Kb,queryParameters:[Nb,qb,Qb],urlParameters:[Ab],headerParameters:[kb,Pb,Fb,Jb,Yb],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:EC},IC={path:`/{containerName}`,httpMethod:`GET`,responses:{200:{bodyMapper:w_,headersMapper:jv},default:{bodyMapper:g_,headersMapper:Mv}},queryParameters:[Nb,Bb,Vb,Xb,Zb,Qb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib],isXML:!0,serializer:EC},LC={path:`/{containerName}`,httpMethod:`PUT`,responses:{201:{headersMapper:Nv},default:{bodyMapper:g_,headersMapper:Pv}},queryParameters:[Nb,Qb,hx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ix,ax,gx,_x,vx],isXML:!0,serializer:EC},RC={path:`/{containerName}`,httpMethod:`PUT`,responses:{200:{headersMapper:Fv},default:{bodyMapper:g_,headersMapper:Iv}},queryParameters:[Nb,Qb,hx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ix,ax,yx,bx],isXML:!0,serializer:EC},zC={path:`/{containerName}`,httpMethod:`PUT`,responses:{200:{headersMapper:Lv},default:{bodyMapper:g_,headersMapper:Rv}},queryParameters:[Nb,Qb,hx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ix,ax,bx,xx],isXML:!0,serializer:EC},BC={path:`/{containerName}`,httpMethod:`PUT`,responses:{202:{headersMapper:zv},default:{bodyMapper:g_,headersMapper:Bv}},queryParameters:[Nb,Qb,hx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ix,ax,Sx,Cx],isXML:!0,serializer:EC},VC={path:`/{containerName}`,httpMethod:`PUT`,responses:{200:{headersMapper:Vv},default:{bodyMapper:g_,headersMapper:Hv}},queryParameters:[Nb,Qb,hx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ix,ax,bx,wx,Tx],isXML:!0,serializer:EC},HC={path:`/{containerName}`,httpMethod:`GET`,responses:{200:{bodyMapper:A_,headersMapper:Uv},default:{bodyMapper:g_,headersMapper:Wv}},queryParameters:[Nb,Rb,zb,Bb,Vb,Qb,Ex,Dx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib],isXML:!0,serializer:EC},UC={path:`/{containerName}`,httpMethod:`GET`,responses:{200:{bodyMapper:F_,headersMapper:Gv},default:{bodyMapper:g_,headersMapper:Kv}},queryParameters:[Nb,Rb,zb,Bb,Vb,Qb,Ex,Dx,Ox],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib],isXML:!0,serializer:EC},WC={path:`/{containerName}`,httpMethod:`GET`,responses:{200:{headersMapper:qv},default:{bodyMapper:g_,headersMapper:Jv}},queryParameters:[Mb,Nb,Gb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib],isXML:!0,serializer:EC};var GC=class{client;constructor(e){this.client=e}download(e){return this.client.sendOperationRequest({options:e},qC)}getProperties(e){return this.client.sendOperationRequest({options:e},JC)}delete(e){return this.client.sendOperationRequest({options:e},YC)}undelete(e){return this.client.sendOperationRequest({options:e},XC)}setExpiry(e,t){return this.client.sendOperationRequest({expiryOptions:e,options:t},ZC)}setHttpHeaders(e){return this.client.sendOperationRequest({options:e},QC)}setImmutabilityPolicy(e){return this.client.sendOperationRequest({options:e},$C)}deleteImmutabilityPolicy(e){return this.client.sendOperationRequest({options:e},ew)}setLegalHold(e,t){return this.client.sendOperationRequest({legalHold:e,options:t},tw)}setMetadata(e){return this.client.sendOperationRequest({options:e},nw)}acquireLease(e){return this.client.sendOperationRequest({options:e},rw)}releaseLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},iw)}renewLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},aw)}changeLease(e,t,n){return this.client.sendOperationRequest({leaseId:e,proposedLeaseId:t,options:n},ow)}breakLease(e){return this.client.sendOperationRequest({options:e},sw)}createSnapshot(e){return this.client.sendOperationRequest({options:e},cw)}startCopyFromURL(e,t){return this.client.sendOperationRequest({copySource:e,options:t},lw)}copyFromURL(e,t){return this.client.sendOperationRequest({copySource:e,options:t},uw)}abortCopyFromURL(e,t){return this.client.sendOperationRequest({copyId:e,options:t},dw)}setTier(e,t){return this.client.sendOperationRequest({tier:e,options:t},fw)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},pw)}query(e){return this.client.sendOperationRequest({options:e},mw)}getTags(e){return this.client.sendOperationRequest({options:e},hw)}setTags(e){return this.client.sendOperationRequest({options:e},gw)}};const KC=Of(l_,!0),qC={path:`/{containerName}/{blob}`,httpMethod:`GET`,responses:{200:{bodyMapper:{type:{name:`Stream`},serializedName:`parsedResponse`},headersMapper:Yv},206:{bodyMapper:{type:{name:`Stream`},serializedName:`parsedResponse`},headersMapper:Yv},default:{bodyMapper:g_,headersMapper:Xv}},queryParameters:[Nb,kx,Ax],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,ix,ax,jx,Mx,Nx,Px,Fx,Ix,Lx,Rx,zx],isXML:!0,serializer:KC},JC={path:`/{containerName}/{blob}`,httpMethod:`HEAD`,responses:{200:{headersMapper:Zv},default:{bodyMapper:g_,headersMapper:Qv}},queryParameters:[Nb,kx,Ax],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx],isXML:!0,serializer:KC},YC={path:`/{containerName}/{blob}`,httpMethod:`DELETE`,responses:{202:{headersMapper:$v},default:{bodyMapper:g_,headersMapper:ey}},queryParameters:[Nb,kx,Ax,Vx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,ix,ax,Lx,Rx,zx,Bx],isXML:!0,serializer:KC},XC={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:ty},default:{bodyMapper:g_,headersMapper:ny}},queryParameters:[Nb,lx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib],isXML:!0,serializer:KC},ZC={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:ry},default:{bodyMapper:g_,headersMapper:iy}},queryParameters:[Nb,Hx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,Ux,Wx],isXML:!0,serializer:KC},QC={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:ay},default:{bodyMapper:g_,headersMapper:oy}},queryParameters:[Mb,Nb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,ix,ax,Lx,Rx,zx,Gx,Kx,qx,Jx,Yx,Xx],isXML:!0,serializer:KC},$C={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:sy},default:{bodyMapper:g_,headersMapper:cy}},queryParameters:[Nb,kx,Ax,Zx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ax,Qx,$x],isXML:!0,serializer:KC},ew={path:`/{containerName}/{blob}`,httpMethod:`DELETE`,responses:{200:{headersMapper:ly},default:{bodyMapper:g_,headersMapper:uy}},queryParameters:[Nb,kx,Ax,Zx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib],isXML:!0,serializer:KC},tw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:dy},default:{bodyMapper:g_,headersMapper:fy}},queryParameters:[Nb,kx,Ax,eS],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,tS],isXML:!0,serializer:KC},nw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:py},default:{bodyMapper:g_,headersMapper:my}},queryParameters:[Nb,ox],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,$b,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx,nS],isXML:!0,serializer:KC},rw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:hy},default:{bodyMapper:g_,headersMapper:gy}},queryParameters:[Nb,hx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ix,ax,gx,_x,vx,Lx,Rx,zx],isXML:!0,serializer:KC},iw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:_y},default:{bodyMapper:g_,headersMapper:vy}},queryParameters:[Nb,hx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ix,ax,yx,bx,Lx,Rx,zx],isXML:!0,serializer:KC},aw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:yy},default:{bodyMapper:g_,headersMapper:by}},queryParameters:[Nb,hx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ix,ax,bx,xx,Lx,Rx,zx],isXML:!0,serializer:KC},ow={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:xy},default:{bodyMapper:g_,headersMapper:Sy}},queryParameters:[Nb,hx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ix,ax,bx,wx,Tx,Lx,Rx,zx],isXML:!0,serializer:KC},sw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{202:{headersMapper:Cy},default:{bodyMapper:g_,headersMapper:wy}},queryParameters:[Nb,hx],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ix,ax,Sx,Cx,Lx,Rx,zx],isXML:!0,serializer:KC},cw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:Ty},default:{bodyMapper:g_,headersMapper:Ey}},queryParameters:[Nb,rS],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,$b,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx,nS],isXML:!0,serializer:KC},lw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{202:{headersMapper:Dy},default:{bodyMapper:g_,headersMapper:Oy}},queryParameters:[Nb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,$b,rx,ix,ax,Lx,Rx,zx,Qx,$x,iS,aS,oS,sS,cS,lS,uS,dS,fS,pS,mS],isXML:!0,serializer:KC},uw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{202:{headersMapper:ky},default:{bodyMapper:g_,headersMapper:Ay}},queryParameters:[Nb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,$b,rx,ix,ax,Lx,Rx,zx,Qx,$x,nS,iS,oS,sS,cS,lS,dS,fS,mS,hS,gS,_S,vS,yS],isXML:!0,serializer:KC},dw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{204:{headersMapper:jy},default:{bodyMapper:g_,headersMapper:My}},queryParameters:[Nb,bS,SS],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,xS],isXML:!0,serializer:KC},fw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:Ny},202:{headersMapper:Ny},default:{bodyMapper:g_,headersMapper:Py}},queryParameters:[Nb,kx,Ax,CS],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,zx,aS,wS],isXML:!0,serializer:KC},pw={path:`/{containerName}/{blob}`,httpMethod:`GET`,responses:{200:{headersMapper:Fy},default:{bodyMapper:g_,headersMapper:Iy}},queryParameters:[Mb,Nb,Gb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib],isXML:!0,serializer:KC},mw={path:`/{containerName}/{blob}`,httpMethod:`POST`,responses:{200:{bodyMapper:{type:{name:`Stream`},serializedName:`parsedResponse`},headersMapper:Ly},206:{bodyMapper:{type:{name:`Stream`},serializedName:`parsedResponse`},headersMapper:Ly},default:{bodyMapper:g_,headersMapper:Ry}},requestBody:TS,queryParameters:[Nb,kx,ES],urlParameters:[Ab],headerParameters:[Db,kb,Pb,Fb,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:KC},hw={path:`/{containerName}/{blob}`,httpMethod:`GET`,responses:{200:{bodyMapper:E_,headersMapper:zy},default:{bodyMapper:g_,headersMapper:By}},queryParameters:[Nb,kx,Ax,DS],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,zx,OS,kS,AS,jS],isXML:!0,serializer:KC},gw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{204:{headersMapper:Vy},default:{bodyMapper:g_,headersMapper:Hy}},requestBody:MS,queryParameters:[Nb,Ax,DS],urlParameters:[Ab],headerParameters:[Db,kb,Pb,Fb,rx,zx,OS,kS,AS,jS,NS,PS],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:KC};var _w=class{client;constructor(e){this.client=e}create(e,t,n){return this.client.sendOperationRequest({contentLength:e,blobContentLength:t,options:n},yw)}uploadPages(e,t,n){return this.client.sendOperationRequest({contentLength:e,body:t,options:n},bw)}clearPages(e,t){return this.client.sendOperationRequest({contentLength:e,options:t},xw)}uploadPagesFromURL(e,t,n,r,i){return this.client.sendOperationRequest({sourceUrl:e,sourceRange:t,contentLength:n,range:r,options:i},Sw)}getPageRanges(e){return this.client.sendOperationRequest({options:e},Cw)}getPageRangesDiff(e){return this.client.sendOperationRequest({options:e},ww)}resize(e,t){return this.client.sendOperationRequest({blobContentLength:e,options:t},Tw)}updateSequenceNumber(e,t){return this.client.sendOperationRequest({sequenceNumberAction:e,options:t},Ew)}copyIncremental(e,t){return this.client.sendOperationRequest({copySource:e,options:t},Dw)}};const vw=Of(l_,!0),yw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:Uy},default:{bodyMapper:g_,headersMapper:Wy}},queryParameters:[Nb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,Jb,$b,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx,Gx,Kx,qx,Jx,Yx,Xx,Qx,$x,nS,iS,fS,mS,FS,IS,LS],isXML:!0,serializer:vw},bw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:Gy},default:{bodyMapper:g_,headersMapper:Ky}},requestBody:zS,queryParameters:[Nb,VS],urlParameters:[Ab],headerParameters:[Pb,Fb,Jb,rx,ix,ax,jx,Px,Fx,Ix,Lx,Rx,zx,nS,NS,PS,RS,BS,HS,US,WS,GS],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`binary`,serializer:vw},xw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:qy},default:{bodyMapper:g_,headersMapper:Jy}},queryParameters:[Nb,VS],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,Jb,rx,ix,ax,jx,Px,Fx,Ix,Lx,Rx,zx,nS,US,WS,GS,KS],isXML:!0,serializer:vw},Sw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:Yy},default:{bodyMapper:g_,headersMapper:Xy}},queryParameters:[Nb,VS],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,Jb,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx,nS,oS,sS,cS,lS,gS,_S,yS,HS,US,WS,GS,qS,JS,YS,XS],isXML:!0,serializer:vw},Cw={path:`/{containerName}/{blob}`,httpMethod:`GET`,responses:{200:{bodyMapper:V_,headersMapper:Zy},default:{bodyMapper:g_,headersMapper:Qy}},queryParameters:[Nb,Bb,Vb,kx,ZS],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,ix,ax,jx,Lx,Rx,zx],isXML:!0,serializer:vw},ww={path:`/{containerName}/{blob}`,httpMethod:`GET`,responses:{200:{bodyMapper:V_,headersMapper:$y},default:{bodyMapper:g_,headersMapper:eb}},queryParameters:[Nb,Bb,Vb,kx,ZS,QS],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,ix,ax,jx,Lx,Rx,zx,$S],isXML:!0,serializer:vw},Tw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:tb},default:{bodyMapper:g_,headersMapper:nb}},queryParameters:[Mb,Nb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx,nS,IS],isXML:!0,serializer:vw},Ew={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:rb},default:{bodyMapper:g_,headersMapper:ib}},queryParameters:[Mb,Nb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,ix,ax,Lx,Rx,zx,LS,eC],isXML:!0,serializer:vw},Dw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{202:{headersMapper:ab},default:{bodyMapper:g_,headersMapper:ob}},queryParameters:[Nb,tC],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,ix,ax,Lx,Rx,zx,dS],isXML:!0,serializer:vw};var Ow=class{client;constructor(e){this.client=e}create(e,t){return this.client.sendOperationRequest({contentLength:e,options:t},Aw)}appendBlock(e,t,n){return this.client.sendOperationRequest({contentLength:e,body:t,options:n},jw)}appendBlockFromUrl(e,t,n){return this.client.sendOperationRequest({sourceUrl:e,contentLength:t,options:n},Mw)}seal(e){return this.client.sendOperationRequest({options:e},Nw)}};const kw=Of(l_,!0),Aw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:sb},default:{bodyMapper:g_,headersMapper:cb}},queryParameters:[Nb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,Jb,$b,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx,Gx,Kx,qx,Jx,Yx,Xx,Qx,$x,nS,fS,mS,nC],isXML:!0,serializer:kw},jw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:lb},default:{bodyMapper:g_,headersMapper:ub}},requestBody:zS,queryParameters:[Nb,rC],urlParameters:[Ab],headerParameters:[Pb,Fb,Jb,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx,nS,NS,PS,RS,BS,iC,aC],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`binary`,serializer:kw},Mw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:db},default:{bodyMapper:g_,headersMapper:fb}},queryParameters:[Nb,rC],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,Jb,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx,nS,oS,sS,cS,lS,gS,_S,yS,NS,qS,YS,iC,aC,oC],isXML:!0,serializer:kw},Nw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:pb},default:{bodyMapper:g_,headersMapper:mb}},queryParameters:[Nb,sC],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,ix,ax,Lx,Rx,aC],isXML:!0,serializer:kw};var Pw=class{client;constructor(e){this.client=e}upload(e,t,n){return this.client.sendOperationRequest({contentLength:e,body:t,options:n},Iw)}putBlobFromUrl(e,t,n){return this.client.sendOperationRequest({contentLength:e,copySource:t,options:n},Lw)}stageBlock(e,t,n,r){return this.client.sendOperationRequest({blockId:e,contentLength:t,body:n,options:r},Rw)}stageBlockFromURL(e,t,n,r){return this.client.sendOperationRequest({blockId:e,contentLength:t,sourceUrl:n,options:r},zw)}commitBlockList(e,t){return this.client.sendOperationRequest({blocks:e,options:t},Bw)}getBlockList(e,t){return this.client.sendOperationRequest({listType:e,options:t},Vw)}};const Fw=Of(l_,!0),Iw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:hb},default:{bodyMapper:g_,headersMapper:gb}},requestBody:zS,queryParameters:[Nb],urlParameters:[Ab],headerParameters:[Pb,Fb,Jb,$b,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx,Gx,Kx,qx,Jx,Yx,Xx,Qx,$x,nS,iS,fS,mS,NS,PS,RS,BS,cC],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`binary`,serializer:Fw},Lw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:_b},default:{bodyMapper:g_,headersMapper:vb}},queryParameters:[Nb],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,Jb,$b,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx,Gx,Kx,qx,Jx,Yx,Xx,nS,iS,oS,sS,cS,lS,uS,dS,fS,gS,_S,vS,yS,NS,cC,lC],isXML:!0,serializer:Fw},Rw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:yb},default:{bodyMapper:g_,headersMapper:bb}},requestBody:zS,queryParameters:[Nb,uC,dC],urlParameters:[Ab],headerParameters:[Pb,Fb,Jb,rx,Px,Fx,Ix,nS,NS,PS,RS,BS],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`binary`,serializer:Fw},zw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:xb},default:{bodyMapper:g_,headersMapper:Sb}},queryParameters:[Nb,uC,dC],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,Jb,rx,Px,Fx,Ix,nS,oS,sS,cS,lS,gS,_S,yS,qS,YS,oC],isXML:!0,serializer:Fw},Bw={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:Cb},default:{bodyMapper:g_,headersMapper:wb}},requestBody:fC,queryParameters:[Nb,pC],urlParameters:[Ab],headerParameters:[Db,kb,Pb,Fb,$b,rx,ix,ax,Px,Fx,Ix,Lx,Rx,zx,Gx,Kx,qx,Jx,Yx,Xx,Qx,$x,nS,iS,fS,mS,NS,PS],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:Fw},Vw={path:`/{containerName}/{blob}`,httpMethod:`GET`,responses:{200:{bodyMapper:z_,headersMapper:Tb},default:{bodyMapper:g_,headersMapper:Eb}},queryParameters:[Nb,kx,pC,mC],urlParameters:[Ab],headerParameters:[Pb,Fb,Ib,rx,zx],isXML:!0,serializer:Fw};var Hw=class extends im{url;version;constructor(e,t){if(e===void 0)throw Error(`'url' cannot be null`);t||={};let n={requestContentType:`application/json; charset=utf-8`},r=`azsdk-js-azure-storage-blob/12.30.0`,i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${r}`:`${r}`,a={...n,...t,userAgentOptions:{userAgentPrefix:i},endpoint:t.endpoint??t.baseUri??`{url}`};super(a),this.url=e,this.version=t.version||`2026-02-06`,this.service=new hC(this),this.container=new TC(this),this.blob=new GC(this),this.pageBlob=new _w(this),this.appendBlob=new Ow(this),this.blockBlob=new Pw(this)}service;container;blob;pageBlob;appendBlob;blockBlob},Uw=class extends Hw{async sendOperationRequest(e,t){let n={...t};return(n.path===`/{containerName}`||n.path===`/{containerName}/{blob}`)&&(n.path=``),super.sendOperationRequest(e,n)}};function Ww(e){let t=new URL(e),n=t.pathname;return n||=`/`,n=Jw(n),t.pathname=n,t.toString()}function Gw(e){let t=``;if(e.search(`DevelopmentStorageProxyUri=`)!==-1){let n=e.split(`;`);for(let e of n)e.trim().startsWith(`DevelopmentStorageProxyUri=`)&&(t=e.trim().match(`DevelopmentStorageProxyUri=(.*)`)[1])}return t}function Kw(e,t){let n=e.split(`;`);for(let e of n)if(e.trim().startsWith(t))return e.trim().match(t+`=(.*)`)[1];return``}function qw(e){let t=``;e.startsWith(`UseDevelopmentStorage=true`)&&(t=Gw(e),e=`DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`);let n=Kw(e,`BlobEndpoint`);if(n=n.endsWith(`/`)?n.slice(0,-1):n,e.search(`DefaultEndpointsProtocol=`)!==-1&&e.search(`AccountKey=`)!==-1){let r=``,i=``,a=Buffer.from(`accountKey`,`base64`),o=``;if(i=Kw(e,`AccountName`),a=Buffer.from(Kw(e,`AccountKey`),`base64`),!n){r=Kw(e,`DefaultEndpointsProtocol`);let t=r.toLowerCase();if(t!==`https`&&t!==`http`)throw Error(`Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'`);if(o=Kw(e,`EndpointSuffix`),!o)throw Error(`Invalid EndpointSuffix in the provided Connection String`);n=`${r}://${i}.blob.${o}`}if(!i)throw Error(`Invalid AccountName in the provided Connection String`);if(a.length===0)throw Error(`Invalid AccountKey in the provided Connection String`);return{kind:`AccountConnString`,url:n,accountName:i,accountKey:a,proxyUri:t}}else{let t=Kw(e,`SharedAccessSignature`),r=Kw(e,`AccountName`);if(r||=aT(n),!n)throw Error(`Invalid BlobEndpoint in the provided SAS Connection String`);if(!t)throw Error(`Invalid SharedAccessSignature in the provided SAS Connection String`);return t.startsWith(`?`)&&(t=t.substring(1)),{kind:`SASConnString`,url:n,accountName:r,accountSas:t}}}function Jw(e){return encodeURIComponent(e).replace(/%2F/g,`/`).replace(/'/g,`%27`).replace(/\+/g,`%20`).replace(/%25/g,`%`)}function Yw(e,t){let n=new URL(e),r=n.pathname;return r=r?r.endsWith(`/`)?`${r}${t}`:`${r}/${t}`:t,n.pathname=r,n.toString()}function Xw(e,t,n){let r=new URL(e),i=encodeURIComponent(t),a=n?encodeURIComponent(n):void 0,o=r.search===``?`?`:r.search,s=[];for(let e of o.slice(1).split(`&`))if(e){let[t]=e.split(`=`,2);t!==i&&s.push(e)}return a&&s.push(`${i}=${a}`),r.search=s.length?`?${s.join(`&`)}`:``,r.toString()}function Zw(e,t){return new URL(e).searchParams.get(t)??void 0}function Qw(e){try{let t=new URL(e);return t.protocol.endsWith(`:`)?t.protocol.slice(0,-1):t.protocol}catch{return}}function $w(e,t){let n=new URL(e),r=n.search;return r?r+=`&`+t:r=t,n.search=r,n.toString()}function eT(e,t=!0){let n=e.toISOString();return t?n.substring(0,n.length-1)+`0000Z`:n.substring(0,n.length-5)+`Z`}function tT(e){return Sd?Buffer.from(e).toString(`base64`):btoa(e)}function nT(e,t){return e.length>42&&(e=e.slice(0,42)),tT(e+rT(t.toString(),48-e.length,`0`))}function rT(e,t,n=` `){return String.prototype.padStart?e.padStart(t,n):(n||=` `,e.length>t?e:(t-=e.length,t>n.length&&(n+=n.repeat(t/n.length)),n.slice(0,t)+e))}function iT(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function aT(e){let t=new URL(e),n;try{return n=t.hostname.split(`.`)[1]===`blob`?t.hostname.split(`.`)[0]:oT(t)?t.pathname.split(`/`)[1]:``,n}catch{throw Error(`Unable to extract accountName with provided information.`)}}function oT(e){let t=e.host;return/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(t)||!!e.port&&Jg.includes(e.port)}function sT(e){if(e===void 0)return;let t=[];for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=e[n];t.push(`${encodeURIComponent(n)}=${encodeURIComponent(r)}`)}return t.join(`&`)}function cT(e){if(e===void 0)return;let t={blobTagSet:[]};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=e[n];t.blobTagSet.push({key:n,value:r})}return t}function lT(e){if(e===void 0)return;let t={};for(let n of e.blobTagSet)t[n.key]=n.value;return t}function uT(e){if(e!==void 0)switch(e.kind){case`csv`:return{format:{type:`delimited`,delimitedTextConfiguration:{columnSeparator:e.columnSeparator||`,`,fieldQuote:e.fieldQuote||``,recordSeparator:e.recordSeparator,escapeChar:e.escapeCharacter||``,headersPresent:e.hasHeaders||!1}}};case`json`:return{format:{type:`json`,jsonTextConfiguration:{recordSeparator:e.recordSeparator}}};case`arrow`:return{format:{type:`arrow`,arrowConfiguration:{schema:e.schema}}};case`parquet`:return{format:{type:`parquet`}};default:throw Error(`Invalid BlobQueryTextConfiguration.`)}}function dT(e){if(!e||`policy-id`in e)return;let t=[];for(let n in e){let r=n.split(`_`);r[0].startsWith(`or-`)&&(r[0]=r[0].substring(3));let i={ruleId:r[1],replicationStatus:e[n]},a=t.findIndex(e=>e.policyId===r[0]);a>-1?t[a].rules.push(i):t.push({policyId:r[0],rules:[i]})}return t}function fT(e){return e?e.scheme+` `+e.value:void 0}function*pT(e){let t=[],n=[];e.pageRange&&(t=e.pageRange),e.clearRange&&(n=e.clearRange);let r=0,i=0;for(;r0&&n.length>0&&e.push(`${t}=${n}`))}};function ST(e,t,n){return CT(e,t,n).sasQueryParameters}function CT(e,t,n){let r=e.version?e.version:Hg,i=t instanceof Tg?t:void 0,a;if(i===void 0&&n!==void 0&&(a=new Bg(n,t)),i===void 0&&a===void 0)throw TypeError(`Invalid sharedKeyCredential, userDelegationKey or accountName.`);if(r>=`2020-12-06`)return i===void 0?r>=`2025-07-05`?AT(e,a):kT(e,a):ET(e,i);if(r>=`2018-11-09`)return i===void 0?r>=`2020-02-10`?OT(e,a):DT(e,a):TT(e,i);if(r>=`2015-04-05`){if(i!==void 0)return wT(e,i);throw RangeError(`'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.`)}throw RangeError(`'version' must be >= '2015-04-05'.`)}function wT(e,t){if(e=MT(e),!e.identifier&&!(e.permissions&&e.expiresOn))throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.`);let n=`c`;e.blobName&&(n=`b`);let r;e.permissions&&(r=e.blobName?_T.parse(e.permissions.toString()).toString():vT.parse(e.permissions.toString()).toString());let i=[r||``,e.startsOn?eT(e.startsOn,!1):``,e.expiresOn?eT(e.expiresOn,!1):``,jT(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?yT(e.ipRange):``,e.protocol?e.protocol:``,e.version,e.cacheControl?e.cacheControl:``,e.contentDisposition?e.contentDisposition:``,e.contentEncoding?e.contentEncoding:``,e.contentLanguage?e.contentLanguage:``,e.contentType?e.contentType:``].join(` -`),a=t.computeHMACSHA256(i);return{sasQueryParameters:new xT(e.version,a,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType),stringToSign:i}}function TT(e,t){if(e=MT(e),!e.identifier&&!(e.permissions&&e.expiresOn))throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.`);let n=`c`,r=e.snapshotTime;e.blobName&&(n=`b`,e.snapshotTime?n=`bs`:e.versionId&&(n=`bv`,r=e.versionId));let i;e.permissions&&(i=e.blobName?_T.parse(e.permissions.toString()).toString():vT.parse(e.permissions.toString()).toString());let a=[i||``,e.startsOn?eT(e.startsOn,!1):``,e.expiresOn?eT(e.expiresOn,!1):``,jT(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?yT(e.ipRange):``,e.protocol?e.protocol:``,e.version,n,r,e.cacheControl?e.cacheControl:``,e.contentDisposition?e.contentDisposition:``,e.contentEncoding?e.contentEncoding:``,e.contentLanguage?e.contentLanguage:``,e.contentType?e.contentType:``].join(` -`),o=t.computeHMACSHA256(a);return{sasQueryParameters:new xT(e.version,o,i,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType),stringToSign:a}}function ET(e,t){if(e=MT(e),!e.identifier&&!(e.permissions&&e.expiresOn))throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.`);let n=`c`,r=e.snapshotTime;e.blobName&&(n=`b`,e.snapshotTime?n=`bs`:e.versionId&&(n=`bv`,r=e.versionId));let i;e.permissions&&(i=e.blobName?_T.parse(e.permissions.toString()).toString():vT.parse(e.permissions.toString()).toString());let a=[i||``,e.startsOn?eT(e.startsOn,!1):``,e.expiresOn?eT(e.expiresOn,!1):``,jT(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?yT(e.ipRange):``,e.protocol?e.protocol:``,e.version,n,r,e.encryptionScope,e.cacheControl?e.cacheControl:``,e.contentDisposition?e.contentDisposition:``,e.contentEncoding?e.contentEncoding:``,e.contentLanguage?e.contentLanguage:``,e.contentType?e.contentType:``].join(` -`),o=t.computeHMACSHA256(a);return{sasQueryParameters:new xT(e.version,o,i,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,void 0,void 0,void 0,e.encryptionScope),stringToSign:a}}function DT(e,t){if(e=MT(e),!e.permissions||!e.expiresOn)throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.`);let n=`c`,r=e.snapshotTime;e.blobName&&(n=`b`,e.snapshotTime?n=`bs`:e.versionId&&(n=`bv`,r=e.versionId));let i;e.permissions&&(i=e.blobName?_T.parse(e.permissions.toString()).toString():vT.parse(e.permissions.toString()).toString());let a=[i||``,e.startsOn?eT(e.startsOn,!1):``,e.expiresOn?eT(e.expiresOn,!1):``,jT(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?eT(t.userDelegationKey.signedStartsOn,!1):``,t.userDelegationKey.signedExpiresOn?eT(t.userDelegationKey.signedExpiresOn,!1):``,t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.ipRange?yT(e.ipRange):``,e.protocol?e.protocol:``,e.version,n,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join(` -`),o=t.computeHMACSHA256(a);return{sasQueryParameters:new xT(e.version,o,i,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey),stringToSign:a}}function OT(e,t){if(e=MT(e),!e.permissions||!e.expiresOn)throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.`);let n=`c`,r=e.snapshotTime;e.blobName&&(n=`b`,e.snapshotTime?n=`bs`:e.versionId&&(n=`bv`,r=e.versionId));let i;e.permissions&&(i=e.blobName?_T.parse(e.permissions.toString()).toString():vT.parse(e.permissions.toString()).toString());let a=[i||``,e.startsOn?eT(e.startsOn,!1):``,e.expiresOn?eT(e.expiresOn,!1):``,jT(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?eT(t.userDelegationKey.signedStartsOn,!1):``,t.userDelegationKey.signedExpiresOn?eT(t.userDelegationKey.signedExpiresOn,!1):``,t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,void 0,e.correlationId,e.ipRange?yT(e.ipRange):``,e.protocol?e.protocol:``,e.version,n,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join(` -`),o=t.computeHMACSHA256(a);return{sasQueryParameters:new xT(e.version,o,i,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId),stringToSign:a}}function kT(e,t){if(e=MT(e),!e.permissions||!e.expiresOn)throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.`);let n=`c`,r=e.snapshotTime;e.blobName&&(n=`b`,e.snapshotTime?n=`bs`:e.versionId&&(n=`bv`,r=e.versionId));let i;e.permissions&&(i=e.blobName?_T.parse(e.permissions.toString()).toString():vT.parse(e.permissions.toString()).toString());let a=[i||``,e.startsOn?eT(e.startsOn,!1):``,e.expiresOn?eT(e.expiresOn,!1):``,jT(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?eT(t.userDelegationKey.signedStartsOn,!1):``,t.userDelegationKey.signedExpiresOn?eT(t.userDelegationKey.signedExpiresOn,!1):``,t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,void 0,e.correlationId,e.ipRange?yT(e.ipRange):``,e.protocol?e.protocol:``,e.version,n,r,e.encryptionScope,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join(` -`),o=t.computeHMACSHA256(a);return{sasQueryParameters:new xT(e.version,o,i,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId,e.encryptionScope),stringToSign:a}}function AT(e,t){if(e=MT(e),!e.permissions||!e.expiresOn)throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.`);let n=`c`,r=e.snapshotTime;e.blobName&&(n=`b`,e.snapshotTime?n=`bs`:e.versionId&&(n=`bv`,r=e.versionId));let i;e.permissions&&(i=e.blobName?_T.parse(e.permissions.toString()).toString():vT.parse(e.permissions.toString()).toString());let a=[i||``,e.startsOn?eT(e.startsOn,!1):``,e.expiresOn?eT(e.expiresOn,!1):``,jT(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?eT(t.userDelegationKey.signedStartsOn,!1):``,t.userDelegationKey.signedExpiresOn?eT(t.userDelegationKey.signedExpiresOn,!1):``,t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,void 0,e.correlationId,void 0,e.delegatedUserObjectId,e.ipRange?yT(e.ipRange):``,e.protocol?e.protocol:``,e.version,n,r,e.encryptionScope,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join(` -`),o=t.computeHMACSHA256(a);return{sasQueryParameters:new xT(e.version,o,i,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId,e.encryptionScope,e.delegatedUserObjectId),stringToSign:a}}function jT(e,t,n){let r=[`/blob/${e}/${t}`];return n&&r.push(`/${n}`),r.join(``)}function MT(e){let t=e.version?e.version:Hg;if(e.snapshotTime&&t<`2018-11-09`)throw RangeError(`'version' must be >= '2018-11-09' when providing 'snapshotTime'.`);if(e.blobName===void 0&&e.snapshotTime)throw RangeError(`Must provide 'blobName' when providing 'snapshotTime'.`);if(e.versionId&&t<`2019-10-10`)throw RangeError(`'version' must be >= '2019-10-10' when providing 'versionId'.`);if(e.blobName===void 0&&e.versionId)throw RangeError(`Must provide 'blobName' when providing 'versionId'.`);if(e.permissions&&e.permissions.setImmutabilityPolicy&&t<`2020-08-04`)throw RangeError(`'version' must be >= '2020-08-04' when provided 'i' permission.`);if(e.permissions&&e.permissions.deleteVersion&&t<`2019-10-10`)throw RangeError(`'version' must be >= '2019-10-10' when providing 'x' permission.`);if(e.permissions&&e.permissions.permanentDelete&&t<`2019-10-10`)throw RangeError(`'version' must be >= '2019-10-10' when providing 'y' permission.`);if(e.permissions&&e.permissions.tag&&t<`2019-12-12`)throw RangeError(`'version' must be >= '2019-12-12' when providing 't' permission.`);if(t<`2020-02-10`&&e.permissions&&(e.permissions.move||e.permissions.execute))throw RangeError(`'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.`);if(t<`2021-04-10`&&e.permissions&&e.permissions.filterByTags)throw RangeError(`'version' must be >= '2021-04-10' when providing the 'f' permission.`);if(t<`2020-02-10`&&(e.preauthorizedAgentObjectId||e.correlationId))throw RangeError(`'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.`);if(e.encryptionScope&&t<`2020-12-06`)throw RangeError(`'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.`);return e.version=t,e}var NT=class{_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,t){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),t||=xd(),this._leaseId=t}async acquireLease(e,t={}){if(this._isContainer&&(t.conditions?.ifMatch&&t.conditions?.ifMatch!==``||t.conditions?.ifNoneMatch&&t.conditions?.ifNoneMatch!==``||t.conditions?.tagConditions))throw 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 gT.withSpan(`BlobLeaseClient-acquireLease`,t,async n=>mT(await this._containerOrBlobOperation.acquireLease({abortSignal:t.abortSignal,duration:e,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,t={}){if(this._isContainer&&(t.conditions?.ifMatch&&t.conditions?.ifMatch!==``||t.conditions?.ifNoneMatch&&t.conditions?.ifNoneMatch!==``||t.conditions?.tagConditions))throw 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 gT.withSpan(`BlobLeaseClient-changeLease`,t,async n=>{let r=mT(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:t.abortSignal,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,r})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==``||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==``||e.conditions?.tagConditions))throw 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 gT.withSpan(`BlobLeaseClient-releaseLease`,e,async t=>mT(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:t.tracingOptions})))}async renewLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==``||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==``||e.conditions?.tagConditions))throw 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 gT.withSpan(`BlobLeaseClient-renewLease`,e,async t=>this._containerOrBlobOperation.renewLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:t.tracingOptions}))}async breakLease(e,t={}){if(this._isContainer&&(t.conditions?.ifMatch&&t.conditions?.ifMatch!==``||t.conditions?.ifNoneMatch&&t.conditions?.ifNoneMatch!==``||t.conditions?.tagConditions))throw 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 gT.withSpan(`BlobLeaseClient-breakLease`,t,async n=>{let r={abortSignal:t.abortSignal,breakPeriod:e,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},tracingOptions:n.tracingOptions};return mT(await this._containerOrBlobOperation.breakLease(r))})}},PT=class extends W{start;offset;end;getter;source;retries=0;maxRetryRequests;onProgress;options;constructor(e,t,n,r,i={}){super({highWaterMark:i.highWaterMark}),this.getter=t,this.source=e,this.start=n,this.offset=n,this.end=n+r-1,this.maxRetryRequests=i.maxRetryRequests&&i.maxRetryRequests>=0?i.maxRetryRequests:0,this.onProgress=i.onProgress,this.options=i,this.setSourceEventHandlers()}_read(){this.source.resume()}setSourceEventHandlers(){this.source.on(`data`,this.sourceDataHandler),this.source.on(`end`,this.sourceErrorOrEndHandler),this.source.on(`error`,this.sourceErrorOrEndHandler),this.source.on(`aborted`,this.sourceAbortedHandler)}removeSourceEventHandlers(){this.source.removeListener(`data`,this.sourceDataHandler),this.source.removeListener(`end`,this.sourceErrorOrEndHandler),this.source.removeListener(`error`,this.sourceErrorOrEndHandler),this.source.removeListener(`aborted`,this.sourceAbortedHandler)}sourceDataHandler=e=>{if(this.options.doInjectErrorOnce){this.options.doInjectErrorOnce=void 0,this.source.pause(),this.sourceErrorOrEndHandler(),this.source.destroy();return}this.offset+=e.length,this.onProgress&&this.onProgress({loadedBytes:this.offset-this.start}),this.push(e)||this.source.pause()};sourceAbortedHandler=()=>{let e=new gd(`The operation was aborted.`);this.destroy(e)};sourceErrorOrEndHandler=e=>{if(e&&e.name===`AbortError`){this.destroy(e);return}this.removeSourceEventHandlers(),this.offset-1===this.end?this.push(null):this.offset<=this.end?this.retries{this.source=e,this.setSourceEventHandlers()}).catch(e=>{this.destroy(e)})):this.destroy(Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset-1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)):this.destroy(Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset-1}`))};_destroy(e,t){this.removeSourceEventHandlers(),this.source.destroy(),t(e===null?void 0:e)}},FT=class{get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){return this.originalResponse.copyCompletedOn}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get tagCount(){return this.originalResponse.tagCount}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get lastAccessed(){return this.originalResponse.lastAccessed}get createdOn(){return this.originalResponse.createdOn}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get versionId(){return this.originalResponse.versionId}get isCurrentVersion(){return this.originalResponse.isCurrentVersion}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get objectReplicationDestinationPolicyId(){return this.originalResponse.objectReplicationDestinationPolicyId}get objectReplicationSourceProperties(){return this.originalResponse.objectReplicationSourceProperties}get isSealed(){return this.originalResponse.isSealed}get immutabilityPolicyExpiresOn(){return this.originalResponse.immutabilityPolicyExpiresOn}get immutabilityPolicyMode(){return this.originalResponse.immutabilityPolicyMode}get legalHold(){return this.originalResponse.legalHold}get contentAsBlob(){return this.originalResponse.blobBody}get readableStreamBody(){return Sd?this.blobDownloadStream:void 0}get _response(){return this.originalResponse._response}originalResponse;blobDownloadStream;constructor(e,t,n,r,i={}){this.originalResponse=e,this.blobDownloadStream=new PT(this.originalResponse.readableStreamBody,t,n,r,i)}};const IT=new Uint8Array([79,98,106,1]);var LT=class e{static async readFixedBytes(e,t,n={}){let r=await e.read(t,{abortSignal:n.abortSignal});if(r.length!==t)throw Error(`Hit stream end.`);return r}static async readByte(t,n={}){return(await e.readFixedBytes(t,1,n))[0]}static async readZigZagLong(t,n={}){let r=0,i=0,a,o,s;do a=await e.readByte(t,n),o=a&128,r|=(a&127)<2**53-1)throw Error(`Integer overflow.`);return i}return r>>1^-(r&1)}static async readLong(t,n={}){return e.readZigZagLong(t,n)}static async readInt(t,n={}){return e.readZigZagLong(t,n)}static async readNull(){return null}static async readBoolean(t,n={}){let r=await e.readByte(t,n);if(r===1)return!0;if(r===0)return!1;throw Error(`Byte was not a boolean.`)}static async readFloat(t,n={}){let r=await e.readFixedBytes(t,4,n);return new DataView(r.buffer,r.byteOffset,r.byteLength).getFloat32(0,!0)}static async readDouble(t,n={}){let r=await e.readFixedBytes(t,8,n);return new DataView(r.buffer,r.byteOffset,r.byteLength).getFloat64(0,!0)}static async readBytes(t,n={}){let r=await e.readLong(t,n);if(r<0)throw Error(`Bytes size was negative.`);return t.read(r,{abortSignal:n.abortSignal})}static async readString(t,n={}){let r=await e.readBytes(t,n);return new TextDecoder().decode(r)}static async readMapPair(t,n,r={}){return{key:await e.readString(t,r),value:await n(t,r)}}static async readMap(t,n,r={}){let i=await e.readArray(t,(t,r={})=>e.readMapPair(t,n,r),r),a={};for(let e of i)a[e.key]=e.value;return a}static async readArray(t,n,r={}){let i=[];for(let a=await e.readLong(t,r);a!==0;a=await e.readLong(t,r))for(a<0&&(await e.readLong(t,r),a=-a);a--;){let e=await n(t,r);i.push(e)}return i}},RT;(function(e){e.RECORD=`record`,e.ENUM=`enum`,e.ARRAY=`array`,e.MAP=`map`,e.UNION=`union`,e.FIXED=`fixed`})(RT||={});var zT;(function(e){e.NULL=`null`,e.BOOLEAN=`boolean`,e.INT=`int`,e.LONG=`long`,e.FLOAT=`float`,e.DOUBLE=`double`,e.BYTES=`bytes`,e.STRING=`string`})(zT||={});var BT=class e{static fromSchema(t){return typeof t==`string`?e.fromStringSchema(t):Array.isArray(t)?e.fromArraySchema(t):e.fromObjectSchema(t)}static fromStringSchema(e){switch(e){case zT.NULL:case zT.BOOLEAN:case zT.INT:case zT.LONG:case zT.FLOAT:case zT.DOUBLE:case zT.BYTES:case zT.STRING:return new VT(e);default:throw Error(`Unexpected Avro type ${e}`)}}static fromArraySchema(t){return new UT(t.map(e.fromSchema))}static fromObjectSchema(t){let n=t.type;try{return e.fromStringSchema(n)}catch{}switch(n){case RT.RECORD:if(t.aliases)throw Error(`aliases currently is not supported, schema: ${t}`);if(!t.name)throw Error(`Required attribute 'name' doesn't exist on schema: ${t}`);let r={};if(!t.fields)throw Error(`Required attribute 'fields' doesn't exist on schema: ${t}`);for(let n of t.fields)r[n.name]=e.fromSchema(n.type);return new GT(r,t.name);case RT.ENUM:if(t.aliases)throw Error(`aliases currently is not supported, schema: ${t}`);if(!t.symbols)throw Error(`Required attribute 'symbols' doesn't exist on schema: ${t}`);return new HT(t.symbols);case RT.MAP:if(!t.values)throw Error(`Required attribute 'values' doesn't exist on schema: ${t}`);return new WT(e.fromSchema(t.values));case RT.ARRAY:case RT.FIXED:default:throw Error(`Unexpected Avro type ${n} in ${t}`)}}},VT=class extends BT{_primitive;constructor(e){super(),this._primitive=e}read(e,t={}){switch(this._primitive){case zT.NULL:return LT.readNull();case zT.BOOLEAN:return LT.readBoolean(e,t);case zT.INT:return LT.readInt(e,t);case zT.LONG:return LT.readLong(e,t);case zT.FLOAT:return LT.readFloat(e,t);case zT.DOUBLE:return LT.readDouble(e,t);case zT.BYTES:return LT.readBytes(e,t);case zT.STRING:return LT.readString(e,t);default:throw Error(`Unknown Avro Primitive`)}}},HT=class extends BT{_symbols;constructor(e){super(),this._symbols=e}async read(e,t={}){let n=await LT.readInt(e,t);return this._symbols[n]}},UT=class extends BT{_types;constructor(e){super(),this._types=e}async read(e,t={}){let n=await LT.readInt(e,t);return this._types[n].read(e,t)}},WT=class extends BT{_itemType;constructor(e){super(),this._itemType=e}read(e,t={}){return LT.readMap(e,(e,t)=>this._itemType.read(e,t),t)}},GT=class extends BT{_name;_fields;constructor(e,t){super(),this._fields=e,this._name=t}async read(e,t={}){let n={};n.$schema=this._name;for(let r in this._fields)Object.prototype.hasOwnProperty.call(this._fields,r)&&(n[r]=await this._fields[r].read(e,t));return n}};function KT(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(let n=0;n0)for(let t=0;t0}async*parseObjects(e={}){for(this._initialized||await this.initialize(e);this.hasNext();){let t=await this._itemType.read(this._dataStream,{abortSignal:e.abortSignal});if(this._itemsRemainingInBlock--,this._objectIndex++,this._itemsRemainingInBlock===0){let t=await LT.readFixedBytes(this._dataStream,16,{abortSignal:e.abortSignal});if(this._blockOffset=this._initialBlockOffset+this._dataStream.position,this._objectIndex=0,!KT(this._syncMarker,t))throw Error(`Stream is not a valid Avro file.`);try{this._itemsRemainingInBlock=await LT.readLong(this._dataStream,{abortSignal:e.abortSignal})}catch{this._itemsRemainingInBlock=0}this._itemsRemainingInBlock>0&&await LT.readLong(this._dataStream,{abortSignal:e.abortSignal})}yield t}}},JT=class{};const YT=new gd(`Reading from the avro stream was aborted.`);var XT=class extends JT{_position;_readable;toUint8Array(e){return typeof e==`string`?Je.from(e):e}constructor(e){super(),this._readable=e,this._position=0}get position(){return this._position}async read(e,t={}){if(t.abortSignal?.aborted)throw YT;if(e<0)throw Error(`size parameter should be positive: ${e}`);if(e===0)return new Uint8Array;if(!this._readable.readable)throw Error(`Stream no longer readable.`);let n=this._readable.read(e);return n?(this._position+=n.length,this.toUint8Array(n)):new Promise((n,r)=>{let i=()=>{this._readable.removeListener(`readable`,a),this._readable.removeListener(`error`,o),this._readable.removeListener(`end`,o),this._readable.removeListener(`close`,o),t.abortSignal&&t.abortSignal.removeEventListener(`abort`,s)},a=()=>{let t=this._readable.read(e);t&&(this._position+=t.length,i(),n(this.toUint8Array(t)))},o=()=>{i(),r()},s=()=>{i(),r(YT)};this._readable.on(`readable`,a),this._readable.once(`error`,o),this._readable.once(`end`,o),this._readable.once(`close`,o),t.abortSignal&&t.abortSignal.addEventListener(`abort`,s)})}},ZT=class extends W{source;avroReader;avroIter;avroPaused=!0;onProgress;onError;constructor(e,t={}){super(),this.source=e,this.onProgress=t.onProgress,this.onError=t.onError,this.avroReader=new qT(new XT(this.source)),this.avroIter=this.avroReader.parseObjects({abortSignal:t.abortSignal})}_read(){this.avroPaused&&this.readInternal().catch(e=>{this.emit(`error`,e)})}async readInternal(){this.avroPaused=!1;let e;do{if(e=await this.avroIter.next(),e.done)break;let t=e.value,n=t.$schema;if(typeof n!=`string`)throw Error(`Missing schema in avro record.`);switch(n){case`com.microsoft.azure.storage.queryBlobContents.resultData`:{let e=t.data;if(!(e instanceof Uint8Array))throw Error(`Invalid data in avro result record.`);this.push(Buffer.from(e))||(this.avroPaused=!0)}break;case`com.microsoft.azure.storage.queryBlobContents.progress`:{let e=t.bytesScanned;if(typeof e!=`number`)throw Error(`Invalid bytesScanned in avro progress record.`);this.onProgress&&this.onProgress({loadedBytes:e})}break;case`com.microsoft.azure.storage.queryBlobContents.end`:if(this.onProgress){let e=t.totalBytes;if(typeof e!=`number`)throw Error(`Invalid totalBytes in avro end record.`);this.onProgress({loadedBytes:e})}this.push(null);break;case`com.microsoft.azure.storage.queryBlobContents.error`:if(this.onError){let e=t.fatal;if(typeof e!=`boolean`)throw Error(`Invalid fatal in avro error record.`);let n=t.name;if(typeof n!=`string`)throw Error(`Invalid name in avro error record.`);let r=t.description;if(typeof r!=`string`)throw Error(`Invalid description in avro error record.`);let i=t.position;if(typeof i!=`number`)throw Error(`Invalid position in avro error record.`);this.onError({position:i,name:n,isFatal:e,description:r})}break;default:throw Error(`Unknown schema ${n} in avro progress record.`)}}while(!e.done&&!this.avroPaused)}},QT=class{get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get blobBody(){}get readableStreamBody(){return Sd?this.blobDownloadStream:void 0}get _response(){return this.originalResponse._response}originalResponse;blobDownloadStream;constructor(e,t={}){this.originalResponse=e,this.blobDownloadStream=new ZT(this.originalResponse.readableStreamBody,t)}},$T;(function(e){e.Hot=`Hot`,e.Cool=`Cool`,e.Cold=`Cold`,e.Archive=`Archive`})($T||={});var eE;(function(e){e.P4=`P4`,e.P6=`P6`,e.P10=`P10`,e.P15=`P15`,e.P20=`P20`,e.P30=`P30`,e.P40=`P40`,e.P50=`P50`,e.P60=`P60`,e.P70=`P70`,e.P80=`P80`})(eE||={});function tE(e){if(e!==void 0)return e}function nE(e,t){if(e&&!t)throw RangeError(`Customer-provided encryption key must be used over HTTPS.`);e&&!e.encryptionAlgorithm&&(e.encryptionAlgorithm=`AES256`)}var rE;(function(e){e.StorageOAuthScopes=`https://storage.azure.com/.default`,e.DiskComputeOAuthScopes=`https://disk.compute.azure.com/.default`})(rE||={});function iE(e){let t=(e._response.parsedBody.pageRange||[]).map(e=>({offset:e.start,count:e.end-e.start})),n=(e._response.parsedBody.clearRange||[]).map(e=>({offset:e.start,count:e.end-e.start}));return{...e,pageRange:t,clearRange:n,_response:{...e._response,parsedBody:{pageRange:t,clearRange:n}}}}var aE=class e extends Error{constructor(t){super(t),this.name=`PollerStoppedError`,Object.setPrototypeOf(this,e.prototype)}},oE=class e extends Error{constructor(t){super(t),this.name=`PollerCancelledError`,Object.setPrototypeOf(this,e.prototype)}},sE=class{constructor(e){this.resolveOnUnsuccessful=!1,this.stopped=!0,this.pollProgressCallbacks=[],this.operation=e,this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t}),this.promise.catch(()=>{})}async startPolling(e={}){for(this.stopped&&=!1;!this.isStopped()&&!this.isDone();)await this.poll(e),await this.delay()}async pollOnce(e={}){this.isDone()||(this.operation=await this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})),this.processUpdatedState()}fireProgress(e){for(let t of this.pollProgressCallbacks)t(e)}async cancelOnce(e={}){this.operation=await this.operation.cancel(e)}poll(e={}){if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);let t=()=>{this.pollOncePromise=void 0};this.pollOncePromise.then(t,t).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error&&(this.stopped=!0,!this.resolveOnUnsuccessful))throw this.reject(this.operation.state.error),this.operation.state.error;if(this.operation.state.isCancelled&&(this.stopped=!0,!this.resolveOnUnsuccessful)){let e=new oE(`Operation was canceled`);throw this.reject(e),e}this.isDone()&&this.resolve&&this.resolve(this.getResult())}async pollUntilDone(e={}){return this.stopped&&this.startPolling(e).catch(this.reject),this.processUpdatedState(),this.promise}onProgress(e){return this.pollProgressCallbacks.push(e),()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter(t=>t!==e)}}isDone(){let e=this.operation.state;return!!(e.isCompleted||e.isCancelled||e.error)}stopPolling(){this.stopped||(this.stopped=!0,this.reject&&this.reject(new aE(`This poller is already stopped`)))}isStopped(){return this.stopped}cancelOperation(e={}){if(!this.cancelPromise)this.cancelPromise=this.cancelOnce(e);else if(e.abortSignal)throw Error(`A cancel request is currently pending`);return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){return this.operation.state.result}toString(){return this.operation.toString()}},cE=class extends sE{intervalInMs;constructor(e){let{blobClient:t,copySource:n,intervalInMs:r=15e3,onProgress:i,resumeFrom:a,startCopyFromURLOptions:o}=e,s;a&&(s=JSON.parse(a).state);let c=fE({...s,blobClient:t,copySource:n,startCopyFromURLOptions:o});super(c),typeof i==`function`&&this.onProgress(i),this.intervalInMs=r}delay(){return vd(this.intervalInMs)}};const lE=async function(e={}){let t=this.state,{copyId:n}=t;return t.isCompleted?fE(t):n?(await t.blobClient.abortCopyFromURL(n,{abortSignal:e.abortSignal}),t.isCancelled=!0,fE(t)):(t.isCancelled=!0,fE(t))},uE=async function(e={}){let t=this.state,{blobClient:n,copySource:r,startCopyFromURLOptions:i}=t;if(!t.isStarted){t.isStarted=!0;let e=await n.startCopyFromURL(r,i);t.copyId=e.copyId,e.copyStatus===`success`&&(t.result=e,t.isCompleted=!0)}else if(!t.isCompleted)try{let n=await t.blobClient.getProperties({abortSignal:e.abortSignal}),{copyStatus:r,copyProgress:i}=n,a=t.copyProgress;i&&(t.copyProgress=i),r===`pending`&&i!==a&&typeof e.fireProgress==`function`?e.fireProgress(t):r===`success`?(t.result=n,t.isCompleted=!0):r===`failed`&&(t.error=Error(`Blob copy failed with reason: "${n.copyStatusDescription||`unknown`}"`),t.isCompleted=!0)}catch(e){t.error=e,t.isCompleted=!0}return fE(t)},dE=function(){return JSON.stringify({state:this.state},(e,t)=>{if(e!==`blobClient`)return t})};function fE(e){return{state:{...e},cancel:lE,toString:dE,update:uE}}function pE(e){if(e.offset<0)throw RangeError(`Range.offset cannot be smaller than 0.`);if(e.count&&e.count<=0)throw RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`);return e.count?`bytes=${e.offset}-${e.offset+e.count-1}`:`bytes=${e.offset}-`}var mE;(function(e){e[e.Good=0]=`Good`,e[e.Error=1]=`Error`})(mE||={});var hE=class{concurrency;actives=0;completed=0;offset=0;operations=[];state=mE.Good;emitter;constructor(e=5){if(e<1)throw RangeError(`concurrency must be larger than 0`);this.concurrency=e,this.emitter=new Ce}addOperation(e){this.operations.push(async()=>{try{this.actives++,await e(),this.actives--,this.completed++,this.parallelExecute()}catch(e){this.emitter.emit(`error`,e)}})}async do(){return this.operations.length===0?Promise.resolve():(this.parallelExecute(),new Promise((e,t)=>{this.emitter.on(`finish`,e),this.emitter.on(`error`,e=>{this.state=mE.Error,t(e)})}))}nextOperation(){return this.offset=this.operations.length){this.emitter.emit(`finish`);return}for(;this.actives{let c=setTimeout(()=>s(Error(`The operation cannot be completed in timeout.`)),1e5);e.on(`readable`,()=>{if(a>=o){clearTimeout(c),r();return}let s=e.read();if(!s)return;typeof s==`string`&&(s=Buffer.from(s,i));let l=a+s.length>o?o-a:s.length;t.fill(s.slice(0,l),n+a,n+a+l),a+=l}),e.on(`end`,()=>{clearTimeout(c),a{clearTimeout(c),s(e)})})}async function _E(e,t){return new Promise((n,r)=>{let i=Ye.createWriteStream(t);e.on(`error`,e=>{r(e)}),i.on(`error`,e=>{r(e)}),i.on(`close`,n),e.pipe(i)})}const vE=je.promisify(Ye.stat),yE=Ye.createReadStream;var bE=class e extends hT{blobContext;_name;_containerName;_versionId;_snapshot;get name(){return this._name}get containerName(){return this._containerName}constructor(e,t,n,r){r||={};let i,a;if(Yg(t))a=e,i=t;else if(Sd&&t instanceof Tg||t instanceof vg||mf(t))a=e,r=n,i=Zg(t,r);else if(!t&&typeof t!=`string`)a=e,n&&typeof n!=`string`&&(r=n),i=Zg(new vg,r);else if(t&&typeof t==`string`&&n&&typeof n==`string`){let o=t,s=n,c=qw(e);if(c.kind===`AccountConnString`)if(Sd){let e=new Tg(c.accountName,c.accountKey);a=Yw(Yw(c.url,encodeURIComponent(o)),encodeURIComponent(s)),r.proxyOptions||=jd(c.proxyUri),i=Zg(e,r)}else throw Error(`Account connection string is only supported in Node.js environment`);else if(c.kind===`SASConnString`)a=Yw(Yw(c.url,encodeURIComponent(o)),encodeURIComponent(s))+`?`+c.accountSas,i=Zg(new vg,r);else throw Error(`Connection string must be either an Account connection string or a SAS connection string`)}else throw Error(`Expecting non-empty strings for containerName and blobName parameters`);super(a,i),{blobName:this._name,containerName:this._containerName}=this.getBlobAndContainerNamesFromUrl(),this.blobContext=this.storageClientContext.blob,this._snapshot=Zw(this.url,Gg.Parameters.SNAPSHOT),this._versionId=Zw(this.url,Gg.Parameters.VERSIONID)}withSnapshot(t){return new e(Xw(this.url,Gg.Parameters.SNAPSHOT,t.length===0?void 0:t),this.pipeline)}withVersion(t){return new e(Xw(this.url,Gg.Parameters.VERSIONID,t.length===0?void 0:t),this.pipeline)}getAppendBlobClient(){return new xE(this.url,this.pipeline)}getBlockBlobClient(){return new SE(this.url,this.pipeline)}getPageBlobClient(){return new CE(this.url,this.pipeline)}async download(e=0,t,n={}){return n.conditions=n.conditions||{},n.conditions=n.conditions||{},nE(n.customerProvidedKey,this.isHttps),gT.withSpan(`BlobClient-download`,n,async r=>{let i=mT(await this.blobContext.download({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},requestOptions:{onDownloadProgress:Sd?void 0:n.onProgress},range:e===0&&!t?void 0:pE({offset:e,count:t}),rangeGetContentMD5:n.rangeGetContentMD5,rangeGetContentCRC64:n.rangeGetContentCrc64,snapshot:n.snapshot,cpkInfo:n.customerProvidedKey,tracingOptions:r.tracingOptions})),a={...i,_response:i._response,objectReplicationDestinationPolicyId:i.objectReplicationPolicyId,objectReplicationSourceProperties:dT(i.objectReplicationRules)};if(!Sd)return a;if((n.maxRetryRequests===void 0||n.maxRetryRequests<0)&&(n.maxRetryRequests=5),i.contentLength===void 0)throw RangeError(`File download response doesn't contain valid content length header`);if(!i.etag)throw RangeError(`File download response doesn't contain valid etag header`);return new FT(a,async t=>{let r={leaseAccessConditions:n.conditions,modifiedAccessConditions:{ifMatch:n.conditions.ifMatch||i.etag,ifModifiedSince:n.conditions.ifModifiedSince,ifNoneMatch:n.conditions.ifNoneMatch,ifUnmodifiedSince:n.conditions.ifUnmodifiedSince,ifTags:n.conditions?.tagConditions},range:pE({count:e+i.contentLength-t,offset:t}),rangeGetContentMD5:n.rangeGetContentMD5,rangeGetContentCRC64:n.rangeGetContentCrc64,snapshot:n.snapshot,cpkInfo:n.customerProvidedKey};return(await this.blobContext.download({abortSignal:n.abortSignal,...r})).readableStreamBody},e,i.contentLength,{maxRetryRequests:n.maxRetryRequests,onProgress:n.onProgress})})}async exists(e={}){return gT.withSpan(`BlobClient-exists`,e,async t=>{try{return nE(e.customerProvidedKey,this.isHttps),await this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:t.tracingOptions}),!0}catch(e){if(e.statusCode===404)return!1;if(e.statusCode===409&&(e.details.errorCode===`BlobUsesCustomerSpecifiedEncryption`||e.details.errorCode===`BlobDoesNotUseCustomerSpecifiedEncryption`))return!0;throw e}})}async getProperties(e={}){return e.conditions=e.conditions||{},nE(e.customerProvidedKey,this.isHttps),gT.withSpan(`BlobClient-getProperties`,e,async t=>{let n=mT(await this.blobContext.getProperties({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},cpkInfo:e.customerProvidedKey,tracingOptions:t.tracingOptions}));return{...n,_response:n._response,objectReplicationDestinationPolicyId:n.objectReplicationPolicyId,objectReplicationSourceProperties:dT(n.objectReplicationRules)}})}async delete(e={}){return e.conditions=e.conditions||{},gT.withSpan(`BlobClient-delete`,e,async t=>mT(await this.blobContext.delete({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:t.tracingOptions})))}async deleteIfExists(e={}){return gT.withSpan(`BlobClient-deleteIfExists`,e,async e=>{try{let t=mT(await this.delete(e));return{succeeded:!0,...t,_response:t._response}}catch(e){if(e.details?.errorCode===`BlobNotFound`)return{succeeded:!1,...e.response?.parsedHeaders,_response:e.response};throw e}})}async undelete(e={}){return gT.withSpan(`BlobClient-undelete`,e,async t=>mT(await this.blobContext.undelete({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions})))}async setHTTPHeaders(e,t={}){return t.conditions=t.conditions||{},nE(t.customerProvidedKey,this.isHttps),gT.withSpan(`BlobClient-setHTTPHeaders`,t,async n=>mT(await this.blobContext.setHttpHeaders({abortSignal:t.abortSignal,blobHttpHeaders:e,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},tracingOptions:n.tracingOptions})))}async setMetadata(e,t={}){return t.conditions=t.conditions||{},nE(t.customerProvidedKey,this.isHttps),gT.withSpan(`BlobClient-setMetadata`,t,async n=>mT(await this.blobContext.setMetadata({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,tracingOptions:n.tracingOptions})))}async setTags(e,t={}){return gT.withSpan(`BlobClient-setTags`,t,async n=>mT(await this.blobContext.setTags({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},blobModifiedAccessConditions:t.conditions,tracingOptions:n.tracingOptions,tags:cT(e)})))}async getTags(e={}){return gT.withSpan(`BlobClient-getTags`,e,async t=>{let n=mT(await this.blobContext.getTags({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},blobModifiedAccessConditions:e.conditions,tracingOptions:t.tracingOptions}));return{...n,_response:n._response,tags:lT({blobTagSet:n.blobTagSet})||{}}})}getBlobLeaseClient(e){return new NT(this,e)}async createSnapshot(e={}){return e.conditions=e.conditions||{},nE(e.customerProvidedKey,this.isHttps),gT.withSpan(`BlobClient-createSnapshot`,e,async t=>mT(await this.blobContext.createSnapshot({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,tracingOptions:t.tracingOptions})))}async beginCopyFromURL(e,t={}){let n=new cE({blobClient:{abortCopyFromURL:(...e)=>this.abortCopyFromURL(...e),getProperties:(...e)=>this.getProperties(...e),startCopyFromURL:(...e)=>this.startCopyFromURL(...e)},copySource:e,intervalInMs:t.intervalInMs,onProgress:t.onProgress,resumeFrom:t.resumeFrom,startCopyFromURLOptions:t});return await n.poll(),n}async abortCopyFromURL(e,t={}){return gT.withSpan(`BlobClient-abortCopyFromURL`,t,async n=>mT(await this.blobContext.abortCopyFromURL(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,tracingOptions:n.tracingOptions})))}async syncCopyFromURL(e,t={}){return t.conditions=t.conditions||{},t.sourceConditions=t.sourceConditions||{},gT.withSpan(`BlobClient-syncCopyFromURL`,t,async n=>mT(await this.blobContext.copyFromURL(e,{abortSignal:t.abortSignal,metadata:t.metadata,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions?.ifMatch,sourceIfModifiedSince:t.sourceConditions?.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions?.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions?.ifUnmodifiedSince},sourceContentMD5:t.sourceContentMD5,copySourceAuthorization:fT(t.sourceAuthorization),tier:tE(t.tier),blobTagsString:sT(t.tags),immutabilityPolicyExpiry:t.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:t.immutabilityPolicy?.policyMode,legalHold:t.legalHold,encryptionScope:t.encryptionScope,copySourceTags:t.copySourceTags,fileRequestIntent:t.sourceShareTokenIntent,tracingOptions:n.tracingOptions})))}async setAccessTier(e,t={}){return gT.withSpan(`BlobClient-setAccessTier`,t,async n=>mT(await this.blobContext.setTier(tE(e),{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},rehydratePriority:t.rehydratePriority,tracingOptions:n.tracingOptions})))}async downloadToBuffer(e,t,n,r={}){let i,a=0,o=0,s=r;e instanceof Buffer?(i=e,a=t||0,o=typeof n==`number`?n:0):(a=typeof e==`number`?e:0,o=typeof t==`number`?t:0,s=n||{});let c=s.blockSize??0;if(c<0)throw RangeError(`blockSize option must be >= 0`);if(c===0&&(c=Wg),a<0)throw RangeError(`offset option must be >= 0`);if(o&&o<=0)throw RangeError(`count option must be greater than 0`);return s.conditions||={},gT.withSpan(`BlobClient-downloadToBuffer`,s,async e=>{if(!o){let t=await this.getProperties({...s,tracingOptions:e.tracingOptions});if(o=t.contentLength-a,o<0)throw RangeError(`offset ${a} shouldn't be larger than blob size ${t.contentLength}`)}if(!i)try{i=Buffer.alloc(o)}catch(e){throw Error(`Unable to allocate the buffer of size: ${o}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${e.message}`)}if(i.length{let n=a+o;r+c{let a=await this.download(t,n,{...r,tracingOptions:i.tracingOptions});return a.readableStreamBody&&await _E(a.readableStreamBody,e),a.blobDownloadStream=void 0,a})}getBlobAndContainerNamesFromUrl(){let e,t;try{let n=new URL(this.url);if(n.host.split(`.`)[1]===`blob`){let r=n.pathname.match(`/([^/]*)(/(.*))?`);e=r[1],t=r[3]}else if(oT(n)){let r=n.pathname.match(`/([^/]*)/([^/]*)(/(.*))?`);e=r[2],t=r[4]}else{let r=n.pathname.match(`/([^/]*)(/(.*))?`);e=r[1],t=r[3]}if(e=decodeURIComponent(e),t=decodeURIComponent(t),t=t.replace(/\\/g,`/`),!e)throw Error(`Provided containerName is invalid.`);return{blobName:t,containerName:e}}catch{throw Error(`Unable to extract blobName and containerName with provided information.`)}}async startCopyFromURL(e,t={}){return gT.withSpan(`BlobClient-startCopyFromURL`,t,async n=>(t.conditions=t.conditions||{},t.sourceConditions=t.sourceConditions||{},mT(await this.blobContext.startCopyFromURL(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince,sourceIfTags:t.sourceConditions.tagConditions},immutabilityPolicyExpiry:t.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:t.immutabilityPolicy?.policyMode,legalHold:t.legalHold,rehydratePriority:t.rehydratePriority,tier:tE(t.tier),blobTagsString:sT(t.tags),sealBlob:t.sealBlob,tracingOptions:n.tracingOptions}))))}generateSasUrl(e){return new Promise(t=>{if(!(this.credential instanceof Tg))throw RangeError(`Can only generate the SAS when the client is initialized with a shared key credential`);let n=ST({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId,...e},this.credential).toString();t($w(this.url,n))})}generateSasStringToSign(e){if(!(this.credential instanceof Tg))throw RangeError(`Can only generate the SAS when the client is initialized with a shared key credential`);return CT({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId,...e},this.credential).stringToSign}generateUserDelegationSasUrl(e,t){return new Promise(n=>{let r=ST({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId,...e},t,this.accountName).toString();n($w(this.url,r))})}generateUserDelegationSasStringToSign(e,t){return CT({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId,...e},t,this.accountName).stringToSign}async deleteImmutabilityPolicy(e={}){return gT.withSpan(`BlobClient-deleteImmutabilityPolicy`,e,async e=>mT(await this.blobContext.deleteImmutabilityPolicy({tracingOptions:e.tracingOptions})))}async setImmutabilityPolicy(e,t={}){return gT.withSpan(`BlobClient-setImmutabilityPolicy`,t,async t=>mT(await this.blobContext.setImmutabilityPolicy({immutabilityPolicyExpiry:e.expiriesOn,immutabilityPolicyMode:e.policyMode,tracingOptions:t.tracingOptions})))}async setLegalHold(e,t={}){return gT.withSpan(`BlobClient-setLegalHold`,t,async t=>mT(await this.blobContext.setLegalHold(e,{tracingOptions:t.tracingOptions})))}async getAccountInfo(e={}){return gT.withSpan(`BlobClient-getAccountInfo`,e,async t=>mT(await this.blobContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions})))}},xE=class e extends bE{appendBlobContext;constructor(e,t,n,r){let i,a;if(r||={},Yg(t))a=e,i=t;else if(Sd&&t instanceof Tg||t instanceof vg||mf(t))a=e,r=n,i=Zg(t,r);else if(!t&&typeof t!=`string`)a=e,i=Zg(new vg,r);else if(t&&typeof t==`string`&&n&&typeof n==`string`){let o=t,s=n,c=qw(e);if(c.kind===`AccountConnString`)if(Sd){let e=new Tg(c.accountName,c.accountKey);a=Yw(Yw(c.url,encodeURIComponent(o)),encodeURIComponent(s)),r.proxyOptions||=jd(c.proxyUri),i=Zg(e,r)}else throw Error(`Account connection string is only supported in Node.js environment`);else if(c.kind===`SASConnString`)a=Yw(Yw(c.url,encodeURIComponent(o)),encodeURIComponent(s))+`?`+c.accountSas,i=Zg(new vg,r);else throw Error(`Connection string must be either an Account connection string or a SAS connection string`)}else throw Error(`Expecting non-empty strings for containerName and blobName parameters`);super(a,i),this.appendBlobContext=this.storageClientContext.appendBlob}withSnapshot(t){return new e(Xw(this.url,Gg.Parameters.SNAPSHOT,t.length===0?void 0:t),this.pipeline)}async create(e={}){return e.conditions=e.conditions||{},nE(e.customerProvidedKey,this.isHttps),gT.withSpan(`AppendBlobClient-create`,e,async t=>mT(await this.appendBlobContext.create(0,{abortSignal:e.abortSignal,blobHttpHeaders:e.blobHTTPHeaders,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,immutabilityPolicyExpiry:e.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:e.immutabilityPolicy?.policyMode,legalHold:e.legalHold,blobTagsString:sT(e.tags),tracingOptions:t.tracingOptions})))}async createIfNotExists(e={}){let t={ifNoneMatch:`*`};return gT.withSpan(`AppendBlobClient-createIfNotExists`,e,async e=>{try{let n=mT(await this.create({...e,conditions:t}));return{succeeded:!0,...n,_response:n._response}}catch(e){if(e.details?.errorCode===`BlobAlreadyExists`)return{succeeded:!1,...e.response?.parsedHeaders,_response:e.response};throw e}})}async seal(e={}){return e.conditions=e.conditions||{},gT.withSpan(`AppendBlobClient-seal`,e,async t=>mT(await this.appendBlobContext.seal({abortSignal:e.abortSignal,appendPositionAccessConditions:e.conditions,leaseAccessConditions:e.conditions,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:t.tracingOptions})))}async appendBlock(e,t,n={}){return n.conditions=n.conditions||{},nE(n.customerProvidedKey,this.isHttps),gT.withSpan(`AppendBlobClient-appendBlock`,n,async r=>mT(await this.appendBlobContext.appendBlock(t,e,{abortSignal:n.abortSignal,appendPositionAccessConditions:n.conditions,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},requestOptions:{onUploadProgress:n.onProgress},transactionalContentMD5:n.transactionalContentMD5,transactionalContentCrc64:n.transactionalContentCrc64,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,tracingOptions:r.tracingOptions})))}async appendBlockFromURL(e,t,n,r={}){return r.conditions=r.conditions||{},r.sourceConditions=r.sourceConditions||{},nE(r.customerProvidedKey,this.isHttps),gT.withSpan(`AppendBlobClient-appendBlockFromURL`,r,async i=>mT(await this.appendBlobContext.appendBlockFromUrl(e,0,{abortSignal:r.abortSignal,sourceRange:pE({offset:t,count:n}),sourceContentMD5:r.sourceContentMD5,sourceContentCrc64:r.sourceContentCrc64,leaseAccessConditions:r.conditions,appendPositionAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:r.sourceConditions?.ifMatch,sourceIfModifiedSince:r.sourceConditions?.ifModifiedSince,sourceIfNoneMatch:r.sourceConditions?.ifNoneMatch,sourceIfUnmodifiedSince:r.sourceConditions?.ifUnmodifiedSince},copySourceAuthorization:fT(r.sourceAuthorization),cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,fileRequestIntent:r.sourceShareTokenIntent,tracingOptions:i.tracingOptions})))}},SE=class e extends bE{_blobContext;blockBlobContext;constructor(e,t,n,r){let i,a;if(r||={},Yg(t))a=e,i=t;else if(Sd&&t instanceof Tg||t instanceof vg||mf(t))a=e,r=n,i=Zg(t,r);else if(!t&&typeof t!=`string`)a=e,n&&typeof n!=`string`&&(r=n),i=Zg(new vg,r);else if(t&&typeof t==`string`&&n&&typeof n==`string`){let o=t,s=n,c=qw(e);if(c.kind===`AccountConnString`)if(Sd){let e=new Tg(c.accountName,c.accountKey);a=Yw(Yw(c.url,encodeURIComponent(o)),encodeURIComponent(s)),r.proxyOptions||=jd(c.proxyUri),i=Zg(e,r)}else throw Error(`Account connection string is only supported in Node.js environment`);else if(c.kind===`SASConnString`)a=Yw(Yw(c.url,encodeURIComponent(o)),encodeURIComponent(s))+`?`+c.accountSas,i=Zg(new vg,r);else throw Error(`Connection string must be either an Account connection string or a SAS connection string`)}else throw Error(`Expecting non-empty strings for containerName and blobName parameters`);super(a,i),this.blockBlobContext=this.storageClientContext.blockBlob,this._blobContext=this.storageClientContext.blob}withSnapshot(t){return new e(Xw(this.url,Gg.Parameters.SNAPSHOT,t.length===0?void 0:t),this.pipeline)}async query(e,t={}){if(nE(t.customerProvidedKey,this.isHttps),!Sd)throw Error(`This operation currently is only supported in Node.js.`);return gT.withSpan(`BlockBlobClient-query`,t,async n=>new QT(mT(await this._blobContext.query({abortSignal:t.abortSignal,queryRequest:{queryType:`SQL`,expression:e,inputSerialization:uT(t.inputTextConfiguration),outputSerialization:uT(t.outputTextConfiguration)},leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},cpkInfo:t.customerProvidedKey,tracingOptions:n.tracingOptions})),{abortSignal:t.abortSignal,onProgress:t.onProgress,onError:t.onError}))}async upload(e,t,n={}){return n.conditions=n.conditions||{},nE(n.customerProvidedKey,this.isHttps),gT.withSpan(`BlockBlobClient-upload`,n,async r=>mT(await this.blockBlobContext.upload(t,e,{abortSignal:n.abortSignal,blobHttpHeaders:n.blobHTTPHeaders,leaseAccessConditions:n.conditions,metadata:n.metadata,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},requestOptions:{onUploadProgress:n.onProgress},cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,immutabilityPolicyExpiry:n.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:n.immutabilityPolicy?.policyMode,legalHold:n.legalHold,tier:tE(n.tier),blobTagsString:sT(n.tags),tracingOptions:r.tracingOptions})))}async syncUploadFromURL(e,t={}){return t.conditions=t.conditions||{},nE(t.customerProvidedKey,this.isHttps),gT.withSpan(`BlockBlobClient-syncUploadFromURL`,t,async n=>mT(await this.blockBlobContext.putBlobFromUrl(0,e,{...t,blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions?.ifMatch,sourceIfModifiedSince:t.sourceConditions?.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions?.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions?.ifUnmodifiedSince,sourceIfTags:t.sourceConditions?.tagConditions},cpkInfo:t.customerProvidedKey,copySourceAuthorization:fT(t.sourceAuthorization),tier:tE(t.tier),blobTagsString:sT(t.tags),copySourceTags:t.copySourceTags,fileRequestIntent:t.sourceShareTokenIntent,tracingOptions:n.tracingOptions})))}async stageBlock(e,t,n,r={}){return nE(r.customerProvidedKey,this.isHttps),gT.withSpan(`BlockBlobClient-stageBlock`,r,async i=>mT(await this.blockBlobContext.stageBlock(e,n,t,{abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,requestOptions:{onUploadProgress:r.onProgress},transactionalContentMD5:r.transactionalContentMD5,transactionalContentCrc64:r.transactionalContentCrc64,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions})))}async stageBlockFromURL(e,t,n=0,r,i={}){return nE(i.customerProvidedKey,this.isHttps),gT.withSpan(`BlockBlobClient-stageBlockFromURL`,i,async a=>mT(await this.blockBlobContext.stageBlockFromURL(e,0,t,{abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,sourceContentMD5:i.sourceContentMD5,sourceContentCrc64:i.sourceContentCrc64,sourceRange:n===0&&!r?void 0:pE({offset:n,count:r}),cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,copySourceAuthorization:fT(i.sourceAuthorization),fileRequestIntent:i.sourceShareTokenIntent,tracingOptions:a.tracingOptions})))}async commitBlockList(e,t={}){return t.conditions=t.conditions||{},nE(t.customerProvidedKey,this.isHttps),gT.withSpan(`BlockBlobClient-commitBlockList`,t,async n=>mT(await this.blockBlobContext.commitBlockList({latest:e},{abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:t.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:t.immutabilityPolicy?.policyMode,legalHold:t.legalHold,tier:tE(t.tier),blobTagsString:sT(t.tags),tracingOptions:n.tracingOptions})))}async getBlockList(e,t={}){return gT.withSpan(`BlockBlobClient-getBlockList`,t,async n=>{let r=mT(await this.blockBlobContext.getBlockList(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return r.committedBlocks||=[],r.uncommittedBlocks||=[],r})}async uploadData(e,t={}){return gT.withSpan(`BlockBlobClient-uploadData`,t,async t=>{if(Sd){let n;return e instanceof Buffer?n=e:e instanceof ArrayBuffer?n=Buffer.from(e):(e=e,n=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),this.uploadSeekableInternal((e,t)=>n.slice(e,e+t),n.byteLength,t)}else{let n=new Blob([e]);return this.uploadSeekableInternal((e,t)=>n.slice(e,e+t),n.size,t)}})}async uploadBrowserData(e,t={}){return gT.withSpan(`BlockBlobClient-uploadBrowserData`,t,async t=>{let n=new Blob([e]);return this.uploadSeekableInternal((e,t)=>n.slice(e,e+t),n.size,t)})}async uploadSeekableInternal(e,t,n={}){let r=n.blockSize??0;if(r<0||r>4194304e3)throw RangeError(`blockSize option must be >= 0 and <= 4194304000`);let i=n.maxSingleShotSize??268435456;if(i<0||i>268435456)throw RangeError(`maxSingleShotSize option must be >= 0 and <= 268435456`);if(r===0){if(t>4194304e3*5e4)throw RangeError(`${t} is too larger to upload to a block blob.`);t>i&&(r=Math.ceil(t/Ug),r<4194304&&(r=Wg))}return n.blobHTTPHeaders||={},n.conditions||={},gT.withSpan(`BlockBlobClient-uploadSeekableInternal`,n,async a=>{if(t<=i)return mT(await this.upload(e(0,t),t,a));let o=Math.floor((t-1)/r)+1;if(o>5e4)throw RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${Ug}`);let s=[],c=xd(),l=0,u=new hE(n.concurrency);for(let i=0;i{let u=nT(c,i),d=r*i,f=(i===o-1?t:d+r)-d;s.push(u),await this.stageBlock(u,e(d,f),f,{abortSignal:n.abortSignal,conditions:n.conditions,encryptionScope:n.encryptionScope,tracingOptions:a.tracingOptions}),l+=f,n.onProgress&&n.onProgress({loadedBytes:l})});return await u.do(),this.commitBlockList(s,a)})}async uploadFile(e,t={}){return gT.withSpan(`BlockBlobClient-uploadFile`,t,async n=>{let r=(await vE(e)).size;return this.uploadSeekableInternal((t,n)=>()=>yE(e,{autoClose:!0,end:n?t+n-1:1/0,start:t}),r,{...t,tracingOptions:n.tracingOptions})})}async uploadStream(e,t=8388608,n=5,r={}){return r.blobHTTPHeaders||={},r.conditions||={},gT.withSpan(`BlockBlobClient-uploadStream`,r,async i=>{let a=0,o=xd(),s=0,c=[];return await new ng(e,t,n,async(e,t)=>{let n=nT(o,a);c.push(n),a++,await this.stageBlock(n,e,t,{customerProvidedKey:r.customerProvidedKey,conditions:r.conditions,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions}),s+=t,r.onProgress&&r.onProgress({loadedBytes:s})},Math.ceil(n/4*3)).do(),mT(await this.commitBlockList(c,{...r,tracingOptions:i.tracingOptions}))})}},CE=class e extends bE{pageBlobContext;constructor(e,t,n,r){let i,a;if(r||={},Yg(t))a=e,i=t;else if(Sd&&t instanceof Tg||t instanceof vg||mf(t))a=e,r=n,i=Zg(t,r);else if(!t&&typeof t!=`string`)a=e,i=Zg(new vg,r);else if(t&&typeof t==`string`&&n&&typeof n==`string`){let o=t,s=n,c=qw(e);if(c.kind===`AccountConnString`)if(Sd){let e=new Tg(c.accountName,c.accountKey);a=Yw(Yw(c.url,encodeURIComponent(o)),encodeURIComponent(s)),r.proxyOptions||=jd(c.proxyUri),i=Zg(e,r)}else throw Error(`Account connection string is only supported in Node.js environment`);else if(c.kind===`SASConnString`)a=Yw(Yw(c.url,encodeURIComponent(o)),encodeURIComponent(s))+`?`+c.accountSas,i=Zg(new vg,r);else throw Error(`Connection string must be either an Account connection string or a SAS connection string`)}else throw Error(`Expecting non-empty strings for containerName and blobName parameters`);super(a,i),this.pageBlobContext=this.storageClientContext.pageBlob}withSnapshot(t){return new e(Xw(this.url,Gg.Parameters.SNAPSHOT,t.length===0?void 0:t),this.pipeline)}async create(e,t={}){return t.conditions=t.conditions||{},nE(t.customerProvidedKey,this.isHttps),gT.withSpan(`PageBlobClient-create`,t,async n=>mT(await this.pageBlobContext.create(0,e,{abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,blobSequenceNumber:t.blobSequenceNumber,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:t.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:t.immutabilityPolicy?.policyMode,legalHold:t.legalHold,tier:tE(t.tier),blobTagsString:sT(t.tags),tracingOptions:n.tracingOptions})))}async createIfNotExists(e,t={}){return gT.withSpan(`PageBlobClient-createIfNotExists`,t,async n=>{try{let r={ifNoneMatch:`*`},i=mT(await this.create(e,{...t,conditions:r,tracingOptions:n.tracingOptions}));return{succeeded:!0,...i,_response:i._response}}catch(e){if(e.details?.errorCode===`BlobAlreadyExists`)return{succeeded:!1,...e.response?.parsedHeaders,_response:e.response};throw e}})}async uploadPages(e,t,n,r={}){return r.conditions=r.conditions||{},nE(r.customerProvidedKey,this.isHttps),gT.withSpan(`PageBlobClient-uploadPages`,r,async i=>mT(await this.pageBlobContext.uploadPages(n,e,{abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},requestOptions:{onUploadProgress:r.onProgress},range:pE({offset:t,count:n}),sequenceNumberAccessConditions:r.conditions,transactionalContentMD5:r.transactionalContentMD5,transactionalContentCrc64:r.transactionalContentCrc64,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions})))}async uploadPagesFromURL(e,t,n,r,i={}){return i.conditions=i.conditions||{},i.sourceConditions=i.sourceConditions||{},nE(i.customerProvidedKey,this.isHttps),gT.withSpan(`PageBlobClient-uploadPagesFromURL`,i,async a=>mT(await this.pageBlobContext.uploadPagesFromURL(e,pE({offset:t,count:r}),0,pE({offset:n,count:r}),{abortSignal:i.abortSignal,sourceContentMD5:i.sourceContentMD5,sourceContentCrc64:i.sourceContentCrc64,leaseAccessConditions:i.conditions,sequenceNumberAccessConditions:i.conditions,modifiedAccessConditions:{...i.conditions,ifTags:i.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:i.sourceConditions?.ifMatch,sourceIfModifiedSince:i.sourceConditions?.ifModifiedSince,sourceIfNoneMatch:i.sourceConditions?.ifNoneMatch,sourceIfUnmodifiedSince:i.sourceConditions?.ifUnmodifiedSince},cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,copySourceAuthorization:fT(i.sourceAuthorization),fileRequestIntent:i.sourceShareTokenIntent,tracingOptions:a.tracingOptions})))}async clearPages(e=0,t,n={}){return n.conditions=n.conditions||{},gT.withSpan(`PageBlobClient-clearPages`,n,async r=>mT(await this.pageBlobContext.clearPages(0,{abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},range:pE({offset:e,count:t}),sequenceNumberAccessConditions:n.conditions,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,tracingOptions:r.tracingOptions})))}async getPageRanges(e=0,t,n={}){return n.conditions=n.conditions||{},gT.withSpan(`PageBlobClient-getPageRanges`,n,async r=>iE(mT(await this.pageBlobContext.getPageRanges({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},range:pE({offset:e,count:t}),tracingOptions:r.tracingOptions}))))}async listPageRangesSegment(e=0,t,n,r={}){return gT.withSpan(`PageBlobClient-getPageRangesSegment`,r,async i=>mT(await this.pageBlobContext.getPageRanges({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},range:pE({offset:e,count:t}),marker:n,maxPageSize:r.maxPageSize,tracingOptions:i.tracingOptions})))}async*listPageRangeItemSegments(e=0,t,n,r={}){let i;if(n||n===void 0)do i=await this.listPageRangesSegment(e,t,n,r),n=i.continuationToken,yield await i;while(n)}async*listPageRangeItems(e=0,t,n={}){for await(let r of this.listPageRangeItemSegments(e,t,void 0,n))yield*pT(r)}listPageRanges(e=0,t,n={}){n.conditions=n.conditions||{};let r=this.listPageRangeItems(e,t,n);return{next(){return r.next()},[Symbol.asyncIterator](){return this},byPage:(r={})=>this.listPageRangeItemSegments(e,t,r.continuationToken,{maxPageSize:r.maxPageSize,...n})}}async getPageRangesDiff(e,t,n,r={}){return r.conditions=r.conditions||{},gT.withSpan(`PageBlobClient-getPageRangesDiff`,r,async i=>iE(mT(await this.pageBlobContext.getPageRangesDiff({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},prevsnapshot:n,range:pE({offset:e,count:t}),tracingOptions:i.tracingOptions}))))}async listPageRangesDiffSegment(e,t,n,r,i={}){return gT.withSpan(`PageBlobClient-getPageRangesDiffSegment`,i,async a=>mT(await this.pageBlobContext.getPageRangesDiff({abortSignal:i?.abortSignal,leaseAccessConditions:i?.conditions,modifiedAccessConditions:{...i?.conditions,ifTags:i?.conditions?.tagConditions},prevsnapshot:n,range:pE({offset:e,count:t}),marker:r,maxPageSize:i?.maxPageSize,tracingOptions:a.tracingOptions})))}async*listPageRangeDiffItemSegments(e,t,n,r,i){let a;if(r||r===void 0)do a=await this.listPageRangesDiffSegment(e,t,n,r,i),r=a.continuationToken,yield await a;while(r)}async*listPageRangeDiffItems(e,t,n,r){for await(let i of this.listPageRangeDiffItemSegments(e,t,n,void 0,r))yield*pT(i)}listPageRangesDiff(e,t,n,r={}){r.conditions=r.conditions||{};let i=this.listPageRangeDiffItems(e,t,n,{...r});return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(i={})=>this.listPageRangeDiffItemSegments(e,t,n,i.continuationToken,{maxPageSize:i.maxPageSize,...r})}}async getPageRangesDiffForManagedDisks(e,t,n,r={}){return r.conditions=r.conditions||{},gT.withSpan(`PageBlobClient-GetPageRangesDiffForManagedDisks`,r,async i=>iE(mT(await this.pageBlobContext.getPageRangesDiff({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},prevSnapshotUrl:n,range:pE({offset:e,count:t}),tracingOptions:i.tracingOptions}))))}async resize(e,t={}){return t.conditions=t.conditions||{},gT.withSpan(`PageBlobClient-resize`,t,async n=>mT(await this.pageBlobContext.resize(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},encryptionScope:t.encryptionScope,tracingOptions:n.tracingOptions})))}async updateSequenceNumber(e,t,n={}){return n.conditions=n.conditions||{},gT.withSpan(`PageBlobClient-updateSequenceNumber`,n,async r=>mT(await this.pageBlobContext.updateSequenceNumber(e,{abortSignal:n.abortSignal,blobSequenceNumber:t,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},tracingOptions:r.tracingOptions})))}async startCopyIncremental(e,t={}){return gT.withSpan(`PageBlobClient-startCopyIncremental`,t,async n=>mT(await this.pageBlobContext.copyIncremental(e,{abortSignal:t.abortSignal,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},tracingOptions:n.tracingOptions})))}},wE=class extends Error{constructor(e){super(e),this.name=`InvalidResponseError`}},TE=class extends Error{constructor(e){let t=`Unable to make request: ${e}\nIf 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(t),this.code=e,this.name=`NetworkError`}};TE.isNetworkErrorCode=e=>e?[`ECONNRESET`,`ENOTFOUND`,`ETIMEDOUT`,`ECONNREFUSED`,`EHOSTUNREACH`].includes(e):!1;var EE=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`}};EE.isUsageErrorMessage=e=>e?e.includes(`insufficient usage`):!1;var DE=class extends Error{constructor(e){super(e),this.name=`RateLimitError`}},OE=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},kE=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,t=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,r=(e/(1024*1024)/(n/1e3)).toFixed(1);gi(`Sent ${e} of ${this.contentLength} (${t}%), ${r} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let t=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(t,e))};this.timeoutHandle=setTimeout(t,e)}stopDisplayTimer(){this.timeoutHandle&&=(clearTimeout(this.timeoutHandle),void 0),this.display()}};function AE(e,t,n){return OE(this,void 0,void 0,function*(){let r=new bE(e),i=r.getBlockBlobClient(),a=new kE(n?.archiveSizeBytes??0),o={blockSize:n?.uploadChunkSize,concurrency:n?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),K(`BlobClient: ${r.name}:${r.accountName}:${r.containerName}`);let e=yield i.uploadFile(t,o);if(e._response.status>=400)throw new wE(`uploadCacheArchiveSDK: upload failed with status code ${e._response.status}`);return e}catch(e){throw hi(`uploadCacheArchiveSDK: internal error uploading cache archive: ${e.message}`),e}finally{a.stopDisplayTimer()}})}var jE=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function ME(e){return e?e>=200&&e<300:!1}function NE(e){return e?e>=500:!0}function PE(e){return e?[ar.BadGateway,ar.ServiceUnavailable,ar.GatewayTimeout].includes(e):!1}function FE(e){return jE(this,void 0,void 0,function*(){return new Promise(t=>setTimeout(t,e))})}function IE(e,t,n){return jE(this,arguments,void 0,function*(e,t,n,r=2,i=xc,a=void 0){let o=``,s=1;for(;s<=r;){let c,l,u=!1;try{c=yield t()}catch(e){a&&(c=a(e)),u=!0,o=e.message}if(c&&(l=n(c),!NE(l)))return c;if(l&&(u=PE(l),o=`Cache service responded with ${l}`),K(`${e} - Attempt ${s} of ${r} failed with error: ${o}`),!u){K(`${e} - Error is not retryable`);break}yield FE(i),s++}throw Error(`${e} failed: ${o}`)})}function LE(e,t){return jE(this,arguments,void 0,function*(e,t,n=2,r=xc){return yield IE(e,t,e=>e.statusCode,n,r,e=>{if(e instanceof dr)return{statusCode:e.statusCode,result:null,headers:{},error:e}})})}function RE(e,t){return jE(this,arguments,void 0,function*(e,t,n=2,r=xc){return yield IE(e,t,e=>e.message.statusCode,n,r)})}var zE=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function BE(e,t){return zE(this,void 0,void 0,function*(){yield Ee.promisify(Ue.pipeline)(e.message,t)})}var VE=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.segmentSize,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,t=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,r=(e/(1024*1024)/(n/1e3)).toFixed(1);gi(`Received ${e} of ${this.contentLength} (${t}%), ${r} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let t=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(t,e))};this.timeoutHandle=setTimeout(t,e)}stopDisplayTimer(){this.timeoutHandle&&=(clearTimeout(this.timeoutHandle),void 0),this.display()}};function HE(e,t){return zE(this,void 0,void 0,function*(){let n=fe.createWriteStream(t),r=new pr(`actions/cache`),i=yield RE(`downloadCache`,()=>zE(this,void 0,void 0,function*(){return r.get(e)}));i.message.socket.setTimeout(Sc,()=>{i.message.destroy(),K(`Aborting download, socket timed out after ${Sc} ms`)}),yield BE(i,n);let a=i.message.headers[`content-length`];if(a){let e=parseInt(a),n=Ac(t);if(n!==e)throw Error(`Incomplete download. Expected file size: ${e}, actual file size: ${n}`)}else K(`Unable to validate download, no Content-Length header`)})}function UE(e,t,n){return zE(this,void 0,void 0,function*(){let r=yield fe.promises.open(t,`w`),i=new pr(`actions/cache`,void 0,{socketTimeout:n.timeoutInMs,keepAlive:!0});try{let t=(yield RE(`downloadCacheMetadata`,()=>zE(this,void 0,void 0,function*(){return yield i.request(`HEAD`,e,null,{})}))).message.headers[`content-length`];if(t==null)throw Error(`Content-Length not found on blob response`);let a=parseInt(t);if(Number.isNaN(a))throw Error(`Could not interpret Content-Length: ${a}`);let o=[],s=4*1024*1024;for(let t=0;tzE(this,void 0,void 0,function*(){return yield WE(i,e,t,n)})})}o.reverse();let c=0,l=0,u=new VE(a);u.startDisplayTimer();let d=u.onProgress(),f=[],p,m=()=>zE(this,void 0,void 0,function*(){let e=yield Promise.race(Object.values(f));yield r.write(e.buffer,0,e.count,e.offset),c--,delete f[e.offset],l+=e.count,d({loadedBytes:l})});for(;p=o.pop();)f[p.offset]=p.promiseGetter(),c++,c>=(n.downloadConcurrency??10)&&(yield m());for(;c>0;)yield m()}finally{i.dispose(),yield r.close()}})}function WE(e,t,n,r){return zE(this,void 0,void 0,function*(){let i=0;for(;;)try{let i=yield qE(3e4,GE(e,t,n,r));if(typeof i==`string`)throw Error(`downloadSegmentRetry failed due to timeout`);return i}catch(e){if(i>=5)throw e;i++}})}function GE(e,t,n,r){return zE(this,void 0,void 0,function*(){let i=yield RE(`downloadCachePart`,()=>zE(this,void 0,void 0,function*(){return yield e.get(t,{Range:`bytes=${n}-${n+r-1}`})}));if(!i.readBodyBuffer)throw Error(`Expected HttpClientResponse to implement readBodyBuffer`);return{offset:n,count:r,buffer:yield i.readBodyBuffer()}})}function KE(e,t,n){return zE(this,void 0,void 0,function*(){let r=new SE(e,void 0,{retryOptions:{tryTimeoutInMs:n.timeoutInMs}}),i=(yield r.getProperties()).contentLength??-1;if(i<0)K(`Unable to determine content length, downloading file with http-client...`),yield HE(e,t);else{let e=Math.min(134217728,qe.constants.MAX_LENGTH),a=new VE(i),o=fe.openSync(t,`w`);try{a.startDisplayTimer();let t=new AbortController,s=t.signal;for(;!a.isDone();){let c=a.segmentOffset+a.segmentSize,l=Math.min(e,i-c);a.nextSegment(l);let u=yield qE(n.segmentTimeoutInMs||36e5,r.downloadToBuffer(c,l,{abortSignal:s,concurrency:n.downloadConcurrency,onProgress:a.onProgress()}));if(u===`timeout`)throw t.abort(),Error(`Aborting cache download as the download time exceeded the timeout.`);Buffer.isBuffer(u)&&fe.writeFileSync(o,u)}}finally{a.stopDisplayTimer(),fe.closeSync(o)}}})}const qE=(e,t)=>zE(void 0,void 0,void 0,function*(){let n,r=new Promise(t=>{n=setTimeout(()=>t(`timeout`),e)});return Promise.race([t,r]).then(e=>(clearTimeout(n),e))});function JE(e){let t={useAzureSdk:!1,uploadConcurrency:4,uploadChunkSize:32*1024*1024};return e&&(typeof e.useAzureSdk==`boolean`&&(t.useAzureSdk=e.useAzureSdk),typeof e.uploadConcurrency==`number`&&(t.uploadConcurrency=e.uploadConcurrency),typeof e.uploadChunkSize==`number`&&(t.uploadChunkSize=e.uploadChunkSize)),t.uploadConcurrency=isNaN(Number(process.env.CACHE_UPLOAD_CONCURRENCY))?t.uploadConcurrency:Math.min(32,Number(process.env.CACHE_UPLOAD_CONCURRENCY)),t.uploadChunkSize=isNaN(Number(process.env.CACHE_UPLOAD_CHUNK_SIZE))?t.uploadChunkSize:Math.min(128*1024*1024,Number(process.env.CACHE_UPLOAD_CHUNK_SIZE)*1024*1024),K(`Use Azure SDK: ${t.useAzureSdk}`),K(`Upload concurrency: ${t.uploadConcurrency}`),K(`Upload chunk size: ${t.uploadChunkSize}`),t}function YE(e){let t={useAzureSdk:!1,concurrentBlobDownloads:!0,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:6e5,lookupOnly:!1};e&&(typeof e.useAzureSdk==`boolean`&&(t.useAzureSdk=e.useAzureSdk),typeof e.concurrentBlobDownloads==`boolean`&&(t.concurrentBlobDownloads=e.concurrentBlobDownloads),typeof e.downloadConcurrency==`number`&&(t.downloadConcurrency=e.downloadConcurrency),typeof e.timeoutInMs==`number`&&(t.timeoutInMs=e.timeoutInMs),typeof e.segmentTimeoutInMs==`number`&&(t.segmentTimeoutInMs=e.segmentTimeoutInMs),typeof e.lookupOnly==`boolean`&&(t.lookupOnly=e.lookupOnly));let n=process.env.SEGMENT_DOWNLOAD_TIMEOUT_MINS;return n&&!isNaN(Number(n))&&isFinite(Number(n))&&(t.segmentTimeoutInMs=Number(n)*60*1e3),K(`Use Azure SDK: ${t.useAzureSdk}`),K(`Download concurrency: ${t.downloadConcurrency}`),K(`Request timeout (ms): ${t.timeoutInMs}`),K(`Cache segment download timeout mins env var: ${process.env.SEGMENT_DOWNLOAD_TIMEOUT_MINS}`),K(`Segment download timeout (ms): ${t.segmentTimeoutInMs}`),K(`Lookup only: ${t.lookupOnly}`),t}function XE(){let e=new URL(process.env.GITHUB_SERVER_URL||`https://github.com`).hostname.trimEnd().toUpperCase(),t=e===`GITHUB.COM`,n=e.endsWith(`.GHE.COM`),r=e.endsWith(`.LOCALHOST`);return!t&&!n&&!r}function ZE(){return XE()?`v1`:process.env.ACTIONS_CACHE_SERVICE_V2?`v2`:`v1`}function QE(){let e=ZE();switch(e){case`v1`:return process.env.ACTIONS_CACHE_URL||process.env.ACTIONS_RESULTS_URL||``;case`v2`:return process.env.ACTIONS_RESULTS_URL||``;default:throw Error(`Unsupported cache service version: ${e}`)}}var $E=i(((e,t)=>{t.exports={name:`@actions/cache`,version:`6.0.0`,description:`Actions cache lib`,keywords:[`github`,`actions`,`cache`],homepage:`https://github.com/actions/toolkit/tree/main/packages/cache`,license:`MIT`,type:`module`,main:`lib/cache.js`,types:`lib/cache.d.ts`,exports:{".":{types:`./lib/cache.d.ts`,import:`./lib/cache.js`}},directories:{lib:`lib`,test:`__tests__`},files:[`lib`,`!.DS_Store`],publishConfig:{access:`public`},repository:{type:`git`,url:`git+https://github.com/actions/toolkit.git`,directory:`packages/cache`},scripts:{"audit-moderate":`npm install && npm audit --json --audit-level=moderate > audit.json`,test:`echo "Error: run tests from root" && exit 1`,tsc:`tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/`},bugs:{url:`https://github.com/actions/toolkit/issues`},dependencies:{"@actions/core":`^3.0.0`,"@actions/exec":`^3.0.0`,"@actions/glob":`^0.6.1`,"@actions/http-client":`^4.0.0`,"@actions/io":`^3.0.0`,"@azure/core-rest-pipeline":`^1.22.0`,"@azure/storage-blob":`^12.30.0`,"@protobuf-ts/runtime-rpc":`^2.11.1`,semver:`^7.7.3`},devDependencies:{"@protobuf-ts/plugin":`^2.9.4`,"@types/node":`^25.1.0`,"@types/semver":`^7.7.1`,typescript:`^5.2.2`},overrides:{"uri-js":`npm:uri-js-replace@^1.0.1`,"node-fetch":`^3.3.2`}}})),eD=i(((e,t)=>{t.exports={version:$E().version}}))();function tD(){return`@actions/cache-${eD.version}`}var nD=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function rD(e){let t=QE();if(!t)throw Error(`Cache Service Url not found, unable to restore cache.`);let n=`${t}_apis/artifactcache/${e}`;return K(`Resource Url: ${n}`),n}function iD(e,t){return`${e};api-version=${t}`}function aD(){return{headers:{Accept:iD(`application/json`,`6.0-preview.1`)}}}function oD(){let e=new gr(process.env.ACTIONS_RUNTIME_TOKEN||``);return new pr(tD(),[e],aD())}function sD(e,t,n){return nD(this,void 0,void 0,function*(){let r=oD(),i=Rc(t,n?.compressionMethod,n?.enableCrossOsArchive),a=`cache?keys=${encodeURIComponent(e.join(`,`))}&version=${i}`,o=yield LE(`getCacheEntry`,()=>nD(this,void 0,void 0,function*(){return r.getJson(rD(a))}));if(o.statusCode===204)return pi()&&(yield cD(e[0],r,i)),null;if(!ME(o.statusCode))throw Error(`Cache service responded with ${o.statusCode}`);let s=o.result,c=s?.archiveLocation;if(!c)throw Error(`Cache not found.`);return ci(c),K(`Cache Result:`),K(JSON.stringify(s)),s})}function cD(e,t,n){return nD(this,void 0,void 0,function*(){let r=`caches?key=${encodeURIComponent(e)}`,i=yield LE(`listCache`,()=>nD(this,void 0,void 0,function*(){return t.getJson(rD(r))}));if(i.statusCode===200){let t=i.result,r=t?.totalCount;if(r&&r>0){K(`No matching cache found for cache key '${e}', version '${n} and scope ${process.env.GITHUB_REF}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`);for(let e of t?.artifactCaches||[])K(`Cache Key: ${e?.cacheKey}, Cache Version: ${e?.cacheVersion}, Cache Scope: ${e?.scope}, Cache Created: ${e?.creationTime}`)}}})}function lD(e,t,n){return nD(this,void 0,void 0,function*(){let r=new Ge(e),i=YE(n);r.hostname.endsWith(`.blob.core.windows.net`)?i.useAzureSdk?yield KE(e,t,i):i.concurrentBlobDownloads?yield UE(e,t,i):yield HE(e,t):yield HE(e,t)})}function uD(e,t,n){return nD(this,void 0,void 0,function*(){let r=oD(),i={key:e,version:Rc(t,n?.compressionMethod,n?.enableCrossOsArchive),cacheSize:n?.cacheSize};return yield LE(`reserveCache`,()=>nD(this,void 0,void 0,function*(){return r.postJson(rD(`caches`),i)}))})}function dD(e,t){return`bytes ${e}-${t}/*`}function fD(e,t,n,r,i){return nD(this,void 0,void 0,function*(){K(`Uploading chunk of size ${i-r+1} bytes at offset ${r} with content range: ${dD(r,i)}`);let a={"Content-Type":`application/octet-stream`,"Content-Range":dD(r,i)},o=yield RE(`uploadChunk (start: ${r}, end: ${i})`,()=>nD(this,void 0,void 0,function*(){return e.sendStream(`PATCH`,t,n(),a)}));if(!ME(o.message.statusCode))throw Error(`Cache service responded with ${o.message.statusCode} during upload chunk.`)})}function pD(e,t,n,r){return nD(this,void 0,void 0,function*(){let i=Ac(n),a=rD(`caches/${t.toString()}`),o=fe.openSync(n,`r`),s=JE(r),c=Lc(`uploadConcurrency`,s.uploadConcurrency),l=Lc(`uploadChunkSize`,s.uploadChunkSize),u=[...Array(c).keys()];K(`Awaiting all uploads`);let d=0;try{yield Promise.all(u.map(()=>nD(this,void 0,void 0,function*(){for(;dfe.createReadStream(n,{fd:o,start:r,end:s,autoClose:!1}).on(`error`,e=>{throw Error(`Cache upload failed because file read failed with ${e.message}`)}),r,s)}})))}finally{fe.closeSync(o)}})}function mD(e,t,n){return nD(this,void 0,void 0,function*(){let r={size:n};return yield LE(`commitCache`,()=>nD(this,void 0,void 0,function*(){return e.postJson(rD(`caches/${t.toString()}`),r)}))})}function hD(e,t,n,r){return nD(this,void 0,void 0,function*(){if(JE(r).useAzureSdk){if(!n)throw Error(`Azure Storage SDK can only be used when a signed URL is provided.`);yield AE(n,t,r)}else{let n=oD();K(`Upload cache`),yield pD(n,e,t,r),K(`Commiting cache`);let i=Ac(t);gi(`Cache Size: ~${Math.round(i/(1024*1024))} MB (${i} B)`);let a=yield mD(n,e,i);if(!ME(a.statusCode))throw Error(`Cache service responded with ${a.statusCode} during commit cache.`);gi(`Cache saved successfully`)}})}var gD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isJsonObject=e.typeofJsonValue=void 0;function t(e){let t=typeof e;if(t==`object`){if(Array.isArray(e))return`array`;if(e===null)return`null`}return t}e.typeofJsonValue=t;function n(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}e.isJsonObject=n})),_D=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.base64encode=e.base64decode=void 0;let t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),n=[];for(let e=0;e>4,s=o,a=2;break;case 2:r[i++]=(s&15)<<4|(o&60)>>2,s=o,a=3;break;case 3:r[i++]=(s&3)<<6|o,a=0;break}}if(a==1)throw Error(`invalid base64 string.`);return r.subarray(0,i)}e.base64decode=r;function i(e){let n=``,r=0,i,a=0;for(let o=0;o>2],a=(i&3)<<4,r=1;break;case 1:n+=t[a|i>>4],a=(i&15)<<2,r=2;break;case 2:n+=t[a|i>>6],n+=t[i&63],r=0;break}return r&&(n+=t[a],n+=`=`,r==1&&(n+=`=`)),n}e.base64encode=i})),vD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.utf8read=void 0;let t=e=>String.fromCharCode.apply(String,e);function n(e){if(e.length<1)return``;let n=0,r=[],i=[],a=0,o,s=e.length;for(;n191&&o<224?i[a++]=(o&31)<<6|e[n++]&63:o>239&&o<365?(o=((o&7)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,i[a++]=55296+(o>>10),i[a++]=56320+(o&1023)):i[a++]=(o&15)<<12|(e[n++]&63)<<6|e[n++]&63,a>8191&&(r.push(t(i)),a=0);return r.length?(a&&r.push(t(i.slice(0,a))),r.join(``)):t(i.slice(0,a))}e.utf8read=n})),yD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WireType=e.mergeBinaryOptions=e.UnknownFieldHandler=void 0,(function(e){e.symbol=Symbol.for(`protobuf-ts/unknown`),e.onRead=(n,r,i,a,o)=>{(t(r)?r[e.symbol]:r[e.symbol]=[]).push({no:i,wireType:a,data:o})},e.onWrite=(t,n,r)=>{for(let{no:t,wireType:i,data:a}of e.list(n))r.tag(t,i).raw(a)},e.list=(n,r)=>{if(t(n)){let t=n[e.symbol];return r?t.filter(e=>e.no==r):t}return[]},e.last=(t,n)=>e.list(t,n).slice(-1)[0];let t=t=>t&&Array.isArray(t[e.symbol])})(e.UnknownFieldHandler||={});function t(e,t){return Object.assign(Object.assign({},e),t)}e.mergeBinaryOptions=t,(function(e){e[e.Varint=0]=`Varint`,e[e.Bit64=1]=`Bit64`,e[e.LengthDelimited=2]=`LengthDelimited`,e[e.StartGroup=3]=`StartGroup`,e[e.EndGroup=4]=`EndGroup`,e[e.Bit32=5]=`Bit32`})(e.WireType||={})})),bD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.varint32read=e.varint32write=e.int64toString=e.int64fromString=e.varint64write=e.varint64read=void 0;function t(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(r&127)<>4,!(n&128))return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(r&127)<>>r,a=!(!(i>>>7)&&t==0),o=(a?i|128:i)&255;if(n.push(o),!a)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=!!(r>>>7),a=(i?r|128:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}e.varint64write=n;let r=65536*65536;function i(e){let t=e[0]==`-`;t&&(e=e.slice(1));let n=1e6,i=0,a=0;function o(t,o){let s=Number(e.slice(t,o));a*=n,i=i*n+s,i>=r&&(a+=i/r|0,i%=r)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),[t,i,a]}e.int64fromString=i;function a(e,t){if(t>>>0<=2097151)return``+(r*t+(e>>>0));let n=e&16777215,i=(e>>>24|t<<8)>>>0&16777215,a=t>>16&65535,o=n+i*6777216+a*6710656,s=i+a*8147497,c=a*2,l=1e7;o>=l&&(s+=Math.floor(o/l),o%=l),s>=l&&(c+=Math.floor(s/l),s%=l);function u(e,t){let n=e?String(e):``;return t?`0000000`.slice(n.length)+n:n}return u(c,0)+u(s,c)+u(o,1)}e.int64toString=a;function o(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e>>=7;t.push(1)}}e.varint32write=o;function s(){let e=this.buf[this.pos++],t=e&127;if(!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}e.varint32read=s})),xD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PbLong=e.PbULong=e.detectBi=void 0;let t=bD(),n;function r(){let e=new DataView(new ArrayBuffer(8));n=globalThis.BigInt!==void 0&&typeof e.getBigInt64==`function`&&typeof e.getBigUint64==`function`&&typeof e.setBigInt64==`function`&&typeof e.setBigUint64==`function`?{MIN:BigInt(`-9223372036854775808`),MAX:BigInt(`9223372036854775807`),UMIN:BigInt(`0`),UMAX:BigInt(`18446744073709551615`),C:BigInt,V:e}:void 0}e.detectBi=r,r();function i(e){if(!e)throw Error(`BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support`)}let a=/^-?[0-9]+$/,o=4294967296,s=2147483648;var c=class{constructor(e,t){this.lo=e|0,this.hi=t|0}isZero(){return this.lo==0&&this.hi==0}toNumber(){let e=this.hi*o+(this.lo>>>0);if(!Number.isSafeInteger(e))throw Error(`cannot convert to safe number`);return e}},l=class e extends c{static from(r){if(n)switch(typeof r){case`string`:if(r==`0`)return this.ZERO;if(r==``)throw Error(`string is no integer`);r=n.C(r);case`number`:if(r===0)return this.ZERO;r=n.C(r);case`bigint`:if(!r)return this.ZERO;if(rn.UMAX)throw Error(`ulong too large`);return n.V.setBigUint64(0,r,!0),new e(n.V.getInt32(0,!0),n.V.getInt32(4,!0))}else switch(typeof r){case`string`:if(r==`0`)return this.ZERO;if(r=r.trim(),!a.test(r))throw Error(`string is no integer`);let[n,i,s]=t.int64fromString(r);if(n)throw Error(`signed value for ulong`);return new e(i,s);case`number`:if(r==0)return this.ZERO;if(!Number.isSafeInteger(r))throw Error(`number is no integer`);if(r<0)throw Error(`signed value for ulong`);return new e(r,r/o)}throw Error(`unknown value `+typeof r)}toString(){return n?this.toBigInt().toString():t.int64toString(this.lo,this.hi)}toBigInt(){return i(n),n.V.setInt32(0,this.lo,!0),n.V.setInt32(4,this.hi,!0),n.V.getBigUint64(0,!0)}};e.PbULong=l,l.ZERO=new l(0,0);var u=class e extends c{static from(r){if(n)switch(typeof r){case`string`:if(r==`0`)return this.ZERO;if(r==``)throw Error(`string is no integer`);r=n.C(r);case`number`:if(r===0)return this.ZERO;r=n.C(r);case`bigint`:if(!r)return this.ZERO;if(rn.MAX)throw Error(`signed long too large`);return n.V.setBigInt64(0,r,!0),new e(n.V.getInt32(0,!0),n.V.getInt32(4,!0))}else switch(typeof r){case`string`:if(r==`0`)return this.ZERO;if(r=r.trim(),!a.test(r))throw Error(`string is no integer`);let[n,i,c]=t.int64fromString(r);if(n){if(c>s||c==s&&i!=0)throw Error(`signed long too small`)}else if(c>=s)throw Error(`signed long too large`);let l=new e(i,c);return n?l.negate():l;case`number`:if(r==0)return this.ZERO;if(!Number.isSafeInteger(r))throw Error(`number is no integer`);return r>0?new e(r,r/o):new e(-r,-r/o).negate()}throw Error(`unknown value `+typeof r)}isNegative(){return(this.hi&s)!==0}negate(){let t=~this.hi,n=this.lo;return n?n=~n+1:t+=1,new e(n,t)}toString(){if(n)return this.toBigInt().toString();if(this.isNegative()){let e=this.negate();return`-`+t.int64toString(e.lo,e.hi)}return t.int64toString(this.lo,this.hi)}toBigInt(){return i(n),n.V.setInt32(0,this.lo,!0),n.V.setInt32(4,this.hi,!0),n.V.getBigInt64(0,!0)}};e.PbLong=u,u.ZERO=new u(0,0)})),SD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BinaryReader=e.binaryReadOptions=void 0;let t=yD(),n=xD(),r=bD(),i={readUnknownField:!0,readerFactory:e=>new o(e)};function a(e){return e?Object.assign(Object.assign({},i),e):i}e.binaryReadOptions=a;var o=class{constructor(e,t){this.varint64=r.varint64read,this.uint32=r.varint32read,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=t??new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0})}tag(){let e=this.uint32(),t=e>>>3,n=e&7;if(t<=0||n<0||n>5)throw Error(`illegal tag: field no `+t+` wire type `+n);return[t,n]}skip(e){let n=this.pos;switch(e){case t.WireType.Varint:for(;this.buf[this.pos++]&128;);break;case t.WireType.Bit64:this.pos+=4;case t.WireType.Bit32:this.pos+=4;break;case t.WireType.LengthDelimited:let n=this.uint32();this.pos+=n;break;case t.WireType.StartGroup:let r;for(;(r=this.tag()[1])!==t.WireType.EndGroup;)this.skip(r);break;default:throw Error(`cant skip wire type `+e)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return new n.PbLong(...this.varint64())}uint64(){return new n.PbULong(...this.varint64())}sint64(){let[e,t]=this.varint64(),r=-(e&1);return e=(e>>>1|(t&1)<<31)^r,t=t>>>1^r,new n.PbLong(e,t)}bool(){let[e,t]=this.varint64();return e!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return new n.PbULong(this.sfixed32(),this.sfixed32())}sfixed64(){return new n.PbLong(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}};e.BinaryReader=o})),CD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assertFloat32=e.assertUInt32=e.assertInt32=e.assertNever=e.assert=void 0;function t(e,t){if(!e)throw Error(t)}e.assert=t;function n(e,t){throw Error(t??`Unexpected object: `+e)}e.assertNever=n;function r(e){if(typeof e!=`number`)throw Error(`invalid int 32: `+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error(`invalid int 32: `+e)}e.assertInt32=r;function i(e){if(typeof e!=`number`)throw Error(`invalid uint 32: `+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error(`invalid uint 32: `+e)}e.assertUInt32=i;function a(e){if(typeof e!=`number`)throw Error(`invalid float 32: `+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error(`invalid float 32: `+e)}e.assertFloat32=a})),wD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BinaryWriter=e.binaryWriteOptions=void 0;let t=xD(),n=bD(),r=CD(),i={writeUnknownFields:!0,writerFactory:()=>new o};function a(e){return e?Object.assign(Object.assign({},i),e):i}e.binaryWriteOptions=a;var o=class{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(r.assertUInt32(e);e>127;)this.buf.push(e&127|128),e>>>=7;return this.buf.push(e),this}int32(e){return r.assertInt32(e),n.varint32write(e,this.buf),this}bool(e){return this.buf.push(+!!e),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){r.assertFloat32(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){r.assertUInt32(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){r.assertInt32(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return r.assertInt32(e),e=(e<<1^e>>31)>>>0,n.varint32write(e,this.buf),this}sfixed64(e){let n=new Uint8Array(8),r=new DataView(n.buffer),i=t.PbLong.from(e);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(e){let n=new Uint8Array(8),r=new DataView(n.buffer),i=t.PbULong.from(e);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(e){let r=t.PbLong.from(e);return n.varint64write(r.lo,r.hi,this.buf),this}sint64(e){let r=t.PbLong.from(e),i=r.hi>>31,a=r.lo<<1^i,o=(r.hi<<1|r.lo>>>31)^i;return n.varint64write(a,o,this.buf),this}uint64(e){let r=t.PbULong.from(e);return n.varint64write(r.lo,r.hi,this.buf),this}};e.BinaryWriter=o})),TD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.mergeJsonOptions=e.jsonWriteOptions=e.jsonReadOptions=void 0;let t={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},n={ignoreUnknownFields:!1};function r(e){return e?Object.assign(Object.assign({},n),e):n}e.jsonReadOptions=r;function i(e){return e?Object.assign(Object.assign({},t),e):t}e.jsonWriteOptions=i;function a(e,t){let n=Object.assign(Object.assign({},e),t);return n.typeRegistry=[...e?.typeRegistry??[],...t?.typeRegistry??[]],n}e.mergeJsonOptions=a})),ED=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MESSAGE_TYPE=void 0,e.MESSAGE_TYPE=Symbol.for(`protobuf-ts/message-type`)})),DD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.lowerCamelCase=void 0;function t(e){let t=!1,n=[];for(let r=0;r{Object.defineProperty(e,`__esModule`,{value:!0}),e.readMessageOption=e.readFieldOption=e.readFieldOptions=e.normalizeFieldInfo=e.RepeatType=e.LongType=e.ScalarType=void 0;let t=DD();(function(e){e[e.DOUBLE=1]=`DOUBLE`,e[e.FLOAT=2]=`FLOAT`,e[e.INT64=3]=`INT64`,e[e.UINT64=4]=`UINT64`,e[e.INT32=5]=`INT32`,e[e.FIXED64=6]=`FIXED64`,e[e.FIXED32=7]=`FIXED32`,e[e.BOOL=8]=`BOOL`,e[e.STRING=9]=`STRING`,e[e.BYTES=12]=`BYTES`,e[e.UINT32=13]=`UINT32`,e[e.SFIXED32=15]=`SFIXED32`,e[e.SFIXED64=16]=`SFIXED64`,e[e.SINT32=17]=`SINT32`,e[e.SINT64=18]=`SINT64`})(e.ScalarType||={}),(function(e){e[e.BIGINT=0]=`BIGINT`,e[e.STRING=1]=`STRING`,e[e.NUMBER=2]=`NUMBER`})(e.LongType||={});var n;(function(e){e[e.NO=0]=`NO`,e[e.PACKED=1]=`PACKED`,e[e.UNPACKED=2]=`UNPACKED`})(n=e.RepeatType||={});function r(e){return e.localName=e.localName??t.lowerCamelCase(e.name),e.jsonName=e.jsonName??t.lowerCamelCase(e.name),e.repeat=e.repeat??n.NO,e.opt=e.opt??(e.repeat||e.oneof?!1:e.kind==`message`),e}e.normalizeFieldInfo=r;function i(e,t,n,r){let i=e.fields.find((e,n)=>e.localName==t||n==t)?.options;return i&&i[n]?r.fromJson(i[n]):void 0}e.readFieldOptions=i;function a(e,t,n,r){let i=e.fields.find((e,n)=>e.localName==t||n==t)?.options;if(!i)return;let a=i[n];return a===void 0?a:r?r.fromJson(a):a}e.readFieldOption=a;function o(e,t,n){let r=e.options[t];return r===void 0?r:n?n.fromJson(r):r}e.readMessageOption=o})),kD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getSelectedOneofValue=e.clearOneofValue=e.setUnknownOneofValue=e.setOneofValue=e.getOneofValue=e.isOneofGroup=void 0;function t(e){if(typeof e!=`object`||!e||!e.hasOwnProperty(`oneofKind`))return!1;switch(typeof e.oneofKind){case`string`:return e[e.oneofKind]===void 0?!1:Object.keys(e).length==2;case`undefined`:return Object.keys(e).length==1;default:return!1}}e.isOneofGroup=t;function n(e,t){return e[t]}e.getOneofValue=n;function r(e,t,n){e.oneofKind!==void 0&&delete e[e.oneofKind],e.oneofKind=t,n!==void 0&&(e[t]=n)}e.setOneofValue=r;function i(e,t,n){e.oneofKind!==void 0&&delete e[e.oneofKind],e.oneofKind=t,n!==void 0&&t!==void 0&&(e[t]=n)}e.setUnknownOneofValue=i;function a(e){e.oneofKind!==void 0&&delete e[e.oneofKind],e.oneofKind=void 0}e.clearOneofValue=a;function o(e){if(e.oneofKind!==void 0)return e[e.oneofKind]}e.getSelectedOneofValue=o})),AD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReflectionTypeCheck=void 0;let t=OD(),n=kD();e.ReflectionTypeCheck=class{constructor(e){this.fields=e.fields??[]}prepare(){if(this.data)return;let e=[],t=[],n=[];for(let r of this.fields)if(r.oneof)n.includes(r.oneof)||(n.push(r.oneof),e.push(r.oneof),t.push(r.oneof));else switch(t.push(r.localName),r.kind){case`scalar`:case`enum`:(!r.opt||r.repeat)&&e.push(r.localName);break;case`message`:r.repeat&&e.push(r.localName);break;case`map`:e.push(r.localName);break}this.data={req:e,known:t,oneofs:Object.values(n)}}is(e,t,r=!1){if(t<0)return!0;if(typeof e!=`object`||!e)return!1;this.prepare();let i=Object.keys(e),a=this.data;if(i.length!i.includes(e))||!r&&i.some(e=>!a.known.includes(e)))return!1;if(t<1)return!0;for(let i of a.oneofs){let a=e[i];if(!n.isOneofGroup(a))return!1;if(a.oneofKind===void 0)continue;let o=this.fields.find(e=>e.localName===a.oneofKind);if(!o||!this.field(a[a.oneofKind],o,r,t))return!1}for(let n of this.fields)if(n.oneof===void 0&&!this.field(e[n.localName],n,r,t))return!1;return!0}field(e,n,r,i){let a=n.repeat;switch(n.kind){case`scalar`:return e===void 0?n.opt:a?this.scalars(e,n.T,i,n.L):this.scalar(e,n.T,n.L);case`enum`:return e===void 0?n.opt:a?this.scalars(e,t.ScalarType.INT32,i):this.scalar(e,t.ScalarType.INT32);case`message`:return e===void 0?!0:a?this.messages(e,n.T(),r,i):this.message(e,n.T(),r,i);case`map`:if(typeof e!=`object`||!e)return!1;if(i<2)return!0;if(!this.mapKeys(e,n.K,i))return!1;switch(n.V.kind){case`scalar`:return this.scalars(Object.values(e),n.V.T,i,n.V.L);case`enum`:return this.scalars(Object.values(e),t.ScalarType.INT32,i);case`message`:return this.messages(Object.values(e),n.V.T(),r,i)}break}return!0}message(e,t,n,r){return n?t.isAssignable(e,r):t.is(e,r)}messages(e,t,n,r){if(!Array.isArray(e))return!1;if(r<2)return!0;if(n){for(let n=0;nparseInt(e)),n,r);case t.ScalarType.BOOL:return this.scalars(i.slice(0,r).map(e=>e==`true`?!0:e==`false`?!1:e),n,r);default:return this.scalars(i,n,r,t.LongType.STRING)}}}})),jD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reflectionLongConvert=void 0;let t=OD();function n(e,n){switch(n){case t.LongType.BIGINT:return e.toBigInt();case t.LongType.NUMBER:return e.toNumber();default:return e.toString()}}e.reflectionLongConvert=n})),MD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReflectionJsonReader=void 0;let t=gD(),n=_D(),r=OD(),i=xD(),a=CD(),o=jD();e.ReflectionJsonReader=class{constructor(e){this.info=e}prepare(){if(this.fMap===void 0){this.fMap={};let e=this.info.fields??[];for(let t of e)this.fMap[t.name]=t,this.fMap[t.jsonName]=t,this.fMap[t.localName]=t}}assert(e,n,r){if(!e){let e=t.typeofJsonValue(r);throw(e==`number`||e==`boolean`)&&(e=r.toString()),Error(`Cannot parse JSON ${e} for ${this.info.typeName}#${n}`)}}read(e,n,i){this.prepare();let a=[];for(let[o,s]of Object.entries(e)){let e=this.fMap[o];if(!e){if(!i.ignoreUnknownFields)throw Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${o}`);continue}let c=e.localName,l;if(e.oneof){if(s===null&&(e.kind!==`enum`||e.T()[0]!==`google.protobuf.NullValue`))continue;if(a.includes(e.oneof))throw Error(`Multiple members of the oneof group "${e.oneof}" of ${this.info.typeName} are present in JSON.`);a.push(e.oneof),l=n[e.oneof]={oneofKind:c}}else l=n;if(e.kind==`map`){if(s===null)continue;this.assert(t.isJsonObject(s),e.name,s);let n=l[c];for(let[t,a]of Object.entries(s)){this.assert(a!==null,e.name+` map value`,null);let o;switch(e.V.kind){case`message`:o=e.V.T().internalJsonRead(a,i);break;case`enum`:if(o=this.enum(e.V.T(),a,e.name,i.ignoreUnknownFields),o===!1)continue;break;case`scalar`:o=this.scalar(a,e.V.T,e.V.L,e.name);break}this.assert(o!==void 0,e.name+` map value`,a);let s=t;e.K==r.ScalarType.BOOL&&(s=s==`true`?!0:s==`false`?!1:s),s=this.scalar(s,e.K,r.LongType.STRING,e.name).toString(),n[s]=o}}else if(e.repeat){if(s===null)continue;this.assert(Array.isArray(s),e.name,s);let t=l[c];for(let n of s){this.assert(n!==null,e.name,null);let r;switch(e.kind){case`message`:r=e.T().internalJsonRead(n,i);break;case`enum`:if(r=this.enum(e.T(),n,e.name,i.ignoreUnknownFields),r===!1)continue;break;case`scalar`:r=this.scalar(n,e.T,e.L,e.name);break}this.assert(r!==void 0,e.name,s),t.push(r)}}else switch(e.kind){case`message`:if(s===null&&e.T().typeName!=`google.protobuf.Value`){this.assert(e.oneof===void 0,e.name+` (oneof member)`,null);continue}l[c]=e.T().internalJsonRead(s,i,l[c]);break;case`enum`:if(s===null)continue;let t=this.enum(e.T(),s,e.name,i.ignoreUnknownFields);if(t===!1)continue;l[c]=t;break;case`scalar`:if(s===null)continue;l[c]=this.scalar(s,e.T,e.L,e.name);break}}}enum(e,t,n,r){if(e[0]==`google.protobuf.NullValue`&&a.assert(t===null||t===`NULL_VALUE`,`Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} only accepts null.`),t===null)return 0;switch(typeof t){case`number`:return a.assert(Number.isInteger(t),`Unable to parse field ${this.info.typeName}#${n}, enum can only be integral number, got ${t}.`),t;case`string`:let i=t;e[2]&&t.substring(0,e[2].length)===e[2]&&(i=t.substring(e[2].length));let o=e[1][i];return o===void 0&&r?!1:(a.assert(typeof o==`number`,`Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} has no value for "${t}".`),o)}a.assert(!1,`Unable to parse field ${this.info.typeName}#${n}, cannot parse enum value from ${typeof t}".`)}scalar(e,t,s,c){let l;try{switch(t){case r.ScalarType.DOUBLE:case r.ScalarType.FLOAT:if(e===null)return 0;if(e===`NaN`)return NaN;if(e===`Infinity`)return 1/0;if(e===`-Infinity`)return-1/0;if(e===``){l=`empty string`;break}if(typeof e==`string`&&e.trim().length!==e.length){l=`extra whitespace`;break}if(typeof e!=`string`&&typeof e!=`number`)break;let c=Number(e);if(Number.isNaN(c)){l=`not a number`;break}if(!Number.isFinite(c)){l=`too large or small`;break}return t==r.ScalarType.FLOAT&&a.assertFloat32(c),c;case r.ScalarType.INT32:case r.ScalarType.FIXED32:case r.ScalarType.SFIXED32:case r.ScalarType.SINT32:case r.ScalarType.UINT32:if(e===null)return 0;let u;if(typeof e==`number`?u=e:e===``?l=`empty string`:typeof e==`string`&&(e.trim().length===e.length?u=Number(e):l=`extra whitespace`),u===void 0)break;return t==r.ScalarType.UINT32?a.assertUInt32(u):a.assertInt32(u),u;case r.ScalarType.INT64:case r.ScalarType.SFIXED64:case r.ScalarType.SINT64:if(e===null)return o.reflectionLongConvert(i.PbLong.ZERO,s);if(typeof e!=`number`&&typeof e!=`string`)break;return o.reflectionLongConvert(i.PbLong.from(e),s);case r.ScalarType.FIXED64:case r.ScalarType.UINT64:if(e===null)return o.reflectionLongConvert(i.PbULong.ZERO,s);if(typeof e!=`number`&&typeof e!=`string`)break;return o.reflectionLongConvert(i.PbULong.from(e),s);case r.ScalarType.BOOL:if(e===null)return!1;if(typeof e!=`boolean`)break;return e;case r.ScalarType.STRING:if(e===null)return``;if(typeof e!=`string`){l=`extra whitespace`;break}return e;case r.ScalarType.BYTES:if(e===null||e===``)return new Uint8Array;if(typeof e!=`string`)break;return n.base64decode(e)}}catch(e){l=e.message}this.assert(!1,c+(l?` - `+l:``),e)}}})),ND=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReflectionJsonWriter=void 0;let t=_D(),n=xD(),r=OD(),i=CD();e.ReflectionJsonWriter=class{constructor(e){this.fields=e.fields??[]}write(e,t){let n={},r=e;for(let e of this.fields){if(!e.oneof){let i=this.field(e,r[e.localName],t);i!==void 0&&(n[t.useProtoFieldName?e.name:e.jsonName]=i);continue}let a=r[e.oneof];if(a.oneofKind!==e.localName)continue;let o=e.kind==`scalar`||e.kind==`enum`?Object.assign(Object.assign({},t),{emitDefaultValues:!0}):t,s=this.field(e,a[e.localName],o);i.assert(s!==void 0),n[t.useProtoFieldName?e.name:e.jsonName]=s}return n}field(e,t,n){let r;if(e.kind==`map`){i.assert(typeof t==`object`&&!!t);let a={};switch(e.V.kind){case`scalar`:for(let[n,r]of Object.entries(t)){let t=this.scalar(e.V.T,r,e.name,!1,!0);i.assert(t!==void 0),a[n.toString()]=t}break;case`message`:let r=e.V.T();for(let[o,s]of Object.entries(t)){let t=this.message(r,s,e.name,n);i.assert(t!==void 0),a[o.toString()]=t}break;case`enum`:let o=e.V.T();for(let[r,s]of Object.entries(t)){i.assert(s===void 0||typeof s==`number`);let t=this.enum(o,s,e.name,!1,!0,n.enumAsInteger);i.assert(t!==void 0),a[r.toString()]=t}break}(n.emitDefaultValues||Object.keys(a).length>0)&&(r=a)}else if(e.repeat){i.assert(Array.isArray(t));let a=[];switch(e.kind){case`scalar`:for(let n=0;n0||n.emitDefaultValues)&&(r=a)}else switch(e.kind){case`scalar`:r=this.scalar(e.T,t,e.name,e.opt,n.emitDefaultValues);break;case`enum`:r=this.enum(e.T(),t,e.name,e.opt,n.emitDefaultValues,n.enumAsInteger);break;case`message`:r=this.message(e.T(),t,e.name,n);break}return r}enum(e,t,n,r,a,o){if(e[0]==`google.protobuf.NullValue`)return!a&&!r?void 0:null;if(t===void 0){i.assert(r);return}if(!(t===0&&!a&&!r))return i.assert(typeof t==`number`),i.assert(Number.isInteger(t)),o||!e[1].hasOwnProperty(t)?t:e[2]?e[2]+e[1][t]:e[1][t]}message(e,t,n,r){return t===void 0?r.emitDefaultValues?null:void 0:e.internalJsonWrite(t,r)}scalar(e,a,o,s,c){if(a===void 0){i.assert(s);return}let l=c||s;switch(e){case r.ScalarType.INT32:case r.ScalarType.SFIXED32:case r.ScalarType.SINT32:return a===0?l?0:void 0:(i.assertInt32(a),a);case r.ScalarType.FIXED32:case r.ScalarType.UINT32:return a===0?l?0:void 0:(i.assertUInt32(a),a);case r.ScalarType.FLOAT:i.assertFloat32(a);case r.ScalarType.DOUBLE:return a===0?l?0:void 0:(i.assert(typeof a==`number`),Number.isNaN(a)?`NaN`:a===1/0?`Infinity`:a===-1/0?`-Infinity`:a);case r.ScalarType.STRING:return a===``?l?``:void 0:(i.assert(typeof a==`string`),a);case r.ScalarType.BOOL:return a===!1?l?!1:void 0:(i.assert(typeof a==`boolean`),a);case r.ScalarType.UINT64:case r.ScalarType.FIXED64:i.assert(typeof a==`number`||typeof a==`string`||typeof a==`bigint`);let e=n.PbULong.from(a);return e.isZero()&&!l?void 0:e.toString();case r.ScalarType.INT64:case r.ScalarType.SFIXED64:case r.ScalarType.SINT64:i.assert(typeof a==`number`||typeof a==`string`||typeof a==`bigint`);let o=n.PbLong.from(a);return o.isZero()&&!l?void 0:o.toString();case r.ScalarType.BYTES:return i.assert(a instanceof Uint8Array),a.byteLength?t.base64encode(a):l?``:void 0}}}})),PD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reflectionScalarDefault=void 0;let t=OD(),n=jD(),r=xD();function i(e,i=t.LongType.STRING){switch(e){case t.ScalarType.BOOL:return!1;case t.ScalarType.UINT64:case t.ScalarType.FIXED64:return n.reflectionLongConvert(r.PbULong.ZERO,i);case t.ScalarType.INT64:case t.ScalarType.SFIXED64:case t.ScalarType.SINT64:return n.reflectionLongConvert(r.PbLong.ZERO,i);case t.ScalarType.DOUBLE:case t.ScalarType.FLOAT:return 0;case t.ScalarType.BYTES:return new Uint8Array;case t.ScalarType.STRING:return``;default:return 0}}e.reflectionScalarDefault=i})),FD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReflectionBinaryReader=void 0;let t=yD(),n=OD(),r=jD(),i=PD();e.ReflectionBinaryReader=class{constructor(e){this.info=e}prepare(){if(!this.fieldNoToField){let e=this.info.fields??[];this.fieldNoToField=new Map(e.map(e=>[e.no,e]))}}read(e,r,i,a){this.prepare();let o=a===void 0?e.len:e.pos+a;for(;e.pos{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReflectionBinaryWriter=void 0;let t=yD(),n=OD(),r=CD(),i=xD();e.ReflectionBinaryWriter=class{constructor(e){this.info=e}prepare(){if(!this.fields){let e=this.info.fields?this.info.fields.concat():[];this.fields=e.sort((e,t)=>e.no-t.no)}}write(e,i,a){this.prepare();for(let t of this.fields){let o,s,c=t.repeat,l=t.localName;if(t.oneof){let n=e[t.oneof];if(n.oneofKind!==l)continue;o=n[l],s=!0}else o=e[l],s=!1;switch(t.kind){case`scalar`:case`enum`:let e=t.kind==`enum`?n.ScalarType.INT32:t.T;if(c)if(r.assert(Array.isArray(o)),c==n.RepeatType.PACKED)this.packed(i,e,t.no,o);else for(let n of o)this.scalar(i,e,t.no,n,!0);else o===void 0?r.assert(t.opt):this.scalar(i,e,t.no,o,s||t.opt);break;case`message`:if(c){r.assert(Array.isArray(o));for(let e of o)this.message(i,a,t.T(),t.no,e)}else this.message(i,a,t.T(),t.no,o);break;case`map`:r.assert(typeof o==`object`&&!!o);for(let[e,n]of Object.entries(o))this.mapEntry(i,a,t,e,n);break}}let o=a.writeUnknownFields;o!==!1&&(o===!0?t.UnknownFieldHandler.onWrite:o)(this.info.typeName,e,i)}mapEntry(e,i,a,o,s){e.tag(a.no,t.WireType.LengthDelimited),e.fork();let c=o;switch(a.K){case n.ScalarType.INT32:case n.ScalarType.FIXED32:case n.ScalarType.UINT32:case n.ScalarType.SFIXED32:case n.ScalarType.SINT32:c=Number.parseInt(o);break;case n.ScalarType.BOOL:r.assert(o==`true`||o==`false`),c=o==`true`;break}switch(this.scalar(e,a.K,1,c,!0),a.V.kind){case`scalar`:this.scalar(e,a.V.T,2,s,!0);break;case`enum`:this.scalar(e,n.ScalarType.INT32,2,s,!0);break;case`message`:this.message(e,i,a.V.T(),2,s);break}e.join()}message(e,n,r,i,a){a!==void 0&&(r.internalBinaryWrite(a,e.tag(i,t.WireType.LengthDelimited).fork(),n),e.join())}scalar(e,t,n,r,i){let[a,o,s]=this.scalarInfo(t,r);(!s||i)&&(e.tag(n,a),e[o](r))}packed(e,i,a,o){if(!o.length)return;r.assert(i!==n.ScalarType.BYTES&&i!==n.ScalarType.STRING),e.tag(a,t.WireType.LengthDelimited),e.fork();let[,s]=this.scalarInfo(i);for(let t=0;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.reflectionCreate=void 0;let t=PD(),n=ED();function r(e){let r=e.messagePrototype?Object.create(e.messagePrototype):Object.defineProperty({},n.MESSAGE_TYPE,{value:e});for(let n of e.fields){let e=n.localName;if(!n.opt)if(n.oneof)r[n.oneof]={oneofKind:void 0};else if(n.repeat)r[e]=[];else switch(n.kind){case`scalar`:r[e]=t.reflectionScalarDefault(n.T,n.L);break;case`enum`:r[e]=0;break;case`map`:r[e]={};break}}return r}e.reflectionCreate=r})),RD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reflectionMergePartial=void 0;function t(e,t,n){let r,i=n,a;for(let n of e.fields){let e=n.localName;if(n.oneof){let o=i[n.oneof];if(o?.oneofKind==null)continue;if(r=o[e],a=t[n.oneof],a.oneofKind=o.oneofKind,r==null){delete a[e];continue}}else if(r=i[e],a=t,r==null)continue;switch(n.repeat&&(a[e].length=r.length),n.kind){case`scalar`:case`enum`:if(n.repeat)for(let t=0;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.reflectionEquals=void 0;let t=OD();function n(e,n,s){if(n===s)return!0;if(!n||!s)return!1;for(let c of e.fields){let e=c.localName,l=c.oneof?n[c.oneof][e]:n[e],u=c.oneof?s[c.oneof][e]:s[e];switch(c.kind){case`enum`:case`scalar`:let e=c.kind==`enum`?t.ScalarType.INT32:c.T;if(!(c.repeat?a(e,l,u):i(e,l,u)))return!1;break;case`map`:if(!(c.V.kind==`message`?o(c.V.T(),r(l),r(u)):a(c.V.kind==`enum`?t.ScalarType.INT32:c.V.T,r(l),r(u))))return!1;break;case`message`:let n=c.T();if(!(c.repeat?o(n,l,u):n.equals(l,u)))return!1;break}}return!0}e.reflectionEquals=n;let r=Object.values;function i(e,n,r){if(n===r)return!0;if(e!==t.ScalarType.BYTES)return!1;let i=n,a=r;if(i.length!==a.length)return!1;for(let e=0;e{Object.defineProperty(e,`__esModule`,{value:!0}),e.MessageType=void 0;let t=ED(),n=OD(),r=AD(),i=MD(),a=ND(),o=FD(),s=ID(),c=LD(),l=RD(),u=gD(),d=TD(),f=zD(),p=wD(),m=SD(),h=Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})),g=h[t.MESSAGE_TYPE]={};e.MessageType=class{constructor(e,t,c){this.defaultCheckDepth=16,this.typeName=e,this.fields=t.map(n.normalizeFieldInfo),this.options=c??{},g.value=this,this.messagePrototype=Object.create(null,h),this.refTypeCheck=new r.ReflectionTypeCheck(this),this.refJsonReader=new i.ReflectionJsonReader(this),this.refJsonWriter=new a.ReflectionJsonWriter(this),this.refBinReader=new o.ReflectionBinaryReader(this),this.refBinWriter=new s.ReflectionBinaryWriter(this)}create(e){let t=c.reflectionCreate(this);return e!==void 0&&l.reflectionMergePartial(this,t,e),t}clone(e){let t=this.create();return l.reflectionMergePartial(this,t,e),t}equals(e,t){return f.reflectionEquals(this,e,t)}is(e,t=this.defaultCheckDepth){return this.refTypeCheck.is(e,t,!1)}isAssignable(e,t=this.defaultCheckDepth){return this.refTypeCheck.is(e,t,!0)}mergePartial(e,t){l.reflectionMergePartial(this,e,t)}fromBinary(e,t){let n=m.binaryReadOptions(t);return this.internalBinaryRead(n.readerFactory(e),e.byteLength,n)}fromJson(e,t){return this.internalJsonRead(e,d.jsonReadOptions(t))}fromJsonString(e,t){let n=JSON.parse(e);return this.fromJson(n,t)}toJson(e,t){return this.internalJsonWrite(e,d.jsonWriteOptions(t))}toJsonString(e,t){let n=this.toJson(e,t);return JSON.stringify(n,null,t?.prettySpaces??0)}toBinary(e,t){let n=p.binaryWriteOptions(t);return this.internalBinaryWrite(e,n.writerFactory(),n).finish()}internalJsonRead(e,t,n){if(typeof e==`object`&&e&&!Array.isArray(e)){let r=n??this.create();return this.refJsonReader.read(e,r,t),r}throw Error(`Unable to parse message ${this.typeName} from JSON ${u.typeofJsonValue(e)}.`)}internalJsonWrite(e,t){return this.refJsonWriter.write(e,t)}internalBinaryWrite(e,t,n){return this.refBinWriter.write(e,t,n),t}internalBinaryRead(e,t,n,r){let i=r??this.create();return this.refBinReader.read(e,i,n,t),i}}})),VD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.containsMessageType=void 0;let t=ED();function n(e){return e[t.MESSAGE_TYPE]!=null}e.containsMessageType=n})),HD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.listEnumNumbers=e.listEnumNames=e.listEnumValues=e.isEnumObject=void 0;function t(e){if(typeof e!=`object`||!e||!e.hasOwnProperty(0))return!1;for(let t of Object.keys(e)){let n=parseInt(t);if(Number.isNaN(n)){let n=e[t];if(n===void 0||typeof n!=`number`||e[n]===void 0)return!1}else{let t=e[n];if(t===void 0||e[t]!==n)return!1}}return!0}e.isEnumObject=t;function n(e){if(!t(e))throw Error(`not a typescript enum object`);let n=[];for(let[t,r]of Object.entries(e))typeof r==`number`&&n.push({name:t,number:r});return n}e.listEnumValues=n;function r(e){return n(e).map(e=>e.name)}e.listEnumNames=r;function i(e){return n(e).map(e=>e.number).filter((e,t,n)=>n.indexOf(e)==t)}e.listEnumNumbers=i})),UD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=gD();Object.defineProperty(e,`typeofJsonValue`,{enumerable:!0,get:function(){return t.typeofJsonValue}}),Object.defineProperty(e,`isJsonObject`,{enumerable:!0,get:function(){return t.isJsonObject}});var n=_D();Object.defineProperty(e,`base64decode`,{enumerable:!0,get:function(){return n.base64decode}}),Object.defineProperty(e,`base64encode`,{enumerable:!0,get:function(){return n.base64encode}});var r=vD();Object.defineProperty(e,`utf8read`,{enumerable:!0,get:function(){return r.utf8read}});var i=yD();Object.defineProperty(e,`WireType`,{enumerable:!0,get:function(){return i.WireType}}),Object.defineProperty(e,`mergeBinaryOptions`,{enumerable:!0,get:function(){return i.mergeBinaryOptions}}),Object.defineProperty(e,`UnknownFieldHandler`,{enumerable:!0,get:function(){return i.UnknownFieldHandler}});var a=SD();Object.defineProperty(e,`BinaryReader`,{enumerable:!0,get:function(){return a.BinaryReader}}),Object.defineProperty(e,`binaryReadOptions`,{enumerable:!0,get:function(){return a.binaryReadOptions}});var o=wD();Object.defineProperty(e,`BinaryWriter`,{enumerable:!0,get:function(){return o.BinaryWriter}}),Object.defineProperty(e,`binaryWriteOptions`,{enumerable:!0,get:function(){return o.binaryWriteOptions}});var s=xD();Object.defineProperty(e,`PbLong`,{enumerable:!0,get:function(){return s.PbLong}}),Object.defineProperty(e,`PbULong`,{enumerable:!0,get:function(){return s.PbULong}});var c=TD();Object.defineProperty(e,`jsonReadOptions`,{enumerable:!0,get:function(){return c.jsonReadOptions}}),Object.defineProperty(e,`jsonWriteOptions`,{enumerable:!0,get:function(){return c.jsonWriteOptions}}),Object.defineProperty(e,`mergeJsonOptions`,{enumerable:!0,get:function(){return c.mergeJsonOptions}});var l=ED();Object.defineProperty(e,`MESSAGE_TYPE`,{enumerable:!0,get:function(){return l.MESSAGE_TYPE}});var u=BD();Object.defineProperty(e,`MessageType`,{enumerable:!0,get:function(){return u.MessageType}});var d=OD();Object.defineProperty(e,`ScalarType`,{enumerable:!0,get:function(){return d.ScalarType}}),Object.defineProperty(e,`LongType`,{enumerable:!0,get:function(){return d.LongType}}),Object.defineProperty(e,`RepeatType`,{enumerable:!0,get:function(){return d.RepeatType}}),Object.defineProperty(e,`normalizeFieldInfo`,{enumerable:!0,get:function(){return d.normalizeFieldInfo}}),Object.defineProperty(e,`readFieldOptions`,{enumerable:!0,get:function(){return d.readFieldOptions}}),Object.defineProperty(e,`readFieldOption`,{enumerable:!0,get:function(){return d.readFieldOption}}),Object.defineProperty(e,`readMessageOption`,{enumerable:!0,get:function(){return d.readMessageOption}});var f=AD();Object.defineProperty(e,`ReflectionTypeCheck`,{enumerable:!0,get:function(){return f.ReflectionTypeCheck}});var p=LD();Object.defineProperty(e,`reflectionCreate`,{enumerable:!0,get:function(){return p.reflectionCreate}});var m=PD();Object.defineProperty(e,`reflectionScalarDefault`,{enumerable:!0,get:function(){return m.reflectionScalarDefault}});var h=RD();Object.defineProperty(e,`reflectionMergePartial`,{enumerable:!0,get:function(){return h.reflectionMergePartial}});var g=zD();Object.defineProperty(e,`reflectionEquals`,{enumerable:!0,get:function(){return g.reflectionEquals}});var v=FD();Object.defineProperty(e,`ReflectionBinaryReader`,{enumerable:!0,get:function(){return v.ReflectionBinaryReader}});var y=ID();Object.defineProperty(e,`ReflectionBinaryWriter`,{enumerable:!0,get:function(){return y.ReflectionBinaryWriter}});var b=MD();Object.defineProperty(e,`ReflectionJsonReader`,{enumerable:!0,get:function(){return b.ReflectionJsonReader}});var x=ND();Object.defineProperty(e,`ReflectionJsonWriter`,{enumerable:!0,get:function(){return x.ReflectionJsonWriter}});var S=VD();Object.defineProperty(e,`containsMessageType`,{enumerable:!0,get:function(){return S.containsMessageType}});var C=kD();Object.defineProperty(e,`isOneofGroup`,{enumerable:!0,get:function(){return C.isOneofGroup}}),Object.defineProperty(e,`setOneofValue`,{enumerable:!0,get:function(){return C.setOneofValue}}),Object.defineProperty(e,`getOneofValue`,{enumerable:!0,get:function(){return C.getOneofValue}}),Object.defineProperty(e,`clearOneofValue`,{enumerable:!0,get:function(){return C.clearOneofValue}}),Object.defineProperty(e,`getSelectedOneofValue`,{enumerable:!0,get:function(){return C.getSelectedOneofValue}});var w=HD();Object.defineProperty(e,`listEnumValues`,{enumerable:!0,get:function(){return w.listEnumValues}}),Object.defineProperty(e,`listEnumNames`,{enumerable:!0,get:function(){return w.listEnumNames}}),Object.defineProperty(e,`listEnumNumbers`,{enumerable:!0,get:function(){return w.listEnumNumbers}}),Object.defineProperty(e,`isEnumObject`,{enumerable:!0,get:function(){return w.isEnumObject}});var T=DD();Object.defineProperty(e,`lowerCamelCase`,{enumerable:!0,get:function(){return T.lowerCamelCase}});var E=CD();Object.defineProperty(e,`assert`,{enumerable:!0,get:function(){return E.assert}}),Object.defineProperty(e,`assertNever`,{enumerable:!0,get:function(){return E.assertNever}}),Object.defineProperty(e,`assertInt32`,{enumerable:!0,get:function(){return E.assertInt32}}),Object.defineProperty(e,`assertUInt32`,{enumerable:!0,get:function(){return E.assertUInt32}}),Object.defineProperty(e,`assertFloat32`,{enumerable:!0,get:function(){return E.assertFloat32}})})),WD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.readServiceOption=e.readMethodOption=e.readMethodOptions=e.normalizeMethodInfo=void 0;let t=UD();function n(e,n){let r=e;return r.service=n,r.localName=r.localName??t.lowerCamelCase(r.name),r.serverStreaming=!!r.serverStreaming,r.clientStreaming=!!r.clientStreaming,r.options=r.options??{},r.idempotency=r.idempotency??void 0,r}e.normalizeMethodInfo=n;function r(e,t,n,r){let i=e.methods.find((e,n)=>e.localName===t||n===t)?.options;return i&&i[n]?r.fromJson(i[n]):void 0}e.readMethodOptions=r;function i(e,t,n,r){let i=e.methods.find((e,n)=>e.localName===t||n===t)?.options;if(!i)return;let a=i[n];return a===void 0?a:r?r.fromJson(a):a}e.readMethodOption=i;function a(e,t,n){let r=e.options;if(!r)return;let i=r[t];return i===void 0?i:n?n.fromJson(i):i}e.readServiceOption=a})),GD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ServiceType=void 0;let t=WD();e.ServiceType=class{constructor(e,n,r){this.typeName=e,this.methods=n.map(e=>t.normalizeMethodInfo(e,this)),this.options=r??{}}}})),KD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RpcError=void 0,e.RpcError=class extends Error{constructor(e,t=`UNKNOWN`,n){super(e),this.name=`RpcError`,Object.setPrototypeOf(this,new.target.prototype),this.code=t,this.meta=n??{}}toString(){let e=[this.name+`: `+this.message];this.code&&(e.push(``),e.push(`Code: `+this.code)),this.serviceName&&this.methodName&&e.push(`Method: `+this.serviceName+`/`+this.methodName);let t=Object.entries(this.meta);if(t.length){e.push(``),e.push(`Meta:`);for(let[n,r]of t)e.push(` ${n}: ${r}`)}return e.join(` -`)}}})),qD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.mergeRpcOptions=void 0;let t=UD();function n(e,n){if(!n)return e;let i={};r(e,i),r(n,i);for(let a of Object.keys(n)){let o=n[a];switch(a){case`jsonOptions`:i.jsonOptions=t.mergeJsonOptions(e.jsonOptions,i.jsonOptions);break;case`binaryOptions`:i.binaryOptions=t.mergeBinaryOptions(e.binaryOptions,i.binaryOptions);break;case`meta`:i.meta={},r(e.meta,i.meta),r(n.meta,i.meta);break;case`interceptors`:i.interceptors=e.interceptors?e.interceptors.concat(o):o.concat();break}}return i}e.mergeRpcOptions=n;function r(e,t){if(!e)return;let n=t;for(let[t,r]of Object.entries(e))r instanceof Date?n[t]=new Date(r.getTime()):Array.isArray(r)?n[t]=r.concat():n[t]=r}})),JD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Deferred=e.DeferredState=void 0;var t;(function(e){e[e.PENDING=0]=`PENDING`,e[e.REJECTED=1]=`REJECTED`,e[e.RESOLVED=2]=`RESOLVED`})(t=e.DeferredState||={}),e.Deferred=class{constructor(e=!0){this._state=t.PENDING,this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t}),e&&this._promise.catch(e=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==t.PENDING)throw Error(`cannot resolve ${t[this.state].toLowerCase()}`);this._resolve(e),this._state=t.RESOLVED}reject(e){if(this.state!==t.PENDING)throw Error(`cannot reject ${t[this.state].toLowerCase()}`);this._reject(e),this._state=t.REJECTED}resolvePending(e){this._state===t.PENDING&&this.resolve(e)}rejectPending(e){this._state===t.PENDING&&this.reject(e)}}})),YD=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RpcOutputStreamController=void 0;let t=JD(),n=UD();e.RpcOutputStreamController=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,t){return t.push(e),()=>{let n=t.indexOf(e);n>=0&&t.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,t,r){n.assert(+!!e+ +!!t+ +!!r<=1,`only one emission at a time`),e&&this.notifyMessage(e),t&&this.notifyError(t),r&&this.notifyComplete()}notifyMessage(e){n.assert(!this.closed,`stream is closed`),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(t=>t(e)),this._lis.nxt.forEach(t=>t(e,void 0,!1))}notifyError(e){n.assert(!this.closed,`stream is closed`),this._closed=e,this.pushIt(e),this._lis.err.forEach(t=>t(e)),this._lis.nxt.forEach(t=>t(void 0,e,!1)),this.clearLis()}notifyComplete(){n.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;n.assert(e,`bad state`),n.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 t.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let i=r.p;n.assert(i.state==t.DeferredState.PENDING,`iterator contract broken`),`value`in e?i.resolve(e):i.reject(e),delete r.p}else r.q.push(e)}}})),XD=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.UnaryCall=void 0,e.UnaryCall=class{constructor(e,t,n,r,i,a,o){this.method=e,this.requestHeaders=t,this.request=n,this.headers=r,this.response=i,this.status=a,this.trailers=o}then(e,t){return this.promiseFinished().then(t=>e?Promise.resolve(e(t)):t,e=>t?Promise.resolve(t(e)):Promise.reject(e))}promiseFinished(){return t(this,void 0,void 0,function*(){let[e,t,n,r]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:t,status:n,trailers:r}})}}})),ZD=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.ServerStreamingCall=void 0,e.ServerStreamingCall=class{constructor(e,t,n,r,i,a,o){this.method=e,this.requestHeaders=t,this.request=n,this.headers=r,this.responses=i,this.status=a,this.trailers=o}then(e,t){return this.promiseFinished().then(t=>e?Promise.resolve(e(t)):t,e=>t?Promise.resolve(t(e)):Promise.reject(e))}promiseFinished(){return t(this,void 0,void 0,function*(){let[e,t,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,status:t,trailers:n}})}}})),QD=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.ClientStreamingCall=void 0,e.ClientStreamingCall=class{constructor(e,t,n,r,i,a,o){this.method=e,this.requestHeaders=t,this.requests=n,this.headers=r,this.response=i,this.status=a,this.trailers=o}then(e,t){return this.promiseFinished().then(t=>e?Promise.resolve(e(t)):t,e=>t?Promise.resolve(t(e)):Promise.reject(e))}promiseFinished(){return t(this,void 0,void 0,function*(){let[e,t,n,r]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,response:t,status:n,trailers:r}})}}})),$D=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.DuplexStreamingCall=void 0,e.DuplexStreamingCall=class{constructor(e,t,n,r,i,a,o){this.method=e,this.requestHeaders=t,this.requests=n,this.headers=r,this.responses=i,this.status=a,this.trailers=o}then(e,t){return this.promiseFinished().then(t=>e?Promise.resolve(e(t)):t,e=>t?Promise.resolve(t(e)):Promise.reject(e))}promiseFinished(){return t(this,void 0,void 0,function*(){let[e,t,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,status:t,trailers:n}})}}})),eO=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.TestTransport=void 0;let n=KD(),r=UD(),i=YD(),a=qD(),o=XD(),s=ZD(),c=QD(),l=$D();var u=class e{constructor(e){this.suppressUncaughtRejections=!0,this.headerDelay=10,this.responseDelay=50,this.betweenResponseDelay=10,this.afterResponseDelay=10,this.data=e??{}}get sentMessages(){return this.lastInput instanceof f?this.lastInput.sent:typeof this.lastInput==`object`?[this.lastInput.single]:[]}get sendComplete(){return this.lastInput instanceof f?this.lastInput.completed:typeof this.lastInput==`object`}promiseHeaders(){let t=this.data.headers??e.defaultHeaders;return t instanceof n.RpcError?Promise.reject(t):Promise.resolve(t)}promiseSingleResponse(e){if(this.data.response instanceof n.RpcError)return Promise.reject(this.data.response);let t;return Array.isArray(this.data.response)?(r.assert(this.data.response.length>0),t=this.data.response[0]):t=this.data.response===void 0?e.O.create():this.data.response,r.assert(e.O.is(t)),Promise.resolve(t)}streamResponses(e,i,a){return t(this,void 0,void 0,function*(){let t=[];if(this.data.response===void 0)t.push(e.O.create());else if(Array.isArray(this.data.response))for(let n of this.data.response)r.assert(e.O.is(n)),t.push(n);else this.data.response instanceof n.RpcError||(r.assert(e.O.is(this.data.response)),t.push(this.data.response));try{yield d(this.responseDelay,a)(void 0)}catch(e){i.notifyError(e);return}if(this.data.response instanceof n.RpcError){i.notifyError(this.data.response);return}for(let e of t){i.notifyMessage(e);try{yield d(this.betweenResponseDelay,a)(void 0)}catch(e){i.notifyError(e);return}}if(this.data.status instanceof n.RpcError){i.notifyError(this.data.status);return}if(this.data.trailers instanceof n.RpcError){i.notifyError(this.data.trailers);return}i.notifyComplete()})}promiseStatus(){let t=this.data.status??e.defaultStatus;return t instanceof n.RpcError?Promise.reject(t):Promise.resolve(t)}promiseTrailers(){let t=this.data.trailers??e.defaultTrailers;return t instanceof n.RpcError?Promise.reject(t):Promise.resolve(t)}maybeSuppressUncaught(...e){if(this.suppressUncaughtRejections)for(let t of e)t.catch(()=>{})}mergeOptions(e){return a.mergeRpcOptions({},e)}unary(e,t,n){let r=n.meta??{},i=this.promiseHeaders().then(d(this.headerDelay,n.abort)),a=i.catch(e=>{}).then(d(this.responseDelay,n.abort)).then(t=>this.promiseSingleResponse(e)),s=a.catch(e=>{}).then(d(this.afterResponseDelay,n.abort)).then(e=>this.promiseStatus()),c=a.catch(e=>{}).then(d(this.afterResponseDelay,n.abort)).then(e=>this.promiseTrailers());return this.maybeSuppressUncaught(s,c),this.lastInput={single:t},new o.UnaryCall(e,r,t,i,a,s,c)}serverStreaming(e,t,n){let r=n.meta??{},a=this.promiseHeaders().then(d(this.headerDelay,n.abort)),o=new i.RpcOutputStreamController,c=a.then(d(this.responseDelay,n.abort)).catch(()=>{}).then(()=>this.streamResponses(e,o,n.abort)).then(d(this.afterResponseDelay,n.abort)),l=c.then(()=>this.promiseStatus()),u=c.then(()=>this.promiseTrailers());return this.maybeSuppressUncaught(l,u),this.lastInput={single:t},new s.ServerStreamingCall(e,r,t,a,o,l,u)}clientStreaming(e,t){let n=t.meta??{},r=this.promiseHeaders().then(d(this.headerDelay,t.abort)),i=r.catch(e=>{}).then(d(this.responseDelay,t.abort)).then(t=>this.promiseSingleResponse(e)),a=i.catch(e=>{}).then(d(this.afterResponseDelay,t.abort)).then(e=>this.promiseStatus()),o=i.catch(e=>{}).then(d(this.afterResponseDelay,t.abort)).then(e=>this.promiseTrailers());return this.maybeSuppressUncaught(a,o),this.lastInput=new f(this.data,t.abort),new c.ClientStreamingCall(e,n,this.lastInput,r,i,a,o)}duplex(e,t){let n=t.meta??{},r=this.promiseHeaders().then(d(this.headerDelay,t.abort)),a=new i.RpcOutputStreamController,o=r.then(d(this.responseDelay,t.abort)).catch(()=>{}).then(()=>this.streamResponses(e,a,t.abort)).then(d(this.afterResponseDelay,t.abort)),s=o.then(()=>this.promiseStatus()),c=o.then(()=>this.promiseTrailers());return this.maybeSuppressUncaught(s,c),this.lastInput=new f(this.data,t.abort),new l.DuplexStreamingCall(e,n,this.lastInput,r,a,s,c)}};e.TestTransport=u,u.defaultHeaders={responseHeader:`test`},u.defaultStatus={code:`OK`,detail:`all good`},u.defaultTrailers={responseTrailer:`test`};function d(e,t){return r=>new Promise((i,a)=>{if(t?.aborted)a(new n.RpcError(`user cancel`,`CANCELLED`));else{let o=setTimeout(()=>i(r),e);t&&t.addEventListener(`abort`,e=>{clearTimeout(o),a(new n.RpcError(`user cancel`,`CANCELLED`))})}})}var f=class{constructor(e,t){this._completed=!1,this._sent=[],this.data=e,this.abort=t}get sent(){return this._sent}get completed(){return this._completed}send(e){if(this.data.inputMessage instanceof n.RpcError)return Promise.reject(this.data.inputMessage);let t=this.data.inputMessage===void 0?10:this.data.inputMessage;return Promise.resolve(void 0).then(()=>{this._sent.push(e)}).then(d(t,this.abort))}complete(){if(this.data.inputComplete instanceof n.RpcError)return Promise.reject(this.data.inputComplete);let e=this.data.inputComplete===void 0?10:this.data.inputComplete;return Promise.resolve(void 0).then(()=>{this._completed=!0}).then(d(e,this.abort))}}})),tO=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.stackDuplexStreamingInterceptors=e.stackClientStreamingInterceptors=e.stackServerStreamingInterceptors=e.stackUnaryInterceptors=e.stackIntercept=void 0;let t=UD();function n(e,n,r,i,a){if(e==`unary`){let e=(e,t,r)=>n.unary(e,t,r);for(let t of(i.interceptors??[]).filter(e=>e.interceptUnary).reverse()){let n=e;e=(e,r,i)=>t.interceptUnary(n,e,r,i)}return e(r,a,i)}if(e==`serverStreaming`){let e=(e,t,r)=>n.serverStreaming(e,t,r);for(let t of(i.interceptors??[]).filter(e=>e.interceptServerStreaming).reverse()){let n=e;e=(e,r,i)=>t.interceptServerStreaming(n,e,r,i)}return e(r,a,i)}if(e==`clientStreaming`){let e=(e,t)=>n.clientStreaming(e,t);for(let t of(i.interceptors??[]).filter(e=>e.interceptClientStreaming).reverse()){let n=e;e=(e,r)=>t.interceptClientStreaming(n,e,r)}return e(r,i)}if(e==`duplex`){let e=(e,t)=>n.duplex(e,t);for(let t of(i.interceptors??[]).filter(e=>e.interceptDuplex).reverse()){let n=e;e=(e,r)=>t.interceptDuplex(n,e,r)}return e(r,i)}t.assertNever(e)}e.stackIntercept=n;function r(e,t,r,i){return n(`unary`,e,t,i,r)}e.stackUnaryInterceptors=r;function i(e,t,r,i){return n(`serverStreaming`,e,t,i,r)}e.stackServerStreamingInterceptors=i;function a(e,t,r){return n(`clientStreaming`,e,t,r)}e.stackClientStreamingInterceptors=a;function o(e,t,r){return n(`duplex`,e,t,r)}e.stackDuplexStreamingInterceptors=o})),nO=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ServerCallContextController=void 0,e.ServerCallContextController=class{constructor(e,t,n,r,i={code:`OK`,detail:``}){this._cancelled=!1,this._listeners=[],this.method=e,this.headers=t,this.deadline=n,this.trailers={},this._sendRH=r,this.status=i}notifyCancelled(){if(!this._cancelled){this._cancelled=!0;for(let e of this._listeners)e()}}sendResponseHeaders(e){this._sendRH(e)}get cancelled(){return this._cancelled}onCancel(e){let t=this._listeners;return t.push(e),()=>{let n=t.indexOf(e);n>=0&&t.splice(n,1)}}}})),rO=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=GD();Object.defineProperty(e,`ServiceType`,{enumerable:!0,get:function(){return t.ServiceType}});var n=WD();Object.defineProperty(e,`readMethodOptions`,{enumerable:!0,get:function(){return n.readMethodOptions}}),Object.defineProperty(e,`readMethodOption`,{enumerable:!0,get:function(){return n.readMethodOption}}),Object.defineProperty(e,`readServiceOption`,{enumerable:!0,get:function(){return n.readServiceOption}});var r=KD();Object.defineProperty(e,`RpcError`,{enumerable:!0,get:function(){return r.RpcError}});var i=qD();Object.defineProperty(e,`mergeRpcOptions`,{enumerable:!0,get:function(){return i.mergeRpcOptions}});var a=YD();Object.defineProperty(e,`RpcOutputStreamController`,{enumerable:!0,get:function(){return a.RpcOutputStreamController}});var o=eO();Object.defineProperty(e,`TestTransport`,{enumerable:!0,get:function(){return o.TestTransport}});var s=JD();Object.defineProperty(e,`Deferred`,{enumerable:!0,get:function(){return s.Deferred}}),Object.defineProperty(e,`DeferredState`,{enumerable:!0,get:function(){return s.DeferredState}});var c=$D();Object.defineProperty(e,`DuplexStreamingCall`,{enumerable:!0,get:function(){return c.DuplexStreamingCall}});var l=QD();Object.defineProperty(e,`ClientStreamingCall`,{enumerable:!0,get:function(){return l.ClientStreamingCall}});var u=ZD();Object.defineProperty(e,`ServerStreamingCall`,{enumerable:!0,get:function(){return u.ServerStreamingCall}});var d=XD();Object.defineProperty(e,`UnaryCall`,{enumerable:!0,get:function(){return d.UnaryCall}});var f=tO();Object.defineProperty(e,`stackIntercept`,{enumerable:!0,get:function(){return f.stackIntercept}}),Object.defineProperty(e,`stackDuplexStreamingInterceptors`,{enumerable:!0,get:function(){return f.stackDuplexStreamingInterceptors}}),Object.defineProperty(e,`stackClientStreamingInterceptors`,{enumerable:!0,get:function(){return f.stackClientStreamingInterceptors}}),Object.defineProperty(e,`stackServerStreamingInterceptors`,{enumerable:!0,get:function(){return f.stackServerStreamingInterceptors}}),Object.defineProperty(e,`stackUnaryInterceptors`,{enumerable:!0,get:function(){return f.stackUnaryInterceptors}});var p=nO();Object.defineProperty(e,`ServerCallContextController`,{enumerable:!0,get:function(){return p.ServerCallContextController}})}))(),$=UD();const iO=new class extends $.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 t={scope:``,permission:`0`};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posiO}])}create(e){let t={repositoryId:`0`,scope:[]};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posaO},{no:2,name:`key`,kind:`scalar`,T:9},{no:3,name:`version`,kind:`scalar`,T:9}])}create(e){let t={key:``,version:``};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posaO},{no:2,name:`key`,kind:`scalar`,T:9},{no:3,name:`size_bytes`,kind:`scalar`,T:3},{no:4,name:`version`,kind:`scalar`,T:9}])}create(e){let t={key:``,sizeBytes:`0`,version:``};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posaO},{no:2,name:`key`,kind:`scalar`,T:9},{no:3,name:`restore_keys`,kind:`scalar`,repeat:2,T:9},{no:4,name:`version`,kind:`scalar`,T:9}])}create(e){let t={key:``,restoreKeys:[],version:``};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.possO.fromJson(e,{ignoreUnknownFields:!0}))}FinalizeCacheEntryUpload(e){let t=cO.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request(`github.actions.results.api.v1.CacheService`,`FinalizeCacheEntryUpload`,`application/json`,t).then(e=>lO.fromJson(e,{ignoreUnknownFields:!0}))}GetCacheEntryDownloadURL(e){let t=uO.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request(`github.actions.results.api.v1.CacheService`,`GetCacheEntryDownloadURL`,`application/json`,t).then(e=>dO.fromJson(e,{ignoreUnknownFields:!0}))}};function pO(e){if(e)try{let t=new URL(e).searchParams.get(`sig`);t&&(ci(t),ci(encodeURIComponent(t)))}catch(t){K(`Failed to parse URL: ${e} ${t instanceof Error?t.message:String(t)}`)}}function mO(e){if(typeof e!=`object`||!e){K(`body is not an object or is null`);return}`signed_upload_url`in e&&typeof e.signed_upload_url==`string`&&pO(e.signed_upload_url),`signed_download_url`in e&&typeof e.signed_download_url==`string`&&pO(e.signed_download_url)}var hO=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},gO=class{constructor(e,t,n,r){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let i=zc();this.baseUrl=QE(),t&&(this.maxAttempts=t),n&&(this.baseRetryIntervalMilliseconds=n),r&&(this.retryMultiplier=r),this.httpClient=new pr(e,[new gr(i)])}request(e,t,n,r){return hO(this,void 0,void 0,function*(){let i=new URL(`/twirp/${e}/${t}`,this.baseUrl).href;K(`[Request] ${t} ${i}`);let a={"Content-Type":n};try{let{body:e}=yield this.retryableRequest(()=>hO(this,void 0,void 0,function*(){return this.httpClient.post(i,JSON.stringify(r),a)}));return e}catch(e){throw Error(`Failed to ${t}: ${e.message}`)}})}retryableRequest(e){return hO(this,void 0,void 0,function*(){let t=0,n=``,r=``;for(;t0&&hi(`You've hit a rate limit, your rate limit will reset in ${t} seconds`)}throw new DE(`Rate limited: ${n}`)}}catch(e){if(e instanceof SyntaxError&&K(`Raw Body: ${r}`),e instanceof EE||e instanceof DE)throw e;if(TE.isNetworkErrorCode(e?.code))throw new TE(e?.code);i=!0,n=e.message}if(!i)throw Error(`Received non-retryable error: ${n}`);if(t+1===this.maxAttempts)throw Error(`Failed to make request after ${this.maxAttempts} attempts: ${n}`);let a=this.getExponentialRetryTimeMilliseconds(t);gi(`Attempt ${t+1} of ${this.maxAttempts} failed with error: ${n}. Retrying request in ${a} ms...`),yield this.sleep(a),t++}throw Error(`Request failed`)})}isSuccessStatusCode(e){return e?e>=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[ar.BadGateway,ar.GatewayTimeout,ar.InternalServerError,ar.ServiceUnavailable].includes(e):!1}sleep(e){return hO(this,void 0,void 0,function*(){return new Promise(t=>setTimeout(t,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw Error(`attempt should be a positive integer`);if(e===0)return this.baseRetryIntervalMilliseconds;let t=this.baseRetryIntervalMilliseconds*this.retryMultiplier**+e,n=t*this.retryMultiplier;return Math.trunc(Math.random()*(n-t)+t)}};function _O(e){return new fO(new gO(tD(),e?.maxAttempts,e?.retryIntervalMs,e?.retryMultiplier))}var vO=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const yO=process.platform===`win32`;function bO(){return vO(this,void 0,void 0,function*(){switch(process.platform){case`win32`:{let e=yield Ic(),t=wc;if(e)return{path:e,type:bc.GNU};if(me(t))return{path:t,type:bc.BSD};break}case`darwin`:{let e=yield qr(`gtar`,!1);return e?{path:e,type:bc.GNU}:{path:yield qr(`tar`,!0),type:bc.BSD}}default:break}return{path:yield qr(`tar`,!0),type:bc.GNU}})}function xO(e,t,n){return vO(this,arguments,void 0,function*(e,t,n,r=``){let i=[`"${e.path}"`],a=Fc(t),o=`cache.tar`,s=CO(),c=e.type===bc.BSD&&t!==yc.Gzip&&yO;switch(n){case`create`:i.push(`--posix`,`-cf`,c?o:a.replace(RegExp(`\\${U.sep}`,`g`),`/`),`--exclude`,c?o:a.replace(RegExp(`\\${U.sep}`,`g`),`/`),`-P`,`-C`,s.replace(RegExp(`\\${U.sep}`,`g`),`/`),`--files-from`,Ec);break;case`extract`:i.push(`-xf`,c?o:r.replace(RegExp(`\\${U.sep}`,`g`),`/`),`-P`,`-C`,s.replace(RegExp(`\\${U.sep}`,`g`),`/`));break;case`list`:i.push(`-tf`,c?o:r.replace(RegExp(`\\${U.sep}`,`g`),`/`),`-P`);break}if(e.type===bc.GNU)switch(process.platform){case`win32`:i.push(`--force-local`);break;case`darwin`:i.push(`--delay-directory-restore`);break}return i})}function SO(e,t){return vO(this,arguments,void 0,function*(e,t,n=``){let r,i=yield bO(),a=yield xO(i,e,t,n),o=t===`create`?yield TO(i,e):yield wO(i,e,n),s=i.type===bc.BSD&&e!==yc.Gzip&&yO;return r=s&&t!==`create`?[[...o].join(` `),[...a].join(` `)]:[[...a].join(` `),[...o].join(` `)],s?r:[r.join(` `)]})}function CO(){return process.env.GITHUB_WORKSPACE??process.cwd()}function wO(e,t,n){return vO(this,void 0,void 0,function*(){let r=e.type===bc.BSD&&t!==yc.Gzip&&yO;switch(t){case yc.Zstd:return r?[`zstd -d --long=30 --force -o`,Tc,n.replace(RegExp(`\\${U.sep}`,`g`),`/`)]:[`--use-compress-program`,yO?`"zstd -d --long=30"`:`unzstd --long=30`];case yc.ZstdWithoutLong:return r?[`zstd -d --force -o`,Tc,n.replace(RegExp(`\\${U.sep}`,`g`),`/`)]:[`--use-compress-program`,yO?`"zstd -d"`:`unzstd`];default:return[`-z`]}})}function TO(e,t){return vO(this,void 0,void 0,function*(){let n=Fc(t),r=e.type===bc.BSD&&t!==yc.Gzip&&yO;switch(t){case yc.Zstd:return r?[`zstd -T0 --long=30 --force -o`,n.replace(RegExp(`\\${U.sep}`,`g`),`/`),Tc]:[`--use-compress-program`,yO?`"zstd -T0 --long=30"`:`zstdmt --long=30`];case yc.ZstdWithoutLong:return r?[`zstd -T0 --force -o`,n.replace(RegExp(`\\${U.sep}`,`g`),`/`),Tc]:[`--use-compress-program`,yO?`"zstd -T0"`:`zstdmt`];default:return[`-z`]}})}function EO(e,t){return vO(this,void 0,void 0,function*(){for(let n of e)try{yield ii(n,void 0,{cwd:t,env:Object.assign(Object.assign({},process.env),{MSYS:`winsymlinks:nativestrict`})})}catch(e){throw Error(`${n.split(` `)[0]} failed with error: ${e?.message}`)}})}function DO(e,t){return vO(this,void 0,void 0,function*(){yield EO(yield SO(t,`list`,e))})}function OO(e,t){return vO(this,void 0,void 0,function*(){yield Kr(CO()),yield EO(yield SO(t,`extract`,e))})}function kO(e,t,n){return vO(this,void 0,void 0,function*(){_e(U.join(e,Ec),t.join(` -`)),yield EO(yield SO(n,`create`),e)})}var AO=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},jO=class e extends Error{constructor(t){super(t),this.name=`ValidationError`,Object.setPrototypeOf(this,e.prototype)}},MO=class e extends Error{constructor(t){super(t),this.name=`ReserveCacheError`,Object.setPrototypeOf(this,e.prototype)}},NO=class e extends Error{constructor(t){super(t),this.name=`FinalizeCacheError`,Object.setPrototypeOf(this,e.prototype)}};function PO(e){if(!e||e.length===0)throw new jO(`Path Validation Error: At least one directory or file path is required`)}function FO(e){if(e.length>512)throw new jO(`Key Validation Error: ${e} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(e))throw new jO(`Key Validation Error: ${e} cannot contain commas.`)}function IO(e,t,n,r){return AO(this,arguments,void 0,function*(e,t,n,r,i=!1){let a=ZE();switch(K(`Cache service version: ${a}`),PO(e),a){case`v2`:return yield RO(e,t,n,r,i);default:return yield LO(e,t,n,r,i)}})}function LO(e,t,n,r){return AO(this,arguments,void 0,function*(e,t,n,r,i=!1){n||=[];let a=[t,...n];if(K(`Resolved Keys:`),K(JSON.stringify(a)),a.length>10)throw new jO(`Key Validation Error: Keys are limited to a maximum of 10.`);for(let e of a)FO(e);let o=yield Pc(),s=``;try{let t=yield sD(a,e,{compressionMethod:o,enableCrossOsArchive:i});if(!t?.archiveLocation)return;if(r?.lookupOnly)return gi(`Lookup only - skipping download`),t.cacheKey;s=U.join(yield kc(),Fc(o)),K(`Archive Path: ${s}`),yield lD(t.archiveLocation,s,r),pi()&&(yield DO(s,o));let n=Ac(s);return gi(`Cache Size: ~${Math.round(n/(1024*1024))} MB (${n} B)`),yield OO(s,o),gi(`Cache restored successfully`),t.cacheKey}catch(e){let t=e;if(t.name===jO.name)throw e;t instanceof dr&&typeof t.statusCode==`number`&&t.statusCode>=500?mi(`Failed to restore: ${e.message}`):hi(`Failed to restore: ${e.message}`)}finally{try{yield Mc(s)}catch(e){K(`Failed to delete archive: ${e}`)}}})}function RO(e,t,n,r){return AO(this,arguments,void 0,function*(e,t,n,r,i=!1){r=Object.assign(Object.assign({},r),{useAzureSdk:!0}),n||=[];let a=[t,...n];if(K(`Resolved Keys:`),K(JSON.stringify(a)),a.length>10)throw new jO(`Key Validation Error: Keys are limited to a maximum of 10.`);for(let e of a)FO(e);let o=``;try{let s=_O(),c=yield Pc(),l={key:t,restoreKeys:n,version:Rc(e,c,i)},u=yield s.GetCacheEntryDownloadURL(l);if(!u.ok){K(`Cache not found for version ${l.version} of keys: ${a.join(`, `)}`);return}if(l.key===u.matchedKey?gi(`Cache hit for: ${u.matchedKey}`):gi(`Cache hit for restore-key: ${u.matchedKey}`),r?.lookupOnly)return gi(`Lookup only - skipping download`),u.matchedKey;o=U.join(yield kc(),Fc(c)),K(`Archive path: ${o}`),K(`Starting download of archive to: ${o}`),yield lD(u.signedDownloadUrl,o,r);let d=Ac(o);return gi(`Cache Size: ~${Math.round(d/(1024*1024))} MB (${d} B)`),pi()&&(yield DO(o,c)),yield OO(o,c),gi(`Cache restored successfully`),u.matchedKey}catch(e){let t=e;if(t.name===jO.name)throw e;t instanceof dr&&typeof t.statusCode==`number`&&t.statusCode>=500?mi(`Failed to restore: ${e.message}`):hi(`Failed to restore: ${e.message}`)}finally{try{o&&(yield Mc(o))}catch(e){K(`Failed to delete archive: ${e}`)}}})}function zO(e,t,n){return AO(this,arguments,void 0,function*(e,t,n,r=!1){let i=ZE();switch(K(`Cache service version: ${i}`),PO(e),FO(t),i){case`v2`:return yield VO(e,t,n,r);default:return yield BO(e,t,n,r)}})}function BO(e,t,n){return AO(this,arguments,void 0,function*(e,t,n,r=!1){let i=yield Pc(),a=-1,o=yield jc(e);if(K(`Cache Paths:`),K(`${JSON.stringify(o)}`),o.length===0)throw Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`);let s=yield kc(),c=U.join(s,Fc(i));K(`Archive Path: ${c}`);try{yield kO(s,o,i),pi()&&(yield DO(c,i));let l=Ac(c);if(K(`File Size: ${l}`),l>10737418240&&!XE())throw Error(`Cache size of ~${Math.round(l/(1024*1024))} MB (${l} B) is over the 10GB limit, not saving cache.`);K(`Reserving Cache`);let u=yield uD(t,e,{compressionMethod:i,enableCrossOsArchive:r,cacheSize:l});if(u?.result?.cacheId)a=u?.result?.cacheId;else if(u?.statusCode===400)throw Error(u?.error?.message??`Cache size of ~${Math.round(l/(1024*1024))} MB (${l} B) is over the data cap limit, not saving cache.`);else throw new MO(`Unable to reserve cache with key ${t}, another job may be creating this cache. More details: ${u?.error?.message}`);K(`Saving Cache (ID: ${a})`),yield hD(a,c,``,n)}catch(e){let t=e;if(t.name===jO.name)throw e;t.name===MO.name?gi(`Failed to save: ${t.message}`):t instanceof dr&&typeof t.statusCode==`number`&&t.statusCode>=500?mi(`Failed to save: ${t.message}`):hi(`Failed to save: ${t.message}`)}finally{try{yield Mc(c)}catch(e){K(`Failed to delete archive: ${e}`)}}return a})}function VO(e,t,n){return AO(this,arguments,void 0,function*(e,t,n,r=!1){n=Object.assign(Object.assign({},n),{uploadChunkSize:64*1024*1024,uploadConcurrency:8,useAzureSdk:!0});let i=yield Pc(),a=_O(),o=-1,s=yield jc(e);if(K(`Cache Paths:`),K(`${JSON.stringify(s)}`),s.length===0)throw Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`);let c=yield kc(),l=U.join(c,Fc(i));K(`Archive Path: ${l}`);try{yield kO(c,s,i),pi()&&(yield DO(l,i));let u=Ac(l);K(`File Size: ${u}`),n.archiveSizeBytes=u,K(`Reserving Cache`);let d=Rc(e,i,r),f={key:t,version:d},p;try{let e=yield a.CreateCacheEntry(f);if(!e.ok)throw e.message&&hi(`Cache reservation failed: ${e.message}`),Error(e.message||`Response was not ok`);p=e.signedUploadUrl}catch(e){throw K(`Failed to reserve cache: ${e}`),new MO(`Unable to reserve cache with key ${t}, another job may be creating this cache.`)}K(`Attempting to upload cache located at: ${l}`),yield hD(o,l,p,n);let m={key:t,version:d,sizeBytes:`${u}`},h=yield a.FinalizeCacheEntryUpload(m);if(K(`FinalizeCacheEntryUploadResponse: ${h.ok}`),!h.ok)throw h.message?new NO(h.message):Error(`Unable to finalize cache with key ${t}, another job may be finalizing this cache.`);o=parseInt(h.entryId)}catch(e){let t=e;if(t.name===jO.name)throw e;t.name===MO.name?gi(`Failed to save: ${t.message}`):t.name===NO.name?hi(t.message):t instanceof dr&&typeof t.statusCode==`number`&&t.statusCode>=500?mi(`Failed to save: ${t.message}`):hi(`Failed to save: ${t.message}`)}finally{try{yield Mc(l)}catch(e){K(`Failed to delete archive: ${e}`)}}return o})}function HO(e){return{success:!0,data:e}}function UO(e){return{success:!1,error:e}}const WO=[`OWNER`,`MEMBER`,`COLLABORATOR`];function GO(e){return Object.assign(Error(e),{code:`OBJECT_STORE_VALIDATION_ERROR`})}function KO(e){return Object.assign(Error(e),{code:`OBJECT_STORE_PATH_TRAVERSAL_ERROR`})}function qO(e){return Object.assign(Error(e),{code:`OBJECT_STORE_OPERATION_ERROR`})}const JO=/^[0-9a-z][\w.-]{0,63}$/i;function YO(e){return[...e].some(e=>{let t=e.codePointAt(0);return t!=null&&(t<=31||t===127)})}function XO(e){return[...e].filter(e=>{let t=e.codePointAt(0);return t==null||t>31&&t!==127}).join(``)}function ZO(e){let t=e.split(`.`).map(e=>Number.parseInt(e,10));if(t.length!==4||t.some(Number.isNaN))return!1;let n=t[0],r=t[1];return n==null||r==null?!1:n===10||n===127||n===169&&r===254||n===192&&r===168?!0:n===172&&r>=16&&r<=31}function QO(e){let t=e.toLowerCase();return t===`::1`||t.startsWith(`fe8`)||t.startsWith(`fe9`)||t.startsWith(`fea`)||t.startsWith(`feb`)}function $O(e){if(e===`localhost`)return!0;let t=De.isIP(e);return t===4?ZO(e):t===6?QO(e):!1}function ek(e){let t=e.toLowerCase();return t===`169.254.169.254`||t===`metadata.google.internal`?!0:De.isIP(t)===6?t===`fd00:ec2::254`:!1}function tk(e,t){let n;try{n=new URL(e)}catch{return UO(GO(`s3 endpoint must be a valid URL`))}return t===!1&&n.protocol!==`https:`?UO(GO(`s3 endpoint must use https unless insecure endpoints are explicitly allowed`)):ek(n.hostname)?UO(GO(`s3 endpoint must not target cloud instance metadata services`)):t===!1&&$O(n.hostname)?UO(GO(`s3 endpoint must not target loopback, link-local, or private network addresses`)):n.username.length>0||n.password.length>0?UO(GO(`s3 endpoint must not include embedded credentials`)):HO(n)}function nk(e){let t=e.trim();return t.length===0?UO(GO(`object store prefix cannot be empty`)):t.includes(`..`)||t.startsWith(`/`)?UO(GO(`object store prefix must not contain traversal or absolute path markers`)):YO(t)?UO(GO(`object store prefix must not contain control characters`)):JO.test(t)===!1?UO(GO(`object store prefix must match the allowed naming pattern`)):HO(t)}function rk(e){if(e.includes(`\0`))return UO(GO(`object store key components must not contain null bytes`));let t=XO(e).replaceAll(`/`,`-`).replaceAll(`\\`,`-`).trim();return t.length===0?UO(GO(`object store key components must not be empty`)):t.includes(`..`)?UO(GO(`object store key components must not contain traversal markers`)):HO(t)}function ik(e,t){let n=ze.resolve(e);if(t.includes(`\0`))return UO(KO(`download path must not contain null bytes`));if(ze.isAbsolute(t))return UO(KO(`download path must be relative to the storage root`));let r=ze.resolve(n,t),i=`${n}${ze.sep}`;return r.startsWith(i)===!1?UO(KO(`download path escapes the storage root`)):HO(r)}function ak(e){let t=e.trim();if(t.length===0)return UO(GO(`repository path must not be empty`));let n=t.split(`/`).filter(e=>e.length>0);return n.length===0||n.length>2?UO(GO(`repository path must be "owner/repo" or a single component`)):HO(n)}function ok(e,t,n,r,i){let a=nk(e.prefix);if(a.success===!1)return UO(a.error);let o=rk(t);if(o.success===!1)return UO(o.error);let s=ak(n);if(s.success===!1)return UO(s.error);let c=[];for(let e of s.data){let t=rk(e);if(t.success===!1)return UO(t.error);c.push(t.data)}let l=c.join(`/`),u=`${a.data}/${o.data}/${l}/${r}`;if(i==null)return HO(`${u}/`);let d=rk(i);return d.success===!1?UO(d.error):HO(`${u}/${d.data}`)}const sk=[`opencode.db`,`opencode.db-wal`,`opencode.db-shm`];function ck(e){return ze.dirname(e)}function lk(e,t){return ze.join(ck(e),t)}function uk(e,t,n){let r=ok(e,t,n,`sessions`);return r.success?r.data:null}async function dk(e){let t=await Re.readdir(e,{withFileTypes:!0});return(await Promise.all(t.map(async t=>{let n=ze.join(e,t.name);return t.isDirectory()?dk(n):t.isFile()?[n]:[]}))).flat().sort((e,t)=>e.localeCompare(t))}function fk(e,t,n){return`${e}${t}/${n.split(ze.sep).join(`/`)}`}async function pk(e,t,n,r,i,a){let o=uk(t,n,r);if(o==null)return a.warning(`Failed to build object store sessions prefix for upload`,{identity:n,repo:r}),{uploaded:0,failed:0};let s=0,c=0;for(let t of sk){let n=lk(i,t);try{await Re.access(n)}catch{continue}let r=await e.upload(`${o}${t}`,n);if(r.success){s++;continue}c++,a.warning(`Failed to upload session database file to object store`,{key:`${o}${t}`,localPath:n,error:yi(r.error)})}return{uploaded:s,failed:c}}async function mk(e,t,n,r,i,a){let o=uk(t,n,r);if(o==null)return a.warning(`Failed to build object store sessions prefix for download`,{identity:n,repo:r}),{downloaded:0,failed:0,mainDbRestored:!1};let s=await e.list(o);if(s.success===!1)return a.warning(`Failed to list object store session files`,{prefix:o,error:yi(s.error)}),{downloaded:0,failed:1,mainDbRestored:!1};if(s.data.length===0)return{downloaded:0,failed:0,mainDbRestored:!1};let c=ck(i),l=0,u=0,d=!1;for(let t of s.data){let n=ik(c,t.startsWith(o)?t.slice(o.length):t);if(n.success===!1){u++,a.warning(`Rejected object store session key during download`,{key:t,error:yi(n.error)});continue}await Re.mkdir(ze.dirname(n.data),{recursive:!0});let r=await e.download(t,n.data);if(r.success){l++,ze.basename(n.data)===`opencode.db`&&(d=!0);continue}u++,a.warning(`Failed to download session database file from object store`,{key:t,localPath:n.data,error:yi(r.error)})}return{downloaded:l,failed:u,mainDbRestored:d}}async function hk(e,t,n,r,i,a,o){try{await Re.access(a)}catch{return{uploaded:0,failed:0}}let s=0,c=0,l=await dk(a),u=ok(t,n,r,`artifacts`);if(u.success===!1)return o.warning(`Failed to build object store artifact prefix for upload`,{runId:i,error:yi(u.error)}),{uploaded:0,failed:0};for(let t of l){let n=ze.relative(a,t),r=fk(u.data,i,n),l=await e.upload(r,t);if(l.success){s++;continue}c++,o.warning(`Failed to upload artifact file to object store`,{key:r,filePath:t,error:yi(l.error)})}return{uploaded:s,failed:c}}async function gk(e,t,n,r,i,a,o){let s=ok(t,n,r,`metadata`,`${i}.json`);if(s.success===!1)return o.warning(`Failed to build object store metadata key for upload`,{runId:i,error:yi(s.error)}),{success:!1};let c=await Re.mkdtemp(ze.join(Be.tmpdir(),`fro-bot-metadata-`)),l=ze.join(c,`${i}.json`);try{await Re.writeFile(l,JSON.stringify(a,null,2),`utf8`);let t=await e.upload(s.data,l);return t.success===!1?(o.warning(`Failed to upload run metadata to object store`,{key:s.data,runId:i,error:yi(t.error)}),{success:!1}):{success:!0}}catch(e){return o.warning(`Failed to upload run metadata to object store`,{key:s.data,runId:i,error:yi(e)}),{success:!1}}finally{await Re.rm(c,{recursive:!0,force:!0})}}var _k=i((e=>{var t=a();function n(e){return n=>async r=>{let{request:i}=r;if(e.expectContinueHeader!==!1&&t.HttpRequest.isInstance(i)&&i.body&&e.runtime===`node`&&e.requestHandler?.constructor?.name!==`FetchHttpHandler`){let t=!0;if(typeof e.expectContinueHeader==`number`)try{t=(Number(i.headers?.[`content-length`])??e.bodyLengthChecker?.(i.body)??1/0)>=e.expectContinueHeader}catch{}else t=!!e.expectContinueHeader;t&&(i.headers.Expect=`100-continue`)}return n({...r,request:i})}}let r={step:`build`,tags:[`SET_EXPECT_HEADER`,`EXPECT_HEADER`],name:`addExpectContinueMiddleware`,override:!0};e.addExpectContinueMiddleware=n,e.addExpectContinueMiddlewareOptions=r,e.getAddExpectContinuePlugin=e=>({applyToStack:t=>{t.add(n(e),r)}})})),vk=i(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>n(e,`name`,{value:t,configurable:!0}),s=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},c=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},l=e=>c(n({},`__esModule`,{value:!0}),e),u={};s(u,{isArrayBuffer:()=>d}),t.exports=l(u);var d=o(e=>typeof ArrayBuffer==`function`&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)===`[object ArrayBuffer]`,`isArrayBuffer`)})),yk=i(((e,n)=>{var r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s=(e,t)=>r(e,`name`,{value:t,configurable:!0}),c=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!o.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(s=i(t,c))||s.enumerable});return e},u=e=>l(r({},`__esModule`,{value:!0}),e),d={};c(d,{fromArrayBuffer:()=>m,fromString:()=>h}),n.exports=u(d);var f=vk(),p=t(`buffer`),m=s((e,t=0,n=e.byteLength-t)=>{if(!(0,f.isArrayBuffer)(e))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return p.Buffer.from(e,t,n)},`fromArrayBuffer`),h=s((e,t)=>{if(typeof e!=`string`)throw TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?p.Buffer.from(e,t):p.Buffer.from(e)},`fromString`)})),bk=i(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>n(e,`name`,{value:t,configurable:!0}),s=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},c=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},l=e=>c(n({},`__esModule`,{value:!0}),e),u={};s(u,{fromUtf8:()=>f,toUint8Array:()=>p,toUtf8:()=>m}),t.exports=l(u);var d=yk(),f=o(e=>{let t=(0,d.fromString)(e,`utf8`);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},`fromUtf8`),p=o(e=>typeof e==`string`?f(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),`toUint8Array`),m=o(e=>{if(typeof e==`string`)return e;if(typeof e!=`object`||typeof e.byteOffset!=`number`||typeof e.byteLength!=`number`)throw Error(`@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.`);return(0,d.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString(`utf8`)},`toUtf8`)})),xk=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.convertToBuffer=void 0;var t=bk(),n=typeof Buffer<`u`&&Buffer.from?function(e){return Buffer.from(e,`utf8`)}:t.fromUtf8;function r(e){return e instanceof Uint8Array?e:typeof e==`string`?n(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}e.convertToBuffer=r})),Sk=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isEmptyData=void 0;function t(e){return typeof e==`string`?e.length===0:e.byteLength===0}e.isEmptyData=t})),Ck=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.numToUint8=void 0;function t(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}e.numToUint8=t})),wk=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.uint32ArrayFrom=void 0;function t(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n{Object.defineProperty(e,`__esModule`,{value:!0}),e.uint32ArrayFrom=e.numToUint8=e.isEmptyData=e.convertToBuffer=void 0;var t=xk();Object.defineProperty(e,`convertToBuffer`,{enumerable:!0,get:function(){return t.convertToBuffer}});var n=Sk();Object.defineProperty(e,`isEmptyData`,{enumerable:!0,get:function(){return n.isEmptyData}});var r=Ck();Object.defineProperty(e,`numToUint8`,{enumerable:!0,get:function(){return r.numToUint8}});var i=wk();Object.defineProperty(e,`uint32ArrayFrom`,{enumerable:!0,get:function(){return i.uint32ArrayFrom}})})),Ek=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.AwsCrc32c=void 0;var n=(g(),e(f)),r=Tk(),i=Dk();t.AwsCrc32c=function(){function e(){this.crc32c=new i.Crc32c}return e.prototype.update=function(e){(0,r.isEmptyData)(e)||this.crc32c.update((0,r.convertToBuffer)(e))},e.prototype.digest=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,(0,r.numToUint8)(this.crc32c.digest())]})})},e.prototype.reset=function(){this.crc32c=new i.Crc32c},e}()})),Dk=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.AwsCrc32c=t.Crc32c=t.crc32c=void 0;var n=(g(),e(f)),r=Tk();function i(e){return new a().update(e).digest()}t.crc32c=i;var a=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var i=n.__values(e),a=i.next();!a.done;a=i.next()){var s=a.value;this.checksum=this.checksum>>>8^o[(this.checksum^s)&255]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e}();t.Crc32c=a;var o=(0,r.uint32ArrayFrom)([0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697]),s=Ek();Object.defineProperty(t,`AwsCrc32c`,{enumerable:!0,get:function(){return s.AwsCrc32c}})})),Ok=i((e=>{let t=()=>{let e=Array(8);for(let t=0;t<8;t++){let n=Array(512);for(let e=0;e<256;e++){let r=BigInt(e);for(let e=0;e<8*(t+1);e++)r&1n?r=r>>1n^11127430586519243189n:r>>=1n;n[e*2]=Number(r>>32n&4294967295n),n[e*2+1]=Number(r&4294967295n)}e[t]=new Uint32Array(n)}return e},n,r,i,a,o,s,c,l,u,d=()=>{n||(n=t(),[r,i,a,o,s,c,l,u]=n)};e.Crc64Nvme=class{c1=0;c2=0;constructor(){d(),this.reset()}update(e){let t=e.length,n=0,d=this.c1,f=this.c2;for(;n+8<=t;){let t=((f^e[n++])&255)<<1,p=((f>>>8^e[n++])&255)<<1,m=((f>>>16^e[n++])&255)<<1,h=((f>>>24^e[n++])&255)<<1,g=((d^e[n++])&255)<<1,v=((d>>>8^e[n++])&255)<<1,y=((d>>>16^e[n++])&255)<<1,b=((d>>>24^e[n++])&255)<<1;d=u[t]^l[p]^c[m]^s[h]^o[g]^a[v]^i[y]^r[b],f=u[t+1]^l[p+1]^c[m+1]^s[h+1]^o[g+1]^a[v+1]^i[y+1]^r[b+1]}for(;n>>8|(d&255)<<24)>>>0,d=d>>>8^r[t],f^=r[t+1],n++}this.c1=d,this.c2=f}async digest(){let e=this.c1^4294967295,t=this.c2^4294967295;return new Uint8Array([e>>>24,e>>>16&255,e>>>8&255,e&255,t>>>24,t>>>16&255,t>>>8&255,t&255])}reset(){this.c1=4294967295,this.c2=4294967295}},e.crc64NvmeCrtContainer={CrtCrc64Nvme:null}})),kk=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.AwsCrc32=void 0;var n=(g(),e(f)),r=Tk(),i=Ak();t.AwsCrc32=function(){function e(){this.crc32=new i.Crc32}return e.prototype.update=function(e){(0,r.isEmptyData)(e)||this.crc32.update((0,r.convertToBuffer)(e))},e.prototype.digest=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,(0,r.numToUint8)(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new i.Crc32},e}()})),Ak=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.AwsCrc32=t.Crc32=t.crc32=void 0;var n=(g(),e(f)),r=Tk();function i(e){return new a().update(e).digest()}t.crc32=i;var a=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var i=n.__values(e),a=i.next();!a.done;a=i.next()){var s=a.value;this.checksum=this.checksum>>>8^o[(this.checksum^s)&255]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e}();t.Crc32=a;var o=(0,r.uint32ArrayFrom)([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),s=kk();Object.defineProperty(t,`AwsCrc32`,{enumerable:!0,get:function(){return s.AwsCrc32}})})),jk=i((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getCrc32ChecksumAlgorithmFunction=void 0;let r=(g(),e(f)),i=Ak(),a=Tk(),o=r.__importStar(t(`node:zlib`));var s=class{checksum=0;update(e){this.checksum=o.crc32(e,this.checksum)}async digest(){return(0,a.numToUint8)(this.checksum)}reset(){this.checksum=0}};n.getCrc32ChecksumAlgorithmFunction=()=>o.crc32===void 0?i.AwsCrc32:s})),Mk=i((t=>{var n=(o(),e(s)),r=a(),i=p(),u=c(),d=Dk(),f=Ok(),m=jk(),g=l(),v=h();let y={WHEN_SUPPORTED:`WHEN_SUPPORTED`,WHEN_REQUIRED:`WHEN_REQUIRED`},b=y.WHEN_SUPPORTED,x={WHEN_SUPPORTED:`WHEN_SUPPORTED`,WHEN_REQUIRED:`WHEN_REQUIRED`},S=y.WHEN_SUPPORTED;t.ChecksumAlgorithm=void 0,(function(e){e.MD5=`MD5`,e.CRC32=`CRC32`,e.CRC32C=`CRC32C`,e.CRC64NVME=`CRC64NVME`,e.SHA1=`SHA1`,e.SHA256=`SHA256`})(t.ChecksumAlgorithm||={}),t.ChecksumLocation=void 0,(function(e){e.HEADER=`header`,e.TRAILER=`trailer`})(t.ChecksumLocation||={});let C=t.ChecksumAlgorithm.CRC32;var w;(function(e){e.ENV=`env`,e.CONFIG=`shared config entry`})(w||={});let T=(e,t,n,r)=>{if(!(t in e))return;let i=e[t].toUpperCase();if(!Object.values(n).includes(i))throw TypeError(`Cannot load ${r} '${t}'. Expected one of ${Object.values(n)}, got '${e[t]}'.`);return i},E=`AWS_REQUEST_CHECKSUM_CALCULATION`,D=`request_checksum_calculation`,O={environmentVariableSelector:e=>T(e,E,y,w.ENV),configFileSelector:e=>T(e,D,y,w.CONFIG),default:b},k=`AWS_RESPONSE_CHECKSUM_VALIDATION`,A=`response_checksum_validation`,j={environmentVariableSelector:e=>T(e,k,x,w.ENV),configFileSelector:e=>T(e,A,x,w.CONFIG),default:S},M=(e,{requestChecksumRequired:t,requestAlgorithmMember:n,requestChecksumCalculation:r})=>{if(!n)return r===y.WHEN_SUPPORTED||t?C:void 0;if(e[n])return e[n]},N=e=>e===t.ChecksumAlgorithm.MD5?`content-md5`:`x-amz-checksum-${e.toLowerCase()}`,P=(e,t)=>{let n=e.toLowerCase();for(let e of Object.keys(t))if(n===e.toLowerCase())return!0;return!1},F=(e,t)=>{let n=e.toLowerCase();for(let e of Object.keys(t))if(e.toLowerCase().startsWith(n))return!0;return!1},I=e=>e!==void 0&&typeof e!=`string`&&!ArrayBuffer.isView(e)&&!u.isArrayBuffer(e),L=[t.ChecksumAlgorithm.CRC32,t.ChecksumAlgorithm.CRC32C,t.ChecksumAlgorithm.CRC64NVME,t.ChecksumAlgorithm.SHA1,t.ChecksumAlgorithm.SHA256],R=[t.ChecksumAlgorithm.SHA256,t.ChecksumAlgorithm.SHA1,t.ChecksumAlgorithm.CRC32,t.ChecksumAlgorithm.CRC32C,t.ChecksumAlgorithm.CRC64NVME],z=(e,n)=>{let{checksumAlgorithms:r={}}=n;switch(e){case t.ChecksumAlgorithm.MD5:return r?.MD5??n.md5;case t.ChecksumAlgorithm.CRC32:return r?.CRC32??m.getCrc32ChecksumAlgorithmFunction();case t.ChecksumAlgorithm.CRC32C:return r?.CRC32C??d.AwsCrc32c;case t.ChecksumAlgorithm.CRC64NVME:return typeof f.crc64NvmeCrtContainer.CrtCrc64Nvme==`function`?r?.CRC64NVME??f.crc64NvmeCrtContainer.CrtCrc64Nvme:r?.CRC64NVME??f.Crc64Nvme;case t.ChecksumAlgorithm.SHA1:return r?.SHA1??n.sha1;case t.ChecksumAlgorithm.SHA256:return r?.SHA256??n.sha256;default:if(r?.[e])return r[e];throw Error(`The checksum algorithm "${e}" is not supported by the client. Select one of ${L}, or provide an implementation to the client constructor checksums field.`)}},ee=(e,t)=>{let n=new e;return n.update(g.toUint8Array(t||``)),n.digest()},B={name:`flexibleChecksumsMiddleware`,step:`build`,tags:[`BODY_CHECKSUM`],override:!0},te=(e,a)=>(o,s)=>async c=>{if(!r.HttpRequest.isInstance(c.request)||F(`x-amz-checksum-`,c.request.headers))return o(c);let{request:l,input:u}=c,{body:d,headers:f}=l,{base64Encoder:p,streamHasher:m}=e,{requestChecksumRequired:h,requestAlgorithmMember:g}=a,v=await e.requestChecksumCalculation(),b=g?.name,x=g?.httpHeader;b&&!u[b]&&(v===y.WHEN_SUPPORTED||h)&&(u[b]=C,x&&(f[x]=C));let S=M(u,{requestChecksumRequired:h,requestAlgorithmMember:g?.name,requestChecksumCalculation:v}),w=d,T=f;if(S){switch(S){case t.ChecksumAlgorithm.CRC32:n.setFeature(s,`FLEXIBLE_CHECKSUMS_REQ_CRC32`,`U`);break;case t.ChecksumAlgorithm.CRC32C:n.setFeature(s,`FLEXIBLE_CHECKSUMS_REQ_CRC32C`,`V`);break;case t.ChecksumAlgorithm.CRC64NVME:n.setFeature(s,`FLEXIBLE_CHECKSUMS_REQ_CRC64`,`W`);break;case t.ChecksumAlgorithm.SHA1:n.setFeature(s,`FLEXIBLE_CHECKSUMS_REQ_SHA1`,`X`);break;case t.ChecksumAlgorithm.SHA256:n.setFeature(s,`FLEXIBLE_CHECKSUMS_REQ_SHA256`,`Y`);break}let r=N(S),a=z(S,e);if(I(d)){let{getAwsChunkedEncodingStream:t,bodyLengthChecker:n}=e;w=t(typeof e.requestStreamBufferSize==`number`&&e.requestStreamBufferSize>=8*1024?i.createBufferedReadable(d,e.requestStreamBufferSize,s.logger):d,{base64Encoder:p,bodyLengthChecker:n,checksumLocationName:r,checksumAlgorithmFn:a,streamHasher:m}),T={...f,"content-encoding":f[`content-encoding`]?`${f[`content-encoding`]},aws-chunked`:`aws-chunked`,"transfer-encoding":`chunked`,"x-amz-decoded-content-length":f[`content-length`],"x-amz-content-sha256":`STREAMING-UNSIGNED-PAYLOAD-TRAILER`,"x-amz-trailer":r},delete T[`content-length`]}else if(!P(r,f)){let e=await ee(a,d);T={...f,[r]:p(e)}}}try{return await o({...c,request:{...l,headers:T,body:w}})}catch(e){if(e instanceof Error&&e.name===`InvalidChunkSizeError`)try{e.message.endsWith(`.`)||(e.message+=`.`),e.message+=` Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream.`}catch{}throw e}},V={name:`flexibleChecksumsInputMiddleware`,toMiddleware:`serializerMiddleware`,relation:`before`,tags:[`BODY_CHECKSUM`],override:!0},ne=(e,t)=>(r,i)=>async a=>{let o=a.input,{requestValidationModeMember:s}=t,c=await e.requestChecksumCalculation(),l=await e.responseChecksumValidation();switch(c){case y.WHEN_REQUIRED:n.setFeature(i,`FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED`,`a`);break;case y.WHEN_SUPPORTED:n.setFeature(i,`FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED`,`Z`);break}switch(l){case x.WHEN_REQUIRED:n.setFeature(i,`FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED`,`c`);break;case x.WHEN_SUPPORTED:n.setFeature(i,`FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED`,`b`);break}return s&&!o[s]&&l===x.WHEN_SUPPORTED&&(o[s]=`ENABLED`),r(a)},re=(e=[])=>{let t=[],n=R.length;for(let r of e){let e=R.indexOf(r);e===-1?t[n++]=r:t[e]=r}return t.filter(Boolean)},H=e=>{let t=e.lastIndexOf(`-`);if(t!==-1){let n=e.slice(t+1);if(!n.startsWith(`0`)){let e=parseInt(n,10);if(!isNaN(e)&&e>=1&&e<=1e4)return!0}}return!1},ie=async(e,{checksumAlgorithmFn:t,base64Encoder:n})=>n(await ee(t,e)),ae=async(e,{config:n,responseAlgorithms:r,logger:a})=>{let o=re(r),{body:s,headers:c}=e;for(let r of o){let o=N(r),l=c[o];if(l){let c;try{c=z(r,n)}catch(e){if(r===t.ChecksumAlgorithm.CRC64NVME){a?.warn(`Skipping ${t.ChecksumAlgorithm.CRC64NVME} checksum validation: ${e.message}`);continue}throw e}let{base64Encoder:u}=n;if(I(s)){e.body=i.createChecksumStream({expectedChecksum:l,checksumSourceLocation:o,checksum:new c,source:s,base64Encoder:u});return}let d=await ie(s,{checksumAlgorithmFn:c,base64Encoder:u});if(d===l)break;throw Error(`Checksum mismatch: expected "${d}" but received "${l}" in response header "${o}".`)}}},oe={name:`flexibleChecksumsResponseMiddleware`,toMiddleware:`deserializerMiddleware`,relation:`after`,tags:[`BODY_CHECKSUM`],override:!0},se=(e,t)=>(n,i)=>async a=>{if(!r.HttpRequest.isInstance(a.request))return n(a);let o=a.input,s=await n(a),c=s.response,{requestValidationModeMember:l,responseAlgorithms:u}=t;if(l&&o[l]===`ENABLED`){let{clientName:t,commandName:n}=i,r=Object.keys(e.checksumAlgorithms??{}).filter(e=>{let t=N(e);return c.headers[t]!==void 0}),a=re([...u??[],...r]);if(t===`S3Client`&&n===`GetObjectCommand`&&a.every(e=>{let t=N(e),n=c.headers[t];return!n||H(n)}))return s;await ae(c,{config:e,responseAlgorithms:a,logger:i.logger})}return s};t.CONFIG_REQUEST_CHECKSUM_CALCULATION=D,t.CONFIG_RESPONSE_CHECKSUM_VALIDATION=A,t.DEFAULT_CHECKSUM_ALGORITHM=C,t.DEFAULT_REQUEST_CHECKSUM_CALCULATION=b,t.DEFAULT_RESPONSE_CHECKSUM_VALIDATION=S,t.ENV_REQUEST_CHECKSUM_CALCULATION=E,t.ENV_RESPONSE_CHECKSUM_VALIDATION=k,t.NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS=O,t.NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS=j,t.RequestChecksumCalculation=y,t.ResponseChecksumValidation=x,t.flexibleChecksumsMiddleware=te,t.flexibleChecksumsMiddlewareOptions=B,t.getFlexibleChecksumsPlugin=(e,t)=>({applyToStack:n=>{n.add(te(e,t),B),n.addRelativeTo(ne(e,t),V),n.addRelativeTo(se(e,t),oe)}}),t.resolveFlexibleChecksumsConfig=e=>{let{requestChecksumCalculation:t,responseChecksumValidation:n,requestStreamBufferSize:r}=e;return Object.assign(e,{requestChecksumCalculation:v.normalizeProvider(t??b),responseChecksumValidation:v.normalizeProvider(n??S),requestStreamBufferSize:Number(r??0),checksumAlgorithms:e.checksumAlgorithms??{}})}})),Nk=i((e=>{e.build=e=>{let{partition:t=`aws`,service:n,region:r,accountId:i,resource:a}=e;if([n,r,i,a].some(e=>typeof e!=`string`))throw Error(`Input ARN object is invalid`);return`arn:${t}:${n}:${r}:${i}:${a}`},e.parse=e=>{let t=e.split(`:`);if(t.length<6||t[0]!==`arn`)throw Error(`Malformed ARN`);let[,n,r,i,a,...o]=t;return{partition:n,service:r,region:i,accountId:a,resource:o.join(`:`)}},e.validate=e=>typeof e==`string`&&e.indexOf(`arn:`)===0&&e.split(`:`).length>=6})),Pk=i((t=>{var n=a(),r=b(),i=p(),c=Nk(),l=(x(),e(T)),u=(y(),e(d)),f=S(),m=E(),g=(o(),e(s)),v=(k(),e(ne)),C=h();function w(){return(e,t)=>async i=>{let{request:a}=i;if(n.HttpRequest.isInstance(a)&&!(`content-length`in a.headers)&&!(`x-amz-decoded-content-length`in a.headers)){let e=`Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`;typeof t?.logger?.warn==`function`&&!(t.logger instanceof r.NoOpLogger)?t.logger.warn(e):console.warn(e)}return e({...i})}}let D={step:`finalizeRequest`,tags:[`CHECK_CONTENT_LENGTH_HEADER`],name:`getCheckContentLengthHeaderPlugin`,override:!0},O=e=>({applyToStack:e=>{e.add(w(),D)}}),A=e=>(t,n)=>async r=>{let i=await e.region(),a=e.region,o=()=>{};n.__s3RegionRedirect&&(Object.defineProperty(e,`region`,{writable:!1,value:async()=>n.__s3RegionRedirect}),o=()=>Object.defineProperty(e,`region`,{writable:!0,value:a}));try{let a=await t(r);if(n.__s3RegionRedirect&&(o(),i!==await e.region()))throw Error(`Region was not restored following S3 region redirect.`);return a}catch(e){throw o(),e}},j={tags:[`REGION_REDIRECT`,`S3`],name:`regionRedirectEndpointMiddleware`,override:!0,relation:`before`,toMiddleware:`endpointV2Middleware`};function M(e){return(t,n)=>async r=>{try{return await t(r)}catch(i){if(e.followRegionRedirects){let a=i?.$metadata?.httpStatusCode,o=n.commandName===`HeadBucketCommand`,s=i?.$response?.headers?.[`x-amz-bucket-region`];if(s&&(a===301||a===400&&(i?.name===`IllegalLocationConstraintException`||o))){try{let t=s;n.logger?.debug(`Redirecting from ${await e.region()} to ${t}`),n.__s3RegionRedirect=t}catch(e){throw Error(`Region redirect failed: `+e)}return t(r)}}throw i}}}let N={step:`initialize`,tags:[`REGION_REDIRECT`,`S3`],name:`regionRedirectMiddleware`,override:!0},P=e=>({applyToStack:t=>{t.add(M(e),N),t.addRelativeTo(A(e),j)}}),F=e=>(e,t)=>async i=>{let a=await e(i),{response:o}=a;if(n.HttpResponse.isInstance(o)&&o.headers.expires){o.headers.expiresstring=o.headers.expires;try{r.parseRfc7231DateTime(o.headers.expires)}catch(e){t.logger?.warn(`AWS SDK Warning for ${t.clientName}::${t.commandName} response parsing (${o.headers.expires}): ${e}`),delete o.headers.expires}}return a},I={tags:[`S3`],name:`s3ExpiresMiddleware`,override:!0,relation:`after`,toMiddleware:`deserializerMiddleware`},L=e=>({applyToStack:e=>{e.addRelativeTo(F(),I)}});var R=class e{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(e={}){this.data=e}get(e){let t=this.data[e];if(t)return t}set(e,t){return this.data[e]=t,t}delete(e){delete this.data[e]}async purgeExpired(){let t=Date.now();if(!(this.lastPurgeTime+e.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>t))for(let e in this.data){let n=this.data[e];if(!n.isRefreshing){let r=await n.identity;r.expiration&&r.expiration.getTime()(t.expiration?.getTime()??0){i.set(r,new z(Promise.resolve(e)))})),t)):i.set(r,new z(this.getIdentity(r))).identity}async getIdentity(e){await this.cache.purgeExpired().catch(e=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache: -`+e)});let t=await this.createSessionFn(e);if(!t.Credentials?.AccessKeyId||!t.Credentials?.SecretAccessKey)throw Error(`s3#createSession response credential missing AccessKeyId or SecretAccessKey.`);return{accessKeyId:t.Credentials.AccessKeyId,secretAccessKey:t.Credentials.SecretAccessKey,sessionToken:t.Credentials.SessionToken,expiration:t.Credentials.Expiration?new Date(t.Credentials.Expiration):void 0}}};let B=`X-Amz-S3session-Token`,te=`x-amz-s3session-token`,V={environmentVariableSelector:e=>m.booleanSelector(e,`AWS_S3_DISABLE_EXPRESS_SESSION_AUTH`,m.SelectorType.ENV),configFileSelector:e=>m.booleanSelector(e,`s3_disable_express_session_auth`,m.SelectorType.CONFIG),default:!1};var re=class extends f.SignatureV4{async signWithCredentials(e,t,n){let r=H(t);e.headers[te]=t.sessionToken;let i=this;return ie(i,r),i.signRequest(e,n??{})}async presignWithCredentials(e,t,n){let r=H(t);return delete e.headers[te],e.headers[B]=t.sessionToken,e.query=e.query??{},e.query[B]=t.sessionToken,ie(this,r),this.presign(e,n)}};function H(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function ie(e,t){let n=setTimeout(()=>{throw Error(`SignatureV4S3Express credential override was created but not called.`)},10),r=e.credentialProvider;e.credentialProvider=()=>(clearTimeout(n),e.credentialProvider=r,Promise.resolve(t))}let ae=e=>(t,r)=>async i=>{if(r.endpointV2){let t=r.endpointV2,a=t.properties?.authSchemes?.[0]?.name===`sigv4-s3express`;if((t.properties?.backend===`S3Express`||t.properties?.bucketType===`Directory`)&&(g.setFeature(r,`S3_EXPRESS_BUCKET`,`J`),r.isS3ExpressBucket=!0),a){let t=i.input.Bucket;if(t){let a=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:t});r.s3ExpressIdentity=a,n.HttpRequest.isInstance(i.request)&&a.sessionToken&&(i.request.headers[te]=a.sessionToken)}}}return t(i)},oe={name:`s3ExpressMiddleware`,step:`build`,tags:[`S3`,`S3_EXPRESS`],override:!0},se=e=>({applyToStack:t=>{t.add(ae(e),oe)}}),ce=async(e,t,n,r)=>{let i=await r.signWithCredentials(n,e,{});if(i.headers[`X-Amz-Security-Token`]||i.headers[`x-amz-security-token`])throw Error(`X-Amz-Security-Token must not be set for s3-express requests.`);return i},le=e=>e=>{throw e},ue=(e,t)=>{},de=v.httpSigningMiddlewareOptions,fe=e=>(t,r)=>async i=>{if(!n.HttpRequest.isInstance(i.request))return t(i);let a=C.getSmithyContext(r).selectedHttpAuthScheme;if(!a)throw Error(`No HttpAuthScheme was selected: unable to sign request`);let{httpAuthOption:{signingProperties:o={}},identity:s,signer:c}=a,l;l=r.s3ExpressIdentity?await ce(r.s3ExpressIdentity,o,i.request,await e.signer()):await c.sign(i.request,s,o);let u=await t({...i,request:l}).catch((c.errorHandler||le)(o));return(c.successHandler||ue)(u.response,o),u},pe=e=>({applyToStack:t=>{t.addRelativeTo(fe(e),v.httpSigningMiddlewareOptions)}}),me=(e,{session:t})=>{let[n,r]=t,{forcePathStyle:i,useAccelerateEndpoint:a,disableMultiregionAccessPoints:o,followRegionRedirects:s,s3ExpressIdentityProvider:c,bucketEndpoint:l,expectContinueHeader:u}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:a??!1,disableMultiregionAccessPoints:o??!1,followRegionRedirects:s??!1,s3ExpressIdentityProvider:c??new ee(async e=>n().send(new r({Bucket:e}))),bucketEndpoint:l??!1,expectContinueHeader:u??2097152})},he={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},ge=e=>(t,r)=>async a=>{let o=await t(a),{response:s}=o;if(!n.HttpResponse.isInstance(s))return o;let{statusCode:c,body:l}=s;if(c<200||c>=300||!(typeof l?.stream==`function`||typeof l?.pipe==`function`||typeof l?.tee==`function`))return o;let u=l,d=l;l&&typeof l==`object`&&!(l instanceof Uint8Array)&&([u,d]=await i.splitStream(l)),s.body=d;let f=await _e(u,{streamCollector:async e=>i.headStream(e,3e3)});typeof u?.destroy==`function`&&u.destroy();let p=e.utf8Encoder(f.subarray(f.length-16));if(f.length===0&&he[r.commandName]){let e=Error(`S3 aborted request`);throw e.name=`InternalError`,e}return p&&p.endsWith(``)&&(s.statusCode=400),o},_e=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),U={relation:`after`,toMiddleware:`deserializerMiddleware`,tags:[`THROW_200_EXCEPTIONS`,`S3`],name:`throw200ExceptionsMiddleware`,override:!0},ve=e=>({applyToStack:t=>{t.addRelativeTo(ge(e),U)}});function ye(e){return(t,n)=>async r=>{if(e.bucketEndpoint){let e=n.endpointV2;if(e){let t=r.input.Bucket;if(typeof t==`string`)try{let r=new URL(t);n.endpointV2={...e,url:r}}catch(e){let r=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${t} could not be parsed as URL.`;throw n.logger?.constructor?.name===`NoOpLogger`?console.warn(r):n.logger?.warn?.(r),e}}}return t(r)}}let be={name:`bucketEndpointMiddleware`,override:!0,relation:`after`,toMiddleware:`endpointV2Middleware`};function xe({bucketEndpoint:e}){return t=>async n=>{let{input:{Bucket:r}}=n;if(!e&&typeof r==`string`&&!c.validate(r)&&r.indexOf(`/`)>=0){let e=Error(`Bucket name shouldn't contain '/', received '${r}'`);throw e.name=`InvalidBucketName`,e}return t({...n})}}let Se={step:`initialize`,tags:[`VALIDATE_BUCKET_NAME`],name:`validateBucketNameMiddleware`,override:!0},Ce=e=>({applyToStack:t=>{t.add(xe(e),Se),t.addRelativeTo(ye(e),be)}});var we=class extends l.AwsRestXmlProtocol{async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n),i=u.NormalizedSchema.of(e.input),a=i.getSchema(),o=0,s=a[6]??0;if(t&&typeof t==`object`)for(let[e,n]of i.structIterator()){if(++o>s)break;if(e===`Bucket`){if(!t.Bucket&&n.getMergedTraits().httpLabel)throw Error(`No value provided for input HTTP label: Bucket.`);break}}return r}};t.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS=V,t.S3ExpressIdentityCache=R,t.S3ExpressIdentityCacheEntry=z,t.S3ExpressIdentityProviderImpl=ee,t.S3RestXmlProtocol=we,t.SignatureV4S3Express=re,t.checkContentLengthHeader=w,t.checkContentLengthHeaderMiddlewareOptions=D,t.getCheckContentLengthHeaderPlugin=O,t.getRegionRedirectMiddlewarePlugin=P,t.getS3ExpiresMiddlewarePlugin=L,t.getS3ExpressHttpSigningPlugin=pe,t.getS3ExpressPlugin=se,t.getThrow200ExceptionsPlugin=ve,t.getValidateBucketNamePlugin=Ce,t.regionRedirectEndpointMiddleware=A,t.regionRedirectEndpointMiddlewareOptions=j,t.regionRedirectMiddleware=M,t.regionRedirectMiddlewareOptions=N,t.resolveS3Config=me,t.s3ExpiresMiddleware=F,t.s3ExpiresMiddlewareOptions=I,t.s3ExpressHttpSigningMiddleware=fe,t.s3ExpressHttpSigningMiddlewareOptions=de,t.s3ExpressMiddleware=ae,t.s3ExpressMiddlewareOptions=oe,t.throw200ExceptionsMiddleware=ge,t.throw200ExceptionsMiddlewareOptions=U,t.validateBucketNameMiddleware=xe,t.validateBucketNameMiddlewareOptions=Se})),Fk=i((e=>{e.resolveEventStreamSerdeConfig=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)})})),Ik=i((e=>{var t=Pk(),n=S();let r={CrtSignerV4:null};e.SignatureV4MultiRegion=class{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return typeof r.CrtSignerV4==`function`?`crt`:typeof n.signatureV4aContainer.SignatureV4a==`function`?`js`:`none`}constructor(e){this.sigv4Signer=new t.SignatureV4S3Express(e),this.signerOptions=e}async sign(e,t={}){return t.signingRegion===`*`?this.getSigv4aSigner().sign(e,t):this.sigv4Signer.sign(e,t)}async signWithCredentials(e,t,n={}){if(n.signingRegion===`*`){let i=this.getSigv4aSigner(),a=r.CrtSignerV4;if(a&&i instanceof a)return i.signWithCredentials(e,t,n);throw 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,t,n)}async presign(e,t={}){if(t.signingRegion===`*`){let n=this.getSigv4aSigner(),i=r.CrtSignerV4;if(i&&n instanceof i)return n.presign(e,t);throw 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,t)}async presignWithCredentials(e,t,n={}){if(n.signingRegion===`*`)throw Error(`Method presignWithCredentials is not supported for [signingRegion=*].`);return this.sigv4Signer.presignWithCredentials(e,t,n)}getSigv4aSigner(){if(!this.sigv4aSigner){let e=r.CrtSignerV4,t=n.signatureV4aContainer.SignatureV4a;if(this.signerOptions.runtime===`node`){if(!e&&!t)throw Error(`Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);if(e&&typeof e==`function`)this.sigv4aSigner=new e({...this.signerOptions,signingAlgorithm:1});else if(t&&typeof t==`function`)this.sigv4aSigner=new t({...this.signerOptions});else throw Error(`Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}else{if(!t||typeof t!=`function`)throw Error(`JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a`);this.sigv4aSigner=new t({...this.signerOptions})}}return this.sigv4aSigner}},e.signatureV4CrtContainer=r})),Lk=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ruleSet=void 0;let t=`required`,n=`type`,r=`rules`,i=`conditions`,a=`argv`,o=`assign`,s=`properties`,c=`backend`,l=`authSchemes`,u=`disableDoubleEncoding`,d=`signingName`,f=`signingRegion`,p=`headers`,m=`signingRegionSet`,h=`isSet`,g=`booleanEquals`,v=`error`,y=`aws.partition`,b=`stringEquals`,x=`getAttr`,S=`name`,C=`substring`,w=`bucketSuffix`,T=`parseURL`,E=`endpoint`,D=`tree`,O=`aws.isVirtualHostableS3Bucket`,k=`{url#scheme}://{Bucket}.{url#authority}{url#path}`,A=`accessPointSuffix`,j=`{url#scheme}://{url#authority}{url#path}`,M=`hardwareType`,N=`regionPrefix`,P=`bucketAliasSuffix`,F=`outpostId`,I=`isValidHostLabel`,L=`sigv4a`,R=`s3-outposts`,z=`{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}`,ee=`https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}`,B=`https://{Bucket}.s3.{partitionResult#dnsSuffix}`,te=`aws.parseArn`,V=`bucketArn`,ne=`arnType`,re=`s3-object-lambda`,H=`accesspoint`,ie=`accessPointName`,ae=`{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}`,oe=`mrapPartition`,se=`outpostType`,ce=`arnPrefix`,le=`{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}`,ue=`https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,de=`https://s3.{partitionResult#dnsSuffix}`,fe={[t]:!1,[n]:`string`},pe={[t]:!0,default:!1,[n]:`boolean`},me={[t]:!1,[n]:`boolean`},he={fn:g,[a]:[{ref:`Accelerate`},!0]},ge={fn:g,[a]:[{ref:`UseFIPS`},!0]},_e={fn:g,[a]:[{ref:`UseDualStack`},!0]},U={fn:h,[a]:[{ref:`Endpoint`}]},ve={fn:y,[a]:[{ref:`Region`}],[o]:`partitionResult`},ye={fn:b,[a]:[{fn:x,[a]:[{ref:`partitionResult`},S]},`aws-cn`]},be={fn:h,[a]:[{ref:`Bucket`}]},xe={ref:`Bucket`},Se={[i]:[he],[v]:`S3Express does not support S3 Accelerate.`,[n]:v},Ce={[i]:[U,{fn:T,[a]:[{ref:`Endpoint`}],[o]:`url`}],[r]:[{[i]:[{fn:h,[a]:[{ref:`DisableS3ExpressSessionAuth`}]},{fn:g,[a]:[{ref:`DisableS3ExpressSessionAuth`},!0]}],[r]:[{[i]:[{fn:g,[a]:[{fn:x,[a]:[{ref:`url`},`isIp`]},!0]}],[r]:[{[i]:[{fn:`uriEncode`,[a]:[xe],[o]:`uri_encoded_bucket`}],[r]:[{[E]:{url:`{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}`,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E}],[n]:D}],[n]:D},{[i]:[{fn:O,[a]:[xe,!1]}],[r]:[{[E]:{url:k,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E}],[n]:D},{[v]:`S3Express bucket name is not a valid virtual hostable name.`,[n]:v}],[n]:D},{[i]:[{fn:g,[a]:[{fn:x,[a]:[{ref:`url`},`isIp`]},!0]}],[r]:[{[i]:[{fn:`uriEncode`,[a]:[xe],[o]:`uri_encoded_bucket`}],[r]:[{[E]:{url:`{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}`,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4-s3express`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E}],[n]:D}],[n]:D},{[i]:[{fn:O,[a]:[xe,!1]}],[r]:[{[E]:{url:k,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4-s3express`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E}],[n]:D},{[v]:`S3Express bucket name is not a valid virtual hostable name.`,[n]:v}],[n]:D},we={fn:T,[a]:[{ref:`Endpoint`}],[o]:`url`},Te={fn:g,[a]:[{fn:x,[a]:[{ref:`url`},`isIp`]},!0]},Ee={ref:`url`},De={fn:`uriEncode`,[a]:[xe],[o]:`uri_encoded_bucket`},Oe={[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3express`,[f]:`{Region}`}]},W={},ke={fn:O,[a]:[xe,!1]},Ae={[v]:`S3Express bucket name is not a valid virtual hostable name.`,[n]:v},je={fn:h,[a]:[{ref:`UseS3ExpressControlEndpoint`}]},Me={fn:g,[a]:[{ref:`UseS3ExpressControlEndpoint`},!0]},Ne={fn:`not`,[a]:[U]},Pe={fn:g,[a]:[{ref:`UseDualStack`},!1]},Fe={fn:g,[a]:[{ref:`UseFIPS`},!1]},Ie={[v]:`Unrecognized S3Express bucket name format.`,[n]:v},Le={fn:`not`,[a]:[be]},Re={ref:M},ze={[i]:[Ne],[v]:`Expected a endpoint to be specified but no endpoint was found`,[n]:v},Be={[l]:[{[u]:!0,[S]:L,[d]:R,[m]:[`*`]},{[u]:!0,[S]:`sigv4`,[d]:R,[f]:`{Region}`}]},Ve={fn:g,[a]:[{ref:`ForcePathStyle`},!1]},He={ref:`ForcePathStyle`},Ue={fn:g,[a]:[{ref:`Accelerate`},!1]},We={fn:b,[a]:[{ref:`Region`},`aws-global`]},Ge={[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3`,[f]:`us-east-1`}]},Ke={fn:`not`,[a]:[We]},qe={fn:g,[a]:[{ref:`UseGlobalEndpoint`},!0]},Je={url:`https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:{[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3`,[f]:`{Region}`}]},[p]:{}},G={[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3`,[f]:`{Region}`}]},Ye={fn:g,[a]:[{ref:`UseGlobalEndpoint`},!1]},Xe={url:`https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},Ze={url:`https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},Qe={url:`https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},$e={fn:g,[a]:[{fn:x,[a]:[Ee,`isIp`]},!1]},et={url:z,[s]:G,[p]:{}},tt={url:k,[s]:G,[p]:{}},nt={[E]:tt,[n]:E},rt={url:ee,[s]:G,[p]:{}},it={url:`https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},at={[v]:`Invalid region: region was not a valid DNS name.`,[n]:v},ot={ref:V},st={ref:ne},ct={fn:x,[a]:[ot,`service`]},lt={ref:ie},ut={[i]:[_e],[v]:`S3 Object Lambda does not support Dual-stack`,[n]:v},dt={[i]:[he],[v]:`S3 Object Lambda does not support S3 Accelerate`,[n]:v},ft={[i]:[{fn:h,[a]:[{ref:`DisableAccessPoints`}]},{fn:g,[a]:[{ref:`DisableAccessPoints`},!0]}],[v]:`Access points are not supported for this operation`,[n]:v},pt={[i]:[{fn:h,[a]:[{ref:`UseArnRegion`}]},{fn:g,[a]:[{ref:`UseArnRegion`},!1]},{fn:`not`,[a]:[{fn:b,[a]:[{fn:x,[a]:[ot,`region`]},`{Region}`]}]}],[v]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[n]:v},mt={fn:x,[a]:[{ref:`bucketPartition`},S]},ht={fn:x,[a]:[ot,`accountId`]},gt={[l]:[{[u]:!0,[S]:`sigv4`,[d]:re,[f]:`{bucketArn#region}`}]},_t={[v]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[n]:v},vt={[v]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[n]:v},yt={[v]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[n]:v},bt={[v]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[n]:v},xt={[v]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[n]:v},St={[v]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[n]:v},Ct={[l]:[{[u]:!0,[S]:`sigv4`,[d]:`s3`,[f]:`{bucketArn#region}`}]},wt={[l]:[{[u]:!0,[S]:L,[d]:R,[m]:[`*`]},{[u]:!0,[S]:`sigv4`,[d]:R,[f]:`{bucketArn#region}`}]},Tt={fn:te,[a]:[xe]},Et={url:`https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:G,[p]:{}},Dt={url:`https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:G,[p]:{}},Ot={url:`https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:G,[p]:{}},kt={url:le,[s]:G,[p]:{}},At={url:`https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:G,[p]:{}},jt={ref:`UseObjectLambdaEndpoint`},Mt={[l]:[{[u]:!0,[S]:`sigv4`,[d]:re,[f]:`{Region}`}]},Nt={url:`https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},Pt={url:`https://s3-fips.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},Ft={url:`https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},It={url:j,[s]:G,[p]:{}},Lt={url:`https://s3.{Region}.{partitionResult#dnsSuffix}`,[s]:G,[p]:{}},Rt=[{ref:`Region`}],zt=[{ref:`Endpoint`}],Bt=[xe],Vt=[he],Ht=[U,we],Ut=[{fn:h,[a]:[{ref:`DisableS3ExpressSessionAuth`}]},{fn:g,[a]:[{ref:`DisableS3ExpressSessionAuth`},!0]}],Wt=[De],Gt=[ke],Kt=[ve],qt=[ge,_e],Jt=[ge,Pe],Yt=[Fe,_e],Xt=[Fe,Pe],Zt=[{fn:C,[a]:[xe,6,14,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,14,16,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],Qt=[{[i]:[ge,_e],[E]:{url:`https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:{}},[n]:E},{[i]:Jt,[E]:{url:`https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:{}},[n]:E},{[i]:Yt,[E]:{url:`https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:{}},[n]:E},{[i]:Xt,[E]:{url:`https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:{}},[n]:E}],$t=[{fn:C,[a]:[xe,6,15,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,15,17,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],en=[{fn:C,[a]:[xe,6,19,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,19,21,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],tn=[{fn:C,[a]:[xe,6,20,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,20,22,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],nn=[{fn:C,[a]:[xe,6,26,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,26,28,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],rn=[{[i]:[ge,_e],[E]:{url:`https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4-s3express`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E},{[i]:Jt,[E]:{url:`https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}`,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4-s3express`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E},{[i]:Yt,[E]:{url:`https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4-s3express`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E},{[i]:Xt,[E]:{url:`https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}`,[s]:{[c]:`S3Express`,[l]:[{[u]:!0,[S]:`sigv4-s3express`,[d]:`s3express`,[f]:`{Region}`}]},[p]:{}},[n]:E}],an=[xe,0,7,!0],on=[{fn:C,[a]:[xe,7,15,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,15,17,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],sn=[{fn:C,[a]:[xe,7,16,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,16,18,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],cn=[{fn:C,[a]:[xe,7,20,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,20,22,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],ln=[{fn:C,[a]:[xe,7,21,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,21,23,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],un=[{fn:C,[a]:[xe,7,27,!0],[o]:`s3expressAvailabilityZoneId`},{fn:C,[a]:[xe,27,29,!0],[o]:`s3expressAvailabilityZoneDelim`},{fn:b,[a]:[{ref:`s3expressAvailabilityZoneDelim`},`--`]}],dn=[be],fn=[{fn:I,[a]:[{ref:F},!1]}],pn=[{fn:b,[a]:[{ref:N},`beta`]}],mn=[`*`],hn=[{fn:I,[a]:[{ref:`Region`},!1]}],gn=[{fn:b,[a]:[{ref:`Region`},`us-east-1`]}],_n=[{fn:b,[a]:[st,H]}],vn=[{fn:x,[a]:[ot,`resourceId[1]`],[o]:ie},{fn:`not`,[a]:[{fn:b,[a]:[lt,``]}]}],yn=[ot,`resourceId[1]`],bn=[_e],xn=[{fn:`not`,[a]:[{fn:b,[a]:[{fn:x,[a]:[ot,`region`]},``]}]}],Sn=[{fn:`not`,[a]:[{fn:h,[a]:[{fn:x,[a]:[ot,`resourceId[2]`]}]}]}],Cn=[ot,`resourceId[2]`],wn=[{fn:y,[a]:[{fn:x,[a]:[ot,`region`]}],[o]:`bucketPartition`}],Tn=[{fn:b,[a]:[mt,{fn:x,[a]:[{ref:`partitionResult`},S]}]}],En=[{fn:I,[a]:[{fn:x,[a]:[ot,`region`]},!0]}],Dn=[{fn:I,[a]:[ht,!1]}],On=[{fn:I,[a]:[lt,!1]}],kn=[ge],An=[{fn:I,[a]:[{ref:`Region`},!0]}];e.ruleSet={version:`1.0`,parameters:{Bucket:fe,Region:fe,UseFIPS:pe,UseDualStack:pe,Endpoint:fe,ForcePathStyle:pe,Accelerate:pe,UseGlobalEndpoint:pe,UseObjectLambdaEndpoint:me,Key:fe,Prefix:fe,CopySource:fe,DisableAccessPoints:me,DisableMultiRegionAccessPoints:pe,UseArnRegion:me,UseS3ExpressControlEndpoint:me,DisableS3ExpressSessionAuth:me},[r]:[{[i]:[{fn:h,[a]:Rt}],[r]:[{[i]:[he,ge],error:`Accelerate cannot be used with FIPS`,[n]:v},{[i]:[_e,U],error:`Cannot set dual-stack in combination with a custom endpoint.`,[n]:v},{[i]:[U,ge],error:`A custom endpoint cannot be combined with FIPS`,[n]:v},{[i]:[U,he],error:`A custom endpoint cannot be combined with S3 Accelerate`,[n]:v},{[i]:[ge,ve,ye],error:`Partition does not support FIPS`,[n]:v},{[i]:[be,{fn:C,[a]:[xe,0,6,!0],[o]:w},{fn:b,[a]:[{ref:w},`--x-s3`]}],[r]:[Se,Ce,{[i]:[je,Me],[r]:[{[i]:Kt,[r]:[{[i]:[De,Ne],[r]:[{[i]:qt,endpoint:{url:`https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Oe,[p]:W},[n]:E},{[i]:Jt,endpoint:{url:`https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Oe,[p]:W},[n]:E},{[i]:Yt,endpoint:{url:`https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Oe,[p]:W},[n]:E},{[i]:Xt,endpoint:{url:`https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Oe,[p]:W},[n]:E}],[n]:D}],[n]:D}],[n]:D},{[i]:Gt,[r]:[{[i]:Kt,[r]:[{[i]:Ut,[r]:[{[i]:Zt,[r]:Qt,[n]:D},{[i]:$t,[r]:Qt,[n]:D},{[i]:en,[r]:Qt,[n]:D},{[i]:tn,[r]:Qt,[n]:D},{[i]:nn,[r]:Qt,[n]:D},Ie],[n]:D},{[i]:Zt,[r]:rn,[n]:D},{[i]:$t,[r]:rn,[n]:D},{[i]:en,[r]:rn,[n]:D},{[i]:tn,[r]:rn,[n]:D},{[i]:nn,[r]:rn,[n]:D},Ie],[n]:D}],[n]:D},Ae],[n]:D},{[i]:[be,{fn:C,[a]:an,[o]:A},{fn:b,[a]:[{ref:A},`--xa-s3`]}],[r]:[Se,Ce,{[i]:Gt,[r]:[{[i]:Kt,[r]:[{[i]:Ut,[r]:[{[i]:on,[r]:Qt,[n]:D},{[i]:sn,[r]:Qt,[n]:D},{[i]:cn,[r]:Qt,[n]:D},{[i]:ln,[r]:Qt,[n]:D},{[i]:un,[r]:Qt,[n]:D},Ie],[n]:D},{[i]:on,[r]:rn,[n]:D},{[i]:sn,[r]:rn,[n]:D},{[i]:cn,[r]:rn,[n]:D},{[i]:ln,[r]:rn,[n]:D},{[i]:un,[r]:rn,[n]:D},Ie],[n]:D}],[n]:D},Ae],[n]:D},{[i]:[Le,je,Me],[r]:[{[i]:Kt,[r]:[{[i]:Ht,endpoint:{url:j,[s]:Oe,[p]:W},[n]:E},{[i]:qt,endpoint:{url:`https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:W},[n]:E},{[i]:Jt,endpoint:{url:`https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:W},[n]:E},{[i]:Yt,endpoint:{url:`https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:W},[n]:E},{[i]:Xt,endpoint:{url:`https://s3express-control.{Region}.{partitionResult#dnsSuffix}`,[s]:Oe,[p]:W},[n]:E}],[n]:D}],[n]:D},{[i]:[be,{fn:C,[a]:[xe,49,50,!0],[o]:M},{fn:C,[a]:[xe,8,12,!0],[o]:N},{fn:C,[a]:an,[o]:P},{fn:C,[a]:[xe,32,49,!0],[o]:F},{fn:y,[a]:Rt,[o]:`regionPartition`},{fn:b,[a]:[{ref:P},`--op-s3`]}],[r]:[{[i]:fn,[r]:[{[i]:Gt,[r]:[{[i]:[{fn:b,[a]:[Re,`e`]}],[r]:[{[i]:pn,[r]:[ze,{[i]:Ht,endpoint:{url:`https://{Bucket}.ec2.{url#authority}`,[s]:Be,[p]:W},[n]:E}],[n]:D},{endpoint:{url:`https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}`,[s]:Be,[p]:W},[n]:E}],[n]:D},{[i]:[{fn:b,[a]:[Re,`o`]}],[r]:[{[i]:pn,[r]:[ze,{[i]:Ht,endpoint:{url:`https://{Bucket}.op-{outpostId}.{url#authority}`,[s]:Be,[p]:W},[n]:E}],[n]:D},{endpoint:{url:`https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}`,[s]:Be,[p]:W},[n]:E}],[n]:D},{error:`Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"`,[n]:v}],[n]:D},{error:`Invalid Outposts Bucket alias - it must be a valid bucket name.`,[n]:v}],[n]:D},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[n]:v}],[n]:D},{[i]:dn,[r]:[{[i]:[U,{fn:`not`,[a]:[{fn:h,[a]:[{fn:T,[a]:zt}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[n]:v},{[i]:[Ve,ke],[r]:[{[i]:Kt,[r]:[{[i]:hn,[r]:[{[i]:[he,ye],error:`S3 Accelerate cannot be used in this region`,[n]:v},{[i]:[_e,ge,Ue,Ne,We],endpoint:{url:`https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[_e,ge,Ue,Ne,Ke,qe],[r]:[{endpoint:Je,[n]:E}],[n]:D},{[i]:[_e,ge,Ue,Ne,Ke,Ye],endpoint:Je,[n]:E},{[i]:[Pe,ge,Ue,Ne,We],endpoint:{url:`https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,ge,Ue,Ne,Ke,qe],[r]:[{endpoint:Xe,[n]:E}],[n]:D},{[i]:[Pe,ge,Ue,Ne,Ke,Ye],endpoint:Xe,[n]:E},{[i]:[_e,Fe,he,Ne,We],endpoint:{url:`https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[_e,Fe,he,Ne,Ke,qe],[r]:[{endpoint:Ze,[n]:E}],[n]:D},{[i]:[_e,Fe,he,Ne,Ke,Ye],endpoint:Ze,[n]:E},{[i]:[_e,Fe,Ue,Ne,We],endpoint:{url:`https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[_e,Fe,Ue,Ne,Ke,qe],[r]:[{endpoint:Qe,[n]:E}],[n]:D},{[i]:[_e,Fe,Ue,Ne,Ke,Ye],endpoint:Qe,[n]:E},{[i]:[Pe,Fe,Ue,U,we,Te,We],endpoint:{url:z,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,Fe,Ue,U,we,$e,We],endpoint:{url:k,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,Fe,Ue,U,we,Te,Ke,qe],[r]:[{[i]:gn,endpoint:et,[n]:E},{endpoint:et,[n]:E}],[n]:D},{[i]:[Pe,Fe,Ue,U,we,$e,Ke,qe],[r]:[{[i]:gn,endpoint:tt,[n]:E},nt],[n]:D},{[i]:[Pe,Fe,Ue,U,we,Te,Ke,Ye],endpoint:et,[n]:E},{[i]:[Pe,Fe,Ue,U,we,$e,Ke,Ye],endpoint:tt,[n]:E},{[i]:[Pe,Fe,he,Ne,We],endpoint:{url:ee,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,Fe,he,Ne,Ke,qe],[r]:[{[i]:gn,endpoint:rt,[n]:E},{endpoint:rt,[n]:E}],[n]:D},{[i]:[Pe,Fe,he,Ne,Ke,Ye],endpoint:rt,[n]:E},{[i]:[Pe,Fe,Ue,Ne,We],endpoint:{url:B,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,Fe,Ue,Ne,Ke,qe],[r]:[{[i]:gn,endpoint:{url:B,[s]:G,[p]:W},[n]:E},{endpoint:it,[n]:E}],[n]:D},{[i]:[Pe,Fe,Ue,Ne,Ke,Ye],endpoint:it,[n]:E}],[n]:D},at],[n]:D}],[n]:D},{[i]:[U,we,{fn:b,[a]:[{fn:x,[a]:[Ee,`scheme`]},`http`]},{fn:O,[a]:[xe,!0]},Ve,Fe,Pe,Ue],[r]:[{[i]:Kt,[r]:[{[i]:hn,[r]:[nt],[n]:D},at],[n]:D}],[n]:D},{[i]:[Ve,{fn:te,[a]:Bt,[o]:V}],[r]:[{[i]:[{fn:x,[a]:[ot,`resourceId[0]`],[o]:ne},{fn:`not`,[a]:[{fn:b,[a]:[st,``]}]}],[r]:[{[i]:[{fn:b,[a]:[ct,re]}],[r]:[{[i]:_n,[r]:[{[i]:vn,[r]:[ut,dt,{[i]:xn,[r]:[ft,{[i]:Sn,[r]:[pt,{[i]:wn,[r]:[{[i]:Kt,[r]:[{[i]:Tn,[r]:[{[i]:En,[r]:[{[i]:[{fn:b,[a]:[ht,``]}],error:`Invalid ARN: Missing account id`,[n]:v},{[i]:Dn,[r]:[{[i]:On,[r]:[{[i]:Ht,endpoint:{url:ae,[s]:gt,[p]:W},[n]:E},{[i]:kn,endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:gt,[p]:W},[n]:E},{endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:gt,[p]:W},[n]:E}],[n]:D},_t],[n]:D},vt],[n]:D},yt],[n]:D},bt],[n]:D}],[n]:D}],[n]:D},xt],[n]:D},{error:`Invalid ARN: bucket ARN is missing a region`,[n]:v}],[n]:D},St],[n]:D},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[n]:v}],[n]:D},{[i]:_n,[r]:[{[i]:vn,[r]:[{[i]:xn,[r]:[{[i]:_n,[r]:[{[i]:xn,[r]:[ft,{[i]:Sn,[r]:[pt,{[i]:wn,[r]:[{[i]:Kt,[r]:[{[i]:[{fn:b,[a]:[mt,`{partitionResult#name}`]}],[r]:[{[i]:En,[r]:[{[i]:[{fn:b,[a]:[ct,`s3`]}],[r]:[{[i]:Dn,[r]:[{[i]:On,[r]:[{[i]:Vt,error:`Access Points do not support S3 Accelerate`,[n]:v},{[i]:qt,endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:Ct,[p]:W},[n]:E},{[i]:Jt,endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:Ct,[p]:W},[n]:E},{[i]:Yt,endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:Ct,[p]:W},[n]:E},{[i]:[Fe,Pe,U,we],endpoint:{url:ae,[s]:Ct,[p]:W},[n]:E},{[i]:Xt,endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:Ct,[p]:W},[n]:E}],[n]:D},_t],[n]:D},vt],[n]:D},{error:`Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}`,[n]:v}],[n]:D},yt],[n]:D},bt],[n]:D}],[n]:D}],[n]:D},xt],[n]:D}],[n]:D}],[n]:D},{[i]:[{fn:I,[a]:[lt,!0]}],[r]:[{[i]:bn,error:`S3 MRAP does not support dual-stack`,[n]:v},{[i]:kn,error:`S3 MRAP does not support FIPS`,[n]:v},{[i]:Vt,error:`S3 MRAP does not support S3 Accelerate`,[n]:v},{[i]:[{fn:g,[a]:[{ref:`DisableMultiRegionAccessPoints`},!0]}],error:`Invalid configuration: Multi-Region Access Point ARNs are disabled.`,[n]:v},{[i]:[{fn:y,[a]:Rt,[o]:oe}],[r]:[{[i]:[{fn:b,[a]:[{fn:x,[a]:[{ref:oe},S]},{fn:x,[a]:[ot,`partition`]}]}],[r]:[{endpoint:{url:`https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}`,[s]:{[l]:[{[u]:!0,name:L,[d]:`s3`,[m]:mn}]},[p]:W},[n]:E}],[n]:D},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[n]:v}],[n]:D}],[n]:D},{error:`Invalid Access Point Name`,[n]:v}],[n]:D},St],[n]:D},{[i]:[{fn:b,[a]:[ct,R]}],[r]:[{[i]:bn,error:`S3 Outposts does not support Dual-stack`,[n]:v},{[i]:kn,error:`S3 Outposts does not support FIPS`,[n]:v},{[i]:Vt,error:`S3 Outposts does not support S3 Accelerate`,[n]:v},{[i]:[{fn:h,[a]:[{fn:x,[a]:[ot,`resourceId[4]`]}]}],error:`Invalid Arn: Outpost Access Point ARN contains sub resources`,[n]:v},{[i]:[{fn:x,[a]:yn,[o]:F}],[r]:[{[i]:fn,[r]:[pt,{[i]:wn,[r]:[{[i]:Kt,[r]:[{[i]:Tn,[r]:[{[i]:En,[r]:[{[i]:Dn,[r]:[{[i]:[{fn:x,[a]:Cn,[o]:se}],[r]:[{[i]:[{fn:x,[a]:[ot,`resourceId[3]`],[o]:ie}],[r]:[{[i]:[{fn:b,[a]:[{ref:se},H]}],[r]:[{[i]:Ht,endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}`,[s]:wt,[p]:W},[n]:E},{endpoint:{url:`https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}`,[s]:wt,[p]:W},[n]:E}],[n]:D},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[n]:v}],[n]:D},{error:`Invalid ARN: expected an access point name`,[n]:v}],[n]:D},{error:`Invalid ARN: Expected a 4-component resource`,[n]:v}],[n]:D},vt],[n]:D},yt],[n]:D},bt],[n]:D}],[n]:D}],[n]:D},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[n]:v}],[n]:D},{error:`Invalid ARN: The Outpost Id was not set`,[n]:v}],[n]:D},{error:`Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})`,[n]:v}],[n]:D},{error:`Invalid ARN: No ARN type specified`,[n]:v}],[n]:D},{[i]:[{fn:C,[a]:[xe,0,4,!1],[o]:ce},{fn:b,[a]:[{ref:ce},`arn:`]},{fn:`not`,[a]:[{fn:h,[a]:[Tt]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[n]:v},{[i]:[{fn:g,[a]:[He,!0]},Tt],error:`Path-style addressing cannot be used with ARN buckets`,[n]:v},{[i]:Wt,[r]:[{[i]:Kt,[r]:[{[i]:[Ue],[r]:[{[i]:[_e,Ne,ge,We],endpoint:{url:`https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Ge,[p]:W},[n]:E},{[i]:[_e,Ne,ge,Ke,qe],[r]:[{endpoint:Et,[n]:E}],[n]:D},{[i]:[_e,Ne,ge,Ke,Ye],endpoint:Et,[n]:E},{[i]:[Pe,Ne,ge,We],endpoint:{url:`https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,Ne,ge,Ke,qe],[r]:[{endpoint:Dt,[n]:E}],[n]:D},{[i]:[Pe,Ne,ge,Ke,Ye],endpoint:Dt,[n]:E},{[i]:[_e,Ne,Fe,We],endpoint:{url:`https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}`,[s]:Ge,[p]:W},[n]:E},{[i]:[_e,Ne,Fe,Ke,qe],[r]:[{endpoint:Ot,[n]:E}],[n]:D},{[i]:[_e,Ne,Fe,Ke,Ye],endpoint:Ot,[n]:E},{[i]:[Pe,U,we,Fe,We],endpoint:{url:le,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,U,we,Fe,Ke,qe],[r]:[{[i]:gn,endpoint:kt,[n]:E},{endpoint:kt,[n]:E}],[n]:D},{[i]:[Pe,U,we,Fe,Ke,Ye],endpoint:kt,[n]:E},{[i]:[Pe,Ne,Fe,We],endpoint:{url:ue,[s]:Ge,[p]:W},[n]:E},{[i]:[Pe,Ne,Fe,Ke,qe],[r]:[{[i]:gn,endpoint:{url:ue,[s]:G,[p]:W},[n]:E},{endpoint:At,[n]:E}],[n]:D},{[i]:[Pe,Ne,Fe,Ke,Ye],endpoint:At,[n]:E}],[n]:D},{error:`Path-style addressing cannot be used with S3 Accelerate`,[n]:v}],[n]:D}],[n]:D}],[n]:D},{[i]:[{fn:h,[a]:[jt]},{fn:g,[a]:[jt,!0]}],[r]:[{[i]:Kt,[r]:[{[i]:An,[r]:[ut,dt,{[i]:Ht,endpoint:{url:j,[s]:Mt,[p]:W},[n]:E},{[i]:kn,endpoint:{url:`https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}`,[s]:Mt,[p]:W},[n]:E},{endpoint:{url:`https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}`,[s]:Mt,[p]:W},[n]:E}],[n]:D},at],[n]:D}],[n]:D},{[i]:[Le],[r]:[{[i]:Kt,[r]:[{[i]:An,[r]:[{[i]:[ge,_e,Ne,We],endpoint:{url:`https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[ge,_e,Ne,Ke,qe],[r]:[{endpoint:Nt,[n]:E}],[n]:D},{[i]:[ge,_e,Ne,Ke,Ye],endpoint:Nt,[n]:E},{[i]:[ge,Pe,Ne,We],endpoint:{url:`https://s3-fips.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[ge,Pe,Ne,Ke,qe],[r]:[{endpoint:Pt,[n]:E}],[n]:D},{[i]:[ge,Pe,Ne,Ke,Ye],endpoint:Pt,[n]:E},{[i]:[Fe,_e,Ne,We],endpoint:{url:`https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}`,[s]:Ge,[p]:W},[n]:E},{[i]:[Fe,_e,Ne,Ke,qe],[r]:[{endpoint:Ft,[n]:E}],[n]:D},{[i]:[Fe,_e,Ne,Ke,Ye],endpoint:Ft,[n]:E},{[i]:[Fe,Pe,U,we,We],endpoint:{url:j,[s]:Ge,[p]:W},[n]:E},{[i]:[Fe,Pe,U,we,Ke,qe],[r]:[{[i]:gn,endpoint:It,[n]:E},{endpoint:It,[n]:E}],[n]:D},{[i]:[Fe,Pe,U,we,Ke,Ye],endpoint:It,[n]:E},{[i]:[Fe,Pe,Ne,We],endpoint:{url:de,[s]:Ge,[p]:W},[n]:E},{[i]:[Fe,Pe,Ne,Ke,qe],[r]:[{[i]:gn,endpoint:{url:de,[s]:G,[p]:W},[n]:E},{endpoint:Lt,[n]:E}],[n]:D},{[i]:[Fe,Pe,Ne,Ke,Ye],endpoint:Lt,[n]:E}],[n]:D},at],[n]:D}],[n]:D}],[n]:D},{error:`A region must be set when sending requests to S3.`,[n]:v}]}})),Rk=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.defaultEndpointResolver=void 0;let t=D(),n=V(),r=Lk(),i=new n.EndpointCache({size:50,params:[`Accelerate`,`Bucket`,`DisableAccessPoints`,`DisableMultiRegionAccessPoints`,`DisableS3ExpressSessionAuth`,`Endpoint`,`ForcePathStyle`,`Region`,`UseArnRegion`,`UseDualStack`,`UseFIPS`,`UseGlobalEndpoint`,`UseObjectLambdaEndpoint`,`UseS3ExpressControlEndpoint`]});e.defaultEndpointResolver=(e,t={})=>i.get(e,()=>(0,n.resolveEndpoint)(r.ruleSet,{endpointParams:e,logger:t.logger})),n.customEndpointFunctions.aws=t.awsEndpointFunctions})),zk=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.resolveHttpAuthSchemeConfig=t.defaultS3HttpAuthSchemeProvider=t.defaultS3HttpAuthSchemeParametersProvider=void 0;let n=(B(),e(R)),r=Ik(),i=j(),a=h(),o=Rk();t.defaultS3HttpAuthSchemeParametersProvider=(e=>async(t,n,r)=>{if(!r)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let o=await e(t,n,r),s=(0,a.getSmithyContext)(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!s)throw Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);let c=await(0,i.resolveParams)(r,{getEndpointParameterInstructions:s},t);return Object.assign(o,c)})(async(e,t,n)=>({operation:(0,a.getSmithyContext)(t).operation,region:await(0,a.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}));function s(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`s3`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function c(e){return{schemeId:`aws.auth#sigv4a`,signingProperties:{name:`s3`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}t.defaultS3HttpAuthSchemeProvider=((e,t,n)=>i=>{let a=e(i).properties?.authSchemes;if(!a)return t(i);let o=[];for(let e of a){let{name:t,properties:s={},...c}=e,l=t.toLowerCase();t!==l&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${t}' to '${l}'`);let u;if(l===`sigv4a`){u=`aws.auth#sigv4a`;let e=a.find(e=>{let t=e.name.toLowerCase();return t!==`sigv4a`&&t.startsWith(`sigv4`)});if(r.SignatureV4MultiRegion.sigv4aDependency()===`none`&&e)continue}else if(l.startsWith(`sigv4`))u=`aws.auth#sigv4`;else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${l}'`);let d=n[u];if(!d)throw Error(`Could not find HttpAuthOption create function for '${u}'`);let f=d(i);f.schemeId=u,f.signingProperties={...f.signingProperties||{},...c,...s},o.push(f)}return o})(o.defaultEndpointResolver,e=>{let t=[];switch(e.operation){default:t.push(s(e)),t.push(c(e))}return t},{"aws.auth#sigv4":s,"aws.auth#sigv4a":c}),t.resolveHttpAuthSchemeConfig=e=>{let t=(0,n.resolveAwsSdkSigV4Config)(e),r=(0,n.resolveAwsSdkSigV4AConfig)(t);return Object.assign(r,{authSchemePreference:(0,a.normalizeProvider)(e.authSchemePreference??[])})}})),Bk=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.S3ServiceException=e.__ServiceException=void 0;let t=b();Object.defineProperty(e,`__ServiceException`,{enumerable:!0,get:function(){return t.ServiceException}}),e.S3ServiceException=class e extends t.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),Vk=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ObjectAlreadyInActiveTierError=e.IdempotencyParameterMismatch=e.TooManyParts=e.InvalidWriteOffset=e.InvalidRequest=e.EncryptionTypeMismatch=e.NotFound=e.NoSuchKey=e.InvalidObjectState=e.NoSuchBucket=e.BucketAlreadyOwnedByYou=e.BucketAlreadyExists=e.ObjectNotInActiveTierError=e.AccessDenied=e.NoSuchUpload=void 0;let t=Bk();e.NoSuchUpload=class e extends t.S3ServiceException{name=`NoSuchUpload`;$fault=`client`;constructor(t){super({name:`NoSuchUpload`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.AccessDenied=class e extends t.S3ServiceException{name=`AccessDenied`;$fault=`client`;constructor(t){super({name:`AccessDenied`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.ObjectNotInActiveTierError=class e extends t.S3ServiceException{name=`ObjectNotInActiveTierError`;$fault=`client`;constructor(t){super({name:`ObjectNotInActiveTierError`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.BucketAlreadyExists=class e extends t.S3ServiceException{name=`BucketAlreadyExists`;$fault=`client`;constructor(t){super({name:`BucketAlreadyExists`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.BucketAlreadyOwnedByYou=class e extends t.S3ServiceException{name=`BucketAlreadyOwnedByYou`;$fault=`client`;constructor(t){super({name:`BucketAlreadyOwnedByYou`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.NoSuchBucket=class e extends t.S3ServiceException{name=`NoSuchBucket`;$fault=`client`;constructor(t){super({name:`NoSuchBucket`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.InvalidObjectState=class e extends t.S3ServiceException{name=`InvalidObjectState`;$fault=`client`;StorageClass;AccessTier;constructor(t){super({name:`InvalidObjectState`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}},e.NoSuchKey=class e extends t.S3ServiceException{name=`NoSuchKey`;$fault=`client`;constructor(t){super({name:`NoSuchKey`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.NotFound=class e extends t.S3ServiceException{name=`NotFound`;$fault=`client`;constructor(t){super({name:`NotFound`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.EncryptionTypeMismatch=class e extends t.S3ServiceException{name=`EncryptionTypeMismatch`;$fault=`client`;constructor(t){super({name:`EncryptionTypeMismatch`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.InvalidRequest=class e extends t.S3ServiceException{name=`InvalidRequest`;$fault=`client`;constructor(t){super({name:`InvalidRequest`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.InvalidWriteOffset=class e extends t.S3ServiceException{name=`InvalidWriteOffset`;$fault=`client`;constructor(t){super({name:`InvalidWriteOffset`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.TooManyParts=class e extends t.S3ServiceException{name=`TooManyParts`;$fault=`client`;constructor(t){super({name:`TooManyParts`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.IdempotencyParameterMismatch=class e extends t.S3ServiceException{name=`IdempotencyParameterMismatch`;$fault=`client`;constructor(t){super({name:`IdempotencyParameterMismatch`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},e.ObjectAlreadyInActiveTierError=class e extends t.S3ServiceException{name=`ObjectAlreadyInActiveTierError`;$fault=`client`;constructor(t){super({name:`ObjectAlreadyInActiveTierError`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}}})),Hk=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.CreateBucketMetadataTableConfigurationRequest$=t.CreateBucketMetadataConfigurationRequest$=t.CreateBucketConfiguration$=t.CORSRule$=t.CORSConfiguration$=t.CopyPartResult$=t.CopyObjectResult$=t.CopyObjectRequest$=t.CopyObjectOutput$=t.ContinuationEvent$=t.Condition$=t.CompleteMultipartUploadRequest$=t.CompleteMultipartUploadOutput$=t.CompletedPart$=t.CompletedMultipartUpload$=t.CommonPrefix$=t.Checksum$=t.BucketLoggingStatus$=t.BucketLifecycleConfiguration$=t.BucketInfo$=t.Bucket$=t.BlockedEncryptionTypes$=t.AnalyticsS3BucketDestination$=t.AnalyticsExportDestination$=t.AnalyticsConfiguration$=t.AnalyticsAndOperator$=t.AccessControlTranslation$=t.AccessControlPolicy$=t.AccelerateConfiguration$=t.AbortMultipartUploadRequest$=t.AbortMultipartUploadOutput$=t.AbortIncompleteMultipartUpload$=t.AbacStatus$=t.errorTypeRegistries=t.TooManyParts$=t.ObjectNotInActiveTierError$=t.ObjectAlreadyInActiveTierError$=t.NotFound$=t.NoSuchUpload$=t.NoSuchKey$=t.NoSuchBucket$=t.InvalidWriteOffset$=t.InvalidRequest$=t.InvalidObjectState$=t.IdempotencyParameterMismatch$=t.EncryptionTypeMismatch$=t.BucketAlreadyOwnedByYou$=t.BucketAlreadyExists$=t.AccessDenied$=t.S3ServiceException$=void 0,t.GetBucketAccelerateConfigurationRequest$=t.GetBucketAccelerateConfigurationOutput$=t.GetBucketAbacRequest$=t.GetBucketAbacOutput$=t.FilterRule$=t.ExistingObjectReplication$=t.EventBridgeConfiguration$=t.ErrorDocument$=t.ErrorDetails$=t._Error$=t.EndEvent$=t.EncryptionConfiguration$=t.Encryption$=t.DestinationResult$=t.Destination$=t.DeletePublicAccessBlockRequest$=t.DeleteObjectTaggingRequest$=t.DeleteObjectTaggingOutput$=t.DeleteObjectsRequest$=t.DeleteObjectsOutput$=t.DeleteObjectRequest$=t.DeleteObjectOutput$=t.DeleteMarkerReplication$=t.DeleteMarkerEntry$=t.DeletedObject$=t.DeleteBucketWebsiteRequest$=t.DeleteBucketTaggingRequest$=t.DeleteBucketRequest$=t.DeleteBucketReplicationRequest$=t.DeleteBucketPolicyRequest$=t.DeleteBucketOwnershipControlsRequest$=t.DeleteBucketMetricsConfigurationRequest$=t.DeleteBucketMetadataTableConfigurationRequest$=t.DeleteBucketMetadataConfigurationRequest$=t.DeleteBucketLifecycleRequest$=t.DeleteBucketInventoryConfigurationRequest$=t.DeleteBucketIntelligentTieringConfigurationRequest$=t.DeleteBucketEncryptionRequest$=t.DeleteBucketCorsRequest$=t.DeleteBucketAnalyticsConfigurationRequest$=t.Delete$=t.DefaultRetention$=t.CSVOutput$=t.CSVInput$=t.CreateSessionRequest$=t.CreateSessionOutput$=t.CreateMultipartUploadRequest$=t.CreateMultipartUploadOutput$=t.CreateBucketRequest$=t.CreateBucketOutput$=void 0,t.GetObjectLegalHoldRequest$=t.GetObjectLegalHoldOutput$=t.GetObjectAttributesRequest$=t.GetObjectAttributesParts$=t.GetObjectAttributesOutput$=t.GetObjectAclRequest$=t.GetObjectAclOutput$=t.GetBucketWebsiteRequest$=t.GetBucketWebsiteOutput$=t.GetBucketVersioningRequest$=t.GetBucketVersioningOutput$=t.GetBucketTaggingRequest$=t.GetBucketTaggingOutput$=t.GetBucketRequestPaymentRequest$=t.GetBucketRequestPaymentOutput$=t.GetBucketReplicationRequest$=t.GetBucketReplicationOutput$=t.GetBucketPolicyStatusRequest$=t.GetBucketPolicyStatusOutput$=t.GetBucketPolicyRequest$=t.GetBucketPolicyOutput$=t.GetBucketOwnershipControlsRequest$=t.GetBucketOwnershipControlsOutput$=t.GetBucketNotificationConfigurationRequest$=t.GetBucketMetricsConfigurationRequest$=t.GetBucketMetricsConfigurationOutput$=t.GetBucketMetadataTableConfigurationResult$=t.GetBucketMetadataTableConfigurationRequest$=t.GetBucketMetadataTableConfigurationOutput$=t.GetBucketMetadataConfigurationResult$=t.GetBucketMetadataConfigurationRequest$=t.GetBucketMetadataConfigurationOutput$=t.GetBucketLoggingRequest$=t.GetBucketLoggingOutput$=t.GetBucketLocationRequest$=t.GetBucketLocationOutput$=t.GetBucketLifecycleConfigurationRequest$=t.GetBucketLifecycleConfigurationOutput$=t.GetBucketInventoryConfigurationRequest$=t.GetBucketInventoryConfigurationOutput$=t.GetBucketIntelligentTieringConfigurationRequest$=t.GetBucketIntelligentTieringConfigurationOutput$=t.GetBucketEncryptionRequest$=t.GetBucketEncryptionOutput$=t.GetBucketCorsRequest$=t.GetBucketCorsOutput$=t.GetBucketAnalyticsConfigurationRequest$=t.GetBucketAnalyticsConfigurationOutput$=t.GetBucketAclRequest$=t.GetBucketAclOutput$=void 0,t.ListBucketInventoryConfigurationsRequest$=t.ListBucketInventoryConfigurationsOutput$=t.ListBucketIntelligentTieringConfigurationsRequest$=t.ListBucketIntelligentTieringConfigurationsOutput$=t.ListBucketAnalyticsConfigurationsRequest$=t.ListBucketAnalyticsConfigurationsOutput$=t.LifecycleRuleFilter$=t.LifecycleRuleAndOperator$=t.LifecycleRule$=t.LifecycleExpiration$=t.LambdaFunctionConfiguration$=t.JSONOutput$=t.JSONInput$=t.JournalTableConfigurationUpdates$=t.JournalTableConfigurationResult$=t.JournalTableConfiguration$=t.InventoryTableConfigurationUpdates$=t.InventoryTableConfigurationResult$=t.InventoryTableConfiguration$=t.InventorySchedule$=t.InventoryS3BucketDestination$=t.InventoryFilter$=t.InventoryEncryption$=t.InventoryDestination$=t.InventoryConfiguration$=t.IntelligentTieringFilter$=t.IntelligentTieringConfiguration$=t.IntelligentTieringAndOperator$=t.InputSerialization$=t.Initiator$=t.IndexDocument$=t.HeadObjectRequest$=t.HeadObjectOutput$=t.HeadBucketRequest$=t.HeadBucketOutput$=t.Grantee$=t.Grant$=t.GlacierJobParameters$=t.GetPublicAccessBlockRequest$=t.GetPublicAccessBlockOutput$=t.GetObjectTorrentRequest$=t.GetObjectTorrentOutput$=t.GetObjectTaggingRequest$=t.GetObjectTaggingOutput$=t.GetObjectRetentionRequest$=t.GetObjectRetentionOutput$=t.GetObjectRequest$=t.GetObjectOutput$=t.GetObjectLockConfigurationRequest$=t.GetObjectLockConfigurationOutput$=void 0,t.Progress$=t.PolicyStatus$=t.PartitionedPrefix$=t.Part$=t.ParquetInput$=t.OwnershipControlsRule$=t.OwnershipControls$=t.Owner$=t.OutputSerialization$=t.OutputLocation$=t.ObjectVersion$=t.ObjectPart$=t.ObjectLockRule$=t.ObjectLockRetention$=t.ObjectLockLegalHold$=t.ObjectLockConfiguration$=t.ObjectIdentifier$=t._Object$=t.NotificationConfigurationFilter$=t.NotificationConfiguration$=t.NoncurrentVersionTransition$=t.NoncurrentVersionExpiration$=t.MultipartUpload$=t.MetricsConfiguration$=t.MetricsAndOperator$=t.Metrics$=t.MetadataTableEncryptionConfiguration$=t.MetadataTableConfigurationResult$=t.MetadataTableConfiguration$=t.MetadataEntry$=t.MetadataConfigurationResult$=t.MetadataConfiguration$=t.LoggingEnabled$=t.LocationInfo$=t.ListPartsRequest$=t.ListPartsOutput$=t.ListObjectVersionsRequest$=t.ListObjectVersionsOutput$=t.ListObjectsV2Request$=t.ListObjectsV2Output$=t.ListObjectsRequest$=t.ListObjectsOutput$=t.ListMultipartUploadsRequest$=t.ListMultipartUploadsOutput$=t.ListDirectoryBucketsRequest$=t.ListDirectoryBucketsOutput$=t.ListBucketsRequest$=t.ListBucketsOutput$=t.ListBucketMetricsConfigurationsRequest$=t.ListBucketMetricsConfigurationsOutput$=void 0,t.RequestPaymentConfiguration$=t.ReplicationTimeValue$=t.ReplicationTime$=t.ReplicationRuleFilter$=t.ReplicationRuleAndOperator$=t.ReplicationRule$=t.ReplicationConfiguration$=t.ReplicaModifications$=t.RenameObjectRequest$=t.RenameObjectOutput$=t.RedirectAllRequestsTo$=t.Redirect$=t.RecordsEvent$=t.RecordExpiration$=t.QueueConfiguration$=t.PutPublicAccessBlockRequest$=t.PutObjectTaggingRequest$=t.PutObjectTaggingOutput$=t.PutObjectRetentionRequest$=t.PutObjectRetentionOutput$=t.PutObjectRequest$=t.PutObjectOutput$=t.PutObjectLockConfigurationRequest$=t.PutObjectLockConfigurationOutput$=t.PutObjectLegalHoldRequest$=t.PutObjectLegalHoldOutput$=t.PutObjectAclRequest$=t.PutObjectAclOutput$=t.PutBucketWebsiteRequest$=t.PutBucketVersioningRequest$=t.PutBucketTaggingRequest$=t.PutBucketRequestPaymentRequest$=t.PutBucketReplicationRequest$=t.PutBucketPolicyRequest$=t.PutBucketOwnershipControlsRequest$=t.PutBucketNotificationConfigurationRequest$=t.PutBucketMetricsConfigurationRequest$=t.PutBucketLoggingRequest$=t.PutBucketLifecycleConfigurationRequest$=t.PutBucketLifecycleConfigurationOutput$=t.PutBucketInventoryConfigurationRequest$=t.PutBucketIntelligentTieringConfigurationRequest$=t.PutBucketEncryptionRequest$=t.PutBucketCorsRequest$=t.PutBucketAnalyticsConfigurationRequest$=t.PutBucketAclRequest$=t.PutBucketAccelerateConfigurationRequest$=t.PutBucketAbacRequest$=t.PublicAccessBlockConfiguration$=t.ProgressEvent$=void 0,t.SelectObjectContentEventStream$=t.ObjectEncryption$=t.MetricsFilter$=t.AnalyticsFilter$=t.WriteGetObjectResponseRequest$=t.WebsiteConfiguration$=t.VersioningConfiguration$=t.UploadPartRequest$=t.UploadPartOutput$=t.UploadPartCopyRequest$=t.UploadPartCopyOutput$=t.UpdateObjectEncryptionResponse$=t.UpdateObjectEncryptionRequest$=t.UpdateBucketMetadataJournalTableConfigurationRequest$=t.UpdateBucketMetadataInventoryTableConfigurationRequest$=t.Transition$=t.TopicConfiguration$=t.Tiering$=t.TargetObjectKeyFormat$=t.TargetGrant$=t.Tagging$=t.Tag$=t.StorageClassAnalysisDataExport$=t.StorageClassAnalysis$=t.StatsEvent$=t.Stats$=t.SSES3$=t.SSEKMSEncryption$=t.SseKmsEncryptedObjects$=t.SSEKMS$=t.SourceSelectionCriteria$=t.SimplePrefix$=t.SessionCredentials$=t.ServerSideEncryptionRule$=t.ServerSideEncryptionConfiguration$=t.ServerSideEncryptionByDefault$=t.SelectParameters$=t.SelectObjectContentRequest$=t.SelectObjectContentOutput$=t.ScanRange$=t.S3TablesDestinationResult$=t.S3TablesDestination$=t.S3Location$=t.S3KeyFilter$=t.RoutingRule$=t.RestoreStatus$=t.RestoreRequest$=t.RestoreObjectRequest$=t.RestoreObjectOutput$=t.RequestProgress$=void 0,t.GetBucketWebsite$=t.GetBucketVersioning$=t.GetBucketTagging$=t.GetBucketRequestPayment$=t.GetBucketReplication$=t.GetBucketPolicyStatus$=t.GetBucketPolicy$=t.GetBucketOwnershipControls$=t.GetBucketNotificationConfiguration$=t.GetBucketMetricsConfiguration$=t.GetBucketMetadataTableConfiguration$=t.GetBucketMetadataConfiguration$=t.GetBucketLogging$=t.GetBucketLocation$=t.GetBucketLifecycleConfiguration$=t.GetBucketInventoryConfiguration$=t.GetBucketIntelligentTieringConfiguration$=t.GetBucketEncryption$=t.GetBucketCors$=t.GetBucketAnalyticsConfiguration$=t.GetBucketAcl$=t.GetBucketAccelerateConfiguration$=t.GetBucketAbac$=t.DeletePublicAccessBlock$=t.DeleteObjectTagging$=t.DeleteObjects$=t.DeleteObject$=t.DeleteBucketWebsite$=t.DeleteBucketTagging$=t.DeleteBucketReplication$=t.DeleteBucketPolicy$=t.DeleteBucketOwnershipControls$=t.DeleteBucketMetricsConfiguration$=t.DeleteBucketMetadataTableConfiguration$=t.DeleteBucketMetadataConfiguration$=t.DeleteBucketLifecycle$=t.DeleteBucketInventoryConfiguration$=t.DeleteBucketIntelligentTieringConfiguration$=t.DeleteBucketEncryption$=t.DeleteBucketCors$=t.DeleteBucketAnalyticsConfiguration$=t.DeleteBucket$=t.CreateSession$=t.CreateMultipartUpload$=t.CreateBucketMetadataTableConfiguration$=t.CreateBucketMetadataConfiguration$=t.CreateBucket$=t.CopyObject$=t.CompleteMultipartUpload$=t.AbortMultipartUpload$=void 0,t.RestoreObject$=t.RenameObject$=t.PutPublicAccessBlock$=t.PutObjectTagging$=t.PutObjectRetention$=t.PutObjectLockConfiguration$=t.PutObjectLegalHold$=t.PutObjectAcl$=t.PutObject$=t.PutBucketWebsite$=t.PutBucketVersioning$=t.PutBucketTagging$=t.PutBucketRequestPayment$=t.PutBucketReplication$=t.PutBucketPolicy$=t.PutBucketOwnershipControls$=t.PutBucketNotificationConfiguration$=t.PutBucketMetricsConfiguration$=t.PutBucketLogging$=t.PutBucketLifecycleConfiguration$=t.PutBucketInventoryConfiguration$=t.PutBucketIntelligentTieringConfiguration$=t.PutBucketEncryption$=t.PutBucketCors$=t.PutBucketAnalyticsConfiguration$=t.PutBucketAcl$=t.PutBucketAccelerateConfiguration$=t.PutBucketAbac$=t.ListParts$=t.ListObjectVersions$=t.ListObjectsV2$=t.ListObjects$=t.ListMultipartUploads$=t.ListDirectoryBuckets$=t.ListBuckets$=t.ListBucketMetricsConfigurations$=t.ListBucketInventoryConfigurations$=t.ListBucketIntelligentTieringConfigurations$=t.ListBucketAnalyticsConfigurations$=t.HeadObject$=t.HeadBucket$=t.GetPublicAccessBlock$=t.GetObjectTorrent$=t.GetObjectTagging$=t.GetObjectRetention$=t.GetObjectLockConfiguration$=t.GetObjectLegalHold$=t.GetObjectAttributes$=t.GetObjectAcl$=t.GetObject$=void 0,t.WriteGetObjectResponse$=t.UploadPartCopy$=t.UploadPart$=t.UpdateObjectEncryption$=t.UpdateBucketMetadataJournalTableConfiguration$=t.UpdateBucketMetadataInventoryTableConfiguration$=t.SelectObjectContent$=void 0;let n=`AccelerateConfiguration`,r=`AccessControlList`,i=`AnalyticsConfigurationList`,a=`AccessControlPolicy`,o=`AccessControlTranslation`,s=`AnalyticsConfiguration`,c=`AbortDate`,l=`AbortIncompleteMultipartUpload`,u=`AccessKeyId`,f=`AccessPointArn`,p=`AcceptRanges`,m=`AbortRuleId`,h=`AbacStatus`,g=`AccessTier`,v=`Bucket`,b=`BucketArn`,x=`BlockedEncryptionTypes`,S=`BypassGovernanceRetention`,C=`BucketKeyEnabled`,w=`BucketLoggingStatus`,T=`BytesProcessed`,E=`BlockPublicAcls`,D=`BlockPublicPolicy`,O=`BucketRegion`,k=`BytesReturned`,A=`BytesScanned`,j=`Body`,M=`Buckets`,N=`Checksum`,P=`ChecksumAlgorithm`,F=`CreateBucketConfiguration`,I=`CacheControl`,L=`ChecksumCRC32`,R=`ChecksumCRC32C`,z=`ChecksumCRC64NVME`,ee=`Cache-Control`,B=`Content-Disposition`,te=`ContentDisposition`,V=`Content-Encoding`,ne=`ContentEncoding`,re=`ContentLanguage`,H=`Content-Language`,ie=`Content-Length`,ae=`ContentLength`,oe=`Content-MD5`,se=`ContentMD5`,ce=`CompleteMultipartUpload`,le=`ChecksumMode`,ue=`CopyObjectResult`,de=`CORSConfiguration`,fe=`CORSRules`,pe=`CORSRule`,me=`CopyPartResult`,he=`CommonPrefixes`,ge=`ContentRange`,_e=`Content-Range`,U=`CopySource`,ve=`ChecksumSHA1`,ye=`ChecksumSHA256`,be=`CopySourceIfMatch`,xe=`CopySourceIfModifiedSince`,Se=`CopySourceIfNoneMatch`,Ce=`CopySourceIfUnmodifiedSince`,we=`CopySourceSSECustomerAlgorithm`,Te=`CopySourceSSECustomerKey`,Ee=`CopySourceSSECustomerKeyMD5`,De=`CopySourceVersionId`,Oe=`ConfigurationState`,W=`ChecksumType`,ke=`Content-Type`,Ae=`ContentType`,je=`ContinuationToken`,Me=`Condition`,Ne=`Contents`,Pe=`Credentials`,Fe=`Days`,Ie=`DeleteMarker`,Le=`DeleteMarkerReplication`,Re=`DeleteMarkers`,ze=`DisplayName`,Be=`DefaultRetention`,Ve=`DestinationResult`,He=`Date`,Ue=`Delete`,We=`Delimiter`,Ge=`Destination`,Ke=`Details`,qe=`Expiration`,Je=`EventBridgeConfiguration`,G=`ExpectedBucketOwner`,Ye=`EncryptionConfiguration`,Xe=`ErrorCode`,Ze=`ErrorDocument`,Qe=`ErrorMessage`,$e=`ExistingObjectReplication`,et=`ExpiresString`,tt=`ExpectedSourceBucketOwner`,nt=`EncryptionType`,rt=`ETag`,it=`EncodingType`,at=`ExpressionType`,ot=`Encryption`,st=`Errors`,ct=`Error`,lt=`Events`,ut=`Event`,dt=`Expires`,ft=`Expression`,pt=`Filter`,mt=`FieldDelimiter`,ht=`FilterRule`,gt=`Format`,_t=`Grants`,vt=`GetBucketMetadataConfigurationResult`,yt=`GetBucketMetadataTableConfigurationResult`,bt=`GrantFullControl`,xt=`GlacierJobParameters`,St=`GrantRead`,Ct=`GrantReadACP`,wt=`GrantWrite`,Tt=`GrantWriteACP`,Et=`Grant`,Dt=`Grantee`,Ot=`HostName`,kt=`InventoryConfiguration`,At=`InventoryConfigurationList`,jt=`IndexDocument`,Mt=`IsLatest`,Nt=`IfMatch`,Pt=`If-Modified-Since`,Ft=`IfModifiedSince`,It=`If-Match`,Lt=`IfNoneMatch`,Rt=`If-None-Match`,zt=`IsPublic`,Bt=`IgnorePublicAcls`,Vt=`InputSerialization`,Ht=`IsTruncated`,Ut=`IntelligentTieringConfiguration`,Wt=`IntelligentTieringConfigurationList`,Gt=`InventoryTableConfigurationResult`,Kt=`InventoryTableConfiguration`,qt=`IfUnmodifiedSince`,Jt=`If-Unmodified-Since`,Yt=`Initiator`,Xt=`JSON`,Zt=`JournalTableConfiguration`,Qt=`JournalTableConfigurationResult`,$t=`KeyMarker`,en=`Location`,tn=`ListBucketResult`,nn=`LocationConstraint`,rn=`LifecycleConfiguration`,an=`LoggingEnabled`,on=`LegalHold`,sn=`LastModified`,cn=`Last-Modified`,ln=`Metadata`,un=`MetadataConfiguration`,dn=`MetricsConfigurationList`,fn=`MetadataConfigurationResult`,pn=`MetricsConfiguration`,mn=`MfaDelete`,hn=`MetadataEntry`,gn=`MFADelete`,_n=`MaxKeys`,vn=`MissingMeta`,yn=`MaxParts`,bn=`MetadataTableConfiguration`,xn=`MetadataTableConfigurationResult`,Sn=`MultipartUpload`,Cn=`MaxUploads`,wn=`Marker`,Tn=`Metrics`,En=`Mode`,Dn=`Name`,On=`NotificationConfiguration`,kn=`NextContinuationToken`,An=`NoncurrentDays`,jn=`NextKeyMarker`,Mn=`NewerNoncurrentVersions`,Nn=`NextPartNumberMarker`,Pn=`NoncurrentVersionExpiration`,Fn=`NoncurrentVersionTransition`,In=`Owner`,Ln=`OwnershipControls`,Rn=`ObjectEncryption`,zn=`OutputLocation`,Bn=`ObjectLockConfiguration`,Vn=`ObjectLockLegalHoldStatus`,Hn=`ObjectLockMode`,Un=`ObjectLockRetainUntilDate`,Wn=`ObjectOwnership`,Gn=`OptionalObjectAttributes`,Kn=`ObjectSizeGreaterThan`,qn=`ObjectSizeLessThan`,Jn=`OutputSerialization`,Yn=`Object`,Xn=`Prefix`,Zn=`PublicAccessBlockConfiguration`,Qn=`PartsCount`,$n=`PartNumber`,er=`PartNumberMarker`,tr=`PartitionedPrefix`,nr=`PolicyStatus`,rr=`Parts`,ir=`Part`,ar=`Payer`,or=`Payload`,sr=`Permission`,cr=`Policy`,lr=`Progress`,ur=`Protocol`,dr=`QuoteCharacter`,fr=`QueueConfiguration`,pr=`QuoteEscapeCharacter`,mr=`Rules`,hr=`RedirectAllRequestsTo`,gr=`RequestCharged`,_r=`ResponseCacheControl`,vr=`ResponseContentDisposition`,yr=`ResponseContentEncoding`,br=`ResponseContentLanguage`,xr=`ResponseContentType`,Sr=`ReplicationConfiguration`,Cr=`RecordDelimiter`,wr=`ResponseExpires`,Tr=`RecordExpiration`,Er=`ReplicaModifications`,Dr=`RequestPayer`,Or=`RestrictPublicBuckets`,kr=`RequestPaymentConfiguration`,Ar=`RequestProgress`,jr=`RoutingRules`,Mr=`RestoreRequest`,Nr=`RoutingRule`,Pr=`ReplicationStatus`,Fr=`RestoreStatus`,Ir=`ReplicationTime`,Lr=`Range`,Rr=`Restore`,zr=`Redirect`,Br=`Retention`,Vr=`Rule`,Hr=`Status`,Ur=`StartAfter`,Wr=`SecretAccessKey`,Gr=`S3BucketDestination`,Kr=`StorageClass`,qr=`StorageClassAnalysis`,Jr=`SSE-KMS`,Yr=`SseKmsEncryptedObjects`,Xr=`SelectParameters`,Zr=`SimplePrefix`,Qr=`ScanRange`,$r=`SSE-S3`,ei=`SourceSelectionCriteria`,ti=`ServerSideEncryption`,ni=`ServerSideEncryptionConfiguration`,ri=`SSECustomerAlgorithm`,ii=`SSECustomerKey`,ai=`SSECustomerKeyMD5`,oi=`SSEKMS`,si=`SSEKMSEncryptionContext`,ci=`SSEKMSKeyId`,li=`SSES3`,ui=`SessionToken`,di=`S3TablesDestination`,fi=`S3TablesDestinationResult`,pi=`Size`,K=`Stats`,mi=`Tags`,hi=`TableArn`,gi=`TableBucketArn`,_i=`TagCount`,vi=`TopicConfiguration`,yi=`TransitionDefaultMinimumObjectSize`,bi=`TargetGrants`,xi=`TableNamespace`,Si=`TableName`,Ci=`TargetObjectKeyFormat`,wi=`TagSet`,Ti=`TableStatus`,Ei=`Tagging`,Di=`Tier`,Oi=`Tiering`,ki=`Token`,Ai=`Transition`,ji=`Type`,Mi=`UploadId`,Ni=`UploadIdMarker`,Pi=`UserMetadata`,Fi=`Value`,Ii=`VersioningConfiguration`,Li=`VersionId`,Ri=`VersionIdMarker`,zi=`WebsiteConfiguration`,Bi=`WebsiteRedirectLocation`,Vi=`accept-ranges`,Hi=`client`,Ui=`continuation-token`,Wi=`delimiter`,Gi=`error`,Ki=`eventPayload`,qi=`encoding-type`,q=`http`,Ji=`httpChecksum`,Yi=`httpError`,J=`httpHeader`,Xi=`httpPayload`,Zi=`httpPrefixHeaders`,Y=`httpQuery`,Qi=`http://www.w3.org/2001/XMLSchema-instance`,$i=`key-marker`,ea=`max-keys`,ta=`prefix`,na=`partNumber`,ra=`response-cache-control`,ia=`response-content-disposition`,aa=`response-content-encoding`,oa=`response-content-language`,sa=`response-content-type`,ca=`response-expires`,la=`smithy.ts.sdk.synthetic.com.amazonaws.s3`,ua=`streaming`,da=`uploadId`,fa=`versionId`,pa=`xmlFlattened`,X=`xmlName`,ma=`xmlNamespace`,ha=`x-amz-acl`,ga=`x-amz-abort-date`,_a=`x-amz-abort-rule-id`,va=`x-amz-bucket-arn`,ya=`x-amz-bypass-governance-retention`,ba=`x-amz-bucket-object-lock-token`,xa=`x-amz-checksum-algorithm`,Sa=`x-amz-checksum-crc32`,Ca=`x-amz-checksum-crc32c`,wa=`x-amz-checksum-crc64nvme`,Ta=`x-amz-checksum-mode`,Ea=`x-amz-checksum-sha1`,Da=`x-amz-checksum-sha256`,Oa=`x-amz-copy-source`,ka=`x-amz-copy-source-if-match`,Aa=`x-amz-copy-source-if-modified-since`,ja=`x-amz-copy-source-if-none-match`,Ma=`x-amz-copy-source-if-unmodified-since`,Na=`x-amz-copy-source-server-side-encryption-customer-algorithm`,Pa=`x-amz-copy-source-server-side-encryption-customer-key`,Fa=`x-amz-copy-source-server-side-encryption-customer-key-MD5`,Ia=`x-amz-copy-source-version-id`,La=`x-amz-checksum-type`,Ra=`x-amz-delete-marker`,za=`x-amz-expiration`,Z=`x-amz-expected-bucket-owner`,Ba=`x-amz-grant-full-control`,Va=`x-amz-grant-read`,Ha=`x-amz-grant-read-acp`,Ua=`x-amz-grant-write`,Wa=`x-amz-grant-write-acp`,Ga=`x-amz-meta-`,Ka=`x-amz-mfa`,qa=`x-amz-missing-meta`,Ja=`x-amz-mp-parts-count`,Ya=`x-amz-object-lock-legal-hold`,Xa=`x-amz-object-lock-mode`,Za=`x-amz-object-lock-retain-until-date`,Qa=`x-amz-optional-object-attributes`,$a=`x-amz-restore`,eo=`x-amz-request-charged`,to=`x-amz-request-payer`,no=`x-amz-replication-status`,ro=`x-amz-storage-class`,io=`x-amz-sdk-checksum-algorithm`,ao=`x-amz-source-expected-bucket-owner`,oo=`x-amz-server-side-encryption`,so=`x-amz-server-side-encryption-aws-kms-key-id`,co=`x-amz-server-side-encryption-bucket-key-enabled`,lo=`x-amz-server-side-encryption-context`,uo=`x-amz-server-side-encryption-customer-algorithm`,fo=`x-amz-server-side-encryption-customer-key`,po=`x-amz-server-side-encryption-customer-key-MD5`,mo=`x-amz-tagging`,ho=`x-amz-tagging-count`,go=`x-amz-transition-default-minimum-object-size`,_o=`x-amz-version-id`,vo=`x-amz-website-redirect-location`,Q=`com.amazonaws.s3`,yo=(y(),e(d)),bo=Vk(),xo=Bk(),So=yo.TypeRegistry.for(la);t.S3ServiceException$=[-3,la,`S3ServiceException`,0,[],[]],So.registerError(t.S3ServiceException$,xo.S3ServiceException);let Co=yo.TypeRegistry.for(Q);t.AccessDenied$=[-3,Q,`AccessDenied`,{[Gi]:Hi,[Yi]:403},[],[]],Co.registerError(t.AccessDenied$,bo.AccessDenied),t.BucketAlreadyExists$=[-3,Q,`BucketAlreadyExists`,{[Gi]:Hi,[Yi]:409},[],[]],Co.registerError(t.BucketAlreadyExists$,bo.BucketAlreadyExists),t.BucketAlreadyOwnedByYou$=[-3,Q,`BucketAlreadyOwnedByYou`,{[Gi]:Hi,[Yi]:409},[],[]],Co.registerError(t.BucketAlreadyOwnedByYou$,bo.BucketAlreadyOwnedByYou),t.EncryptionTypeMismatch$=[-3,Q,`EncryptionTypeMismatch`,{[Gi]:Hi,[Yi]:400},[],[]],Co.registerError(t.EncryptionTypeMismatch$,bo.EncryptionTypeMismatch),t.IdempotencyParameterMismatch$=[-3,Q,`IdempotencyParameterMismatch`,{[Gi]:Hi,[Yi]:400},[],[]],Co.registerError(t.IdempotencyParameterMismatch$,bo.IdempotencyParameterMismatch),t.InvalidObjectState$=[-3,Q,`InvalidObjectState`,{[Gi]:Hi,[Yi]:403},[Kr,g],[0,0]],Co.registerError(t.InvalidObjectState$,bo.InvalidObjectState),t.InvalidRequest$=[-3,Q,`InvalidRequest`,{[Gi]:Hi,[Yi]:400},[],[]],Co.registerError(t.InvalidRequest$,bo.InvalidRequest),t.InvalidWriteOffset$=[-3,Q,`InvalidWriteOffset`,{[Gi]:Hi,[Yi]:400},[],[]],Co.registerError(t.InvalidWriteOffset$,bo.InvalidWriteOffset),t.NoSuchBucket$=[-3,Q,`NoSuchBucket`,{[Gi]:Hi,[Yi]:404},[],[]],Co.registerError(t.NoSuchBucket$,bo.NoSuchBucket),t.NoSuchKey$=[-3,Q,`NoSuchKey`,{[Gi]:Hi,[Yi]:404},[],[]],Co.registerError(t.NoSuchKey$,bo.NoSuchKey),t.NoSuchUpload$=[-3,Q,`NoSuchUpload`,{[Gi]:Hi,[Yi]:404},[],[]],Co.registerError(t.NoSuchUpload$,bo.NoSuchUpload),t.NotFound$=[-3,Q,`NotFound`,{[Gi]:Hi},[],[]],Co.registerError(t.NotFound$,bo.NotFound),t.ObjectAlreadyInActiveTierError$=[-3,Q,`ObjectAlreadyInActiveTierError`,{[Gi]:Hi,[Yi]:403},[],[]],Co.registerError(t.ObjectAlreadyInActiveTierError$,bo.ObjectAlreadyInActiveTierError),t.ObjectNotInActiveTierError$=[-3,Q,`ObjectNotInActiveTierError`,{[Gi]:Hi,[Yi]:403},[],[]],Co.registerError(t.ObjectNotInActiveTierError$,bo.ObjectNotInActiveTierError),t.TooManyParts$=[-3,Q,`TooManyParts`,{[Gi]:Hi,[Yi]:400},[],[]],Co.registerError(t.TooManyParts$,bo.TooManyParts),t.errorTypeRegistries=[So,Co];var wo=[0,Q,Te,8,0],To=[0,Q,`NonEmptyKmsKeyArnString`,8,0],Eo=[0,Q,`SessionCredentialValue`,8,0],Do=[0,Q,ii,8,0],Oo=[0,Q,si,8,0],ko=[0,Q,ci,8,0],Ao=[0,Q,`StreamingBlob`,{[ua]:1},42];t.AbacStatus$=[3,Q,h,0,[Hr],[0]],t.AbortIncompleteMultipartUpload$=[3,Q,l,0,[`DaysAfterInitiation`],[1]],t.AbortMultipartUploadOutput$=[3,Q,`AbortMultipartUploadOutput`,0,[gr],[[0,{[J]:eo}]]],t.AbortMultipartUploadRequest$=[3,Q,`AbortMultipartUploadRequest`,0,[v,`Key`,Mi,Dr,G,`IfMatchInitiatedTime`],[[0,1],[0,1],[0,{[Y]:da}],[0,{[J]:to}],[0,{[J]:Z}],[6,{[J]:`x-amz-if-match-initiated-time`}]],3],t.AccelerateConfiguration$=[3,Q,n,0,[Hr],[0]],t.AccessControlPolicy$=[3,Q,a,0,[_t,In],[[()=>Ho,{[X]:r}],()=>t.Owner$]],t.AccessControlTranslation$=[3,Q,o,0,[In],[0],1],t.AnalyticsAndOperator$=[3,Q,`AnalyticsAndOperator`,0,[Xn,mi],[0,[()=>ss,{[pa]:1,[X]:`Tag`}]]],t.AnalyticsConfiguration$=[3,Q,s,0,[`Id`,qr,pt],[0,()=>t.StorageClassAnalysis$,[()=>t.AnalyticsFilter$,0]],2],t.AnalyticsExportDestination$=[3,Q,`AnalyticsExportDestination`,0,[Gr],[()=>t.AnalyticsS3BucketDestination$],1],t.AnalyticsS3BucketDestination$=[3,Q,`AnalyticsS3BucketDestination`,0,[gt,v,`BucketAccountId`,Xn],[0,0,0,0],2],t.BlockedEncryptionTypes$=[3,Q,x,0,[nt],[[()=>zo,{[pa]:1}]]],t.Bucket$=[3,Q,v,0,[Dn,`CreationDate`,O,b],[0,4,0,0]],t.BucketInfo$=[3,Q,`BucketInfo`,0,[`DataRedundancy`,ji],[0,0]],t.BucketLifecycleConfiguration$=[3,Q,`BucketLifecycleConfiguration`,0,[mr],[[()=>qo,{[pa]:1,[X]:Vr}]],1],t.BucketLoggingStatus$=[3,Q,w,0,[an],[[()=>t.LoggingEnabled$,0]]],t.Checksum$=[3,Q,N,0,[L,R,z,ve,ye,W],[0,0,0,0,0,0]],t.CommonPrefix$=[3,Q,`CommonPrefix`,0,[Xn],[0]],t.CompletedMultipartUpload$=[3,Q,`CompletedMultipartUpload`,0,[rr],[[()=>Fo,{[pa]:1,[X]:ir}]]],t.CompletedPart$=[3,Q,`CompletedPart`,0,[rt,L,R,z,ve,ye,$n],[0,0,0,0,0,0,1]],t.CompleteMultipartUploadOutput$=[3,Q,`CompleteMultipartUploadOutput`,{[X]:`CompleteMultipartUploadResult`},[en,v,`Key`,qe,rt,L,R,z,ve,ye,W,ti,Li,ci,C,gr],[0,0,0,[0,{[J]:za}],0,0,0,0,0,0,0,[0,{[J]:oo}],[0,{[J]:_o}],[()=>ko,{[J]:so}],[2,{[J]:co}],[0,{[J]:eo}]]],t.CompleteMultipartUploadRequest$=[3,Q,`CompleteMultipartUploadRequest`,0,[v,`Key`,Mi,Sn,L,R,z,ve,ye,W,`MpuObjectSize`,Dr,G,Nt,Lt,ri,ii,ai],[[0,1],[0,1],[0,{[Y]:da}],[()=>t.CompletedMultipartUpload$,{[Xi]:1,[X]:ce}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[0,{[J]:La}],[1,{[J]:`x-amz-mp-object-size`}],[0,{[J]:to}],[0,{[J]:Z}],[0,{[J]:It}],[0,{[J]:Rt}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}]],3],t.Condition$=[3,Q,Me,0,[`HttpErrorCodeReturnedEquals`,`KeyPrefixEquals`],[0,0]],t.ContinuationEvent$=[3,Q,`ContinuationEvent`,0,[],[]],t.CopyObjectOutput$=[3,Q,`CopyObjectOutput`,0,[ue,qe,De,Li,ti,ri,ai,ci,si,C,gr],[[()=>t.CopyObjectResult$,16],[0,{[J]:za}],[0,{[J]:Ia}],[0,{[J]:_o}],[0,{[J]:oo}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}],[0,{[J]:eo}]]],t.CopyObjectRequest$=[3,Q,`CopyObjectRequest`,0,[v,U,`Key`,`ACL`,I,P,te,ne,re,Ae,be,xe,Se,Ce,dt,bt,St,Ct,Tt,Nt,Lt,ln,`MetadataDirective`,`TaggingDirective`,ti,Kr,Bi,ri,ii,ai,ci,si,C,we,Te,Ee,Dr,Ei,Hn,Un,Vn,G,tt],[[0,1],[0,{[J]:Oa}],[0,1],[0,{[J]:ha}],[0,{[J]:ee}],[0,{[J]:xa}],[0,{[J]:B}],[0,{[J]:V}],[0,{[J]:H}],[0,{[J]:ke}],[0,{[J]:ka}],[4,{[J]:Aa}],[0,{[J]:ja}],[4,{[J]:Ma}],[4,{[J]:dt}],[0,{[J]:Ba}],[0,{[J]:Va}],[0,{[J]:Ha}],[0,{[J]:Wa}],[0,{[J]:It}],[0,{[J]:Rt}],[128,{[Zi]:Ga}],[0,{[J]:`x-amz-metadata-directive`}],[0,{[J]:`x-amz-tagging-directive`}],[0,{[J]:oo}],[0,{[J]:ro}],[0,{[J]:vo}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}],[0,{[J]:Na}],[()=>wo,{[J]:Pa}],[0,{[J]:Fa}],[0,{[J]:to}],[0,{[J]:mo}],[0,{[J]:Xa}],[5,{[J]:Za}],[0,{[J]:Ya}],[0,{[J]:Z}],[0,{[J]:ao}]],3],t.CopyObjectResult$=[3,Q,ue,0,[rt,sn,W,L,R,z,ve,ye],[0,4,0,0,0,0,0,0]],t.CopyPartResult$=[3,Q,me,0,[rt,sn,L,R,z,ve,ye],[0,4,0,0,0,0,0]],t.CORSConfiguration$=[3,Q,de,0,[fe],[[()=>Io,{[pa]:1,[X]:pe}]],1],t.CORSRule$=[3,Q,pe,0,[`AllowedMethods`,`AllowedOrigins`,`ID`,`AllowedHeaders`,`ExposeHeaders`,`MaxAgeSeconds`],[[64,{[pa]:1,[X]:`AllowedMethod`}],[64,{[pa]:1,[X]:`AllowedOrigin`}],0,[64,{[pa]:1,[X]:`AllowedHeader`}],[64,{[pa]:1,[X]:`ExposeHeader`}],1],2],t.CreateBucketConfiguration$=[3,Q,F,0,[nn,en,v,mi],[0,()=>t.LocationInfo$,()=>t.BucketInfo$,[()=>ss,0]]],t.CreateBucketMetadataConfigurationRequest$=[3,Q,`CreateBucketMetadataConfigurationRequest`,0,[v,un,se,P,G],[[0,1],[()=>t.MetadataConfiguration$,{[Xi]:1,[X]:un}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.CreateBucketMetadataTableConfigurationRequest$=[3,Q,`CreateBucketMetadataTableConfigurationRequest`,0,[v,bn,se,P,G],[[0,1],[()=>t.MetadataTableConfiguration$,{[Xi]:1,[X]:bn}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.CreateBucketOutput$=[3,Q,`CreateBucketOutput`,0,[en,b],[[0,{[J]:en}],[0,{[J]:va}]]],t.CreateBucketRequest$=[3,Q,`CreateBucketRequest`,0,[v,`ACL`,F,bt,St,Ct,wt,Tt,`ObjectLockEnabledForBucket`,Wn,`BucketNamespace`],[[0,1],[0,{[J]:ha}],[()=>t.CreateBucketConfiguration$,{[Xi]:1,[X]:F}],[0,{[J]:Ba}],[0,{[J]:Va}],[0,{[J]:Ha}],[0,{[J]:Ua}],[0,{[J]:Wa}],[2,{[J]:`x-amz-bucket-object-lock-enabled`}],[0,{[J]:`x-amz-object-ownership`}],[0,{[J]:`x-amz-bucket-namespace`}]],1],t.CreateMultipartUploadOutput$=[3,Q,`CreateMultipartUploadOutput`,{[X]:`InitiateMultipartUploadResult`},[c,m,v,`Key`,Mi,ti,ri,ai,ci,si,C,gr,P,W],[[4,{[J]:ga}],[0,{[J]:_a}],[0,{[X]:v}],0,0,[0,{[J]:oo}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}],[0,{[J]:eo}],[0,{[J]:xa}],[0,{[J]:La}]]],t.CreateMultipartUploadRequest$=[3,Q,`CreateMultipartUploadRequest`,0,[v,`Key`,`ACL`,I,te,ne,re,Ae,dt,bt,St,Ct,Tt,ln,ti,Kr,Bi,ri,ii,ai,ci,si,C,Dr,Ei,Hn,Un,Vn,G,P,W],[[0,1],[0,1],[0,{[J]:ha}],[0,{[J]:ee}],[0,{[J]:B}],[0,{[J]:V}],[0,{[J]:H}],[0,{[J]:ke}],[4,{[J]:dt}],[0,{[J]:Ba}],[0,{[J]:Va}],[0,{[J]:Ha}],[0,{[J]:Wa}],[128,{[Zi]:Ga}],[0,{[J]:oo}],[0,{[J]:ro}],[0,{[J]:vo}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}],[0,{[J]:to}],[0,{[J]:mo}],[0,{[J]:Xa}],[5,{[J]:Za}],[0,{[J]:Ya}],[0,{[J]:Z}],[0,{[J]:xa}],[0,{[J]:La}]],2],t.CreateSessionOutput$=[3,Q,`CreateSessionOutput`,{[X]:`CreateSessionResult`},[Pe,ti,ci,si,C],[[()=>t.SessionCredentials$,{[X]:Pe}],[0,{[J]:oo}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}]],1],t.CreateSessionRequest$=[3,Q,`CreateSessionRequest`,0,[v,`SessionMode`,ti,ci,si,C],[[0,1],[0,{[J]:`x-amz-create-session-mode`}],[0,{[J]:oo}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}]],1],t.CSVInput$=[3,Q,`CSVInput`,0,[`FileHeaderInfo`,`Comments`,pr,Cr,mt,dr,`AllowQuotedRecordDelimiter`],[0,0,0,0,0,0,2]],t.CSVOutput$=[3,Q,`CSVOutput`,0,[`QuoteFields`,pr,Cr,mt,dr],[0,0,0,0,0]],t.DefaultRetention$=[3,Q,Be,0,[En,Fe,`Years`],[0,1,1]],t.Delete$=[3,Q,Ue,0,[`Objects`,`Quiet`],[[()=>Zo,{[pa]:1,[X]:Yn}],2],1],t.DeleteBucketAnalyticsConfigurationRequest$=[3,Q,`DeleteBucketAnalyticsConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.DeleteBucketCorsRequest$=[3,Q,`DeleteBucketCorsRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketEncryptionRequest$=[3,Q,`DeleteBucketEncryptionRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketIntelligentTieringConfigurationRequest$=[3,Q,`DeleteBucketIntelligentTieringConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.DeleteBucketInventoryConfigurationRequest$=[3,Q,`DeleteBucketInventoryConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.DeleteBucketLifecycleRequest$=[3,Q,`DeleteBucketLifecycleRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketMetadataConfigurationRequest$=[3,Q,`DeleteBucketMetadataConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketMetadataTableConfigurationRequest$=[3,Q,`DeleteBucketMetadataTableConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketMetricsConfigurationRequest$=[3,Q,`DeleteBucketMetricsConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.DeleteBucketOwnershipControlsRequest$=[3,Q,`DeleteBucketOwnershipControlsRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketPolicyRequest$=[3,Q,`DeleteBucketPolicyRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketReplicationRequest$=[3,Q,`DeleteBucketReplicationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketRequest$=[3,Q,`DeleteBucketRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketTaggingRequest$=[3,Q,`DeleteBucketTaggingRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeleteBucketWebsiteRequest$=[3,Q,`DeleteBucketWebsiteRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.DeletedObject$=[3,Q,`DeletedObject`,0,[`Key`,Li,Ie,`DeleteMarkerVersionId`],[0,0,2,0]],t.DeleteMarkerEntry$=[3,Q,`DeleteMarkerEntry`,0,[In,`Key`,Li,Mt,sn],[()=>t.Owner$,0,0,2,4]],t.DeleteMarkerReplication$=[3,Q,Le,0,[Hr],[0]],t.DeleteObjectOutput$=[3,Q,`DeleteObjectOutput`,0,[Ie,Li,gr],[[2,{[J]:Ra}],[0,{[J]:_o}],[0,{[J]:eo}]]],t.DeleteObjectRequest$=[3,Q,`DeleteObjectRequest`,0,[v,`Key`,`MFA`,Li,Dr,S,G,Nt,`IfMatchLastModifiedTime`,`IfMatchSize`],[[0,1],[0,1],[0,{[J]:Ka}],[0,{[Y]:fa}],[0,{[J]:to}],[2,{[J]:ya}],[0,{[J]:Z}],[0,{[J]:It}],[6,{[J]:`x-amz-if-match-last-modified-time`}],[1,{[J]:`x-amz-if-match-size`}]],2],t.DeleteObjectsOutput$=[3,Q,`DeleteObjectsOutput`,{[X]:`DeleteResult`},[`Deleted`,gr,st],[[()=>Lo,{[pa]:1}],[0,{[J]:eo}],[()=>Bo,{[pa]:1,[X]:ct}]]],t.DeleteObjectsRequest$=[3,Q,`DeleteObjectsRequest`,0,[v,Ue,`MFA`,Dr,S,G,P],[[0,1],[()=>t.Delete$,{[Xi]:1,[X]:Ue}],[0,{[J]:Ka}],[0,{[J]:to}],[2,{[J]:ya}],[0,{[J]:Z}],[0,{[J]:io}]],2],t.DeleteObjectTaggingOutput$=[3,Q,`DeleteObjectTaggingOutput`,0,[Li],[[0,{[J]:_o}]]],t.DeleteObjectTaggingRequest$=[3,Q,`DeleteObjectTaggingRequest`,0,[v,`Key`,Li,G],[[0,1],[0,1],[0,{[Y]:fa}],[0,{[J]:Z}]],2],t.DeletePublicAccessBlockRequest$=[3,Q,`DeletePublicAccessBlockRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.Destination$=[3,Q,Ge,0,[v,`Account`,Kr,o,Ye,Ir,Tn],[0,0,0,()=>t.AccessControlTranslation$,()=>t.EncryptionConfiguration$,()=>t.ReplicationTime$,()=>t.Metrics$],1],t.DestinationResult$=[3,Q,Ve,0,[`TableBucketType`,gi,xi],[0,0,0]],t.Encryption$=[3,Q,ot,0,[nt,`KMSKeyId`,`KMSContext`],[0,[()=>ko,0],0],1],t.EncryptionConfiguration$=[3,Q,Ye,0,[`ReplicaKmsKeyID`],[0]],t.EndEvent$=[3,Q,`EndEvent`,0,[],[]],t._Error$=[3,Q,ct,0,[`Key`,Li,`Code`,`Message`],[0,0,0,0]],t.ErrorDetails$=[3,Q,`ErrorDetails`,0,[Xe,Qe],[0,0]],t.ErrorDocument$=[3,Q,Ze,0,[`Key`],[0],1],t.EventBridgeConfiguration$=[3,Q,Je,0,[],[]],t.ExistingObjectReplication$=[3,Q,$e,0,[Hr],[0],1],t.FilterRule$=[3,Q,ht,0,[Dn,Fi],[0,0]],t.GetBucketAbacOutput$=[3,Q,`GetBucketAbacOutput`,0,[h],[[()=>t.AbacStatus$,16]]],t.GetBucketAbacRequest$=[3,Q,`GetBucketAbacRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketAccelerateConfigurationOutput$=[3,Q,`GetBucketAccelerateConfigurationOutput`,{[X]:n},[Hr,gr],[0,[0,{[J]:eo}]]],t.GetBucketAccelerateConfigurationRequest$=[3,Q,`GetBucketAccelerateConfigurationRequest`,0,[v,G,Dr],[[0,1],[0,{[J]:Z}],[0,{[J]:to}]],1],t.GetBucketAclOutput$=[3,Q,`GetBucketAclOutput`,{[X]:a},[In,_t],[()=>t.Owner$,[()=>Ho,{[X]:r}]]],t.GetBucketAclRequest$=[3,Q,`GetBucketAclRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketAnalyticsConfigurationOutput$=[3,Q,`GetBucketAnalyticsConfigurationOutput`,0,[s],[[()=>t.AnalyticsConfiguration$,16]]],t.GetBucketAnalyticsConfigurationRequest$=[3,Q,`GetBucketAnalyticsConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.GetBucketCorsOutput$=[3,Q,`GetBucketCorsOutput`,{[X]:de},[fe],[[()=>Io,{[pa]:1,[X]:pe}]]],t.GetBucketCorsRequest$=[3,Q,`GetBucketCorsRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketEncryptionOutput$=[3,Q,`GetBucketEncryptionOutput`,0,[ni],[[()=>t.ServerSideEncryptionConfiguration$,16]]],t.GetBucketEncryptionRequest$=[3,Q,`GetBucketEncryptionRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketIntelligentTieringConfigurationOutput$=[3,Q,`GetBucketIntelligentTieringConfigurationOutput`,0,[Ut],[[()=>t.IntelligentTieringConfiguration$,16]]],t.GetBucketIntelligentTieringConfigurationRequest$=[3,Q,`GetBucketIntelligentTieringConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.GetBucketInventoryConfigurationOutput$=[3,Q,`GetBucketInventoryConfigurationOutput`,0,[kt],[[()=>t.InventoryConfiguration$,16]]],t.GetBucketInventoryConfigurationRequest$=[3,Q,`GetBucketInventoryConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.GetBucketLifecycleConfigurationOutput$=[3,Q,`GetBucketLifecycleConfigurationOutput`,{[X]:rn},[mr,yi],[[()=>qo,{[pa]:1,[X]:Vr}],[0,{[J]:go}]]],t.GetBucketLifecycleConfigurationRequest$=[3,Q,`GetBucketLifecycleConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketLocationOutput$=[3,Q,`GetBucketLocationOutput`,{[X]:nn},[nn],[0]],t.GetBucketLocationRequest$=[3,Q,`GetBucketLocationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketLoggingOutput$=[3,Q,`GetBucketLoggingOutput`,{[X]:w},[an],[[()=>t.LoggingEnabled$,0]]],t.GetBucketLoggingRequest$=[3,Q,`GetBucketLoggingRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketMetadataConfigurationOutput$=[3,Q,`GetBucketMetadataConfigurationOutput`,0,[vt],[[()=>t.GetBucketMetadataConfigurationResult$,16]]],t.GetBucketMetadataConfigurationRequest$=[3,Q,`GetBucketMetadataConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketMetadataConfigurationResult$=[3,Q,vt,0,[fn],[()=>t.MetadataConfigurationResult$],1],t.GetBucketMetadataTableConfigurationOutput$=[3,Q,`GetBucketMetadataTableConfigurationOutput`,0,[yt],[[()=>t.GetBucketMetadataTableConfigurationResult$,16]]],t.GetBucketMetadataTableConfigurationRequest$=[3,Q,`GetBucketMetadataTableConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketMetadataTableConfigurationResult$=[3,Q,yt,0,[xn,Hr,ct],[()=>t.MetadataTableConfigurationResult$,0,()=>t.ErrorDetails$],2],t.GetBucketMetricsConfigurationOutput$=[3,Q,`GetBucketMetricsConfigurationOutput`,0,[pn],[[()=>t.MetricsConfiguration$,16]]],t.GetBucketMetricsConfigurationRequest$=[3,Q,`GetBucketMetricsConfigurationRequest`,0,[v,`Id`,G],[[0,1],[0,{[Y]:`id`}],[0,{[J]:Z}]],2],t.GetBucketNotificationConfigurationRequest$=[3,Q,`GetBucketNotificationConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketOwnershipControlsOutput$=[3,Q,`GetBucketOwnershipControlsOutput`,0,[Ln],[[()=>t.OwnershipControls$,16]]],t.GetBucketOwnershipControlsRequest$=[3,Q,`GetBucketOwnershipControlsRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketPolicyOutput$=[3,Q,`GetBucketPolicyOutput`,0,[cr],[[0,16]]],t.GetBucketPolicyRequest$=[3,Q,`GetBucketPolicyRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketPolicyStatusOutput$=[3,Q,`GetBucketPolicyStatusOutput`,0,[nr],[[()=>t.PolicyStatus$,16]]],t.GetBucketPolicyStatusRequest$=[3,Q,`GetBucketPolicyStatusRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketReplicationOutput$=[3,Q,`GetBucketReplicationOutput`,0,[Sr],[[()=>t.ReplicationConfiguration$,16]]],t.GetBucketReplicationRequest$=[3,Q,`GetBucketReplicationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketRequestPaymentOutput$=[3,Q,`GetBucketRequestPaymentOutput`,{[X]:kr},[ar],[0]],t.GetBucketRequestPaymentRequest$=[3,Q,`GetBucketRequestPaymentRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketTaggingOutput$=[3,Q,`GetBucketTaggingOutput`,{[X]:Ei},[wi],[[()=>ss,0]],1],t.GetBucketTaggingRequest$=[3,Q,`GetBucketTaggingRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketVersioningOutput$=[3,Q,`GetBucketVersioningOutput`,{[X]:Ii},[Hr,gn],[0,[0,{[X]:mn}]]],t.GetBucketVersioningRequest$=[3,Q,`GetBucketVersioningRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetBucketWebsiteOutput$=[3,Q,`GetBucketWebsiteOutput`,{[X]:zi},[hr,jt,Ze,jr],[()=>t.RedirectAllRequestsTo$,()=>t.IndexDocument$,()=>t.ErrorDocument$,[()=>as,0]]],t.GetBucketWebsiteRequest$=[3,Q,`GetBucketWebsiteRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetObjectAclOutput$=[3,Q,`GetObjectAclOutput`,{[X]:a},[In,_t,gr],[()=>t.Owner$,[()=>Ho,{[X]:r}],[0,{[J]:eo}]]],t.GetObjectAclRequest$=[3,Q,`GetObjectAclRequest`,0,[v,`Key`,Li,Dr,G],[[0,1],[0,1],[0,{[Y]:fa}],[0,{[J]:to}],[0,{[J]:Z}]],2],t.GetObjectAttributesOutput$=[3,Q,`GetObjectAttributesOutput`,{[X]:`GetObjectAttributesResponse`},[Ie,sn,Li,gr,rt,N,`ObjectParts`,Kr,`ObjectSize`],[[2,{[J]:Ra}],[4,{[J]:cn}],[0,{[J]:_o}],[0,{[J]:eo}],0,()=>t.Checksum$,[()=>t.GetObjectAttributesParts$,0],0,1]],t.GetObjectAttributesParts$=[3,Q,`GetObjectAttributesParts`,0,[`TotalPartsCount`,er,Nn,yn,Ht,rr],[[1,{[X]:Qn}],0,0,1,2,[()=>ns,{[pa]:1,[X]:ir}]]],t.GetObjectAttributesRequest$=[3,Q,`GetObjectAttributesRequest`,0,[v,`Key`,`ObjectAttributes`,Li,yn,er,ri,ii,ai,Dr,G],[[0,1],[0,1],[64,{[J]:`x-amz-object-attributes`}],[0,{[Y]:fa}],[1,{[J]:`x-amz-max-parts`}],[0,{[J]:`x-amz-part-number-marker`}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[0,{[J]:to}],[0,{[J]:Z}]],3],t.GetObjectLegalHoldOutput$=[3,Q,`GetObjectLegalHoldOutput`,0,[on],[[()=>t.ObjectLockLegalHold$,{[Xi]:1,[X]:on}]]],t.GetObjectLegalHoldRequest$=[3,Q,`GetObjectLegalHoldRequest`,0,[v,`Key`,Li,Dr,G],[[0,1],[0,1],[0,{[Y]:fa}],[0,{[J]:to}],[0,{[J]:Z}]],2],t.GetObjectLockConfigurationOutput$=[3,Q,`GetObjectLockConfigurationOutput`,0,[Bn],[[()=>t.ObjectLockConfiguration$,16]]],t.GetObjectLockConfigurationRequest$=[3,Q,`GetObjectLockConfigurationRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GetObjectOutput$=[3,Q,`GetObjectOutput`,0,[j,Ie,p,qe,Rr,sn,ae,rt,L,R,z,ve,ye,W,vn,Li,I,te,ne,re,ge,Ae,dt,et,Bi,ti,ln,ri,ai,ci,C,Kr,gr,Pr,Qn,_i,Hn,Un,Vn],[[()=>Ao,16],[2,{[J]:Ra}],[0,{[J]:Vi}],[0,{[J]:za}],[0,{[J]:$a}],[4,{[J]:cn}],[1,{[J]:ie}],[0,{[J]:rt}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[0,{[J]:La}],[1,{[J]:qa}],[0,{[J]:_o}],[0,{[J]:ee}],[0,{[J]:B}],[0,{[J]:V}],[0,{[J]:H}],[0,{[J]:_e}],[0,{[J]:ke}],[4,{[J]:dt}],[0,{[J]:et}],[0,{[J]:vo}],[0,{[J]:oo}],[128,{[Zi]:Ga}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[2,{[J]:co}],[0,{[J]:ro}],[0,{[J]:eo}],[0,{[J]:no}],[1,{[J]:Ja}],[1,{[J]:ho}],[0,{[J]:Xa}],[5,{[J]:Za}],[0,{[J]:Ya}]]],t.GetObjectRequest$=[3,Q,`GetObjectRequest`,0,[v,`Key`,Nt,Ft,Lt,qt,Lr,_r,vr,yr,br,xr,wr,Li,ri,ii,ai,Dr,$n,G,le],[[0,1],[0,1],[0,{[J]:It}],[4,{[J]:Pt}],[0,{[J]:Rt}],[4,{[J]:Jt}],[0,{[J]:Lr}],[0,{[Y]:ra}],[0,{[Y]:ia}],[0,{[Y]:aa}],[0,{[Y]:oa}],[0,{[Y]:sa}],[6,{[Y]:ca}],[0,{[Y]:fa}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[0,{[J]:to}],[1,{[Y]:na}],[0,{[J]:Z}],[0,{[J]:Ta}]],2],t.GetObjectRetentionOutput$=[3,Q,`GetObjectRetentionOutput`,0,[Br],[[()=>t.ObjectLockRetention$,{[Xi]:1,[X]:Br}]]],t.GetObjectRetentionRequest$=[3,Q,`GetObjectRetentionRequest`,0,[v,`Key`,Li,Dr,G],[[0,1],[0,1],[0,{[Y]:fa}],[0,{[J]:to}],[0,{[J]:Z}]],2],t.GetObjectTaggingOutput$=[3,Q,`GetObjectTaggingOutput`,{[X]:Ei},[wi,Li],[[()=>ss,0],[0,{[J]:_o}]],1],t.GetObjectTaggingRequest$=[3,Q,`GetObjectTaggingRequest`,0,[v,`Key`,Li,G,Dr],[[0,1],[0,1],[0,{[Y]:fa}],[0,{[J]:Z}],[0,{[J]:to}]],2],t.GetObjectTorrentOutput$=[3,Q,`GetObjectTorrentOutput`,0,[j,gr],[[()=>Ao,16],[0,{[J]:eo}]]],t.GetObjectTorrentRequest$=[3,Q,`GetObjectTorrentRequest`,0,[v,`Key`,Dr,G],[[0,1],[0,1],[0,{[J]:to}],[0,{[J]:Z}]],2],t.GetPublicAccessBlockOutput$=[3,Q,`GetPublicAccessBlockOutput`,0,[Zn],[[()=>t.PublicAccessBlockConfiguration$,16]]],t.GetPublicAccessBlockRequest$=[3,Q,`GetPublicAccessBlockRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.GlacierJobParameters$=[3,Q,xt,0,[Di],[0],1],t.Grant$=[3,Q,Et,0,[Dt,sr],[[()=>t.Grantee$,{[ma]:[`xsi`,Qi]}],0]],t.Grantee$=[3,Q,Dt,0,[ji,ze,`EmailAddress`,`ID`,`URI`],[[0,{xmlAttribute:1,[X]:`xsi:type`}],0,0,0,0],1],t.HeadBucketOutput$=[3,Q,`HeadBucketOutput`,0,[b,`BucketLocationType`,`BucketLocationName`,O,`AccessPointAlias`],[[0,{[J]:va}],[0,{[J]:`x-amz-bucket-location-type`}],[0,{[J]:`x-amz-bucket-location-name`}],[0,{[J]:`x-amz-bucket-region`}],[2,{[J]:`x-amz-access-point-alias`}]]],t.HeadBucketRequest$=[3,Q,`HeadBucketRequest`,0,[v,G],[[0,1],[0,{[J]:Z}]],1],t.HeadObjectOutput$=[3,Q,`HeadObjectOutput`,0,[Ie,p,qe,Rr,`ArchiveStatus`,sn,ae,L,R,z,ve,ye,W,rt,vn,Li,I,te,ne,re,Ae,ge,dt,et,Bi,ti,ln,ri,ai,ci,C,Kr,gr,Pr,Qn,_i,Hn,Un,Vn],[[2,{[J]:Ra}],[0,{[J]:Vi}],[0,{[J]:za}],[0,{[J]:$a}],[0,{[J]:`x-amz-archive-status`}],[4,{[J]:cn}],[1,{[J]:ie}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[0,{[J]:La}],[0,{[J]:rt}],[1,{[J]:qa}],[0,{[J]:_o}],[0,{[J]:ee}],[0,{[J]:B}],[0,{[J]:V}],[0,{[J]:H}],[0,{[J]:ke}],[0,{[J]:_e}],[4,{[J]:dt}],[0,{[J]:et}],[0,{[J]:vo}],[0,{[J]:oo}],[128,{[Zi]:Ga}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[2,{[J]:co}],[0,{[J]:ro}],[0,{[J]:eo}],[0,{[J]:no}],[1,{[J]:Ja}],[1,{[J]:ho}],[0,{[J]:Xa}],[5,{[J]:Za}],[0,{[J]:Ya}]]],t.HeadObjectRequest$=[3,Q,`HeadObjectRequest`,0,[v,`Key`,Nt,Ft,Lt,qt,Lr,_r,vr,yr,br,xr,wr,Li,ri,ii,ai,Dr,$n,G,le],[[0,1],[0,1],[0,{[J]:It}],[4,{[J]:Pt}],[0,{[J]:Rt}],[4,{[J]:Jt}],[0,{[J]:Lr}],[0,{[Y]:ra}],[0,{[Y]:ia}],[0,{[Y]:aa}],[0,{[Y]:oa}],[0,{[Y]:sa}],[6,{[Y]:ca}],[0,{[Y]:fa}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[0,{[J]:to}],[1,{[Y]:na}],[0,{[J]:Z}],[0,{[J]:Ta}]],2],t.IndexDocument$=[3,Q,jt,0,[`Suffix`],[0],1],t.Initiator$=[3,Q,Yt,0,[`ID`,ze],[0,0]],t.InputSerialization$=[3,Q,Vt,0,[`CSV`,`CompressionType`,Xt,`Parquet`],[()=>t.CSVInput$,0,()=>t.JSONInput$,()=>t.ParquetInput$]],t.IntelligentTieringAndOperator$=[3,Q,`IntelligentTieringAndOperator`,0,[Xn,mi],[0,[()=>ss,{[pa]:1,[X]:`Tag`}]]],t.IntelligentTieringConfiguration$=[3,Q,Ut,0,[`Id`,Hr,`Tierings`,pt],[0,0,[()=>ls,{[pa]:1,[X]:Oi}],[()=>t.IntelligentTieringFilter$,0]],3],t.IntelligentTieringFilter$=[3,Q,`IntelligentTieringFilter`,0,[Xn,`Tag`,`And`],[0,()=>t.Tag$,[()=>t.IntelligentTieringAndOperator$,0]]],t.InventoryConfiguration$=[3,Q,kt,0,[Ge,`IsEnabled`,`Id`,`IncludedObjectVersions`,`Schedule`,pt,`OptionalFields`],[[()=>t.InventoryDestination$,0],2,0,0,()=>t.InventorySchedule$,()=>t.InventoryFilter$,[()=>Go,0]],5],t.InventoryDestination$=[3,Q,`InventoryDestination`,0,[Gr],[[()=>t.InventoryS3BucketDestination$,0]],1],t.InventoryEncryption$=[3,Q,`InventoryEncryption`,0,[li,oi],[[()=>t.SSES3$,{[X]:$r}],[()=>t.SSEKMS$,{[X]:Jr}]]],t.InventoryFilter$=[3,Q,`InventoryFilter`,0,[Xn],[0],1],t.InventoryS3BucketDestination$=[3,Q,`InventoryS3BucketDestination`,0,[v,gt,`AccountId`,Xn,ot],[0,0,0,0,[()=>t.InventoryEncryption$,0]],2],t.InventorySchedule$=[3,Q,`InventorySchedule`,0,[`Frequency`],[0],1],t.InventoryTableConfiguration$=[3,Q,Kt,0,[Oe,Ye],[0,()=>t.MetadataTableEncryptionConfiguration$],1],t.InventoryTableConfigurationResult$=[3,Q,Gt,0,[Oe,Ti,ct,Si,hi],[0,0,()=>t.ErrorDetails$,0,0],1],t.InventoryTableConfigurationUpdates$=[3,Q,`InventoryTableConfigurationUpdates`,0,[Oe,Ye],[0,()=>t.MetadataTableEncryptionConfiguration$],1],t.JournalTableConfiguration$=[3,Q,Zt,0,[Tr,Ye],[()=>t.RecordExpiration$,()=>t.MetadataTableEncryptionConfiguration$],1],t.JournalTableConfigurationResult$=[3,Q,Qt,0,[Ti,Si,Tr,ct,hi],[0,0,()=>t.RecordExpiration$,()=>t.ErrorDetails$,0],3],t.JournalTableConfigurationUpdates$=[3,Q,`JournalTableConfigurationUpdates`,0,[Tr],[()=>t.RecordExpiration$],1],t.JSONInput$=[3,Q,`JSONInput`,0,[ji],[0]],t.JSONOutput$=[3,Q,`JSONOutput`,0,[Cr],[0]],t.LambdaFunctionConfiguration$=[3,Q,`LambdaFunctionConfiguration`,0,[`LambdaFunctionArn`,lt,`Id`,pt],[[0,{[X]:`CloudFunction`}],[64,{[pa]:1,[X]:ut}],0,[()=>t.NotificationConfigurationFilter$,0]],2],t.LifecycleExpiration$=[3,Q,`LifecycleExpiration`,0,[He,Fe,`ExpiredObjectDeleteMarker`],[5,1,2]],t.LifecycleRule$=[3,Q,`LifecycleRule`,0,[Hr,qe,`ID`,Xn,pt,`Transitions`,`NoncurrentVersionTransitions`,Pn,l],[0,()=>t.LifecycleExpiration$,0,0,[()=>t.LifecycleRuleFilter$,0],[()=>ds,{[pa]:1,[X]:Ai}],[()=>Xo,{[pa]:1,[X]:Fn}],()=>t.NoncurrentVersionExpiration$,()=>t.AbortIncompleteMultipartUpload$],1],t.LifecycleRuleAndOperator$=[3,Q,`LifecycleRuleAndOperator`,0,[Xn,mi,Kn,qn],[0,[()=>ss,{[pa]:1,[X]:`Tag`}],1,1]],t.LifecycleRuleFilter$=[3,Q,`LifecycleRuleFilter`,0,[Xn,`Tag`,Kn,qn,`And`],[0,()=>t.Tag$,1,1,[()=>t.LifecycleRuleAndOperator$,0]]],t.ListBucketAnalyticsConfigurationsOutput$=[3,Q,`ListBucketAnalyticsConfigurationsOutput`,{[X]:`ListBucketAnalyticsConfigurationResult`},[Ht,je,kn,i],[2,0,0,[()=>Mo,{[pa]:1,[X]:s}]]],t.ListBucketAnalyticsConfigurationsRequest$=[3,Q,`ListBucketAnalyticsConfigurationsRequest`,0,[v,je,G],[[0,1],[0,{[Y]:Ui}],[0,{[J]:Z}]],1],t.ListBucketIntelligentTieringConfigurationsOutput$=[3,Q,`ListBucketIntelligentTieringConfigurationsOutput`,0,[Ht,je,kn,Wt],[2,0,0,[()=>Uo,{[pa]:1,[X]:Ut}]]],t.ListBucketIntelligentTieringConfigurationsRequest$=[3,Q,`ListBucketIntelligentTieringConfigurationsRequest`,0,[v,je,G],[[0,1],[0,{[Y]:Ui}],[0,{[J]:Z}]],1],t.ListBucketInventoryConfigurationsOutput$=[3,Q,`ListBucketInventoryConfigurationsOutput`,{[X]:`ListInventoryConfigurationsResult`},[je,At,Ht,kn],[0,[()=>Wo,{[pa]:1,[X]:kt}],2,0]],t.ListBucketInventoryConfigurationsRequest$=[3,Q,`ListBucketInventoryConfigurationsRequest`,0,[v,je,G],[[0,1],[0,{[Y]:Ui}],[0,{[J]:Z}]],1],t.ListBucketMetricsConfigurationsOutput$=[3,Q,`ListBucketMetricsConfigurationsOutput`,{[X]:`ListMetricsConfigurationsResult`},[Ht,je,kn,dn],[2,0,0,[()=>Jo,{[pa]:1,[X]:pn}]]],t.ListBucketMetricsConfigurationsRequest$=[3,Q,`ListBucketMetricsConfigurationsRequest`,0,[v,je,G],[[0,1],[0,{[Y]:Ui}],[0,{[J]:Z}]],1],t.ListBucketsOutput$=[3,Q,`ListBucketsOutput`,{[X]:`ListAllMyBucketsResult`},[M,In,je,Xn],[[()=>No,0],()=>t.Owner$,0,0]],t.ListBucketsRequest$=[3,Q,`ListBucketsRequest`,0,[`MaxBuckets`,je,Xn,O],[[1,{[Y]:`max-buckets`}],[0,{[Y]:Ui}],[0,{[Y]:ta}],[0,{[Y]:`bucket-region`}]]],t.ListDirectoryBucketsOutput$=[3,Q,`ListDirectoryBucketsOutput`,{[X]:`ListAllMyDirectoryBucketsResult`},[M,je],[[()=>No,0],0]],t.ListDirectoryBucketsRequest$=[3,Q,`ListDirectoryBucketsRequest`,0,[je,`MaxDirectoryBuckets`],[[0,{[Y]:Ui}],[1,{[Y]:`max-directory-buckets`}]]],t.ListMultipartUploadsOutput$=[3,Q,`ListMultipartUploadsOutput`,{[X]:`ListMultipartUploadsResult`},[v,$t,Ni,jn,Xn,We,`NextUploadIdMarker`,Cn,Ht,`Uploads`,he,it,gr],[0,0,0,0,0,0,0,1,2,[()=>Yo,{[pa]:1,[X]:`Upload`}],[()=>Po,{[pa]:1}],0,[0,{[J]:eo}]]],t.ListMultipartUploadsRequest$=[3,Q,`ListMultipartUploadsRequest`,0,[v,We,it,$t,Cn,Xn,Ni,G,Dr],[[0,1],[0,{[Y]:Wi}],[0,{[Y]:qi}],[0,{[Y]:$i}],[1,{[Y]:`max-uploads`}],[0,{[Y]:ta}],[0,{[Y]:`upload-id-marker`}],[0,{[J]:Z}],[0,{[J]:to}]],1],t.ListObjectsOutput$=[3,Q,`ListObjectsOutput`,{[X]:tn},[Ht,wn,`NextMarker`,Ne,Dn,Xn,We,_n,he,it,gr],[2,0,0,[()=>Qo,{[pa]:1}],0,0,0,1,[()=>Po,{[pa]:1}],0,[0,{[J]:eo}]]],t.ListObjectsRequest$=[3,Q,`ListObjectsRequest`,0,[v,We,it,wn,_n,Xn,Dr,G,Gn],[[0,1],[0,{[Y]:Wi}],[0,{[Y]:qi}],[0,{[Y]:`marker`}],[1,{[Y]:ea}],[0,{[Y]:ta}],[0,{[J]:to}],[0,{[J]:Z}],[64,{[J]:Qa}]],1],t.ListObjectsV2Output$=[3,Q,`ListObjectsV2Output`,{[X]:tn},[Ht,Ne,Dn,Xn,We,_n,he,it,`KeyCount`,je,kn,Ur,gr],[2,[()=>Qo,{[pa]:1}],0,0,0,1,[()=>Po,{[pa]:1}],0,1,0,0,0,[0,{[J]:eo}]]],t.ListObjectsV2Request$=[3,Q,`ListObjectsV2Request`,0,[v,We,it,_n,Xn,je,`FetchOwner`,Ur,Dr,G,Gn],[[0,1],[0,{[Y]:Wi}],[0,{[Y]:qi}],[1,{[Y]:ea}],[0,{[Y]:ta}],[0,{[Y]:Ui}],[2,{[Y]:`fetch-owner`}],[0,{[Y]:`start-after`}],[0,{[J]:to}],[0,{[J]:Z}],[64,{[J]:Qa}]],1],t.ListObjectVersionsOutput$=[3,Q,`ListObjectVersionsOutput`,{[X]:`ListVersionsResult`},[Ht,$t,Ri,jn,`NextVersionIdMarker`,`Versions`,Re,Dn,Xn,We,_n,he,it,gr],[2,0,0,0,0,[()=>$o,{[pa]:1,[X]:`Version`}],[()=>Ro,{[pa]:1,[X]:Ie}],0,0,0,1,[()=>Po,{[pa]:1}],0,[0,{[J]:eo}]]],t.ListObjectVersionsRequest$=[3,Q,`ListObjectVersionsRequest`,0,[v,We,it,$t,_n,Xn,Ri,G,Dr,Gn],[[0,1],[0,{[Y]:Wi}],[0,{[Y]:qi}],[0,{[Y]:$i}],[1,{[Y]:ea}],[0,{[Y]:ta}],[0,{[Y]:`version-id-marker`}],[0,{[J]:Z}],[0,{[J]:to}],[64,{[J]:Qa}]],1],t.ListPartsOutput$=[3,Q,`ListPartsOutput`,{[X]:`ListPartsResult`},[c,m,v,`Key`,Mi,er,Nn,yn,Ht,rr,Yt,In,Kr,gr,P,W],[[4,{[J]:ga}],[0,{[J]:_a}],0,0,0,0,0,1,2,[()=>ts,{[pa]:1,[X]:ir}],()=>t.Initiator$,()=>t.Owner$,0,[0,{[J]:eo}],0,0]],t.ListPartsRequest$=[3,Q,`ListPartsRequest`,0,[v,`Key`,Mi,yn,er,Dr,G,ri,ii,ai],[[0,1],[0,1],[0,{[Y]:da}],[1,{[Y]:`max-parts`}],[0,{[Y]:`part-number-marker`}],[0,{[J]:to}],[0,{[J]:Z}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}]],3],t.LocationInfo$=[3,Q,`LocationInfo`,0,[ji,Dn],[0,0]],t.LoggingEnabled$=[3,Q,an,0,[`TargetBucket`,`TargetPrefix`,bi,Ci],[0,0,[()=>cs,0],[()=>t.TargetObjectKeyFormat$,0]],2],t.MetadataConfiguration$=[3,Q,un,0,[Zt,Kt],[()=>t.JournalTableConfiguration$,()=>t.InventoryTableConfiguration$],1],t.MetadataConfigurationResult$=[3,Q,fn,0,[Ve,Qt,Gt],[()=>t.DestinationResult$,()=>t.JournalTableConfigurationResult$,()=>t.InventoryTableConfigurationResult$],1],t.MetadataEntry$=[3,Q,hn,0,[Dn,Fi],[0,0]],t.MetadataTableConfiguration$=[3,Q,bn,0,[di],[()=>t.S3TablesDestination$],1],t.MetadataTableConfigurationResult$=[3,Q,xn,0,[fi],[()=>t.S3TablesDestinationResult$],1],t.MetadataTableEncryptionConfiguration$=[3,Q,`MetadataTableEncryptionConfiguration`,0,[`SseAlgorithm`,`KmsKeyArn`],[0,0],1],t.Metrics$=[3,Q,Tn,0,[Hr,`EventThreshold`],[0,()=>t.ReplicationTimeValue$],1],t.MetricsAndOperator$=[3,Q,`MetricsAndOperator`,0,[Xn,mi,f],[0,[()=>ss,{[pa]:1,[X]:`Tag`}],0]],t.MetricsConfiguration$=[3,Q,pn,0,[`Id`,pt],[0,[()=>t.MetricsFilter$,0]],1],t.MultipartUpload$=[3,Q,Sn,0,[Mi,`Key`,`Initiated`,Kr,In,Yt,P,W],[0,0,4,0,()=>t.Owner$,()=>t.Initiator$,0,0]],t.NoncurrentVersionExpiration$=[3,Q,Pn,0,[An,Mn],[1,1]],t.NoncurrentVersionTransition$=[3,Q,Fn,0,[An,Kr,Mn],[1,0,1]],t.NotificationConfiguration$=[3,Q,On,0,[`TopicConfigurations`,`QueueConfigurations`,`LambdaFunctionConfigurations`,Je],[[()=>us,{[pa]:1,[X]:vi}],[()=>rs,{[pa]:1,[X]:fr}],[()=>Ko,{[pa]:1,[X]:`CloudFunctionConfiguration`}],()=>t.EventBridgeConfiguration$]],t.NotificationConfigurationFilter$=[3,Q,`NotificationConfigurationFilter`,0,[`Key`],[[()=>t.S3KeyFilter$,{[X]:`S3Key`}]]],t._Object$=[3,Q,Yn,0,[`Key`,sn,rt,P,W,pi,Kr,In,Fr],[0,4,0,[64,{[pa]:1}],0,1,0,()=>t.Owner$,()=>t.RestoreStatus$]],t.ObjectIdentifier$=[3,Q,`ObjectIdentifier`,0,[`Key`,Li,rt,`LastModifiedTime`,pi],[0,0,0,6,1],1],t.ObjectLockConfiguration$=[3,Q,Bn,0,[`ObjectLockEnabled`,Vr],[0,()=>t.ObjectLockRule$]],t.ObjectLockLegalHold$=[3,Q,`ObjectLockLegalHold`,0,[Hr],[0]],t.ObjectLockRetention$=[3,Q,`ObjectLockRetention`,0,[En,`RetainUntilDate`],[0,5]],t.ObjectLockRule$=[3,Q,`ObjectLockRule`,0,[Be],[()=>t.DefaultRetention$]],t.ObjectPart$=[3,Q,`ObjectPart`,0,[$n,pi,L,R,z,ve,ye],[1,1,0,0,0,0,0]],t.ObjectVersion$=[3,Q,`ObjectVersion`,0,[rt,P,W,pi,Kr,`Key`,Li,Mt,sn,In,Fr],[0,[64,{[pa]:1}],0,1,0,0,0,2,4,()=>t.Owner$,()=>t.RestoreStatus$]],t.OutputLocation$=[3,Q,zn,0,[`S3`],[[()=>t.S3Location$,0]]],t.OutputSerialization$=[3,Q,Jn,0,[`CSV`,Xt],[()=>t.CSVOutput$,()=>t.JSONOutput$]],t.Owner$=[3,Q,In,0,[ze,`ID`],[0,0]],t.OwnershipControls$=[3,Q,Ln,0,[mr],[[()=>es,{[pa]:1,[X]:Vr}]],1],t.OwnershipControlsRule$=[3,Q,`OwnershipControlsRule`,0,[Wn],[0],1],t.ParquetInput$=[3,Q,`ParquetInput`,0,[],[]],t.Part$=[3,Q,ir,0,[$n,sn,rt,pi,L,R,z,ve,ye],[1,4,0,1,0,0,0,0,0]],t.PartitionedPrefix$=[3,Q,tr,{[X]:tr},[`PartitionDateSource`],[0]],t.PolicyStatus$=[3,Q,nr,0,[zt],[[2,{[X]:zt}]]],t.Progress$=[3,Q,lr,0,[A,T,k],[1,1,1]],t.ProgressEvent$=[3,Q,`ProgressEvent`,0,[Ke],[[()=>t.Progress$,{[Ki]:1}]]],t.PublicAccessBlockConfiguration$=[3,Q,Zn,0,[E,Bt,D,Or],[[2,{[X]:E}],[2,{[X]:Bt}],[2,{[X]:D}],[2,{[X]:Or}]]],t.PutBucketAbacRequest$=[3,Q,`PutBucketAbacRequest`,0,[v,h,se,P,G],[[0,1],[()=>t.AbacStatus$,{[Xi]:1,[X]:h}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutBucketAccelerateConfigurationRequest$=[3,Q,`PutBucketAccelerateConfigurationRequest`,0,[v,n,G,P],[[0,1],[()=>t.AccelerateConfiguration$,{[Xi]:1,[X]:n}],[0,{[J]:Z}],[0,{[J]:io}]],2],t.PutBucketAclRequest$=[3,Q,`PutBucketAclRequest`,0,[v,`ACL`,a,se,P,bt,St,Ct,wt,Tt,G],[[0,1],[0,{[J]:ha}],[()=>t.AccessControlPolicy$,{[Xi]:1,[X]:a}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Ba}],[0,{[J]:Va}],[0,{[J]:Ha}],[0,{[J]:Ua}],[0,{[J]:Wa}],[0,{[J]:Z}]],1],t.PutBucketAnalyticsConfigurationRequest$=[3,Q,`PutBucketAnalyticsConfigurationRequest`,0,[v,`Id`,s,G],[[0,1],[0,{[Y]:`id`}],[()=>t.AnalyticsConfiguration$,{[Xi]:1,[X]:s}],[0,{[J]:Z}]],3],t.PutBucketCorsRequest$=[3,Q,`PutBucketCorsRequest`,0,[v,de,se,P,G],[[0,1],[()=>t.CORSConfiguration$,{[Xi]:1,[X]:de}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutBucketEncryptionRequest$=[3,Q,`PutBucketEncryptionRequest`,0,[v,ni,se,P,G],[[0,1],[()=>t.ServerSideEncryptionConfiguration$,{[Xi]:1,[X]:ni}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutBucketIntelligentTieringConfigurationRequest$=[3,Q,`PutBucketIntelligentTieringConfigurationRequest`,0,[v,`Id`,Ut,G],[[0,1],[0,{[Y]:`id`}],[()=>t.IntelligentTieringConfiguration$,{[Xi]:1,[X]:Ut}],[0,{[J]:Z}]],3],t.PutBucketInventoryConfigurationRequest$=[3,Q,`PutBucketInventoryConfigurationRequest`,0,[v,`Id`,kt,G],[[0,1],[0,{[Y]:`id`}],[()=>t.InventoryConfiguration$,{[Xi]:1,[X]:kt}],[0,{[J]:Z}]],3],t.PutBucketLifecycleConfigurationOutput$=[3,Q,`PutBucketLifecycleConfigurationOutput`,0,[yi],[[0,{[J]:go}]]],t.PutBucketLifecycleConfigurationRequest$=[3,Q,`PutBucketLifecycleConfigurationRequest`,0,[v,P,rn,G,yi],[[0,1],[0,{[J]:io}],[()=>t.BucketLifecycleConfiguration$,{[Xi]:1,[X]:rn}],[0,{[J]:Z}],[0,{[J]:go}]],1],t.PutBucketLoggingRequest$=[3,Q,`PutBucketLoggingRequest`,0,[v,w,se,P,G],[[0,1],[()=>t.BucketLoggingStatus$,{[Xi]:1,[X]:w}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutBucketMetricsConfigurationRequest$=[3,Q,`PutBucketMetricsConfigurationRequest`,0,[v,`Id`,pn,G],[[0,1],[0,{[Y]:`id`}],[()=>t.MetricsConfiguration$,{[Xi]:1,[X]:pn}],[0,{[J]:Z}]],3],t.PutBucketNotificationConfigurationRequest$=[3,Q,`PutBucketNotificationConfigurationRequest`,0,[v,On,G,`SkipDestinationValidation`],[[0,1],[()=>t.NotificationConfiguration$,{[Xi]:1,[X]:On}],[0,{[J]:Z}],[2,{[J]:`x-amz-skip-destination-validation`}]],2],t.PutBucketOwnershipControlsRequest$=[3,Q,`PutBucketOwnershipControlsRequest`,0,[v,Ln,se,G,P],[[0,1],[()=>t.OwnershipControls$,{[Xi]:1,[X]:Ln}],[0,{[J]:oe}],[0,{[J]:Z}],[0,{[J]:io}]],2],t.PutBucketPolicyRequest$=[3,Q,`PutBucketPolicyRequest`,0,[v,cr,se,P,`ConfirmRemoveSelfBucketAccess`,G],[[0,1],[0,16],[0,{[J]:oe}],[0,{[J]:io}],[2,{[J]:`x-amz-confirm-remove-self-bucket-access`}],[0,{[J]:Z}]],2],t.PutBucketReplicationRequest$=[3,Q,`PutBucketReplicationRequest`,0,[v,Sr,se,P,ki,G],[[0,1],[()=>t.ReplicationConfiguration$,{[Xi]:1,[X]:Sr}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:ba}],[0,{[J]:Z}]],2],t.PutBucketRequestPaymentRequest$=[3,Q,`PutBucketRequestPaymentRequest`,0,[v,kr,se,P,G],[[0,1],[()=>t.RequestPaymentConfiguration$,{[Xi]:1,[X]:kr}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutBucketTaggingRequest$=[3,Q,`PutBucketTaggingRequest`,0,[v,Ei,se,P,G],[[0,1],[()=>t.Tagging$,{[Xi]:1,[X]:Ei}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutBucketVersioningRequest$=[3,Q,`PutBucketVersioningRequest`,0,[v,Ii,se,P,`MFA`,G],[[0,1],[()=>t.VersioningConfiguration$,{[Xi]:1,[X]:Ii}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Ka}],[0,{[J]:Z}]],2],t.PutBucketWebsiteRequest$=[3,Q,`PutBucketWebsiteRequest`,0,[v,zi,se,P,G],[[0,1],[()=>t.WebsiteConfiguration$,{[Xi]:1,[X]:zi}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutObjectAclOutput$=[3,Q,`PutObjectAclOutput`,0,[gr],[[0,{[J]:eo}]]],t.PutObjectAclRequest$=[3,Q,`PutObjectAclRequest`,0,[v,`Key`,`ACL`,a,se,P,bt,St,Ct,wt,Tt,Dr,Li,G],[[0,1],[0,1],[0,{[J]:ha}],[()=>t.AccessControlPolicy$,{[Xi]:1,[X]:a}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Ba}],[0,{[J]:Va}],[0,{[J]:Ha}],[0,{[J]:Ua}],[0,{[J]:Wa}],[0,{[J]:to}],[0,{[Y]:fa}],[0,{[J]:Z}]],2],t.PutObjectLegalHoldOutput$=[3,Q,`PutObjectLegalHoldOutput`,0,[gr],[[0,{[J]:eo}]]],t.PutObjectLegalHoldRequest$=[3,Q,`PutObjectLegalHoldRequest`,0,[v,`Key`,on,Dr,Li,se,P,G],[[0,1],[0,1],[()=>t.ObjectLockLegalHold$,{[Xi]:1,[X]:on}],[0,{[J]:to}],[0,{[Y]:fa}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutObjectLockConfigurationOutput$=[3,Q,`PutObjectLockConfigurationOutput`,0,[gr],[[0,{[J]:eo}]]],t.PutObjectLockConfigurationRequest$=[3,Q,`PutObjectLockConfigurationRequest`,0,[v,Bn,Dr,ki,se,P,G],[[0,1],[()=>t.ObjectLockConfiguration$,{[Xi]:1,[X]:Bn}],[0,{[J]:to}],[0,{[J]:ba}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],1],t.PutObjectOutput$=[3,Q,`PutObjectOutput`,0,[qe,rt,L,R,z,ve,ye,W,ti,Li,ri,ai,ci,si,C,pi,gr],[[0,{[J]:za}],[0,{[J]:rt}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[0,{[J]:La}],[0,{[J]:oo}],[0,{[J]:_o}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}],[1,{[J]:`x-amz-object-size`}],[0,{[J]:eo}]]],t.PutObjectRequest$=[3,Q,`PutObjectRequest`,0,[v,`Key`,`ACL`,j,I,te,ne,re,ae,se,Ae,P,L,R,z,ve,ye,dt,Nt,Lt,bt,St,Ct,Tt,`WriteOffsetBytes`,ln,ti,Kr,Bi,ri,ii,ai,ci,si,C,Dr,Ei,Hn,Un,Vn,G],[[0,1],[0,1],[0,{[J]:ha}],[()=>Ao,16],[0,{[J]:ee}],[0,{[J]:B}],[0,{[J]:V}],[0,{[J]:H}],[1,{[J]:ie}],[0,{[J]:oe}],[0,{[J]:ke}],[0,{[J]:io}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[4,{[J]:dt}],[0,{[J]:It}],[0,{[J]:Rt}],[0,{[J]:Ba}],[0,{[J]:Va}],[0,{[J]:Ha}],[0,{[J]:Wa}],[1,{[J]:`x-amz-write-offset-bytes`}],[128,{[Zi]:Ga}],[0,{[J]:oo}],[0,{[J]:ro}],[0,{[J]:vo}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[()=>Oo,{[J]:lo}],[2,{[J]:co}],[0,{[J]:to}],[0,{[J]:mo}],[0,{[J]:Xa}],[5,{[J]:Za}],[0,{[J]:Ya}],[0,{[J]:Z}]],2],t.PutObjectRetentionOutput$=[3,Q,`PutObjectRetentionOutput`,0,[gr],[[0,{[J]:eo}]]],t.PutObjectRetentionRequest$=[3,Q,`PutObjectRetentionRequest`,0,[v,`Key`,Br,Dr,Li,S,se,P,G],[[0,1],[0,1],[()=>t.ObjectLockRetention$,{[Xi]:1,[X]:Br}],[0,{[J]:to}],[0,{[Y]:fa}],[2,{[J]:ya}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.PutObjectTaggingOutput$=[3,Q,`PutObjectTaggingOutput`,0,[Li],[[0,{[J]:_o}]]],t.PutObjectTaggingRequest$=[3,Q,`PutObjectTaggingRequest`,0,[v,`Key`,Ei,Li,se,P,G,Dr],[[0,1],[0,1],[()=>t.Tagging$,{[Xi]:1,[X]:Ei}],[0,{[Y]:fa}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}],[0,{[J]:to}]],3],t.PutPublicAccessBlockRequest$=[3,Q,`PutPublicAccessBlockRequest`,0,[v,Zn,se,P,G],[[0,1],[()=>t.PublicAccessBlockConfiguration$,{[Xi]:1,[X]:Zn}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.QueueConfiguration$=[3,Q,fr,0,[`QueueArn`,lt,`Id`,pt],[[0,{[X]:`Queue`}],[64,{[pa]:1,[X]:ut}],0,[()=>t.NotificationConfigurationFilter$,0]],2],t.RecordExpiration$=[3,Q,Tr,0,[qe,Fe],[0,1],1],t.RecordsEvent$=[3,Q,`RecordsEvent`,0,[or],[[21,{[Ki]:1}]]],t.Redirect$=[3,Q,zr,0,[Ot,`HttpRedirectCode`,ur,`ReplaceKeyPrefixWith`,`ReplaceKeyWith`],[0,0,0,0,0]],t.RedirectAllRequestsTo$=[3,Q,hr,0,[Ot,ur],[0,0],1],t.RenameObjectOutput$=[3,Q,`RenameObjectOutput`,0,[],[]],t.RenameObjectRequest$=[3,Q,`RenameObjectRequest`,0,[v,`Key`,`RenameSource`,`DestinationIfMatch`,`DestinationIfNoneMatch`,`DestinationIfModifiedSince`,`DestinationIfUnmodifiedSince`,`SourceIfMatch`,`SourceIfNoneMatch`,`SourceIfModifiedSince`,`SourceIfUnmodifiedSince`,`ClientToken`],[[0,1],[0,1],[0,{[J]:`x-amz-rename-source`}],[0,{[J]:It}],[0,{[J]:Rt}],[4,{[J]:Pt}],[4,{[J]:Jt}],[0,{[J]:`x-amz-rename-source-if-match`}],[0,{[J]:`x-amz-rename-source-if-none-match`}],[6,{[J]:`x-amz-rename-source-if-modified-since`}],[6,{[J]:`x-amz-rename-source-if-unmodified-since`}],[0,{[J]:`x-amz-client-token`,idempotencyToken:1}]],3],t.ReplicaModifications$=[3,Q,Er,0,[Hr],[0],1],t.ReplicationConfiguration$=[3,Q,Sr,0,[`Role`,mr],[0,[()=>is,{[pa]:1,[X]:Vr}]],2],t.ReplicationRule$=[3,Q,`ReplicationRule`,0,[Hr,Ge,`ID`,`Priority`,Xn,pt,ei,$e,Le],[0,()=>t.Destination$,0,1,0,[()=>t.ReplicationRuleFilter$,0],()=>t.SourceSelectionCriteria$,()=>t.ExistingObjectReplication$,()=>t.DeleteMarkerReplication$],2],t.ReplicationRuleAndOperator$=[3,Q,`ReplicationRuleAndOperator`,0,[Xn,mi],[0,[()=>ss,{[pa]:1,[X]:`Tag`}]]],t.ReplicationRuleFilter$=[3,Q,`ReplicationRuleFilter`,0,[Xn,`Tag`,`And`],[0,()=>t.Tag$,[()=>t.ReplicationRuleAndOperator$,0]]],t.ReplicationTime$=[3,Q,Ir,0,[Hr,`Time`],[0,()=>t.ReplicationTimeValue$],2],t.ReplicationTimeValue$=[3,Q,`ReplicationTimeValue`,0,[`Minutes`],[1]],t.RequestPaymentConfiguration$=[3,Q,kr,0,[ar],[0],1],t.RequestProgress$=[3,Q,Ar,0,[`Enabled`],[2]],t.RestoreObjectOutput$=[3,Q,`RestoreObjectOutput`,0,[gr,`RestoreOutputPath`],[[0,{[J]:eo}],[0,{[J]:`x-amz-restore-output-path`}]]],t.RestoreObjectRequest$=[3,Q,`RestoreObjectRequest`,0,[v,`Key`,Li,Mr,Dr,P,G],[[0,1],[0,1],[0,{[Y]:fa}],[()=>t.RestoreRequest$,{[Xi]:1,[X]:Mr}],[0,{[J]:to}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.RestoreRequest$=[3,Q,Mr,0,[Fe,xt,ji,Di,`Description`,Xr,zn],[1,()=>t.GlacierJobParameters$,0,0,0,()=>t.SelectParameters$,[()=>t.OutputLocation$,0]]],t.RestoreStatus$=[3,Q,Fr,0,[`IsRestoreInProgress`,`RestoreExpiryDate`],[2,4]],t.RoutingRule$=[3,Q,Nr,0,[zr,Me],[()=>t.Redirect$,()=>t.Condition$],1],t.S3KeyFilter$=[3,Q,`S3KeyFilter`,0,[`FilterRules`],[[()=>Vo,{[pa]:1,[X]:ht}]]],t.S3Location$=[3,Q,`S3Location`,0,[`BucketName`,Xn,ot,`CannedACL`,r,Ei,Pi,Kr],[0,0,[()=>t.Encryption$,0],0,[()=>Ho,0],[()=>t.Tagging$,0],[()=>fs,0],0],2],t.S3TablesDestination$=[3,Q,di,0,[gi,Si],[0,0],2],t.S3TablesDestinationResult$=[3,Q,fi,0,[gi,Si,hi,xi],[0,0,0,0],4],t.ScanRange$=[3,Q,Qr,0,[`Start`,`End`],[1,1]],t.SelectObjectContentOutput$=[3,Q,`SelectObjectContentOutput`,0,[or],[[()=>t.SelectObjectContentEventStream$,16]]],t.SelectObjectContentRequest$=[3,Q,`SelectObjectContentRequest`,0,[v,`Key`,ft,at,Vt,Jn,ri,ii,ai,Ar,Qr,G],[[0,1],[0,1],0,0,()=>t.InputSerialization$,()=>t.OutputSerialization$,[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],()=>t.RequestProgress$,()=>t.ScanRange$,[0,{[J]:Z}]],6],t.SelectParameters$=[3,Q,Xr,0,[Vt,at,ft,Jn],[()=>t.InputSerialization$,0,0,()=>t.OutputSerialization$],4],t.ServerSideEncryptionByDefault$=[3,Q,`ServerSideEncryptionByDefault`,0,[`SSEAlgorithm`,`KMSMasterKeyID`],[0,[()=>ko,0]],1],t.ServerSideEncryptionConfiguration$=[3,Q,ni,0,[mr],[[()=>os,{[pa]:1,[X]:Vr}]],1],t.ServerSideEncryptionRule$=[3,Q,`ServerSideEncryptionRule`,0,[`ApplyServerSideEncryptionByDefault`,C,x],[[()=>t.ServerSideEncryptionByDefault$,0],2,[()=>t.BlockedEncryptionTypes$,0]]],t.SessionCredentials$=[3,Q,`SessionCredentials`,0,[u,Wr,ui,qe],[[0,{[X]:u}],[()=>Eo,{[X]:Wr}],[()=>Eo,{[X]:ui}],[4,{[X]:qe}]],4],t.SimplePrefix$=[3,Q,Zr,{[X]:Zr},[],[]],t.SourceSelectionCriteria$=[3,Q,ei,0,[Yr,Er],[()=>t.SseKmsEncryptedObjects$,()=>t.ReplicaModifications$]],t.SSEKMS$=[3,Q,oi,{[X]:Jr},[`KeyId`],[[()=>ko,0]],1],t.SseKmsEncryptedObjects$=[3,Q,Yr,0,[Hr],[0],1],t.SSEKMSEncryption$=[3,Q,`SSEKMSEncryption`,{[X]:Jr},[`KMSKeyArn`,C],[[()=>To,0],2],1],t.SSES3$=[3,Q,li,{[X]:$r},[],[]],t.Stats$=[3,Q,K,0,[A,T,k],[1,1,1]],t.StatsEvent$=[3,Q,`StatsEvent`,0,[Ke],[[()=>t.Stats$,{[Ki]:1}]]],t.StorageClassAnalysis$=[3,Q,qr,0,[`DataExport`],[()=>t.StorageClassAnalysisDataExport$]],t.StorageClassAnalysisDataExport$=[3,Q,`StorageClassAnalysisDataExport`,0,[`OutputSchemaVersion`,Ge],[0,()=>t.AnalyticsExportDestination$],2],t.Tag$=[3,Q,`Tag`,0,[`Key`,Fi],[0,0],2],t.Tagging$=[3,Q,Ei,0,[wi],[[()=>ss,0]],1],t.TargetGrant$=[3,Q,`TargetGrant`,0,[Dt,sr],[[()=>t.Grantee$,{[ma]:[`xsi`,Qi]}],0]],t.TargetObjectKeyFormat$=[3,Q,Ci,0,[Zr,tr],[[()=>t.SimplePrefix$,{[X]:Zr}],[()=>t.PartitionedPrefix$,{[X]:tr}]]],t.Tiering$=[3,Q,Oi,0,[Fe,g],[1,0],2],t.TopicConfiguration$=[3,Q,vi,0,[`TopicArn`,lt,`Id`,pt],[[0,{[X]:`Topic`}],[64,{[pa]:1,[X]:ut}],0,[()=>t.NotificationConfigurationFilter$,0]],2],t.Transition$=[3,Q,Ai,0,[He,Fe,Kr],[5,1,0]],t.UpdateBucketMetadataInventoryTableConfigurationRequest$=[3,Q,`UpdateBucketMetadataInventoryTableConfigurationRequest`,0,[v,Kt,se,P,G],[[0,1],[()=>t.InventoryTableConfigurationUpdates$,{[Xi]:1,[X]:Kt}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.UpdateBucketMetadataJournalTableConfigurationRequest$=[3,Q,`UpdateBucketMetadataJournalTableConfigurationRequest`,0,[v,Zt,se,P,G],[[0,1],[()=>t.JournalTableConfigurationUpdates$,{[Xi]:1,[X]:Zt}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Z}]],2],t.UpdateObjectEncryptionRequest$=[3,Q,`UpdateObjectEncryptionRequest`,0,[v,`Key`,Rn,Li,Dr,G,se,P],[[0,1],[0,1],[()=>t.ObjectEncryption$,16],[0,{[Y]:fa}],[0,{[J]:to}],[0,{[J]:Z}],[0,{[J]:oe}],[0,{[J]:io}]],3],t.UpdateObjectEncryptionResponse$=[3,Q,`UpdateObjectEncryptionResponse`,0,[gr],[[0,{[J]:eo}]]],t.UploadPartCopyOutput$=[3,Q,`UploadPartCopyOutput`,0,[De,me,ti,ri,ai,ci,C,gr],[[0,{[J]:Ia}],[()=>t.CopyPartResult$,16],[0,{[J]:oo}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[2,{[J]:co}],[0,{[J]:eo}]]],t.UploadPartCopyRequest$=[3,Q,`UploadPartCopyRequest`,0,[v,U,`Key`,$n,Mi,be,xe,Se,Ce,`CopySourceRange`,ri,ii,ai,we,Te,Ee,Dr,G,tt],[[0,1],[0,{[J]:Oa}],[0,1],[1,{[Y]:na}],[0,{[Y]:da}],[0,{[J]:ka}],[4,{[J]:Aa}],[0,{[J]:ja}],[4,{[J]:Ma}],[0,{[J]:`x-amz-copy-source-range`}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[0,{[J]:Na}],[()=>wo,{[J]:Pa}],[0,{[J]:Fa}],[0,{[J]:to}],[0,{[J]:Z}],[0,{[J]:ao}]],5],t.UploadPartOutput$=[3,Q,`UploadPartOutput`,0,[ti,rt,L,R,z,ve,ye,ri,ai,ci,C,gr],[[0,{[J]:oo}],[0,{[J]:rt}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[0,{[J]:uo}],[0,{[J]:po}],[()=>ko,{[J]:so}],[2,{[J]:co}],[0,{[J]:eo}]]],t.UploadPartRequest$=[3,Q,`UploadPartRequest`,0,[v,`Key`,$n,Mi,j,ae,se,P,L,R,z,ve,ye,ri,ii,ai,Dr,G],[[0,1],[0,1],[1,{[Y]:na}],[0,{[Y]:da}],[()=>Ao,16],[1,{[J]:ie}],[0,{[J]:oe}],[0,{[J]:io}],[0,{[J]:Sa}],[0,{[J]:Ca}],[0,{[J]:wa}],[0,{[J]:Ea}],[0,{[J]:Da}],[0,{[J]:uo}],[()=>Do,{[J]:fo}],[0,{[J]:po}],[0,{[J]:to}],[0,{[J]:Z}]],4],t.VersioningConfiguration$=[3,Q,Ii,0,[gn,Hr],[[0,{[X]:mn}],0]],t.WebsiteConfiguration$=[3,Q,zi,0,[Ze,jt,hr,jr],[()=>t.ErrorDocument$,()=>t.IndexDocument$,()=>t.RedirectAllRequestsTo$,[()=>as,0]]],t.WriteGetObjectResponseRequest$=[3,Q,`WriteGetObjectResponseRequest`,0,[`RequestRoute`,`RequestToken`,j,`StatusCode`,Xe,Qe,p,I,te,ne,re,ae,ge,Ae,L,R,z,ve,ye,Ie,rt,dt,qe,sn,vn,ln,Hn,Vn,Un,Qn,Pr,gr,Rr,ti,ri,ci,ai,Kr,_i,Li,C],[[0,{hostLabel:1,[J]:`x-amz-request-route`}],[0,{[J]:`x-amz-request-token`}],[()=>Ao,16],[1,{[J]:`x-amz-fwd-status`}],[0,{[J]:`x-amz-fwd-error-code`}],[0,{[J]:`x-amz-fwd-error-message`}],[0,{[J]:`x-amz-fwd-header-accept-ranges`}],[0,{[J]:`x-amz-fwd-header-Cache-Control`}],[0,{[J]:`x-amz-fwd-header-Content-Disposition`}],[0,{[J]:`x-amz-fwd-header-Content-Encoding`}],[0,{[J]:`x-amz-fwd-header-Content-Language`}],[1,{[J]:ie}],[0,{[J]:`x-amz-fwd-header-Content-Range`}],[0,{[J]:`x-amz-fwd-header-Content-Type`}],[0,{[J]:`x-amz-fwd-header-x-amz-checksum-crc32`}],[0,{[J]:`x-amz-fwd-header-x-amz-checksum-crc32c`}],[0,{[J]:`x-amz-fwd-header-x-amz-checksum-crc64nvme`}],[0,{[J]:`x-amz-fwd-header-x-amz-checksum-sha1`}],[0,{[J]:`x-amz-fwd-header-x-amz-checksum-sha256`}],[2,{[J]:`x-amz-fwd-header-x-amz-delete-marker`}],[0,{[J]:`x-amz-fwd-header-ETag`}],[4,{[J]:`x-amz-fwd-header-Expires`}],[0,{[J]:`x-amz-fwd-header-x-amz-expiration`}],[4,{[J]:`x-amz-fwd-header-Last-Modified`}],[1,{[J]:`x-amz-fwd-header-x-amz-missing-meta`}],[128,{[Zi]:Ga}],[0,{[J]:`x-amz-fwd-header-x-amz-object-lock-mode`}],[0,{[J]:`x-amz-fwd-header-x-amz-object-lock-legal-hold`}],[5,{[J]:`x-amz-fwd-header-x-amz-object-lock-retain-until-date`}],[1,{[J]:`x-amz-fwd-header-x-amz-mp-parts-count`}],[0,{[J]:`x-amz-fwd-header-x-amz-replication-status`}],[0,{[J]:`x-amz-fwd-header-x-amz-request-charged`}],[0,{[J]:`x-amz-fwd-header-x-amz-restore`}],[0,{[J]:`x-amz-fwd-header-x-amz-server-side-encryption`}],[0,{[J]:`x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm`}],[()=>ko,{[J]:`x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id`}],[0,{[J]:`x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5`}],[0,{[J]:`x-amz-fwd-header-x-amz-storage-class`}],[1,{[J]:`x-amz-fwd-header-x-amz-tagging-count`}],[0,{[J]:`x-amz-fwd-header-x-amz-version-id`}],[2,{[J]:`x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled`}]],2];var jo=`unit`,Mo=[1,Q,i,0,[()=>t.AnalyticsConfiguration$,0]],No=[1,Q,M,0,[()=>t.Bucket$,{[X]:v}]],Po=[1,Q,`CommonPrefixList`,0,()=>t.CommonPrefix$],Fo=[1,Q,`CompletedPartList`,0,()=>t.CompletedPart$],Io=[1,Q,fe,0,[()=>t.CORSRule$,0]],Lo=[1,Q,`DeletedObjects`,0,()=>t.DeletedObject$],Ro=[1,Q,Re,0,()=>t.DeleteMarkerEntry$],zo=[1,Q,`EncryptionTypeList`,0,[0,{[X]:nt}]],Bo=[1,Q,st,0,()=>t._Error$],Vo=[1,Q,`FilterRuleList`,0,()=>t.FilterRule$],Ho=[1,Q,_t,0,[()=>t.Grant$,{[X]:Et}]],Uo=[1,Q,Wt,0,[()=>t.IntelligentTieringConfiguration$,0]],Wo=[1,Q,At,0,[()=>t.InventoryConfiguration$,0]],Go=[1,Q,`InventoryOptionalFields`,0,[0,{[X]:`Field`}]],Ko=[1,Q,`LambdaFunctionConfigurationList`,0,[()=>t.LambdaFunctionConfiguration$,0]],qo=[1,Q,`LifecycleRules`,0,[()=>t.LifecycleRule$,0]],Jo=[1,Q,dn,0,[()=>t.MetricsConfiguration$,0]],Yo=[1,Q,`MultipartUploadList`,0,()=>t.MultipartUpload$],Xo=[1,Q,`NoncurrentVersionTransitionList`,0,()=>t.NoncurrentVersionTransition$],Zo=[1,Q,`ObjectIdentifierList`,0,()=>t.ObjectIdentifier$],Qo=[1,Q,`ObjectList`,0,[()=>t._Object$,0]],$o=[1,Q,`ObjectVersionList`,0,[()=>t.ObjectVersion$,0]],es=[1,Q,`OwnershipControlsRules`,0,()=>t.OwnershipControlsRule$],ts=[1,Q,rr,0,()=>t.Part$],ns=[1,Q,`PartsList`,0,()=>t.ObjectPart$],rs=[1,Q,`QueueConfigurationList`,0,[()=>t.QueueConfiguration$,0]],is=[1,Q,`ReplicationRules`,0,[()=>t.ReplicationRule$,0]],as=[1,Q,jr,0,[()=>t.RoutingRule$,{[X]:Nr}]],os=[1,Q,`ServerSideEncryptionRules`,0,[()=>t.ServerSideEncryptionRule$,0]],ss=[1,Q,wi,0,[()=>t.Tag$,{[X]:`Tag`}]],cs=[1,Q,bi,0,[()=>t.TargetGrant$,{[X]:Et}]],ls=[1,Q,`TieringList`,0,()=>t.Tiering$],us=[1,Q,`TopicConfigurationList`,0,[()=>t.TopicConfiguration$,0]],ds=[1,Q,`TransitionList`,0,()=>t.Transition$],fs=[1,Q,Pi,0,[()=>t.MetadataEntry$,{[X]:hn}]];t.AnalyticsFilter$=[4,Q,`AnalyticsFilter`,0,[Xn,`Tag`,`And`],[0,()=>t.Tag$,[()=>t.AnalyticsAndOperator$,0]]],t.MetricsFilter$=[4,Q,`MetricsFilter`,0,[Xn,`Tag`,f,`And`],[0,()=>t.Tag$,0,[()=>t.MetricsAndOperator$,0]]],t.ObjectEncryption$=[4,Q,Rn,0,[oi],[[()=>t.SSEKMSEncryption$,{[X]:Jr}]]],t.SelectObjectContentEventStream$=[4,Q,`SelectObjectContentEventStream`,{[ua]:1},[`Records`,K,lr,`Cont`,`End`],[[()=>t.RecordsEvent$,0],[()=>t.StatsEvent$,0],[()=>t.ProgressEvent$,0],()=>t.ContinuationEvent$,()=>t.EndEvent$]],t.AbortMultipartUpload$=[9,Q,`AbortMultipartUpload`,{[q]:[`DELETE`,`/{Key+}?x-id=AbortMultipartUpload`,204]},()=>t.AbortMultipartUploadRequest$,()=>t.AbortMultipartUploadOutput$],t.CompleteMultipartUpload$=[9,Q,ce,{[q]:[`POST`,`/{Key+}`,200]},()=>t.CompleteMultipartUploadRequest$,()=>t.CompleteMultipartUploadOutput$],t.CopyObject$=[9,Q,`CopyObject`,{[q]:[`PUT`,`/{Key+}?x-id=CopyObject`,200]},()=>t.CopyObjectRequest$,()=>t.CopyObjectOutput$],t.CreateBucket$=[9,Q,`CreateBucket`,{[q]:[`PUT`,`/`,200]},()=>t.CreateBucketRequest$,()=>t.CreateBucketOutput$],t.CreateBucketMetadataConfiguration$=[9,Q,`CreateBucketMetadataConfiguration`,{[Ji]:`-`,[q]:[`POST`,`/?metadataConfiguration`,200]},()=>t.CreateBucketMetadataConfigurationRequest$,()=>jo],t.CreateBucketMetadataTableConfiguration$=[9,Q,`CreateBucketMetadataTableConfiguration`,{[Ji]:`-`,[q]:[`POST`,`/?metadataTable`,200]},()=>t.CreateBucketMetadataTableConfigurationRequest$,()=>jo],t.CreateMultipartUpload$=[9,Q,`CreateMultipartUpload`,{[q]:[`POST`,`/{Key+}?uploads`,200]},()=>t.CreateMultipartUploadRequest$,()=>t.CreateMultipartUploadOutput$],t.CreateSession$=[9,Q,`CreateSession`,{[q]:[`GET`,`/?session`,200]},()=>t.CreateSessionRequest$,()=>t.CreateSessionOutput$],t.DeleteBucket$=[9,Q,`DeleteBucket`,{[q]:[`DELETE`,`/`,204]},()=>t.DeleteBucketRequest$,()=>jo],t.DeleteBucketAnalyticsConfiguration$=[9,Q,`DeleteBucketAnalyticsConfiguration`,{[q]:[`DELETE`,`/?analytics`,204]},()=>t.DeleteBucketAnalyticsConfigurationRequest$,()=>jo],t.DeleteBucketCors$=[9,Q,`DeleteBucketCors`,{[q]:[`DELETE`,`/?cors`,204]},()=>t.DeleteBucketCorsRequest$,()=>jo],t.DeleteBucketEncryption$=[9,Q,`DeleteBucketEncryption`,{[q]:[`DELETE`,`/?encryption`,204]},()=>t.DeleteBucketEncryptionRequest$,()=>jo],t.DeleteBucketIntelligentTieringConfiguration$=[9,Q,`DeleteBucketIntelligentTieringConfiguration`,{[q]:[`DELETE`,`/?intelligent-tiering`,204]},()=>t.DeleteBucketIntelligentTieringConfigurationRequest$,()=>jo],t.DeleteBucketInventoryConfiguration$=[9,Q,`DeleteBucketInventoryConfiguration`,{[q]:[`DELETE`,`/?inventory`,204]},()=>t.DeleteBucketInventoryConfigurationRequest$,()=>jo],t.DeleteBucketLifecycle$=[9,Q,`DeleteBucketLifecycle`,{[q]:[`DELETE`,`/?lifecycle`,204]},()=>t.DeleteBucketLifecycleRequest$,()=>jo],t.DeleteBucketMetadataConfiguration$=[9,Q,`DeleteBucketMetadataConfiguration`,{[q]:[`DELETE`,`/?metadataConfiguration`,204]},()=>t.DeleteBucketMetadataConfigurationRequest$,()=>jo],t.DeleteBucketMetadataTableConfiguration$=[9,Q,`DeleteBucketMetadataTableConfiguration`,{[q]:[`DELETE`,`/?metadataTable`,204]},()=>t.DeleteBucketMetadataTableConfigurationRequest$,()=>jo],t.DeleteBucketMetricsConfiguration$=[9,Q,`DeleteBucketMetricsConfiguration`,{[q]:[`DELETE`,`/?metrics`,204]},()=>t.DeleteBucketMetricsConfigurationRequest$,()=>jo],t.DeleteBucketOwnershipControls$=[9,Q,`DeleteBucketOwnershipControls`,{[q]:[`DELETE`,`/?ownershipControls`,204]},()=>t.DeleteBucketOwnershipControlsRequest$,()=>jo],t.DeleteBucketPolicy$=[9,Q,`DeleteBucketPolicy`,{[q]:[`DELETE`,`/?policy`,204]},()=>t.DeleteBucketPolicyRequest$,()=>jo],t.DeleteBucketReplication$=[9,Q,`DeleteBucketReplication`,{[q]:[`DELETE`,`/?replication`,204]},()=>t.DeleteBucketReplicationRequest$,()=>jo],t.DeleteBucketTagging$=[9,Q,`DeleteBucketTagging`,{[q]:[`DELETE`,`/?tagging`,204]},()=>t.DeleteBucketTaggingRequest$,()=>jo],t.DeleteBucketWebsite$=[9,Q,`DeleteBucketWebsite`,{[q]:[`DELETE`,`/?website`,204]},()=>t.DeleteBucketWebsiteRequest$,()=>jo],t.DeleteObject$=[9,Q,`DeleteObject`,{[q]:[`DELETE`,`/{Key+}?x-id=DeleteObject`,204]},()=>t.DeleteObjectRequest$,()=>t.DeleteObjectOutput$],t.DeleteObjects$=[9,Q,`DeleteObjects`,{[Ji]:`-`,[q]:[`POST`,`/?delete`,200]},()=>t.DeleteObjectsRequest$,()=>t.DeleteObjectsOutput$],t.DeleteObjectTagging$=[9,Q,`DeleteObjectTagging`,{[q]:[`DELETE`,`/{Key+}?tagging`,204]},()=>t.DeleteObjectTaggingRequest$,()=>t.DeleteObjectTaggingOutput$],t.DeletePublicAccessBlock$=[9,Q,`DeletePublicAccessBlock`,{[q]:[`DELETE`,`/?publicAccessBlock`,204]},()=>t.DeletePublicAccessBlockRequest$,()=>jo],t.GetBucketAbac$=[9,Q,`GetBucketAbac`,{[q]:[`GET`,`/?abac`,200]},()=>t.GetBucketAbacRequest$,()=>t.GetBucketAbacOutput$],t.GetBucketAccelerateConfiguration$=[9,Q,`GetBucketAccelerateConfiguration`,{[q]:[`GET`,`/?accelerate`,200]},()=>t.GetBucketAccelerateConfigurationRequest$,()=>t.GetBucketAccelerateConfigurationOutput$],t.GetBucketAcl$=[9,Q,`GetBucketAcl`,{[q]:[`GET`,`/?acl`,200]},()=>t.GetBucketAclRequest$,()=>t.GetBucketAclOutput$],t.GetBucketAnalyticsConfiguration$=[9,Q,`GetBucketAnalyticsConfiguration`,{[q]:[`GET`,`/?analytics&x-id=GetBucketAnalyticsConfiguration`,200]},()=>t.GetBucketAnalyticsConfigurationRequest$,()=>t.GetBucketAnalyticsConfigurationOutput$],t.GetBucketCors$=[9,Q,`GetBucketCors`,{[q]:[`GET`,`/?cors`,200]},()=>t.GetBucketCorsRequest$,()=>t.GetBucketCorsOutput$],t.GetBucketEncryption$=[9,Q,`GetBucketEncryption`,{[q]:[`GET`,`/?encryption`,200]},()=>t.GetBucketEncryptionRequest$,()=>t.GetBucketEncryptionOutput$],t.GetBucketIntelligentTieringConfiguration$=[9,Q,`GetBucketIntelligentTieringConfiguration`,{[q]:[`GET`,`/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration`,200]},()=>t.GetBucketIntelligentTieringConfigurationRequest$,()=>t.GetBucketIntelligentTieringConfigurationOutput$],t.GetBucketInventoryConfiguration$=[9,Q,`GetBucketInventoryConfiguration`,{[q]:[`GET`,`/?inventory&x-id=GetBucketInventoryConfiguration`,200]},()=>t.GetBucketInventoryConfigurationRequest$,()=>t.GetBucketInventoryConfigurationOutput$],t.GetBucketLifecycleConfiguration$=[9,Q,`GetBucketLifecycleConfiguration`,{[q]:[`GET`,`/?lifecycle`,200]},()=>t.GetBucketLifecycleConfigurationRequest$,()=>t.GetBucketLifecycleConfigurationOutput$],t.GetBucketLocation$=[9,Q,`GetBucketLocation`,{[q]:[`GET`,`/?location`,200]},()=>t.GetBucketLocationRequest$,()=>t.GetBucketLocationOutput$],t.GetBucketLogging$=[9,Q,`GetBucketLogging`,{[q]:[`GET`,`/?logging`,200]},()=>t.GetBucketLoggingRequest$,()=>t.GetBucketLoggingOutput$],t.GetBucketMetadataConfiguration$=[9,Q,`GetBucketMetadataConfiguration`,{[q]:[`GET`,`/?metadataConfiguration`,200]},()=>t.GetBucketMetadataConfigurationRequest$,()=>t.GetBucketMetadataConfigurationOutput$],t.GetBucketMetadataTableConfiguration$=[9,Q,`GetBucketMetadataTableConfiguration`,{[q]:[`GET`,`/?metadataTable`,200]},()=>t.GetBucketMetadataTableConfigurationRequest$,()=>t.GetBucketMetadataTableConfigurationOutput$],t.GetBucketMetricsConfiguration$=[9,Q,`GetBucketMetricsConfiguration`,{[q]:[`GET`,`/?metrics&x-id=GetBucketMetricsConfiguration`,200]},()=>t.GetBucketMetricsConfigurationRequest$,()=>t.GetBucketMetricsConfigurationOutput$],t.GetBucketNotificationConfiguration$=[9,Q,`GetBucketNotificationConfiguration`,{[q]:[`GET`,`/?notification`,200]},()=>t.GetBucketNotificationConfigurationRequest$,()=>t.NotificationConfiguration$],t.GetBucketOwnershipControls$=[9,Q,`GetBucketOwnershipControls`,{[q]:[`GET`,`/?ownershipControls`,200]},()=>t.GetBucketOwnershipControlsRequest$,()=>t.GetBucketOwnershipControlsOutput$],t.GetBucketPolicy$=[9,Q,`GetBucketPolicy`,{[q]:[`GET`,`/?policy`,200]},()=>t.GetBucketPolicyRequest$,()=>t.GetBucketPolicyOutput$],t.GetBucketPolicyStatus$=[9,Q,`GetBucketPolicyStatus`,{[q]:[`GET`,`/?policyStatus`,200]},()=>t.GetBucketPolicyStatusRequest$,()=>t.GetBucketPolicyStatusOutput$],t.GetBucketReplication$=[9,Q,`GetBucketReplication`,{[q]:[`GET`,`/?replication`,200]},()=>t.GetBucketReplicationRequest$,()=>t.GetBucketReplicationOutput$],t.GetBucketRequestPayment$=[9,Q,`GetBucketRequestPayment`,{[q]:[`GET`,`/?requestPayment`,200]},()=>t.GetBucketRequestPaymentRequest$,()=>t.GetBucketRequestPaymentOutput$],t.GetBucketTagging$=[9,Q,`GetBucketTagging`,{[q]:[`GET`,`/?tagging`,200]},()=>t.GetBucketTaggingRequest$,()=>t.GetBucketTaggingOutput$],t.GetBucketVersioning$=[9,Q,`GetBucketVersioning`,{[q]:[`GET`,`/?versioning`,200]},()=>t.GetBucketVersioningRequest$,()=>t.GetBucketVersioningOutput$],t.GetBucketWebsite$=[9,Q,`GetBucketWebsite`,{[q]:[`GET`,`/?website`,200]},()=>t.GetBucketWebsiteRequest$,()=>t.GetBucketWebsiteOutput$],t.GetObject$=[9,Q,`GetObject`,{[Ji]:`-`,[q]:[`GET`,`/{Key+}?x-id=GetObject`,200]},()=>t.GetObjectRequest$,()=>t.GetObjectOutput$],t.GetObjectAcl$=[9,Q,`GetObjectAcl`,{[q]:[`GET`,`/{Key+}?acl`,200]},()=>t.GetObjectAclRequest$,()=>t.GetObjectAclOutput$],t.GetObjectAttributes$=[9,Q,`GetObjectAttributes`,{[q]:[`GET`,`/{Key+}?attributes`,200]},()=>t.GetObjectAttributesRequest$,()=>t.GetObjectAttributesOutput$],t.GetObjectLegalHold$=[9,Q,`GetObjectLegalHold`,{[q]:[`GET`,`/{Key+}?legal-hold`,200]},()=>t.GetObjectLegalHoldRequest$,()=>t.GetObjectLegalHoldOutput$],t.GetObjectLockConfiguration$=[9,Q,`GetObjectLockConfiguration`,{[q]:[`GET`,`/?object-lock`,200]},()=>t.GetObjectLockConfigurationRequest$,()=>t.GetObjectLockConfigurationOutput$],t.GetObjectRetention$=[9,Q,`GetObjectRetention`,{[q]:[`GET`,`/{Key+}?retention`,200]},()=>t.GetObjectRetentionRequest$,()=>t.GetObjectRetentionOutput$],t.GetObjectTagging$=[9,Q,`GetObjectTagging`,{[q]:[`GET`,`/{Key+}?tagging`,200]},()=>t.GetObjectTaggingRequest$,()=>t.GetObjectTaggingOutput$],t.GetObjectTorrent$=[9,Q,`GetObjectTorrent`,{[q]:[`GET`,`/{Key+}?torrent`,200]},()=>t.GetObjectTorrentRequest$,()=>t.GetObjectTorrentOutput$],t.GetPublicAccessBlock$=[9,Q,`GetPublicAccessBlock`,{[q]:[`GET`,`/?publicAccessBlock`,200]},()=>t.GetPublicAccessBlockRequest$,()=>t.GetPublicAccessBlockOutput$],t.HeadBucket$=[9,Q,`HeadBucket`,{[q]:[`HEAD`,`/`,200]},()=>t.HeadBucketRequest$,()=>t.HeadBucketOutput$],t.HeadObject$=[9,Q,`HeadObject`,{[q]:[`HEAD`,`/{Key+}`,200]},()=>t.HeadObjectRequest$,()=>t.HeadObjectOutput$],t.ListBucketAnalyticsConfigurations$=[9,Q,`ListBucketAnalyticsConfigurations`,{[q]:[`GET`,`/?analytics&x-id=ListBucketAnalyticsConfigurations`,200]},()=>t.ListBucketAnalyticsConfigurationsRequest$,()=>t.ListBucketAnalyticsConfigurationsOutput$],t.ListBucketIntelligentTieringConfigurations$=[9,Q,`ListBucketIntelligentTieringConfigurations`,{[q]:[`GET`,`/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations`,200]},()=>t.ListBucketIntelligentTieringConfigurationsRequest$,()=>t.ListBucketIntelligentTieringConfigurationsOutput$],t.ListBucketInventoryConfigurations$=[9,Q,`ListBucketInventoryConfigurations`,{[q]:[`GET`,`/?inventory&x-id=ListBucketInventoryConfigurations`,200]},()=>t.ListBucketInventoryConfigurationsRequest$,()=>t.ListBucketInventoryConfigurationsOutput$],t.ListBucketMetricsConfigurations$=[9,Q,`ListBucketMetricsConfigurations`,{[q]:[`GET`,`/?metrics&x-id=ListBucketMetricsConfigurations`,200]},()=>t.ListBucketMetricsConfigurationsRequest$,()=>t.ListBucketMetricsConfigurationsOutput$],t.ListBuckets$=[9,Q,`ListBuckets`,{[q]:[`GET`,`/?x-id=ListBuckets`,200]},()=>t.ListBucketsRequest$,()=>t.ListBucketsOutput$],t.ListDirectoryBuckets$=[9,Q,`ListDirectoryBuckets`,{[q]:[`GET`,`/?x-id=ListDirectoryBuckets`,200]},()=>t.ListDirectoryBucketsRequest$,()=>t.ListDirectoryBucketsOutput$],t.ListMultipartUploads$=[9,Q,`ListMultipartUploads`,{[q]:[`GET`,`/?uploads`,200]},()=>t.ListMultipartUploadsRequest$,()=>t.ListMultipartUploadsOutput$],t.ListObjects$=[9,Q,`ListObjects`,{[q]:[`GET`,`/`,200]},()=>t.ListObjectsRequest$,()=>t.ListObjectsOutput$],t.ListObjectsV2$=[9,Q,`ListObjectsV2`,{[q]:[`GET`,`/?list-type=2`,200]},()=>t.ListObjectsV2Request$,()=>t.ListObjectsV2Output$],t.ListObjectVersions$=[9,Q,`ListObjectVersions`,{[q]:[`GET`,`/?versions`,200]},()=>t.ListObjectVersionsRequest$,()=>t.ListObjectVersionsOutput$],t.ListParts$=[9,Q,`ListParts`,{[q]:[`GET`,`/{Key+}?x-id=ListParts`,200]},()=>t.ListPartsRequest$,()=>t.ListPartsOutput$],t.PutBucketAbac$=[9,Q,`PutBucketAbac`,{[Ji]:`-`,[q]:[`PUT`,`/?abac`,200]},()=>t.PutBucketAbacRequest$,()=>jo],t.PutBucketAccelerateConfiguration$=[9,Q,`PutBucketAccelerateConfiguration`,{[Ji]:`-`,[q]:[`PUT`,`/?accelerate`,200]},()=>t.PutBucketAccelerateConfigurationRequest$,()=>jo],t.PutBucketAcl$=[9,Q,`PutBucketAcl`,{[Ji]:`-`,[q]:[`PUT`,`/?acl`,200]},()=>t.PutBucketAclRequest$,()=>jo],t.PutBucketAnalyticsConfiguration$=[9,Q,`PutBucketAnalyticsConfiguration`,{[q]:[`PUT`,`/?analytics`,200]},()=>t.PutBucketAnalyticsConfigurationRequest$,()=>jo],t.PutBucketCors$=[9,Q,`PutBucketCors`,{[Ji]:`-`,[q]:[`PUT`,`/?cors`,200]},()=>t.PutBucketCorsRequest$,()=>jo],t.PutBucketEncryption$=[9,Q,`PutBucketEncryption`,{[Ji]:`-`,[q]:[`PUT`,`/?encryption`,200]},()=>t.PutBucketEncryptionRequest$,()=>jo],t.PutBucketIntelligentTieringConfiguration$=[9,Q,`PutBucketIntelligentTieringConfiguration`,{[q]:[`PUT`,`/?intelligent-tiering`,200]},()=>t.PutBucketIntelligentTieringConfigurationRequest$,()=>jo],t.PutBucketInventoryConfiguration$=[9,Q,`PutBucketInventoryConfiguration`,{[q]:[`PUT`,`/?inventory`,200]},()=>t.PutBucketInventoryConfigurationRequest$,()=>jo],t.PutBucketLifecycleConfiguration$=[9,Q,`PutBucketLifecycleConfiguration`,{[Ji]:`-`,[q]:[`PUT`,`/?lifecycle`,200]},()=>t.PutBucketLifecycleConfigurationRequest$,()=>t.PutBucketLifecycleConfigurationOutput$],t.PutBucketLogging$=[9,Q,`PutBucketLogging`,{[Ji]:`-`,[q]:[`PUT`,`/?logging`,200]},()=>t.PutBucketLoggingRequest$,()=>jo],t.PutBucketMetricsConfiguration$=[9,Q,`PutBucketMetricsConfiguration`,{[q]:[`PUT`,`/?metrics`,200]},()=>t.PutBucketMetricsConfigurationRequest$,()=>jo],t.PutBucketNotificationConfiguration$=[9,Q,`PutBucketNotificationConfiguration`,{[q]:[`PUT`,`/?notification`,200]},()=>t.PutBucketNotificationConfigurationRequest$,()=>jo],t.PutBucketOwnershipControls$=[9,Q,`PutBucketOwnershipControls`,{[Ji]:`-`,[q]:[`PUT`,`/?ownershipControls`,200]},()=>t.PutBucketOwnershipControlsRequest$,()=>jo],t.PutBucketPolicy$=[9,Q,`PutBucketPolicy`,{[Ji]:`-`,[q]:[`PUT`,`/?policy`,200]},()=>t.PutBucketPolicyRequest$,()=>jo],t.PutBucketReplication$=[9,Q,`PutBucketReplication`,{[Ji]:`-`,[q]:[`PUT`,`/?replication`,200]},()=>t.PutBucketReplicationRequest$,()=>jo],t.PutBucketRequestPayment$=[9,Q,`PutBucketRequestPayment`,{[Ji]:`-`,[q]:[`PUT`,`/?requestPayment`,200]},()=>t.PutBucketRequestPaymentRequest$,()=>jo],t.PutBucketTagging$=[9,Q,`PutBucketTagging`,{[Ji]:`-`,[q]:[`PUT`,`/?tagging`,200]},()=>t.PutBucketTaggingRequest$,()=>jo],t.PutBucketVersioning$=[9,Q,`PutBucketVersioning`,{[Ji]:`-`,[q]:[`PUT`,`/?versioning`,200]},()=>t.PutBucketVersioningRequest$,()=>jo],t.PutBucketWebsite$=[9,Q,`PutBucketWebsite`,{[Ji]:`-`,[q]:[`PUT`,`/?website`,200]},()=>t.PutBucketWebsiteRequest$,()=>jo],t.PutObject$=[9,Q,`PutObject`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?x-id=PutObject`,200]},()=>t.PutObjectRequest$,()=>t.PutObjectOutput$],t.PutObjectAcl$=[9,Q,`PutObjectAcl`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?acl`,200]},()=>t.PutObjectAclRequest$,()=>t.PutObjectAclOutput$],t.PutObjectLegalHold$=[9,Q,`PutObjectLegalHold`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?legal-hold`,200]},()=>t.PutObjectLegalHoldRequest$,()=>t.PutObjectLegalHoldOutput$],t.PutObjectLockConfiguration$=[9,Q,`PutObjectLockConfiguration`,{[Ji]:`-`,[q]:[`PUT`,`/?object-lock`,200]},()=>t.PutObjectLockConfigurationRequest$,()=>t.PutObjectLockConfigurationOutput$],t.PutObjectRetention$=[9,Q,`PutObjectRetention`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?retention`,200]},()=>t.PutObjectRetentionRequest$,()=>t.PutObjectRetentionOutput$],t.PutObjectTagging$=[9,Q,`PutObjectTagging`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?tagging`,200]},()=>t.PutObjectTaggingRequest$,()=>t.PutObjectTaggingOutput$],t.PutPublicAccessBlock$=[9,Q,`PutPublicAccessBlock`,{[Ji]:`-`,[q]:[`PUT`,`/?publicAccessBlock`,200]},()=>t.PutPublicAccessBlockRequest$,()=>jo],t.RenameObject$=[9,Q,`RenameObject`,{[q]:[`PUT`,`/{Key+}?renameObject`,200]},()=>t.RenameObjectRequest$,()=>t.RenameObjectOutput$],t.RestoreObject$=[9,Q,`RestoreObject`,{[Ji]:`-`,[q]:[`POST`,`/{Key+}?restore`,200]},()=>t.RestoreObjectRequest$,()=>t.RestoreObjectOutput$],t.SelectObjectContent$=[9,Q,`SelectObjectContent`,{[q]:[`POST`,`/{Key+}?select&select-type=2`,200]},()=>t.SelectObjectContentRequest$,()=>t.SelectObjectContentOutput$],t.UpdateBucketMetadataInventoryTableConfiguration$=[9,Q,`UpdateBucketMetadataInventoryTableConfiguration`,{[Ji]:`-`,[q]:[`PUT`,`/?metadataInventoryTable`,200]},()=>t.UpdateBucketMetadataInventoryTableConfigurationRequest$,()=>jo],t.UpdateBucketMetadataJournalTableConfiguration$=[9,Q,`UpdateBucketMetadataJournalTableConfiguration`,{[Ji]:`-`,[q]:[`PUT`,`/?metadataJournalTable`,200]},()=>t.UpdateBucketMetadataJournalTableConfigurationRequest$,()=>jo],t.UpdateObjectEncryption$=[9,Q,`UpdateObjectEncryption`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?encryption`,200]},()=>t.UpdateObjectEncryptionRequest$,()=>t.UpdateObjectEncryptionResponse$],t.UploadPart$=[9,Q,`UploadPart`,{[Ji]:`-`,[q]:[`PUT`,`/{Key+}?x-id=UploadPart`,200]},()=>t.UploadPartRequest$,()=>t.UploadPartOutput$],t.UploadPartCopy$=[9,Q,`UploadPartCopy`,{[q]:[`PUT`,`/{Key+}?x-id=UploadPartCopy`,200]},()=>t.UploadPartCopyRequest$,()=>t.UploadPartCopyOutput$],t.WriteGetObjectResponse$=[9,Q,`WriteGetObjectResponse`,{endpoint:[`{RequestRoute}.`],[q]:[`POST`,`/WriteGetObjectResponse`,200]},()=>t.WriteGetObjectResponseRequest$,()=>jo]})),Uk=i(((e,t)=>{t.exports={name:`@aws-sdk/client-s3`,description:`AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native`,version:`3.1031.0`,scripts:{build:`concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs`,"build:cjs":`node ../../scripts/compilation/inline client-s3`,"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`,"extract:docs":`api-extractor run --local`,"generate:client":`node ../../scripts/generate-clients/single-service --solo s3`,test:`yarn g:vitest run`,"test:browser":`node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.mts`,"test:browser:watch":`node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.mts`,"test:e2e":`yarn g:vitest run -c vitest.config.e2e.mts && yarn test:browser`,"test:e2e:watch":`yarn g:vitest watch -c vitest.config.e2e.mts`,"test:index":`tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs`,"test:integration":`yarn g:vitest run -c vitest.config.integ.mts`,"test:integration:watch":`yarn g:vitest watch -c vitest.config.integ.mts`,"test:watch":`yarn g:vitest watch`},main:`./dist-cjs/index.js`,types:`./dist-types/index.d.ts`,module:`./dist-es/index.js`,sideEffects:!1,dependencies:{"@aws-crypto/sha1-browser":`5.2.0`,"@aws-crypto/sha256-browser":`5.2.0`,"@aws-crypto/sha256-js":`5.2.0`,"@aws-sdk/core":`^3.974.0`,"@aws-sdk/credential-provider-node":`^3.972.31`,"@aws-sdk/middleware-bucket-endpoint":`^3.972.10`,"@aws-sdk/middleware-expect-continue":`^3.972.10`,"@aws-sdk/middleware-flexible-checksums":`^3.974.8`,"@aws-sdk/middleware-host-header":`^3.972.10`,"@aws-sdk/middleware-location-constraint":`^3.972.10`,"@aws-sdk/middleware-logger":`^3.972.10`,"@aws-sdk/middleware-recursion-detection":`^3.972.11`,"@aws-sdk/middleware-sdk-s3":`^3.972.29`,"@aws-sdk/middleware-ssec":`^3.972.10`,"@aws-sdk/middleware-user-agent":`^3.972.30`,"@aws-sdk/region-config-resolver":`^3.972.12`,"@aws-sdk/signature-v4-multi-region":`^3.996.17`,"@aws-sdk/types":`^3.973.8`,"@aws-sdk/util-endpoints":`^3.996.7`,"@aws-sdk/util-user-agent-browser":`^3.972.10`,"@aws-sdk/util-user-agent-node":`^3.973.16`,"@smithy/config-resolver":`^4.4.16`,"@smithy/core":`^3.23.15`,"@smithy/eventstream-serde-browser":`^4.2.14`,"@smithy/eventstream-serde-config-resolver":`^4.3.14`,"@smithy/eventstream-serde-node":`^4.2.14`,"@smithy/fetch-http-handler":`^5.3.17`,"@smithy/hash-blob-browser":`^4.2.15`,"@smithy/hash-node":`^4.2.14`,"@smithy/hash-stream-node":`^4.2.14`,"@smithy/invalid-dependency":`^4.2.14`,"@smithy/md5-js":`^4.2.14`,"@smithy/middleware-content-length":`^4.2.14`,"@smithy/middleware-endpoint":`^4.4.30`,"@smithy/middleware-retry":`^4.5.3`,"@smithy/middleware-serde":`^4.2.18`,"@smithy/middleware-stack":`^4.2.14`,"@smithy/node-config-provider":`^4.3.14`,"@smithy/node-http-handler":`^4.5.3`,"@smithy/protocol-http":`^5.3.14`,"@smithy/smithy-client":`^4.12.11`,"@smithy/types":`^4.14.1`,"@smithy/url-parser":`^4.2.14`,"@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.47`,"@smithy/util-defaults-mode-node":`^4.2.52`,"@smithy/util-endpoints":`^3.4.1`,"@smithy/util-middleware":`^4.2.14`,"@smithy/util-retry":`^4.3.2`,"@smithy/util-stream":`^4.5.23`,"@smithy/util-utf8":`^4.2.2`,"@smithy/util-waiter":`^4.2.16`,tslib:`^2.6.2`},devDependencies:{"@aws-sdk/signature-v4-crt":`3.1031.0`,"@smithy/snapshot-testing":`^2.0.6`,"@tsconfig/node20":`20.1.8`,"@types/node":`^20.14.8`,concurrently:`7.0.0`,"downlevel-dts":`0.10.1`,premove:`4.0.0`,typescript:`~5.8.3`,vitest:`^4.0.17`},engines:{node:`>=20.0.0`},typesVersions:{"<4.5":{"dist-types/*":[`dist-types/ts3.4/*`]}},files:[`dist-*/**`],author:{name:`AWS SDK for JavaScript Team`,url:`https://aws.amazon.com/javascript/`},license:`Apache-2.0`,browser:{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.browser`},"react-native":{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.native`},homepage:`https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3`,repository:{type:`git`,url:`https://github.com/aws/aws-sdk-js-v3.git`,directory:`clients/client-s3`}}})),Wk=i((e=>{var t=oe(),r=H(),i=ie();let a=`AWS_EC2_METADATA_DISABLED`,o=async e=>{let{ENV_CMDS_FULL_URI:t,ENV_CMDS_RELATIVE_URI:i,fromContainerMetadata:o,fromInstanceMetadata:s}=await import(`./dist-cjs-Cp2qKG5f.js`).then(e=>n(e.default));if(process.env[i]||process.env[t]){e.logger?.debug(`@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata`);let{fromHttp:t}=await import(`./dist-cjs-B9IZmIkA.js`).then(e=>n(e.default));return r.chain(t(e),o(e))}return process.env[a]&&process.env[a]!==`false`?async()=>{throw new r.CredentialsProviderError(`EC2 Instance Metadata Service access disabled`,{logger:e.logger})}:(e.logger?.debug(`@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata`),s(e))};function s(e,t){let n=c(e),r,i,a,o=async e=>{if(e?.forceRefresh)return await n(e);if(a?.expiration&&a?.expiration?.getTime(){a=e}).finally(()=>{i=void 0});else return r=n(e).then(e=>{a=e}).finally(()=>{r=void 0}),o(e);return a};return o}let c=e=>async t=>{let n;for(let r of e)try{return await r(t)}catch(e){if(n=e,e?.tryNextLink)continue;throw e}throw n},l=!1,u=(e={})=>s([async()=>{if(e.profile??process.env[i.ENV_PROFILE])throw process.env[t.ENV_KEY]&&process.env[t.ENV_SECRET]&&(l||=((e.logger?.warn&&e.logger?.constructor?.name!==`NoOpLogger`?e.logger.warn.bind(e.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING: - 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. - - 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. -`),!0)),new r.CredentialsProviderError(`AWS_PROFILE is set, skipping fromEnv provider.`,{logger:e.logger,tryNextLink:!0});return e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv`),t.fromEnv(e)()},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromSSO`);let{ssoStartUrl:i,ssoAccountId:a,ssoRegion:o,ssoRoleName:s,ssoSession:c}=e;if(!i&&!a&&!o&&!s&&!c)throw new r.CredentialsProviderError(`Skipping SSO provider in default chain (inputs do not include SSO fields).`,{logger:e.logger});let{fromSSO:l}=await import(`./dist-cjs-BG7BRI_J.js`).then(e=>n(e.default));return l(e)(t)},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromIni`);let{fromIni:r}=await import(`./dist-cjs-B9jg8OcG.js`).then(e=>n(e.default));return r(e)(t)},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromProcess`);let{fromProcess:r}=await import(`./dist-cjs-Bvzte9iG.js`).then(e=>n(e.default));return r(e)(t)},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile`);let{fromTokenFile:r}=await import(`./dist-cjs-qMH96PP6.js`).then(e=>n(e.default));return r(e)(t)},async()=>(e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::remoteProvider`),(await o(e))()),async()=>{throw new r.CredentialsProviderError(`Could not load credentials from any providers`,{tryNextLink:!1,logger:e.logger})}],f),d=e=>e?.expiration!==void 0,f=e=>e?.expiration!==void 0&&e.expiration.getTime()-Date.now()<3e5;e.credentialsTreatedAsExpired=f,e.credentialsWillNeedRefresh=d,e.defaultProvider=u})),Gk=i((e=>{var t=E(),n=Nk(),r=a();let i=`AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS`,o=`s3_disable_multiregion_access_points`,s={environmentVariableSelector:e=>t.booleanSelector(e,i,t.SelectorType.ENV),configFileSelector:e=>t.booleanSelector(e,o,t.SelectorType.CONFIG),default:!1},c=`AWS_S3_USE_ARN_REGION`,l=`s3_use_arn_region`,u={environmentVariableSelector:e=>t.booleanSelector(e,c,t.SelectorType.ENV),configFileSelector:e=>t.booleanSelector(e,l,t.SelectorType.CONFIG),default:void 0},d=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,f=/(\d+\.){3}\d+/,p=/\.\./,m=/\./,h=/^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./,g=/^s3(-external-1)?\.amazonaws\.com$/,v=`amazonaws.com`,y=e=>typeof e.bucketName==`string`,b=e=>d.test(e)&&!f.test(e)&&!p.test(e),x=e=>{let t=e.match(h);return[t[4],e.replace(RegExp(`^${t[0]}`),``)]},S=e=>g.test(e)?[`us-east-1`,v]:x(e),C=e=>g.test(e)?[e.replace(`.${v}`,``),v]:x(e),w=e=>{if(e.pathStyleEndpoint)throw Error(`Path-style S3 endpoint is not supported when bucket is an ARN`);if(e.accelerateEndpoint)throw Error(`Accelerate endpoint is not supported when bucket is an ARN`);if(!e.tlsCompatible)throw Error(`HTTPS is required when bucket is an ARN`)},T=e=>{if(e!==`s3`&&e!==`s3-outposts`&&e!==`s3-object-lambda`)throw Error(`Expect 's3' or 's3-outposts' or 's3-object-lambda' in ARN service component`)},D=e=>{if(e!==`s3`)throw Error(`Expect 's3' in Accesspoint ARN service component`)},O=e=>{if(e!==`s3-outposts`)throw Error(`Expect 's3-posts' in Outpost ARN service component`)},k=(e,t)=>{if(e!==t.clientPartition)throw Error(`Partition in ARN is incompatible, got "${e}" but expected "${t.clientPartition}"`)},A=(e,t)=>{},j=e=>{if([`s3-external-1`,`aws-global`].includes(e))throw Error(`Client region ${e} is not regional`)},M=e=>{if(!/[0-9]{12}/.exec(e))throw Error(`Access point ARN accountID does not match regex '[0-9]{12}'`)},N=(e,t={tlsCompatible:!0})=>{if(e.length>=64||!/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(e)||/(\d+\.){3}\d+/.test(e)||/[.-]{2}/.test(e)||t?.tlsCompatible&&m.test(e))throw Error(`Invalid DNS label ${e}`)},P=e=>{if(e.isCustomEndpoint){if(e.dualstackEndpoint)throw Error(`Dualstack endpoint is not supported with custom endpoint`);if(e.accelerateEndpoint)throw Error(`Accelerate endpoint is not supported with custom endpoint`)}},F=e=>{let t=e.includes(`:`)?`:`:`/`,[n,...r]=e.split(t);if(n===`accesspoint`){if(r.length!==1||r[0]===``)throw Error(`Access Point ARN should have one resource accesspoint${t}{accesspointname}`);return{accesspointName:r[0]}}else if(n===`outpost`){if(!r[0]||r[1]!==`accesspoint`||!r[2]||r.length!==3)throw Error(`Outpost ARN should have resource outpost${t}{outpostId}${t}accesspoint${t}{accesspointName}`);let[e,n,i]=r;return{outpostId:e,accesspointName:i}}else throw Error(`ARN resource should begin with 'accesspoint${t}' or 'outpost${t}'`)},I=e=>{},L=e=>{if(e)throw Error(`FIPS region is not supported with Outpost.`)},R=e=>{try{e.split(`.`).forEach(e=>{N(e)})}catch{throw Error(`"${e}" is not a DNS compatible name.`)}},z=e=>(P(e),y(e)?ee(e):B(e)),ee=({accelerateEndpoint:e=!1,clientRegion:t,baseHostname:n,bucketName:r,dualstackEndpoint:i=!1,fipsEndpoint:a=!1,pathStyleEndpoint:o=!1,tlsCompatible:s=!0,isCustomEndpoint:c=!1})=>{let[l,u]=c?[t,n]:S(n);return o||!b(r)||s&&m.test(r)?{bucketEndpoint:!1,hostname:i?`s3.dualstack.${l}.${u}`:n}:(e?n=`s3-accelerate${i?`.dualstack`:``}.${u}`:i&&(n=`s3.dualstack.${l}.${u}`),{bucketEndpoint:!0,hostname:`${r}.${n}`})},B=e=>{let{isCustomEndpoint:t,baseHostname:n,clientRegion:r}=e,i=t?n:C(n)[1],{pathStyleEndpoint:a,accelerateEndpoint:o=!1,fipsEndpoint:s=!1,tlsCompatible:c=!0,bucketName:l,clientPartition:u=`aws`}=e;w({pathStyleEndpoint:a,accelerateEndpoint:o,tlsCompatible:c});let{service:d,partition:f,accountId:p,region:m,resource:h}=l;T(d),k(f,{clientPartition:u}),M(p);let{accesspointName:g,outpostId:v}=F(h);return d===`s3-object-lambda`?te({...e,tlsCompatible:c,bucketName:l,accesspointName:g,hostnameSuffix:i}):m===``?V({...e,mrapAlias:g,hostnameSuffix:i}):v?ne({...e,clientRegion:r,outpostId:v,accesspointName:g,hostnameSuffix:i}):re({...e,clientRegion:r,accesspointName:g,hostnameSuffix:i})},te=({dualstackEndpoint:e=!1,fipsEndpoint:t=!1,tlsCompatible:n=!0,useArnRegion:r,clientRegion:i,clientSigningRegion:a=i,accesspointName:o,bucketName:s,hostnameSuffix:c})=>{let{accountId:l,region:u,service:d}=s;j(i);let f=`${o}-${l}`;N(f,{tlsCompatible:n});let p=r?u:i,m=r?u:a;return{bucketEndpoint:!0,hostname:`${f}.${d}${t?`-fips`:``}.${p}.${c}`,signingRegion:m,signingService:d}},V=({disableMultiregionAccessPoints:e,dualstackEndpoint:t=!1,isCustomEndpoint:n,mrapAlias:r,hostnameSuffix:i})=>{if(e===!0)throw Error(`SDK is attempting to use a MRAP ARN. Please enable to feature.`);return R(r),{bucketEndpoint:!0,hostname:`${r}${n?``:`.accesspoint.s3-global`}.${i}`,signingRegion:`*`}},ne=({useArnRegion:e,clientRegion:t,clientSigningRegion:n=t,bucketName:r,outpostId:i,dualstackEndpoint:a=!1,fipsEndpoint:o=!1,tlsCompatible:s=!0,accesspointName:c,isCustomEndpoint:l,hostnameSuffix:u})=>{j(t);let d=`${c}-${r.accountId}`;N(d,{tlsCompatible:s});let f=e?r.region:t,p=e?r.region:n;return O(r.service),N(i,{tlsCompatible:s}),L(o),{bucketEndpoint:!0,hostname:`${`${d}.${i}`}${l?``:`.s3-outposts.${f}`}.${u}`,signingRegion:p,signingService:`s3-outposts`}},re=({useArnRegion:e,clientRegion:t,clientSigningRegion:n=t,bucketName:r,dualstackEndpoint:i=!1,fipsEndpoint:a=!1,tlsCompatible:o=!0,accesspointName:s,isCustomEndpoint:c,hostnameSuffix:l})=>{j(t);let u=`${s}-${r.accountId}`;N(u,{tlsCompatible:o});let d=e?r.region:t,f=e?r.region:n;return D(r.service),{bucketEndpoint:!0,hostname:`${u}${c?``:`.s3-accesspoint${a?`-fips`:``}${i?`.dualstack`:``}.${d}`}.${l}`,signingRegion:f}},H=e=>(t,i)=>async a=>{let{Bucket:o}=a.input,s=e.bucketEndpoint,c=a.request;if(r.HttpRequest.isInstance(c)){if(e.bucketEndpoint)c.hostname=o;else if(n.validate(o)){let t=n.parse(o),r=await e.region(),a=await e.useDualstackEndpoint(),l=await e.useFipsEndpoint(),{partition:u,signingRegion:d=r}=await e.regionInfoProvider(r,{useDualstackEndpoint:a,useFipsEndpoint:l})||{},f=await e.useArnRegion(),{hostname:p,bucketEndpoint:m,signingRegion:h,signingService:g}=z({bucketName:t,baseHostname:c.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:a,fipsEndpoint:l,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:c.protocol===`https:`,useArnRegion:f,clientPartition:u,clientSigningRegion:d,clientRegion:r,isCustomEndpoint:e.isCustomEndpoint,disableMultiregionAccessPoints:await e.disableMultiregionAccessPoints()});h&&h!==d&&(i.signing_region=h),g&&g!==`s3`&&(i.signing_service=g),c.hostname=p,s=m}else{let t=await e.region(),n=await e.useDualstackEndpoint(),r=await e.useFipsEndpoint(),{hostname:i,bucketEndpoint:a}=z({bucketName:o,clientRegion:t,baseHostname:c.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:n,fipsEndpoint:r,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:c.protocol===`https:`,isCustomEndpoint:e.isCustomEndpoint});c.hostname=i,s=a}s&&(c.path=c.path.replace(/^(\/)?[^\/]+/,``),c.path===``&&(c.path=`/`))}return t({...a,request:c})},ie={tags:[`BUCKET_ENDPOINT`],name:`bucketEndpointMiddleware`,relation:`before`,toMiddleware:`hostHeaderMiddleware`,override:!0},ae=e=>({applyToStack:t=>{t.addRelativeTo(H(e),ie)}});function oe(e){let{bucketEndpoint:t=!1,forcePathStyle:n=!1,useAccelerateEndpoint:r=!1,useArnRegion:i,disableMultiregionAccessPoints:a=!1}=e;return Object.assign(e,{bucketEndpoint:t,forcePathStyle:n,useAccelerateEndpoint:r,useArnRegion:typeof i==`function`?i:()=>Promise.resolve(i),disableMultiregionAccessPoints:typeof a==`function`?a:()=>Promise.resolve(a)})}e.NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS=s,e.NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME=i,e.NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME=o,e.NODE_USE_ARN_REGION_CONFIG_OPTIONS=u,e.NODE_USE_ARN_REGION_ENV_NAME=c,e.NODE_USE_ARN_REGION_INI_NAME=l,e.bucketEndpointMiddleware=H,e.bucketEndpointMiddlewareOptions=ie,e.bucketHostname=z,e.getArnResources=F,e.getBucketEndpointPlugin=ae,e.getSuffixForArnEndpoint=C,e.resolveBucketEndpointConfig=oe,e.validateAccountId=M,e.validateDNSHostLabel=N,e.validateNoDualstack=I,e.validateNoFIPS=L,e.validateOutpostService=O,e.validatePartition=k,e.validateRegion=A})),Kk=i((e=>{var t=Ak(),n=m(),r=class e{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw Error(`Int64 buffers must be exactly 8 bytes`)}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let n=new Uint8Array(8);for(let e=7,r=Math.abs(Math.round(t));e>-1&&r>0;e--,r/=256)n[e]=r;return t<0&&i(n),new e(n)}valueOf(){let e=this.bytes.slice(0),t=e[0]&128;return t&&i(e),parseInt(n.toHex(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function i(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}var a=class{toUtf8;fromUtf8;constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){let t=[];for(let n of Object.keys(e)){let r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}let n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0)),r=0;for(let e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case`boolean`:return Uint8Array.from([+!e.value]);case`byte`:return Uint8Array.from([2,e.value]);case`short`:let t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case`integer`:let i=new DataView(new ArrayBuffer(5));return i.setUint8(0,4),i.setInt32(1,e.value,!1),new Uint8Array(i.buffer);case`long`:let a=new Uint8Array(9);return a[0]=5,a.set(e.value.bytes,1),a;case`binary`:let o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);let s=new Uint8Array(o.buffer);return s.set(e.value,3),s;case`string`:let c=this.fromUtf8(e.value),l=new DataView(new ArrayBuffer(3+c.byteLength));l.setUint8(0,7),l.setUint16(1,c.byteLength,!1);let u=new Uint8Array(l.buffer);return u.set(c,3),u;case`timestamp`:let d=new Uint8Array(9);return d[0]=8,d.set(r.fromNumber(e.value.valueOf()).bytes,1),d;case`uuid`:if(!v.test(e.value))throw Error(`Invalid UUID received: ${e.value}`);let f=new Uint8Array(17);return f[0]=9,f.set(n.fromHex(e.value.replace(/\-/g,``)),1),f}}parse(e){let t={},i=0;for(;i{var t=Kk();function n(e){let t=0,n=0,r=null,i=null,a=e=>{if(typeof e!=`number`)throw Error(`Attempted to allocate an event message where size was not a number: `+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)},o=async function*(){let o=e[Symbol.asyncIterator]();for(;;){let{value:e,done:s}=await o.next();if(s){if(!t)return;if(t===n)yield r;else throw Error(`Truncated event message received.`);return}let c=e.length,l=0;for(;lnew i(e)})),Jk=i((e=>{var n=qk(),r=t(`stream`);async function*i(e){let t=!1,n=!1,r=[];for(e.on(`error`,e=>{if(t||=!0,e)throw e}),e.on(`data`,e=>{r.push(e)}),e.on(`end`,()=>{t=!0});!n;){let e=await new Promise(e=>setTimeout(()=>e(r.shift()),0));e&&(yield e),n=t&&r.length===0}}var a=class{universalMarshaller;constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new n.EventStreamMarshaller({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){let n=typeof e[Symbol.asyncIterator]==`function`?e:i(e);return this.universalMarshaller.deserialize(n,t)}serialize(e,t){return r.Readable.from(this.universalMarshaller.serialize(e,t))}};e.EventStreamMarshaller=a,e.eventStreamSerdeProvider=e=>new a(e)})),Yk=i((e=>{var n=t(`fs`),r=l(),i=t(`stream`),a=class extends i.Writable{hash;constructor(e,t){super(t),this.hash=e}_write(e,t,n){try{this.hash.update(r.toUint8Array(e))}catch(e){return n(e)}n()}};let o=(e,t)=>new Promise((r,i)=>{if(!s(t)){i(Error(`Unable to calculate hash for non-file streams.`));return}let o=n.createReadStream(t.path,{start:t.start,end:t.end}),c=new e,l=new a(c);o.pipe(l),o.on(`error`,e=>{l.end(),i(e)}),l.on(`error`,i),l.on(`finish`,function(){c.digest().then(r).catch(i)})}),s=e=>typeof e.path==`string`;e.fileStreamHasher=o,e.readableStreamHasher=(e,t)=>{if(t.readableFlowing!==null)throw Error(`Unable to calculate hash for flowing readable stream`);let n=new e,r=new a(n);return t.pipe(r),new Promise((e,i)=>{t.on(`error`,e=>{r.end(),i(e)}),r.on(`error`,i),r.on(`finish`,()=>{n.digest().then(e).catch(i)})})}})),Xk=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.getRuntimeConfig=void 0;let n=(B(),e(R)),r=Pk(),i=Ik(),a=b(),o=re(),s=u(),c=p(),d=l(),f=zk(),m=Rk(),h=Hk();t.getRuntimeConfig=e=>({apiVersion:`2006-03-01`,base64Decoder:e?.base64Decoder??s.fromBase64,base64Encoder:e?.base64Encoder??s.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??m.defaultEndpointResolver,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??c.getAwsChunkedEncodingStream,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??f.defaultS3HttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new n.AwsSdkSigV4Signer},{schemeId:`aws.auth#sigv4a`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4a`),signer:new n.AwsSdkSigV4ASigner}],logger:e?.logger??new a.NoOpLogger,protocol:e?.protocol??r.S3RestXmlProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.s3`,errorTypeRegistries:h.errorTypeRegistries,xmlNamespace:`http://s3.amazonaws.com/doc/2006-03-01/`,version:`2006-03-01`,serviceTarget:`AmazonS3`},sdkStreamMixin:e?.sdkStreamMixin??c.sdkStreamMixin,serviceId:e?.serviceId??`S3`,signerConstructor:e?.signerConstructor??i.SignatureV4MultiRegion,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??o.parseUrl,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??d.fromUtf8,utf8Encoder:e?.utf8Encoder??d.toUtf8})})),Zk=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.getRuntimeConfig=void 0;let n=(g(),e(f)).__importDefault(Uk()),r=(o(),e(s)),i=(B(),e(R)),a=Wk(),c=Gk(),l=Mk(),u=Pk(),d=O(),p=I(),m=Jk(),h=P(),y=Yk(),x=A(),S=ae(),C=v(),w=b(),T=ee(),E=L(),D=M(),k=Xk();t.getRuntimeConfig=e=>{(0,w.emitWarningIfUnsupportedVersion)(process.version);let t=(0,E.resolveDefaultsModeConfig)(e),o=()=>t().then(w.loadConfigsForDefaultMode),s=(0,k.getRuntimeConfig)(e);(0,r.emitWarningIfUnsupportedVersion)(process.version);let f={profile:e?.profile,logger:s.logger};return{...s,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,S.loadConfig)(i.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,f),bodyLengthChecker:e?.bodyLengthChecker??T.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??a.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,d.createDefaultUserAgentProvider)({serviceId:s.serviceId,clientVersion:n.default.version}),disableS3ExpressSessionAuth:e?.disableS3ExpressSessionAuth??(0,S.loadConfig)(u.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS,f),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??m.eventStreamSerdeProvider,maxAttempts:e?.maxAttempts??(0,S.loadConfig)(x.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),md5:e?.md5??h.Hash.bind(null,`md5`),region:e?.region??(0,S.loadConfig)(p.NODE_REGION_CONFIG_OPTIONS,{...p.NODE_REGION_CONFIG_FILE_OPTIONS,...f}),requestChecksumCalculation:e?.requestChecksumCalculation??(0,S.loadConfig)(l.NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS,f),requestHandler:C.NodeHttpHandler.create(e?.requestHandler??o),responseChecksumValidation:e?.responseChecksumValidation??(0,S.loadConfig)(l.NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS,f),retryMode:e?.retryMode??(0,S.loadConfig)({...x.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await o()).retryMode||D.DEFAULT_RETRY_MODE},e),sha1:e?.sha1??h.Hash.bind(null,`sha1`),sha256:e?.sha256??h.Hash.bind(null,`sha256`),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??(0,S.loadConfig)(i.NODE_SIGV4A_CONFIG_OPTIONS,f),streamCollector:e?.streamCollector??C.streamCollector,streamHasher:e?.streamHasher??y.readableStreamHasher,useArnRegion:e?.useArnRegion??(0,S.loadConfig)(c.NODE_USE_ARN_REGION_CONFIG_OPTIONS,f),useDualstackEndpoint:e?.useDualstackEndpoint??(0,S.loadConfig)(p.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,f),useFipsEndpoint:e?.useFipsEndpoint??(0,S.loadConfig)(p.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,f),userAgentAppId:e?.userAgentAppId??(0,S.loadConfig)(d.NODE_APP_ID_CONFIG_OPTIONS,f)}}})),Qk=i((e=>{function t(e){return t=>async n=>{let r={...n.input};for(let t of[{target:`SSECustomerKey`,hash:`SSECustomerKeyMD5`},{target:`CopySourceSSECustomerKey`,hash:`CopySourceSSECustomerKeyMD5`}]){let n=r[t.target];if(n){let a;typeof n==`string`?i(n,e)?a=e.base64Decoder(n):(a=e.utf8Decoder(n),r[t.target]=e.base64Encoder(a)):(a=ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n),r[t.target]=e.base64Encoder(a));let o=new e.md5;o.update(a),r[t.hash]=e.base64Encoder(await o.digest())}}return t({...n,input:r})}}let n={name:`ssecMiddleware`,step:`initialize`,tags:[`SSE`],override:!0},r=e=>({applyToStack:r=>{r.add(t(e),n)}});function i(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return t.base64Decoder(e).length===32}catch{return!1}}e.getSsecPlugin=r,e.isValidBase64EncodedSSECustomerKey=i,e.ssecMiddleware=t,e.ssecMiddlewareOptions=n})),$k=i((e=>{function t(e){return t=>async n=>{let{CreateBucketConfiguration:r}=n.input,i=await e.region();return!r?.LocationConstraint&&!r?.Location&&i!==`us-east-1`&&(n.input.CreateBucketConfiguration=n.input.CreateBucketConfiguration??{},n.input.CreateBucketConfiguration.LocationConstraint=i),t(n)}}let n={step:`initialize`,tags:[`LOCATION_CONSTRAINT`,`CREATE_BUCKET_CONFIGURATION`],name:`locationConstraintMiddleware`,override:!0};e.getLocationConstraintPlugin=e=>({applyToStack:r=>{r.add(t(e),n)}}),e.locationConstraintMiddleware=t,e.locationConstraintMiddlewareOptions=n})),eA=i((e=>{let t=()=>{let e=new WeakSet;return(t,n)=>{if(typeof n==`object`&&n){if(e.has(n))return`[Circular]`;e.add(n)}return n}},n=e=>new Promise(t=>setTimeout(t,e*1e3)),r={minDelay:2,maxDelay:120};e.WaiterState=void 0,(function(e){e.ABORTED=`ABORTED`,e.FAILURE=`FAILURE`,e.SUCCESS=`SUCCESS`,e.RETRY=`RETRY`,e.TIMEOUT=`TIMEOUT`})(e.WaiterState||={});let i=n=>{if(n.state===e.WaiterState.ABORTED){let e=Error(`${JSON.stringify({...n,reason:`Request was aborted`},t())}`);throw e.name=`AbortError`,e}else if(n.state===e.WaiterState.TIMEOUT){let e=Error(`${JSON.stringify({...n,reason:`Waiter has timed out`},t())}`);throw e.name=`TimeoutError`,e}else if(n.state!==e.WaiterState.SUCCESS)throw Error(`${JSON.stringify(n,t())}`);return n},a=(e,t,n,r)=>r>n?t:o(e,e*2**(r-1)),o=(e,t)=>e+Math.random()*(t-e),s=async({minDelay:t,maxDelay:r,maxWaitTime:i,abortController:o,client:s,abortSignal:l},u,d)=>{let f={},{state:p,reason:m}=await d(s,u);if(m){let e=c(m);f[e]|=0,f[e]+=1}if(p!==e.WaiterState.RETRY)return{state:p,reason:m,observedResponses:f};let h=1,g=Date.now()+i*1e3,v=Math.log(r/t)/Math.log(2)+1;for(;;){if(o?.signal?.aborted||l?.aborted){let t=`AbortController signal aborted.`;return f[t]|=0,f[t]+=1,{state:e.WaiterState.ABORTED,observedResponses:f}}let i=a(t,r,v,h);if(Date.now()+i*1e3>g)return{state:e.WaiterState.TIMEOUT,observedResponses:f};await n(i);let{state:p,reason:m}=await d(s,u);if(m){let e=c(m);f[e]|=0,f[e]+=1}if(p!==e.WaiterState.RETRY)return{state:p,reason:m,observedResponses:f};h+=1}},c=e=>e?.$responseBodyText?`Deserialization error for body: ${e.$responseBodyText}`:e?.$metadata?.httpStatusCode?e.$response||e.message?`${e.$response?.statusCode??e.$metadata.httpStatusCode??`Unknown`}: ${e.message}`:`${e.$metadata.httpStatusCode}: OK`:String(e?.message??JSON.stringify(e,t())??`Unknown`),l=e=>{if(e.maxWaitTime<=0)throw Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);if(e.minDelay<=0)throw Error(`WaiterConfiguration.minDelay must be greater than 0`);if(e.maxDelay<=0)throw Error(`WaiterConfiguration.maxDelay must be greater than 0`);if(e.maxWaitTime<=e.minDelay)throw Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);if(e.maxDelay{let n;return{clearListener(){typeof t.removeEventListener==`function`&&t.removeEventListener(`abort`,n)},aborted:new Promise(r=>{n=()=>r({state:e.WaiterState.ABORTED}),typeof t.addEventListener==`function`?t.addEventListener(`abort`,n):t.onabort=n})}};e.checkExceptions=i,e.createWaiter=async(e,t,n)=>{let i={...r,...e};l(i);let a=[s(i,t,n)],o=[];if(e.abortSignal){let{aborted:t,clearListener:n}=u(e.abortSignal);o.push(n),a.push(t)}if(e.abortController?.signal){let{aborted:t,clearListener:n}=u(e.abortController.signal);o.push(n),a.push(t)}return Promise.race(a).then(e=>{for(let e of o)e();return e})},e.waiterServiceDefaults=r})),tA=i((t=>{var n=_k(),r=Mk(),i=w(),o=C(),s=F(),c=Pk(),l=N(),u=I(),f=(k(),e(ne)),p=(y(),e(d)),m=Fk(),h=z(),g=j(),v=A(),x=b(),S=zk(),T=Hk(),E=Zk(),D=te(),O=a(),M=Qk(),P=$k(),L=eA(),R=Vk(),ee=Bk();let B=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:`s3`,clientContextParams:e.clientContextParams??{}}),V={ForcePathStyle:{type:`clientContextParams`,name:`forcePathStyle`},UseArnRegion:{type:`clientContextParams`,name:`useArnRegion`},DisableMultiRegionAccessPoints:{type:`clientContextParams`,name:`disableMultiregionAccessPoints`},Accelerate:{type:`clientContextParams`,name:`useAccelerateEndpoint`},DisableS3ExpressSessionAuth:{type:`clientContextParams`,name:`disableS3ExpressSessionAuth`},UseGlobalEndpoint:{type:`builtInParams`,name:`useGlobalEndpoint`},UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}};var re=class extends x.Command.classBuilder().ep({...V,DisableS3ExpressSessionAuth:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`CreateSession`,{}).n(`S3Client`,`CreateSessionCommand`).sc(T.CreateSession$).build(){};let H=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},ie=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),ae=(e,t)=>{let n=Object.assign(D.getAwsRegionExtensionConfiguration(e),x.getDefaultExtensionConfiguration(e),O.getHttpHandlerExtensionConfiguration(e),H(e));return t.forEach(e=>e.configure(n)),Object.assign(e,D.resolveAwsRegionExtensionConfiguration(n),x.resolveDefaultRuntimeConfig(n),O.resolveHttpHandlerRuntimeConfig(n),ie(n))};var oe=class extends x.Client{config;constructor(...[e]){let t=E.getRuntimeConfig(e||{});super(t),this.initConfig=t;let a=B(t),d=l.resolveUserAgentConfig(a),y=r.resolveFlexibleChecksumsConfig(d),b=v.resolveRetryConfig(y),x=u.resolveRegionConfig(b),C=i.resolveHostHeaderConfig(x),w=g.resolveEndpointConfig(C),T=m.resolveEventStreamSerdeConfig(w),D=S.resolveHttpAuthSchemeConfig(T),O=ae(c.resolveS3Config(D,{session:[()=>this,re]}),e?.extensions||[]);this.config=O,this.middlewareStack.use(p.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(l.getUserAgentPlugin(this.config)),this.middlewareStack.use(v.getRetryPlugin(this.config)),this.middlewareStack.use(h.getContentLengthPlugin(this.config)),this.middlewareStack.use(i.getHostHeaderPlugin(this.config)),this.middlewareStack.use(o.getLoggerPlugin(this.config)),this.middlewareStack.use(s.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(f.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:S.defaultS3HttpAuthSchemeParametersProvider,identityProviderConfigProvider:async e=>new f.DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials,"aws.auth#sigv4a":e.credentials})})),this.middlewareStack.use(f.getHttpSigningPlugin(this.config)),this.middlewareStack.use(c.getValidateBucketNamePlugin(this.config)),this.middlewareStack.use(n.getAddExpectContinuePlugin(this.config)),this.middlewareStack.use(c.getRegionRedirectMiddlewarePlugin(this.config)),this.middlewareStack.use(c.getS3ExpressPlugin(this.config)),this.middlewareStack.use(c.getS3ExpressHttpSigningPlugin(this.config))}destroy(){super.destroy()}},se=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`AbortMultipartUpload`,{}).n(`S3Client`,`AbortMultipartUploadCommand`).sc(T.AbortMultipartUpload$).build(){},ce=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`CompleteMultipartUpload`,{}).n(`S3Client`,`CompleteMultipartUploadCommand`).sc(T.CompleteMultipartUpload$).build(){},le=class extends x.Command.classBuilder().ep({...V,DisableS3ExpressSessionAuth:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`},CopySource:{type:`contextParams`,name:`CopySource`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`CopyObject`,{}).n(`S3Client`,`CopyObjectCommand`).sc(T.CopyObject$).build(){},ue=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},DisableAccessPoints:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),P.getLocationConstraintPlugin(n)]}).s(`AmazonS3`,`CreateBucket`,{}).n(`S3Client`,`CreateBucketCommand`).sc(T.CreateBucket$).build(){},de=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`CreateBucketMetadataConfiguration`,{}).n(`S3Client`,`CreateBucketMetadataConfigurationCommand`).sc(T.CreateBucketMetadataConfiguration$).build(){},fe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`CreateBucketMetadataTableConfiguration`,{}).n(`S3Client`,`CreateBucketMetadataTableConfigurationCommand`).sc(T.CreateBucketMetadataTableConfiguration$).build(){},pe=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`CreateMultipartUpload`,{}).n(`S3Client`,`CreateMultipartUploadCommand`).sc(T.CreateMultipartUpload$).build(){},me=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketAnalyticsConfiguration`,{}).n(`S3Client`,`DeleteBucketAnalyticsConfigurationCommand`).sc(T.DeleteBucketAnalyticsConfiguration$).build(){},he=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucket`,{}).n(`S3Client`,`DeleteBucketCommand`).sc(T.DeleteBucket$).build(){},ge=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketCors`,{}).n(`S3Client`,`DeleteBucketCorsCommand`).sc(T.DeleteBucketCors$).build(){},_e=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketEncryption`,{}).n(`S3Client`,`DeleteBucketEncryptionCommand`).sc(T.DeleteBucketEncryption$).build(){},U=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketIntelligentTieringConfiguration`,{}).n(`S3Client`,`DeleteBucketIntelligentTieringConfigurationCommand`).sc(T.DeleteBucketIntelligentTieringConfiguration$).build(){},ve=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketInventoryConfiguration`,{}).n(`S3Client`,`DeleteBucketInventoryConfigurationCommand`).sc(T.DeleteBucketInventoryConfiguration$).build(){},ye=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketLifecycle`,{}).n(`S3Client`,`DeleteBucketLifecycleCommand`).sc(T.DeleteBucketLifecycle$).build(){},be=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketMetadataConfiguration`,{}).n(`S3Client`,`DeleteBucketMetadataConfigurationCommand`).sc(T.DeleteBucketMetadataConfiguration$).build(){},xe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketMetadataTableConfiguration`,{}).n(`S3Client`,`DeleteBucketMetadataTableConfigurationCommand`).sc(T.DeleteBucketMetadataTableConfiguration$).build(){},Se=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketMetricsConfiguration`,{}).n(`S3Client`,`DeleteBucketMetricsConfigurationCommand`).sc(T.DeleteBucketMetricsConfiguration$).build(){},Ce=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketOwnershipControls`,{}).n(`S3Client`,`DeleteBucketOwnershipControlsCommand`).sc(T.DeleteBucketOwnershipControls$).build(){},we=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketPolicy`,{}).n(`S3Client`,`DeleteBucketPolicyCommand`).sc(T.DeleteBucketPolicy$).build(){},Te=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketReplication`,{}).n(`S3Client`,`DeleteBucketReplicationCommand`).sc(T.DeleteBucketReplication$).build(){},Ee=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketTagging`,{}).n(`S3Client`,`DeleteBucketTaggingCommand`).sc(T.DeleteBucketTagging$).build(){},De=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeleteBucketWebsite`,{}).n(`S3Client`,`DeleteBucketWebsiteCommand`).sc(T.DeleteBucketWebsite$).build(){},Oe=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`DeleteObject`,{}).n(`S3Client`,`DeleteObjectCommand`).sc(T.DeleteObject$).build(){},W=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`DeleteObjects`,{}).n(`S3Client`,`DeleteObjectsCommand`).sc(T.DeleteObjects$).build(){},ke=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`DeleteObjectTagging`,{}).n(`S3Client`,`DeleteObjectTaggingCommand`).sc(T.DeleteObjectTagging$).build(){},Ae=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`DeletePublicAccessBlock`,{}).n(`S3Client`,`DeletePublicAccessBlockCommand`).sc(T.DeletePublicAccessBlock$).build(){},je=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketAbac`,{}).n(`S3Client`,`GetBucketAbacCommand`).sc(T.GetBucketAbac$).build(){},Me=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketAccelerateConfiguration`,{}).n(`S3Client`,`GetBucketAccelerateConfigurationCommand`).sc(T.GetBucketAccelerateConfiguration$).build(){},Ne=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketAcl`,{}).n(`S3Client`,`GetBucketAclCommand`).sc(T.GetBucketAcl$).build(){},Pe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketAnalyticsConfiguration`,{}).n(`S3Client`,`GetBucketAnalyticsConfigurationCommand`).sc(T.GetBucketAnalyticsConfiguration$).build(){},Fe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketCors`,{}).n(`S3Client`,`GetBucketCorsCommand`).sc(T.GetBucketCors$).build(){},Ie=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketEncryption`,{}).n(`S3Client`,`GetBucketEncryptionCommand`).sc(T.GetBucketEncryption$).build(){},Le=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketIntelligentTieringConfiguration`,{}).n(`S3Client`,`GetBucketIntelligentTieringConfigurationCommand`).sc(T.GetBucketIntelligentTieringConfiguration$).build(){},Re=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketInventoryConfiguration`,{}).n(`S3Client`,`GetBucketInventoryConfigurationCommand`).sc(T.GetBucketInventoryConfiguration$).build(){},ze=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketLifecycleConfiguration`,{}).n(`S3Client`,`GetBucketLifecycleConfigurationCommand`).sc(T.GetBucketLifecycleConfiguration$).build(){},Be=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketLocation`,{}).n(`S3Client`,`GetBucketLocationCommand`).sc(T.GetBucketLocation$).build(){},Ve=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketLogging`,{}).n(`S3Client`,`GetBucketLoggingCommand`).sc(T.GetBucketLogging$).build(){},He=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketMetadataConfiguration`,{}).n(`S3Client`,`GetBucketMetadataConfigurationCommand`).sc(T.GetBucketMetadataConfiguration$).build(){},Ue=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketMetadataTableConfiguration`,{}).n(`S3Client`,`GetBucketMetadataTableConfigurationCommand`).sc(T.GetBucketMetadataTableConfiguration$).build(){},We=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketMetricsConfiguration`,{}).n(`S3Client`,`GetBucketMetricsConfigurationCommand`).sc(T.GetBucketMetricsConfiguration$).build(){},Ge=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketNotificationConfiguration`,{}).n(`S3Client`,`GetBucketNotificationConfigurationCommand`).sc(T.GetBucketNotificationConfiguration$).build(){},Ke=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketOwnershipControls`,{}).n(`S3Client`,`GetBucketOwnershipControlsCommand`).sc(T.GetBucketOwnershipControls$).build(){},qe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketPolicy`,{}).n(`S3Client`,`GetBucketPolicyCommand`).sc(T.GetBucketPolicy$).build(){},Je=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketPolicyStatus`,{}).n(`S3Client`,`GetBucketPolicyStatusCommand`).sc(T.GetBucketPolicyStatus$).build(){},G=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketReplication`,{}).n(`S3Client`,`GetBucketReplicationCommand`).sc(T.GetBucketReplication$).build(){},Ye=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketRequestPayment`,{}).n(`S3Client`,`GetBucketRequestPaymentCommand`).sc(T.GetBucketRequestPayment$).build(){},Xe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketTagging`,{}).n(`S3Client`,`GetBucketTaggingCommand`).sc(T.GetBucketTagging$).build(){},Ze=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketVersioning`,{}).n(`S3Client`,`GetBucketVersioningCommand`).sc(T.GetBucketVersioning$).build(){},Qe=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetBucketWebsite`,{}).n(`S3Client`,`GetBucketWebsiteCommand`).sc(T.GetBucketWebsite$).build(){},$e=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetObjectAcl`,{}).n(`S3Client`,`GetObjectAclCommand`).sc(T.GetObjectAcl$).build(){},et=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`GetObjectAttributes`,{}).n(`S3Client`,`GetObjectAttributesCommand`).sc(T.GetObjectAttributes$).build(){},tt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestChecksumRequired:!1,requestValidationModeMember:`ChecksumMode`,responseAlgorithms:[`CRC64NVME`,`CRC32`,`CRC32C`,`SHA256`,`SHA1`]}),M.getSsecPlugin(n),c.getS3ExpiresMiddlewarePlugin(n)]}).s(`AmazonS3`,`GetObject`,{}).n(`S3Client`,`GetObjectCommand`).sc(T.GetObject$).build(){},nt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetObjectLegalHold`,{}).n(`S3Client`,`GetObjectLegalHoldCommand`).sc(T.GetObjectLegalHold$).build(){},rt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetObjectLockConfiguration`,{}).n(`S3Client`,`GetObjectLockConfigurationCommand`).sc(T.GetObjectLockConfiguration$).build(){},it=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetObjectRetention`,{}).n(`S3Client`,`GetObjectRetentionCommand`).sc(T.GetObjectRetention$).build(){},at=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetObjectTagging`,{}).n(`S3Client`,`GetObjectTaggingCommand`).sc(T.GetObjectTagging$).build(){},ot=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`GetObjectTorrent`,{}).n(`S3Client`,`GetObjectTorrentCommand`).sc(T.GetObjectTorrent$).build(){},st=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`GetPublicAccessBlock`,{}).n(`S3Client`,`GetPublicAccessBlockCommand`).sc(T.GetPublicAccessBlock$).build(){},ct=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`HeadBucket`,{}).n(`S3Client`,`HeadBucketCommand`).sc(T.HeadBucket$).build(){},lt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n),c.getS3ExpiresMiddlewarePlugin(n)]}).s(`AmazonS3`,`HeadObject`,{}).n(`S3Client`,`HeadObjectCommand`).sc(T.HeadObject$).build(){},ut=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListBucketAnalyticsConfigurations`,{}).n(`S3Client`,`ListBucketAnalyticsConfigurationsCommand`).sc(T.ListBucketAnalyticsConfigurations$).build(){},dt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListBucketIntelligentTieringConfigurations`,{}).n(`S3Client`,`ListBucketIntelligentTieringConfigurationsCommand`).sc(T.ListBucketIntelligentTieringConfigurations$).build(){},ft=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListBucketInventoryConfigurations`,{}).n(`S3Client`,`ListBucketInventoryConfigurationsCommand`).sc(T.ListBucketInventoryConfigurations$).build(){},pt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListBucketMetricsConfigurations`,{}).n(`S3Client`,`ListBucketMetricsConfigurationsCommand`).sc(T.ListBucketMetricsConfigurations$).build(){},mt=class extends x.Command.classBuilder().ep(V).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListBuckets`,{}).n(`S3Client`,`ListBucketsCommand`).sc(T.ListBuckets$).build(){},ht=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListDirectoryBuckets`,{}).n(`S3Client`,`ListDirectoryBucketsCommand`).sc(T.ListDirectoryBuckets$).build(){},gt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListMultipartUploads`,{}).n(`S3Client`,`ListMultipartUploadsCommand`).sc(T.ListMultipartUploads$).build(){},_t=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListObjects`,{}).n(`S3Client`,`ListObjectsCommand`).sc(T.ListObjects$).build(){},vt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListObjectsV2`,{}).n(`S3Client`,`ListObjectsV2Command`).sc(T.ListObjectsV2$).build(){},yt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`ListObjectVersions`,{}).n(`S3Client`,`ListObjectVersionsCommand`).sc(T.ListObjectVersions$).build(){},bt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`ListParts`,{}).n(`S3Client`,`ListPartsCommand`).sc(T.ListParts$).build(){},xt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1})]}).s(`AmazonS3`,`PutBucketAbac`,{}).n(`S3Client`,`PutBucketAbacCommand`).sc(T.PutBucketAbac$).build(){},St=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1})]}).s(`AmazonS3`,`PutBucketAccelerateConfiguration`,{}).n(`S3Client`,`PutBucketAccelerateConfigurationCommand`).sc(T.PutBucketAccelerateConfiguration$).build(){},Ct=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketAcl`,{}).n(`S3Client`,`PutBucketAclCommand`).sc(T.PutBucketAcl$).build(){},wt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`PutBucketAnalyticsConfiguration`,{}).n(`S3Client`,`PutBucketAnalyticsConfigurationCommand`).sc(T.PutBucketAnalyticsConfiguration$).build(){},Tt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketCors`,{}).n(`S3Client`,`PutBucketCorsCommand`).sc(T.PutBucketCors$).build(){},Et=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketEncryption`,{}).n(`S3Client`,`PutBucketEncryptionCommand`).sc(T.PutBucketEncryption$).build(){},Dt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`PutBucketIntelligentTieringConfiguration`,{}).n(`S3Client`,`PutBucketIntelligentTieringConfigurationCommand`).sc(T.PutBucketIntelligentTieringConfiguration$).build(){},Ot=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`PutBucketInventoryConfiguration`,{}).n(`S3Client`,`PutBucketInventoryConfigurationCommand`).sc(T.PutBucketInventoryConfiguration$).build(){},kt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`PutBucketLifecycleConfiguration`,{}).n(`S3Client`,`PutBucketLifecycleConfigurationCommand`).sc(T.PutBucketLifecycleConfiguration$).build(){},At=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketLogging`,{}).n(`S3Client`,`PutBucketLoggingCommand`).sc(T.PutBucketLogging$).build(){},jt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`PutBucketMetricsConfiguration`,{}).n(`S3Client`,`PutBucketMetricsConfigurationCommand`).sc(T.PutBucketMetricsConfiguration$).build(){},Mt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`PutBucketNotificationConfiguration`,{}).n(`S3Client`,`PutBucketNotificationConfigurationCommand`).sc(T.PutBucketNotificationConfiguration$).build(){},Nt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketOwnershipControls`,{}).n(`S3Client`,`PutBucketOwnershipControlsCommand`).sc(T.PutBucketOwnershipControls$).build(){},Pt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketPolicy`,{}).n(`S3Client`,`PutBucketPolicyCommand`).sc(T.PutBucketPolicy$).build(){},Ft=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketReplication`,{}).n(`S3Client`,`PutBucketReplicationCommand`).sc(T.PutBucketReplication$).build(){},It=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketRequestPayment`,{}).n(`S3Client`,`PutBucketRequestPaymentCommand`).sc(T.PutBucketRequestPayment$).build(){},Lt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketTagging`,{}).n(`S3Client`,`PutBucketTaggingCommand`).sc(T.PutBucketTagging$).build(){},Rt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketVersioning`,{}).n(`S3Client`,`PutBucketVersioningCommand`).sc(T.PutBucketVersioning$).build(){},zt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutBucketWebsite`,{}).n(`S3Client`,`PutBucketWebsiteCommand`).sc(T.PutBucketWebsite$).build(){},Bt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`PutObjectAcl`,{}).n(`S3Client`,`PutObjectAclCommand`).sc(T.PutObjectAcl$).build(){},Vt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1}),c.getCheckContentLengthHeaderPlugin(n),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`PutObject`,{}).n(`S3Client`,`PutObjectCommand`).sc(T.PutObject$).build(){},Ht=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`PutObjectLegalHold`,{}).n(`S3Client`,`PutObjectLegalHoldCommand`).sc(T.PutObjectLegalHold$).build(){},Ut=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`PutObjectLockConfiguration`,{}).n(`S3Client`,`PutObjectLockConfigurationCommand`).sc(T.PutObjectLockConfiguration$).build(){},Wt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`PutObjectRetention`,{}).n(`S3Client`,`PutObjectRetentionCommand`).sc(T.PutObjectRetention$).build(){},Gt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`PutObjectTagging`,{}).n(`S3Client`,`PutObjectTaggingCommand`).sc(T.PutObjectTagging$).build(){},Kt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`PutPublicAccessBlock`,{}).n(`S3Client`,`PutPublicAccessBlockCommand`).sc(T.PutPublicAccessBlock$).build(){},qt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`RenameObject`,{}).n(`S3Client`,`RenameObjectCommand`).sc(T.RenameObject$).build(){},Jt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`RestoreObject`,{}).n(`S3Client`,`RestoreObjectCommand`).sc(T.RestoreObject$).build(){},Yt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`SelectObjectContent`,{eventStream:{output:!0}}).n(`S3Client`,`SelectObjectContentCommand`).sc(T.SelectObjectContent$).build(){},Xt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`UpdateBucketMetadataInventoryTableConfiguration`,{}).n(`S3Client`,`UpdateBucketMetadataInventoryTableConfigurationCommand`).sc(T.UpdateBucketMetadataInventoryTableConfiguration$).build(){},Zt=class extends x.Command.classBuilder().ep({...V,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0})]}).s(`AmazonS3`,`UpdateBucketMetadataJournalTableConfiguration`,{}).n(`S3Client`,`UpdateBucketMetadataJournalTableConfigurationCommand`).sc(T.UpdateBucketMetadataJournalTableConfiguration$).build(){},Qt=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),c.getThrow200ExceptionsPlugin(n)]}).s(`AmazonS3`,`UpdateObjectEncryption`,{}).n(`S3Client`,`UpdateObjectEncryptionCommand`).sc(T.UpdateObjectEncryption$).build(){},$t=class extends x.Command.classBuilder().ep({...V,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,i){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),r.getFlexibleChecksumsPlugin(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1}),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`UploadPart`,{}).n(`S3Client`,`UploadPartCommand`).sc(T.UploadPart$).build(){},en=class extends x.Command.classBuilder().ep({...V,DisableS3ExpressSessionAuth:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions()),c.getThrow200ExceptionsPlugin(n),M.getSsecPlugin(n)]}).s(`AmazonS3`,`UploadPartCopy`,{}).n(`S3Client`,`UploadPartCopyCommand`).sc(T.UploadPartCopy$).build(){},tn=class extends x.Command.classBuilder().ep({...V,UseObjectLambdaEndpoint:{type:`staticContextParams`,value:!0}}).m(function(e,t,n,r){return[g.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s(`AmazonS3`,`WriteGetObjectResponse`,{}).n(`S3Client`,`WriteGetObjectResponseCommand`).sc(T.WriteGetObjectResponse$).build(){};let nn=f.createPaginator(oe,mt,`ContinuationToken`,`ContinuationToken`,`MaxBuckets`),rn=f.createPaginator(oe,ht,`ContinuationToken`,`ContinuationToken`,`MaxDirectoryBuckets`),an=f.createPaginator(oe,vt,`ContinuationToken`,`NextContinuationToken`,`MaxKeys`),on=f.createPaginator(oe,bt,`PartNumberMarker`,`NextPartNumberMarker`,`MaxParts`),sn=async(e,t)=>{let n;try{return n=await e.send(new ct(t)),{state:L.WaiterState.SUCCESS,reason:n}}catch(e){if(n=e,e.name&&e.name==`NotFound`)return{state:L.WaiterState.RETRY,reason:n}}return{state:L.WaiterState.RETRY,reason:n}},cn=async(e,t)=>L.createWaiter({minDelay:5,maxDelay:120,...e},t,sn),ln=async(e,t)=>{let n=await L.createWaiter({minDelay:5,maxDelay:120,...e},t,sn);return L.checkExceptions(n)},un=async(e,t)=>{let n;try{n=await e.send(new ct(t))}catch(e){if(n=e,e.name&&e.name==`NotFound`)return{state:L.WaiterState.SUCCESS,reason:n}}return{state:L.WaiterState.RETRY,reason:n}},dn=async(e,t)=>L.createWaiter({minDelay:5,maxDelay:120,...e},t,un),fn=async(e,t)=>{let n=await L.createWaiter({minDelay:5,maxDelay:120,...e},t,un);return L.checkExceptions(n)},pn=async(e,t)=>{let n;try{return n=await e.send(new lt(t)),{state:L.WaiterState.SUCCESS,reason:n}}catch(e){if(n=e,e.name&&e.name==`NotFound`)return{state:L.WaiterState.RETRY,reason:n}}return{state:L.WaiterState.RETRY,reason:n}},mn=async(e,t)=>L.createWaiter({minDelay:5,maxDelay:120,...e},t,pn),hn=async(e,t)=>{let n=await L.createWaiter({minDelay:5,maxDelay:120,...e},t,pn);return L.checkExceptions(n)},gn=async(e,t)=>{let n;try{n=await e.send(new lt(t))}catch(e){if(n=e,e.name&&e.name==`NotFound`)return{state:L.WaiterState.SUCCESS,reason:n}}return{state:L.WaiterState.RETRY,reason:n}},_n=async(e,t)=>L.createWaiter({minDelay:5,maxDelay:120,...e},t,gn),vn=async(e,t)=>{let n=await L.createWaiter({minDelay:5,maxDelay:120,...e},t,gn);return L.checkExceptions(n)},yn={AbortMultipartUploadCommand:se,CompleteMultipartUploadCommand:ce,CopyObjectCommand:le,CreateBucketCommand:ue,CreateBucketMetadataConfigurationCommand:de,CreateBucketMetadataTableConfigurationCommand:fe,CreateMultipartUploadCommand:pe,CreateSessionCommand:re,DeleteBucketCommand:he,DeleteBucketAnalyticsConfigurationCommand:me,DeleteBucketCorsCommand:ge,DeleteBucketEncryptionCommand:_e,DeleteBucketIntelligentTieringConfigurationCommand:U,DeleteBucketInventoryConfigurationCommand:ve,DeleteBucketLifecycleCommand:ye,DeleteBucketMetadataConfigurationCommand:be,DeleteBucketMetadataTableConfigurationCommand:xe,DeleteBucketMetricsConfigurationCommand:Se,DeleteBucketOwnershipControlsCommand:Ce,DeleteBucketPolicyCommand:we,DeleteBucketReplicationCommand:Te,DeleteBucketTaggingCommand:Ee,DeleteBucketWebsiteCommand:De,DeleteObjectCommand:Oe,DeleteObjectsCommand:W,DeleteObjectTaggingCommand:ke,DeletePublicAccessBlockCommand:Ae,GetBucketAbacCommand:je,GetBucketAccelerateConfigurationCommand:Me,GetBucketAclCommand:Ne,GetBucketAnalyticsConfigurationCommand:Pe,GetBucketCorsCommand:Fe,GetBucketEncryptionCommand:Ie,GetBucketIntelligentTieringConfigurationCommand:Le,GetBucketInventoryConfigurationCommand:Re,GetBucketLifecycleConfigurationCommand:ze,GetBucketLocationCommand:Be,GetBucketLoggingCommand:Ve,GetBucketMetadataConfigurationCommand:He,GetBucketMetadataTableConfigurationCommand:Ue,GetBucketMetricsConfigurationCommand:We,GetBucketNotificationConfigurationCommand:Ge,GetBucketOwnershipControlsCommand:Ke,GetBucketPolicyCommand:qe,GetBucketPolicyStatusCommand:Je,GetBucketReplicationCommand:G,GetBucketRequestPaymentCommand:Ye,GetBucketTaggingCommand:Xe,GetBucketVersioningCommand:Ze,GetBucketWebsiteCommand:Qe,GetObjectCommand:tt,GetObjectAclCommand:$e,GetObjectAttributesCommand:et,GetObjectLegalHoldCommand:nt,GetObjectLockConfigurationCommand:rt,GetObjectRetentionCommand:it,GetObjectTaggingCommand:at,GetObjectTorrentCommand:ot,GetPublicAccessBlockCommand:st,HeadBucketCommand:ct,HeadObjectCommand:lt,ListBucketAnalyticsConfigurationsCommand:ut,ListBucketIntelligentTieringConfigurationsCommand:dt,ListBucketInventoryConfigurationsCommand:ft,ListBucketMetricsConfigurationsCommand:pt,ListBucketsCommand:mt,ListDirectoryBucketsCommand:ht,ListMultipartUploadsCommand:gt,ListObjectsCommand:_t,ListObjectsV2Command:vt,ListObjectVersionsCommand:yt,ListPartsCommand:bt,PutBucketAbacCommand:xt,PutBucketAccelerateConfigurationCommand:St,PutBucketAclCommand:Ct,PutBucketAnalyticsConfigurationCommand:wt,PutBucketCorsCommand:Tt,PutBucketEncryptionCommand:Et,PutBucketIntelligentTieringConfigurationCommand:Dt,PutBucketInventoryConfigurationCommand:Ot,PutBucketLifecycleConfigurationCommand:kt,PutBucketLoggingCommand:At,PutBucketMetricsConfigurationCommand:jt,PutBucketNotificationConfigurationCommand:Mt,PutBucketOwnershipControlsCommand:Nt,PutBucketPolicyCommand:Pt,PutBucketReplicationCommand:Ft,PutBucketRequestPaymentCommand:It,PutBucketTaggingCommand:Lt,PutBucketVersioningCommand:Rt,PutBucketWebsiteCommand:zt,PutObjectCommand:Vt,PutObjectAclCommand:Bt,PutObjectLegalHoldCommand:Ht,PutObjectLockConfigurationCommand:Ut,PutObjectRetentionCommand:Wt,PutObjectTaggingCommand:Gt,PutPublicAccessBlockCommand:Kt,RenameObjectCommand:qt,RestoreObjectCommand:Jt,SelectObjectContentCommand:Yt,UpdateBucketMetadataInventoryTableConfigurationCommand:Xt,UpdateBucketMetadataJournalTableConfigurationCommand:Zt,UpdateObjectEncryptionCommand:Qt,UploadPartCommand:$t,UploadPartCopyCommand:en,WriteGetObjectResponseCommand:tn},bn={paginateListBuckets:nn,paginateListDirectoryBuckets:rn,paginateListObjectsV2:an,paginateListParts:on},xn={waitUntilBucketExists:ln,waitUntilBucketNotExists:fn,waitUntilObjectExists:hn,waitUntilObjectNotExists:vn};var Sn=class extends oe{};x.createAggregatedClient(yn,Sn,{paginators:bn,waiters:xn}),t.$Command=x.Command,t.__Client=x.Client,t.S3ServiceException=ee.S3ServiceException,t.AbortMultipartUploadCommand=se,t.AnalyticsS3ExportFileFormat={CSV:`CSV`},t.ArchiveStatus={ARCHIVE_ACCESS:`ARCHIVE_ACCESS`,DEEP_ARCHIVE_ACCESS:`DEEP_ARCHIVE_ACCESS`},t.BucketAbacStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.BucketAccelerateStatus={Enabled:`Enabled`,Suspended:`Suspended`},t.BucketCannedACL={authenticated_read:`authenticated-read`,private:`private`,public_read:`public-read`,public_read_write:`public-read-write`},t.BucketLocationConstraint={EU:`EU`,af_south_1:`af-south-1`,ap_east_1:`ap-east-1`,ap_east_2:`ap-east-2`,ap_northeast_1:`ap-northeast-1`,ap_northeast_2:`ap-northeast-2`,ap_northeast_3:`ap-northeast-3`,ap_south_1:`ap-south-1`,ap_south_2:`ap-south-2`,ap_southeast_1:`ap-southeast-1`,ap_southeast_2:`ap-southeast-2`,ap_southeast_3:`ap-southeast-3`,ap_southeast_4:`ap-southeast-4`,ap_southeast_5:`ap-southeast-5`,ap_southeast_6:`ap-southeast-6`,ap_southeast_7:`ap-southeast-7`,ca_central_1:`ca-central-1`,ca_west_1:`ca-west-1`,cn_north_1:`cn-north-1`,cn_northwest_1:`cn-northwest-1`,eu_central_1:`eu-central-1`,eu_central_2:`eu-central-2`,eu_north_1:`eu-north-1`,eu_south_1:`eu-south-1`,eu_south_2:`eu-south-2`,eu_west_1:`eu-west-1`,eu_west_2:`eu-west-2`,eu_west_3:`eu-west-3`,il_central_1:`il-central-1`,me_central_1:`me-central-1`,me_south_1:`me-south-1`,mx_central_1:`mx-central-1`,sa_east_1:`sa-east-1`,us_east_2:`us-east-2`,us_gov_east_1:`us-gov-east-1`,us_gov_west_1:`us-gov-west-1`,us_west_1:`us-west-1`,us_west_2:`us-west-2`},t.BucketLogsPermission={FULL_CONTROL:`FULL_CONTROL`,READ:`READ`,WRITE:`WRITE`},t.BucketNamespace={ACCOUNT_REGIONAL:`account-regional`,GLOBAL:`global`},t.BucketType={Directory:`Directory`},t.BucketVersioningStatus={Enabled:`Enabled`,Suspended:`Suspended`},t.ChecksumAlgorithm={CRC32:`CRC32`,CRC32C:`CRC32C`,CRC64NVME:`CRC64NVME`,SHA1:`SHA1`,SHA256:`SHA256`},t.ChecksumMode={ENABLED:`ENABLED`},t.ChecksumType={COMPOSITE:`COMPOSITE`,FULL_OBJECT:`FULL_OBJECT`},t.CompleteMultipartUploadCommand=ce,t.CompressionType={BZIP2:`BZIP2`,GZIP:`GZIP`,NONE:`NONE`},t.CopyObjectCommand=le,t.CreateBucketCommand=ue,t.CreateBucketMetadataConfigurationCommand=de,t.CreateBucketMetadataTableConfigurationCommand=fe,t.CreateMultipartUploadCommand=pe,t.CreateSessionCommand=re,t.DataRedundancy={SingleAvailabilityZone:`SingleAvailabilityZone`,SingleLocalZone:`SingleLocalZone`},t.DeleteBucketAnalyticsConfigurationCommand=me,t.DeleteBucketCommand=he,t.DeleteBucketCorsCommand=ge,t.DeleteBucketEncryptionCommand=_e,t.DeleteBucketIntelligentTieringConfigurationCommand=U,t.DeleteBucketInventoryConfigurationCommand=ve,t.DeleteBucketLifecycleCommand=ye,t.DeleteBucketMetadataConfigurationCommand=be,t.DeleteBucketMetadataTableConfigurationCommand=xe,t.DeleteBucketMetricsConfigurationCommand=Se,t.DeleteBucketOwnershipControlsCommand=Ce,t.DeleteBucketPolicyCommand=we,t.DeleteBucketReplicationCommand=Te,t.DeleteBucketTaggingCommand=Ee,t.DeleteBucketWebsiteCommand=De,t.DeleteMarkerReplicationStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.DeleteObjectCommand=Oe,t.DeleteObjectTaggingCommand=ke,t.DeleteObjectsCommand=W,t.DeletePublicAccessBlockCommand=Ae,t.EncodingType={url:`url`},t.EncryptionType={NONE:`NONE`,SSE_C:`SSE-C`},t.Event={s3_IntelligentTiering:`s3:IntelligentTiering`,s3_LifecycleExpiration_:`s3:LifecycleExpiration:*`,s3_LifecycleExpiration_Delete:`s3:LifecycleExpiration:Delete`,s3_LifecycleExpiration_DeleteMarkerCreated:`s3:LifecycleExpiration:DeleteMarkerCreated`,s3_LifecycleTransition:`s3:LifecycleTransition`,s3_ObjectAcl_Put:`s3:ObjectAcl:Put`,s3_ObjectCreated_:`s3:ObjectCreated:*`,s3_ObjectCreated_CompleteMultipartUpload:`s3:ObjectCreated:CompleteMultipartUpload`,s3_ObjectCreated_Copy:`s3:ObjectCreated:Copy`,s3_ObjectCreated_Post:`s3:ObjectCreated:Post`,s3_ObjectCreated_Put:`s3:ObjectCreated:Put`,s3_ObjectRemoved_:`s3:ObjectRemoved:*`,s3_ObjectRemoved_Delete:`s3:ObjectRemoved:Delete`,s3_ObjectRemoved_DeleteMarkerCreated:`s3:ObjectRemoved:DeleteMarkerCreated`,s3_ObjectRestore_:`s3:ObjectRestore:*`,s3_ObjectRestore_Completed:`s3:ObjectRestore:Completed`,s3_ObjectRestore_Delete:`s3:ObjectRestore:Delete`,s3_ObjectRestore_Post:`s3:ObjectRestore:Post`,s3_ObjectTagging_:`s3:ObjectTagging:*`,s3_ObjectTagging_Delete:`s3:ObjectTagging:Delete`,s3_ObjectTagging_Put:`s3:ObjectTagging:Put`,s3_ReducedRedundancyLostObject:`s3:ReducedRedundancyLostObject`,s3_Replication_:`s3:Replication:*`,s3_Replication_OperationFailedReplication:`s3:Replication:OperationFailedReplication`,s3_Replication_OperationMissedThreshold:`s3:Replication:OperationMissedThreshold`,s3_Replication_OperationNotTracked:`s3:Replication:OperationNotTracked`,s3_Replication_OperationReplicatedAfterThreshold:`s3:Replication:OperationReplicatedAfterThreshold`},t.ExistingObjectReplicationStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.ExpirationState={DISABLED:`DISABLED`,ENABLED:`ENABLED`},t.ExpirationStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.ExpressionType={SQL:`SQL`},t.FileHeaderInfo={IGNORE:`IGNORE`,NONE:`NONE`,USE:`USE`},t.FilterRuleName={prefix:`prefix`,suffix:`suffix`},t.GetBucketAbacCommand=je,t.GetBucketAccelerateConfigurationCommand=Me,t.GetBucketAclCommand=Ne,t.GetBucketAnalyticsConfigurationCommand=Pe,t.GetBucketCorsCommand=Fe,t.GetBucketEncryptionCommand=Ie,t.GetBucketIntelligentTieringConfigurationCommand=Le,t.GetBucketInventoryConfigurationCommand=Re,t.GetBucketLifecycleConfigurationCommand=ze,t.GetBucketLocationCommand=Be,t.GetBucketLoggingCommand=Ve,t.GetBucketMetadataConfigurationCommand=He,t.GetBucketMetadataTableConfigurationCommand=Ue,t.GetBucketMetricsConfigurationCommand=We,t.GetBucketNotificationConfigurationCommand=Ge,t.GetBucketOwnershipControlsCommand=Ke,t.GetBucketPolicyCommand=qe,t.GetBucketPolicyStatusCommand=Je,t.GetBucketReplicationCommand=G,t.GetBucketRequestPaymentCommand=Ye,t.GetBucketTaggingCommand=Xe,t.GetBucketVersioningCommand=Ze,t.GetBucketWebsiteCommand=Qe,t.GetObjectAclCommand=$e,t.GetObjectAttributesCommand=et,t.GetObjectCommand=tt,t.GetObjectLegalHoldCommand=nt,t.GetObjectLockConfigurationCommand=rt,t.GetObjectRetentionCommand=it,t.GetObjectTaggingCommand=at,t.GetObjectTorrentCommand=ot,t.GetPublicAccessBlockCommand=st,t.HeadBucketCommand=ct,t.HeadObjectCommand=lt,t.IntelligentTieringAccessTier={ARCHIVE_ACCESS:`ARCHIVE_ACCESS`,DEEP_ARCHIVE_ACCESS:`DEEP_ARCHIVE_ACCESS`},t.IntelligentTieringStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.InventoryConfigurationState={DISABLED:`DISABLED`,ENABLED:`ENABLED`},t.InventoryFormat={CSV:`CSV`,ORC:`ORC`,Parquet:`Parquet`},t.InventoryFrequency={Daily:`Daily`,Weekly:`Weekly`},t.InventoryIncludedObjectVersions={All:`All`,Current:`Current`},t.InventoryOptionalField={BucketKeyStatus:`BucketKeyStatus`,ChecksumAlgorithm:`ChecksumAlgorithm`,ETag:`ETag`,EncryptionStatus:`EncryptionStatus`,IntelligentTieringAccessTier:`IntelligentTieringAccessTier`,IsMultipartUploaded:`IsMultipartUploaded`,LastModifiedDate:`LastModifiedDate`,LifecycleExpirationDate:`LifecycleExpirationDate`,ObjectAccessControlList:`ObjectAccessControlList`,ObjectLockLegalHoldStatus:`ObjectLockLegalHoldStatus`,ObjectLockMode:`ObjectLockMode`,ObjectLockRetainUntilDate:`ObjectLockRetainUntilDate`,ObjectOwner:`ObjectOwner`,ReplicationStatus:`ReplicationStatus`,Size:`Size`,StorageClass:`StorageClass`},t.JSONType={DOCUMENT:`DOCUMENT`,LINES:`LINES`},t.ListBucketAnalyticsConfigurationsCommand=ut,t.ListBucketIntelligentTieringConfigurationsCommand=dt,t.ListBucketInventoryConfigurationsCommand=ft,t.ListBucketMetricsConfigurationsCommand=pt,t.ListBucketsCommand=mt,t.ListDirectoryBucketsCommand=ht,t.ListMultipartUploadsCommand=gt,t.ListObjectVersionsCommand=yt,t.ListObjectsCommand=_t,t.ListObjectsV2Command=vt,t.ListPartsCommand=bt,t.LocationType={AvailabilityZone:`AvailabilityZone`,LocalZone:`LocalZone`},t.MFADelete={Disabled:`Disabled`,Enabled:`Enabled`},t.MFADeleteStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.MetadataDirective={COPY:`COPY`,REPLACE:`REPLACE`},t.MetricsStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.ObjectAttributes={CHECKSUM:`Checksum`,ETAG:`ETag`,OBJECT_PARTS:`ObjectParts`,OBJECT_SIZE:`ObjectSize`,STORAGE_CLASS:`StorageClass`},t.ObjectCannedACL={authenticated_read:`authenticated-read`,aws_exec_read:`aws-exec-read`,bucket_owner_full_control:`bucket-owner-full-control`,bucket_owner_read:`bucket-owner-read`,private:`private`,public_read:`public-read`,public_read_write:`public-read-write`},t.ObjectLockEnabled={Enabled:`Enabled`},t.ObjectLockLegalHoldStatus={OFF:`OFF`,ON:`ON`},t.ObjectLockMode={COMPLIANCE:`COMPLIANCE`,GOVERNANCE:`GOVERNANCE`},t.ObjectLockRetentionMode={COMPLIANCE:`COMPLIANCE`,GOVERNANCE:`GOVERNANCE`},t.ObjectOwnership={BucketOwnerEnforced:`BucketOwnerEnforced`,BucketOwnerPreferred:`BucketOwnerPreferred`,ObjectWriter:`ObjectWriter`},t.ObjectStorageClass={DEEP_ARCHIVE:`DEEP_ARCHIVE`,EXPRESS_ONEZONE:`EXPRESS_ONEZONE`,FSX_ONTAP:`FSX_ONTAP`,FSX_OPENZFS:`FSX_OPENZFS`,GLACIER:`GLACIER`,GLACIER_IR:`GLACIER_IR`,INTELLIGENT_TIERING:`INTELLIGENT_TIERING`,ONEZONE_IA:`ONEZONE_IA`,OUTPOSTS:`OUTPOSTS`,REDUCED_REDUNDANCY:`REDUCED_REDUNDANCY`,SNOW:`SNOW`,STANDARD:`STANDARD`,STANDARD_IA:`STANDARD_IA`},t.ObjectVersionStorageClass={STANDARD:`STANDARD`},t.OptionalObjectAttributes={RESTORE_STATUS:`RestoreStatus`},t.OwnerOverride={Destination:`Destination`},t.PartitionDateSource={DeliveryTime:`DeliveryTime`,EventTime:`EventTime`},t.Payer={BucketOwner:`BucketOwner`,Requester:`Requester`},t.Permission={FULL_CONTROL:`FULL_CONTROL`,READ:`READ`,READ_ACP:`READ_ACP`,WRITE:`WRITE`,WRITE_ACP:`WRITE_ACP`},t.Protocol={http:`http`,https:`https`},t.PutBucketAbacCommand=xt,t.PutBucketAccelerateConfigurationCommand=St,t.PutBucketAclCommand=Ct,t.PutBucketAnalyticsConfigurationCommand=wt,t.PutBucketCorsCommand=Tt,t.PutBucketEncryptionCommand=Et,t.PutBucketIntelligentTieringConfigurationCommand=Dt,t.PutBucketInventoryConfigurationCommand=Ot,t.PutBucketLifecycleConfigurationCommand=kt,t.PutBucketLoggingCommand=At,t.PutBucketMetricsConfigurationCommand=jt,t.PutBucketNotificationConfigurationCommand=Mt,t.PutBucketOwnershipControlsCommand=Nt,t.PutBucketPolicyCommand=Pt,t.PutBucketReplicationCommand=Ft,t.PutBucketRequestPaymentCommand=It,t.PutBucketTaggingCommand=Lt,t.PutBucketVersioningCommand=Rt,t.PutBucketWebsiteCommand=zt,t.PutObjectAclCommand=Bt,t.PutObjectCommand=Vt,t.PutObjectLegalHoldCommand=Ht,t.PutObjectLockConfigurationCommand=Ut,t.PutObjectRetentionCommand=Wt,t.PutObjectTaggingCommand=Gt,t.PutPublicAccessBlockCommand=Kt,t.QuoteFields={ALWAYS:`ALWAYS`,ASNEEDED:`ASNEEDED`},t.RenameObjectCommand=qt,t.ReplicaModificationsStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.ReplicationRuleStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.ReplicationStatus={COMPLETE:`COMPLETE`,COMPLETED:`COMPLETED`,FAILED:`FAILED`,PENDING:`PENDING`,REPLICA:`REPLICA`},t.ReplicationTimeStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.RequestCharged={requester:`requester`},t.RequestPayer={requester:`requester`},t.RestoreObjectCommand=Jt,t.RestoreRequestType={SELECT:`SELECT`},t.S3=Sn,t.S3Client=oe,t.S3TablesBucketType={aws:`aws`,customer:`customer`},t.SelectObjectContentCommand=Yt,t.ServerSideEncryption={AES256:`AES256`,aws_fsx:`aws:fsx`,aws_kms:`aws:kms`,aws_kms_dsse:`aws:kms:dsse`},t.SessionMode={ReadOnly:`ReadOnly`,ReadWrite:`ReadWrite`},t.SseKmsEncryptedObjectsStatus={Disabled:`Disabled`,Enabled:`Enabled`},t.StorageClass={DEEP_ARCHIVE:`DEEP_ARCHIVE`,EXPRESS_ONEZONE:`EXPRESS_ONEZONE`,FSX_ONTAP:`FSX_ONTAP`,FSX_OPENZFS:`FSX_OPENZFS`,GLACIER:`GLACIER`,GLACIER_IR:`GLACIER_IR`,INTELLIGENT_TIERING:`INTELLIGENT_TIERING`,ONEZONE_IA:`ONEZONE_IA`,OUTPOSTS:`OUTPOSTS`,REDUCED_REDUNDANCY:`REDUCED_REDUNDANCY`,SNOW:`SNOW`,STANDARD:`STANDARD`,STANDARD_IA:`STANDARD_IA`},t.StorageClassAnalysisSchemaVersion={V_1:`V_1`},t.TableSseAlgorithm={AES256:`AES256`,aws_kms:`aws:kms`},t.TaggingDirective={COPY:`COPY`,REPLACE:`REPLACE`},t.Tier={Bulk:`Bulk`,Expedited:`Expedited`,Standard:`Standard`},t.TransitionDefaultMinimumObjectSize={all_storage_classes_128K:`all_storage_classes_128K`,varies_by_storage_class:`varies_by_storage_class`},t.TransitionStorageClass={DEEP_ARCHIVE:`DEEP_ARCHIVE`,GLACIER:`GLACIER`,GLACIER_IR:`GLACIER_IR`,INTELLIGENT_TIERING:`INTELLIGENT_TIERING`,ONEZONE_IA:`ONEZONE_IA`,STANDARD_IA:`STANDARD_IA`},t.Type={AmazonCustomerByEmail:`AmazonCustomerByEmail`,CanonicalUser:`CanonicalUser`,Group:`Group`},t.UpdateBucketMetadataInventoryTableConfigurationCommand=Xt,t.UpdateBucketMetadataJournalTableConfigurationCommand=Zt,t.UpdateObjectEncryptionCommand=Qt,t.UploadPartCommand=$t,t.UploadPartCopyCommand=en,t.WriteGetObjectResponseCommand=tn,t.paginateListBuckets=nn,t.paginateListDirectoryBuckets=rn,t.paginateListObjectsV2=an,t.paginateListParts=on,t.waitForBucketExists=cn,t.waitForBucketNotExists=dn,t.waitForObjectExists=mn,t.waitForObjectNotExists=_n,t.waitUntilBucketExists=ln,t.waitUntilBucketNotExists=fn,t.waitUntilObjectExists=hn,t.waitUntilObjectNotExists=vn,Object.prototype.hasOwnProperty.call(T,`__proto__`)&&!Object.prototype.hasOwnProperty.call(t,`__proto__`)&&Object.defineProperty(t,`__proto__`,{enumerable:!0,value:T.__proto__}),Object.keys(T).forEach(function(e){e!==`default`&&!Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=T[e])}),Object.prototype.hasOwnProperty.call(R,`__proto__`)&&!Object.prototype.hasOwnProperty.call(t,`__proto__`)&&Object.defineProperty(t,`__proto__`,{enumerable:!0,value:R.__proto__}),Object.keys(R).forEach(function(e){e!==`default`&&!Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=R[e])})}))();function nA(e){return e.replaceAll(/X-Amz-[A-Za-z0-9-]+=[^&\s]+/g,`X-Amz-REDACTED=[REDACTED]`).replaceAll(/Authorization([:=]\s*)(Bearer\s+)?[^,\s]+/gi,`Authorization$1$2[REDACTED]`).slice(0,500)}function rA(e,t,n){let r=typeof n==`object`&&n&&`Code`in n?String(n.Code):void 0,i=n instanceof Error?n.name:`UnknownError`,a=typeof n==`object`&&n&&`$metadata`in n&&typeof n.$metadata==`object`&&n.$metadata!=null&&`httpStatusCode`in n.$metadata?Number(n.$metadata.httpStatusCode):void 0,o=nA(n instanceof Error?n.message:String(n));return e.warning(`Object store ${t} failed`,{errorCode:r,errorName:i,httpStatusCode:a,message:o}),qO(`Object store ${t} failed: ${o}`)}function iA(e){return e.region.length>0?e.region:void 0}function aA(e){let t=iA(e);return e.endpoint==null?new tA.S3Client({maxAttempts:3,region:t}):new tA.S3Client({endpoint:e.endpoint,forcePathStyle:!0,maxAttempts:3,region:t})}function oA(e){return e.sseEncryption==null?e.endpoint==null?`aws:kms`:`AES256`:e.sseEncryption}function sA(e,t){let n=aA(e),r=oA(e);return{upload:async(i,a)=>{t.debug(`Uploading object store file`,{key:i,localPath:a});try{let o={Body:G.createReadStream(a),Bucket:e.bucket,ExpectedBucketOwner:e.expectedBucketOwner,Key:i,ServerSideEncryption:r};r===`aws:kms`&&e.sseKmsKeyId!=null&&(o.SSEKMSKeyId=e.sseKmsKeyId);let s=new tA.PutObjectCommand({...o});return await n.send(s),t.info(`Uploaded object store file`,{key:i}),HO(void 0)}catch(e){return UO(rA(t,`upload`,e))}},download:async(r,i)=>{t.debug(`Downloading object store file`,{key:r,localPath:i});try{await Re.mkdir(ze.dirname(i),{recursive:!0});let a=await n.send(new tA.GetObjectCommand({Bucket:e.bucket,ExpectedBucketOwner:e.expectedBucketOwner,Key:r}));return a.Body instanceof W?(await Xe(a.Body,G.createWriteStream(i)),t.info(`Downloaded object store file`,{key:r,localPath:i}),HO(void 0)):UO(qO(`Object store download failed: response body was not readable`))}catch(e){return UO(rA(t,`download`,e))}},list:async r=>{t.debug(`Listing object store keys`,{prefix:r});try{let i=[],a,o=0;do{if(o>=100){t.warning(`Object store list hit iteration cap, truncating result`,{prefix:r,maxIterations:100,keysReturned:i.length});break}o++;let s=await n.send(new tA.ListObjectsV2Command({Bucket:e.bucket,ContinuationToken:a,ExpectedBucketOwner:e.expectedBucketOwner,Prefix:r}));for(let e of s.Contents??[])e.Key!=null&&i.push(e.Key);a=s.IsTruncated===!0?s.NextContinuationToken:void 0}while(a!=null);return t.info(`Listed object store keys`,{count:i.length,prefix:r}),HO(i)}catch(e){return UO(rA(t,`list`,e))}}}}function cA(e){return e.replaceAll(`/`,`-`)}function lA(e){let{agentIdentity:t,repo:n,ref:r,os:i}=e;return`${Ni}-${t}-${cA(n)}-${r}-${i}`}function uA(e){let{agentIdentity:t,repo:n,ref:r}=e,i=cA(n);return[`${Ni}-${t}-${i}-${r}-`,`${Ni}-${t}-${i}-`]}function dA(e,t){return`${lA(e)}-${t}`}function fA(){return{agentIdentity:`github`,repo:Wi(),ref:Gi(),os:Ui()}}function pA(){let e=se.env.XDG_DATA_HOME??ze.join(Be.homedir(),`.local`,`share`);return ze.join(e,`opencode`,`opencode.db`)}async function mA(e){if(e!=null)return hA(e,`1.2.0`)>=0;try{return await Re.access(pA()),!0}catch{return!1}}function hA(e,t){let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number);for(let e=0;e<3;e++){let t=(n[e]??0)-(r[e]??0);if(t!==0)return t}return 0}function gA(e,t){let n=ze.resolve(e),r=ze.resolve(t);return n.startsWith(r+ze.sep)}async function _A(e,t,n){if(!gA(e,t)){n.debug(`auth.json is outside storage path - skipping deletion`,{authPath:e,storagePath:t});return}try{await Re.unlink(e),n.debug(`Deleted auth.json from cache storage`)}catch(e){e.code!==`ENOENT`&&n.warning(`Failed to delete auth.json`,{error:yi(e)})}}async function vA(e,t,n){let r=[e];if(t!=null&&r.push(t),await mA(n??null)){let t=ze.join(ze.dirname(e),`opencode.db`);r.push(t,`${t}-wal`,`${t}-shm`)}return r}async function yA(e,t,n){let r=[e];if(t!=null&&r.push(t),await mA(n??null)){let t=ze.join(ze.dirname(e),`opencode.db`);r.push(t);for(let e of[`-wal`,`-shm`])try{await Re.access(`${t}${e}`),r.push(`${t}${e}`)}catch{}}return r}function bA(){return{restoreCache:async(e,t,n)=>IO(e,t,n),saveCache:async(e,t)=>zO(e,t)}}const xA=bA();async function SA(e,t){try{return(await Re.stat(e)).isDirectory()===!1?!0:(await Re.readdir(e),!1)}catch{return t.debug(`Storage path not accessible - treating as corrupted`),!0}}async function CA(e,t){let n=ze.join(e,`.version`);try{let e=await Re.readFile(n,`utf8`),r=Number.parseInt(e.trim(),10);return r===1?!0:(t.info(`Storage version mismatch`,{expected:1,found:r}),!1)}catch{return t.debug(`No version file found - treating as compatible`),!0}}async function wA(e){try{await Re.rm(e,{recursive:!0,force:!0}),await Re.mkdir(e,{recursive:!0})}catch{}}async function TA(e){let{storeConfig:t,storeAdapter:n,logger:r,storagePath:i,components:a}=e;if(t?.enabled!==!0)return{hit:!1,key:null,restoredPath:null,corrupted:!1,source:null};let o=await mk(n??sA(t,r),t,a.agentIdentity,a.repo,i,r);return o.mainDbRestored===!0?(await Re.mkdir(i,{recursive:!0}),{hit:!0,key:null,restoredPath:i,corrupted:!1,source:`storage`}):(o.downloaded>0&&r.warning(`Object store returned session sidecar files without main DB - treating as miss`,{downloaded:o.downloaded,failed:o.failed}),{hit:!1,key:null,restoredPath:null,corrupted:!1,source:null})}async function EA(e,t){let n=await TA(e);return n.hit===!0?n:{hit:!1,key:t,restoredPath:null,corrupted:!0,source:null}}async function DA(e){let{components:t,logger:n,storagePath:r,authPath:i,projectIdPath:a,opencodeVersion:o,cacheAdapter:s=xA}=e;if(se.env.SKIP_CACHE===`true`)return n.debug(`Skipping cache restore (SKIP_CACHE=true)`),await Re.mkdir(r,{recursive:!0}),{hit:!1,key:null,restoredPath:null,corrupted:!1,source:null};let c=lA(t),l=uA(t),u=await vA(r,a,o);n.info(`Restoring cache`,{primaryKey:c,restoreKeys:[...l],paths:u});try{let t=await s.restoreCache(u,c,[...l]);return t==null?(n.info(`Cache miss - starting with fresh state`),await Re.mkdir(r,{recursive:!0}),await TA(e)):(n.info(`Cache restored`,{restoredKey:t}),await SA(r,n)===!0?(n.warning(`Cache corruption detected - proceeding with clean state`),await wA(r),await EA(e,t)):await CA(r,n)===!1?(n.warning(`Storage version mismatch - proceeding with clean state`),await wA(r),await EA(e,t)):(await _A(i,r,n),{hit:!0,key:t,restoredPath:r,corrupted:!1,source:`cache`}))}catch(t){return n.warning(`Cache restore failed`,{error:yi(t)}),TA(e)}}async function OA(e){let t=ze.join(e,`.version`);await Re.mkdir(e,{recursive:!0}),await Re.writeFile(t,`1`,`utf8`)}async function kA(e){try{return(await Re.readdir(e)).length>0}catch{return!1}}async function AA(e){let{components:t,runId:n,logger:r,storagePath:i,authPath:a,projectIdPath:o,opencodeVersion:s,cacheAdapter:c=xA}=e;if(se.env.SKIP_CACHE===`true`)return r.debug(`Skipping cache save (SKIP_CACHE=true)`),!0;let l=dA(t,n),u=await yA(i,o,s);r.info(`Saving cache`,{saveKey:l,paths:u});try{if(await _A(a,i,r),await kA(i)===!1)return r.info(`No storage content to cache`),!1;if(await OA(i),e.storeConfig?.enabled===!0)try{let n=await pk(e.storeAdapter??sA(e.storeConfig,r),e.storeConfig,t.agentIdentity,t.repo,i,r);r.info(`Object store session sync completed`,n)}catch(e){r.warning(`Object store session sync failed (non-fatal)`,{error:yi(e)})}return await c.saveCache(u,l),r.info(`Cache saved`,{saveKey:l}),!0}catch(e){return e instanceof Error&&e.message.includes(`already exists`)?(r.info(`Cache key already exists, skipping save`),!0):(r.warning(`Cache save failed`,{error:yi(e)}),!1)}}function jA(){return 8*1024*1024}function MA(){let e=process.env.ACTIONS_RUNTIME_TOKEN;if(!e)throw Error(`Unable to get the ACTIONS_RUNTIME_TOKEN env variable`);return e}function NA(){let e=process.env.ACTIONS_RESULTS_URL;if(!e)throw Error(`Unable to get the ACTIONS_RESULTS_URL env variable`);return new URL(e).origin}function PA(){let e=new URL(process.env.GITHUB_SERVER_URL||`https://github.com`).hostname.trimEnd().toUpperCase(),t=e===`GITHUB.COM`,n=e.endsWith(`.GHE.COM`),r=e.endsWith(`.LOCALHOST`);return!t&&!n&&!r}function FA(){let e=process.env.GITHUB_WORKSPACE;if(!e)throw Error(`Unable to get the GITHUB_WORKSPACE env variable`);return e}function IA(){let e=le.cpus().length,t=32;if(e>4){let n=16*e;t=n>300?300:n}let n=process.env.ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY;if(n){let e=parseInt(n);if(isNaN(e)||e<1)throw Error(`Invalid value set for ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY env variable`);return eDate.parse(`9999-12-31T23:59:59Z`))throw Error(`Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.`);if(e.nanos<0)throw Error(`Unable to encode invalid Timestamp to JSON. Nanos must not be negative.`);let r=`Z`;if(e.nanos>0){let t=(e.nanos+1e9).toString().substring(1);r=t.substring(3)===`000000`?`.`+t.substring(0,3)+`Z`:t.substring(6)===`000`?`.`+t.substring(0,6)+`Z`:`.`+t+`Z`}return new Date(n).toISOString().replace(`.000Z`,r)}internalJsonRead(e,t,n){if(typeof e!=`string`)throw Error(`Unable to parse Timestamp from JSON `+(0,$.typeofJsonValue)(e)+`.`);let r=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!r)throw Error(`Unable to parse Timestamp from JSON. Invalid format.`);let i=Date.parse(r[1]+`-`+r[2]+`-`+r[3]+`T`+r[4]+`:`+r[5]+`:`+r[6]+(r[8]?r[8]:`Z`));if(Number.isNaN(i))throw Error(`Unable to parse Timestamp from JSON. Invalid value.`);if(iDate.parse(`9999-12-31T23:59:59Z`))throw new globalThis.Error(`Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.`);return n||=this.create(),n.seconds=$.PbLong.from(i/1e3).toString(),n.nanos=0,r[7]&&(n.nanos=parseInt(`1`+r[7]+`0`.repeat(9-r[7].length))-1e9),n}create(e){let t={seconds:`0`,nanos:0};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.poszA},{no:5,name:`version`,kind:`scalar`,T:5},{no:6,name:`mime_type`,kind:`message`,T:()=>VA}])}create(e){let t={workflowRunBackendId:``,workflowJobRunBackendId:``,name:``,version:0};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posVA}])}create(e){let t={workflowRunBackendId:``,workflowJobRunBackendId:``,name:``,size:`0`};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posVA},{no:4,name:`id_filter`,kind:`message`,T:()=>BA}])}create(e){let t={workflowRunBackendId:``,workflowJobRunBackendId:``};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posJA}])}create(e){let t={artifacts:[]};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.poszA},{no:7,name:`digest`,kind:`message`,T:()=>VA}])}create(e){let t={workflowRunBackendId:``,workflowJobRunBackendId:``,databaseId:`0`,name:``,size:`0`};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posUA.fromJson(e,{ignoreUnknownFields:!0}))}FinalizeArtifact(e){let t=WA.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request(`github.actions.results.api.v1.ArtifactService`,`FinalizeArtifact`,`application/json`,t).then(e=>GA.fromJson(e,{ignoreUnknownFields:!0}))}ListArtifacts(e){let t=KA.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request(`github.actions.results.api.v1.ArtifactService`,`ListArtifacts`,`application/json`,t).then(e=>qA.fromJson(e,{ignoreUnknownFields:!0}))}GetSignedArtifactURL(e){let t=YA.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request(`github.actions.results.api.v1.ArtifactService`,`GetSignedArtifactURL`,`application/json`,t).then(e=>XA.fromJson(e,{ignoreUnknownFields:!0}))}DeleteArtifact(e){let t=ZA.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request(`github.actions.results.api.v1.ArtifactService`,`DeleteArtifact`,`application/json`,t).then(e=>QA.fromJson(e,{ignoreUnknownFields:!0}))}};function ej(e){if(!e)return;let t=tj();t&&t`,` Greater than >`],[`|`,` Vertical bar |`],[`*`,` Asterisk *`],[`?`,` Question mark ?`],[`\r`,` Carriage return \\r`],[` -`,` Line feed \\n`]]),rj=new Map([...nj,[`\\`,` Backslash \\`],[`/`,` Forward slash /`]]);function ij(e){if(!e)throw Error(`Provided artifact name input during validation is empty`);for(let[t,n]of rj)if(e.includes(t))throw Error(`The artifact name is not valid: ${e}. Contains the following character: ${n} +`+r(t)+i(t),o=Pe(`sha256`,e.accountKey).update(a,`utf8`).digest(`base64`);t.headers.set(rb.AUTHORIZATION,`SharedKey ${e.accountName}:${o}`)}function n(e,t){let n=e.headers.get(t);return!n||t===rb.CONTENT_LENGTH&&n===`0`?``:n}function r(e){let t=[];for(let[n,r]of e.headers)n.toLowerCase().startsWith(rb.PREFIX_FOR_STORAGE)&&t.push({name:n,value:r});t.sort((e,t)=>vb(e.name.toLowerCase(),t.name.toLowerCase())),t=t.filter((e,t,n)=>!(t>0&&e.name.toLowerCase()===n[t-1].name.toLowerCase()));let n=``;return t.forEach(e=>{n+=`${e.name.toLowerCase().trimRight()}:${e.value.trimLeft()}\n`}),n}function i(t){let n=ob(t.url)||`/`,r=``;r+=`/${e.accountName}${n}`;let i=sb(t.url),a={};if(i){let e=[];for(let t in i)if(Object.prototype.hasOwnProperty.call(i,t)){let n=t.toLowerCase();a[n]=i[t],e.push(n)}e.sort();for(let t of e)r+=`\n${t}:${decodeURIComponent(a[t])}`}return r}return{name:`storageSharedKeyCredentialPolicy`,async sendRequest(e,n){return t(e),n(e)}}}function Fb(){return{name:`storageRequestFailureDetailsParserPolicy`,async sendRequest(e,t){try{return await t(e)}catch(e){throw typeof e==`object`&&e&&e.response&&e.response.parsedBody&&e.response.parsedBody.code===`InvalidHeaderValue`&&e.response.parsedBody.HeaderName===`x-ms-version`&&(e.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. +`),e}}}}var Ib=class{accountName;userDelegationKey;key;constructor(e,t){this.accountName=e,this.userDelegationKey=t,this.key=Buffer.from(t.value,`base64`)}computeHMACSHA256(e){return Pe(`sha256`,this.key).update(e,`utf8`).digest(`base64`)}};const Lb=`12.31.0`,Rb=`2026-02-06`,zb=5e4,Bb=4*1024*1024,Vb={Parameters:{FORCE_BROWSER_NO_CACHE:`_`,SIGNATURE:`sig`,SNAPSHOT:`snapshot`,VERSIONID:`versionid`,TIMEOUT:`timeout`}},Hb=`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`.split(`.`),Ub=`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`.split(`.`),Wb=[`10000`,`10001`,`10002`,`10003`,`10004`,`10100`,`10101`,`10102`,`10103`,`10104`,`11000`,`11001`,`11002`,`11003`,`11004`,`11100`,`11101`,`11102`,`11103`,`11104`];function Gb(e){if(!e||typeof e!=`object`)return!1;let t=e;return Array.isArray(t.factories)&&typeof t.options==`object`&&typeof t.toServiceClientOptions==`function`}var Kb=class{factories;options;constructor(e,t={}){this.factories=e,this.options=t}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function qb(e,t={}){e||=new mb;let n=new Kb([],t);return n._credential=e,n}function Jb(e){let t=[Qb,Zb,$b,ex,tx,nx,ix];if(e.factories.length){let n=e.factories.filter(e=>!t.some(t=>t(e)));if(n.length){let e=n.some(e=>rx(e));return{wrappedPolicies:M_(n),afterRetry:e}}}}function Yb(e){let{httpClient:t,...n}=e.options,r=e._coreHttpClient;r||(r=t?N_(t):eb(),e._coreHttpClient=r);let i=e._corePipeline;if(!i){let t=`azsdk-js-azure-storage-blob/${Lb}`,r=n.userAgentOptions&&n.userAgentOptions.userAgentPrefix?`${n.userAgentOptions.userAgentPrefix} ${t}`:`${t}`;i=Yg({...n,loggingOptions:{additionalAllowedHeaderNames:Hb,additionalAllowedQueryParameters:Ub,logger:Jy.info},userAgentOptions:{userAgentPrefix:r},serializationOptions:{stringifyXML:Ky,serializerOptions:{xml:{xmlCharKey:`#`}}},deserializationOptions:{parseXML:qy,serializerOptions:{xml:{xmlCharKey:`#`}}}}),i.removePolicy({phase:`Retry`}),i.removePolicy({name:`decompressResponsePolicy`}),i.addPolicy(kb()),i.addPolicy(Nb(n.retryOptions),{phase:`Retry`}),i.addPolicy(Fb()),i.addPolicy(Ob());let a=Jb(e);a&&i.addPolicy(a.wrappedPolicies,a.afterRetry?{afterPhase:`Retry`}:void 0);let o=Xb(e);zh(o)?i.addPolicy(Ih({credential:o,scopes:n.audience??`https://storage.azure.com/.default`,challengeCallbacks:{authorizeRequestOnChallenge:p_}}),{phase:`Sign`}):o instanceof xb&&i.addPolicy(Pb({accountName:o.accountName,accountKey:o.accountKey}),{phase:`Sign`}),e._corePipeline=i}return{...n,allowInsecureConnection:!0,httpClient:r,pipeline:i}}function Xb(e){if(e._credential)return e._credential;let t=new mb;for(let n of e.factories)if(zh(n.credential))t=n.credential;else if(Zb(n))return n;return t}function Zb(e){return e instanceof xb?!0:e.constructor.name===`StorageSharedKeyCredential`}function Qb(e){return e instanceof mb?!0:e.constructor.name===`AnonymousCredential`}function $b(e){return zh(e.credential)}function ex(e){return e instanceof ub?!0:e.constructor.name===`StorageBrowserPolicyFactory`}function tx(e){return e instanceof Db?!0:e.constructor.name===`StorageRetryPolicyFactory`}function nx(e){return e.constructor.name===`TelemetryPolicyFactory`}function rx(e){return e.constructor.name===`InjectorPolicyFactory`}function ix(e){let t=[`GenerateClientRequestIdPolicy`,`TracingPolicy`,`LogPolicy`,`ProxyPolicy`,`DisableResponseDecompressionPolicy`,`KeepAlivePolicy`,`DeserializationPolicy`],n=e.create({sendRequest:async e=>({request:e,headers:e.headers.clone(),status:500})},{log(e,t){},shouldLog(e){return!1}}).constructor.name;return t.some(e=>n.startsWith(e))}var ax=r({AccessPolicy:()=>Tx,AppendBlobAppendBlockExceptionHeaders:()=>ow,AppendBlobAppendBlockFromUrlExceptionHeaders:()=>cw,AppendBlobAppendBlockFromUrlHeaders:()=>sw,AppendBlobAppendBlockHeaders:()=>aw,AppendBlobCreateExceptionHeaders:()=>iw,AppendBlobCreateHeaders:()=>rw,AppendBlobSealExceptionHeaders:()=>uw,AppendBlobSealHeaders:()=>lw,ArrowConfiguration:()=>Gx,ArrowField:()=>Kx,BlobAbortCopyFromURLExceptionHeaders:()=>OC,BlobAbortCopyFromURLHeaders:()=>DC,BlobAcquireLeaseExceptionHeaders:()=>fC,BlobAcquireLeaseHeaders:()=>dC,BlobBreakLeaseExceptionHeaders:()=>bC,BlobBreakLeaseHeaders:()=>yC,BlobChangeLeaseExceptionHeaders:()=>vC,BlobChangeLeaseHeaders:()=>_C,BlobCopyFromURLExceptionHeaders:()=>EC,BlobCopyFromURLHeaders:()=>TC,BlobCreateSnapshotExceptionHeaders:()=>SC,BlobCreateSnapshotHeaders:()=>xC,BlobDeleteExceptionHeaders:()=>XS,BlobDeleteHeaders:()=>YS,BlobDeleteImmutabilityPolicyExceptionHeaders:()=>oC,BlobDeleteImmutabilityPolicyHeaders:()=>aC,BlobDownloadExceptionHeaders:()=>KS,BlobDownloadHeaders:()=>GS,BlobFlatListSegment:()=>Dx,BlobGetAccountInfoExceptionHeaders:()=>MC,BlobGetAccountInfoHeaders:()=>jC,BlobGetPropertiesExceptionHeaders:()=>JS,BlobGetPropertiesHeaders:()=>qS,BlobGetTagsExceptionHeaders:()=>IC,BlobGetTagsHeaders:()=>FC,BlobHierarchyListSegment:()=>Mx,BlobItemInternal:()=>Ox,BlobName:()=>kx,BlobPrefix:()=>Nx,BlobPropertiesInternal:()=>Ax,BlobQueryExceptionHeaders:()=>PC,BlobQueryHeaders:()=>NC,BlobReleaseLeaseExceptionHeaders:()=>mC,BlobReleaseLeaseHeaders:()=>pC,BlobRenewLeaseExceptionHeaders:()=>gC,BlobRenewLeaseHeaders:()=>hC,BlobServiceProperties:()=>ox,BlobServiceStatistics:()=>px,BlobSetExpiryExceptionHeaders:()=>eC,BlobSetExpiryHeaders:()=>$S,BlobSetHttpHeadersExceptionHeaders:()=>nC,BlobSetHttpHeadersHeaders:()=>tC,BlobSetImmutabilityPolicyExceptionHeaders:()=>iC,BlobSetImmutabilityPolicyHeaders:()=>rC,BlobSetLegalHoldExceptionHeaders:()=>cC,BlobSetLegalHoldHeaders:()=>sC,BlobSetMetadataExceptionHeaders:()=>uC,BlobSetMetadataHeaders:()=>lC,BlobSetTagsExceptionHeaders:()=>RC,BlobSetTagsHeaders:()=>LC,BlobSetTierExceptionHeaders:()=>AC,BlobSetTierHeaders:()=>kC,BlobStartCopyFromURLExceptionHeaders:()=>wC,BlobStartCopyFromURLHeaders:()=>CC,BlobTag:()=>Cx,BlobTags:()=>Sx,BlobUndeleteExceptionHeaders:()=>QS,BlobUndeleteHeaders:()=>ZS,Block:()=>Ix,BlockBlobCommitBlockListExceptionHeaders:()=>bw,BlockBlobCommitBlockListHeaders:()=>yw,BlockBlobGetBlockListExceptionHeaders:()=>Sw,BlockBlobGetBlockListHeaders:()=>xw,BlockBlobPutBlobFromUrlExceptionHeaders:()=>mw,BlockBlobPutBlobFromUrlHeaders:()=>pw,BlockBlobStageBlockExceptionHeaders:()=>gw,BlockBlobStageBlockFromURLExceptionHeaders:()=>vw,BlockBlobStageBlockFromURLHeaders:()=>_w,BlockBlobStageBlockHeaders:()=>hw,BlockBlobUploadExceptionHeaders:()=>fw,BlockBlobUploadHeaders:()=>dw,BlockList:()=>Fx,BlockLookupList:()=>Px,ClearRange:()=>zx,ContainerAcquireLeaseExceptionHeaders:()=>AS,ContainerAcquireLeaseHeaders:()=>kS,ContainerBreakLeaseExceptionHeaders:()=>IS,ContainerBreakLeaseHeaders:()=>FS,ContainerChangeLeaseExceptionHeaders:()=>RS,ContainerChangeLeaseHeaders:()=>LS,ContainerCreateExceptionHeaders:()=>uS,ContainerCreateHeaders:()=>lS,ContainerDeleteExceptionHeaders:()=>mS,ContainerDeleteHeaders:()=>pS,ContainerFilterBlobsExceptionHeaders:()=>OS,ContainerFilterBlobsHeaders:()=>DS,ContainerGetAccessPolicyExceptionHeaders:()=>vS,ContainerGetAccessPolicyHeaders:()=>_S,ContainerGetAccountInfoExceptionHeaders:()=>WS,ContainerGetAccountInfoHeaders:()=>US,ContainerGetPropertiesExceptionHeaders:()=>fS,ContainerGetPropertiesHeaders:()=>dS,ContainerItem:()=>gx,ContainerListBlobFlatSegmentExceptionHeaders:()=>BS,ContainerListBlobFlatSegmentHeaders:()=>zS,ContainerListBlobHierarchySegmentExceptionHeaders:()=>HS,ContainerListBlobHierarchySegmentHeaders:()=>VS,ContainerProperties:()=>_x,ContainerReleaseLeaseExceptionHeaders:()=>MS,ContainerReleaseLeaseHeaders:()=>jS,ContainerRenameExceptionHeaders:()=>wS,ContainerRenameHeaders:()=>CS,ContainerRenewLeaseExceptionHeaders:()=>PS,ContainerRenewLeaseHeaders:()=>NS,ContainerRestoreExceptionHeaders:()=>SS,ContainerRestoreHeaders:()=>xS,ContainerSetAccessPolicyExceptionHeaders:()=>bS,ContainerSetAccessPolicyHeaders:()=>yS,ContainerSetMetadataExceptionHeaders:()=>gS,ContainerSetMetadataHeaders:()=>hS,ContainerSubmitBatchExceptionHeaders:()=>ES,ContainerSubmitBatchHeaders:()=>TS,CorsRule:()=>ux,DelimitedTextConfiguration:()=>Ux,FilterBlobItem:()=>xx,FilterBlobSegment:()=>bx,GeoReplication:()=>mx,JsonTextConfiguration:()=>Wx,KeyInfo:()=>vx,ListBlobsFlatSegmentResponse:()=>Ex,ListBlobsHierarchySegmentResponse:()=>jx,ListContainersSegmentResponse:()=>hx,Logging:()=>sx,Metrics:()=>lx,PageBlobClearPagesExceptionHeaders:()=>WC,PageBlobClearPagesHeaders:()=>UC,PageBlobCopyIncrementalExceptionHeaders:()=>nw,PageBlobCopyIncrementalHeaders:()=>tw,PageBlobCreateExceptionHeaders:()=>BC,PageBlobCreateHeaders:()=>zC,PageBlobGetPageRangesDiffExceptionHeaders:()=>XC,PageBlobGetPageRangesDiffHeaders:()=>YC,PageBlobGetPageRangesExceptionHeaders:()=>JC,PageBlobGetPageRangesHeaders:()=>qC,PageBlobResizeExceptionHeaders:()=>QC,PageBlobResizeHeaders:()=>ZC,PageBlobUpdateSequenceNumberExceptionHeaders:()=>ew,PageBlobUpdateSequenceNumberHeaders:()=>$C,PageBlobUploadPagesExceptionHeaders:()=>HC,PageBlobUploadPagesFromURLExceptionHeaders:()=>KC,PageBlobUploadPagesFromURLHeaders:()=>GC,PageBlobUploadPagesHeaders:()=>VC,PageList:()=>Lx,PageRange:()=>Rx,QueryFormat:()=>Hx,QueryRequest:()=>Bx,QuerySerialization:()=>Vx,RetentionPolicy:()=>cx,ServiceFilterBlobsExceptionHeaders:()=>cS,ServiceFilterBlobsHeaders:()=>sS,ServiceGetAccountInfoExceptionHeaders:()=>iS,ServiceGetAccountInfoHeaders:()=>rS,ServiceGetPropertiesExceptionHeaders:()=>Xx,ServiceGetPropertiesHeaders:()=>Yx,ServiceGetStatisticsExceptionHeaders:()=>Qx,ServiceGetStatisticsHeaders:()=>Zx,ServiceGetUserDelegationKeyExceptionHeaders:()=>nS,ServiceGetUserDelegationKeyHeaders:()=>tS,ServiceListContainersSegmentExceptionHeaders:()=>eS,ServiceListContainersSegmentHeaders:()=>$x,ServiceSetPropertiesExceptionHeaders:()=>Jx,ServiceSetPropertiesHeaders:()=>qx,ServiceSubmitBatchExceptionHeaders:()=>oS,ServiceSubmitBatchHeaders:()=>aS,SignedIdentifier:()=>wx,StaticWebsite:()=>dx,StorageError:()=>fx,UserDelegationKey:()=>yx});const ox={serializedName:`BlobServiceProperties`,xmlName:`StorageServiceProperties`,type:{name:`Composite`,className:`BlobServiceProperties`,modelProperties:{blobAnalyticsLogging:{serializedName:`Logging`,xmlName:`Logging`,type:{name:`Composite`,className:`Logging`}},hourMetrics:{serializedName:`HourMetrics`,xmlName:`HourMetrics`,type:{name:`Composite`,className:`Metrics`}},minuteMetrics:{serializedName:`MinuteMetrics`,xmlName:`MinuteMetrics`,type:{name:`Composite`,className:`Metrics`}},cors:{serializedName:`Cors`,xmlName:`Cors`,xmlIsWrapped:!0,xmlElementName:`CorsRule`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`CorsRule`}}}},defaultServiceVersion:{serializedName:`DefaultServiceVersion`,xmlName:`DefaultServiceVersion`,type:{name:`String`}},deleteRetentionPolicy:{serializedName:`DeleteRetentionPolicy`,xmlName:`DeleteRetentionPolicy`,type:{name:`Composite`,className:`RetentionPolicy`}},staticWebsite:{serializedName:`StaticWebsite`,xmlName:`StaticWebsite`,type:{name:`Composite`,className:`StaticWebsite`}}}}},sx={serializedName:`Logging`,type:{name:`Composite`,className:`Logging`,modelProperties:{version:{serializedName:`Version`,required:!0,xmlName:`Version`,type:{name:`String`}},deleteProperty:{serializedName:`Delete`,required:!0,xmlName:`Delete`,type:{name:`Boolean`}},read:{serializedName:`Read`,required:!0,xmlName:`Read`,type:{name:`Boolean`}},write:{serializedName:`Write`,required:!0,xmlName:`Write`,type:{name:`Boolean`}},retentionPolicy:{serializedName:`RetentionPolicy`,xmlName:`RetentionPolicy`,type:{name:`Composite`,className:`RetentionPolicy`}}}}},cx={serializedName:`RetentionPolicy`,type:{name:`Composite`,className:`RetentionPolicy`,modelProperties:{enabled:{serializedName:`Enabled`,required:!0,xmlName:`Enabled`,type:{name:`Boolean`}},days:{constraints:{InclusiveMinimum:1},serializedName:`Days`,xmlName:`Days`,type:{name:`Number`}}}}},lx={serializedName:`Metrics`,type:{name:`Composite`,className:`Metrics`,modelProperties:{version:{serializedName:`Version`,xmlName:`Version`,type:{name:`String`}},enabled:{serializedName:`Enabled`,required:!0,xmlName:`Enabled`,type:{name:`Boolean`}},includeAPIs:{serializedName:`IncludeAPIs`,xmlName:`IncludeAPIs`,type:{name:`Boolean`}},retentionPolicy:{serializedName:`RetentionPolicy`,xmlName:`RetentionPolicy`,type:{name:`Composite`,className:`RetentionPolicy`}}}}},ux={serializedName:`CorsRule`,type:{name:`Composite`,className:`CorsRule`,modelProperties:{allowedOrigins:{serializedName:`AllowedOrigins`,required:!0,xmlName:`AllowedOrigins`,type:{name:`String`}},allowedMethods:{serializedName:`AllowedMethods`,required:!0,xmlName:`AllowedMethods`,type:{name:`String`}},allowedHeaders:{serializedName:`AllowedHeaders`,required:!0,xmlName:`AllowedHeaders`,type:{name:`String`}},exposedHeaders:{serializedName:`ExposedHeaders`,required:!0,xmlName:`ExposedHeaders`,type:{name:`String`}},maxAgeInSeconds:{constraints:{InclusiveMinimum:0},serializedName:`MaxAgeInSeconds`,required:!0,xmlName:`MaxAgeInSeconds`,type:{name:`Number`}}}}},dx={serializedName:`StaticWebsite`,type:{name:`Composite`,className:`StaticWebsite`,modelProperties:{enabled:{serializedName:`Enabled`,required:!0,xmlName:`Enabled`,type:{name:`Boolean`}},indexDocument:{serializedName:`IndexDocument`,xmlName:`IndexDocument`,type:{name:`String`}},errorDocument404Path:{serializedName:`ErrorDocument404Path`,xmlName:`ErrorDocument404Path`,type:{name:`String`}},defaultIndexDocumentPath:{serializedName:`DefaultIndexDocumentPath`,xmlName:`DefaultIndexDocumentPath`,type:{name:`String`}}}}},fx={serializedName:`StorageError`,type:{name:`Composite`,className:`StorageError`,modelProperties:{message:{serializedName:`Message`,xmlName:`Message`,type:{name:`String`}},copySourceStatusCode:{serializedName:`CopySourceStatusCode`,xmlName:`CopySourceStatusCode`,type:{name:`Number`}},copySourceErrorCode:{serializedName:`CopySourceErrorCode`,xmlName:`CopySourceErrorCode`,type:{name:`String`}},copySourceErrorMessage:{serializedName:`CopySourceErrorMessage`,xmlName:`CopySourceErrorMessage`,type:{name:`String`}},code:{serializedName:`Code`,xmlName:`Code`,type:{name:`String`}},authenticationErrorDetail:{serializedName:`AuthenticationErrorDetail`,xmlName:`AuthenticationErrorDetail`,type:{name:`String`}}}}},px={serializedName:`BlobServiceStatistics`,xmlName:`StorageServiceStats`,type:{name:`Composite`,className:`BlobServiceStatistics`,modelProperties:{geoReplication:{serializedName:`GeoReplication`,xmlName:`GeoReplication`,type:{name:`Composite`,className:`GeoReplication`}}}}},mx={serializedName:`GeoReplication`,type:{name:`Composite`,className:`GeoReplication`,modelProperties:{status:{serializedName:`Status`,required:!0,xmlName:`Status`,type:{name:`Enum`,allowedValues:[`live`,`bootstrap`,`unavailable`]}},lastSyncOn:{serializedName:`LastSyncTime`,required:!0,xmlName:`LastSyncTime`,type:{name:`DateTimeRfc1123`}}}}},hx={serializedName:`ListContainersSegmentResponse`,xmlName:`EnumerationResults`,type:{name:`Composite`,className:`ListContainersSegmentResponse`,modelProperties:{serviceEndpoint:{serializedName:`ServiceEndpoint`,required:!0,xmlName:`ServiceEndpoint`,xmlIsAttribute:!0,type:{name:`String`}},prefix:{serializedName:`Prefix`,xmlName:`Prefix`,type:{name:`String`}},marker:{serializedName:`Marker`,xmlName:`Marker`,type:{name:`String`}},maxPageSize:{serializedName:`MaxResults`,xmlName:`MaxResults`,type:{name:`Number`}},containerItems:{serializedName:`ContainerItems`,required:!0,xmlName:`Containers`,xmlIsWrapped:!0,xmlElementName:`Container`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`ContainerItem`}}}},continuationToken:{serializedName:`NextMarker`,xmlName:`NextMarker`,type:{name:`String`}}}}},gx={serializedName:`ContainerItem`,xmlName:`Container`,type:{name:`Composite`,className:`ContainerItem`,modelProperties:{name:{serializedName:`Name`,required:!0,xmlName:`Name`,type:{name:`String`}},deleted:{serializedName:`Deleted`,xmlName:`Deleted`,type:{name:`Boolean`}},version:{serializedName:`Version`,xmlName:`Version`,type:{name:`String`}},properties:{serializedName:`Properties`,xmlName:`Properties`,type:{name:`Composite`,className:`ContainerProperties`}},metadata:{serializedName:`Metadata`,xmlName:`Metadata`,type:{name:`Dictionary`,value:{type:{name:`String`}}}}}}},_x={serializedName:`ContainerProperties`,type:{name:`Composite`,className:`ContainerProperties`,modelProperties:{lastModified:{serializedName:`Last-Modified`,required:!0,xmlName:`Last-Modified`,type:{name:`DateTimeRfc1123`}},etag:{serializedName:`Etag`,required:!0,xmlName:`Etag`,type:{name:`String`}},leaseStatus:{serializedName:`LeaseStatus`,xmlName:`LeaseStatus`,type:{name:`Enum`,allowedValues:[`locked`,`unlocked`]}},leaseState:{serializedName:`LeaseState`,xmlName:`LeaseState`,type:{name:`Enum`,allowedValues:[`available`,`leased`,`expired`,`breaking`,`broken`]}},leaseDuration:{serializedName:`LeaseDuration`,xmlName:`LeaseDuration`,type:{name:`Enum`,allowedValues:[`infinite`,`fixed`]}},publicAccess:{serializedName:`PublicAccess`,xmlName:`PublicAccess`,type:{name:`Enum`,allowedValues:[`container`,`blob`]}},hasImmutabilityPolicy:{serializedName:`HasImmutabilityPolicy`,xmlName:`HasImmutabilityPolicy`,type:{name:`Boolean`}},hasLegalHold:{serializedName:`HasLegalHold`,xmlName:`HasLegalHold`,type:{name:`Boolean`}},defaultEncryptionScope:{serializedName:`DefaultEncryptionScope`,xmlName:`DefaultEncryptionScope`,type:{name:`String`}},preventEncryptionScopeOverride:{serializedName:`DenyEncryptionScopeOverride`,xmlName:`DenyEncryptionScopeOverride`,type:{name:`Boolean`}},deletedOn:{serializedName:`DeletedTime`,xmlName:`DeletedTime`,type:{name:`DateTimeRfc1123`}},remainingRetentionDays:{serializedName:`RemainingRetentionDays`,xmlName:`RemainingRetentionDays`,type:{name:`Number`}},isImmutableStorageWithVersioningEnabled:{serializedName:`ImmutableStorageWithVersioningEnabled`,xmlName:`ImmutableStorageWithVersioningEnabled`,type:{name:`Boolean`}}}}},vx={serializedName:`KeyInfo`,type:{name:`Composite`,className:`KeyInfo`,modelProperties:{startsOn:{serializedName:`Start`,required:!0,xmlName:`Start`,type:{name:`String`}},expiresOn:{serializedName:`Expiry`,required:!0,xmlName:`Expiry`,type:{name:`String`}}}}},yx={serializedName:`UserDelegationKey`,type:{name:`Composite`,className:`UserDelegationKey`,modelProperties:{signedObjectId:{serializedName:`SignedOid`,required:!0,xmlName:`SignedOid`,type:{name:`String`}},signedTenantId:{serializedName:`SignedTid`,required:!0,xmlName:`SignedTid`,type:{name:`String`}},signedStartsOn:{serializedName:`SignedStart`,required:!0,xmlName:`SignedStart`,type:{name:`String`}},signedExpiresOn:{serializedName:`SignedExpiry`,required:!0,xmlName:`SignedExpiry`,type:{name:`String`}},signedService:{serializedName:`SignedService`,required:!0,xmlName:`SignedService`,type:{name:`String`}},signedVersion:{serializedName:`SignedVersion`,required:!0,xmlName:`SignedVersion`,type:{name:`String`}},value:{serializedName:`Value`,required:!0,xmlName:`Value`,type:{name:`String`}}}}},bx={serializedName:`FilterBlobSegment`,xmlName:`EnumerationResults`,type:{name:`Composite`,className:`FilterBlobSegment`,modelProperties:{serviceEndpoint:{serializedName:`ServiceEndpoint`,required:!0,xmlName:`ServiceEndpoint`,xmlIsAttribute:!0,type:{name:`String`}},where:{serializedName:`Where`,required:!0,xmlName:`Where`,type:{name:`String`}},blobs:{serializedName:`Blobs`,required:!0,xmlName:`Blobs`,xmlIsWrapped:!0,xmlElementName:`Blob`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`FilterBlobItem`}}}},continuationToken:{serializedName:`NextMarker`,xmlName:`NextMarker`,type:{name:`String`}}}}},xx={serializedName:`FilterBlobItem`,xmlName:`Blob`,type:{name:`Composite`,className:`FilterBlobItem`,modelProperties:{name:{serializedName:`Name`,required:!0,xmlName:`Name`,type:{name:`String`}},containerName:{serializedName:`ContainerName`,required:!0,xmlName:`ContainerName`,type:{name:`String`}},tags:{serializedName:`Tags`,xmlName:`Tags`,type:{name:`Composite`,className:`BlobTags`}}}}},Sx={serializedName:`BlobTags`,xmlName:`Tags`,type:{name:`Composite`,className:`BlobTags`,modelProperties:{blobTagSet:{serializedName:`BlobTagSet`,required:!0,xmlName:`TagSet`,xmlIsWrapped:!0,xmlElementName:`Tag`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`BlobTag`}}}}}}},Cx={serializedName:`BlobTag`,xmlName:`Tag`,type:{name:`Composite`,className:`BlobTag`,modelProperties:{key:{serializedName:`Key`,required:!0,xmlName:`Key`,type:{name:`String`}},value:{serializedName:`Value`,required:!0,xmlName:`Value`,type:{name:`String`}}}}},wx={serializedName:`SignedIdentifier`,xmlName:`SignedIdentifier`,type:{name:`Composite`,className:`SignedIdentifier`,modelProperties:{id:{serializedName:`Id`,required:!0,xmlName:`Id`,type:{name:`String`}},accessPolicy:{serializedName:`AccessPolicy`,xmlName:`AccessPolicy`,type:{name:`Composite`,className:`AccessPolicy`}}}}},Tx={serializedName:`AccessPolicy`,type:{name:`Composite`,className:`AccessPolicy`,modelProperties:{startsOn:{serializedName:`Start`,xmlName:`Start`,type:{name:`String`}},expiresOn:{serializedName:`Expiry`,xmlName:`Expiry`,type:{name:`String`}},permissions:{serializedName:`Permission`,xmlName:`Permission`,type:{name:`String`}}}}},Ex={serializedName:`ListBlobsFlatSegmentResponse`,xmlName:`EnumerationResults`,type:{name:`Composite`,className:`ListBlobsFlatSegmentResponse`,modelProperties:{serviceEndpoint:{serializedName:`ServiceEndpoint`,required:!0,xmlName:`ServiceEndpoint`,xmlIsAttribute:!0,type:{name:`String`}},containerName:{serializedName:`ContainerName`,required:!0,xmlName:`ContainerName`,xmlIsAttribute:!0,type:{name:`String`}},prefix:{serializedName:`Prefix`,xmlName:`Prefix`,type:{name:`String`}},marker:{serializedName:`Marker`,xmlName:`Marker`,type:{name:`String`}},maxPageSize:{serializedName:`MaxResults`,xmlName:`MaxResults`,type:{name:`Number`}},segment:{serializedName:`Segment`,xmlName:`Blobs`,type:{name:`Composite`,className:`BlobFlatListSegment`}},continuationToken:{serializedName:`NextMarker`,xmlName:`NextMarker`,type:{name:`String`}}}}},Dx={serializedName:`BlobFlatListSegment`,xmlName:`Blobs`,type:{name:`Composite`,className:`BlobFlatListSegment`,modelProperties:{blobItems:{serializedName:`BlobItems`,required:!0,xmlName:`BlobItems`,xmlElementName:`Blob`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`BlobItemInternal`}}}}}}},Ox={serializedName:`BlobItemInternal`,xmlName:`Blob`,type:{name:`Composite`,className:`BlobItemInternal`,modelProperties:{name:{serializedName:`Name`,xmlName:`Name`,type:{name:`Composite`,className:`BlobName`}},deleted:{serializedName:`Deleted`,required:!0,xmlName:`Deleted`,type:{name:`Boolean`}},snapshot:{serializedName:`Snapshot`,required:!0,xmlName:`Snapshot`,type:{name:`String`}},versionId:{serializedName:`VersionId`,xmlName:`VersionId`,type:{name:`String`}},isCurrentVersion:{serializedName:`IsCurrentVersion`,xmlName:`IsCurrentVersion`,type:{name:`Boolean`}},properties:{serializedName:`Properties`,xmlName:`Properties`,type:{name:`Composite`,className:`BlobPropertiesInternal`}},metadata:{serializedName:`Metadata`,xmlName:`Metadata`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},blobTags:{serializedName:`BlobTags`,xmlName:`Tags`,type:{name:`Composite`,className:`BlobTags`}},objectReplicationMetadata:{serializedName:`ObjectReplicationMetadata`,xmlName:`OrMetadata`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},hasVersionsOnly:{serializedName:`HasVersionsOnly`,xmlName:`HasVersionsOnly`,type:{name:`Boolean`}}}}},kx={serializedName:`BlobName`,type:{name:`Composite`,className:`BlobName`,modelProperties:{encoded:{serializedName:`Encoded`,xmlName:`Encoded`,xmlIsAttribute:!0,type:{name:`Boolean`}},content:{serializedName:`content`,xmlName:`content`,xmlIsMsText:!0,type:{name:`String`}}}}},Ax={serializedName:`BlobPropertiesInternal`,xmlName:`Properties`,type:{name:`Composite`,className:`BlobPropertiesInternal`,modelProperties:{createdOn:{serializedName:`Creation-Time`,xmlName:`Creation-Time`,type:{name:`DateTimeRfc1123`}},lastModified:{serializedName:`Last-Modified`,required:!0,xmlName:`Last-Modified`,type:{name:`DateTimeRfc1123`}},etag:{serializedName:`Etag`,required:!0,xmlName:`Etag`,type:{name:`String`}},contentLength:{serializedName:`Content-Length`,xmlName:`Content-Length`,type:{name:`Number`}},contentType:{serializedName:`Content-Type`,xmlName:`Content-Type`,type:{name:`String`}},contentEncoding:{serializedName:`Content-Encoding`,xmlName:`Content-Encoding`,type:{name:`String`}},contentLanguage:{serializedName:`Content-Language`,xmlName:`Content-Language`,type:{name:`String`}},contentMD5:{serializedName:`Content-MD5`,xmlName:`Content-MD5`,type:{name:`ByteArray`}},contentDisposition:{serializedName:`Content-Disposition`,xmlName:`Content-Disposition`,type:{name:`String`}},cacheControl:{serializedName:`Cache-Control`,xmlName:`Cache-Control`,type:{name:`String`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},blobType:{serializedName:`BlobType`,xmlName:`BlobType`,type:{name:`Enum`,allowedValues:[`BlockBlob`,`PageBlob`,`AppendBlob`]}},leaseStatus:{serializedName:`LeaseStatus`,xmlName:`LeaseStatus`,type:{name:`Enum`,allowedValues:[`locked`,`unlocked`]}},leaseState:{serializedName:`LeaseState`,xmlName:`LeaseState`,type:{name:`Enum`,allowedValues:[`available`,`leased`,`expired`,`breaking`,`broken`]}},leaseDuration:{serializedName:`LeaseDuration`,xmlName:`LeaseDuration`,type:{name:`Enum`,allowedValues:[`infinite`,`fixed`]}},copyId:{serializedName:`CopyId`,xmlName:`CopyId`,type:{name:`String`}},copyStatus:{serializedName:`CopyStatus`,xmlName:`CopyStatus`,type:{name:`Enum`,allowedValues:[`pending`,`success`,`aborted`,`failed`]}},copySource:{serializedName:`CopySource`,xmlName:`CopySource`,type:{name:`String`}},copyProgress:{serializedName:`CopyProgress`,xmlName:`CopyProgress`,type:{name:`String`}},copyCompletedOn:{serializedName:`CopyCompletionTime`,xmlName:`CopyCompletionTime`,type:{name:`DateTimeRfc1123`}},copyStatusDescription:{serializedName:`CopyStatusDescription`,xmlName:`CopyStatusDescription`,type:{name:`String`}},serverEncrypted:{serializedName:`ServerEncrypted`,xmlName:`ServerEncrypted`,type:{name:`Boolean`}},incrementalCopy:{serializedName:`IncrementalCopy`,xmlName:`IncrementalCopy`,type:{name:`Boolean`}},destinationSnapshot:{serializedName:`DestinationSnapshot`,xmlName:`DestinationSnapshot`,type:{name:`String`}},deletedOn:{serializedName:`DeletedTime`,xmlName:`DeletedTime`,type:{name:`DateTimeRfc1123`}},remainingRetentionDays:{serializedName:`RemainingRetentionDays`,xmlName:`RemainingRetentionDays`,type:{name:`Number`}},accessTier:{serializedName:`AccessTier`,xmlName:`AccessTier`,type:{name:`Enum`,allowedValues:[`P4`,`P6`,`P10`,`P15`,`P20`,`P30`,`P40`,`P50`,`P60`,`P70`,`P80`,`Hot`,`Cool`,`Archive`,`Cold`]}},accessTierInferred:{serializedName:`AccessTierInferred`,xmlName:`AccessTierInferred`,type:{name:`Boolean`}},archiveStatus:{serializedName:`ArchiveStatus`,xmlName:`ArchiveStatus`,type:{name:`Enum`,allowedValues:[`rehydrate-pending-to-hot`,`rehydrate-pending-to-cool`,`rehydrate-pending-to-cold`]}},customerProvidedKeySha256:{serializedName:`CustomerProvidedKeySha256`,xmlName:`CustomerProvidedKeySha256`,type:{name:`String`}},encryptionScope:{serializedName:`EncryptionScope`,xmlName:`EncryptionScope`,type:{name:`String`}},accessTierChangedOn:{serializedName:`AccessTierChangeTime`,xmlName:`AccessTierChangeTime`,type:{name:`DateTimeRfc1123`}},tagCount:{serializedName:`TagCount`,xmlName:`TagCount`,type:{name:`Number`}},expiresOn:{serializedName:`Expiry-Time`,xmlName:`Expiry-Time`,type:{name:`DateTimeRfc1123`}},isSealed:{serializedName:`Sealed`,xmlName:`Sealed`,type:{name:`Boolean`}},rehydratePriority:{serializedName:`RehydratePriority`,xmlName:`RehydratePriority`,type:{name:`Enum`,allowedValues:[`High`,`Standard`]}},lastAccessedOn:{serializedName:`LastAccessTime`,xmlName:`LastAccessTime`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyExpiresOn:{serializedName:`ImmutabilityPolicyUntilDate`,xmlName:`ImmutabilityPolicyUntilDate`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyMode:{serializedName:`ImmutabilityPolicyMode`,xmlName:`ImmutabilityPolicyMode`,type:{name:`Enum`,allowedValues:[`Mutable`,`Unlocked`,`Locked`]}},legalHold:{serializedName:`LegalHold`,xmlName:`LegalHold`,type:{name:`Boolean`}}}}},jx={serializedName:`ListBlobsHierarchySegmentResponse`,xmlName:`EnumerationResults`,type:{name:`Composite`,className:`ListBlobsHierarchySegmentResponse`,modelProperties:{serviceEndpoint:{serializedName:`ServiceEndpoint`,required:!0,xmlName:`ServiceEndpoint`,xmlIsAttribute:!0,type:{name:`String`}},containerName:{serializedName:`ContainerName`,required:!0,xmlName:`ContainerName`,xmlIsAttribute:!0,type:{name:`String`}},prefix:{serializedName:`Prefix`,xmlName:`Prefix`,type:{name:`String`}},marker:{serializedName:`Marker`,xmlName:`Marker`,type:{name:`String`}},maxPageSize:{serializedName:`MaxResults`,xmlName:`MaxResults`,type:{name:`Number`}},delimiter:{serializedName:`Delimiter`,xmlName:`Delimiter`,type:{name:`String`}},segment:{serializedName:`Segment`,xmlName:`Blobs`,type:{name:`Composite`,className:`BlobHierarchyListSegment`}},continuationToken:{serializedName:`NextMarker`,xmlName:`NextMarker`,type:{name:`String`}}}}},Mx={serializedName:`BlobHierarchyListSegment`,xmlName:`Blobs`,type:{name:`Composite`,className:`BlobHierarchyListSegment`,modelProperties:{blobPrefixes:{serializedName:`BlobPrefixes`,xmlName:`BlobPrefixes`,xmlElementName:`BlobPrefix`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`BlobPrefix`}}}},blobItems:{serializedName:`BlobItems`,required:!0,xmlName:`BlobItems`,xmlElementName:`Blob`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`BlobItemInternal`}}}}}}},Nx={serializedName:`BlobPrefix`,type:{name:`Composite`,className:`BlobPrefix`,modelProperties:{name:{serializedName:`Name`,xmlName:`Name`,type:{name:`Composite`,className:`BlobName`}}}}},Px={serializedName:`BlockLookupList`,xmlName:`BlockList`,type:{name:`Composite`,className:`BlockLookupList`,modelProperties:{committed:{serializedName:`Committed`,xmlName:`Committed`,xmlElementName:`Committed`,type:{name:`Sequence`,element:{type:{name:`String`}}}},uncommitted:{serializedName:`Uncommitted`,xmlName:`Uncommitted`,xmlElementName:`Uncommitted`,type:{name:`Sequence`,element:{type:{name:`String`}}}},latest:{serializedName:`Latest`,xmlName:`Latest`,xmlElementName:`Latest`,type:{name:`Sequence`,element:{type:{name:`String`}}}}}}},Fx={serializedName:`BlockList`,type:{name:`Composite`,className:`BlockList`,modelProperties:{committedBlocks:{serializedName:`CommittedBlocks`,xmlName:`CommittedBlocks`,xmlIsWrapped:!0,xmlElementName:`Block`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`Block`}}}},uncommittedBlocks:{serializedName:`UncommittedBlocks`,xmlName:`UncommittedBlocks`,xmlIsWrapped:!0,xmlElementName:`Block`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`Block`}}}}}}},Ix={serializedName:`Block`,type:{name:`Composite`,className:`Block`,modelProperties:{name:{serializedName:`Name`,required:!0,xmlName:`Name`,type:{name:`String`}},size:{serializedName:`Size`,required:!0,xmlName:`Size`,type:{name:`Number`}}}}},Lx={serializedName:`PageList`,type:{name:`Composite`,className:`PageList`,modelProperties:{pageRange:{serializedName:`PageRange`,xmlName:`PageRange`,xmlElementName:`PageRange`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`PageRange`}}}},clearRange:{serializedName:`ClearRange`,xmlName:`ClearRange`,xmlElementName:`ClearRange`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`ClearRange`}}}},continuationToken:{serializedName:`NextMarker`,xmlName:`NextMarker`,type:{name:`String`}}}}},Rx={serializedName:`PageRange`,xmlName:`PageRange`,type:{name:`Composite`,className:`PageRange`,modelProperties:{start:{serializedName:`Start`,required:!0,xmlName:`Start`,type:{name:`Number`}},end:{serializedName:`End`,required:!0,xmlName:`End`,type:{name:`Number`}}}}},zx={serializedName:`ClearRange`,xmlName:`ClearRange`,type:{name:`Composite`,className:`ClearRange`,modelProperties:{start:{serializedName:`Start`,required:!0,xmlName:`Start`,type:{name:`Number`}},end:{serializedName:`End`,required:!0,xmlName:`End`,type:{name:`Number`}}}}},Bx={serializedName:`QueryRequest`,xmlName:`QueryRequest`,type:{name:`Composite`,className:`QueryRequest`,modelProperties:{queryType:{serializedName:`QueryType`,required:!0,xmlName:`QueryType`,type:{name:`String`}},expression:{serializedName:`Expression`,required:!0,xmlName:`Expression`,type:{name:`String`}},inputSerialization:{serializedName:`InputSerialization`,xmlName:`InputSerialization`,type:{name:`Composite`,className:`QuerySerialization`}},outputSerialization:{serializedName:`OutputSerialization`,xmlName:`OutputSerialization`,type:{name:`Composite`,className:`QuerySerialization`}}}}},Vx={serializedName:`QuerySerialization`,type:{name:`Composite`,className:`QuerySerialization`,modelProperties:{format:{serializedName:`Format`,xmlName:`Format`,type:{name:`Composite`,className:`QueryFormat`}}}}},Hx={serializedName:`QueryFormat`,type:{name:`Composite`,className:`QueryFormat`,modelProperties:{type:{serializedName:`Type`,required:!0,xmlName:`Type`,type:{name:`Enum`,allowedValues:[`delimited`,`json`,`arrow`,`parquet`]}},delimitedTextConfiguration:{serializedName:`DelimitedTextConfiguration`,xmlName:`DelimitedTextConfiguration`,type:{name:`Composite`,className:`DelimitedTextConfiguration`}},jsonTextConfiguration:{serializedName:`JsonTextConfiguration`,xmlName:`JsonTextConfiguration`,type:{name:`Composite`,className:`JsonTextConfiguration`}},arrowConfiguration:{serializedName:`ArrowConfiguration`,xmlName:`ArrowConfiguration`,type:{name:`Composite`,className:`ArrowConfiguration`}},parquetTextConfiguration:{serializedName:`ParquetTextConfiguration`,xmlName:`ParquetTextConfiguration`,type:{name:`Dictionary`,value:{type:{name:`any`}}}}}}},Ux={serializedName:`DelimitedTextConfiguration`,xmlName:`DelimitedTextConfiguration`,type:{name:`Composite`,className:`DelimitedTextConfiguration`,modelProperties:{columnSeparator:{serializedName:`ColumnSeparator`,xmlName:`ColumnSeparator`,type:{name:`String`}},fieldQuote:{serializedName:`FieldQuote`,xmlName:`FieldQuote`,type:{name:`String`}},recordSeparator:{serializedName:`RecordSeparator`,xmlName:`RecordSeparator`,type:{name:`String`}},escapeChar:{serializedName:`EscapeChar`,xmlName:`EscapeChar`,type:{name:`String`}},headersPresent:{serializedName:`HeadersPresent`,xmlName:`HasHeaders`,type:{name:`Boolean`}}}}},Wx={serializedName:`JsonTextConfiguration`,xmlName:`JsonTextConfiguration`,type:{name:`Composite`,className:`JsonTextConfiguration`,modelProperties:{recordSeparator:{serializedName:`RecordSeparator`,xmlName:`RecordSeparator`,type:{name:`String`}}}}},Gx={serializedName:`ArrowConfiguration`,xmlName:`ArrowConfiguration`,type:{name:`Composite`,className:`ArrowConfiguration`,modelProperties:{schema:{serializedName:`Schema`,required:!0,xmlName:`Schema`,xmlIsWrapped:!0,xmlElementName:`Field`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`ArrowField`}}}}}}},Kx={serializedName:`ArrowField`,xmlName:`Field`,type:{name:`Composite`,className:`ArrowField`,modelProperties:{type:{serializedName:`Type`,required:!0,xmlName:`Type`,type:{name:`String`}},name:{serializedName:`Name`,xmlName:`Name`,type:{name:`String`}},precision:{serializedName:`Precision`,xmlName:`Precision`,type:{name:`Number`}},scale:{serializedName:`Scale`,xmlName:`Scale`,type:{name:`Number`}}}}},qx={serializedName:`Service_setPropertiesHeaders`,type:{name:`Composite`,className:`ServiceSetPropertiesHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Jx={serializedName:`Service_setPropertiesExceptionHeaders`,type:{name:`Composite`,className:`ServiceSetPropertiesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Yx={serializedName:`Service_getPropertiesHeaders`,type:{name:`Composite`,className:`ServiceGetPropertiesHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Xx={serializedName:`Service_getPropertiesExceptionHeaders`,type:{name:`Composite`,className:`ServiceGetPropertiesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Zx={serializedName:`Service_getStatisticsHeaders`,type:{name:`Composite`,className:`ServiceGetStatisticsHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Qx={serializedName:`Service_getStatisticsExceptionHeaders`,type:{name:`Composite`,className:`ServiceGetStatisticsExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},$x={serializedName:`Service_listContainersSegmentHeaders`,type:{name:`Composite`,className:`ServiceListContainersSegmentHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},eS={serializedName:`Service_listContainersSegmentExceptionHeaders`,type:{name:`Composite`,className:`ServiceListContainersSegmentExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},tS={serializedName:`Service_getUserDelegationKeyHeaders`,type:{name:`Composite`,className:`ServiceGetUserDelegationKeyHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},nS={serializedName:`Service_getUserDelegationKeyExceptionHeaders`,type:{name:`Composite`,className:`ServiceGetUserDelegationKeyExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},rS={serializedName:`Service_getAccountInfoHeaders`,type:{name:`Composite`,className:`ServiceGetAccountInfoHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},skuName:{serializedName:`x-ms-sku-name`,xmlName:`x-ms-sku-name`,type:{name:`Enum`,allowedValues:[`Standard_LRS`,`Standard_GRS`,`Standard_RAGRS`,`Standard_ZRS`,`Premium_LRS`]}},accountKind:{serializedName:`x-ms-account-kind`,xmlName:`x-ms-account-kind`,type:{name:`Enum`,allowedValues:[`Storage`,`BlobStorage`,`StorageV2`,`FileStorage`,`BlockBlobStorage`]}},isHierarchicalNamespaceEnabled:{serializedName:`x-ms-is-hns-enabled`,xmlName:`x-ms-is-hns-enabled`,type:{name:`Boolean`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},iS={serializedName:`Service_getAccountInfoExceptionHeaders`,type:{name:`Composite`,className:`ServiceGetAccountInfoExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},aS={serializedName:`Service_submitBatchHeaders`,type:{name:`Composite`,className:`ServiceSubmitBatchHeaders`,modelProperties:{contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},oS={serializedName:`Service_submitBatchExceptionHeaders`,type:{name:`Composite`,className:`ServiceSubmitBatchExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},sS={serializedName:`Service_filterBlobsHeaders`,type:{name:`Composite`,className:`ServiceFilterBlobsHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},cS={serializedName:`Service_filterBlobsExceptionHeaders`,type:{name:`Composite`,className:`ServiceFilterBlobsExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},lS={serializedName:`Container_createHeaders`,type:{name:`Composite`,className:`ContainerCreateHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},uS={serializedName:`Container_createExceptionHeaders`,type:{name:`Composite`,className:`ContainerCreateExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},dS={serializedName:`Container_getPropertiesHeaders`,type:{name:`Composite`,className:`ContainerGetPropertiesHeaders`,modelProperties:{metadata:{serializedName:`x-ms-meta`,headerCollectionPrefix:`x-ms-meta-`,xmlName:`x-ms-meta`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseDuration:{serializedName:`x-ms-lease-duration`,xmlName:`x-ms-lease-duration`,type:{name:`Enum`,allowedValues:[`infinite`,`fixed`]}},leaseState:{serializedName:`x-ms-lease-state`,xmlName:`x-ms-lease-state`,type:{name:`Enum`,allowedValues:[`available`,`leased`,`expired`,`breaking`,`broken`]}},leaseStatus:{serializedName:`x-ms-lease-status`,xmlName:`x-ms-lease-status`,type:{name:`Enum`,allowedValues:[`locked`,`unlocked`]}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},blobPublicAccess:{serializedName:`x-ms-blob-public-access`,xmlName:`x-ms-blob-public-access`,type:{name:`Enum`,allowedValues:[`container`,`blob`]}},hasImmutabilityPolicy:{serializedName:`x-ms-has-immutability-policy`,xmlName:`x-ms-has-immutability-policy`,type:{name:`Boolean`}},hasLegalHold:{serializedName:`x-ms-has-legal-hold`,xmlName:`x-ms-has-legal-hold`,type:{name:`Boolean`}},defaultEncryptionScope:{serializedName:`x-ms-default-encryption-scope`,xmlName:`x-ms-default-encryption-scope`,type:{name:`String`}},denyEncryptionScopeOverride:{serializedName:`x-ms-deny-encryption-scope-override`,xmlName:`x-ms-deny-encryption-scope-override`,type:{name:`Boolean`}},isImmutableStorageWithVersioningEnabled:{serializedName:`x-ms-immutable-storage-with-versioning-enabled`,xmlName:`x-ms-immutable-storage-with-versioning-enabled`,type:{name:`Boolean`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},fS={serializedName:`Container_getPropertiesExceptionHeaders`,type:{name:`Composite`,className:`ContainerGetPropertiesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},pS={serializedName:`Container_deleteHeaders`,type:{name:`Composite`,className:`ContainerDeleteHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},mS={serializedName:`Container_deleteExceptionHeaders`,type:{name:`Composite`,className:`ContainerDeleteExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},hS={serializedName:`Container_setMetadataHeaders`,type:{name:`Composite`,className:`ContainerSetMetadataHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},gS={serializedName:`Container_setMetadataExceptionHeaders`,type:{name:`Composite`,className:`ContainerSetMetadataExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},_S={serializedName:`Container_getAccessPolicyHeaders`,type:{name:`Composite`,className:`ContainerGetAccessPolicyHeaders`,modelProperties:{blobPublicAccess:{serializedName:`x-ms-blob-public-access`,xmlName:`x-ms-blob-public-access`,type:{name:`Enum`,allowedValues:[`container`,`blob`]}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},vS={serializedName:`Container_getAccessPolicyExceptionHeaders`,type:{name:`Composite`,className:`ContainerGetAccessPolicyExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},yS={serializedName:`Container_setAccessPolicyHeaders`,type:{name:`Composite`,className:`ContainerSetAccessPolicyHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},bS={serializedName:`Container_setAccessPolicyExceptionHeaders`,type:{name:`Composite`,className:`ContainerSetAccessPolicyExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},xS={serializedName:`Container_restoreHeaders`,type:{name:`Composite`,className:`ContainerRestoreHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},SS={serializedName:`Container_restoreExceptionHeaders`,type:{name:`Composite`,className:`ContainerRestoreExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},CS={serializedName:`Container_renameHeaders`,type:{name:`Composite`,className:`ContainerRenameHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},wS={serializedName:`Container_renameExceptionHeaders`,type:{name:`Composite`,className:`ContainerRenameExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},TS={serializedName:`Container_submitBatchHeaders`,type:{name:`Composite`,className:`ContainerSubmitBatchHeaders`,modelProperties:{contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}}}}},ES={serializedName:`Container_submitBatchExceptionHeaders`,type:{name:`Composite`,className:`ContainerSubmitBatchExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},DS={serializedName:`Container_filterBlobsHeaders`,type:{name:`Composite`,className:`ContainerFilterBlobsHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},OS={serializedName:`Container_filterBlobsExceptionHeaders`,type:{name:`Composite`,className:`ContainerFilterBlobsExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},kS={serializedName:`Container_acquireLeaseHeaders`,type:{name:`Composite`,className:`ContainerAcquireLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseId:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},AS={serializedName:`Container_acquireLeaseExceptionHeaders`,type:{name:`Composite`,className:`ContainerAcquireLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},jS={serializedName:`Container_releaseLeaseHeaders`,type:{name:`Composite`,className:`ContainerReleaseLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},MS={serializedName:`Container_releaseLeaseExceptionHeaders`,type:{name:`Composite`,className:`ContainerReleaseLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},NS={serializedName:`Container_renewLeaseHeaders`,type:{name:`Composite`,className:`ContainerRenewLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseId:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},PS={serializedName:`Container_renewLeaseExceptionHeaders`,type:{name:`Composite`,className:`ContainerRenewLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},FS={serializedName:`Container_breakLeaseHeaders`,type:{name:`Composite`,className:`ContainerBreakLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseTime:{serializedName:`x-ms-lease-time`,xmlName:`x-ms-lease-time`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},IS={serializedName:`Container_breakLeaseExceptionHeaders`,type:{name:`Composite`,className:`ContainerBreakLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},LS={serializedName:`Container_changeLeaseHeaders`,type:{name:`Composite`,className:`ContainerChangeLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseId:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},RS={serializedName:`Container_changeLeaseExceptionHeaders`,type:{name:`Composite`,className:`ContainerChangeLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},zS={serializedName:`Container_listBlobFlatSegmentHeaders`,type:{name:`Composite`,className:`ContainerListBlobFlatSegmentHeaders`,modelProperties:{contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},BS={serializedName:`Container_listBlobFlatSegmentExceptionHeaders`,type:{name:`Composite`,className:`ContainerListBlobFlatSegmentExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},VS={serializedName:`Container_listBlobHierarchySegmentHeaders`,type:{name:`Composite`,className:`ContainerListBlobHierarchySegmentHeaders`,modelProperties:{contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},HS={serializedName:`Container_listBlobHierarchySegmentExceptionHeaders`,type:{name:`Composite`,className:`ContainerListBlobHierarchySegmentExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},US={serializedName:`Container_getAccountInfoHeaders`,type:{name:`Composite`,className:`ContainerGetAccountInfoHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},skuName:{serializedName:`x-ms-sku-name`,xmlName:`x-ms-sku-name`,type:{name:`Enum`,allowedValues:[`Standard_LRS`,`Standard_GRS`,`Standard_RAGRS`,`Standard_ZRS`,`Premium_LRS`]}},accountKind:{serializedName:`x-ms-account-kind`,xmlName:`x-ms-account-kind`,type:{name:`Enum`,allowedValues:[`Storage`,`BlobStorage`,`StorageV2`,`FileStorage`,`BlockBlobStorage`]}},isHierarchicalNamespaceEnabled:{serializedName:`x-ms-is-hns-enabled`,xmlName:`x-ms-is-hns-enabled`,type:{name:`Boolean`}}}}},WS={serializedName:`Container_getAccountInfoExceptionHeaders`,type:{name:`Composite`,className:`ContainerGetAccountInfoExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},GS={serializedName:`Blob_downloadHeaders`,type:{name:`Composite`,className:`BlobDownloadHeaders`,modelProperties:{lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},createdOn:{serializedName:`x-ms-creation-time`,xmlName:`x-ms-creation-time`,type:{name:`DateTimeRfc1123`}},metadata:{serializedName:`x-ms-meta`,headerCollectionPrefix:`x-ms-meta-`,xmlName:`x-ms-meta`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},objectReplicationPolicyId:{serializedName:`x-ms-or-policy-id`,xmlName:`x-ms-or-policy-id`,type:{name:`String`}},objectReplicationRules:{serializedName:`x-ms-or`,headerCollectionPrefix:`x-ms-or-`,xmlName:`x-ms-or`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},contentLength:{serializedName:`content-length`,xmlName:`content-length`,type:{name:`Number`}},contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},contentRange:{serializedName:`content-range`,xmlName:`content-range`,type:{name:`String`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},contentEncoding:{serializedName:`content-encoding`,xmlName:`content-encoding`,type:{name:`String`}},cacheControl:{serializedName:`cache-control`,xmlName:`cache-control`,type:{name:`String`}},contentDisposition:{serializedName:`content-disposition`,xmlName:`content-disposition`,type:{name:`String`}},contentLanguage:{serializedName:`content-language`,xmlName:`content-language`,type:{name:`String`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},blobType:{serializedName:`x-ms-blob-type`,xmlName:`x-ms-blob-type`,type:{name:`Enum`,allowedValues:[`BlockBlob`,`PageBlob`,`AppendBlob`]}},copyCompletedOn:{serializedName:`x-ms-copy-completion-time`,xmlName:`x-ms-copy-completion-time`,type:{name:`DateTimeRfc1123`}},copyStatusDescription:{serializedName:`x-ms-copy-status-description`,xmlName:`x-ms-copy-status-description`,type:{name:`String`}},copyId:{serializedName:`x-ms-copy-id`,xmlName:`x-ms-copy-id`,type:{name:`String`}},copyProgress:{serializedName:`x-ms-copy-progress`,xmlName:`x-ms-copy-progress`,type:{name:`String`}},copySource:{serializedName:`x-ms-copy-source`,xmlName:`x-ms-copy-source`,type:{name:`String`}},copyStatus:{serializedName:`x-ms-copy-status`,xmlName:`x-ms-copy-status`,type:{name:`Enum`,allowedValues:[`pending`,`success`,`aborted`,`failed`]}},leaseDuration:{serializedName:`x-ms-lease-duration`,xmlName:`x-ms-lease-duration`,type:{name:`Enum`,allowedValues:[`infinite`,`fixed`]}},leaseState:{serializedName:`x-ms-lease-state`,xmlName:`x-ms-lease-state`,type:{name:`Enum`,allowedValues:[`available`,`leased`,`expired`,`breaking`,`broken`]}},leaseStatus:{serializedName:`x-ms-lease-status`,xmlName:`x-ms-lease-status`,type:{name:`Enum`,allowedValues:[`locked`,`unlocked`]}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},isCurrentVersion:{serializedName:`x-ms-is-current-version`,xmlName:`x-ms-is-current-version`,type:{name:`Boolean`}},acceptRanges:{serializedName:`accept-ranges`,xmlName:`accept-ranges`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},blobCommittedBlockCount:{serializedName:`x-ms-blob-committed-block-count`,xmlName:`x-ms-blob-committed-block-count`,type:{name:`Number`}},isServerEncrypted:{serializedName:`x-ms-server-encrypted`,xmlName:`x-ms-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},blobContentMD5:{serializedName:`x-ms-blob-content-md5`,xmlName:`x-ms-blob-content-md5`,type:{name:`ByteArray`}},tagCount:{serializedName:`x-ms-tag-count`,xmlName:`x-ms-tag-count`,type:{name:`Number`}},isSealed:{serializedName:`x-ms-blob-sealed`,xmlName:`x-ms-blob-sealed`,type:{name:`Boolean`}},lastAccessed:{serializedName:`x-ms-last-access-time`,xmlName:`x-ms-last-access-time`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyExpiresOn:{serializedName:`x-ms-immutability-policy-until-date`,xmlName:`x-ms-immutability-policy-until-date`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyMode:{serializedName:`x-ms-immutability-policy-mode`,xmlName:`x-ms-immutability-policy-mode`,type:{name:`Enum`,allowedValues:[`Mutable`,`Unlocked`,`Locked`]}},legalHold:{serializedName:`x-ms-legal-hold`,xmlName:`x-ms-legal-hold`,type:{name:`Boolean`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},contentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}}}}},KS={serializedName:`Blob_downloadExceptionHeaders`,type:{name:`Composite`,className:`BlobDownloadExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},qS={serializedName:`Blob_getPropertiesHeaders`,type:{name:`Composite`,className:`BlobGetPropertiesHeaders`,modelProperties:{lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},createdOn:{serializedName:`x-ms-creation-time`,xmlName:`x-ms-creation-time`,type:{name:`DateTimeRfc1123`}},metadata:{serializedName:`x-ms-meta`,headerCollectionPrefix:`x-ms-meta-`,xmlName:`x-ms-meta`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},objectReplicationPolicyId:{serializedName:`x-ms-or-policy-id`,xmlName:`x-ms-or-policy-id`,type:{name:`String`}},objectReplicationRules:{serializedName:`x-ms-or`,headerCollectionPrefix:`x-ms-or-`,xmlName:`x-ms-or`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},blobType:{serializedName:`x-ms-blob-type`,xmlName:`x-ms-blob-type`,type:{name:`Enum`,allowedValues:[`BlockBlob`,`PageBlob`,`AppendBlob`]}},copyCompletedOn:{serializedName:`x-ms-copy-completion-time`,xmlName:`x-ms-copy-completion-time`,type:{name:`DateTimeRfc1123`}},copyStatusDescription:{serializedName:`x-ms-copy-status-description`,xmlName:`x-ms-copy-status-description`,type:{name:`String`}},copyId:{serializedName:`x-ms-copy-id`,xmlName:`x-ms-copy-id`,type:{name:`String`}},copyProgress:{serializedName:`x-ms-copy-progress`,xmlName:`x-ms-copy-progress`,type:{name:`String`}},copySource:{serializedName:`x-ms-copy-source`,xmlName:`x-ms-copy-source`,type:{name:`String`}},copyStatus:{serializedName:`x-ms-copy-status`,xmlName:`x-ms-copy-status`,type:{name:`Enum`,allowedValues:[`pending`,`success`,`aborted`,`failed`]}},isIncrementalCopy:{serializedName:`x-ms-incremental-copy`,xmlName:`x-ms-incremental-copy`,type:{name:`Boolean`}},destinationSnapshot:{serializedName:`x-ms-copy-destination-snapshot`,xmlName:`x-ms-copy-destination-snapshot`,type:{name:`String`}},leaseDuration:{serializedName:`x-ms-lease-duration`,xmlName:`x-ms-lease-duration`,type:{name:`Enum`,allowedValues:[`infinite`,`fixed`]}},leaseState:{serializedName:`x-ms-lease-state`,xmlName:`x-ms-lease-state`,type:{name:`Enum`,allowedValues:[`available`,`leased`,`expired`,`breaking`,`broken`]}},leaseStatus:{serializedName:`x-ms-lease-status`,xmlName:`x-ms-lease-status`,type:{name:`Enum`,allowedValues:[`locked`,`unlocked`]}},contentLength:{serializedName:`content-length`,xmlName:`content-length`,type:{name:`Number`}},contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},contentEncoding:{serializedName:`content-encoding`,xmlName:`content-encoding`,type:{name:`String`}},contentDisposition:{serializedName:`content-disposition`,xmlName:`content-disposition`,type:{name:`String`}},contentLanguage:{serializedName:`content-language`,xmlName:`content-language`,type:{name:`String`}},cacheControl:{serializedName:`cache-control`,xmlName:`cache-control`,type:{name:`String`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},acceptRanges:{serializedName:`accept-ranges`,xmlName:`accept-ranges`,type:{name:`String`}},blobCommittedBlockCount:{serializedName:`x-ms-blob-committed-block-count`,xmlName:`x-ms-blob-committed-block-count`,type:{name:`Number`}},isServerEncrypted:{serializedName:`x-ms-server-encrypted`,xmlName:`x-ms-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},accessTier:{serializedName:`x-ms-access-tier`,xmlName:`x-ms-access-tier`,type:{name:`String`}},accessTierInferred:{serializedName:`x-ms-access-tier-inferred`,xmlName:`x-ms-access-tier-inferred`,type:{name:`Boolean`}},archiveStatus:{serializedName:`x-ms-archive-status`,xmlName:`x-ms-archive-status`,type:{name:`String`}},accessTierChangedOn:{serializedName:`x-ms-access-tier-change-time`,xmlName:`x-ms-access-tier-change-time`,type:{name:`DateTimeRfc1123`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},isCurrentVersion:{serializedName:`x-ms-is-current-version`,xmlName:`x-ms-is-current-version`,type:{name:`Boolean`}},tagCount:{serializedName:`x-ms-tag-count`,xmlName:`x-ms-tag-count`,type:{name:`Number`}},expiresOn:{serializedName:`x-ms-expiry-time`,xmlName:`x-ms-expiry-time`,type:{name:`DateTimeRfc1123`}},isSealed:{serializedName:`x-ms-blob-sealed`,xmlName:`x-ms-blob-sealed`,type:{name:`Boolean`}},rehydratePriority:{serializedName:`x-ms-rehydrate-priority`,xmlName:`x-ms-rehydrate-priority`,type:{name:`Enum`,allowedValues:[`High`,`Standard`]}},lastAccessed:{serializedName:`x-ms-last-access-time`,xmlName:`x-ms-last-access-time`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyExpiresOn:{serializedName:`x-ms-immutability-policy-until-date`,xmlName:`x-ms-immutability-policy-until-date`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyMode:{serializedName:`x-ms-immutability-policy-mode`,xmlName:`x-ms-immutability-policy-mode`,type:{name:`Enum`,allowedValues:[`Mutable`,`Unlocked`,`Locked`]}},legalHold:{serializedName:`x-ms-legal-hold`,xmlName:`x-ms-legal-hold`,type:{name:`Boolean`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},JS={serializedName:`Blob_getPropertiesExceptionHeaders`,type:{name:`Composite`,className:`BlobGetPropertiesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},YS={serializedName:`Blob_deleteHeaders`,type:{name:`Composite`,className:`BlobDeleteHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},XS={serializedName:`Blob_deleteExceptionHeaders`,type:{name:`Composite`,className:`BlobDeleteExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ZS={serializedName:`Blob_undeleteHeaders`,type:{name:`Composite`,className:`BlobUndeleteHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},QS={serializedName:`Blob_undeleteExceptionHeaders`,type:{name:`Composite`,className:`BlobUndeleteExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},$S={serializedName:`Blob_setExpiryHeaders`,type:{name:`Composite`,className:`BlobSetExpiryHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},eC={serializedName:`Blob_setExpiryExceptionHeaders`,type:{name:`Composite`,className:`BlobSetExpiryExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},tC={serializedName:`Blob_setHttpHeadersHeaders`,type:{name:`Composite`,className:`BlobSetHttpHeadersHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},nC={serializedName:`Blob_setHttpHeadersExceptionHeaders`,type:{name:`Composite`,className:`BlobSetHttpHeadersExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},rC={serializedName:`Blob_setImmutabilityPolicyHeaders`,type:{name:`Composite`,className:`BlobSetImmutabilityPolicyHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyExpiry:{serializedName:`x-ms-immutability-policy-until-date`,xmlName:`x-ms-immutability-policy-until-date`,type:{name:`DateTimeRfc1123`}},immutabilityPolicyMode:{serializedName:`x-ms-immutability-policy-mode`,xmlName:`x-ms-immutability-policy-mode`,type:{name:`Enum`,allowedValues:[`Mutable`,`Unlocked`,`Locked`]}}}}},iC={serializedName:`Blob_setImmutabilityPolicyExceptionHeaders`,type:{name:`Composite`,className:`BlobSetImmutabilityPolicyExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},aC={serializedName:`Blob_deleteImmutabilityPolicyHeaders`,type:{name:`Composite`,className:`BlobDeleteImmutabilityPolicyHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},oC={serializedName:`Blob_deleteImmutabilityPolicyExceptionHeaders`,type:{name:`Composite`,className:`BlobDeleteImmutabilityPolicyExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},sC={serializedName:`Blob_setLegalHoldHeaders`,type:{name:`Composite`,className:`BlobSetLegalHoldHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},legalHold:{serializedName:`x-ms-legal-hold`,xmlName:`x-ms-legal-hold`,type:{name:`Boolean`}}}}},cC={serializedName:`Blob_setLegalHoldExceptionHeaders`,type:{name:`Composite`,className:`BlobSetLegalHoldExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},lC={serializedName:`Blob_setMetadataHeaders`,type:{name:`Composite`,className:`BlobSetMetadataHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},uC={serializedName:`Blob_setMetadataExceptionHeaders`,type:{name:`Composite`,className:`BlobSetMetadataExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},dC={serializedName:`Blob_acquireLeaseHeaders`,type:{name:`Composite`,className:`BlobAcquireLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseId:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},fC={serializedName:`Blob_acquireLeaseExceptionHeaders`,type:{name:`Composite`,className:`BlobAcquireLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},pC={serializedName:`Blob_releaseLeaseHeaders`,type:{name:`Composite`,className:`BlobReleaseLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},mC={serializedName:`Blob_releaseLeaseExceptionHeaders`,type:{name:`Composite`,className:`BlobReleaseLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},hC={serializedName:`Blob_renewLeaseHeaders`,type:{name:`Composite`,className:`BlobRenewLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseId:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},gC={serializedName:`Blob_renewLeaseExceptionHeaders`,type:{name:`Composite`,className:`BlobRenewLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},_C={serializedName:`Blob_changeLeaseHeaders`,type:{name:`Composite`,className:`BlobChangeLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},leaseId:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},vC={serializedName:`Blob_changeLeaseExceptionHeaders`,type:{name:`Composite`,className:`BlobChangeLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},yC={serializedName:`Blob_breakLeaseHeaders`,type:{name:`Composite`,className:`BlobBreakLeaseHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},leaseTime:{serializedName:`x-ms-lease-time`,xmlName:`x-ms-lease-time`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}}}}},bC={serializedName:`Blob_breakLeaseExceptionHeaders`,type:{name:`Composite`,className:`BlobBreakLeaseExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},xC={serializedName:`Blob_createSnapshotHeaders`,type:{name:`Composite`,className:`BlobCreateSnapshotHeaders`,modelProperties:{snapshot:{serializedName:`x-ms-snapshot`,xmlName:`x-ms-snapshot`,type:{name:`String`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},SC={serializedName:`Blob_createSnapshotExceptionHeaders`,type:{name:`Composite`,className:`BlobCreateSnapshotExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},CC={serializedName:`Blob_startCopyFromURLHeaders`,type:{name:`Composite`,className:`BlobStartCopyFromURLHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},copyId:{serializedName:`x-ms-copy-id`,xmlName:`x-ms-copy-id`,type:{name:`String`}},copyStatus:{serializedName:`x-ms-copy-status`,xmlName:`x-ms-copy-status`,type:{name:`Enum`,allowedValues:[`pending`,`success`,`aborted`,`failed`]}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},wC={serializedName:`Blob_startCopyFromURLExceptionHeaders`,type:{name:`Composite`,className:`BlobStartCopyFromURLExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},copySourceErrorCode:{serializedName:`x-ms-copy-source-error-code`,xmlName:`x-ms-copy-source-error-code`,type:{name:`String`}},copySourceStatusCode:{serializedName:`x-ms-copy-source-status-code`,xmlName:`x-ms-copy-source-status-code`,type:{name:`Number`}}}}},TC={serializedName:`Blob_copyFromURLHeaders`,type:{name:`Composite`,className:`BlobCopyFromURLHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},copyId:{serializedName:`x-ms-copy-id`,xmlName:`x-ms-copy-id`,type:{name:`String`}},copyStatus:{defaultValue:`success`,isConstant:!0,serializedName:`x-ms-copy-status`,type:{name:`String`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},EC={serializedName:`Blob_copyFromURLExceptionHeaders`,type:{name:`Composite`,className:`BlobCopyFromURLExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},copySourceErrorCode:{serializedName:`x-ms-copy-source-error-code`,xmlName:`x-ms-copy-source-error-code`,type:{name:`String`}},copySourceStatusCode:{serializedName:`x-ms-copy-source-status-code`,xmlName:`x-ms-copy-source-status-code`,type:{name:`Number`}}}}},DC={serializedName:`Blob_abortCopyFromURLHeaders`,type:{name:`Composite`,className:`BlobAbortCopyFromURLHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},OC={serializedName:`Blob_abortCopyFromURLExceptionHeaders`,type:{name:`Composite`,className:`BlobAbortCopyFromURLExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},kC={serializedName:`Blob_setTierHeaders`,type:{name:`Composite`,className:`BlobSetTierHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},AC={serializedName:`Blob_setTierExceptionHeaders`,type:{name:`Composite`,className:`BlobSetTierExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},jC={serializedName:`Blob_getAccountInfoHeaders`,type:{name:`Composite`,className:`BlobGetAccountInfoHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},skuName:{serializedName:`x-ms-sku-name`,xmlName:`x-ms-sku-name`,type:{name:`Enum`,allowedValues:[`Standard_LRS`,`Standard_GRS`,`Standard_RAGRS`,`Standard_ZRS`,`Premium_LRS`]}},accountKind:{serializedName:`x-ms-account-kind`,xmlName:`x-ms-account-kind`,type:{name:`Enum`,allowedValues:[`Storage`,`BlobStorage`,`StorageV2`,`FileStorage`,`BlockBlobStorage`]}},isHierarchicalNamespaceEnabled:{serializedName:`x-ms-is-hns-enabled`,xmlName:`x-ms-is-hns-enabled`,type:{name:`Boolean`}}}}},MC={serializedName:`Blob_getAccountInfoExceptionHeaders`,type:{name:`Composite`,className:`BlobGetAccountInfoExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},NC={serializedName:`Blob_queryHeaders`,type:{name:`Composite`,className:`BlobQueryHeaders`,modelProperties:{lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},metadata:{serializedName:`x-ms-meta`,headerCollectionPrefix:`x-ms-meta-`,xmlName:`x-ms-meta`,type:{name:`Dictionary`,value:{type:{name:`String`}}}},contentLength:{serializedName:`content-length`,xmlName:`content-length`,type:{name:`Number`}},contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},contentRange:{serializedName:`content-range`,xmlName:`content-range`,type:{name:`String`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},contentEncoding:{serializedName:`content-encoding`,xmlName:`content-encoding`,type:{name:`String`}},cacheControl:{serializedName:`cache-control`,xmlName:`cache-control`,type:{name:`String`}},contentDisposition:{serializedName:`content-disposition`,xmlName:`content-disposition`,type:{name:`String`}},contentLanguage:{serializedName:`content-language`,xmlName:`content-language`,type:{name:`String`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},blobType:{serializedName:`x-ms-blob-type`,xmlName:`x-ms-blob-type`,type:{name:`Enum`,allowedValues:[`BlockBlob`,`PageBlob`,`AppendBlob`]}},copyCompletionTime:{serializedName:`x-ms-copy-completion-time`,xmlName:`x-ms-copy-completion-time`,type:{name:`DateTimeRfc1123`}},copyStatusDescription:{serializedName:`x-ms-copy-status-description`,xmlName:`x-ms-copy-status-description`,type:{name:`String`}},copyId:{serializedName:`x-ms-copy-id`,xmlName:`x-ms-copy-id`,type:{name:`String`}},copyProgress:{serializedName:`x-ms-copy-progress`,xmlName:`x-ms-copy-progress`,type:{name:`String`}},copySource:{serializedName:`x-ms-copy-source`,xmlName:`x-ms-copy-source`,type:{name:`String`}},copyStatus:{serializedName:`x-ms-copy-status`,xmlName:`x-ms-copy-status`,type:{name:`Enum`,allowedValues:[`pending`,`success`,`aborted`,`failed`]}},leaseDuration:{serializedName:`x-ms-lease-duration`,xmlName:`x-ms-lease-duration`,type:{name:`Enum`,allowedValues:[`infinite`,`fixed`]}},leaseState:{serializedName:`x-ms-lease-state`,xmlName:`x-ms-lease-state`,type:{name:`Enum`,allowedValues:[`available`,`leased`,`expired`,`breaking`,`broken`]}},leaseStatus:{serializedName:`x-ms-lease-status`,xmlName:`x-ms-lease-status`,type:{name:`Enum`,allowedValues:[`locked`,`unlocked`]}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},acceptRanges:{serializedName:`accept-ranges`,xmlName:`accept-ranges`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},blobCommittedBlockCount:{serializedName:`x-ms-blob-committed-block-count`,xmlName:`x-ms-blob-committed-block-count`,type:{name:`Number`}},isServerEncrypted:{serializedName:`x-ms-server-encrypted`,xmlName:`x-ms-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},blobContentMD5:{serializedName:`x-ms-blob-content-md5`,xmlName:`x-ms-blob-content-md5`,type:{name:`ByteArray`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},contentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}}}}},PC={serializedName:`Blob_queryExceptionHeaders`,type:{name:`Composite`,className:`BlobQueryExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},FC={serializedName:`Blob_getTagsHeaders`,type:{name:`Composite`,className:`BlobGetTagsHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},IC={serializedName:`Blob_getTagsExceptionHeaders`,type:{name:`Composite`,className:`BlobGetTagsExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},LC={serializedName:`Blob_setTagsHeaders`,type:{name:`Composite`,className:`BlobSetTagsHeaders`,modelProperties:{clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},RC={serializedName:`Blob_setTagsExceptionHeaders`,type:{name:`Composite`,className:`BlobSetTagsExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},zC={serializedName:`PageBlob_createHeaders`,type:{name:`Composite`,className:`PageBlobCreateHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},BC={serializedName:`PageBlob_createExceptionHeaders`,type:{name:`Composite`,className:`PageBlobCreateExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},VC={serializedName:`PageBlob_uploadPagesHeaders`,type:{name:`Composite`,className:`PageBlobUploadPagesHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},HC={serializedName:`PageBlob_uploadPagesExceptionHeaders`,type:{name:`Composite`,className:`PageBlobUploadPagesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},UC={serializedName:`PageBlob_clearPagesHeaders`,type:{name:`Composite`,className:`PageBlobClearPagesHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},WC={serializedName:`PageBlob_clearPagesExceptionHeaders`,type:{name:`Composite`,className:`PageBlobClearPagesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},GC={serializedName:`PageBlob_uploadPagesFromURLHeaders`,type:{name:`Composite`,className:`PageBlobUploadPagesFromURLHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},KC={serializedName:`PageBlob_uploadPagesFromURLExceptionHeaders`,type:{name:`Composite`,className:`PageBlobUploadPagesFromURLExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},copySourceErrorCode:{serializedName:`x-ms-copy-source-error-code`,xmlName:`x-ms-copy-source-error-code`,type:{name:`String`}},copySourceStatusCode:{serializedName:`x-ms-copy-source-status-code`,xmlName:`x-ms-copy-source-status-code`,type:{name:`Number`}}}}},qC={serializedName:`PageBlob_getPageRangesHeaders`,type:{name:`Composite`,className:`PageBlobGetPageRangesHeaders`,modelProperties:{lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},blobContentLength:{serializedName:`x-ms-blob-content-length`,xmlName:`x-ms-blob-content-length`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},JC={serializedName:`PageBlob_getPageRangesExceptionHeaders`,type:{name:`Composite`,className:`PageBlobGetPageRangesExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},YC={serializedName:`PageBlob_getPageRangesDiffHeaders`,type:{name:`Composite`,className:`PageBlobGetPageRangesDiffHeaders`,modelProperties:{lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},blobContentLength:{serializedName:`x-ms-blob-content-length`,xmlName:`x-ms-blob-content-length`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},XC={serializedName:`PageBlob_getPageRangesDiffExceptionHeaders`,type:{name:`Composite`,className:`PageBlobGetPageRangesDiffExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ZC={serializedName:`PageBlob_resizeHeaders`,type:{name:`Composite`,className:`PageBlobResizeHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},QC={serializedName:`PageBlob_resizeExceptionHeaders`,type:{name:`Composite`,className:`PageBlobResizeExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},$C={serializedName:`PageBlob_updateSequenceNumberHeaders`,type:{name:`Composite`,className:`PageBlobUpdateSequenceNumberHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},blobSequenceNumber:{serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ew={serializedName:`PageBlob_updateSequenceNumberExceptionHeaders`,type:{name:`Composite`,className:`PageBlobUpdateSequenceNumberExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},tw={serializedName:`PageBlob_copyIncrementalHeaders`,type:{name:`Composite`,className:`PageBlobCopyIncrementalHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},copyId:{serializedName:`x-ms-copy-id`,xmlName:`x-ms-copy-id`,type:{name:`String`}},copyStatus:{serializedName:`x-ms-copy-status`,xmlName:`x-ms-copy-status`,type:{name:`Enum`,allowedValues:[`pending`,`success`,`aborted`,`failed`]}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},nw={serializedName:`PageBlob_copyIncrementalExceptionHeaders`,type:{name:`Composite`,className:`PageBlobCopyIncrementalExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},rw={serializedName:`AppendBlob_createHeaders`,type:{name:`Composite`,className:`AppendBlobCreateHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},iw={serializedName:`AppendBlob_createExceptionHeaders`,type:{name:`Composite`,className:`AppendBlobCreateExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},aw={serializedName:`AppendBlob_appendBlockHeaders`,type:{name:`Composite`,className:`AppendBlobAppendBlockHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},blobAppendOffset:{serializedName:`x-ms-blob-append-offset`,xmlName:`x-ms-blob-append-offset`,type:{name:`String`}},blobCommittedBlockCount:{serializedName:`x-ms-blob-committed-block-count`,xmlName:`x-ms-blob-committed-block-count`,type:{name:`Number`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},ow={serializedName:`AppendBlob_appendBlockExceptionHeaders`,type:{name:`Composite`,className:`AppendBlobAppendBlockExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},sw={serializedName:`AppendBlob_appendBlockFromUrlHeaders`,type:{name:`Composite`,className:`AppendBlobAppendBlockFromUrlHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},blobAppendOffset:{serializedName:`x-ms-blob-append-offset`,xmlName:`x-ms-blob-append-offset`,type:{name:`String`}},blobCommittedBlockCount:{serializedName:`x-ms-blob-committed-block-count`,xmlName:`x-ms-blob-committed-block-count`,type:{name:`Number`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},cw={serializedName:`AppendBlob_appendBlockFromUrlExceptionHeaders`,type:{name:`Composite`,className:`AppendBlobAppendBlockFromUrlExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},copySourceErrorCode:{serializedName:`x-ms-copy-source-error-code`,xmlName:`x-ms-copy-source-error-code`,type:{name:`String`}},copySourceStatusCode:{serializedName:`x-ms-copy-source-status-code`,xmlName:`x-ms-copy-source-status-code`,type:{name:`Number`}}}}},lw={serializedName:`AppendBlob_sealHeaders`,type:{name:`Composite`,className:`AppendBlobSealHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isSealed:{serializedName:`x-ms-blob-sealed`,xmlName:`x-ms-blob-sealed`,type:{name:`Boolean`}}}}},uw={serializedName:`AppendBlob_sealExceptionHeaders`,type:{name:`Composite`,className:`AppendBlobSealExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},dw={serializedName:`BlockBlob_uploadHeaders`,type:{name:`Composite`,className:`BlockBlobUploadHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},fw={serializedName:`BlockBlob_uploadExceptionHeaders`,type:{name:`Composite`,className:`BlockBlobUploadExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},pw={serializedName:`BlockBlob_putBlobFromUrlHeaders`,type:{name:`Composite`,className:`BlockBlobPutBlobFromUrlHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},mw={serializedName:`BlockBlob_putBlobFromUrlExceptionHeaders`,type:{name:`Composite`,className:`BlockBlobPutBlobFromUrlExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},copySourceErrorCode:{serializedName:`x-ms-copy-source-error-code`,xmlName:`x-ms-copy-source-error-code`,type:{name:`String`}},copySourceStatusCode:{serializedName:`x-ms-copy-source-status-code`,xmlName:`x-ms-copy-source-status-code`,type:{name:`Number`}}}}},hw={serializedName:`BlockBlob_stageBlockHeaders`,type:{name:`Composite`,className:`BlockBlobStageBlockHeaders`,modelProperties:{contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},gw={serializedName:`BlockBlob_stageBlockExceptionHeaders`,type:{name:`Composite`,className:`BlockBlobStageBlockExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},_w={serializedName:`BlockBlob_stageBlockFromURLHeaders`,type:{name:`Composite`,className:`BlockBlobStageBlockFromURLHeaders`,modelProperties:{contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},vw={serializedName:`BlockBlob_stageBlockFromURLExceptionHeaders`,type:{name:`Composite`,className:`BlockBlobStageBlockFromURLExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}},copySourceErrorCode:{serializedName:`x-ms-copy-source-error-code`,xmlName:`x-ms-copy-source-error-code`,type:{name:`String`}},copySourceStatusCode:{serializedName:`x-ms-copy-source-status-code`,xmlName:`x-ms-copy-source-status-code`,type:{name:`Number`}}}}},yw={serializedName:`BlockBlob_commitBlockListHeaders`,type:{name:`Composite`,className:`BlockBlobCommitBlockListHeaders`,modelProperties:{etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},contentMD5:{serializedName:`content-md5`,xmlName:`content-md5`,type:{name:`ByteArray`}},xMsContentCrc64:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},versionId:{serializedName:`x-ms-version-id`,xmlName:`x-ms-version-id`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},isServerEncrypted:{serializedName:`x-ms-request-server-encrypted`,xmlName:`x-ms-request-server-encrypted`,type:{name:`Boolean`}},encryptionKeySha256:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}},encryptionScope:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},bw={serializedName:`BlockBlob_commitBlockListExceptionHeaders`,type:{name:`Composite`,className:`BlockBlobCommitBlockListExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},xw={serializedName:`BlockBlob_getBlockListHeaders`,type:{name:`Composite`,className:`BlockBlobGetBlockListHeaders`,modelProperties:{lastModified:{serializedName:`last-modified`,xmlName:`last-modified`,type:{name:`DateTimeRfc1123`}},etag:{serializedName:`etag`,xmlName:`etag`,type:{name:`String`}},contentType:{serializedName:`content-type`,xmlName:`content-type`,type:{name:`String`}},blobContentLength:{serializedName:`x-ms-blob-content-length`,xmlName:`x-ms-blob-content-length`,type:{name:`Number`}},clientRequestId:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}},requestId:{serializedName:`x-ms-request-id`,xmlName:`x-ms-request-id`,type:{name:`String`}},version:{serializedName:`x-ms-version`,xmlName:`x-ms-version`,type:{name:`String`}},date:{serializedName:`date`,xmlName:`date`,type:{name:`DateTimeRfc1123`}},errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Sw={serializedName:`BlockBlob_getBlockListExceptionHeaders`,type:{name:`Composite`,className:`BlockBlobGetBlockListExceptionHeaders`,modelProperties:{errorCode:{serializedName:`x-ms-error-code`,xmlName:`x-ms-error-code`,type:{name:`String`}}}}},Cw={parameterPath:[`options`,`contentType`],mapper:{defaultValue:`application/xml`,isConstant:!0,serializedName:`Content-Type`,type:{name:`String`}}},ww={parameterPath:`blobServiceProperties`,mapper:ox},Tw={parameterPath:`accept`,mapper:{defaultValue:`application/xml`,isConstant:!0,serializedName:`Accept`,type:{name:`String`}}},Ew={parameterPath:`url`,mapper:{serializedName:`url`,required:!0,xmlName:`url`,type:{name:`String`}},skipEncoding:!0},Dw={parameterPath:`restype`,mapper:{defaultValue:`service`,isConstant:!0,serializedName:`restype`,type:{name:`String`}}},Ow={parameterPath:`comp`,mapper:{defaultValue:`properties`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},kw={parameterPath:[`options`,`timeoutInSeconds`],mapper:{constraints:{InclusiveMinimum:0},serializedName:`timeout`,xmlName:`timeout`,type:{name:`Number`}}},Aw={parameterPath:`version`,mapper:{defaultValue:`2026-02-06`,isConstant:!0,serializedName:`x-ms-version`,type:{name:`String`}}},jw={parameterPath:[`options`,`requestId`],mapper:{serializedName:`x-ms-client-request-id`,xmlName:`x-ms-client-request-id`,type:{name:`String`}}},Mw={parameterPath:`accept`,mapper:{defaultValue:`application/xml`,isConstant:!0,serializedName:`Accept`,type:{name:`String`}}},Nw={parameterPath:`comp`,mapper:{defaultValue:`stats`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},Pw={parameterPath:`comp`,mapper:{defaultValue:`list`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},Fw={parameterPath:[`options`,`prefix`],mapper:{serializedName:`prefix`,xmlName:`prefix`,type:{name:`String`}}},Iw={parameterPath:[`options`,`marker`],mapper:{serializedName:`marker`,xmlName:`marker`,type:{name:`String`}}},Lw={parameterPath:[`options`,`maxPageSize`],mapper:{constraints:{InclusiveMinimum:1},serializedName:`maxresults`,xmlName:`maxresults`,type:{name:`Number`}}},Rw={parameterPath:[`options`,`include`],mapper:{serializedName:`include`,xmlName:`include`,xmlElementName:`ListContainersIncludeType`,type:{name:`Sequence`,element:{type:{name:`Enum`,allowedValues:[`metadata`,`deleted`,`system`]}}}},collectionFormat:`CSV`},zw={parameterPath:`keyInfo`,mapper:vx},Bw={parameterPath:`comp`,mapper:{defaultValue:`userdelegationkey`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},Vw={parameterPath:`restype`,mapper:{defaultValue:`account`,isConstant:!0,serializedName:`restype`,type:{name:`String`}}},Hw={parameterPath:`body`,mapper:{serializedName:`body`,required:!0,xmlName:`body`,type:{name:`Stream`}}},Uw={parameterPath:`comp`,mapper:{defaultValue:`batch`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},Ww={parameterPath:`contentLength`,mapper:{serializedName:`Content-Length`,required:!0,xmlName:`Content-Length`,type:{name:`Number`}}},Gw={parameterPath:`multipartContentType`,mapper:{serializedName:`Content-Type`,required:!0,xmlName:`Content-Type`,type:{name:`String`}}},Kw={parameterPath:`comp`,mapper:{defaultValue:`blobs`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},qw={parameterPath:[`options`,`where`],mapper:{serializedName:`where`,xmlName:`where`,type:{name:`String`}}},Jw={parameterPath:`restype`,mapper:{defaultValue:`container`,isConstant:!0,serializedName:`restype`,type:{name:`String`}}},Yw={parameterPath:[`options`,`metadata`],mapper:{serializedName:`x-ms-meta`,xmlName:`x-ms-meta`,headerCollectionPrefix:`x-ms-meta-`,type:{name:`Dictionary`,value:{type:{name:`String`}}}}},Xw={parameterPath:[`options`,`access`],mapper:{serializedName:`x-ms-blob-public-access`,xmlName:`x-ms-blob-public-access`,type:{name:`Enum`,allowedValues:[`container`,`blob`]}}},Zw={parameterPath:[`options`,`containerEncryptionScope`,`defaultEncryptionScope`],mapper:{serializedName:`x-ms-default-encryption-scope`,xmlName:`x-ms-default-encryption-scope`,type:{name:`String`}}},Qw={parameterPath:[`options`,`containerEncryptionScope`,`preventEncryptionScopeOverride`],mapper:{serializedName:`x-ms-deny-encryption-scope-override`,xmlName:`x-ms-deny-encryption-scope-override`,type:{name:`Boolean`}}},$w={parameterPath:[`options`,`leaseAccessConditions`,`leaseId`],mapper:{serializedName:`x-ms-lease-id`,xmlName:`x-ms-lease-id`,type:{name:`String`}}},eT={parameterPath:[`options`,`modifiedAccessConditions`,`ifModifiedSince`],mapper:{serializedName:`If-Modified-Since`,xmlName:`If-Modified-Since`,type:{name:`DateTimeRfc1123`}}},tT={parameterPath:[`options`,`modifiedAccessConditions`,`ifUnmodifiedSince`],mapper:{serializedName:`If-Unmodified-Since`,xmlName:`If-Unmodified-Since`,type:{name:`DateTimeRfc1123`}}},nT={parameterPath:`comp`,mapper:{defaultValue:`metadata`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},rT={parameterPath:`comp`,mapper:{defaultValue:`acl`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},iT={parameterPath:[`options`,`containerAcl`],mapper:{serializedName:`containerAcl`,xmlName:`SignedIdentifiers`,xmlIsWrapped:!0,xmlElementName:`SignedIdentifier`,type:{name:`Sequence`,element:{type:{name:`Composite`,className:`SignedIdentifier`}}}}},aT={parameterPath:`comp`,mapper:{defaultValue:`undelete`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},oT={parameterPath:[`options`,`deletedContainerName`],mapper:{serializedName:`x-ms-deleted-container-name`,xmlName:`x-ms-deleted-container-name`,type:{name:`String`}}},sT={parameterPath:[`options`,`deletedContainerVersion`],mapper:{serializedName:`x-ms-deleted-container-version`,xmlName:`x-ms-deleted-container-version`,type:{name:`String`}}},cT={parameterPath:`comp`,mapper:{defaultValue:`rename`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},lT={parameterPath:`sourceContainerName`,mapper:{serializedName:`x-ms-source-container-name`,required:!0,xmlName:`x-ms-source-container-name`,type:{name:`String`}}},uT={parameterPath:[`options`,`sourceLeaseId`],mapper:{serializedName:`x-ms-source-lease-id`,xmlName:`x-ms-source-lease-id`,type:{name:`String`}}},dT={parameterPath:`comp`,mapper:{defaultValue:`lease`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},fT={parameterPath:`action`,mapper:{defaultValue:`acquire`,isConstant:!0,serializedName:`x-ms-lease-action`,type:{name:`String`}}},pT={parameterPath:[`options`,`duration`],mapper:{serializedName:`x-ms-lease-duration`,xmlName:`x-ms-lease-duration`,type:{name:`Number`}}},mT={parameterPath:[`options`,`proposedLeaseId`],mapper:{serializedName:`x-ms-proposed-lease-id`,xmlName:`x-ms-proposed-lease-id`,type:{name:`String`}}},hT={parameterPath:`action`,mapper:{defaultValue:`release`,isConstant:!0,serializedName:`x-ms-lease-action`,type:{name:`String`}}},gT={parameterPath:`leaseId`,mapper:{serializedName:`x-ms-lease-id`,required:!0,xmlName:`x-ms-lease-id`,type:{name:`String`}}},_T={parameterPath:`action`,mapper:{defaultValue:`renew`,isConstant:!0,serializedName:`x-ms-lease-action`,type:{name:`String`}}},vT={parameterPath:`action`,mapper:{defaultValue:`break`,isConstant:!0,serializedName:`x-ms-lease-action`,type:{name:`String`}}},yT={parameterPath:[`options`,`breakPeriod`],mapper:{serializedName:`x-ms-lease-break-period`,xmlName:`x-ms-lease-break-period`,type:{name:`Number`}}},bT={parameterPath:`action`,mapper:{defaultValue:`change`,isConstant:!0,serializedName:`x-ms-lease-action`,type:{name:`String`}}},xT={parameterPath:`proposedLeaseId`,mapper:{serializedName:`x-ms-proposed-lease-id`,required:!0,xmlName:`x-ms-proposed-lease-id`,type:{name:`String`}}},ST={parameterPath:[`options`,`include`],mapper:{serializedName:`include`,xmlName:`include`,xmlElementName:`ListBlobsIncludeItem`,type:{name:`Sequence`,element:{type:{name:`Enum`,allowedValues:[`copy`,`deleted`,`metadata`,`snapshots`,`uncommittedblobs`,`versions`,`tags`,`immutabilitypolicy`,`legalhold`,`deletedwithversions`]}}}},collectionFormat:`CSV`},CT={parameterPath:[`options`,`startFrom`],mapper:{serializedName:`startFrom`,xmlName:`startFrom`,type:{name:`String`}}},wT={parameterPath:`delimiter`,mapper:{serializedName:`delimiter`,required:!0,xmlName:`delimiter`,type:{name:`String`}}},TT={parameterPath:[`options`,`snapshot`],mapper:{serializedName:`snapshot`,xmlName:`snapshot`,type:{name:`String`}}},ET={parameterPath:[`options`,`versionId`],mapper:{serializedName:`versionid`,xmlName:`versionid`,type:{name:`String`}}},DT={parameterPath:[`options`,`range`],mapper:{serializedName:`x-ms-range`,xmlName:`x-ms-range`,type:{name:`String`}}},OT={parameterPath:[`options`,`rangeGetContentMD5`],mapper:{serializedName:`x-ms-range-get-content-md5`,xmlName:`x-ms-range-get-content-md5`,type:{name:`Boolean`}}},kT={parameterPath:[`options`,`rangeGetContentCRC64`],mapper:{serializedName:`x-ms-range-get-content-crc64`,xmlName:`x-ms-range-get-content-crc64`,type:{name:`Boolean`}}},AT={parameterPath:[`options`,`cpkInfo`,`encryptionKey`],mapper:{serializedName:`x-ms-encryption-key`,xmlName:`x-ms-encryption-key`,type:{name:`String`}}},jT={parameterPath:[`options`,`cpkInfo`,`encryptionKeySha256`],mapper:{serializedName:`x-ms-encryption-key-sha256`,xmlName:`x-ms-encryption-key-sha256`,type:{name:`String`}}},MT={parameterPath:[`options`,`cpkInfo`,`encryptionAlgorithm`],mapper:{serializedName:`x-ms-encryption-algorithm`,xmlName:`x-ms-encryption-algorithm`,type:{name:`String`}}},NT={parameterPath:[`options`,`modifiedAccessConditions`,`ifMatch`],mapper:{serializedName:`If-Match`,xmlName:`If-Match`,type:{name:`String`}}},PT={parameterPath:[`options`,`modifiedAccessConditions`,`ifNoneMatch`],mapper:{serializedName:`If-None-Match`,xmlName:`If-None-Match`,type:{name:`String`}}},FT={parameterPath:[`options`,`modifiedAccessConditions`,`ifTags`],mapper:{serializedName:`x-ms-if-tags`,xmlName:`x-ms-if-tags`,type:{name:`String`}}},IT={parameterPath:[`options`,`deleteSnapshots`],mapper:{serializedName:`x-ms-delete-snapshots`,xmlName:`x-ms-delete-snapshots`,type:{name:`Enum`,allowedValues:[`include`,`only`]}}},LT={parameterPath:[`options`,`blobDeleteType`],mapper:{serializedName:`deletetype`,xmlName:`deletetype`,type:{name:`String`}}},RT={parameterPath:`comp`,mapper:{defaultValue:`expiry`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},zT={parameterPath:`expiryOptions`,mapper:{serializedName:`x-ms-expiry-option`,required:!0,xmlName:`x-ms-expiry-option`,type:{name:`String`}}},BT={parameterPath:[`options`,`expiresOn`],mapper:{serializedName:`x-ms-expiry-time`,xmlName:`x-ms-expiry-time`,type:{name:`String`}}},VT={parameterPath:[`options`,`blobHttpHeaders`,`blobCacheControl`],mapper:{serializedName:`x-ms-blob-cache-control`,xmlName:`x-ms-blob-cache-control`,type:{name:`String`}}},HT={parameterPath:[`options`,`blobHttpHeaders`,`blobContentType`],mapper:{serializedName:`x-ms-blob-content-type`,xmlName:`x-ms-blob-content-type`,type:{name:`String`}}},UT={parameterPath:[`options`,`blobHttpHeaders`,`blobContentMD5`],mapper:{serializedName:`x-ms-blob-content-md5`,xmlName:`x-ms-blob-content-md5`,type:{name:`ByteArray`}}},WT={parameterPath:[`options`,`blobHttpHeaders`,`blobContentEncoding`],mapper:{serializedName:`x-ms-blob-content-encoding`,xmlName:`x-ms-blob-content-encoding`,type:{name:`String`}}},GT={parameterPath:[`options`,`blobHttpHeaders`,`blobContentLanguage`],mapper:{serializedName:`x-ms-blob-content-language`,xmlName:`x-ms-blob-content-language`,type:{name:`String`}}},KT={parameterPath:[`options`,`blobHttpHeaders`,`blobContentDisposition`],mapper:{serializedName:`x-ms-blob-content-disposition`,xmlName:`x-ms-blob-content-disposition`,type:{name:`String`}}},qT={parameterPath:`comp`,mapper:{defaultValue:`immutabilityPolicies`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},JT={parameterPath:[`options`,`immutabilityPolicyExpiry`],mapper:{serializedName:`x-ms-immutability-policy-until-date`,xmlName:`x-ms-immutability-policy-until-date`,type:{name:`DateTimeRfc1123`}}},YT={parameterPath:[`options`,`immutabilityPolicyMode`],mapper:{serializedName:`x-ms-immutability-policy-mode`,xmlName:`x-ms-immutability-policy-mode`,type:{name:`Enum`,allowedValues:[`Mutable`,`Unlocked`,`Locked`]}}},XT={parameterPath:`comp`,mapper:{defaultValue:`legalhold`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},ZT={parameterPath:`legalHold`,mapper:{serializedName:`x-ms-legal-hold`,required:!0,xmlName:`x-ms-legal-hold`,type:{name:`Boolean`}}},QT={parameterPath:[`options`,`encryptionScope`],mapper:{serializedName:`x-ms-encryption-scope`,xmlName:`x-ms-encryption-scope`,type:{name:`String`}}},$T={parameterPath:`comp`,mapper:{defaultValue:`snapshot`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},eE={parameterPath:[`options`,`tier`],mapper:{serializedName:`x-ms-access-tier`,xmlName:`x-ms-access-tier`,type:{name:`Enum`,allowedValues:[`P4`,`P6`,`P10`,`P15`,`P20`,`P30`,`P40`,`P50`,`P60`,`P70`,`P80`,`Hot`,`Cool`,`Archive`,`Cold`]}}},tE={parameterPath:[`options`,`rehydratePriority`],mapper:{serializedName:`x-ms-rehydrate-priority`,xmlName:`x-ms-rehydrate-priority`,type:{name:`Enum`,allowedValues:[`High`,`Standard`]}}},nE={parameterPath:[`options`,`sourceModifiedAccessConditions`,`sourceIfModifiedSince`],mapper:{serializedName:`x-ms-source-if-modified-since`,xmlName:`x-ms-source-if-modified-since`,type:{name:`DateTimeRfc1123`}}},rE={parameterPath:[`options`,`sourceModifiedAccessConditions`,`sourceIfUnmodifiedSince`],mapper:{serializedName:`x-ms-source-if-unmodified-since`,xmlName:`x-ms-source-if-unmodified-since`,type:{name:`DateTimeRfc1123`}}},iE={parameterPath:[`options`,`sourceModifiedAccessConditions`,`sourceIfMatch`],mapper:{serializedName:`x-ms-source-if-match`,xmlName:`x-ms-source-if-match`,type:{name:`String`}}},aE={parameterPath:[`options`,`sourceModifiedAccessConditions`,`sourceIfNoneMatch`],mapper:{serializedName:`x-ms-source-if-none-match`,xmlName:`x-ms-source-if-none-match`,type:{name:`String`}}},oE={parameterPath:[`options`,`sourceModifiedAccessConditions`,`sourceIfTags`],mapper:{serializedName:`x-ms-source-if-tags`,xmlName:`x-ms-source-if-tags`,type:{name:`String`}}},sE={parameterPath:`copySource`,mapper:{serializedName:`x-ms-copy-source`,required:!0,xmlName:`x-ms-copy-source`,type:{name:`String`}}},cE={parameterPath:[`options`,`blobTagsString`],mapper:{serializedName:`x-ms-tags`,xmlName:`x-ms-tags`,type:{name:`String`}}},lE={parameterPath:[`options`,`sealBlob`],mapper:{serializedName:`x-ms-seal-blob`,xmlName:`x-ms-seal-blob`,type:{name:`Boolean`}}},uE={parameterPath:[`options`,`legalHold`],mapper:{serializedName:`x-ms-legal-hold`,xmlName:`x-ms-legal-hold`,type:{name:`Boolean`}}},dE={parameterPath:`xMsRequiresSync`,mapper:{defaultValue:`true`,isConstant:!0,serializedName:`x-ms-requires-sync`,type:{name:`String`}}},fE={parameterPath:[`options`,`sourceContentMD5`],mapper:{serializedName:`x-ms-source-content-md5`,xmlName:`x-ms-source-content-md5`,type:{name:`ByteArray`}}},pE={parameterPath:[`options`,`copySourceAuthorization`],mapper:{serializedName:`x-ms-copy-source-authorization`,xmlName:`x-ms-copy-source-authorization`,type:{name:`String`}}},mE={parameterPath:[`options`,`copySourceTags`],mapper:{serializedName:`x-ms-copy-source-tag-option`,xmlName:`x-ms-copy-source-tag-option`,type:{name:`Enum`,allowedValues:[`REPLACE`,`COPY`]}}},hE={parameterPath:[`options`,`fileRequestIntent`],mapper:{serializedName:`x-ms-file-request-intent`,xmlName:`x-ms-file-request-intent`,type:{name:`String`}}},gE={parameterPath:`comp`,mapper:{defaultValue:`copy`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},_E={parameterPath:`copyActionAbortConstant`,mapper:{defaultValue:`abort`,isConstant:!0,serializedName:`x-ms-copy-action`,type:{name:`String`}}},vE={parameterPath:`copyId`,mapper:{serializedName:`copyid`,required:!0,xmlName:`copyid`,type:{name:`String`}}},yE={parameterPath:`comp`,mapper:{defaultValue:`tier`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},bE={parameterPath:`tier`,mapper:{serializedName:`x-ms-access-tier`,required:!0,xmlName:`x-ms-access-tier`,type:{name:`Enum`,allowedValues:[`P4`,`P6`,`P10`,`P15`,`P20`,`P30`,`P40`,`P50`,`P60`,`P70`,`P80`,`Hot`,`Cool`,`Archive`,`Cold`]}}},xE={parameterPath:[`options`,`queryRequest`],mapper:Bx},SE={parameterPath:`comp`,mapper:{defaultValue:`query`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},CE={parameterPath:`comp`,mapper:{defaultValue:`tags`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},wE={parameterPath:[`options`,`blobModifiedAccessConditions`,`ifModifiedSince`],mapper:{serializedName:`x-ms-blob-if-modified-since`,xmlName:`x-ms-blob-if-modified-since`,type:{name:`DateTimeRfc1123`}}},TE={parameterPath:[`options`,`blobModifiedAccessConditions`,`ifUnmodifiedSince`],mapper:{serializedName:`x-ms-blob-if-unmodified-since`,xmlName:`x-ms-blob-if-unmodified-since`,type:{name:`DateTimeRfc1123`}}},EE={parameterPath:[`options`,`blobModifiedAccessConditions`,`ifMatch`],mapper:{serializedName:`x-ms-blob-if-match`,xmlName:`x-ms-blob-if-match`,type:{name:`String`}}},DE={parameterPath:[`options`,`blobModifiedAccessConditions`,`ifNoneMatch`],mapper:{serializedName:`x-ms-blob-if-none-match`,xmlName:`x-ms-blob-if-none-match`,type:{name:`String`}}},OE={parameterPath:[`options`,`tags`],mapper:Sx},kE={parameterPath:[`options`,`transactionalContentMD5`],mapper:{serializedName:`Content-MD5`,xmlName:`Content-MD5`,type:{name:`ByteArray`}}},AE={parameterPath:[`options`,`transactionalContentCrc64`],mapper:{serializedName:`x-ms-content-crc64`,xmlName:`x-ms-content-crc64`,type:{name:`ByteArray`}}},jE={parameterPath:`blobType`,mapper:{defaultValue:`PageBlob`,isConstant:!0,serializedName:`x-ms-blob-type`,type:{name:`String`}}},ME={parameterPath:`blobContentLength`,mapper:{serializedName:`x-ms-blob-content-length`,required:!0,xmlName:`x-ms-blob-content-length`,type:{name:`Number`}}},NE={parameterPath:[`options`,`blobSequenceNumber`],mapper:{defaultValue:0,serializedName:`x-ms-blob-sequence-number`,xmlName:`x-ms-blob-sequence-number`,type:{name:`Number`}}},PE={parameterPath:[`options`,`contentType`],mapper:{defaultValue:`application/octet-stream`,isConstant:!0,serializedName:`Content-Type`,type:{name:`String`}}},FE={parameterPath:`body`,mapper:{serializedName:`body`,required:!0,xmlName:`body`,type:{name:`Stream`}}},IE={parameterPath:`accept`,mapper:{defaultValue:`application/xml`,isConstant:!0,serializedName:`Accept`,type:{name:`String`}}},LE={parameterPath:`comp`,mapper:{defaultValue:`page`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},RE={parameterPath:`pageWrite`,mapper:{defaultValue:`update`,isConstant:!0,serializedName:`x-ms-page-write`,type:{name:`String`}}},zE={parameterPath:[`options`,`sequenceNumberAccessConditions`,`ifSequenceNumberLessThanOrEqualTo`],mapper:{serializedName:`x-ms-if-sequence-number-le`,xmlName:`x-ms-if-sequence-number-le`,type:{name:`Number`}}},BE={parameterPath:[`options`,`sequenceNumberAccessConditions`,`ifSequenceNumberLessThan`],mapper:{serializedName:`x-ms-if-sequence-number-lt`,xmlName:`x-ms-if-sequence-number-lt`,type:{name:`Number`}}},VE={parameterPath:[`options`,`sequenceNumberAccessConditions`,`ifSequenceNumberEqualTo`],mapper:{serializedName:`x-ms-if-sequence-number-eq`,xmlName:`x-ms-if-sequence-number-eq`,type:{name:`Number`}}},HE={parameterPath:`pageWrite`,mapper:{defaultValue:`clear`,isConstant:!0,serializedName:`x-ms-page-write`,type:{name:`String`}}},UE={parameterPath:`sourceUrl`,mapper:{serializedName:`x-ms-copy-source`,required:!0,xmlName:`x-ms-copy-source`,type:{name:`String`}}},WE={parameterPath:`sourceRange`,mapper:{serializedName:`x-ms-source-range`,required:!0,xmlName:`x-ms-source-range`,type:{name:`String`}}},GE={parameterPath:[`options`,`sourceContentCrc64`],mapper:{serializedName:`x-ms-source-content-crc64`,xmlName:`x-ms-source-content-crc64`,type:{name:`ByteArray`}}},KE={parameterPath:`range`,mapper:{serializedName:`x-ms-range`,required:!0,xmlName:`x-ms-range`,type:{name:`String`}}},qE={parameterPath:`comp`,mapper:{defaultValue:`pagelist`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},JE={parameterPath:[`options`,`prevsnapshot`],mapper:{serializedName:`prevsnapshot`,xmlName:`prevsnapshot`,type:{name:`String`}}},YE={parameterPath:[`options`,`prevSnapshotUrl`],mapper:{serializedName:`x-ms-previous-snapshot-url`,xmlName:`x-ms-previous-snapshot-url`,type:{name:`String`}}},XE={parameterPath:`sequenceNumberAction`,mapper:{serializedName:`x-ms-sequence-number-action`,required:!0,xmlName:`x-ms-sequence-number-action`,type:{name:`Enum`,allowedValues:[`max`,`update`,`increment`]}}},ZE={parameterPath:`comp`,mapper:{defaultValue:`incrementalcopy`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},QE={parameterPath:`blobType`,mapper:{defaultValue:`AppendBlob`,isConstant:!0,serializedName:`x-ms-blob-type`,type:{name:`String`}}},$E={parameterPath:`comp`,mapper:{defaultValue:`appendblock`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},eD={parameterPath:[`options`,`appendPositionAccessConditions`,`maxSize`],mapper:{serializedName:`x-ms-blob-condition-maxsize`,xmlName:`x-ms-blob-condition-maxsize`,type:{name:`Number`}}},tD={parameterPath:[`options`,`appendPositionAccessConditions`,`appendPosition`],mapper:{serializedName:`x-ms-blob-condition-appendpos`,xmlName:`x-ms-blob-condition-appendpos`,type:{name:`Number`}}},nD={parameterPath:[`options`,`sourceRange`],mapper:{serializedName:`x-ms-source-range`,xmlName:`x-ms-source-range`,type:{name:`String`}}},rD={parameterPath:`comp`,mapper:{defaultValue:`seal`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},iD={parameterPath:`blobType`,mapper:{defaultValue:`BlockBlob`,isConstant:!0,serializedName:`x-ms-blob-type`,type:{name:`String`}}},aD={parameterPath:[`options`,`copySourceBlobProperties`],mapper:{serializedName:`x-ms-copy-source-blob-properties`,xmlName:`x-ms-copy-source-blob-properties`,type:{name:`Boolean`}}},oD={parameterPath:`comp`,mapper:{defaultValue:`block`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},sD={parameterPath:`blockId`,mapper:{serializedName:`blockid`,required:!0,xmlName:`blockid`,type:{name:`String`}}},cD={parameterPath:`blocks`,mapper:Px},lD={parameterPath:`comp`,mapper:{defaultValue:`blocklist`,isConstant:!0,serializedName:`comp`,type:{name:`String`}}},uD={parameterPath:`listType`,mapper:{defaultValue:`committed`,serializedName:`blocklisttype`,required:!0,xmlName:`blocklisttype`,type:{name:`Enum`,allowedValues:[`committed`,`uncommitted`,`all`]}}};var dD=class{client;constructor(e){this.client=e}setProperties(e,t){return this.client.sendOperationRequest({blobServiceProperties:e,options:t},pD)}getProperties(e){return this.client.sendOperationRequest({options:e},mD)}getStatistics(e){return this.client.sendOperationRequest({options:e},hD)}listContainersSegment(e){return this.client.sendOperationRequest({options:e},gD)}getUserDelegationKey(e,t){return this.client.sendOperationRequest({keyInfo:e,options:t},_D)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},vD)}submitBatch(e,t,n,r){return this.client.sendOperationRequest({contentLength:e,multipartContentType:t,body:n,options:r},yD)}filterBlobs(e){return this.client.sendOperationRequest({options:e},bD)}};const fD=$h(ax,!0),pD={path:`/`,httpMethod:`PUT`,responses:{202:{headersMapper:qx},default:{bodyMapper:fx,headersMapper:Jx}},requestBody:ww,queryParameters:[Dw,Ow,kw],urlParameters:[Ew],headerParameters:[Cw,Tw,Aw,jw],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:fD},mD={path:`/`,httpMethod:`GET`,responses:{200:{bodyMapper:ox,headersMapper:Yx},default:{bodyMapper:fx,headersMapper:Xx}},queryParameters:[Dw,Ow,kw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw],isXML:!0,serializer:fD},hD={path:`/`,httpMethod:`GET`,responses:{200:{bodyMapper:px,headersMapper:Zx},default:{bodyMapper:fx,headersMapper:Qx}},queryParameters:[Dw,kw,Nw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw],isXML:!0,serializer:fD},gD={path:`/`,httpMethod:`GET`,responses:{200:{bodyMapper:hx,headersMapper:$x},default:{bodyMapper:fx,headersMapper:eS}},queryParameters:[kw,Pw,Fw,Iw,Lw,Rw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw],isXML:!0,serializer:fD},_D={path:`/`,httpMethod:`POST`,responses:{200:{bodyMapper:yx,headersMapper:tS},default:{bodyMapper:fx,headersMapper:nS}},requestBody:zw,queryParameters:[Dw,kw,Bw],urlParameters:[Ew],headerParameters:[Cw,Tw,Aw,jw],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:fD},vD={path:`/`,httpMethod:`GET`,responses:{200:{headersMapper:rS},default:{bodyMapper:fx,headersMapper:iS}},queryParameters:[Ow,kw,Vw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw],isXML:!0,serializer:fD},yD={path:`/`,httpMethod:`POST`,responses:{202:{bodyMapper:{type:{name:`Stream`},serializedName:`parsedResponse`},headersMapper:aS},default:{bodyMapper:fx,headersMapper:oS}},requestBody:Hw,queryParameters:[kw,Uw],urlParameters:[Ew],headerParameters:[Tw,Aw,jw,Ww,Gw],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:fD},bD={path:`/`,httpMethod:`GET`,responses:{200:{bodyMapper:bx,headersMapper:sS},default:{bodyMapper:fx,headersMapper:cS}},queryParameters:[kw,Iw,Lw,Kw,qw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw],isXML:!0,serializer:fD};var xD=class{client;constructor(e){this.client=e}create(e){return this.client.sendOperationRequest({options:e},CD)}getProperties(e){return this.client.sendOperationRequest({options:e},wD)}delete(e){return this.client.sendOperationRequest({options:e},TD)}setMetadata(e){return this.client.sendOperationRequest({options:e},ED)}getAccessPolicy(e){return this.client.sendOperationRequest({options:e},DD)}setAccessPolicy(e){return this.client.sendOperationRequest({options:e},OD)}restore(e){return this.client.sendOperationRequest({options:e},kD)}rename(e,t){return this.client.sendOperationRequest({sourceContainerName:e,options:t},AD)}submitBatch(e,t,n,r){return this.client.sendOperationRequest({contentLength:e,multipartContentType:t,body:n,options:r},jD)}filterBlobs(e){return this.client.sendOperationRequest({options:e},MD)}acquireLease(e){return this.client.sendOperationRequest({options:e},ND)}releaseLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},PD)}renewLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},FD)}breakLease(e){return this.client.sendOperationRequest({options:e},ID)}changeLease(e,t,n){return this.client.sendOperationRequest({leaseId:e,proposedLeaseId:t,options:n},LD)}listBlobFlatSegment(e){return this.client.sendOperationRequest({options:e},RD)}listBlobHierarchySegment(e,t){return this.client.sendOperationRequest({delimiter:e,options:t},zD)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},BD)}};const SD=$h(ax,!0),CD={path:`/{containerName}`,httpMethod:`PUT`,responses:{201:{headersMapper:lS},default:{bodyMapper:fx,headersMapper:uS}},queryParameters:[kw,Jw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Yw,Xw,Zw,Qw],isXML:!0,serializer:SD},wD={path:`/{containerName}`,httpMethod:`GET`,responses:{200:{headersMapper:dS},default:{bodyMapper:fx,headersMapper:fS}},queryParameters:[kw,Jw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w],isXML:!0,serializer:SD},TD={path:`/{containerName}`,httpMethod:`DELETE`,responses:{202:{headersMapper:pS},default:{bodyMapper:fx,headersMapper:mS}},queryParameters:[kw,Jw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,eT,tT],isXML:!0,serializer:SD},ED={path:`/{containerName}`,httpMethod:`PUT`,responses:{200:{headersMapper:hS},default:{bodyMapper:fx,headersMapper:gS}},queryParameters:[kw,Jw,nT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Yw,$w,eT],isXML:!0,serializer:SD},DD={path:`/{containerName}`,httpMethod:`GET`,responses:{200:{bodyMapper:{type:{name:`Sequence`,element:{type:{name:`Composite`,className:`SignedIdentifier`}}},serializedName:`SignedIdentifiers`,xmlName:`SignedIdentifiers`,xmlIsWrapped:!0,xmlElementName:`SignedIdentifier`},headersMapper:_S},default:{bodyMapper:fx,headersMapper:vS}},queryParameters:[kw,Jw,rT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w],isXML:!0,serializer:SD},OD={path:`/{containerName}`,httpMethod:`PUT`,responses:{200:{headersMapper:yS},default:{bodyMapper:fx,headersMapper:bS}},requestBody:iT,queryParameters:[kw,Jw,rT],urlParameters:[Ew],headerParameters:[Cw,Tw,Aw,jw,Xw,$w,eT,tT],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:SD},kD={path:`/{containerName}`,httpMethod:`PUT`,responses:{201:{headersMapper:xS},default:{bodyMapper:fx,headersMapper:SS}},queryParameters:[kw,Jw,aT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,oT,sT],isXML:!0,serializer:SD},AD={path:`/{containerName}`,httpMethod:`PUT`,responses:{200:{headersMapper:CS},default:{bodyMapper:fx,headersMapper:wS}},queryParameters:[kw,Jw,cT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,lT,uT],isXML:!0,serializer:SD},jD={path:`/{containerName}`,httpMethod:`POST`,responses:{202:{bodyMapper:{type:{name:`Stream`},serializedName:`parsedResponse`},headersMapper:TS},default:{bodyMapper:fx,headersMapper:ES}},requestBody:Hw,queryParameters:[kw,Uw,Jw],urlParameters:[Ew],headerParameters:[Tw,Aw,jw,Ww,Gw],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:SD},MD={path:`/{containerName}`,httpMethod:`GET`,responses:{200:{bodyMapper:bx,headersMapper:DS},default:{bodyMapper:fx,headersMapper:OS}},queryParameters:[kw,Iw,Lw,Kw,qw,Jw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw],isXML:!0,serializer:SD},ND={path:`/{containerName}`,httpMethod:`PUT`,responses:{201:{headersMapper:kS},default:{bodyMapper:fx,headersMapper:AS}},queryParameters:[kw,Jw,dT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,eT,tT,fT,pT,mT],isXML:!0,serializer:SD},PD={path:`/{containerName}`,httpMethod:`PUT`,responses:{200:{headersMapper:jS},default:{bodyMapper:fx,headersMapper:MS}},queryParameters:[kw,Jw,dT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,eT,tT,hT,gT],isXML:!0,serializer:SD},FD={path:`/{containerName}`,httpMethod:`PUT`,responses:{200:{headersMapper:NS},default:{bodyMapper:fx,headersMapper:PS}},queryParameters:[kw,Jw,dT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,eT,tT,gT,_T],isXML:!0,serializer:SD},ID={path:`/{containerName}`,httpMethod:`PUT`,responses:{202:{headersMapper:FS},default:{bodyMapper:fx,headersMapper:IS}},queryParameters:[kw,Jw,dT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,eT,tT,vT,yT],isXML:!0,serializer:SD},LD={path:`/{containerName}`,httpMethod:`PUT`,responses:{200:{headersMapper:LS},default:{bodyMapper:fx,headersMapper:RS}},queryParameters:[kw,Jw,dT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,eT,tT,gT,bT,xT],isXML:!0,serializer:SD},RD={path:`/{containerName}`,httpMethod:`GET`,responses:{200:{bodyMapper:Ex,headersMapper:zS},default:{bodyMapper:fx,headersMapper:BS}},queryParameters:[kw,Pw,Fw,Iw,Lw,Jw,ST,CT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw],isXML:!0,serializer:SD},zD={path:`/{containerName}`,httpMethod:`GET`,responses:{200:{bodyMapper:jx,headersMapper:VS},default:{bodyMapper:fx,headersMapper:HS}},queryParameters:[kw,Pw,Fw,Iw,Lw,Jw,ST,CT,wT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw],isXML:!0,serializer:SD},BD={path:`/{containerName}`,httpMethod:`GET`,responses:{200:{headersMapper:US},default:{bodyMapper:fx,headersMapper:WS}},queryParameters:[Ow,kw,Vw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw],isXML:!0,serializer:SD};var VD=class{client;constructor(e){this.client=e}download(e){return this.client.sendOperationRequest({options:e},UD)}getProperties(e){return this.client.sendOperationRequest({options:e},WD)}delete(e){return this.client.sendOperationRequest({options:e},GD)}undelete(e){return this.client.sendOperationRequest({options:e},KD)}setExpiry(e,t){return this.client.sendOperationRequest({expiryOptions:e,options:t},qD)}setHttpHeaders(e){return this.client.sendOperationRequest({options:e},JD)}setImmutabilityPolicy(e){return this.client.sendOperationRequest({options:e},YD)}deleteImmutabilityPolicy(e){return this.client.sendOperationRequest({options:e},XD)}setLegalHold(e,t){return this.client.sendOperationRequest({legalHold:e,options:t},ZD)}setMetadata(e){return this.client.sendOperationRequest({options:e},QD)}acquireLease(e){return this.client.sendOperationRequest({options:e},$D)}releaseLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},eO)}renewLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},tO)}changeLease(e,t,n){return this.client.sendOperationRequest({leaseId:e,proposedLeaseId:t,options:n},nO)}breakLease(e){return this.client.sendOperationRequest({options:e},rO)}createSnapshot(e){return this.client.sendOperationRequest({options:e},iO)}startCopyFromURL(e,t){return this.client.sendOperationRequest({copySource:e,options:t},aO)}copyFromURL(e,t){return this.client.sendOperationRequest({copySource:e,options:t},oO)}abortCopyFromURL(e,t){return this.client.sendOperationRequest({copyId:e,options:t},sO)}setTier(e,t){return this.client.sendOperationRequest({tier:e,options:t},cO)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},lO)}query(e){return this.client.sendOperationRequest({options:e},uO)}getTags(e){return this.client.sendOperationRequest({options:e},dO)}setTags(e){return this.client.sendOperationRequest({options:e},fO)}};const HD=$h(ax,!0),UD={path:`/{containerName}/{blob}`,httpMethod:`GET`,responses:{200:{bodyMapper:{type:{name:`Stream`},serializedName:`parsedResponse`},headersMapper:GS},206:{bodyMapper:{type:{name:`Stream`},serializedName:`parsedResponse`},headersMapper:GS},default:{bodyMapper:fx,headersMapper:KS}},queryParameters:[kw,TT,ET],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,eT,tT,DT,OT,kT,AT,jT,MT,NT,PT,FT],isXML:!0,serializer:HD},WD={path:`/{containerName}/{blob}`,httpMethod:`HEAD`,responses:{200:{headersMapper:qS},default:{bodyMapper:fx,headersMapper:JS}},queryParameters:[kw,TT,ET],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,eT,tT,AT,jT,MT,NT,PT,FT],isXML:!0,serializer:HD},GD={path:`/{containerName}/{blob}`,httpMethod:`DELETE`,responses:{202:{headersMapper:YS},default:{bodyMapper:fx,headersMapper:XS}},queryParameters:[kw,TT,ET,LT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,eT,tT,NT,PT,FT,IT],isXML:!0,serializer:HD},KD={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:ZS},default:{bodyMapper:fx,headersMapper:QS}},queryParameters:[kw,aT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw],isXML:!0,serializer:HD},qD={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:$S},default:{bodyMapper:fx,headersMapper:eC}},queryParameters:[kw,RT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,zT,BT],isXML:!0,serializer:HD},JD={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:tC},default:{bodyMapper:fx,headersMapper:nC}},queryParameters:[Ow,kw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,eT,tT,NT,PT,FT,VT,HT,UT,WT,GT,KT],isXML:!0,serializer:HD},YD={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:rC},default:{bodyMapper:fx,headersMapper:iC}},queryParameters:[kw,TT,ET,qT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,tT,JT,YT],isXML:!0,serializer:HD},XD={path:`/{containerName}/{blob}`,httpMethod:`DELETE`,responses:{200:{headersMapper:aC},default:{bodyMapper:fx,headersMapper:oC}},queryParameters:[kw,TT,ET,qT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw],isXML:!0,serializer:HD},ZD={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:sC},default:{bodyMapper:fx,headersMapper:cC}},queryParameters:[kw,TT,ET,XT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,ZT],isXML:!0,serializer:HD},QD={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:lC},default:{bodyMapper:fx,headersMapper:uC}},queryParameters:[kw,nT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Yw,$w,eT,tT,AT,jT,MT,NT,PT,FT,QT],isXML:!0,serializer:HD},$D={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:dC},default:{bodyMapper:fx,headersMapper:fC}},queryParameters:[kw,dT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,eT,tT,fT,pT,mT,NT,PT,FT],isXML:!0,serializer:HD},eO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:pC},default:{bodyMapper:fx,headersMapper:mC}},queryParameters:[kw,dT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,eT,tT,hT,gT,NT,PT,FT],isXML:!0,serializer:HD},tO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:hC},default:{bodyMapper:fx,headersMapper:gC}},queryParameters:[kw,dT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,eT,tT,gT,_T,NT,PT,FT],isXML:!0,serializer:HD},nO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:_C},default:{bodyMapper:fx,headersMapper:vC}},queryParameters:[kw,dT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,eT,tT,gT,bT,xT,NT,PT,FT],isXML:!0,serializer:HD},rO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{202:{headersMapper:yC},default:{bodyMapper:fx,headersMapper:bC}},queryParameters:[kw,dT],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,eT,tT,vT,yT,NT,PT,FT],isXML:!0,serializer:HD},iO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:xC},default:{bodyMapper:fx,headersMapper:SC}},queryParameters:[kw,$T],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Yw,$w,eT,tT,AT,jT,MT,NT,PT,FT,QT],isXML:!0,serializer:HD},aO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{202:{headersMapper:CC},default:{bodyMapper:fx,headersMapper:wC}},queryParameters:[kw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Yw,$w,eT,tT,NT,PT,FT,JT,YT,eE,tE,nE,rE,iE,aE,oE,sE,cE,lE,uE],isXML:!0,serializer:HD},oO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{202:{headersMapper:TC},default:{bodyMapper:fx,headersMapper:EC}},queryParameters:[kw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Yw,$w,eT,tT,NT,PT,FT,JT,YT,QT,eE,nE,rE,iE,aE,sE,cE,uE,dE,fE,pE,mE,hE],isXML:!0,serializer:HD},sO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{204:{headersMapper:DC},default:{bodyMapper:fx,headersMapper:OC}},queryParameters:[kw,gE,vE],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,_E],isXML:!0,serializer:HD},cO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:kC},202:{headersMapper:kC},default:{bodyMapper:fx,headersMapper:AC}},queryParameters:[kw,TT,ET,yE],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,FT,tE,bE],isXML:!0,serializer:HD},lO={path:`/{containerName}/{blob}`,httpMethod:`GET`,responses:{200:{headersMapper:jC},default:{bodyMapper:fx,headersMapper:MC}},queryParameters:[Ow,kw,Vw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw],isXML:!0,serializer:HD},uO={path:`/{containerName}/{blob}`,httpMethod:`POST`,responses:{200:{bodyMapper:{type:{name:`Stream`},serializedName:`parsedResponse`},headersMapper:NC},206:{bodyMapper:{type:{name:`Stream`},serializedName:`parsedResponse`},headersMapper:NC},default:{bodyMapper:fx,headersMapper:PC}},requestBody:xE,queryParameters:[kw,TT,SE],urlParameters:[Ew],headerParameters:[Cw,Tw,Aw,jw,$w,eT,tT,AT,jT,MT,NT,PT,FT],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:HD},dO={path:`/{containerName}/{blob}`,httpMethod:`GET`,responses:{200:{bodyMapper:Sx,headersMapper:FC},default:{bodyMapper:fx,headersMapper:IC}},queryParameters:[kw,TT,ET,CE],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,FT,wE,TE,EE,DE],isXML:!0,serializer:HD},fO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{204:{headersMapper:LC},default:{bodyMapper:fx,headersMapper:RC}},requestBody:OE,queryParameters:[kw,ET,CE],urlParameters:[Ew],headerParameters:[Cw,Tw,Aw,jw,$w,FT,wE,TE,EE,DE,kE,AE],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:HD};var pO=class{client;constructor(e){this.client=e}create(e,t,n){return this.client.sendOperationRequest({contentLength:e,blobContentLength:t,options:n},hO)}uploadPages(e,t,n){return this.client.sendOperationRequest({contentLength:e,body:t,options:n},gO)}clearPages(e,t){return this.client.sendOperationRequest({contentLength:e,options:t},_O)}uploadPagesFromURL(e,t,n,r,i){return this.client.sendOperationRequest({sourceUrl:e,sourceRange:t,contentLength:n,range:r,options:i},vO)}getPageRanges(e){return this.client.sendOperationRequest({options:e},yO)}getPageRangesDiff(e){return this.client.sendOperationRequest({options:e},bO)}resize(e,t){return this.client.sendOperationRequest({blobContentLength:e,options:t},xO)}updateSequenceNumber(e,t){return this.client.sendOperationRequest({sequenceNumberAction:e,options:t},SO)}copyIncremental(e,t){return this.client.sendOperationRequest({copySource:e,options:t},CO)}};const mO=$h(ax,!0),hO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:zC},default:{bodyMapper:fx,headersMapper:BC}},queryParameters:[kw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Ww,Yw,$w,eT,tT,AT,jT,MT,NT,PT,FT,VT,HT,UT,WT,GT,KT,JT,YT,QT,eE,cE,uE,jE,ME,NE],isXML:!0,serializer:mO},gO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:VC},default:{bodyMapper:fx,headersMapper:HC}},requestBody:FE,queryParameters:[kw,LE],urlParameters:[Ew],headerParameters:[Aw,jw,Ww,$w,eT,tT,DT,AT,jT,MT,NT,PT,FT,QT,kE,AE,PE,IE,RE,zE,BE,VE],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`binary`,serializer:mO},_O={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:UC},default:{bodyMapper:fx,headersMapper:WC}},queryParameters:[kw,LE],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Ww,$w,eT,tT,DT,AT,jT,MT,NT,PT,FT,QT,zE,BE,VE,HE],isXML:!0,serializer:mO},vO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:GC},default:{bodyMapper:fx,headersMapper:KC}},queryParameters:[kw,LE],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Ww,$w,eT,tT,AT,jT,MT,NT,PT,FT,QT,nE,rE,iE,aE,fE,pE,hE,RE,zE,BE,VE,UE,WE,GE,KE],isXML:!0,serializer:mO},yO={path:`/{containerName}/{blob}`,httpMethod:`GET`,responses:{200:{bodyMapper:Lx,headersMapper:qC},default:{bodyMapper:fx,headersMapper:JC}},queryParameters:[kw,Iw,Lw,TT,qE],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,eT,tT,DT,NT,PT,FT],isXML:!0,serializer:mO},bO={path:`/{containerName}/{blob}`,httpMethod:`GET`,responses:{200:{bodyMapper:Lx,headersMapper:YC},default:{bodyMapper:fx,headersMapper:XC}},queryParameters:[kw,Iw,Lw,TT,qE,JE],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,eT,tT,DT,NT,PT,FT,YE],isXML:!0,serializer:mO},xO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:ZC},default:{bodyMapper:fx,headersMapper:QC}},queryParameters:[Ow,kw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,eT,tT,AT,jT,MT,NT,PT,FT,QT,ME],isXML:!0,serializer:mO},SO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:$C},default:{bodyMapper:fx,headersMapper:ew}},queryParameters:[Ow,kw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,eT,tT,NT,PT,FT,NE,XE],isXML:!0,serializer:mO},CO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{202:{headersMapper:tw},default:{bodyMapper:fx,headersMapper:nw}},queryParameters:[kw,ZE],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,eT,tT,NT,PT,FT,sE],isXML:!0,serializer:mO};var wO=class{client;constructor(e){this.client=e}create(e,t){return this.client.sendOperationRequest({contentLength:e,options:t},EO)}appendBlock(e,t,n){return this.client.sendOperationRequest({contentLength:e,body:t,options:n},DO)}appendBlockFromUrl(e,t,n){return this.client.sendOperationRequest({sourceUrl:e,contentLength:t,options:n},OO)}seal(e){return this.client.sendOperationRequest({options:e},kO)}};const TO=$h(ax,!0),EO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:rw},default:{bodyMapper:fx,headersMapper:iw}},queryParameters:[kw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Ww,Yw,$w,eT,tT,AT,jT,MT,NT,PT,FT,VT,HT,UT,WT,GT,KT,JT,YT,QT,cE,uE,QE],isXML:!0,serializer:TO},DO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:aw},default:{bodyMapper:fx,headersMapper:ow}},requestBody:FE,queryParameters:[kw,$E],urlParameters:[Ew],headerParameters:[Aw,jw,Ww,$w,eT,tT,AT,jT,MT,NT,PT,FT,QT,kE,AE,PE,IE,eD,tD],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`binary`,serializer:TO},OO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:sw},default:{bodyMapper:fx,headersMapper:cw}},queryParameters:[kw,$E],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Ww,$w,eT,tT,AT,jT,MT,NT,PT,FT,QT,nE,rE,iE,aE,fE,pE,hE,kE,UE,GE,eD,tD,nD],isXML:!0,serializer:TO},kO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{200:{headersMapper:lw},default:{bodyMapper:fx,headersMapper:uw}},queryParameters:[kw,rD],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,eT,tT,NT,PT,tD],isXML:!0,serializer:TO};var AO=class{client;constructor(e){this.client=e}upload(e,t,n){return this.client.sendOperationRequest({contentLength:e,body:t,options:n},MO)}putBlobFromUrl(e,t,n){return this.client.sendOperationRequest({contentLength:e,copySource:t,options:n},NO)}stageBlock(e,t,n,r){return this.client.sendOperationRequest({blockId:e,contentLength:t,body:n,options:r},PO)}stageBlockFromURL(e,t,n,r){return this.client.sendOperationRequest({blockId:e,contentLength:t,sourceUrl:n,options:r},FO)}commitBlockList(e,t){return this.client.sendOperationRequest({blocks:e,options:t},IO)}getBlockList(e,t){return this.client.sendOperationRequest({listType:e,options:t},LO)}};const jO=$h(ax,!0),MO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:dw},default:{bodyMapper:fx,headersMapper:fw}},requestBody:FE,queryParameters:[kw],urlParameters:[Ew],headerParameters:[Aw,jw,Ww,Yw,$w,eT,tT,AT,jT,MT,NT,PT,FT,VT,HT,UT,WT,GT,KT,JT,YT,QT,eE,cE,uE,kE,AE,PE,IE,iD],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`binary`,serializer:jO},NO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:pw},default:{bodyMapper:fx,headersMapper:mw}},queryParameters:[kw],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Ww,Yw,$w,eT,tT,AT,jT,MT,NT,PT,FT,VT,HT,UT,WT,GT,KT,QT,eE,nE,rE,iE,aE,oE,sE,cE,fE,pE,mE,hE,kE,iD,aD],isXML:!0,serializer:jO},PO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:hw},default:{bodyMapper:fx,headersMapper:gw}},requestBody:FE,queryParameters:[kw,oD,sD],urlParameters:[Ew],headerParameters:[Aw,jw,Ww,$w,AT,jT,MT,QT,kE,AE,PE,IE],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`binary`,serializer:jO},FO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:_w},default:{bodyMapper:fx,headersMapper:vw}},queryParameters:[kw,oD,sD],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,Ww,$w,AT,jT,MT,QT,nE,rE,iE,aE,fE,pE,hE,UE,GE,nD],isXML:!0,serializer:jO},IO={path:`/{containerName}/{blob}`,httpMethod:`PUT`,responses:{201:{headersMapper:yw},default:{bodyMapper:fx,headersMapper:bw}},requestBody:cD,queryParameters:[kw,lD],urlParameters:[Ew],headerParameters:[Cw,Tw,Aw,jw,Yw,$w,eT,tT,AT,jT,MT,NT,PT,FT,VT,HT,UT,WT,GT,KT,JT,YT,QT,eE,cE,uE,kE,AE],isXML:!0,contentType:`application/xml; charset=utf-8`,mediaType:`xml`,serializer:jO},LO={path:`/{containerName}/{blob}`,httpMethod:`GET`,responses:{200:{bodyMapper:Fx,headersMapper:xw},default:{bodyMapper:fx,headersMapper:Sw}},queryParameters:[kw,TT,lD,uD],urlParameters:[Ew],headerParameters:[Aw,jw,Mw,$w,FT],isXML:!0,serializer:jO};var RO=class extends k_{url;version;constructor(e,t){if(e===void 0)throw Error(`'url' cannot be null`);t||={};let n={requestContentType:`application/json; charset=utf-8`},r=`azsdk-js-azure-storage-blob/12.30.0`,i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${r}`:`${r}`,a={...n,...t,userAgentOptions:{userAgentPrefix:i},endpoint:t.endpoint??t.baseUri??`{url}`};super(a),this.url=e,this.version=t.version||`2026-02-06`,this.service=new dD(this),this.container=new xD(this),this.blob=new VD(this),this.pageBlob=new pO(this),this.appendBlob=new wO(this),this.blockBlob=new AO(this)}service;container;blob;pageBlob;appendBlob;blockBlob},zO=class extends RO{async sendOperationRequest(e,t){let n={...t};return(n.path===`/{containerName}`||n.path===`/{containerName}/{blob}`)&&(n.path=``),super.sendOperationRequest(e,n)}};function BO(e){let t=new URL(e),n=t.pathname;return n||=`/`,n=WO(n),t.pathname=n,t.toString()}function VO(e){let t=``;if(e.search(`DevelopmentStorageProxyUri=`)!==-1){let n=e.split(`;`);for(let e of n)e.trim().startsWith(`DevelopmentStorageProxyUri=`)&&(t=e.trim().match(`DevelopmentStorageProxyUri=(.*)`)[1])}return t}function HO(e,t){let n=e.split(`;`);for(let e of n)if(e.trim().startsWith(t))return e.trim().match(t+`=(.*)`)[1];return``}function UO(e){let t=``;e.startsWith(`UseDevelopmentStorage=true`)&&(t=VO(e),e=`DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`);let n=HO(e,`BlobEndpoint`);if(n=n.endsWith(`/`)?n.slice(0,-1):n,e.search(`DefaultEndpointsProtocol=`)!==-1&&e.search(`AccountKey=`)!==-1){let r=``,i=``,a=Buffer.from(`accountKey`,`base64`),o=``;if(i=HO(e,`AccountName`),a=Buffer.from(HO(e,`AccountKey`),`base64`),!n){r=HO(e,`DefaultEndpointsProtocol`);let t=r.toLowerCase();if(t!==`https`&&t!==`http`)throw Error(`Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'`);if(o=HO(e,`EndpointSuffix`),!o)throw Error(`Invalid EndpointSuffix in the provided Connection String`);n=`${r}://${i}.blob.${o}`}if(!i)throw Error(`Invalid AccountName in the provided Connection String`);if(a.length===0)throw Error(`Invalid AccountKey in the provided Connection String`);return{kind:`AccountConnString`,url:n,accountName:i,accountKey:a,proxyUri:t}}else{let t=HO(e,`SharedAccessSignature`),r=HO(e,`AccountName`);if(r||=tk(n),!n)throw Error(`Invalid BlobEndpoint in the provided SAS Connection String`);if(!t)throw Error(`Invalid SharedAccessSignature in the provided SAS Connection String`);return t.startsWith(`?`)&&(t=t.substring(1)),{kind:`SASConnString`,url:n,accountName:r,accountSas:t}}}function WO(e){return encodeURIComponent(e).replace(/%2F/g,`/`).replace(/'/g,`%27`).replace(/\+/g,`%20`).replace(/%25/g,`%`)}function GO(e,t){let n=new URL(e),r=n.pathname;return r=r?r.endsWith(`/`)?`${r}${t}`:`${r}/${t}`:t,n.pathname=r,n.toString()}function KO(e,t,n){let r=new URL(e),i=encodeURIComponent(t),a=n?encodeURIComponent(n):void 0,o=r.search===``?`?`:r.search,s=[];for(let e of o.slice(1).split(`&`))if(e){let[t]=e.split(`=`,2);t!==i&&s.push(e)}return a&&s.push(`${i}=${a}`),r.search=s.length?`?${s.join(`&`)}`:``,r.toString()}function qO(e,t){return new URL(e).searchParams.get(t)??void 0}function JO(e){try{let t=new URL(e);return t.protocol.endsWith(`:`)?t.protocol.slice(0,-1):t.protocol}catch{return}}function YO(e,t){let n=new URL(e),r=n.search;return r?r+=`&`+t:r=t,n.search=r,n.toString()}function XO(e,t=!0){let n=e.toISOString();return t?n.substring(0,n.length-1)+`0000Z`:n.substring(0,n.length-5)+`Z`}function ZO(e){return Jm?Buffer.from(e).toString(`base64`):btoa(e)}function QO(e,t){return e.length>42&&(e=e.slice(0,42)),ZO(e+$O(t.toString(),48-e.length,`0`))}function $O(e,t,n=` `){return String.prototype.padStart?e.padStart(t,n):(n||=` `,e.length>t?e:(t-=e.length,t>n.length&&(n+=n.repeat(t/n.length)),n.slice(0,t)+e))}function ek(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function tk(e){let t=new URL(e),n;try{return n=t.hostname.split(`.`)[1]===`blob`?t.hostname.split(`.`)[0]:nk(t)?t.pathname.split(`/`)[1]:``,n}catch{throw Error(`Unable to extract accountName with provided information.`)}}function nk(e){let t=e.host;return/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(t)||!!e.port&&Wb.includes(e.port)}function rk(e){if(e===void 0)return;let t=[];for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=e[n];t.push(`${encodeURIComponent(n)}=${encodeURIComponent(r)}`)}return t.join(`&`)}function ik(e){if(e===void 0)return;let t={blobTagSet:[]};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=e[n];t.blobTagSet.push({key:n,value:r})}return t}function ak(e){if(e===void 0)return;let t={};for(let n of e.blobTagSet)t[n.key]=n.value;return t}function ok(e){if(e!==void 0)switch(e.kind){case`csv`:return{format:{type:`delimited`,delimitedTextConfiguration:{columnSeparator:e.columnSeparator||`,`,fieldQuote:e.fieldQuote||``,recordSeparator:e.recordSeparator,escapeChar:e.escapeCharacter||``,headersPresent:e.hasHeaders||!1}}};case`json`:return{format:{type:`json`,jsonTextConfiguration:{recordSeparator:e.recordSeparator}}};case`arrow`:return{format:{type:`arrow`,arrowConfiguration:{schema:e.schema}}};case`parquet`:return{format:{type:`parquet`}};default:throw Error(`Invalid BlobQueryTextConfiguration.`)}}function sk(e){if(!e||`policy-id`in e)return;let t=[];for(let n in e){let r=n.split(`_`);r[0].startsWith(`or-`)&&(r[0]=r[0].substring(3));let i={ruleId:r[1],replicationStatus:e[n]},a=t.findIndex(e=>e.policyId===r[0]);a>-1?t[a].rules.push(i):t.push({policyId:r[0],rules:[i]})}return t}function ck(e){return e?e.scheme+` `+e.value:void 0}function*lk(e){let t=[],n=[];e.pageRange&&(t=e.pageRange),e.clearRange&&(n=e.clearRange);let r=0,i=0;for(;r0&&n.length>0&&e.push(`${t}=${n}`))}};function vk(e,t,n){return yk(e,t,n).sasQueryParameters}function yk(e,t,n){let r=e.version?e.version:Rb,i=t instanceof xb?t:void 0,a;if(i===void 0&&n!==void 0&&(a=new Ib(n,t)),i===void 0&&a===void 0)throw TypeError(`Invalid sharedKeyCredential, userDelegationKey or accountName.`);if(r>=`2020-12-06`)return i===void 0?r>=`2025-07-05`?Ek(e,a):Tk(e,a):Sk(e,i);if(r>=`2018-11-09`)return i===void 0?r>=`2020-02-10`?wk(e,a):Ck(e,a):xk(e,i);if(r>=`2015-04-05`){if(i!==void 0)return bk(e,i);throw RangeError(`'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.`)}throw RangeError(`'version' must be >= '2015-04-05'.`)}function bk(e,t){if(e=Ok(e),!e.identifier&&!(e.permissions&&e.expiresOn))throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.`);let n=`c`;e.blobName&&(n=`b`);let r;e.permissions&&(r=e.blobName?pk.parse(e.permissions.toString()).toString():mk.parse(e.permissions.toString()).toString());let i=[r||``,e.startsOn?XO(e.startsOn,!1):``,e.expiresOn?XO(e.expiresOn,!1):``,Dk(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?hk(e.ipRange):``,e.protocol?e.protocol:``,e.version,e.cacheControl?e.cacheControl:``,e.contentDisposition?e.contentDisposition:``,e.contentEncoding?e.contentEncoding:``,e.contentLanguage?e.contentLanguage:``,e.contentType?e.contentType:``].join(` +`),a=t.computeHMACSHA256(i);return{sasQueryParameters:new _k(e.version,a,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType),stringToSign:i}}function xk(e,t){if(e=Ok(e),!e.identifier&&!(e.permissions&&e.expiresOn))throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.`);let n=`c`,r=e.snapshotTime;e.blobName&&(n=`b`,e.snapshotTime?n=`bs`:e.versionId&&(n=`bv`,r=e.versionId));let i;e.permissions&&(i=e.blobName?pk.parse(e.permissions.toString()).toString():mk.parse(e.permissions.toString()).toString());let a=[i||``,e.startsOn?XO(e.startsOn,!1):``,e.expiresOn?XO(e.expiresOn,!1):``,Dk(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?hk(e.ipRange):``,e.protocol?e.protocol:``,e.version,n,r,e.cacheControl?e.cacheControl:``,e.contentDisposition?e.contentDisposition:``,e.contentEncoding?e.contentEncoding:``,e.contentLanguage?e.contentLanguage:``,e.contentType?e.contentType:``].join(` +`),o=t.computeHMACSHA256(a);return{sasQueryParameters:new _k(e.version,o,i,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType),stringToSign:a}}function Sk(e,t){if(e=Ok(e),!e.identifier&&!(e.permissions&&e.expiresOn))throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.`);let n=`c`,r=e.snapshotTime;e.blobName&&(n=`b`,e.snapshotTime?n=`bs`:e.versionId&&(n=`bv`,r=e.versionId));let i;e.permissions&&(i=e.blobName?pk.parse(e.permissions.toString()).toString():mk.parse(e.permissions.toString()).toString());let a=[i||``,e.startsOn?XO(e.startsOn,!1):``,e.expiresOn?XO(e.expiresOn,!1):``,Dk(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?hk(e.ipRange):``,e.protocol?e.protocol:``,e.version,n,r,e.encryptionScope,e.cacheControl?e.cacheControl:``,e.contentDisposition?e.contentDisposition:``,e.contentEncoding?e.contentEncoding:``,e.contentLanguage?e.contentLanguage:``,e.contentType?e.contentType:``].join(` +`),o=t.computeHMACSHA256(a);return{sasQueryParameters:new _k(e.version,o,i,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,void 0,void 0,void 0,e.encryptionScope),stringToSign:a}}function Ck(e,t){if(e=Ok(e),!e.permissions||!e.expiresOn)throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.`);let n=`c`,r=e.snapshotTime;e.blobName&&(n=`b`,e.snapshotTime?n=`bs`:e.versionId&&(n=`bv`,r=e.versionId));let i;e.permissions&&(i=e.blobName?pk.parse(e.permissions.toString()).toString():mk.parse(e.permissions.toString()).toString());let a=[i||``,e.startsOn?XO(e.startsOn,!1):``,e.expiresOn?XO(e.expiresOn,!1):``,Dk(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?XO(t.userDelegationKey.signedStartsOn,!1):``,t.userDelegationKey.signedExpiresOn?XO(t.userDelegationKey.signedExpiresOn,!1):``,t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.ipRange?hk(e.ipRange):``,e.protocol?e.protocol:``,e.version,n,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join(` +`),o=t.computeHMACSHA256(a);return{sasQueryParameters:new _k(e.version,o,i,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey),stringToSign:a}}function wk(e,t){if(e=Ok(e),!e.permissions||!e.expiresOn)throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.`);let n=`c`,r=e.snapshotTime;e.blobName&&(n=`b`,e.snapshotTime?n=`bs`:e.versionId&&(n=`bv`,r=e.versionId));let i;e.permissions&&(i=e.blobName?pk.parse(e.permissions.toString()).toString():mk.parse(e.permissions.toString()).toString());let a=[i||``,e.startsOn?XO(e.startsOn,!1):``,e.expiresOn?XO(e.expiresOn,!1):``,Dk(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?XO(t.userDelegationKey.signedStartsOn,!1):``,t.userDelegationKey.signedExpiresOn?XO(t.userDelegationKey.signedExpiresOn,!1):``,t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,void 0,e.correlationId,e.ipRange?hk(e.ipRange):``,e.protocol?e.protocol:``,e.version,n,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join(` +`),o=t.computeHMACSHA256(a);return{sasQueryParameters:new _k(e.version,o,i,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId),stringToSign:a}}function Tk(e,t){if(e=Ok(e),!e.permissions||!e.expiresOn)throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.`);let n=`c`,r=e.snapshotTime;e.blobName&&(n=`b`,e.snapshotTime?n=`bs`:e.versionId&&(n=`bv`,r=e.versionId));let i;e.permissions&&(i=e.blobName?pk.parse(e.permissions.toString()).toString():mk.parse(e.permissions.toString()).toString());let a=[i||``,e.startsOn?XO(e.startsOn,!1):``,e.expiresOn?XO(e.expiresOn,!1):``,Dk(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?XO(t.userDelegationKey.signedStartsOn,!1):``,t.userDelegationKey.signedExpiresOn?XO(t.userDelegationKey.signedExpiresOn,!1):``,t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,void 0,e.correlationId,e.ipRange?hk(e.ipRange):``,e.protocol?e.protocol:``,e.version,n,r,e.encryptionScope,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join(` +`),o=t.computeHMACSHA256(a);return{sasQueryParameters:new _k(e.version,o,i,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId,e.encryptionScope),stringToSign:a}}function Ek(e,t){if(e=Ok(e),!e.permissions||!e.expiresOn)throw RangeError(`Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.`);let n=`c`,r=e.snapshotTime;e.blobName&&(n=`b`,e.snapshotTime?n=`bs`:e.versionId&&(n=`bv`,r=e.versionId));let i;e.permissions&&(i=e.blobName?pk.parse(e.permissions.toString()).toString():mk.parse(e.permissions.toString()).toString());let a=[i||``,e.startsOn?XO(e.startsOn,!1):``,e.expiresOn?XO(e.expiresOn,!1):``,Dk(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?XO(t.userDelegationKey.signedStartsOn,!1):``,t.userDelegationKey.signedExpiresOn?XO(t.userDelegationKey.signedExpiresOn,!1):``,t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,void 0,e.correlationId,void 0,e.delegatedUserObjectId,e.ipRange?hk(e.ipRange):``,e.protocol?e.protocol:``,e.version,n,r,e.encryptionScope,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join(` +`),o=t.computeHMACSHA256(a);return{sasQueryParameters:new _k(e.version,o,i,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId,e.encryptionScope,e.delegatedUserObjectId),stringToSign:a}}function Dk(e,t,n){let r=[`/blob/${e}/${t}`];return n&&r.push(`/${n}`),r.join(``)}function Ok(e){let t=e.version?e.version:Rb;if(e.snapshotTime&&t<`2018-11-09`)throw RangeError(`'version' must be >= '2018-11-09' when providing 'snapshotTime'.`);if(e.blobName===void 0&&e.snapshotTime)throw RangeError(`Must provide 'blobName' when providing 'snapshotTime'.`);if(e.versionId&&t<`2019-10-10`)throw RangeError(`'version' must be >= '2019-10-10' when providing 'versionId'.`);if(e.blobName===void 0&&e.versionId)throw RangeError(`Must provide 'blobName' when providing 'versionId'.`);if(e.permissions&&e.permissions.setImmutabilityPolicy&&t<`2020-08-04`)throw RangeError(`'version' must be >= '2020-08-04' when provided 'i' permission.`);if(e.permissions&&e.permissions.deleteVersion&&t<`2019-10-10`)throw RangeError(`'version' must be >= '2019-10-10' when providing 'x' permission.`);if(e.permissions&&e.permissions.permanentDelete&&t<`2019-10-10`)throw RangeError(`'version' must be >= '2019-10-10' when providing 'y' permission.`);if(e.permissions&&e.permissions.tag&&t<`2019-12-12`)throw RangeError(`'version' must be >= '2019-12-12' when providing 't' permission.`);if(t<`2020-02-10`&&e.permissions&&(e.permissions.move||e.permissions.execute))throw RangeError(`'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.`);if(t<`2021-04-10`&&e.permissions&&e.permissions.filterByTags)throw RangeError(`'version' must be >= '2021-04-10' when providing the 'f' permission.`);if(t<`2020-02-10`&&(e.preauthorizedAgentObjectId||e.correlationId))throw RangeError(`'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.`);if(e.encryptionScope&&t<`2020-12-06`)throw RangeError(`'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.`);return e.version=t,e}var kk=class{_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,t){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),t||=qm(),this._leaseId=t}async acquireLease(e,t={}){if(this._isContainer&&(t.conditions?.ifMatch&&t.conditions?.ifMatch!==``||t.conditions?.ifNoneMatch&&t.conditions?.ifNoneMatch!==``||t.conditions?.tagConditions))throw 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 fk.withSpan(`BlobLeaseClient-acquireLease`,t,async n=>uk(await this._containerOrBlobOperation.acquireLease({abortSignal:t.abortSignal,duration:e,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,t={}){if(this._isContainer&&(t.conditions?.ifMatch&&t.conditions?.ifMatch!==``||t.conditions?.ifNoneMatch&&t.conditions?.ifNoneMatch!==``||t.conditions?.tagConditions))throw 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 fk.withSpan(`BlobLeaseClient-changeLease`,t,async n=>{let r=uk(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:t.abortSignal,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,r})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==``||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==``||e.conditions?.tagConditions))throw 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 fk.withSpan(`BlobLeaseClient-releaseLease`,e,async t=>uk(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:t.tracingOptions})))}async renewLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==``||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==``||e.conditions?.tagConditions))throw 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 fk.withSpan(`BlobLeaseClient-renewLease`,e,async t=>this._containerOrBlobOperation.renewLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:t.tracingOptions}))}async breakLease(e,t={}){if(this._isContainer&&(t.conditions?.ifMatch&&t.conditions?.ifMatch!==``||t.conditions?.ifNoneMatch&&t.conditions?.ifNoneMatch!==``||t.conditions?.tagConditions))throw 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 fk.withSpan(`BlobLeaseClient-breakLease`,t,async n=>{let r={abortSignal:t.abortSignal,breakPeriod:e,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},tracingOptions:n.tracingOptions};return uk(await this._containerOrBlobOperation.breakLease(r))})}},Ak=class extends W{start;offset;end;getter;source;retries=0;maxRetryRequests;onProgress;options;constructor(e,t,n,r,i={}){super({highWaterMark:i.highWaterMark}),this.getter=t,this.source=e,this.start=n,this.offset=n,this.end=n+r-1,this.maxRetryRequests=i.maxRetryRequests&&i.maxRetryRequests>=0?i.maxRetryRequests:0,this.onProgress=i.onProgress,this.options=i,this.setSourceEventHandlers()}_read(){this.source.resume()}setSourceEventHandlers(){this.source.on(`data`,this.sourceDataHandler),this.source.on(`end`,this.sourceErrorOrEndHandler),this.source.on(`error`,this.sourceErrorOrEndHandler),this.source.on(`aborted`,this.sourceAbortedHandler)}removeSourceEventHandlers(){this.source.removeListener(`data`,this.sourceDataHandler),this.source.removeListener(`end`,this.sourceErrorOrEndHandler),this.source.removeListener(`error`,this.sourceErrorOrEndHandler),this.source.removeListener(`aborted`,this.sourceAbortedHandler)}sourceDataHandler=e=>{if(this.options.doInjectErrorOnce){this.options.doInjectErrorOnce=void 0,this.source.pause(),this.sourceErrorOrEndHandler(),this.source.destroy();return}this.offset+=e.length,this.onProgress&&this.onProgress({loadedBytes:this.offset-this.start}),this.push(e)||this.source.pause()};sourceAbortedHandler=()=>{let e=new Hm(`The operation was aborted.`);this.destroy(e)};sourceErrorOrEndHandler=e=>{if(e&&e.name===`AbortError`){this.destroy(e);return}this.removeSourceEventHandlers(),this.offset-1===this.end?this.push(null):this.offset<=this.end?this.retries{this.source=e,this.setSourceEventHandlers()}).catch(e=>{this.destroy(e)})):this.destroy(Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset-1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)):this.destroy(Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset-1}`))};_destroy(e,t){this.removeSourceEventHandlers(),this.source.destroy(),t(e===null?void 0:e)}},jk=class{get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){return this.originalResponse.copyCompletedOn}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get tagCount(){return this.originalResponse.tagCount}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get lastAccessed(){return this.originalResponse.lastAccessed}get createdOn(){return this.originalResponse.createdOn}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get versionId(){return this.originalResponse.versionId}get isCurrentVersion(){return this.originalResponse.isCurrentVersion}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get objectReplicationDestinationPolicyId(){return this.originalResponse.objectReplicationDestinationPolicyId}get objectReplicationSourceProperties(){return this.originalResponse.objectReplicationSourceProperties}get isSealed(){return this.originalResponse.isSealed}get immutabilityPolicyExpiresOn(){return this.originalResponse.immutabilityPolicyExpiresOn}get immutabilityPolicyMode(){return this.originalResponse.immutabilityPolicyMode}get legalHold(){return this.originalResponse.legalHold}get contentAsBlob(){return this.originalResponse.blobBody}get readableStreamBody(){return Jm?this.blobDownloadStream:void 0}get _response(){return this.originalResponse._response}originalResponse;blobDownloadStream;constructor(e,t,n,r,i={}){this.originalResponse=e,this.blobDownloadStream=new Ak(this.originalResponse.readableStreamBody,t,n,r,i)}};const Mk=new Uint8Array([79,98,106,1]);var Nk=class e{static async readFixedBytes(e,t,n={}){let r=await e.read(t,{abortSignal:n.abortSignal});if(r.length!==t)throw Error(`Hit stream end.`);return r}static async readByte(t,n={}){return(await e.readFixedBytes(t,1,n))[0]}static async readZigZagLong(t,n={}){let r=0,i=0,a,o,s;do a=await e.readByte(t,n),o=a&128,r|=(a&127)<2**53-1)throw Error(`Integer overflow.`);return i}return r>>1^-(r&1)}static async readLong(t,n={}){return e.readZigZagLong(t,n)}static async readInt(t,n={}){return e.readZigZagLong(t,n)}static async readNull(){return null}static async readBoolean(t,n={}){let r=await e.readByte(t,n);if(r===1)return!0;if(r===0)return!1;throw Error(`Byte was not a boolean.`)}static async readFloat(t,n={}){let r=await e.readFixedBytes(t,4,n);return new DataView(r.buffer,r.byteOffset,r.byteLength).getFloat32(0,!0)}static async readDouble(t,n={}){let r=await e.readFixedBytes(t,8,n);return new DataView(r.buffer,r.byteOffset,r.byteLength).getFloat64(0,!0)}static async readBytes(t,n={}){let r=await e.readLong(t,n);if(r<0)throw Error(`Bytes size was negative.`);return t.read(r,{abortSignal:n.abortSignal})}static async readString(t,n={}){let r=await e.readBytes(t,n);return new TextDecoder().decode(r)}static async readMapPair(t,n,r={}){return{key:await e.readString(t,r),value:await n(t,r)}}static async readMap(t,n,r={}){let i=await e.readArray(t,(t,r={})=>e.readMapPair(t,n,r),r),a={};for(let e of i)a[e.key]=e.value;return a}static async readArray(t,n,r={}){let i=[];for(let a=await e.readLong(t,r);a!==0;a=await e.readLong(t,r))for(a<0&&(await e.readLong(t,r),a=-a);a--;){let e=await n(t,r);i.push(e)}return i}},Pk;(function(e){e.RECORD=`record`,e.ENUM=`enum`,e.ARRAY=`array`,e.MAP=`map`,e.UNION=`union`,e.FIXED=`fixed`})(Pk||={});var Fk;(function(e){e.NULL=`null`,e.BOOLEAN=`boolean`,e.INT=`int`,e.LONG=`long`,e.FLOAT=`float`,e.DOUBLE=`double`,e.BYTES=`bytes`,e.STRING=`string`})(Fk||={});var Ik=class e{static fromSchema(t){return typeof t==`string`?e.fromStringSchema(t):Array.isArray(t)?e.fromArraySchema(t):e.fromObjectSchema(t)}static fromStringSchema(e){switch(e){case Fk.NULL:case Fk.BOOLEAN:case Fk.INT:case Fk.LONG:case Fk.FLOAT:case Fk.DOUBLE:case Fk.BYTES:case Fk.STRING:return new Lk(e);default:throw Error(`Unexpected Avro type ${e}`)}}static fromArraySchema(t){return new zk(t.map(e.fromSchema))}static fromObjectSchema(t){let n=t.type;try{return e.fromStringSchema(n)}catch{}switch(n){case Pk.RECORD:if(t.aliases)throw Error(`aliases currently is not supported, schema: ${t}`);if(!t.name)throw Error(`Required attribute 'name' doesn't exist on schema: ${t}`);let r={};if(!t.fields)throw Error(`Required attribute 'fields' doesn't exist on schema: ${t}`);for(let n of t.fields)r[n.name]=e.fromSchema(n.type);return new Vk(r,t.name);case Pk.ENUM:if(t.aliases)throw Error(`aliases currently is not supported, schema: ${t}`);if(!t.symbols)throw Error(`Required attribute 'symbols' doesn't exist on schema: ${t}`);return new Rk(t.symbols);case Pk.MAP:if(!t.values)throw Error(`Required attribute 'values' doesn't exist on schema: ${t}`);return new Bk(e.fromSchema(t.values));case Pk.ARRAY:case Pk.FIXED:default:throw Error(`Unexpected Avro type ${n} in ${t}`)}}},Lk=class extends Ik{_primitive;constructor(e){super(),this._primitive=e}read(e,t={}){switch(this._primitive){case Fk.NULL:return Nk.readNull();case Fk.BOOLEAN:return Nk.readBoolean(e,t);case Fk.INT:return Nk.readInt(e,t);case Fk.LONG:return Nk.readLong(e,t);case Fk.FLOAT:return Nk.readFloat(e,t);case Fk.DOUBLE:return Nk.readDouble(e,t);case Fk.BYTES:return Nk.readBytes(e,t);case Fk.STRING:return Nk.readString(e,t);default:throw Error(`Unknown Avro Primitive`)}}},Rk=class extends Ik{_symbols;constructor(e){super(),this._symbols=e}async read(e,t={}){let n=await Nk.readInt(e,t);return this._symbols[n]}},zk=class extends Ik{_types;constructor(e){super(),this._types=e}async read(e,t={}){let n=await Nk.readInt(e,t);return this._types[n].read(e,t)}},Bk=class extends Ik{_itemType;constructor(e){super(),this._itemType=e}read(e,t={}){return Nk.readMap(e,(e,t)=>this._itemType.read(e,t),t)}},Vk=class extends Ik{_name;_fields;constructor(e,t){super(),this._fields=e,this._name=t}async read(e,t={}){let n={};n.$schema=this._name;for(let r in this._fields)Object.prototype.hasOwnProperty.call(this._fields,r)&&(n[r]=await this._fields[r].read(e,t));return n}};function Hk(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(let n=0;n0)for(let t=0;t0}async*parseObjects(e={}){for(this._initialized||await this.initialize(e);this.hasNext();){let t=await this._itemType.read(this._dataStream,{abortSignal:e.abortSignal});if(this._itemsRemainingInBlock--,this._objectIndex++,this._itemsRemainingInBlock===0){let t=await Nk.readFixedBytes(this._dataStream,16,{abortSignal:e.abortSignal});if(this._blockOffset=this._initialBlockOffset+this._dataStream.position,this._objectIndex=0,!Hk(this._syncMarker,t))throw Error(`Stream is not a valid Avro file.`);try{this._itemsRemainingInBlock=await Nk.readLong(this._dataStream,{abortSignal:e.abortSignal})}catch{this._itemsRemainingInBlock=0}this._itemsRemainingInBlock>0&&await Nk.readLong(this._dataStream,{abortSignal:e.abortSignal})}yield t}}},Wk=class{};const Gk=new Hm(`Reading from the avro stream was aborted.`);var Kk=class extends Wk{_position;_readable;toUint8Array(e){return typeof e==`string`?G.from(e):e}constructor(e){super(),this._readable=e,this._position=0}get position(){return this._position}async read(e,t={}){if(t.abortSignal?.aborted)throw Gk;if(e<0)throw Error(`size parameter should be positive: ${e}`);if(e===0)return new Uint8Array;if(!this._readable.readable)throw Error(`Stream no longer readable.`);let n=this._readable.read(e);return n?(this._position+=n.length,this.toUint8Array(n)):new Promise((n,r)=>{let i=()=>{this._readable.removeListener(`readable`,a),this._readable.removeListener(`error`,o),this._readable.removeListener(`end`,o),this._readable.removeListener(`close`,o),t.abortSignal&&t.abortSignal.removeEventListener(`abort`,s)},a=()=>{let t=this._readable.read(e);t&&(this._position+=t.length,i(),n(this.toUint8Array(t)))},o=()=>{i(),r()},s=()=>{i(),r(Gk)};this._readable.on(`readable`,a),this._readable.once(`error`,o),this._readable.once(`end`,o),this._readable.once(`close`,o),t.abortSignal&&t.abortSignal.addEventListener(`abort`,s)})}},qk=class extends W{source;avroReader;avroIter;avroPaused=!0;onProgress;onError;constructor(e,t={}){super(),this.source=e,this.onProgress=t.onProgress,this.onError=t.onError,this.avroReader=new Uk(new Kk(this.source)),this.avroIter=this.avroReader.parseObjects({abortSignal:t.abortSignal})}_read(){this.avroPaused&&this.readInternal().catch(e=>{this.emit(`error`,e)})}async readInternal(){this.avroPaused=!1;let e;do{if(e=await this.avroIter.next(),e.done)break;let t=e.value,n=t.$schema;if(typeof n!=`string`)throw Error(`Missing schema in avro record.`);switch(n){case`com.microsoft.azure.storage.queryBlobContents.resultData`:{let e=t.data;if(!(e instanceof Uint8Array))throw Error(`Invalid data in avro result record.`);this.push(Buffer.from(e))||(this.avroPaused=!0)}break;case`com.microsoft.azure.storage.queryBlobContents.progress`:{let e=t.bytesScanned;if(typeof e!=`number`)throw Error(`Invalid bytesScanned in avro progress record.`);this.onProgress&&this.onProgress({loadedBytes:e})}break;case`com.microsoft.azure.storage.queryBlobContents.end`:if(this.onProgress){let e=t.totalBytes;if(typeof e!=`number`)throw Error(`Invalid totalBytes in avro end record.`);this.onProgress({loadedBytes:e})}this.push(null);break;case`com.microsoft.azure.storage.queryBlobContents.error`:if(this.onError){let e=t.fatal;if(typeof e!=`boolean`)throw Error(`Invalid fatal in avro error record.`);let n=t.name;if(typeof n!=`string`)throw Error(`Invalid name in avro error record.`);let r=t.description;if(typeof r!=`string`)throw Error(`Invalid description in avro error record.`);let i=t.position;if(typeof i!=`number`)throw Error(`Invalid position in avro error record.`);this.onError({position:i,name:n,isFatal:e,description:r})}break;default:throw Error(`Unknown schema ${n} in avro progress record.`)}}while(!e.done&&!this.avroPaused)}},Jk=class{get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get blobBody(){}get readableStreamBody(){return Jm?this.blobDownloadStream:void 0}get _response(){return this.originalResponse._response}originalResponse;blobDownloadStream;constructor(e,t={}){this.originalResponse=e,this.blobDownloadStream=new qk(this.originalResponse.readableStreamBody,t)}},Yk;(function(e){e.Hot=`Hot`,e.Cool=`Cool`,e.Cold=`Cold`,e.Archive=`Archive`})(Yk||={});var Xk;(function(e){e.P4=`P4`,e.P6=`P6`,e.P10=`P10`,e.P15=`P15`,e.P20=`P20`,e.P30=`P30`,e.P40=`P40`,e.P50=`P50`,e.P60=`P60`,e.P70=`P70`,e.P80=`P80`})(Xk||={});function Zk(e){if(e!==void 0)return e}function Qk(e,t){if(e&&!t)throw RangeError(`Customer-provided encryption key must be used over HTTPS.`);e&&!e.encryptionAlgorithm&&(e.encryptionAlgorithm=`AES256`)}var $k;(function(e){e.StorageOAuthScopes=`https://storage.azure.com/.default`,e.DiskComputeOAuthScopes=`https://disk.compute.azure.com/.default`})($k||={});function eA(e){let t=(e._response.parsedBody.pageRange||[]).map(e=>({offset:e.start,count:e.end-e.start})),n=(e._response.parsedBody.clearRange||[]).map(e=>({offset:e.start,count:e.end-e.start}));return{...e,pageRange:t,clearRange:n,_response:{...e._response,parsedBody:{pageRange:t,clearRange:n}}}}var tA=class e extends Error{constructor(t){super(t),this.name=`PollerStoppedError`,Object.setPrototypeOf(this,e.prototype)}},nA=class e extends Error{constructor(t){super(t),this.name=`PollerCancelledError`,Object.setPrototypeOf(this,e.prototype)}},rA=class{constructor(e){this.resolveOnUnsuccessful=!1,this.stopped=!0,this.pollProgressCallbacks=[],this.operation=e,this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t}),this.promise.catch(()=>{})}async startPolling(e={}){for(this.stopped&&=!1;!this.isStopped()&&!this.isDone();)await this.poll(e),await this.delay()}async pollOnce(e={}){this.isDone()||(this.operation=await this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})),this.processUpdatedState()}fireProgress(e){for(let t of this.pollProgressCallbacks)t(e)}async cancelOnce(e={}){this.operation=await this.operation.cancel(e)}poll(e={}){if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);let t=()=>{this.pollOncePromise=void 0};this.pollOncePromise.then(t,t).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error&&(this.stopped=!0,!this.resolveOnUnsuccessful))throw this.reject(this.operation.state.error),this.operation.state.error;if(this.operation.state.isCancelled&&(this.stopped=!0,!this.resolveOnUnsuccessful)){let e=new nA(`Operation was canceled`);throw this.reject(e),e}this.isDone()&&this.resolve&&this.resolve(this.getResult())}async pollUntilDone(e={}){return this.stopped&&this.startPolling(e).catch(this.reject),this.processUpdatedState(),this.promise}onProgress(e){return this.pollProgressCallbacks.push(e),()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter(t=>t!==e)}}isDone(){let e=this.operation.state;return!!(e.isCompleted||e.isCancelled||e.error)}stopPolling(){this.stopped||(this.stopped=!0,this.reject&&this.reject(new tA(`This poller is already stopped`)))}isStopped(){return this.stopped}cancelOperation(e={}){if(!this.cancelPromise)this.cancelPromise=this.cancelOnce(e);else if(e.abortSignal)throw Error(`A cancel request is currently pending`);return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){return this.operation.state.result}toString(){return this.operation.toString()}},iA=class extends rA{intervalInMs;constructor(e){let{blobClient:t,copySource:n,intervalInMs:r=15e3,onProgress:i,resumeFrom:a,startCopyFromURLOptions:o}=e,s;a&&(s=JSON.parse(a).state);let c=cA({...s,blobClient:t,copySource:n,startCopyFromURLOptions:o});super(c),typeof i==`function`&&this.onProgress(i),this.intervalInMs=r}delay(){return Wm(this.intervalInMs)}};const aA=async function(e={}){let t=this.state,{copyId:n}=t;return t.isCompleted?cA(t):n?(await t.blobClient.abortCopyFromURL(n,{abortSignal:e.abortSignal}),t.isCancelled=!0,cA(t)):(t.isCancelled=!0,cA(t))},oA=async function(e={}){let t=this.state,{blobClient:n,copySource:r,startCopyFromURLOptions:i}=t;if(!t.isStarted){t.isStarted=!0;let e=await n.startCopyFromURL(r,i);t.copyId=e.copyId,e.copyStatus===`success`&&(t.result=e,t.isCompleted=!0)}else if(!t.isCompleted)try{let n=await t.blobClient.getProperties({abortSignal:e.abortSignal}),{copyStatus:r,copyProgress:i}=n,a=t.copyProgress;i&&(t.copyProgress=i),r===`pending`&&i!==a&&typeof e.fireProgress==`function`?e.fireProgress(t):r===`success`?(t.result=n,t.isCompleted=!0):r===`failed`&&(t.error=Error(`Blob copy failed with reason: "${n.copyStatusDescription||`unknown`}"`),t.isCompleted=!0)}catch(e){t.error=e,t.isCompleted=!0}return cA(t)},sA=function(){return JSON.stringify({state:this.state},(e,t)=>{if(e!==`blobClient`)return t})};function cA(e){return{state:{...e},cancel:aA,toString:sA,update:oA}}function lA(e){if(e.offset<0)throw RangeError(`Range.offset cannot be smaller than 0.`);if(e.count&&e.count<=0)throw RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`);return e.count?`bytes=${e.offset}-${e.offset+e.count-1}`:`bytes=${e.offset}-`}var uA;(function(e){e[e.Good=0]=`Good`,e[e.Error=1]=`Error`})(uA||={});var dA=class{concurrency;actives=0;completed=0;offset=0;operations=[];state=uA.Good;emitter;constructor(e=5){if(e<1)throw RangeError(`concurrency must be larger than 0`);this.concurrency=e,this.emitter=new Ce}addOperation(e){this.operations.push(async()=>{try{this.actives++,await e(),this.actives--,this.completed++,this.parallelExecute()}catch(e){this.emitter.emit(`error`,e)}})}async do(){return this.operations.length===0?Promise.resolve():(this.parallelExecute(),new Promise((e,t)=>{this.emitter.on(`finish`,e),this.emitter.on(`error`,e=>{this.state=uA.Error,t(e)})}))}nextOperation(){return this.offset=this.operations.length){this.emitter.emit(`finish`);return}for(;this.actives{let c=setTimeout(()=>s(Error(`The operation cannot be completed in timeout.`)),1e5);e.on(`readable`,()=>{if(a>=o){clearTimeout(c),r();return}let s=e.read();if(!s)return;typeof s==`string`&&(s=Buffer.from(s,i));let l=a+s.length>o?o-a:s.length;t.fill(s.slice(0,l),n+a,n+a+l),a+=l}),e.on(`end`,()=>{clearTimeout(c),a{clearTimeout(c),s(e)})})}async function pA(e,t){return new Promise((n,r)=>{let i=Ke.createWriteStream(t);e.on(`error`,e=>{r(e)}),i.on(`error`,e=>{r(e)}),i.on(`close`,n),e.pipe(i)})}const mA=je.promisify(Ke.stat),hA=Ke.createReadStream;var gA=class e extends dk{blobContext;_name;_containerName;_versionId;_snapshot;get name(){return this._name}get containerName(){return this._containerName}constructor(e,t,n,r){r||={};let i,a;if(Gb(t))a=e,i=t;else if(Jm&&t instanceof xb||t instanceof mb||zh(t))a=e,r=n,i=qb(t,r);else if(!t&&typeof t!=`string`)a=e,n&&typeof n!=`string`&&(r=n),i=qb(new mb,r);else if(t&&typeof t==`string`&&n&&typeof n==`string`){let o=t,s=n,c=UO(e);if(c.kind===`AccountConnString`)if(Jm){let e=new xb(c.accountName,c.accountKey);a=GO(GO(c.url,encodeURIComponent(o)),encodeURIComponent(s)),r.proxyOptions||=rh(c.proxyUri),i=qb(e,r)}else throw Error(`Account connection string is only supported in Node.js environment`);else if(c.kind===`SASConnString`)a=GO(GO(c.url,encodeURIComponent(o)),encodeURIComponent(s))+`?`+c.accountSas,i=qb(new mb,r);else throw Error(`Connection string must be either an Account connection string or a SAS connection string`)}else throw Error(`Expecting non-empty strings for containerName and blobName parameters`);super(a,i),{blobName:this._name,containerName:this._containerName}=this.getBlobAndContainerNamesFromUrl(),this.blobContext=this.storageClientContext.blob,this._snapshot=qO(this.url,Vb.Parameters.SNAPSHOT),this._versionId=qO(this.url,Vb.Parameters.VERSIONID)}withSnapshot(t){return new e(KO(this.url,Vb.Parameters.SNAPSHOT,t.length===0?void 0:t),this.pipeline)}withVersion(t){return new e(KO(this.url,Vb.Parameters.VERSIONID,t.length===0?void 0:t),this.pipeline)}getAppendBlobClient(){return new _A(this.url,this.pipeline)}getBlockBlobClient(){return new vA(this.url,this.pipeline)}getPageBlobClient(){return new yA(this.url,this.pipeline)}async download(e=0,t,n={}){return n.conditions=n.conditions||{},n.conditions=n.conditions||{},Qk(n.customerProvidedKey,this.isHttps),fk.withSpan(`BlobClient-download`,n,async r=>{let i=uk(await this.blobContext.download({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},requestOptions:{onDownloadProgress:Jm?void 0:n.onProgress},range:e===0&&!t?void 0:lA({offset:e,count:t}),rangeGetContentMD5:n.rangeGetContentMD5,rangeGetContentCRC64:n.rangeGetContentCrc64,snapshot:n.snapshot,cpkInfo:n.customerProvidedKey,tracingOptions:r.tracingOptions})),a={...i,_response:i._response,objectReplicationDestinationPolicyId:i.objectReplicationPolicyId,objectReplicationSourceProperties:sk(i.objectReplicationRules)};if(!Jm)return a;if((n.maxRetryRequests===void 0||n.maxRetryRequests<0)&&(n.maxRetryRequests=5),i.contentLength===void 0)throw RangeError(`File download response doesn't contain valid content length header`);if(!i.etag)throw RangeError(`File download response doesn't contain valid etag header`);return new jk(a,async t=>{let r={leaseAccessConditions:n.conditions,modifiedAccessConditions:{ifMatch:n.conditions.ifMatch||i.etag,ifModifiedSince:n.conditions.ifModifiedSince,ifNoneMatch:n.conditions.ifNoneMatch,ifUnmodifiedSince:n.conditions.ifUnmodifiedSince,ifTags:n.conditions?.tagConditions},range:lA({count:e+i.contentLength-t,offset:t}),rangeGetContentMD5:n.rangeGetContentMD5,rangeGetContentCRC64:n.rangeGetContentCrc64,snapshot:n.snapshot,cpkInfo:n.customerProvidedKey};return(await this.blobContext.download({abortSignal:n.abortSignal,...r})).readableStreamBody},e,i.contentLength,{maxRetryRequests:n.maxRetryRequests,onProgress:n.onProgress})})}async exists(e={}){return fk.withSpan(`BlobClient-exists`,e,async t=>{try{return Qk(e.customerProvidedKey,this.isHttps),await this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:t.tracingOptions}),!0}catch(e){if(e.statusCode===404)return!1;if(e.statusCode===409&&(e.details.errorCode===`BlobUsesCustomerSpecifiedEncryption`||e.details.errorCode===`BlobDoesNotUseCustomerSpecifiedEncryption`))return!0;throw e}})}async getProperties(e={}){return e.conditions=e.conditions||{},Qk(e.customerProvidedKey,this.isHttps),fk.withSpan(`BlobClient-getProperties`,e,async t=>{let n=uk(await this.blobContext.getProperties({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},cpkInfo:e.customerProvidedKey,tracingOptions:t.tracingOptions}));return{...n,_response:n._response,objectReplicationDestinationPolicyId:n.objectReplicationPolicyId,objectReplicationSourceProperties:sk(n.objectReplicationRules)}})}async delete(e={}){return e.conditions=e.conditions||{},fk.withSpan(`BlobClient-delete`,e,async t=>uk(await this.blobContext.delete({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:t.tracingOptions})))}async deleteIfExists(e={}){return fk.withSpan(`BlobClient-deleteIfExists`,e,async e=>{try{let t=uk(await this.delete(e));return{succeeded:!0,...t,_response:t._response}}catch(e){if(e.details?.errorCode===`BlobNotFound`)return{succeeded:!1,...e.response?.parsedHeaders,_response:e.response};throw e}})}async undelete(e={}){return fk.withSpan(`BlobClient-undelete`,e,async t=>uk(await this.blobContext.undelete({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions})))}async setHTTPHeaders(e,t={}){return t.conditions=t.conditions||{},Qk(t.customerProvidedKey,this.isHttps),fk.withSpan(`BlobClient-setHTTPHeaders`,t,async n=>uk(await this.blobContext.setHttpHeaders({abortSignal:t.abortSignal,blobHttpHeaders:e,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},tracingOptions:n.tracingOptions})))}async setMetadata(e,t={}){return t.conditions=t.conditions||{},Qk(t.customerProvidedKey,this.isHttps),fk.withSpan(`BlobClient-setMetadata`,t,async n=>uk(await this.blobContext.setMetadata({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,tracingOptions:n.tracingOptions})))}async setTags(e,t={}){return fk.withSpan(`BlobClient-setTags`,t,async n=>uk(await this.blobContext.setTags({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},blobModifiedAccessConditions:t.conditions,tracingOptions:n.tracingOptions,tags:ik(e)})))}async getTags(e={}){return fk.withSpan(`BlobClient-getTags`,e,async t=>{let n=uk(await this.blobContext.getTags({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},blobModifiedAccessConditions:e.conditions,tracingOptions:t.tracingOptions}));return{...n,_response:n._response,tags:ak({blobTagSet:n.blobTagSet})||{}}})}getBlobLeaseClient(e){return new kk(this,e)}async createSnapshot(e={}){return e.conditions=e.conditions||{},Qk(e.customerProvidedKey,this.isHttps),fk.withSpan(`BlobClient-createSnapshot`,e,async t=>uk(await this.blobContext.createSnapshot({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,tracingOptions:t.tracingOptions})))}async beginCopyFromURL(e,t={}){let n=new iA({blobClient:{abortCopyFromURL:(...e)=>this.abortCopyFromURL(...e),getProperties:(...e)=>this.getProperties(...e),startCopyFromURL:(...e)=>this.startCopyFromURL(...e)},copySource:e,intervalInMs:t.intervalInMs,onProgress:t.onProgress,resumeFrom:t.resumeFrom,startCopyFromURLOptions:t});return await n.poll(),n}async abortCopyFromURL(e,t={}){return fk.withSpan(`BlobClient-abortCopyFromURL`,t,async n=>uk(await this.blobContext.abortCopyFromURL(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,tracingOptions:n.tracingOptions})))}async syncCopyFromURL(e,t={}){return t.conditions=t.conditions||{},t.sourceConditions=t.sourceConditions||{},fk.withSpan(`BlobClient-syncCopyFromURL`,t,async n=>uk(await this.blobContext.copyFromURL(e,{abortSignal:t.abortSignal,metadata:t.metadata,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions?.ifMatch,sourceIfModifiedSince:t.sourceConditions?.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions?.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions?.ifUnmodifiedSince},sourceContentMD5:t.sourceContentMD5,copySourceAuthorization:ck(t.sourceAuthorization),tier:Zk(t.tier),blobTagsString:rk(t.tags),immutabilityPolicyExpiry:t.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:t.immutabilityPolicy?.policyMode,legalHold:t.legalHold,encryptionScope:t.encryptionScope,copySourceTags:t.copySourceTags,fileRequestIntent:t.sourceShareTokenIntent,tracingOptions:n.tracingOptions})))}async setAccessTier(e,t={}){return fk.withSpan(`BlobClient-setAccessTier`,t,async n=>uk(await this.blobContext.setTier(Zk(e),{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},rehydratePriority:t.rehydratePriority,tracingOptions:n.tracingOptions})))}async downloadToBuffer(e,t,n,r={}){let i,a=0,o=0,s=r;e instanceof Buffer?(i=e,a=t||0,o=typeof n==`number`?n:0):(a=typeof e==`number`?e:0,o=typeof t==`number`?t:0,s=n||{});let c=s.blockSize??0;if(c<0)throw RangeError(`blockSize option must be >= 0`);if(c===0&&(c=Bb),a<0)throw RangeError(`offset option must be >= 0`);if(o&&o<=0)throw RangeError(`count option must be greater than 0`);return s.conditions||={},fk.withSpan(`BlobClient-downloadToBuffer`,s,async e=>{if(!o){let t=await this.getProperties({...s,tracingOptions:e.tracingOptions});if(o=t.contentLength-a,o<0)throw RangeError(`offset ${a} shouldn't be larger than blob size ${t.contentLength}`)}if(!i)try{i=Buffer.alloc(o)}catch(e){throw Error(`Unable to allocate the buffer of size: ${o}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${e.message}`)}if(i.length{let n=a+o;r+c{let a=await this.download(t,n,{...r,tracingOptions:i.tracingOptions});return a.readableStreamBody&&await pA(a.readableStreamBody,e),a.blobDownloadStream=void 0,a})}getBlobAndContainerNamesFromUrl(){let e,t;try{let n=new URL(this.url);if(n.host.split(`.`)[1]===`blob`){let r=n.pathname.match(`/([^/]*)(/(.*))?`);e=r[1],t=r[3]}else if(nk(n)){let r=n.pathname.match(`/([^/]*)/([^/]*)(/(.*))?`);e=r[2],t=r[4]}else{let r=n.pathname.match(`/([^/]*)(/(.*))?`);e=r[1],t=r[3]}if(e=decodeURIComponent(e),t=decodeURIComponent(t),t=t.replace(/\\/g,`/`),!e)throw Error(`Provided containerName is invalid.`);return{blobName:t,containerName:e}}catch{throw Error(`Unable to extract blobName and containerName with provided information.`)}}async startCopyFromURL(e,t={}){return fk.withSpan(`BlobClient-startCopyFromURL`,t,async n=>(t.conditions=t.conditions||{},t.sourceConditions=t.sourceConditions||{},uk(await this.blobContext.startCopyFromURL(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince,sourceIfTags:t.sourceConditions.tagConditions},immutabilityPolicyExpiry:t.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:t.immutabilityPolicy?.policyMode,legalHold:t.legalHold,rehydratePriority:t.rehydratePriority,tier:Zk(t.tier),blobTagsString:rk(t.tags),sealBlob:t.sealBlob,tracingOptions:n.tracingOptions}))))}generateSasUrl(e){return new Promise(t=>{if(!(this.credential instanceof xb))throw RangeError(`Can only generate the SAS when the client is initialized with a shared key credential`);let n=vk({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId,...e},this.credential).toString();t(YO(this.url,n))})}generateSasStringToSign(e){if(!(this.credential instanceof xb))throw RangeError(`Can only generate the SAS when the client is initialized with a shared key credential`);return yk({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId,...e},this.credential).stringToSign}generateUserDelegationSasUrl(e,t){return new Promise(n=>{let r=vk({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId,...e},t,this.accountName).toString();n(YO(this.url,r))})}generateUserDelegationSasStringToSign(e,t){return yk({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId,...e},t,this.accountName).stringToSign}async deleteImmutabilityPolicy(e={}){return fk.withSpan(`BlobClient-deleteImmutabilityPolicy`,e,async e=>uk(await this.blobContext.deleteImmutabilityPolicy({tracingOptions:e.tracingOptions})))}async setImmutabilityPolicy(e,t={}){return fk.withSpan(`BlobClient-setImmutabilityPolicy`,t,async t=>uk(await this.blobContext.setImmutabilityPolicy({immutabilityPolicyExpiry:e.expiriesOn,immutabilityPolicyMode:e.policyMode,tracingOptions:t.tracingOptions})))}async setLegalHold(e,t={}){return fk.withSpan(`BlobClient-setLegalHold`,t,async t=>uk(await this.blobContext.setLegalHold(e,{tracingOptions:t.tracingOptions})))}async getAccountInfo(e={}){return fk.withSpan(`BlobClient-getAccountInfo`,e,async t=>uk(await this.blobContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions})))}},_A=class e extends gA{appendBlobContext;constructor(e,t,n,r){let i,a;if(r||={},Gb(t))a=e,i=t;else if(Jm&&t instanceof xb||t instanceof mb||zh(t))a=e,r=n,i=qb(t,r);else if(!t&&typeof t!=`string`)a=e,i=qb(new mb,r);else if(t&&typeof t==`string`&&n&&typeof n==`string`){let o=t,s=n,c=UO(e);if(c.kind===`AccountConnString`)if(Jm){let e=new xb(c.accountName,c.accountKey);a=GO(GO(c.url,encodeURIComponent(o)),encodeURIComponent(s)),r.proxyOptions||=rh(c.proxyUri),i=qb(e,r)}else throw Error(`Account connection string is only supported in Node.js environment`);else if(c.kind===`SASConnString`)a=GO(GO(c.url,encodeURIComponent(o)),encodeURIComponent(s))+`?`+c.accountSas,i=qb(new mb,r);else throw Error(`Connection string must be either an Account connection string or a SAS connection string`)}else throw Error(`Expecting non-empty strings for containerName and blobName parameters`);super(a,i),this.appendBlobContext=this.storageClientContext.appendBlob}withSnapshot(t){return new e(KO(this.url,Vb.Parameters.SNAPSHOT,t.length===0?void 0:t),this.pipeline)}async create(e={}){return e.conditions=e.conditions||{},Qk(e.customerProvidedKey,this.isHttps),fk.withSpan(`AppendBlobClient-create`,e,async t=>uk(await this.appendBlobContext.create(0,{abortSignal:e.abortSignal,blobHttpHeaders:e.blobHTTPHeaders,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,immutabilityPolicyExpiry:e.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:e.immutabilityPolicy?.policyMode,legalHold:e.legalHold,blobTagsString:rk(e.tags),tracingOptions:t.tracingOptions})))}async createIfNotExists(e={}){let t={ifNoneMatch:`*`};return fk.withSpan(`AppendBlobClient-createIfNotExists`,e,async e=>{try{let n=uk(await this.create({...e,conditions:t}));return{succeeded:!0,...n,_response:n._response}}catch(e){if(e.details?.errorCode===`BlobAlreadyExists`)return{succeeded:!1,...e.response?.parsedHeaders,_response:e.response};throw e}})}async seal(e={}){return e.conditions=e.conditions||{},fk.withSpan(`AppendBlobClient-seal`,e,async t=>uk(await this.appendBlobContext.seal({abortSignal:e.abortSignal,appendPositionAccessConditions:e.conditions,leaseAccessConditions:e.conditions,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:t.tracingOptions})))}async appendBlock(e,t,n={}){return n.conditions=n.conditions||{},Qk(n.customerProvidedKey,this.isHttps),fk.withSpan(`AppendBlobClient-appendBlock`,n,async r=>uk(await this.appendBlobContext.appendBlock(t,e,{abortSignal:n.abortSignal,appendPositionAccessConditions:n.conditions,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},requestOptions:{onUploadProgress:n.onProgress},transactionalContentMD5:n.transactionalContentMD5,transactionalContentCrc64:n.transactionalContentCrc64,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,tracingOptions:r.tracingOptions})))}async appendBlockFromURL(e,t,n,r={}){return r.conditions=r.conditions||{},r.sourceConditions=r.sourceConditions||{},Qk(r.customerProvidedKey,this.isHttps),fk.withSpan(`AppendBlobClient-appendBlockFromURL`,r,async i=>uk(await this.appendBlobContext.appendBlockFromUrl(e,0,{abortSignal:r.abortSignal,sourceRange:lA({offset:t,count:n}),sourceContentMD5:r.sourceContentMD5,sourceContentCrc64:r.sourceContentCrc64,leaseAccessConditions:r.conditions,appendPositionAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:r.sourceConditions?.ifMatch,sourceIfModifiedSince:r.sourceConditions?.ifModifiedSince,sourceIfNoneMatch:r.sourceConditions?.ifNoneMatch,sourceIfUnmodifiedSince:r.sourceConditions?.ifUnmodifiedSince},copySourceAuthorization:ck(r.sourceAuthorization),cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,fileRequestIntent:r.sourceShareTokenIntent,tracingOptions:i.tracingOptions})))}},vA=class e extends gA{_blobContext;blockBlobContext;constructor(e,t,n,r){let i,a;if(r||={},Gb(t))a=e,i=t;else if(Jm&&t instanceof xb||t instanceof mb||zh(t))a=e,r=n,i=qb(t,r);else if(!t&&typeof t!=`string`)a=e,n&&typeof n!=`string`&&(r=n),i=qb(new mb,r);else if(t&&typeof t==`string`&&n&&typeof n==`string`){let o=t,s=n,c=UO(e);if(c.kind===`AccountConnString`)if(Jm){let e=new xb(c.accountName,c.accountKey);a=GO(GO(c.url,encodeURIComponent(o)),encodeURIComponent(s)),r.proxyOptions||=rh(c.proxyUri),i=qb(e,r)}else throw Error(`Account connection string is only supported in Node.js environment`);else if(c.kind===`SASConnString`)a=GO(GO(c.url,encodeURIComponent(o)),encodeURIComponent(s))+`?`+c.accountSas,i=qb(new mb,r);else throw Error(`Connection string must be either an Account connection string or a SAS connection string`)}else throw Error(`Expecting non-empty strings for containerName and blobName parameters`);super(a,i),this.blockBlobContext=this.storageClientContext.blockBlob,this._blobContext=this.storageClientContext.blob}withSnapshot(t){return new e(KO(this.url,Vb.Parameters.SNAPSHOT,t.length===0?void 0:t),this.pipeline)}async query(e,t={}){if(Qk(t.customerProvidedKey,this.isHttps),!Jm)throw Error(`This operation currently is only supported in Node.js.`);return fk.withSpan(`BlockBlobClient-query`,t,async n=>new Jk(uk(await this._blobContext.query({abortSignal:t.abortSignal,queryRequest:{queryType:`SQL`,expression:e,inputSerialization:ok(t.inputTextConfiguration),outputSerialization:ok(t.outputTextConfiguration)},leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},cpkInfo:t.customerProvidedKey,tracingOptions:n.tracingOptions})),{abortSignal:t.abortSignal,onProgress:t.onProgress,onError:t.onError}))}async upload(e,t,n={}){return n.conditions=n.conditions||{},Qk(n.customerProvidedKey,this.isHttps),fk.withSpan(`BlockBlobClient-upload`,n,async r=>uk(await this.blockBlobContext.upload(t,e,{abortSignal:n.abortSignal,blobHttpHeaders:n.blobHTTPHeaders,leaseAccessConditions:n.conditions,metadata:n.metadata,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},requestOptions:{onUploadProgress:n.onProgress},cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,immutabilityPolicyExpiry:n.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:n.immutabilityPolicy?.policyMode,legalHold:n.legalHold,tier:Zk(n.tier),blobTagsString:rk(n.tags),tracingOptions:r.tracingOptions})))}async syncUploadFromURL(e,t={}){return t.conditions=t.conditions||{},Qk(t.customerProvidedKey,this.isHttps),fk.withSpan(`BlockBlobClient-syncUploadFromURL`,t,async n=>uk(await this.blockBlobContext.putBlobFromUrl(0,e,{...t,blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions?.ifMatch,sourceIfModifiedSince:t.sourceConditions?.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions?.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions?.ifUnmodifiedSince,sourceIfTags:t.sourceConditions?.tagConditions},cpkInfo:t.customerProvidedKey,copySourceAuthorization:ck(t.sourceAuthorization),tier:Zk(t.tier),blobTagsString:rk(t.tags),copySourceTags:t.copySourceTags,fileRequestIntent:t.sourceShareTokenIntent,tracingOptions:n.tracingOptions})))}async stageBlock(e,t,n,r={}){return Qk(r.customerProvidedKey,this.isHttps),fk.withSpan(`BlockBlobClient-stageBlock`,r,async i=>uk(await this.blockBlobContext.stageBlock(e,n,t,{abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,requestOptions:{onUploadProgress:r.onProgress},transactionalContentMD5:r.transactionalContentMD5,transactionalContentCrc64:r.transactionalContentCrc64,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions})))}async stageBlockFromURL(e,t,n=0,r,i={}){return Qk(i.customerProvidedKey,this.isHttps),fk.withSpan(`BlockBlobClient-stageBlockFromURL`,i,async a=>uk(await this.blockBlobContext.stageBlockFromURL(e,0,t,{abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,sourceContentMD5:i.sourceContentMD5,sourceContentCrc64:i.sourceContentCrc64,sourceRange:n===0&&!r?void 0:lA({offset:n,count:r}),cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,copySourceAuthorization:ck(i.sourceAuthorization),fileRequestIntent:i.sourceShareTokenIntent,tracingOptions:a.tracingOptions})))}async commitBlockList(e,t={}){return t.conditions=t.conditions||{},Qk(t.customerProvidedKey,this.isHttps),fk.withSpan(`BlockBlobClient-commitBlockList`,t,async n=>uk(await this.blockBlobContext.commitBlockList({latest:e},{abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:t.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:t.immutabilityPolicy?.policyMode,legalHold:t.legalHold,tier:Zk(t.tier),blobTagsString:rk(t.tags),tracingOptions:n.tracingOptions})))}async getBlockList(e,t={}){return fk.withSpan(`BlockBlobClient-getBlockList`,t,async n=>{let r=uk(await this.blockBlobContext.getBlockList(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return r.committedBlocks||=[],r.uncommittedBlocks||=[],r})}async uploadData(e,t={}){return fk.withSpan(`BlockBlobClient-uploadData`,t,async t=>{if(Jm){let n;return e instanceof Buffer?n=e:e instanceof ArrayBuffer?n=Buffer.from(e):(e=e,n=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),this.uploadSeekableInternal((e,t)=>n.slice(e,e+t),n.byteLength,t)}else{let n=new Blob([e]);return this.uploadSeekableInternal((e,t)=>n.slice(e,e+t),n.size,t)}})}async uploadBrowserData(e,t={}){return fk.withSpan(`BlockBlobClient-uploadBrowserData`,t,async t=>{let n=new Blob([e]);return this.uploadSeekableInternal((e,t)=>n.slice(e,e+t),n.size,t)})}async uploadSeekableInternal(e,t,n={}){let r=n.blockSize??0;if(r<0||r>4194304e3)throw RangeError(`blockSize option must be >= 0 and <= 4194304000`);let i=n.maxSingleShotSize??268435456;if(i<0||i>268435456)throw RangeError(`maxSingleShotSize option must be >= 0 and <= 268435456`);if(r===0){if(t>4194304e3*5e4)throw RangeError(`${t} is too larger to upload to a block blob.`);t>i&&(r=Math.ceil(t/zb),r<4194304&&(r=Bb))}return n.blobHTTPHeaders||={},n.conditions||={},fk.withSpan(`BlockBlobClient-uploadSeekableInternal`,n,async a=>{if(t<=i)return uk(await this.upload(e(0,t),t,a));let o=Math.floor((t-1)/r)+1;if(o>5e4)throw RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${zb}`);let s=[],c=qm(),l=0,u=new dA(n.concurrency);for(let i=0;i{let u=QO(c,i),d=r*i,f=(i===o-1?t:d+r)-d;s.push(u),await this.stageBlock(u,e(d,f),f,{abortSignal:n.abortSignal,conditions:n.conditions,encryptionScope:n.encryptionScope,tracingOptions:a.tracingOptions}),l+=f,n.onProgress&&n.onProgress({loadedBytes:l})});return await u.do(),this.commitBlockList(s,a)})}async uploadFile(e,t={}){return fk.withSpan(`BlockBlobClient-uploadFile`,t,async n=>{let r=(await mA(e)).size;return this.uploadSeekableInternal((t,n)=>()=>hA(e,{autoClose:!0,end:n?t+n-1:1/0,start:t}),r,{...t,tracingOptions:n.tracingOptions})})}async uploadStream(e,t=8388608,n=5,r={}){return r.blobHTTPHeaders||={},r.conditions||={},fk.withSpan(`BlockBlobClient-uploadStream`,r,async i=>{let a=0,o=qm(),s=0,c=[];return await new Qy(e,t,n,async(e,t)=>{let n=QO(o,a);c.push(n),a++,await this.stageBlock(n,e,t,{customerProvidedKey:r.customerProvidedKey,conditions:r.conditions,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions}),s+=t,r.onProgress&&r.onProgress({loadedBytes:s})},Math.ceil(n/4*3)).do(),uk(await this.commitBlockList(c,{...r,tracingOptions:i.tracingOptions}))})}},yA=class e extends gA{pageBlobContext;constructor(e,t,n,r){let i,a;if(r||={},Gb(t))a=e,i=t;else if(Jm&&t instanceof xb||t instanceof mb||zh(t))a=e,r=n,i=qb(t,r);else if(!t&&typeof t!=`string`)a=e,i=qb(new mb,r);else if(t&&typeof t==`string`&&n&&typeof n==`string`){let o=t,s=n,c=UO(e);if(c.kind===`AccountConnString`)if(Jm){let e=new xb(c.accountName,c.accountKey);a=GO(GO(c.url,encodeURIComponent(o)),encodeURIComponent(s)),r.proxyOptions||=rh(c.proxyUri),i=qb(e,r)}else throw Error(`Account connection string is only supported in Node.js environment`);else if(c.kind===`SASConnString`)a=GO(GO(c.url,encodeURIComponent(o)),encodeURIComponent(s))+`?`+c.accountSas,i=qb(new mb,r);else throw Error(`Connection string must be either an Account connection string or a SAS connection string`)}else throw Error(`Expecting non-empty strings for containerName and blobName parameters`);super(a,i),this.pageBlobContext=this.storageClientContext.pageBlob}withSnapshot(t){return new e(KO(this.url,Vb.Parameters.SNAPSHOT,t.length===0?void 0:t),this.pipeline)}async create(e,t={}){return t.conditions=t.conditions||{},Qk(t.customerProvidedKey,this.isHttps),fk.withSpan(`PageBlobClient-create`,t,async n=>uk(await this.pageBlobContext.create(0,e,{abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,blobSequenceNumber:t.blobSequenceNumber,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:t.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:t.immutabilityPolicy?.policyMode,legalHold:t.legalHold,tier:Zk(t.tier),blobTagsString:rk(t.tags),tracingOptions:n.tracingOptions})))}async createIfNotExists(e,t={}){return fk.withSpan(`PageBlobClient-createIfNotExists`,t,async n=>{try{let r={ifNoneMatch:`*`},i=uk(await this.create(e,{...t,conditions:r,tracingOptions:n.tracingOptions}));return{succeeded:!0,...i,_response:i._response}}catch(e){if(e.details?.errorCode===`BlobAlreadyExists`)return{succeeded:!1,...e.response?.parsedHeaders,_response:e.response};throw e}})}async uploadPages(e,t,n,r={}){return r.conditions=r.conditions||{},Qk(r.customerProvidedKey,this.isHttps),fk.withSpan(`PageBlobClient-uploadPages`,r,async i=>uk(await this.pageBlobContext.uploadPages(n,e,{abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},requestOptions:{onUploadProgress:r.onProgress},range:lA({offset:t,count:n}),sequenceNumberAccessConditions:r.conditions,transactionalContentMD5:r.transactionalContentMD5,transactionalContentCrc64:r.transactionalContentCrc64,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions})))}async uploadPagesFromURL(e,t,n,r,i={}){return i.conditions=i.conditions||{},i.sourceConditions=i.sourceConditions||{},Qk(i.customerProvidedKey,this.isHttps),fk.withSpan(`PageBlobClient-uploadPagesFromURL`,i,async a=>uk(await this.pageBlobContext.uploadPagesFromURL(e,lA({offset:t,count:r}),0,lA({offset:n,count:r}),{abortSignal:i.abortSignal,sourceContentMD5:i.sourceContentMD5,sourceContentCrc64:i.sourceContentCrc64,leaseAccessConditions:i.conditions,sequenceNumberAccessConditions:i.conditions,modifiedAccessConditions:{...i.conditions,ifTags:i.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:i.sourceConditions?.ifMatch,sourceIfModifiedSince:i.sourceConditions?.ifModifiedSince,sourceIfNoneMatch:i.sourceConditions?.ifNoneMatch,sourceIfUnmodifiedSince:i.sourceConditions?.ifUnmodifiedSince},cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,copySourceAuthorization:ck(i.sourceAuthorization),fileRequestIntent:i.sourceShareTokenIntent,tracingOptions:a.tracingOptions})))}async clearPages(e=0,t,n={}){return n.conditions=n.conditions||{},fk.withSpan(`PageBlobClient-clearPages`,n,async r=>uk(await this.pageBlobContext.clearPages(0,{abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},range:lA({offset:e,count:t}),sequenceNumberAccessConditions:n.conditions,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,tracingOptions:r.tracingOptions})))}async getPageRanges(e=0,t,n={}){return n.conditions=n.conditions||{},fk.withSpan(`PageBlobClient-getPageRanges`,n,async r=>eA(uk(await this.pageBlobContext.getPageRanges({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},range:lA({offset:e,count:t}),tracingOptions:r.tracingOptions}))))}async listPageRangesSegment(e=0,t,n,r={}){return fk.withSpan(`PageBlobClient-getPageRangesSegment`,r,async i=>uk(await this.pageBlobContext.getPageRanges({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},range:lA({offset:e,count:t}),marker:n,maxPageSize:r.maxPageSize,tracingOptions:i.tracingOptions})))}async*listPageRangeItemSegments(e=0,t,n,r={}){let i;if(n||n===void 0)do i=await this.listPageRangesSegment(e,t,n,r),n=i.continuationToken,yield await i;while(n)}async*listPageRangeItems(e=0,t,n={}){for await(let r of this.listPageRangeItemSegments(e,t,void 0,n))yield*lk(r)}listPageRanges(e=0,t,n={}){n.conditions=n.conditions||{};let r=this.listPageRangeItems(e,t,n);return{next(){return r.next()},[Symbol.asyncIterator](){return this},byPage:(r={})=>this.listPageRangeItemSegments(e,t,r.continuationToken,{maxPageSize:r.maxPageSize,...n})}}async getPageRangesDiff(e,t,n,r={}){return r.conditions=r.conditions||{},fk.withSpan(`PageBlobClient-getPageRangesDiff`,r,async i=>eA(uk(await this.pageBlobContext.getPageRangesDiff({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},prevsnapshot:n,range:lA({offset:e,count:t}),tracingOptions:i.tracingOptions}))))}async listPageRangesDiffSegment(e,t,n,r,i={}){return fk.withSpan(`PageBlobClient-getPageRangesDiffSegment`,i,async a=>uk(await this.pageBlobContext.getPageRangesDiff({abortSignal:i?.abortSignal,leaseAccessConditions:i?.conditions,modifiedAccessConditions:{...i?.conditions,ifTags:i?.conditions?.tagConditions},prevsnapshot:n,range:lA({offset:e,count:t}),marker:r,maxPageSize:i?.maxPageSize,tracingOptions:a.tracingOptions})))}async*listPageRangeDiffItemSegments(e,t,n,r,i){let a;if(r||r===void 0)do a=await this.listPageRangesDiffSegment(e,t,n,r,i),r=a.continuationToken,yield await a;while(r)}async*listPageRangeDiffItems(e,t,n,r){for await(let i of this.listPageRangeDiffItemSegments(e,t,n,void 0,r))yield*lk(i)}listPageRangesDiff(e,t,n,r={}){r.conditions=r.conditions||{};let i=this.listPageRangeDiffItems(e,t,n,{...r});return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(i={})=>this.listPageRangeDiffItemSegments(e,t,n,i.continuationToken,{maxPageSize:i.maxPageSize,...r})}}async getPageRangesDiffForManagedDisks(e,t,n,r={}){return r.conditions=r.conditions||{},fk.withSpan(`PageBlobClient-GetPageRangesDiffForManagedDisks`,r,async i=>eA(uk(await this.pageBlobContext.getPageRangesDiff({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},prevSnapshotUrl:n,range:lA({offset:e,count:t}),tracingOptions:i.tracingOptions}))))}async resize(e,t={}){return t.conditions=t.conditions||{},fk.withSpan(`PageBlobClient-resize`,t,async n=>uk(await this.pageBlobContext.resize(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},encryptionScope:t.encryptionScope,tracingOptions:n.tracingOptions})))}async updateSequenceNumber(e,t,n={}){return n.conditions=n.conditions||{},fk.withSpan(`PageBlobClient-updateSequenceNumber`,n,async r=>uk(await this.pageBlobContext.updateSequenceNumber(e,{abortSignal:n.abortSignal,blobSequenceNumber:t,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},tracingOptions:r.tracingOptions})))}async startCopyIncremental(e,t={}){return fk.withSpan(`PageBlobClient-startCopyIncremental`,t,async n=>uk(await this.pageBlobContext.copyIncremental(e,{abortSignal:t.abortSignal,modifiedAccessConditions:{...t.conditions,ifTags:t.conditions?.tagConditions},tracingOptions:n.tracingOptions})))}},bA=class extends Error{constructor(e){super(e),this.name=`InvalidResponseError`}},xA=class extends Error{constructor(e){let t=`Unable to make request: ${e}\nIf 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(t),this.code=e,this.name=`NetworkError`}};xA.isNetworkErrorCode=e=>e?[`ECONNRESET`,`ENOTFOUND`,`ETIMEDOUT`,`ECONNREFUSED`,`EHOSTUNREACH`].includes(e):!1;var SA=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`}};SA.isUsageErrorMessage=e=>e?e.includes(`insufficient usage`):!1;var CA=class extends Error{constructor(e){super(e),this.name=`RateLimitError`}},wA=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},TA=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,t=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,r=(e/(1024*1024)/(n/1e3)).toFixed(1);vi(`Sent ${e} of ${this.contentLength} (${t}%), ${r} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let t=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(t,e))};this.timeoutHandle=setTimeout(t,e)}stopDisplayTimer(){this.timeoutHandle&&=(clearTimeout(this.timeoutHandle),void 0),this.display()}};function EA(e,t,n){return wA(this,void 0,void 0,function*(){let r=new gA(e),i=r.getBlockBlobClient(),a=new TA(n?.archiveSizeBytes??0),o={blockSize:n?.uploadChunkSize,concurrency:n?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),K(`BlobClient: ${r.name}:${r.accountName}:${r.containerName}`);let e=yield i.uploadFile(t,o);if(e._response.status>=400)throw new bA(`uploadCacheArchiveSDK: upload failed with status code ${e._response.status}`);return e}catch(e){throw _i(`uploadCacheArchiveSDK: internal error uploading cache archive: ${e.message}`),e}finally{a.stopDisplayTimer()}})}var DA=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function OA(e){return e?e>=200&&e<300:!1}function kA(e){return e?e>=500:!0}function AA(e){return e?[sr.BadGateway,sr.ServiceUnavailable,sr.GatewayTimeout].includes(e):!1}function jA(e){return DA(this,void 0,void 0,function*(){return new Promise(t=>setTimeout(t,e))})}function MA(e,t,n){return DA(this,arguments,void 0,function*(e,t,n,r=2,i=Kd,a=void 0){let o=``,s=1;for(;s<=r;){let c,l,u=!1;try{c=yield t()}catch(e){a&&(c=a(e)),u=!0,o=e.message}if(c&&(l=n(c),!kA(l)))return c;if(l&&(u=AA(l),o=`Cache service responded with ${l}`),K(`${e} - Attempt ${s} of ${r} failed with error: ${o}`),!u){K(`${e} - Error is not retryable`);break}yield jA(i),s++}throw Error(`${e} failed: ${o}`)})}function NA(e,t){return DA(this,arguments,void 0,function*(e,t,n=2,r=Kd){return yield MA(e,t,e=>e.statusCode,n,r,e=>{if(e instanceof pr)return{statusCode:e.statusCode,result:null,headers:{},error:e}})})}function PA(e,t){return DA(this,arguments,void 0,function*(e,t,n=2,r=Kd){return yield MA(e,t,e=>e.message.statusCode,n,r)})}var FA=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function IA(e,t){return FA(this,void 0,void 0,function*(){yield Ee.promisify(Ye.pipeline)(e.message,t)})}var LA=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.segmentSize,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,t=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,r=(e/(1024*1024)/(n/1e3)).toFixed(1);vi(`Received ${e} of ${this.contentLength} (${t}%), ${r} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let t=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(t,e))};this.timeoutHandle=setTimeout(t,e)}stopDisplayTimer(){this.timeoutHandle&&=(clearTimeout(this.timeoutHandle),void 0),this.display()}};function RA(e,t){return FA(this,void 0,void 0,function*(){let n=fe.createWriteStream(t),r=new hr(`actions/cache`),i=yield PA(`downloadCache`,()=>FA(this,void 0,void 0,function*(){return r.get(e)}));i.message.socket.setTimeout(qd,()=>{i.message.destroy(),K(`Aborting download, socket timed out after ${qd} ms`)}),yield IA(i,n);let a=i.message.headers[`content-length`];if(a){let e=parseInt(a),n=tf(t);if(n!==e)throw Error(`Incomplete download. Expected file size: ${e}, actual file size: ${n}`)}else K(`Unable to validate download, no Content-Length header`)})}function zA(e,t,n){return FA(this,void 0,void 0,function*(){let r=yield fe.promises.open(t,`w`),i=new hr(`actions/cache`,void 0,{socketTimeout:n.timeoutInMs,keepAlive:!0});try{let t=(yield PA(`downloadCacheMetadata`,()=>FA(this,void 0,void 0,function*(){return yield i.request(`HEAD`,e,null,{})}))).message.headers[`content-length`];if(t==null)throw Error(`Content-Length not found on blob response`);let a=parseInt(t);if(Number.isNaN(a))throw Error(`Could not interpret Content-Length: ${a}`);let o=[],s=4*1024*1024;for(let t=0;tFA(this,void 0,void 0,function*(){return yield BA(i,e,t,n)})})}o.reverse();let c=0,l=0,u=new LA(a);u.startDisplayTimer();let d=u.onProgress(),f=[],p,m=()=>FA(this,void 0,void 0,function*(){let e=yield Promise.race(Object.values(f));yield r.write(e.buffer,0,e.count,e.offset),c--,delete f[e.offset],l+=e.count,d({loadedBytes:l})});for(;p=o.pop();)f[p.offset]=p.promiseGetter(),c++,c>=(n.downloadConcurrency??10)&&(yield m());for(;c>0;)yield m()}finally{i.dispose(),yield r.close()}})}function BA(e,t,n,r){return FA(this,void 0,void 0,function*(){let i=0;for(;;)try{let i=yield UA(3e4,VA(e,t,n,r));if(typeof i==`string`)throw Error(`downloadSegmentRetry failed due to timeout`);return i}catch(e){if(i>=5)throw e;i++}})}function VA(e,t,n,r){return FA(this,void 0,void 0,function*(){let i=yield PA(`downloadCachePart`,()=>FA(this,void 0,void 0,function*(){return yield e.get(t,{Range:`bytes=${n}-${n+r-1}`})}));if(!i.readBodyBuffer)throw Error(`Expected HttpClientResponse to implement readBodyBuffer`);return{offset:n,count:r,buffer:yield i.readBodyBuffer()}})}function HA(e,t,n){return FA(this,void 0,void 0,function*(){let r=new vA(e,void 0,{retryOptions:{tryTimeoutInMs:n.timeoutInMs}}),i=(yield r.getProperties()).contentLength??-1;if(i<0)K(`Unable to determine content length, downloading file with http-client...`),yield RA(e,t);else{let e=Math.min(134217728,Je.constants.MAX_LENGTH),a=new LA(i),o=fe.openSync(t,`w`);try{a.startDisplayTimer();let t=new AbortController,s=t.signal;for(;!a.isDone();){let c=a.segmentOffset+a.segmentSize,l=Math.min(e,i-c);a.nextSegment(l);let u=yield UA(n.segmentTimeoutInMs||36e5,r.downloadToBuffer(c,l,{abortSignal:s,concurrency:n.downloadConcurrency,onProgress:a.onProgress()}));if(u===`timeout`)throw t.abort(),Error(`Aborting cache download as the download time exceeded the timeout.`);Buffer.isBuffer(u)&&fe.writeFileSync(o,u)}}finally{a.stopDisplayTimer(),fe.closeSync(o)}}})}const UA=(e,t)=>FA(void 0,void 0,void 0,function*(){let n,r=new Promise(t=>{n=setTimeout(()=>t(`timeout`),e)});return Promise.race([t,r]).then(e=>(clearTimeout(n),e))});function WA(e){let t={useAzureSdk:!1,uploadConcurrency:4,uploadChunkSize:32*1024*1024};return e&&(typeof e.useAzureSdk==`boolean`&&(t.useAzureSdk=e.useAzureSdk),typeof e.uploadConcurrency==`number`&&(t.uploadConcurrency=e.uploadConcurrency),typeof e.uploadChunkSize==`number`&&(t.uploadChunkSize=e.uploadChunkSize)),t.uploadConcurrency=isNaN(Number(process.env.CACHE_UPLOAD_CONCURRENCY))?t.uploadConcurrency:Math.min(32,Number(process.env.CACHE_UPLOAD_CONCURRENCY)),t.uploadChunkSize=isNaN(Number(process.env.CACHE_UPLOAD_CHUNK_SIZE))?t.uploadChunkSize:Math.min(128*1024*1024,Number(process.env.CACHE_UPLOAD_CHUNK_SIZE)*1024*1024),K(`Use Azure SDK: ${t.useAzureSdk}`),K(`Upload concurrency: ${t.uploadConcurrency}`),K(`Upload chunk size: ${t.uploadChunkSize}`),t}function GA(e){let t={useAzureSdk:!1,concurrentBlobDownloads:!0,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:6e5,lookupOnly:!1};e&&(typeof e.useAzureSdk==`boolean`&&(t.useAzureSdk=e.useAzureSdk),typeof e.concurrentBlobDownloads==`boolean`&&(t.concurrentBlobDownloads=e.concurrentBlobDownloads),typeof e.downloadConcurrency==`number`&&(t.downloadConcurrency=e.downloadConcurrency),typeof e.timeoutInMs==`number`&&(t.timeoutInMs=e.timeoutInMs),typeof e.segmentTimeoutInMs==`number`&&(t.segmentTimeoutInMs=e.segmentTimeoutInMs),typeof e.lookupOnly==`boolean`&&(t.lookupOnly=e.lookupOnly));let n=process.env.SEGMENT_DOWNLOAD_TIMEOUT_MINS;return n&&!isNaN(Number(n))&&isFinite(Number(n))&&(t.segmentTimeoutInMs=Number(n)*60*1e3),K(`Use Azure SDK: ${t.useAzureSdk}`),K(`Download concurrency: ${t.downloadConcurrency}`),K(`Request timeout (ms): ${t.timeoutInMs}`),K(`Cache segment download timeout mins env var: ${process.env.SEGMENT_DOWNLOAD_TIMEOUT_MINS}`),K(`Segment download timeout (ms): ${t.segmentTimeoutInMs}`),K(`Lookup only: ${t.lookupOnly}`),t}function KA(){let e=new URL(process.env.GITHUB_SERVER_URL||`https://github.com`).hostname.trimEnd().toUpperCase(),t=e===`GITHUB.COM`,n=e.endsWith(`.GHE.COM`),r=e.endsWith(`.LOCALHOST`);return!t&&!n&&!r}function qA(){return KA()?`v1`:process.env.ACTIONS_CACHE_SERVICE_V2?`v2`:`v1`}function JA(){let e=qA();switch(e){case`v1`:return process.env.ACTIONS_CACHE_URL||process.env.ACTIONS_RESULTS_URL||``;case`v2`:return process.env.ACTIONS_RESULTS_URL||``;default:throw Error(`Unsupported cache service version: ${e}`)}}var YA=i(((e,t)=>{t.exports={name:`@actions/cache`,version:`6.0.0`,description:`Actions cache lib`,keywords:[`github`,`actions`,`cache`],homepage:`https://github.com/actions/toolkit/tree/main/packages/cache`,license:`MIT`,type:`module`,main:`lib/cache.js`,types:`lib/cache.d.ts`,exports:{".":{types:`./lib/cache.d.ts`,import:`./lib/cache.js`}},directories:{lib:`lib`,test:`__tests__`},files:[`lib`,`!.DS_Store`],publishConfig:{access:`public`},repository:{type:`git`,url:`git+https://github.com/actions/toolkit.git`,directory:`packages/cache`},scripts:{"audit-moderate":`npm install && npm audit --json --audit-level=moderate > audit.json`,test:`echo "Error: run tests from root" && exit 1`,tsc:`tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/`},bugs:{url:`https://github.com/actions/toolkit/issues`},dependencies:{"@actions/core":`^3.0.0`,"@actions/exec":`^3.0.0`,"@actions/glob":`^0.6.1`,"@actions/http-client":`^4.0.0`,"@actions/io":`^3.0.0`,"@azure/core-rest-pipeline":`^1.22.0`,"@azure/storage-blob":`^12.30.0`,"@protobuf-ts/runtime-rpc":`^2.11.1`,semver:`^7.7.3`},devDependencies:{"@protobuf-ts/plugin":`^2.9.4`,"@types/node":`^25.1.0`,"@types/semver":`^7.7.1`,typescript:`^5.2.2`},overrides:{"uri-js":`npm:uri-js-replace@^1.0.1`,"node-fetch":`^3.3.2`}}})),XA=i(((e,t)=>{t.exports={version:YA().version}}))();function ZA(){return`@actions/cache-${XA.version}`}var QA=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function $A(e){let t=JA();if(!t)throw Error(`Cache Service Url not found, unable to restore cache.`);let n=`${t}_apis/artifactcache/${e}`;return K(`Resource Url: ${n}`),n}function ej(e,t){return`${e};api-version=${t}`}function tj(){return{headers:{Accept:ej(`application/json`,`6.0-preview.1`)}}}function nj(){let e=new vr(process.env.ACTIONS_RUNTIME_TOKEN||``);return new hr(ZA(),[e],tj())}function rj(e,t,n){return QA(this,void 0,void 0,function*(){let r=nj(),i=uf(t,n?.compressionMethod,n?.enableCrossOsArchive),a=`cache?keys=${encodeURIComponent(e.join(`,`))}&version=${i}`,o=yield NA(`getCacheEntry`,()=>QA(this,void 0,void 0,function*(){return r.getJson($A(a))}));if(o.statusCode===204)return hi()&&(yield ij(e[0],r,i)),null;if(!OA(o.statusCode))throw Error(`Cache service responded with ${o.statusCode}`);let s=o.result,c=s?.archiveLocation;if(!c)throw Error(`Cache not found.`);return ui(c),K(`Cache Result:`),K(JSON.stringify(s)),s})}function ij(e,t,n){return QA(this,void 0,void 0,function*(){let r=`caches?key=${encodeURIComponent(e)}`,i=yield NA(`listCache`,()=>QA(this,void 0,void 0,function*(){return t.getJson($A(r))}));if(i.statusCode===200){let t=i.result,r=t?.totalCount;if(r&&r>0){K(`No matching cache found for cache key '${e}', version '${n} and scope ${process.env.GITHUB_REF}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`);for(let e of t?.artifactCaches||[])K(`Cache Key: ${e?.cacheKey}, Cache Version: ${e?.cacheVersion}, Cache Scope: ${e?.scope}, Cache Created: ${e?.creationTime}`)}}})}function aj(e,t,n){return QA(this,void 0,void 0,function*(){let r=new et(e),i=GA(n);r.hostname.endsWith(`.blob.core.windows.net`)?i.useAzureSdk?yield HA(e,t,i):i.concurrentBlobDownloads?yield zA(e,t,i):yield RA(e,t):yield RA(e,t)})}function oj(e,t,n){return QA(this,void 0,void 0,function*(){let r=nj(),i={key:e,version:uf(t,n?.compressionMethod,n?.enableCrossOsArchive),cacheSize:n?.cacheSize};return yield NA(`reserveCache`,()=>QA(this,void 0,void 0,function*(){return r.postJson($A(`caches`),i)}))})}function sj(e,t){return`bytes ${e}-${t}/*`}function cj(e,t,n,r,i){return QA(this,void 0,void 0,function*(){K(`Uploading chunk of size ${i-r+1} bytes at offset ${r} with content range: ${sj(r,i)}`);let a={"Content-Type":`application/octet-stream`,"Content-Range":sj(r,i)},o=yield PA(`uploadChunk (start: ${r}, end: ${i})`,()=>QA(this,void 0,void 0,function*(){return e.sendStream(`PATCH`,t,n(),a)}));if(!OA(o.message.statusCode))throw Error(`Cache service responded with ${o.message.statusCode} during upload chunk.`)})}function lj(e,t,n,r){return QA(this,void 0,void 0,function*(){let i=tf(n),a=$A(`caches/${t.toString()}`),o=fe.openSync(n,`r`),s=WA(r),c=lf(`uploadConcurrency`,s.uploadConcurrency),l=lf(`uploadChunkSize`,s.uploadChunkSize),u=[...Array(c).keys()];K(`Awaiting all uploads`);let d=0;try{yield Promise.all(u.map(()=>QA(this,void 0,void 0,function*(){for(;dfe.createReadStream(n,{fd:o,start:r,end:s,autoClose:!1}).on(`error`,e=>{throw Error(`Cache upload failed because file read failed with ${e.message}`)}),r,s)}})))}finally{fe.closeSync(o)}})}function uj(e,t,n){return QA(this,void 0,void 0,function*(){let r={size:n};return yield NA(`commitCache`,()=>QA(this,void 0,void 0,function*(){return e.postJson($A(`caches/${t.toString()}`),r)}))})}function dj(e,t,n,r){return QA(this,void 0,void 0,function*(){if(WA(r).useAzureSdk){if(!n)throw Error(`Azure Storage SDK can only be used when a signed URL is provided.`);yield EA(n,t,r)}else{let n=nj();K(`Upload cache`),yield lj(n,e,t,r),K(`Commiting cache`);let i=tf(t);vi(`Cache Size: ~${Math.round(i/(1024*1024))} MB (${i} B)`);let a=yield uj(n,e,i);if(!OA(a.statusCode))throw Error(`Cache service responded with ${a.statusCode} during commit cache.`);vi(`Cache saved successfully`)}})}var fj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isJsonObject=e.typeofJsonValue=void 0;function t(e){let t=typeof e;if(t==`object`){if(Array.isArray(e))return`array`;if(e===null)return`null`}return t}e.typeofJsonValue=t;function n(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}e.isJsonObject=n})),pj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.base64encode=e.base64decode=void 0;let t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),n=[];for(let e=0;e>4,s=o,a=2;break;case 2:r[i++]=(s&15)<<4|(o&60)>>2,s=o,a=3;break;case 3:r[i++]=(s&3)<<6|o,a=0;break}}if(a==1)throw Error(`invalid base64 string.`);return r.subarray(0,i)}e.base64decode=r;function i(e){let n=``,r=0,i,a=0;for(let o=0;o>2],a=(i&3)<<4,r=1;break;case 1:n+=t[a|i>>4],a=(i&15)<<2,r=2;break;case 2:n+=t[a|i>>6],n+=t[i&63],r=0;break}return r&&(n+=t[a],n+=`=`,r==1&&(n+=`=`)),n}e.base64encode=i})),mj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.utf8read=void 0;let t=e=>String.fromCharCode.apply(String,e);function n(e){if(e.length<1)return``;let n=0,r=[],i=[],a=0,o,s=e.length;for(;n191&&o<224?i[a++]=(o&31)<<6|e[n++]&63:o>239&&o<365?(o=((o&7)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,i[a++]=55296+(o>>10),i[a++]=56320+(o&1023)):i[a++]=(o&15)<<12|(e[n++]&63)<<6|e[n++]&63,a>8191&&(r.push(t(i)),a=0);return r.length?(a&&r.push(t(i.slice(0,a))),r.join(``)):t(i.slice(0,a))}e.utf8read=n})),hj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WireType=e.mergeBinaryOptions=e.UnknownFieldHandler=void 0,(function(e){e.symbol=Symbol.for(`protobuf-ts/unknown`),e.onRead=(n,r,i,a,o)=>{(t(r)?r[e.symbol]:r[e.symbol]=[]).push({no:i,wireType:a,data:o})},e.onWrite=(t,n,r)=>{for(let{no:t,wireType:i,data:a}of e.list(n))r.tag(t,i).raw(a)},e.list=(n,r)=>{if(t(n)){let t=n[e.symbol];return r?t.filter(e=>e.no==r):t}return[]},e.last=(t,n)=>e.list(t,n).slice(-1)[0];let t=t=>t&&Array.isArray(t[e.symbol])})(e.UnknownFieldHandler||={});function t(e,t){return Object.assign(Object.assign({},e),t)}e.mergeBinaryOptions=t,(function(e){e[e.Varint=0]=`Varint`,e[e.Bit64=1]=`Bit64`,e[e.LengthDelimited=2]=`LengthDelimited`,e[e.StartGroup=3]=`StartGroup`,e[e.EndGroup=4]=`EndGroup`,e[e.Bit32=5]=`Bit32`})(e.WireType||={})})),gj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.varint32read=e.varint32write=e.int64toString=e.int64fromString=e.varint64write=e.varint64read=void 0;function t(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(r&127)<>4,!(n&128))return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(r&127)<>>r,a=!(!(i>>>7)&&t==0),o=(a?i|128:i)&255;if(n.push(o),!a)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=!!(r>>>7),a=(i?r|128:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}e.varint64write=n;let r=65536*65536;function i(e){let t=e[0]==`-`;t&&(e=e.slice(1));let n=1e6,i=0,a=0;function o(t,o){let s=Number(e.slice(t,o));a*=n,i=i*n+s,i>=r&&(a+=i/r|0,i%=r)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),[t,i,a]}e.int64fromString=i;function a(e,t){if(t>>>0<=2097151)return``+(r*t+(e>>>0));let n=e&16777215,i=(e>>>24|t<<8)>>>0&16777215,a=t>>16&65535,o=n+i*6777216+a*6710656,s=i+a*8147497,c=a*2,l=1e7;o>=l&&(s+=Math.floor(o/l),o%=l),s>=l&&(c+=Math.floor(s/l),s%=l);function u(e,t){let n=e?String(e):``;return t?`0000000`.slice(n.length)+n:n}return u(c,0)+u(s,c)+u(o,1)}e.int64toString=a;function o(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e>>=7;t.push(1)}}e.varint32write=o;function s(){let e=this.buf[this.pos++],t=e&127;if(!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}e.varint32read=s})),_j=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PbLong=e.PbULong=e.detectBi=void 0;let t=gj(),n;function r(){let e=new DataView(new ArrayBuffer(8));n=globalThis.BigInt!==void 0&&typeof e.getBigInt64==`function`&&typeof e.getBigUint64==`function`&&typeof e.setBigInt64==`function`&&typeof e.setBigUint64==`function`?{MIN:BigInt(`-9223372036854775808`),MAX:BigInt(`9223372036854775807`),UMIN:BigInt(`0`),UMAX:BigInt(`18446744073709551615`),C:BigInt,V:e}:void 0}e.detectBi=r,r();function i(e){if(!e)throw Error(`BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support`)}let a=/^-?[0-9]+$/,o=4294967296,s=2147483648;var c=class{constructor(e,t){this.lo=e|0,this.hi=t|0}isZero(){return this.lo==0&&this.hi==0}toNumber(){let e=this.hi*o+(this.lo>>>0);if(!Number.isSafeInteger(e))throw Error(`cannot convert to safe number`);return e}},l=class e extends c{static from(r){if(n)switch(typeof r){case`string`:if(r==`0`)return this.ZERO;if(r==``)throw Error(`string is no integer`);r=n.C(r);case`number`:if(r===0)return this.ZERO;r=n.C(r);case`bigint`:if(!r)return this.ZERO;if(rn.UMAX)throw Error(`ulong too large`);return n.V.setBigUint64(0,r,!0),new e(n.V.getInt32(0,!0),n.V.getInt32(4,!0))}else switch(typeof r){case`string`:if(r==`0`)return this.ZERO;if(r=r.trim(),!a.test(r))throw Error(`string is no integer`);let[n,i,s]=t.int64fromString(r);if(n)throw Error(`signed value for ulong`);return new e(i,s);case`number`:if(r==0)return this.ZERO;if(!Number.isSafeInteger(r))throw Error(`number is no integer`);if(r<0)throw Error(`signed value for ulong`);return new e(r,r/o)}throw Error(`unknown value `+typeof r)}toString(){return n?this.toBigInt().toString():t.int64toString(this.lo,this.hi)}toBigInt(){return i(n),n.V.setInt32(0,this.lo,!0),n.V.setInt32(4,this.hi,!0),n.V.getBigUint64(0,!0)}};e.PbULong=l,l.ZERO=new l(0,0);var u=class e extends c{static from(r){if(n)switch(typeof r){case`string`:if(r==`0`)return this.ZERO;if(r==``)throw Error(`string is no integer`);r=n.C(r);case`number`:if(r===0)return this.ZERO;r=n.C(r);case`bigint`:if(!r)return this.ZERO;if(rn.MAX)throw Error(`signed long too large`);return n.V.setBigInt64(0,r,!0),new e(n.V.getInt32(0,!0),n.V.getInt32(4,!0))}else switch(typeof r){case`string`:if(r==`0`)return this.ZERO;if(r=r.trim(),!a.test(r))throw Error(`string is no integer`);let[n,i,c]=t.int64fromString(r);if(n){if(c>s||c==s&&i!=0)throw Error(`signed long too small`)}else if(c>=s)throw Error(`signed long too large`);let l=new e(i,c);return n?l.negate():l;case`number`:if(r==0)return this.ZERO;if(!Number.isSafeInteger(r))throw Error(`number is no integer`);return r>0?new e(r,r/o):new e(-r,-r/o).negate()}throw Error(`unknown value `+typeof r)}isNegative(){return(this.hi&s)!==0}negate(){let t=~this.hi,n=this.lo;return n?n=~n+1:t+=1,new e(n,t)}toString(){if(n)return this.toBigInt().toString();if(this.isNegative()){let e=this.negate();return`-`+t.int64toString(e.lo,e.hi)}return t.int64toString(this.lo,this.hi)}toBigInt(){return i(n),n.V.setInt32(0,this.lo,!0),n.V.setInt32(4,this.hi,!0),n.V.getBigInt64(0,!0)}};e.PbLong=u,u.ZERO=new u(0,0)})),vj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BinaryReader=e.binaryReadOptions=void 0;let t=hj(),n=_j(),r=gj(),i={readUnknownField:!0,readerFactory:e=>new o(e)};function a(e){return e?Object.assign(Object.assign({},i),e):i}e.binaryReadOptions=a;var o=class{constructor(e,t){this.varint64=r.varint64read,this.uint32=r.varint32read,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=t??new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0})}tag(){let e=this.uint32(),t=e>>>3,n=e&7;if(t<=0||n<0||n>5)throw Error(`illegal tag: field no `+t+` wire type `+n);return[t,n]}skip(e){let n=this.pos;switch(e){case t.WireType.Varint:for(;this.buf[this.pos++]&128;);break;case t.WireType.Bit64:this.pos+=4;case t.WireType.Bit32:this.pos+=4;break;case t.WireType.LengthDelimited:let n=this.uint32();this.pos+=n;break;case t.WireType.StartGroup:let r;for(;(r=this.tag()[1])!==t.WireType.EndGroup;)this.skip(r);break;default:throw Error(`cant skip wire type `+e)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return new n.PbLong(...this.varint64())}uint64(){return new n.PbULong(...this.varint64())}sint64(){let[e,t]=this.varint64(),r=-(e&1);return e=(e>>>1|(t&1)<<31)^r,t=t>>>1^r,new n.PbLong(e,t)}bool(){let[e,t]=this.varint64();return e!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return new n.PbULong(this.sfixed32(),this.sfixed32())}sfixed64(){return new n.PbLong(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}};e.BinaryReader=o})),yj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assertFloat32=e.assertUInt32=e.assertInt32=e.assertNever=e.assert=void 0;function t(e,t){if(!e)throw Error(t)}e.assert=t;function n(e,t){throw Error(t??`Unexpected object: `+e)}e.assertNever=n;function r(e){if(typeof e!=`number`)throw Error(`invalid int 32: `+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error(`invalid int 32: `+e)}e.assertInt32=r;function i(e){if(typeof e!=`number`)throw Error(`invalid uint 32: `+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error(`invalid uint 32: `+e)}e.assertUInt32=i;function a(e){if(typeof e!=`number`)throw Error(`invalid float 32: `+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error(`invalid float 32: `+e)}e.assertFloat32=a})),bj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BinaryWriter=e.binaryWriteOptions=void 0;let t=_j(),n=gj(),r=yj(),i={writeUnknownFields:!0,writerFactory:()=>new o};function a(e){return e?Object.assign(Object.assign({},i),e):i}e.binaryWriteOptions=a;var o=class{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(r.assertUInt32(e);e>127;)this.buf.push(e&127|128),e>>>=7;return this.buf.push(e),this}int32(e){return r.assertInt32(e),n.varint32write(e,this.buf),this}bool(e){return this.buf.push(+!!e),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){r.assertFloat32(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){r.assertUInt32(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){r.assertInt32(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return r.assertInt32(e),e=(e<<1^e>>31)>>>0,n.varint32write(e,this.buf),this}sfixed64(e){let n=new Uint8Array(8),r=new DataView(n.buffer),i=t.PbLong.from(e);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(e){let n=new Uint8Array(8),r=new DataView(n.buffer),i=t.PbULong.from(e);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(e){let r=t.PbLong.from(e);return n.varint64write(r.lo,r.hi,this.buf),this}sint64(e){let r=t.PbLong.from(e),i=r.hi>>31,a=r.lo<<1^i,o=(r.hi<<1|r.lo>>>31)^i;return n.varint64write(a,o,this.buf),this}uint64(e){let r=t.PbULong.from(e);return n.varint64write(r.lo,r.hi,this.buf),this}};e.BinaryWriter=o})),xj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.mergeJsonOptions=e.jsonWriteOptions=e.jsonReadOptions=void 0;let t={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},n={ignoreUnknownFields:!1};function r(e){return e?Object.assign(Object.assign({},n),e):n}e.jsonReadOptions=r;function i(e){return e?Object.assign(Object.assign({},t),e):t}e.jsonWriteOptions=i;function a(e,t){let n=Object.assign(Object.assign({},e),t);return n.typeRegistry=[...e?.typeRegistry??[],...t?.typeRegistry??[]],n}e.mergeJsonOptions=a})),Sj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MESSAGE_TYPE=void 0,e.MESSAGE_TYPE=Symbol.for(`protobuf-ts/message-type`)})),Cj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.lowerCamelCase=void 0;function t(e){let t=!1,n=[];for(let r=0;r{Object.defineProperty(e,`__esModule`,{value:!0}),e.readMessageOption=e.readFieldOption=e.readFieldOptions=e.normalizeFieldInfo=e.RepeatType=e.LongType=e.ScalarType=void 0;let t=Cj();(function(e){e[e.DOUBLE=1]=`DOUBLE`,e[e.FLOAT=2]=`FLOAT`,e[e.INT64=3]=`INT64`,e[e.UINT64=4]=`UINT64`,e[e.INT32=5]=`INT32`,e[e.FIXED64=6]=`FIXED64`,e[e.FIXED32=7]=`FIXED32`,e[e.BOOL=8]=`BOOL`,e[e.STRING=9]=`STRING`,e[e.BYTES=12]=`BYTES`,e[e.UINT32=13]=`UINT32`,e[e.SFIXED32=15]=`SFIXED32`,e[e.SFIXED64=16]=`SFIXED64`,e[e.SINT32=17]=`SINT32`,e[e.SINT64=18]=`SINT64`})(e.ScalarType||={}),(function(e){e[e.BIGINT=0]=`BIGINT`,e[e.STRING=1]=`STRING`,e[e.NUMBER=2]=`NUMBER`})(e.LongType||={});var n;(function(e){e[e.NO=0]=`NO`,e[e.PACKED=1]=`PACKED`,e[e.UNPACKED=2]=`UNPACKED`})(n=e.RepeatType||={});function r(e){return e.localName=e.localName??t.lowerCamelCase(e.name),e.jsonName=e.jsonName??t.lowerCamelCase(e.name),e.repeat=e.repeat??n.NO,e.opt=e.opt??(e.repeat||e.oneof?!1:e.kind==`message`),e}e.normalizeFieldInfo=r;function i(e,t,n,r){let i=e.fields.find((e,n)=>e.localName==t||n==t)?.options;return i&&i[n]?r.fromJson(i[n]):void 0}e.readFieldOptions=i;function a(e,t,n,r){let i=e.fields.find((e,n)=>e.localName==t||n==t)?.options;if(!i)return;let a=i[n];return a===void 0?a:r?r.fromJson(a):a}e.readFieldOption=a;function o(e,t,n){let r=e.options[t];return r===void 0?r:n?n.fromJson(r):r}e.readMessageOption=o})),Tj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getSelectedOneofValue=e.clearOneofValue=e.setUnknownOneofValue=e.setOneofValue=e.getOneofValue=e.isOneofGroup=void 0;function t(e){if(typeof e!=`object`||!e||!e.hasOwnProperty(`oneofKind`))return!1;switch(typeof e.oneofKind){case`string`:return e[e.oneofKind]===void 0?!1:Object.keys(e).length==2;case`undefined`:return Object.keys(e).length==1;default:return!1}}e.isOneofGroup=t;function n(e,t){return e[t]}e.getOneofValue=n;function r(e,t,n){e.oneofKind!==void 0&&delete e[e.oneofKind],e.oneofKind=t,n!==void 0&&(e[t]=n)}e.setOneofValue=r;function i(e,t,n){e.oneofKind!==void 0&&delete e[e.oneofKind],e.oneofKind=t,n!==void 0&&t!==void 0&&(e[t]=n)}e.setUnknownOneofValue=i;function a(e){e.oneofKind!==void 0&&delete e[e.oneofKind],e.oneofKind=void 0}e.clearOneofValue=a;function o(e){if(e.oneofKind!==void 0)return e[e.oneofKind]}e.getSelectedOneofValue=o})),Ej=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReflectionTypeCheck=void 0;let t=wj(),n=Tj();e.ReflectionTypeCheck=class{constructor(e){this.fields=e.fields??[]}prepare(){if(this.data)return;let e=[],t=[],n=[];for(let r of this.fields)if(r.oneof)n.includes(r.oneof)||(n.push(r.oneof),e.push(r.oneof),t.push(r.oneof));else switch(t.push(r.localName),r.kind){case`scalar`:case`enum`:(!r.opt||r.repeat)&&e.push(r.localName);break;case`message`:r.repeat&&e.push(r.localName);break;case`map`:e.push(r.localName);break}this.data={req:e,known:t,oneofs:Object.values(n)}}is(e,t,r=!1){if(t<0)return!0;if(typeof e!=`object`||!e)return!1;this.prepare();let i=Object.keys(e),a=this.data;if(i.length!i.includes(e))||!r&&i.some(e=>!a.known.includes(e)))return!1;if(t<1)return!0;for(let i of a.oneofs){let a=e[i];if(!n.isOneofGroup(a))return!1;if(a.oneofKind===void 0)continue;let o=this.fields.find(e=>e.localName===a.oneofKind);if(!o||!this.field(a[a.oneofKind],o,r,t))return!1}for(let n of this.fields)if(n.oneof===void 0&&!this.field(e[n.localName],n,r,t))return!1;return!0}field(e,n,r,i){let a=n.repeat;switch(n.kind){case`scalar`:return e===void 0?n.opt:a?this.scalars(e,n.T,i,n.L):this.scalar(e,n.T,n.L);case`enum`:return e===void 0?n.opt:a?this.scalars(e,t.ScalarType.INT32,i):this.scalar(e,t.ScalarType.INT32);case`message`:return e===void 0?!0:a?this.messages(e,n.T(),r,i):this.message(e,n.T(),r,i);case`map`:if(typeof e!=`object`||!e)return!1;if(i<2)return!0;if(!this.mapKeys(e,n.K,i))return!1;switch(n.V.kind){case`scalar`:return this.scalars(Object.values(e),n.V.T,i,n.V.L);case`enum`:return this.scalars(Object.values(e),t.ScalarType.INT32,i);case`message`:return this.messages(Object.values(e),n.V.T(),r,i)}break}return!0}message(e,t,n,r){return n?t.isAssignable(e,r):t.is(e,r)}messages(e,t,n,r){if(!Array.isArray(e))return!1;if(r<2)return!0;if(n){for(let n=0;nparseInt(e)),n,r);case t.ScalarType.BOOL:return this.scalars(i.slice(0,r).map(e=>e==`true`?!0:e==`false`?!1:e),n,r);default:return this.scalars(i,n,r,t.LongType.STRING)}}}})),Dj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reflectionLongConvert=void 0;let t=wj();function n(e,n){switch(n){case t.LongType.BIGINT:return e.toBigInt();case t.LongType.NUMBER:return e.toNumber();default:return e.toString()}}e.reflectionLongConvert=n})),Oj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReflectionJsonReader=void 0;let t=fj(),n=pj(),r=wj(),i=_j(),a=yj(),o=Dj();e.ReflectionJsonReader=class{constructor(e){this.info=e}prepare(){if(this.fMap===void 0){this.fMap={};let e=this.info.fields??[];for(let t of e)this.fMap[t.name]=t,this.fMap[t.jsonName]=t,this.fMap[t.localName]=t}}assert(e,n,r){if(!e){let e=t.typeofJsonValue(r);throw(e==`number`||e==`boolean`)&&(e=r.toString()),Error(`Cannot parse JSON ${e} for ${this.info.typeName}#${n}`)}}read(e,n,i){this.prepare();let a=[];for(let[o,s]of Object.entries(e)){let e=this.fMap[o];if(!e){if(!i.ignoreUnknownFields)throw Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${o}`);continue}let c=e.localName,l;if(e.oneof){if(s===null&&(e.kind!==`enum`||e.T()[0]!==`google.protobuf.NullValue`))continue;if(a.includes(e.oneof))throw Error(`Multiple members of the oneof group "${e.oneof}" of ${this.info.typeName} are present in JSON.`);a.push(e.oneof),l=n[e.oneof]={oneofKind:c}}else l=n;if(e.kind==`map`){if(s===null)continue;this.assert(t.isJsonObject(s),e.name,s);let n=l[c];for(let[t,a]of Object.entries(s)){this.assert(a!==null,e.name+` map value`,null);let o;switch(e.V.kind){case`message`:o=e.V.T().internalJsonRead(a,i);break;case`enum`:if(o=this.enum(e.V.T(),a,e.name,i.ignoreUnknownFields),o===!1)continue;break;case`scalar`:o=this.scalar(a,e.V.T,e.V.L,e.name);break}this.assert(o!==void 0,e.name+` map value`,a);let s=t;e.K==r.ScalarType.BOOL&&(s=s==`true`?!0:s==`false`?!1:s),s=this.scalar(s,e.K,r.LongType.STRING,e.name).toString(),n[s]=o}}else if(e.repeat){if(s===null)continue;this.assert(Array.isArray(s),e.name,s);let t=l[c];for(let n of s){this.assert(n!==null,e.name,null);let r;switch(e.kind){case`message`:r=e.T().internalJsonRead(n,i);break;case`enum`:if(r=this.enum(e.T(),n,e.name,i.ignoreUnknownFields),r===!1)continue;break;case`scalar`:r=this.scalar(n,e.T,e.L,e.name);break}this.assert(r!==void 0,e.name,s),t.push(r)}}else switch(e.kind){case`message`:if(s===null&&e.T().typeName!=`google.protobuf.Value`){this.assert(e.oneof===void 0,e.name+` (oneof member)`,null);continue}l[c]=e.T().internalJsonRead(s,i,l[c]);break;case`enum`:if(s===null)continue;let t=this.enum(e.T(),s,e.name,i.ignoreUnknownFields);if(t===!1)continue;l[c]=t;break;case`scalar`:if(s===null)continue;l[c]=this.scalar(s,e.T,e.L,e.name);break}}}enum(e,t,n,r){if(e[0]==`google.protobuf.NullValue`&&a.assert(t===null||t===`NULL_VALUE`,`Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} only accepts null.`),t===null)return 0;switch(typeof t){case`number`:return a.assert(Number.isInteger(t),`Unable to parse field ${this.info.typeName}#${n}, enum can only be integral number, got ${t}.`),t;case`string`:let i=t;e[2]&&t.substring(0,e[2].length)===e[2]&&(i=t.substring(e[2].length));let o=e[1][i];return o===void 0&&r?!1:(a.assert(typeof o==`number`,`Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} has no value for "${t}".`),o)}a.assert(!1,`Unable to parse field ${this.info.typeName}#${n}, cannot parse enum value from ${typeof t}".`)}scalar(e,t,s,c){let l;try{switch(t){case r.ScalarType.DOUBLE:case r.ScalarType.FLOAT:if(e===null)return 0;if(e===`NaN`)return NaN;if(e===`Infinity`)return 1/0;if(e===`-Infinity`)return-1/0;if(e===``){l=`empty string`;break}if(typeof e==`string`&&e.trim().length!==e.length){l=`extra whitespace`;break}if(typeof e!=`string`&&typeof e!=`number`)break;let c=Number(e);if(Number.isNaN(c)){l=`not a number`;break}if(!Number.isFinite(c)){l=`too large or small`;break}return t==r.ScalarType.FLOAT&&a.assertFloat32(c),c;case r.ScalarType.INT32:case r.ScalarType.FIXED32:case r.ScalarType.SFIXED32:case r.ScalarType.SINT32:case r.ScalarType.UINT32:if(e===null)return 0;let u;if(typeof e==`number`?u=e:e===``?l=`empty string`:typeof e==`string`&&(e.trim().length===e.length?u=Number(e):l=`extra whitespace`),u===void 0)break;return t==r.ScalarType.UINT32?a.assertUInt32(u):a.assertInt32(u),u;case r.ScalarType.INT64:case r.ScalarType.SFIXED64:case r.ScalarType.SINT64:if(e===null)return o.reflectionLongConvert(i.PbLong.ZERO,s);if(typeof e!=`number`&&typeof e!=`string`)break;return o.reflectionLongConvert(i.PbLong.from(e),s);case r.ScalarType.FIXED64:case r.ScalarType.UINT64:if(e===null)return o.reflectionLongConvert(i.PbULong.ZERO,s);if(typeof e!=`number`&&typeof e!=`string`)break;return o.reflectionLongConvert(i.PbULong.from(e),s);case r.ScalarType.BOOL:if(e===null)return!1;if(typeof e!=`boolean`)break;return e;case r.ScalarType.STRING:if(e===null)return``;if(typeof e!=`string`){l=`extra whitespace`;break}return e;case r.ScalarType.BYTES:if(e===null||e===``)return new Uint8Array;if(typeof e!=`string`)break;return n.base64decode(e)}}catch(e){l=e.message}this.assert(!1,c+(l?` - `+l:``),e)}}})),kj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReflectionJsonWriter=void 0;let t=pj(),n=_j(),r=wj(),i=yj();e.ReflectionJsonWriter=class{constructor(e){this.fields=e.fields??[]}write(e,t){let n={},r=e;for(let e of this.fields){if(!e.oneof){let i=this.field(e,r[e.localName],t);i!==void 0&&(n[t.useProtoFieldName?e.name:e.jsonName]=i);continue}let a=r[e.oneof];if(a.oneofKind!==e.localName)continue;let o=e.kind==`scalar`||e.kind==`enum`?Object.assign(Object.assign({},t),{emitDefaultValues:!0}):t,s=this.field(e,a[e.localName],o);i.assert(s!==void 0),n[t.useProtoFieldName?e.name:e.jsonName]=s}return n}field(e,t,n){let r;if(e.kind==`map`){i.assert(typeof t==`object`&&!!t);let a={};switch(e.V.kind){case`scalar`:for(let[n,r]of Object.entries(t)){let t=this.scalar(e.V.T,r,e.name,!1,!0);i.assert(t!==void 0),a[n.toString()]=t}break;case`message`:let r=e.V.T();for(let[o,s]of Object.entries(t)){let t=this.message(r,s,e.name,n);i.assert(t!==void 0),a[o.toString()]=t}break;case`enum`:let o=e.V.T();for(let[r,s]of Object.entries(t)){i.assert(s===void 0||typeof s==`number`);let t=this.enum(o,s,e.name,!1,!0,n.enumAsInteger);i.assert(t!==void 0),a[r.toString()]=t}break}(n.emitDefaultValues||Object.keys(a).length>0)&&(r=a)}else if(e.repeat){i.assert(Array.isArray(t));let a=[];switch(e.kind){case`scalar`:for(let n=0;n0||n.emitDefaultValues)&&(r=a)}else switch(e.kind){case`scalar`:r=this.scalar(e.T,t,e.name,e.opt,n.emitDefaultValues);break;case`enum`:r=this.enum(e.T(),t,e.name,e.opt,n.emitDefaultValues,n.enumAsInteger);break;case`message`:r=this.message(e.T(),t,e.name,n);break}return r}enum(e,t,n,r,a,o){if(e[0]==`google.protobuf.NullValue`)return!a&&!r?void 0:null;if(t===void 0){i.assert(r);return}if(!(t===0&&!a&&!r))return i.assert(typeof t==`number`),i.assert(Number.isInteger(t)),o||!e[1].hasOwnProperty(t)?t:e[2]?e[2]+e[1][t]:e[1][t]}message(e,t,n,r){return t===void 0?r.emitDefaultValues?null:void 0:e.internalJsonWrite(t,r)}scalar(e,a,o,s,c){if(a===void 0){i.assert(s);return}let l=c||s;switch(e){case r.ScalarType.INT32:case r.ScalarType.SFIXED32:case r.ScalarType.SINT32:return a===0?l?0:void 0:(i.assertInt32(a),a);case r.ScalarType.FIXED32:case r.ScalarType.UINT32:return a===0?l?0:void 0:(i.assertUInt32(a),a);case r.ScalarType.FLOAT:i.assertFloat32(a);case r.ScalarType.DOUBLE:return a===0?l?0:void 0:(i.assert(typeof a==`number`),Number.isNaN(a)?`NaN`:a===1/0?`Infinity`:a===-1/0?`-Infinity`:a);case r.ScalarType.STRING:return a===``?l?``:void 0:(i.assert(typeof a==`string`),a);case r.ScalarType.BOOL:return a===!1?l?!1:void 0:(i.assert(typeof a==`boolean`),a);case r.ScalarType.UINT64:case r.ScalarType.FIXED64:i.assert(typeof a==`number`||typeof a==`string`||typeof a==`bigint`);let e=n.PbULong.from(a);return e.isZero()&&!l?void 0:e.toString();case r.ScalarType.INT64:case r.ScalarType.SFIXED64:case r.ScalarType.SINT64:i.assert(typeof a==`number`||typeof a==`string`||typeof a==`bigint`);let o=n.PbLong.from(a);return o.isZero()&&!l?void 0:o.toString();case r.ScalarType.BYTES:return i.assert(a instanceof Uint8Array),a.byteLength?t.base64encode(a):l?``:void 0}}}})),Aj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reflectionScalarDefault=void 0;let t=wj(),n=Dj(),r=_j();function i(e,i=t.LongType.STRING){switch(e){case t.ScalarType.BOOL:return!1;case t.ScalarType.UINT64:case t.ScalarType.FIXED64:return n.reflectionLongConvert(r.PbULong.ZERO,i);case t.ScalarType.INT64:case t.ScalarType.SFIXED64:case t.ScalarType.SINT64:return n.reflectionLongConvert(r.PbLong.ZERO,i);case t.ScalarType.DOUBLE:case t.ScalarType.FLOAT:return 0;case t.ScalarType.BYTES:return new Uint8Array;case t.ScalarType.STRING:return``;default:return 0}}e.reflectionScalarDefault=i})),jj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReflectionBinaryReader=void 0;let t=hj(),n=wj(),r=Dj(),i=Aj();e.ReflectionBinaryReader=class{constructor(e){this.info=e}prepare(){if(!this.fieldNoToField){let e=this.info.fields??[];this.fieldNoToField=new Map(e.map(e=>[e.no,e]))}}read(e,r,i,a){this.prepare();let o=a===void 0?e.len:e.pos+a;for(;e.pos{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReflectionBinaryWriter=void 0;let t=hj(),n=wj(),r=yj(),i=_j();e.ReflectionBinaryWriter=class{constructor(e){this.info=e}prepare(){if(!this.fields){let e=this.info.fields?this.info.fields.concat():[];this.fields=e.sort((e,t)=>e.no-t.no)}}write(e,i,a){this.prepare();for(let t of this.fields){let o,s,c=t.repeat,l=t.localName;if(t.oneof){let n=e[t.oneof];if(n.oneofKind!==l)continue;o=n[l],s=!0}else o=e[l],s=!1;switch(t.kind){case`scalar`:case`enum`:let e=t.kind==`enum`?n.ScalarType.INT32:t.T;if(c)if(r.assert(Array.isArray(o)),c==n.RepeatType.PACKED)this.packed(i,e,t.no,o);else for(let n of o)this.scalar(i,e,t.no,n,!0);else o===void 0?r.assert(t.opt):this.scalar(i,e,t.no,o,s||t.opt);break;case`message`:if(c){r.assert(Array.isArray(o));for(let e of o)this.message(i,a,t.T(),t.no,e)}else this.message(i,a,t.T(),t.no,o);break;case`map`:r.assert(typeof o==`object`&&!!o);for(let[e,n]of Object.entries(o))this.mapEntry(i,a,t,e,n);break}}let o=a.writeUnknownFields;o!==!1&&(o===!0?t.UnknownFieldHandler.onWrite:o)(this.info.typeName,e,i)}mapEntry(e,i,a,o,s){e.tag(a.no,t.WireType.LengthDelimited),e.fork();let c=o;switch(a.K){case n.ScalarType.INT32:case n.ScalarType.FIXED32:case n.ScalarType.UINT32:case n.ScalarType.SFIXED32:case n.ScalarType.SINT32:c=Number.parseInt(o);break;case n.ScalarType.BOOL:r.assert(o==`true`||o==`false`),c=o==`true`;break}switch(this.scalar(e,a.K,1,c,!0),a.V.kind){case`scalar`:this.scalar(e,a.V.T,2,s,!0);break;case`enum`:this.scalar(e,n.ScalarType.INT32,2,s,!0);break;case`message`:this.message(e,i,a.V.T(),2,s);break}e.join()}message(e,n,r,i,a){a!==void 0&&(r.internalBinaryWrite(a,e.tag(i,t.WireType.LengthDelimited).fork(),n),e.join())}scalar(e,t,n,r,i){let[a,o,s]=this.scalarInfo(t,r);(!s||i)&&(e.tag(n,a),e[o](r))}packed(e,i,a,o){if(!o.length)return;r.assert(i!==n.ScalarType.BYTES&&i!==n.ScalarType.STRING),e.tag(a,t.WireType.LengthDelimited),e.fork();let[,s]=this.scalarInfo(i);for(let t=0;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.reflectionCreate=void 0;let t=Aj(),n=Sj();function r(e){let r=e.messagePrototype?Object.create(e.messagePrototype):Object.defineProperty({},n.MESSAGE_TYPE,{value:e});for(let n of e.fields){let e=n.localName;if(!n.opt)if(n.oneof)r[n.oneof]={oneofKind:void 0};else if(n.repeat)r[e]=[];else switch(n.kind){case`scalar`:r[e]=t.reflectionScalarDefault(n.T,n.L);break;case`enum`:r[e]=0;break;case`map`:r[e]={};break}}return r}e.reflectionCreate=r})),Pj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reflectionMergePartial=void 0;function t(e,t,n){let r,i=n,a;for(let n of e.fields){let e=n.localName;if(n.oneof){let o=i[n.oneof];if(o?.oneofKind==null)continue;if(r=o[e],a=t[n.oneof],a.oneofKind=o.oneofKind,r==null){delete a[e];continue}}else if(r=i[e],a=t,r==null)continue;switch(n.repeat&&(a[e].length=r.length),n.kind){case`scalar`:case`enum`:if(n.repeat)for(let t=0;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.reflectionEquals=void 0;let t=wj();function n(e,n,s){if(n===s)return!0;if(!n||!s)return!1;for(let c of e.fields){let e=c.localName,l=c.oneof?n[c.oneof][e]:n[e],u=c.oneof?s[c.oneof][e]:s[e];switch(c.kind){case`enum`:case`scalar`:let e=c.kind==`enum`?t.ScalarType.INT32:c.T;if(!(c.repeat?a(e,l,u):i(e,l,u)))return!1;break;case`map`:if(!(c.V.kind==`message`?o(c.V.T(),r(l),r(u)):a(c.V.kind==`enum`?t.ScalarType.INT32:c.V.T,r(l),r(u))))return!1;break;case`message`:let n=c.T();if(!(c.repeat?o(n,l,u):n.equals(l,u)))return!1;break}}return!0}e.reflectionEquals=n;let r=Object.values;function i(e,n,r){if(n===r)return!0;if(e!==t.ScalarType.BYTES)return!1;let i=n,a=r;if(i.length!==a.length)return!1;for(let e=0;e{Object.defineProperty(e,`__esModule`,{value:!0}),e.MessageType=void 0;let t=Sj(),n=wj(),r=Ej(),i=Oj(),a=kj(),o=jj(),s=Mj(),c=Nj(),l=Pj(),u=fj(),d=xj(),f=Fj(),p=bj(),m=vj(),h=Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})),g=h[t.MESSAGE_TYPE]={};e.MessageType=class{constructor(e,t,c){this.defaultCheckDepth=16,this.typeName=e,this.fields=t.map(n.normalizeFieldInfo),this.options=c??{},g.value=this,this.messagePrototype=Object.create(null,h),this.refTypeCheck=new r.ReflectionTypeCheck(this),this.refJsonReader=new i.ReflectionJsonReader(this),this.refJsonWriter=new a.ReflectionJsonWriter(this),this.refBinReader=new o.ReflectionBinaryReader(this),this.refBinWriter=new s.ReflectionBinaryWriter(this)}create(e){let t=c.reflectionCreate(this);return e!==void 0&&l.reflectionMergePartial(this,t,e),t}clone(e){let t=this.create();return l.reflectionMergePartial(this,t,e),t}equals(e,t){return f.reflectionEquals(this,e,t)}is(e,t=this.defaultCheckDepth){return this.refTypeCheck.is(e,t,!1)}isAssignable(e,t=this.defaultCheckDepth){return this.refTypeCheck.is(e,t,!0)}mergePartial(e,t){l.reflectionMergePartial(this,e,t)}fromBinary(e,t){let n=m.binaryReadOptions(t);return this.internalBinaryRead(n.readerFactory(e),e.byteLength,n)}fromJson(e,t){return this.internalJsonRead(e,d.jsonReadOptions(t))}fromJsonString(e,t){let n=JSON.parse(e);return this.fromJson(n,t)}toJson(e,t){return this.internalJsonWrite(e,d.jsonWriteOptions(t))}toJsonString(e,t){let n=this.toJson(e,t);return JSON.stringify(n,null,t?.prettySpaces??0)}toBinary(e,t){let n=p.binaryWriteOptions(t);return this.internalBinaryWrite(e,n.writerFactory(),n).finish()}internalJsonRead(e,t,n){if(typeof e==`object`&&e&&!Array.isArray(e)){let r=n??this.create();return this.refJsonReader.read(e,r,t),r}throw Error(`Unable to parse message ${this.typeName} from JSON ${u.typeofJsonValue(e)}.`)}internalJsonWrite(e,t){return this.refJsonWriter.write(e,t)}internalBinaryWrite(e,t,n){return this.refBinWriter.write(e,t,n),t}internalBinaryRead(e,t,n,r){let i=r??this.create();return this.refBinReader.read(e,i,n,t),i}}})),Lj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.containsMessageType=void 0;let t=Sj();function n(e){return e[t.MESSAGE_TYPE]!=null}e.containsMessageType=n})),Rj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.listEnumNumbers=e.listEnumNames=e.listEnumValues=e.isEnumObject=void 0;function t(e){if(typeof e!=`object`||!e||!e.hasOwnProperty(0))return!1;for(let t of Object.keys(e)){let n=parseInt(t);if(Number.isNaN(n)){let n=e[t];if(n===void 0||typeof n!=`number`||e[n]===void 0)return!1}else{let t=e[n];if(t===void 0||e[t]!==n)return!1}}return!0}e.isEnumObject=t;function n(e){if(!t(e))throw Error(`not a typescript enum object`);let n=[];for(let[t,r]of Object.entries(e))typeof r==`number`&&n.push({name:t,number:r});return n}e.listEnumValues=n;function r(e){return n(e).map(e=>e.name)}e.listEnumNames=r;function i(e){return n(e).map(e=>e.number).filter((e,t,n)=>n.indexOf(e)==t)}e.listEnumNumbers=i})),zj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=fj();Object.defineProperty(e,`typeofJsonValue`,{enumerable:!0,get:function(){return t.typeofJsonValue}}),Object.defineProperty(e,`isJsonObject`,{enumerable:!0,get:function(){return t.isJsonObject}});var n=pj();Object.defineProperty(e,`base64decode`,{enumerable:!0,get:function(){return n.base64decode}}),Object.defineProperty(e,`base64encode`,{enumerable:!0,get:function(){return n.base64encode}});var r=mj();Object.defineProperty(e,`utf8read`,{enumerable:!0,get:function(){return r.utf8read}});var i=hj();Object.defineProperty(e,`WireType`,{enumerable:!0,get:function(){return i.WireType}}),Object.defineProperty(e,`mergeBinaryOptions`,{enumerable:!0,get:function(){return i.mergeBinaryOptions}}),Object.defineProperty(e,`UnknownFieldHandler`,{enumerable:!0,get:function(){return i.UnknownFieldHandler}});var a=vj();Object.defineProperty(e,`BinaryReader`,{enumerable:!0,get:function(){return a.BinaryReader}}),Object.defineProperty(e,`binaryReadOptions`,{enumerable:!0,get:function(){return a.binaryReadOptions}});var o=bj();Object.defineProperty(e,`BinaryWriter`,{enumerable:!0,get:function(){return o.BinaryWriter}}),Object.defineProperty(e,`binaryWriteOptions`,{enumerable:!0,get:function(){return o.binaryWriteOptions}});var s=_j();Object.defineProperty(e,`PbLong`,{enumerable:!0,get:function(){return s.PbLong}}),Object.defineProperty(e,`PbULong`,{enumerable:!0,get:function(){return s.PbULong}});var c=xj();Object.defineProperty(e,`jsonReadOptions`,{enumerable:!0,get:function(){return c.jsonReadOptions}}),Object.defineProperty(e,`jsonWriteOptions`,{enumerable:!0,get:function(){return c.jsonWriteOptions}}),Object.defineProperty(e,`mergeJsonOptions`,{enumerable:!0,get:function(){return c.mergeJsonOptions}});var l=Sj();Object.defineProperty(e,`MESSAGE_TYPE`,{enumerable:!0,get:function(){return l.MESSAGE_TYPE}});var u=Ij();Object.defineProperty(e,`MessageType`,{enumerable:!0,get:function(){return u.MessageType}});var d=wj();Object.defineProperty(e,`ScalarType`,{enumerable:!0,get:function(){return d.ScalarType}}),Object.defineProperty(e,`LongType`,{enumerable:!0,get:function(){return d.LongType}}),Object.defineProperty(e,`RepeatType`,{enumerable:!0,get:function(){return d.RepeatType}}),Object.defineProperty(e,`normalizeFieldInfo`,{enumerable:!0,get:function(){return d.normalizeFieldInfo}}),Object.defineProperty(e,`readFieldOptions`,{enumerable:!0,get:function(){return d.readFieldOptions}}),Object.defineProperty(e,`readFieldOption`,{enumerable:!0,get:function(){return d.readFieldOption}}),Object.defineProperty(e,`readMessageOption`,{enumerable:!0,get:function(){return d.readMessageOption}});var f=Ej();Object.defineProperty(e,`ReflectionTypeCheck`,{enumerable:!0,get:function(){return f.ReflectionTypeCheck}});var p=Nj();Object.defineProperty(e,`reflectionCreate`,{enumerable:!0,get:function(){return p.reflectionCreate}});var m=Aj();Object.defineProperty(e,`reflectionScalarDefault`,{enumerable:!0,get:function(){return m.reflectionScalarDefault}});var h=Pj();Object.defineProperty(e,`reflectionMergePartial`,{enumerable:!0,get:function(){return h.reflectionMergePartial}});var g=Fj();Object.defineProperty(e,`reflectionEquals`,{enumerable:!0,get:function(){return g.reflectionEquals}});var v=jj();Object.defineProperty(e,`ReflectionBinaryReader`,{enumerable:!0,get:function(){return v.ReflectionBinaryReader}});var y=Mj();Object.defineProperty(e,`ReflectionBinaryWriter`,{enumerable:!0,get:function(){return y.ReflectionBinaryWriter}});var b=Oj();Object.defineProperty(e,`ReflectionJsonReader`,{enumerable:!0,get:function(){return b.ReflectionJsonReader}});var x=kj();Object.defineProperty(e,`ReflectionJsonWriter`,{enumerable:!0,get:function(){return x.ReflectionJsonWriter}});var S=Lj();Object.defineProperty(e,`containsMessageType`,{enumerable:!0,get:function(){return S.containsMessageType}});var C=Tj();Object.defineProperty(e,`isOneofGroup`,{enumerable:!0,get:function(){return C.isOneofGroup}}),Object.defineProperty(e,`setOneofValue`,{enumerable:!0,get:function(){return C.setOneofValue}}),Object.defineProperty(e,`getOneofValue`,{enumerable:!0,get:function(){return C.getOneofValue}}),Object.defineProperty(e,`clearOneofValue`,{enumerable:!0,get:function(){return C.clearOneofValue}}),Object.defineProperty(e,`getSelectedOneofValue`,{enumerable:!0,get:function(){return C.getSelectedOneofValue}});var w=Rj();Object.defineProperty(e,`listEnumValues`,{enumerable:!0,get:function(){return w.listEnumValues}}),Object.defineProperty(e,`listEnumNames`,{enumerable:!0,get:function(){return w.listEnumNames}}),Object.defineProperty(e,`listEnumNumbers`,{enumerable:!0,get:function(){return w.listEnumNumbers}}),Object.defineProperty(e,`isEnumObject`,{enumerable:!0,get:function(){return w.isEnumObject}});var T=Cj();Object.defineProperty(e,`lowerCamelCase`,{enumerable:!0,get:function(){return T.lowerCamelCase}});var E=yj();Object.defineProperty(e,`assert`,{enumerable:!0,get:function(){return E.assert}}),Object.defineProperty(e,`assertNever`,{enumerable:!0,get:function(){return E.assertNever}}),Object.defineProperty(e,`assertInt32`,{enumerable:!0,get:function(){return E.assertInt32}}),Object.defineProperty(e,`assertUInt32`,{enumerable:!0,get:function(){return E.assertUInt32}}),Object.defineProperty(e,`assertFloat32`,{enumerable:!0,get:function(){return E.assertFloat32}})})),Bj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.readServiceOption=e.readMethodOption=e.readMethodOptions=e.normalizeMethodInfo=void 0;let t=zj();function n(e,n){let r=e;return r.service=n,r.localName=r.localName??t.lowerCamelCase(r.name),r.serverStreaming=!!r.serverStreaming,r.clientStreaming=!!r.clientStreaming,r.options=r.options??{},r.idempotency=r.idempotency??void 0,r}e.normalizeMethodInfo=n;function r(e,t,n,r){let i=e.methods.find((e,n)=>e.localName===t||n===t)?.options;return i&&i[n]?r.fromJson(i[n]):void 0}e.readMethodOptions=r;function i(e,t,n,r){let i=e.methods.find((e,n)=>e.localName===t||n===t)?.options;if(!i)return;let a=i[n];return a===void 0?a:r?r.fromJson(a):a}e.readMethodOption=i;function a(e,t,n){let r=e.options;if(!r)return;let i=r[t];return i===void 0?i:n?n.fromJson(i):i}e.readServiceOption=a})),Vj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ServiceType=void 0;let t=Bj();e.ServiceType=class{constructor(e,n,r){this.typeName=e,this.methods=n.map(e=>t.normalizeMethodInfo(e,this)),this.options=r??{}}}})),Hj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RpcError=void 0,e.RpcError=class extends Error{constructor(e,t=`UNKNOWN`,n){super(e),this.name=`RpcError`,Object.setPrototypeOf(this,new.target.prototype),this.code=t,this.meta=n??{}}toString(){let e=[this.name+`: `+this.message];this.code&&(e.push(``),e.push(`Code: `+this.code)),this.serviceName&&this.methodName&&e.push(`Method: `+this.serviceName+`/`+this.methodName);let t=Object.entries(this.meta);if(t.length){e.push(``),e.push(`Meta:`);for(let[n,r]of t)e.push(` ${n}: ${r}`)}return e.join(` +`)}}})),Uj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.mergeRpcOptions=void 0;let t=zj();function n(e,n){if(!n)return e;let i={};r(e,i),r(n,i);for(let a of Object.keys(n)){let o=n[a];switch(a){case`jsonOptions`:i.jsonOptions=t.mergeJsonOptions(e.jsonOptions,i.jsonOptions);break;case`binaryOptions`:i.binaryOptions=t.mergeBinaryOptions(e.binaryOptions,i.binaryOptions);break;case`meta`:i.meta={},r(e.meta,i.meta),r(n.meta,i.meta);break;case`interceptors`:i.interceptors=e.interceptors?e.interceptors.concat(o):o.concat();break}}return i}e.mergeRpcOptions=n;function r(e,t){if(!e)return;let n=t;for(let[t,r]of Object.entries(e))r instanceof Date?n[t]=new Date(r.getTime()):Array.isArray(r)?n[t]=r.concat():n[t]=r}})),Wj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Deferred=e.DeferredState=void 0;var t;(function(e){e[e.PENDING=0]=`PENDING`,e[e.REJECTED=1]=`REJECTED`,e[e.RESOLVED=2]=`RESOLVED`})(t=e.DeferredState||={}),e.Deferred=class{constructor(e=!0){this._state=t.PENDING,this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t}),e&&this._promise.catch(e=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==t.PENDING)throw Error(`cannot resolve ${t[this.state].toLowerCase()}`);this._resolve(e),this._state=t.RESOLVED}reject(e){if(this.state!==t.PENDING)throw Error(`cannot reject ${t[this.state].toLowerCase()}`);this._reject(e),this._state=t.REJECTED}resolvePending(e){this._state===t.PENDING&&this.resolve(e)}rejectPending(e){this._state===t.PENDING&&this.reject(e)}}})),Gj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RpcOutputStreamController=void 0;let t=Wj(),n=zj();e.RpcOutputStreamController=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,t){return t.push(e),()=>{let n=t.indexOf(e);n>=0&&t.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,t,r){n.assert(+!!e+ +!!t+ +!!r<=1,`only one emission at a time`),e&&this.notifyMessage(e),t&&this.notifyError(t),r&&this.notifyComplete()}notifyMessage(e){n.assert(!this.closed,`stream is closed`),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(t=>t(e)),this._lis.nxt.forEach(t=>t(e,void 0,!1))}notifyError(e){n.assert(!this.closed,`stream is closed`),this._closed=e,this.pushIt(e),this._lis.err.forEach(t=>t(e)),this._lis.nxt.forEach(t=>t(void 0,e,!1)),this.clearLis()}notifyComplete(){n.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;n.assert(e,`bad state`),n.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 t.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let i=r.p;n.assert(i.state==t.DeferredState.PENDING,`iterator contract broken`),`value`in e?i.resolve(e):i.reject(e),delete r.p}else r.q.push(e)}}})),Kj=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.UnaryCall=void 0,e.UnaryCall=class{constructor(e,t,n,r,i,a,o){this.method=e,this.requestHeaders=t,this.request=n,this.headers=r,this.response=i,this.status=a,this.trailers=o}then(e,t){return this.promiseFinished().then(t=>e?Promise.resolve(e(t)):t,e=>t?Promise.resolve(t(e)):Promise.reject(e))}promiseFinished(){return t(this,void 0,void 0,function*(){let[e,t,n,r]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:t,status:n,trailers:r}})}}})),qj=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.ServerStreamingCall=void 0,e.ServerStreamingCall=class{constructor(e,t,n,r,i,a,o){this.method=e,this.requestHeaders=t,this.request=n,this.headers=r,this.responses=i,this.status=a,this.trailers=o}then(e,t){return this.promiseFinished().then(t=>e?Promise.resolve(e(t)):t,e=>t?Promise.resolve(t(e)):Promise.reject(e))}promiseFinished(){return t(this,void 0,void 0,function*(){let[e,t,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,status:t,trailers:n}})}}})),Jj=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.ClientStreamingCall=void 0,e.ClientStreamingCall=class{constructor(e,t,n,r,i,a,o){this.method=e,this.requestHeaders=t,this.requests=n,this.headers=r,this.response=i,this.status=a,this.trailers=o}then(e,t){return this.promiseFinished().then(t=>e?Promise.resolve(e(t)):t,e=>t?Promise.resolve(t(e)):Promise.reject(e))}promiseFinished(){return t(this,void 0,void 0,function*(){let[e,t,n,r]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,response:t,status:n,trailers:r}})}}})),Yj=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.DuplexStreamingCall=void 0,e.DuplexStreamingCall=class{constructor(e,t,n,r,i,a,o){this.method=e,this.requestHeaders=t,this.requests=n,this.headers=r,this.responses=i,this.status=a,this.trailers=o}then(e,t){return this.promiseFinished().then(t=>e?Promise.resolve(e(t)):t,e=>t?Promise.resolve(t(e)):Promise.reject(e))}promiseFinished(){return t(this,void 0,void 0,function*(){let[e,t,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,status:t,trailers:n}})}}})),Xj=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,`__esModule`,{value:!0}),e.TestTransport=void 0;let n=Hj(),r=zj(),i=Gj(),a=Uj(),o=Kj(),s=qj(),c=Jj(),l=Yj();var u=class e{constructor(e){this.suppressUncaughtRejections=!0,this.headerDelay=10,this.responseDelay=50,this.betweenResponseDelay=10,this.afterResponseDelay=10,this.data=e??{}}get sentMessages(){return this.lastInput instanceof f?this.lastInput.sent:typeof this.lastInput==`object`?[this.lastInput.single]:[]}get sendComplete(){return this.lastInput instanceof f?this.lastInput.completed:typeof this.lastInput==`object`}promiseHeaders(){let t=this.data.headers??e.defaultHeaders;return t instanceof n.RpcError?Promise.reject(t):Promise.resolve(t)}promiseSingleResponse(e){if(this.data.response instanceof n.RpcError)return Promise.reject(this.data.response);let t;return Array.isArray(this.data.response)?(r.assert(this.data.response.length>0),t=this.data.response[0]):t=this.data.response===void 0?e.O.create():this.data.response,r.assert(e.O.is(t)),Promise.resolve(t)}streamResponses(e,i,a){return t(this,void 0,void 0,function*(){let t=[];if(this.data.response===void 0)t.push(e.O.create());else if(Array.isArray(this.data.response))for(let n of this.data.response)r.assert(e.O.is(n)),t.push(n);else this.data.response instanceof n.RpcError||(r.assert(e.O.is(this.data.response)),t.push(this.data.response));try{yield d(this.responseDelay,a)(void 0)}catch(e){i.notifyError(e);return}if(this.data.response instanceof n.RpcError){i.notifyError(this.data.response);return}for(let e of t){i.notifyMessage(e);try{yield d(this.betweenResponseDelay,a)(void 0)}catch(e){i.notifyError(e);return}}if(this.data.status instanceof n.RpcError){i.notifyError(this.data.status);return}if(this.data.trailers instanceof n.RpcError){i.notifyError(this.data.trailers);return}i.notifyComplete()})}promiseStatus(){let t=this.data.status??e.defaultStatus;return t instanceof n.RpcError?Promise.reject(t):Promise.resolve(t)}promiseTrailers(){let t=this.data.trailers??e.defaultTrailers;return t instanceof n.RpcError?Promise.reject(t):Promise.resolve(t)}maybeSuppressUncaught(...e){if(this.suppressUncaughtRejections)for(let t of e)t.catch(()=>{})}mergeOptions(e){return a.mergeRpcOptions({},e)}unary(e,t,n){let r=n.meta??{},i=this.promiseHeaders().then(d(this.headerDelay,n.abort)),a=i.catch(e=>{}).then(d(this.responseDelay,n.abort)).then(t=>this.promiseSingleResponse(e)),s=a.catch(e=>{}).then(d(this.afterResponseDelay,n.abort)).then(e=>this.promiseStatus()),c=a.catch(e=>{}).then(d(this.afterResponseDelay,n.abort)).then(e=>this.promiseTrailers());return this.maybeSuppressUncaught(s,c),this.lastInput={single:t},new o.UnaryCall(e,r,t,i,a,s,c)}serverStreaming(e,t,n){let r=n.meta??{},a=this.promiseHeaders().then(d(this.headerDelay,n.abort)),o=new i.RpcOutputStreamController,c=a.then(d(this.responseDelay,n.abort)).catch(()=>{}).then(()=>this.streamResponses(e,o,n.abort)).then(d(this.afterResponseDelay,n.abort)),l=c.then(()=>this.promiseStatus()),u=c.then(()=>this.promiseTrailers());return this.maybeSuppressUncaught(l,u),this.lastInput={single:t},new s.ServerStreamingCall(e,r,t,a,o,l,u)}clientStreaming(e,t){let n=t.meta??{},r=this.promiseHeaders().then(d(this.headerDelay,t.abort)),i=r.catch(e=>{}).then(d(this.responseDelay,t.abort)).then(t=>this.promiseSingleResponse(e)),a=i.catch(e=>{}).then(d(this.afterResponseDelay,t.abort)).then(e=>this.promiseStatus()),o=i.catch(e=>{}).then(d(this.afterResponseDelay,t.abort)).then(e=>this.promiseTrailers());return this.maybeSuppressUncaught(a,o),this.lastInput=new f(this.data,t.abort),new c.ClientStreamingCall(e,n,this.lastInput,r,i,a,o)}duplex(e,t){let n=t.meta??{},r=this.promiseHeaders().then(d(this.headerDelay,t.abort)),a=new i.RpcOutputStreamController,o=r.then(d(this.responseDelay,t.abort)).catch(()=>{}).then(()=>this.streamResponses(e,a,t.abort)).then(d(this.afterResponseDelay,t.abort)),s=o.then(()=>this.promiseStatus()),c=o.then(()=>this.promiseTrailers());return this.maybeSuppressUncaught(s,c),this.lastInput=new f(this.data,t.abort),new l.DuplexStreamingCall(e,n,this.lastInput,r,a,s,c)}};e.TestTransport=u,u.defaultHeaders={responseHeader:`test`},u.defaultStatus={code:`OK`,detail:`all good`},u.defaultTrailers={responseTrailer:`test`};function d(e,t){return r=>new Promise((i,a)=>{if(t?.aborted)a(new n.RpcError(`user cancel`,`CANCELLED`));else{let o=setTimeout(()=>i(r),e);t&&t.addEventListener(`abort`,e=>{clearTimeout(o),a(new n.RpcError(`user cancel`,`CANCELLED`))})}})}var f=class{constructor(e,t){this._completed=!1,this._sent=[],this.data=e,this.abort=t}get sent(){return this._sent}get completed(){return this._completed}send(e){if(this.data.inputMessage instanceof n.RpcError)return Promise.reject(this.data.inputMessage);let t=this.data.inputMessage===void 0?10:this.data.inputMessage;return Promise.resolve(void 0).then(()=>{this._sent.push(e)}).then(d(t,this.abort))}complete(){if(this.data.inputComplete instanceof n.RpcError)return Promise.reject(this.data.inputComplete);let e=this.data.inputComplete===void 0?10:this.data.inputComplete;return Promise.resolve(void 0).then(()=>{this._completed=!0}).then(d(e,this.abort))}}})),Zj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.stackDuplexStreamingInterceptors=e.stackClientStreamingInterceptors=e.stackServerStreamingInterceptors=e.stackUnaryInterceptors=e.stackIntercept=void 0;let t=zj();function n(e,n,r,i,a){if(e==`unary`){let e=(e,t,r)=>n.unary(e,t,r);for(let t of(i.interceptors??[]).filter(e=>e.interceptUnary).reverse()){let n=e;e=(e,r,i)=>t.interceptUnary(n,e,r,i)}return e(r,a,i)}if(e==`serverStreaming`){let e=(e,t,r)=>n.serverStreaming(e,t,r);for(let t of(i.interceptors??[]).filter(e=>e.interceptServerStreaming).reverse()){let n=e;e=(e,r,i)=>t.interceptServerStreaming(n,e,r,i)}return e(r,a,i)}if(e==`clientStreaming`){let e=(e,t)=>n.clientStreaming(e,t);for(let t of(i.interceptors??[]).filter(e=>e.interceptClientStreaming).reverse()){let n=e;e=(e,r)=>t.interceptClientStreaming(n,e,r)}return e(r,i)}if(e==`duplex`){let e=(e,t)=>n.duplex(e,t);for(let t of(i.interceptors??[]).filter(e=>e.interceptDuplex).reverse()){let n=e;e=(e,r)=>t.interceptDuplex(n,e,r)}return e(r,i)}t.assertNever(e)}e.stackIntercept=n;function r(e,t,r,i){return n(`unary`,e,t,i,r)}e.stackUnaryInterceptors=r;function i(e,t,r,i){return n(`serverStreaming`,e,t,i,r)}e.stackServerStreamingInterceptors=i;function a(e,t,r){return n(`clientStreaming`,e,t,r)}e.stackClientStreamingInterceptors=a;function o(e,t,r){return n(`duplex`,e,t,r)}e.stackDuplexStreamingInterceptors=o})),Qj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ServerCallContextController=void 0,e.ServerCallContextController=class{constructor(e,t,n,r,i={code:`OK`,detail:``}){this._cancelled=!1,this._listeners=[],this.method=e,this.headers=t,this.deadline=n,this.trailers={},this._sendRH=r,this.status=i}notifyCancelled(){if(!this._cancelled){this._cancelled=!0;for(let e of this._listeners)e()}}sendResponseHeaders(e){this._sendRH(e)}get cancelled(){return this._cancelled}onCancel(e){let t=this._listeners;return t.push(e),()=>{let n=t.indexOf(e);n>=0&&t.splice(n,1)}}}})),$j=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Vj();Object.defineProperty(e,`ServiceType`,{enumerable:!0,get:function(){return t.ServiceType}});var n=Bj();Object.defineProperty(e,`readMethodOptions`,{enumerable:!0,get:function(){return n.readMethodOptions}}),Object.defineProperty(e,`readMethodOption`,{enumerable:!0,get:function(){return n.readMethodOption}}),Object.defineProperty(e,`readServiceOption`,{enumerable:!0,get:function(){return n.readServiceOption}});var r=Hj();Object.defineProperty(e,`RpcError`,{enumerable:!0,get:function(){return r.RpcError}});var i=Uj();Object.defineProperty(e,`mergeRpcOptions`,{enumerable:!0,get:function(){return i.mergeRpcOptions}});var a=Gj();Object.defineProperty(e,`RpcOutputStreamController`,{enumerable:!0,get:function(){return a.RpcOutputStreamController}});var o=Xj();Object.defineProperty(e,`TestTransport`,{enumerable:!0,get:function(){return o.TestTransport}});var s=Wj();Object.defineProperty(e,`Deferred`,{enumerable:!0,get:function(){return s.Deferred}}),Object.defineProperty(e,`DeferredState`,{enumerable:!0,get:function(){return s.DeferredState}});var c=Yj();Object.defineProperty(e,`DuplexStreamingCall`,{enumerable:!0,get:function(){return c.DuplexStreamingCall}});var l=Jj();Object.defineProperty(e,`ClientStreamingCall`,{enumerable:!0,get:function(){return l.ClientStreamingCall}});var u=qj();Object.defineProperty(e,`ServerStreamingCall`,{enumerable:!0,get:function(){return u.ServerStreamingCall}});var d=Kj();Object.defineProperty(e,`UnaryCall`,{enumerable:!0,get:function(){return d.UnaryCall}});var f=Zj();Object.defineProperty(e,`stackIntercept`,{enumerable:!0,get:function(){return f.stackIntercept}}),Object.defineProperty(e,`stackDuplexStreamingInterceptors`,{enumerable:!0,get:function(){return f.stackDuplexStreamingInterceptors}}),Object.defineProperty(e,`stackClientStreamingInterceptors`,{enumerable:!0,get:function(){return f.stackClientStreamingInterceptors}}),Object.defineProperty(e,`stackServerStreamingInterceptors`,{enumerable:!0,get:function(){return f.stackServerStreamingInterceptors}}),Object.defineProperty(e,`stackUnaryInterceptors`,{enumerable:!0,get:function(){return f.stackUnaryInterceptors}});var p=Qj();Object.defineProperty(e,`ServerCallContextController`,{enumerable:!0,get:function(){return p.ServerCallContextController}})}))(),$=zj();const eM=new class extends $.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 t={scope:``,permission:`0`};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.poseM}])}create(e){let t={repositoryId:`0`,scope:[]};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.postM},{no:2,name:`key`,kind:`scalar`,T:9},{no:3,name:`version`,kind:`scalar`,T:9}])}create(e){let t={key:``,version:``};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.postM},{no:2,name:`key`,kind:`scalar`,T:9},{no:3,name:`size_bytes`,kind:`scalar`,T:3},{no:4,name:`version`,kind:`scalar`,T:9}])}create(e){let t={key:``,sizeBytes:`0`,version:``};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.postM},{no:2,name:`key`,kind:`scalar`,T:9},{no:3,name:`restore_keys`,kind:`scalar`,repeat:2,T:9},{no:4,name:`version`,kind:`scalar`,T:9}])}create(e){let t={key:``,restoreKeys:[],version:``};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posrM.fromJson(e,{ignoreUnknownFields:!0}))}FinalizeCacheEntryUpload(e){let t=iM.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request(`github.actions.results.api.v1.CacheService`,`FinalizeCacheEntryUpload`,`application/json`,t).then(e=>aM.fromJson(e,{ignoreUnknownFields:!0}))}GetCacheEntryDownloadURL(e){let t=oM.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request(`github.actions.results.api.v1.CacheService`,`GetCacheEntryDownloadURL`,`application/json`,t).then(e=>sM.fromJson(e,{ignoreUnknownFields:!0}))}};function lM(e){if(e)try{let t=new URL(e).searchParams.get(`sig`);t&&(ui(t),ui(encodeURIComponent(t)))}catch(t){K(`Failed to parse URL: ${e} ${t instanceof Error?t.message:String(t)}`)}}function uM(e){if(typeof e!=`object`||!e){K(`body is not an object or is null`);return}`signed_upload_url`in e&&typeof e.signed_upload_url==`string`&&lM(e.signed_upload_url),`signed_download_url`in e&&typeof e.signed_download_url==`string`&&lM(e.signed_download_url)}var dM=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},fM=class{constructor(e,t,n,r){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let i=df();this.baseUrl=JA(),t&&(this.maxAttempts=t),n&&(this.baseRetryIntervalMilliseconds=n),r&&(this.retryMultiplier=r),this.httpClient=new hr(e,[new vr(i)])}request(e,t,n,r){return dM(this,void 0,void 0,function*(){let i=new URL(`/twirp/${e}/${t}`,this.baseUrl).href;K(`[Request] ${t} ${i}`);let a={"Content-Type":n};try{let{body:e}=yield this.retryableRequest(()=>dM(this,void 0,void 0,function*(){return this.httpClient.post(i,JSON.stringify(r),a)}));return e}catch(e){throw Error(`Failed to ${t}: ${e.message}`)}})}retryableRequest(e){return dM(this,void 0,void 0,function*(){let t=0,n=``,r=``;for(;t0&&_i(`You've hit a rate limit, your rate limit will reset in ${t} seconds`)}throw new CA(`Rate limited: ${n}`)}}catch(e){if(e instanceof SyntaxError&&K(`Raw Body: ${r}`),e instanceof SA||e instanceof CA)throw e;if(xA.isNetworkErrorCode(e?.code))throw new xA(e?.code);i=!0,n=e.message}if(!i)throw Error(`Received non-retryable error: ${n}`);if(t+1===this.maxAttempts)throw Error(`Failed to make request after ${this.maxAttempts} attempts: ${n}`);let a=this.getExponentialRetryTimeMilliseconds(t);vi(`Attempt ${t+1} of ${this.maxAttempts} failed with error: ${n}. Retrying request in ${a} ms...`),yield this.sleep(a),t++}throw Error(`Request failed`)})}isSuccessStatusCode(e){return e?e>=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[sr.BadGateway,sr.GatewayTimeout,sr.InternalServerError,sr.ServiceUnavailable].includes(e):!1}sleep(e){return dM(this,void 0,void 0,function*(){return new Promise(t=>setTimeout(t,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw Error(`attempt should be a positive integer`);if(e===0)return this.baseRetryIntervalMilliseconds;let t=this.baseRetryIntervalMilliseconds*this.retryMultiplier**+e,n=t*this.retryMultiplier;return Math.trunc(Math.random()*(n-t)+t)}};function pM(e){return new cM(new fM(ZA(),e?.maxAttempts,e?.retryIntervalMs,e?.retryMultiplier))}var mM=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const hM=process.platform===`win32`;function gM(){return mM(this,void 0,void 0,function*(){switch(process.platform){case`win32`:{let e=yield cf(),t=Yd;if(e)return{path:e,type:Gd.GNU};if(me(t))return{path:t,type:Gd.BSD};break}case`darwin`:{let e=yield Yr(`gtar`,!1);return e?{path:e,type:Gd.GNU}:{path:yield Yr(`tar`,!0),type:Gd.BSD}}default:break}return{path:yield Yr(`tar`,!0),type:Gd.GNU}})}function _M(e,t,n){return mM(this,arguments,void 0,function*(e,t,n,r=``){let i=[`"${e.path}"`],a=sf(t),o=`cache.tar`,s=yM(),c=e.type===Gd.BSD&&t!==Wd.Gzip&&hM;switch(n){case`create`:i.push(`--posix`,`-cf`,c?o:a.replace(RegExp(`\\${U.sep}`,`g`),`/`),`--exclude`,c?o:a.replace(RegExp(`\\${U.sep}`,`g`),`/`),`-P`,`-C`,s.replace(RegExp(`\\${U.sep}`,`g`),`/`),`--files-from`,Zd);break;case`extract`:i.push(`-xf`,c?o:r.replace(RegExp(`\\${U.sep}`,`g`),`/`),`-P`,`-C`,s.replace(RegExp(`\\${U.sep}`,`g`),`/`));break;case`list`:i.push(`-tf`,c?o:r.replace(RegExp(`\\${U.sep}`,`g`),`/`),`-P`);break}if(e.type===Gd.GNU)switch(process.platform){case`win32`:i.push(`--force-local`);break;case`darwin`:i.push(`--delay-directory-restore`);break}return i})}function vM(e,t){return mM(this,arguments,void 0,function*(e,t,n=``){let r,i=yield gM(),a=yield _M(i,e,t,n),o=t===`create`?yield xM(i,e):yield bM(i,e,n),s=i.type===Gd.BSD&&e!==Wd.Gzip&&hM;return r=s&&t!==`create`?[[...o].join(` `),[...a].join(` `)]:[[...a].join(` `),[...o].join(` `)],s?r:[r.join(` `)]})}function yM(){return process.env.GITHUB_WORKSPACE??process.cwd()}function bM(e,t,n){return mM(this,void 0,void 0,function*(){let r=e.type===Gd.BSD&&t!==Wd.Gzip&&hM;switch(t){case Wd.Zstd:return r?[`zstd -d --long=30 --force -o`,Xd,n.replace(RegExp(`\\${U.sep}`,`g`),`/`)]:[`--use-compress-program`,hM?`"zstd -d --long=30"`:`unzstd --long=30`];case Wd.ZstdWithoutLong:return r?[`zstd -d --force -o`,Xd,n.replace(RegExp(`\\${U.sep}`,`g`),`/`)]:[`--use-compress-program`,hM?`"zstd -d"`:`unzstd`];default:return[`-z`]}})}function xM(e,t){return mM(this,void 0,void 0,function*(){let n=sf(t),r=e.type===Gd.BSD&&t!==Wd.Gzip&&hM;switch(t){case Wd.Zstd:return r?[`zstd -T0 --long=30 --force -o`,n.replace(RegExp(`\\${U.sep}`,`g`),`/`),Xd]:[`--use-compress-program`,hM?`"zstd -T0 --long=30"`:`zstdmt --long=30`];case Wd.ZstdWithoutLong:return r?[`zstd -T0 --force -o`,n.replace(RegExp(`\\${U.sep}`,`g`),`/`),Xd]:[`--use-compress-program`,hM?`"zstd -T0"`:`zstdmt`];default:return[`-z`]}})}function SM(e,t){return mM(this,void 0,void 0,function*(){for(let n of e)try{yield oi(n,void 0,{cwd:t,env:Object.assign(Object.assign({},process.env),{MSYS:`winsymlinks:nativestrict`})})}catch(e){throw Error(`${n.split(` `)[0]} failed with error: ${e?.message}`)}})}function CM(e,t){return mM(this,void 0,void 0,function*(){yield SM(yield vM(t,`list`,e))})}function wM(e,t){return mM(this,void 0,void 0,function*(){yield Jr(yM()),yield SM(yield vM(t,`extract`,e))})}function TM(e,t,n){return mM(this,void 0,void 0,function*(){_e(U.join(e,Zd),t.join(` +`)),yield SM(yield vM(n,`create`),e)})}var EM=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},DM=class e extends Error{constructor(t){super(t),this.name=`ValidationError`,Object.setPrototypeOf(this,e.prototype)}},OM=class e extends Error{constructor(t){super(t),this.name=`ReserveCacheError`,Object.setPrototypeOf(this,e.prototype)}},kM=class e extends Error{constructor(t){super(t),this.name=`FinalizeCacheError`,Object.setPrototypeOf(this,e.prototype)}};function AM(e){if(!e||e.length===0)throw new DM(`Path Validation Error: At least one directory or file path is required`)}function jM(e){if(e.length>512)throw new DM(`Key Validation Error: ${e} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(e))throw new DM(`Key Validation Error: ${e} cannot contain commas.`)}function MM(e,t,n,r){return EM(this,arguments,void 0,function*(e,t,n,r,i=!1){let a=qA();switch(K(`Cache service version: ${a}`),AM(e),a){case`v2`:return yield PM(e,t,n,r,i);default:return yield NM(e,t,n,r,i)}})}function NM(e,t,n,r){return EM(this,arguments,void 0,function*(e,t,n,r,i=!1){n||=[];let a=[t,...n];if(K(`Resolved Keys:`),K(JSON.stringify(a)),a.length>10)throw new DM(`Key Validation Error: Keys are limited to a maximum of 10.`);for(let e of a)jM(e);let o=yield of(),s=``;try{let t=yield rj(a,e,{compressionMethod:o,enableCrossOsArchive:i});if(!t?.archiveLocation)return;if(r?.lookupOnly)return vi(`Lookup only - skipping download`),t.cacheKey;s=U.join(yield ef(),sf(o)),K(`Archive Path: ${s}`),yield aj(t.archiveLocation,s,r),hi()&&(yield CM(s,o));let n=tf(s);return vi(`Cache Size: ~${Math.round(n/(1024*1024))} MB (${n} B)`),yield wM(s,o),vi(`Cache restored successfully`),t.cacheKey}catch(e){let t=e;if(t.name===DM.name)throw e;t instanceof pr&&typeof t.statusCode==`number`&&t.statusCode>=500?gi(`Failed to restore: ${e.message}`):_i(`Failed to restore: ${e.message}`)}finally{try{yield rf(s)}catch(e){K(`Failed to delete archive: ${e}`)}}})}function PM(e,t,n,r){return EM(this,arguments,void 0,function*(e,t,n,r,i=!1){r=Object.assign(Object.assign({},r),{useAzureSdk:!0}),n||=[];let a=[t,...n];if(K(`Resolved Keys:`),K(JSON.stringify(a)),a.length>10)throw new DM(`Key Validation Error: Keys are limited to a maximum of 10.`);for(let e of a)jM(e);let o=``;try{let s=pM(),c=yield of(),l={key:t,restoreKeys:n,version:uf(e,c,i)},u=yield s.GetCacheEntryDownloadURL(l);if(!u.ok){K(`Cache not found for version ${l.version} of keys: ${a.join(`, `)}`);return}if(l.key===u.matchedKey?vi(`Cache hit for: ${u.matchedKey}`):vi(`Cache hit for restore-key: ${u.matchedKey}`),r?.lookupOnly)return vi(`Lookup only - skipping download`),u.matchedKey;o=U.join(yield ef(),sf(c)),K(`Archive path: ${o}`),K(`Starting download of archive to: ${o}`),yield aj(u.signedDownloadUrl,o,r);let d=tf(o);return vi(`Cache Size: ~${Math.round(d/(1024*1024))} MB (${d} B)`),hi()&&(yield CM(o,c)),yield wM(o,c),vi(`Cache restored successfully`),u.matchedKey}catch(e){let t=e;if(t.name===DM.name)throw e;t instanceof pr&&typeof t.statusCode==`number`&&t.statusCode>=500?gi(`Failed to restore: ${e.message}`):_i(`Failed to restore: ${e.message}`)}finally{try{o&&(yield rf(o))}catch(e){K(`Failed to delete archive: ${e}`)}}})}function FM(e,t,n){return EM(this,arguments,void 0,function*(e,t,n,r=!1){let i=qA();switch(K(`Cache service version: ${i}`),AM(e),jM(t),i){case`v2`:return yield LM(e,t,n,r);default:return yield IM(e,t,n,r)}})}function IM(e,t,n){return EM(this,arguments,void 0,function*(e,t,n,r=!1){let i=yield of(),a=-1,o=yield nf(e);if(K(`Cache Paths:`),K(`${JSON.stringify(o)}`),o.length===0)throw Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`);let s=yield ef(),c=U.join(s,sf(i));K(`Archive Path: ${c}`);try{yield TM(s,o,i),hi()&&(yield CM(c,i));let l=tf(c);if(K(`File Size: ${l}`),l>10737418240&&!KA())throw Error(`Cache size of ~${Math.round(l/(1024*1024))} MB (${l} B) is over the 10GB limit, not saving cache.`);K(`Reserving Cache`);let u=yield oj(t,e,{compressionMethod:i,enableCrossOsArchive:r,cacheSize:l});if(u?.result?.cacheId)a=u?.result?.cacheId;else if(u?.statusCode===400)throw Error(u?.error?.message??`Cache size of ~${Math.round(l/(1024*1024))} MB (${l} B) is over the data cap limit, not saving cache.`);else throw new OM(`Unable to reserve cache with key ${t}, another job may be creating this cache. More details: ${u?.error?.message}`);K(`Saving Cache (ID: ${a})`),yield dj(a,c,``,n)}catch(e){let t=e;if(t.name===DM.name)throw e;t.name===OM.name?vi(`Failed to save: ${t.message}`):t instanceof pr&&typeof t.statusCode==`number`&&t.statusCode>=500?gi(`Failed to save: ${t.message}`):_i(`Failed to save: ${t.message}`)}finally{try{yield rf(c)}catch(e){K(`Failed to delete archive: ${e}`)}}return a})}function LM(e,t,n){return EM(this,arguments,void 0,function*(e,t,n,r=!1){n=Object.assign(Object.assign({},n),{uploadChunkSize:64*1024*1024,uploadConcurrency:8,useAzureSdk:!0});let i=yield of(),a=pM(),o=-1,s=yield nf(e);if(K(`Cache Paths:`),K(`${JSON.stringify(s)}`),s.length===0)throw Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`);let c=yield ef(),l=U.join(c,sf(i));K(`Archive Path: ${l}`);try{yield TM(c,s,i),hi()&&(yield CM(l,i));let u=tf(l);K(`File Size: ${u}`),n.archiveSizeBytes=u,K(`Reserving Cache`);let d=uf(e,i,r),f={key:t,version:d},p;try{let e=yield a.CreateCacheEntry(f);if(!e.ok)throw e.message&&_i(`Cache reservation failed: ${e.message}`),Error(e.message||`Response was not ok`);p=e.signedUploadUrl}catch(e){throw K(`Failed to reserve cache: ${e}`),new OM(`Unable to reserve cache with key ${t}, another job may be creating this cache.`)}K(`Attempting to upload cache located at: ${l}`),yield dj(o,l,p,n);let m={key:t,version:d,sizeBytes:`${u}`},h=yield a.FinalizeCacheEntryUpload(m);if(K(`FinalizeCacheEntryUploadResponse: ${h.ok}`),!h.ok)throw h.message?new kM(h.message):Error(`Unable to finalize cache with key ${t}, another job may be finalizing this cache.`);o=parseInt(h.entryId)}catch(e){let t=e;if(t.name===DM.name)throw e;t.name===OM.name?vi(`Failed to save: ${t.message}`):t.name===kM.name?_i(t.message):t instanceof pr&&typeof t.statusCode==`number`&&t.statusCode>=500?gi(`Failed to save: ${t.message}`):_i(`Failed to save: ${t.message}`)}finally{try{yield rf(l)}catch(e){K(`Failed to delete archive: ${e}`)}}return o})}function RM(e){return e.replaceAll(`/`,`-`)}function zM(e){let{agentIdentity:t,repo:n,ref:r,os:i}=e;return`${Ya}-${t}-${RM(n)}-${r}-${i}`}function BM(e){let{agentIdentity:t,repo:n,ref:r}=e,i=RM(n);return[`${Ya}-${t}-${i}-${r}-`,`${Ya}-${t}-${i}-`]}function VM(e,t){return`${zM(e)}-${t}`}function HM(){return{agentIdentity:`github`,repo:oo(),ref:so(),os:ao()}}function UM(e,t){let n=Be.resolve(e),r=Be.resolve(t);return n.startsWith(r+Be.sep)}async function WM(e,t,n){if(!UM(e,t)){n.debug(`auth.json is outside storage path - skipping deletion`,{authPath:e,storagePath:t});return}try{await ze.unlink(e),n.debug(`Deleted auth.json from cache storage`)}catch(e){e.code!==`ENOENT`&&n.warning(`Failed to delete auth.json`,{error:Ra(e)})}}async function GM(e,t,n){let r=[e];if(t!=null&&r.push(t),await Z(n??null)){let t=Be.join(Be.dirname(e),`opencode.db`);r.push(t,`${t}-wal`,`${t}-shm`)}return r}async function KM(e,t,n){let r=[e];if(t!=null&&r.push(t),await Z(n??null)){let t=Be.join(Be.dirname(e),`opencode.db`);r.push(t);for(let e of[`-wal`,`-shm`])try{await ze.access(`${t}${e}`),r.push(`${t}${e}`)}catch{}}return r}function qM(){return{restoreCache:async(e,t,n)=>MM(e,t,n),saveCache:async(e,t)=>FM(e,t)}}const JM=qM();async function YM(e,t){try{return(await ze.stat(e)).isDirectory()===!1?!0:(await ze.readdir(e),!1)}catch{return t.debug(`Storage path not accessible - treating as corrupted`),!0}}async function XM(e,t){let n=Be.join(e,`.version`);try{let e=await ze.readFile(n,`utf8`),r=Number.parseInt(e.trim(),10);return r===1?!0:(t.info(`Storage version mismatch`,{expected:1,found:r}),!1)}catch{return t.debug(`No version file found - treating as compatible`),!0}}async function ZM(e){try{await ze.rm(e,{recursive:!0,force:!0}),await ze.mkdir(e,{recursive:!0})}catch{}}async function QM(e){let{storeConfig:t,storeAdapter:n,logger:r,storagePath:i,components:a}=e;if(t?.enabled!==!0)return{hit:!1,key:null,restoredPath:null,corrupted:!1,source:null};let o=await ms(n??sc(t,r),t,a.agentIdentity,a.repo,i,r);return o.mainDbRestored===!0?(await ze.mkdir(i,{recursive:!0}),{hit:!0,key:null,restoredPath:i,corrupted:!1,source:`storage`}):(o.downloaded>0&&r.warning(`Object store returned session sidecar files without main DB - treating as miss`,{downloaded:o.downloaded,failed:o.failed}),{hit:!1,key:null,restoredPath:null,corrupted:!1,source:null})}async function $M(e,t){let n=await QM(e);return n.hit===!0?n:{hit:!1,key:t,restoredPath:null,corrupted:!0,source:null}}async function eN(e){let{components:t,logger:n,storagePath:r,authPath:i,projectIdPath:a,opencodeVersion:o,cacheAdapter:s=JM}=e;if(se.env.SKIP_CACHE===`true`)return n.debug(`Skipping cache restore (SKIP_CACHE=true)`),await ze.mkdir(r,{recursive:!0}),{hit:!1,key:null,restoredPath:null,corrupted:!1,source:null};let c=zM(t),l=BM(t),u=await GM(r,a,o);n.info(`Restoring cache`,{primaryKey:c,restoreKeys:[...l],paths:u});try{let t=await s.restoreCache(u,c,[...l]);return t==null?(n.info(`Cache miss - starting with fresh state`),await ze.mkdir(r,{recursive:!0}),await QM(e)):(n.info(`Cache restored`,{restoredKey:t}),await YM(r,n)===!0?(n.warning(`Cache corruption detected - proceeding with clean state`),await ZM(r),await $M(e,t)):await XM(r,n)===!1?(n.warning(`Storage version mismatch - proceeding with clean state`),await ZM(r),await $M(e,t)):(await WM(i,r,n),{hit:!0,key:t,restoredPath:r,corrupted:!1,source:`cache`}))}catch(t){return n.warning(`Cache restore failed`,{error:Ra(t)}),QM(e)}}async function tN(e){let t=Be.join(e,`.version`);await ze.mkdir(e,{recursive:!0}),await ze.writeFile(t,`1`,`utf8`)}async function nN(e){try{return(await ze.readdir(e)).length>0}catch{return!1}}async function rN(e){let{components:t,runId:n,logger:r,storagePath:i,authPath:a,projectIdPath:o,opencodeVersion:s,cacheAdapter:c=JM}=e;if(se.env.SKIP_CACHE===`true`)return r.debug(`Skipping cache save (SKIP_CACHE=true)`),!0;let l=VM(t,n),u=await KM(i,o,s);r.info(`Saving cache`,{saveKey:l,paths:u});try{if(await WM(a,i,r),await nN(i)===!1)return r.info(`No storage content to cache`),!1;if(await tN(i),e.storeConfig?.enabled===!0)try{let n=await ps(e.storeAdapter??sc(e.storeConfig,r),e.storeConfig,t.agentIdentity,t.repo,i,r);r.info(`Object store session sync completed`,n)}catch(e){r.warning(`Object store session sync failed (non-fatal)`,{error:Ra(e)})}return await c.saveCache(u,l),r.info(`Cache saved`,{saveKey:l}),!0}catch(e){return e instanceof Error&&e.message.includes(`already exists`)?(r.info(`Cache key already exists, skipping save`),!0):(r.warning(`Cache save failed`,{error:Ra(e)}),!1)}}function iN(){return 8*1024*1024}function aN(){let e=process.env.ACTIONS_RUNTIME_TOKEN;if(!e)throw Error(`Unable to get the ACTIONS_RUNTIME_TOKEN env variable`);return e}function oN(){let e=process.env.ACTIONS_RESULTS_URL;if(!e)throw Error(`Unable to get the ACTIONS_RESULTS_URL env variable`);return new URL(e).origin}function sN(){let e=new URL(process.env.GITHUB_SERVER_URL||`https://github.com`).hostname.trimEnd().toUpperCase(),t=e===`GITHUB.COM`,n=e.endsWith(`.GHE.COM`),r=e.endsWith(`.LOCALHOST`);return!t&&!n&&!r}function cN(){let e=process.env.GITHUB_WORKSPACE;if(!e)throw Error(`Unable to get the GITHUB_WORKSPACE env variable`);return e}function lN(){let e=le.cpus().length,t=32;if(e>4){let n=16*e;t=n>300?300:n}let n=process.env.ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY;if(n){let e=parseInt(n);if(isNaN(e)||e<1)throw Error(`Invalid value set for ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY env variable`);return eDate.parse(`9999-12-31T23:59:59Z`))throw Error(`Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.`);if(e.nanos<0)throw Error(`Unable to encode invalid Timestamp to JSON. Nanos must not be negative.`);let r=`Z`;if(e.nanos>0){let t=(e.nanos+1e9).toString().substring(1);r=t.substring(3)===`000000`?`.`+t.substring(0,3)+`Z`:t.substring(6)===`000`?`.`+t.substring(0,6)+`Z`:`.`+t+`Z`}return new Date(n).toISOString().replace(`.000Z`,r)}internalJsonRead(e,t,n){if(typeof e!=`string`)throw Error(`Unable to parse Timestamp from JSON `+(0,$.typeofJsonValue)(e)+`.`);let r=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!r)throw Error(`Unable to parse Timestamp from JSON. Invalid format.`);let i=Date.parse(r[1]+`-`+r[2]+`-`+r[3]+`T`+r[4]+`:`+r[5]+`:`+r[6]+(r[8]?r[8]:`Z`));if(Number.isNaN(i))throw Error(`Unable to parse Timestamp from JSON. Invalid value.`);if(iDate.parse(`9999-12-31T23:59:59Z`))throw new globalThis.Error(`Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.`);return n||=this.create(),n.seconds=$.PbLong.from(i/1e3).toString(),n.nanos=0,r[7]&&(n.nanos=parseInt(`1`+r[7]+`0`.repeat(9-r[7].length))-1e9),n}create(e){let t={seconds:`0`,nanos:0};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posfN},{no:5,name:`version`,kind:`scalar`,T:5},{no:6,name:`mime_type`,kind:`message`,T:()=>mN}])}create(e){let t={workflowRunBackendId:``,workflowJobRunBackendId:``,name:``,version:0};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posmN}])}create(e){let t={workflowRunBackendId:``,workflowJobRunBackendId:``,name:``,size:`0`};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posmN},{no:4,name:`id_filter`,kind:`message`,T:()=>pN}])}create(e){let t={workflowRunBackendId:``,workflowJobRunBackendId:``};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posxN}])}create(e){let t={artifacts:[]};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posfN},{no:7,name:`digest`,kind:`message`,T:()=>mN}])}create(e){let t={workflowRunBackendId:``,workflowJobRunBackendId:``,databaseId:`0`,name:``,size:`0`};return globalThis.Object.defineProperty(t,$.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,$.reflectionMergePartial)(this,t,e),t}internalBinaryRead(e,t,n,r){let i=r??this.create(),a=e.pos+t;for(;e.posgN.fromJson(e,{ignoreUnknownFields:!0}))}FinalizeArtifact(e){let t=_N.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request(`github.actions.results.api.v1.ArtifactService`,`FinalizeArtifact`,`application/json`,t).then(e=>vN.fromJson(e,{ignoreUnknownFields:!0}))}ListArtifacts(e){let t=yN.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request(`github.actions.results.api.v1.ArtifactService`,`ListArtifacts`,`application/json`,t).then(e=>bN.fromJson(e,{ignoreUnknownFields:!0}))}GetSignedArtifactURL(e){let t=SN.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request(`github.actions.results.api.v1.ArtifactService`,`GetSignedArtifactURL`,`application/json`,t).then(e=>CN.fromJson(e,{ignoreUnknownFields:!0}))}DeleteArtifact(e){let t=wN.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request(`github.actions.results.api.v1.ArtifactService`,`DeleteArtifact`,`application/json`,t).then(e=>TN.fromJson(e,{ignoreUnknownFields:!0}))}};function DN(e){if(!e)return;let t=ON();t&&t`,` Greater than >`],[`|`,` Vertical bar |`],[`*`,` Asterisk *`],[`?`,` Question mark ?`],[`\r`,` Carriage return \\r`],[` +`,` Line feed \\n`]]),AN=new Map([...kN,[`\\`,` Backslash \\`],[`/`,` Forward slash /`]]);function jN(e){if(!e)throw Error(`Provided artifact name input during validation is empty`);for(let[t,n]of AN)if(e.includes(t))throw Error(`The artifact name is not valid: ${e}. Contains the following character: ${n} -Invalid characters include: ${Array.from(rj.values()).toString()} +Invalid characters include: ${Array.from(AN.values()).toString()} -These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`);gi(`Artifact name is valid!`)}function aj(e){if(!e)throw Error(`Provided file path input during validation is empty`);for(let[t,n]of nj)if(e.includes(t))throw Error(`The path for one of the files in artifact is not valid: ${e}. Contains the following character: ${n} +These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`);vi(`Artifact name is valid!`)}function MN(e){if(!e)throw Error(`Provided file path input during validation is empty`);for(let[t,n]of kN)if(e.includes(t))throw Error(`The path for one of the files in artifact is not valid: ${e}. Contains the following character: ${n} -Invalid characters include: ${Array.from(nj.values()).toString()} +Invalid characters include: ${Array.from(kN.values()).toString()} The following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems. - `)}var oj=i(((e,t)=>{t.exports={name:`@actions/artifact`,version:`6.2.1`,preview:!0,description:`Actions artifact lib`,keywords:[`github`,`actions`,`artifact`],homepage:`https://github.com/actions/toolkit/tree/main/packages/artifact`,license:`MIT`,type:`module`,main:`lib/artifact.js`,types:`lib/artifact.d.ts`,exports:{".":{types:`./lib/artifact.d.ts`,import:`./lib/artifact.js`}},directories:{lib:`lib`,test:`__tests__`},files:[`lib`,`!.DS_Store`],publishConfig:{access:`public`},repository:{type:`git`,url:`git+https://github.com/actions/toolkit.git`,directory:`packages/artifact`},scripts:{"audit-moderate":`npm install && npm audit --json --audit-level=moderate > audit.json`,test:`cd ../../ && npm run test ./packages/artifact`,bootstrap:`cd ../../ && npm run bootstrap`,"tsc-run":`tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/`,tsc:`npm run bootstrap && npm run tsc-run`,"gen:docs":`typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none`},bugs:{url:`https://github.com/actions/toolkit/issues`},dependencies:{"@actions/core":`^3.0.0`,"@actions/github":`^9.0.0`,"@actions/http-client":`^4.0.0`,"@azure/storage-blob":`^12.30.0`,"@octokit/core":`^7.0.6`,"@octokit/plugin-request-log":`^6.0.0`,"@octokit/plugin-retry":`^8.0.0`,"@octokit/request":`^10.0.7`,"@octokit/request-error":`^7.1.0`,"@protobuf-ts/plugin":`^2.2.3-alpha.1`,"@protobuf-ts/runtime":`^2.9.4`,archiver:`^7.0.1`,"jwt-decode":`^4.0.0`,"unzip-stream":`^0.3.1`},devDependencies:{"@types/archiver":`^7.0.0`,"@types/unzip-stream":`^0.3.4`,typedoc:`^0.28.16`,"typedoc-plugin-markdown":`^4.9.0`,typescript:`^5.9.3`},overrides:{"uri-js":`npm:uri-js-replace@^1.0.1`,"node-fetch":`^3.3.2`}}})),sj=i(((e,t)=>{t.exports={version:oj().version}}))();function cj(){return`@actions/artifact-${sj.version}`}var lj=class extends Error{constructor(e=[]){let t=`No files were found to upload`;e.length>0&&(t+=`: ${e.join(`, `)}`),super(t),this.files=e,this.name=`FilesNotFoundError`}},uj=class extends Error{constructor(e){super(e),this.name=`InvalidResponseError`}},dj=class extends Error{constructor(e=`Artifact not found`){super(e),this.name=`ArtifactNotFoundError`}},fj=class extends Error{constructor(e=`@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES.`){super(e),this.name=`GHESNotSupportedError`}},pj=class extends Error{constructor(e){let t=`Unable to make request: ${e}\nIf 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(t),this.code=e,this.name=`NetworkError`}};pj.isNetworkErrorCode=e=>e?[`ECONNRESET`,`ENOTFOUND`,`ETIMEDOUT`,`ECONNREFUSED`,`EHOSTUNREACH`].includes(e):!1;var mj=class extends Error{constructor(){super(`Artifact storage quota has been hit. Unable to upload any new artifacts. -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`}};mj.isUsageErrorMessage=e=>e?e.includes(`insufficient usage`):!1;var hj=class extends Error{};hj.prototype.name=`InvalidTokenError`;function gj(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n=`0`+n),`%`+n}))}function _j(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);switch(t.length%4){case 0:break;case 2:t+=`==`;break;case 3:t+=`=`;break;default:throw Error(`base64 string is not of the correct length`)}try{return gj(t)}catch{return atob(t)}}function vj(e,t){if(typeof e!=`string`)throw new hj(`Invalid token specified: must be a string`);t||={};let n=t.header===!0?0:1,r=e.split(`.`)[n];if(typeof r!=`string`)throw new hj(`Invalid token specified: missing part #${n+1}`);let i;try{i=_j(r)}catch(e){throw new hj(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new hj(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}const yj=Error(`Failed to get backend IDs: The provided JWT token is invalid and/or missing claims`);function bj(){let e=vj(MA());if(!e.scp)throw yj;let t=e.scp.split(` `);if(t.length===0)throw yj;for(let e of t){let t=e.split(`:`);if(t?.[0]!==`Actions.Results`)continue;if(t.length!==3)throw yj;let n={workflowRunBackendId:t[1],workflowJobRunBackendId:t[2]};return K(`Workflow Run Backend ID: ${n.workflowRunBackendId}`),K(`Workflow Job Run Backend ID: ${n.workflowJobRunBackendId}`),n}throw yj}function xj(e){if(e)try{let t=new URL(e).searchParams.get(`sig`);t&&(ci(t),ci(encodeURIComponent(t)))}catch(t){K(`Failed to parse URL: ${e} ${t instanceof Error?t.message:String(t)}`)}}function Sj(e){if(typeof e!=`object`||!e){K(`body is not an object or is null`);return}`signed_upload_url`in e&&typeof e.signed_upload_url==`string`&&xj(e.signed_upload_url),`signed_url`in e&&typeof e.signed_url==`string`&&xj(e.signed_url)}var Cj=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},wj=class{constructor(e,t,n,r){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let i=MA();this.baseUrl=NA(),t&&(this.maxAttempts=t),n&&(this.baseRetryIntervalMilliseconds=n),r&&(this.retryMultiplier=r),this.httpClient=new pr(e,[new gr(i)])}request(e,t,n,r){return Cj(this,void 0,void 0,function*(){let i=new URL(`/twirp/${e}/${t}`,this.baseUrl).href;K(`[Request] ${t} ${i}`);let a={"Content-Type":n};try{let{body:e}=yield this.retryableRequest(()=>Cj(this,void 0,void 0,function*(){return this.httpClient.post(i,JSON.stringify(r),a)}));return e}catch(e){throw Error(`Failed to ${t}: ${e.message}`)}})}retryableRequest(e){return Cj(this,void 0,void 0,function*(){let t=0,n=``,r=``;for(;t=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[ar.BadGateway,ar.GatewayTimeout,ar.InternalServerError,ar.ServiceUnavailable,ar.TooManyRequests].includes(e):!1}sleep(e){return Cj(this,void 0,void 0,function*(){return new Promise(t=>setTimeout(t,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw Error(`attempt should be a positive integer`);if(e===0)return this.baseRetryIntervalMilliseconds;let t=this.baseRetryIntervalMilliseconds*this.retryMultiplier**+e,n=t*this.retryMultiplier;return Math.trunc(Math.random()*(n-t)+t)}};function Tj(e){return new $A(new wj(cj(),e?.maxAttempts,e?.retryIntervalMs,e?.retryMultiplier))}function Ej(e){if(!fe.existsSync(e))throw Error(`The provided rootDirectory ${e} does not exist`);if(!fe.statSync(e).isDirectory())throw Error(`The provided rootDirectory ${e} is not a valid directory`);gi(`Root directory input is valid!`)}function Dj(e,t){let n=[];t=ve(t),t=ye(t);for(let r of e){let e=fe.lstatSync(r,{throwIfNoEntry:!1});if(!e)throw Error(`File ${r} does not exist`);if(e.isDirectory()){let i=r.replace(t,``);aj(i),n.push({sourcePath:null,destinationPath:i,stats:e})}else{if(r=ve(r),r=ye(r),!r.startsWith(t))throw Error(`The rootDirectory: ${t} is not a parent directory of the file: ${r}`);let i=r.replace(t,``);aj(i),n.push({sourcePath:r,destinationPath:i,stats:e})}}return n}var Oj=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function kj(e,t,n){return Oj(this,void 0,void 0,function*(){let r=0,i=Date.now(),a=new AbortController,o=e=>Oj(this,void 0,void 0,function*(){return new Promise((t,n)=>{let r=setInterval(()=>{Date.now()-i>e&&n(Error(`Upload progress stalled.`))},e);a.signal.addEventListener(`abort`,()=>{clearInterval(r),t()})})}),s=IA(),c=jA(),l=new bE(e).getBlockBlobClient();K(`Uploading artifact to blob storage with maxConcurrency: ${s}, bufferSize: ${c}, contentType: ${n}`);let u={blobHTTPHeaders:{blobContentType:n},onProgress:e=>{gi(`Uploaded bytes ${e.loadedBytes}`),r=e.loadedBytes,i=Date.now()},abortSignal:a.signal},d,f=new Ue.PassThrough,p=de.createHash(`sha256`);t.pipe(f),t.pipe(p).setEncoding(`hex`),gi(`Beginning upload of artifact content to blob storage`);try{yield Promise.race([l.uploadStream(f,c,s,u),o(LA())])}catch(e){throw pj.isNetworkErrorCode(e?.code)?new pj(e?.code):e}finally{a.abort()}return gi(`Finished uploading artifact content to blob storage!`),p.end(),d=p.read(),gi(`SHA256 digest of uploaded artifact is ${d}`),r===0&&hi(`No data was uploaded to blob storage. Reported upload byte count is 0.`),{uploadSize:r,sha256Hash:d}})}var Aj=i(((e,t)=>{t.exports=typeof process==`object`&&process&&process.platform===`win32`?{sep:`\\`}:{sep:`/`}})),jj=i(((e,t)=>{let n=t.exports=(e,t,n={})=>(h(t),!n.nocomment&&t.charAt(0)===`#`?!1:new S(t,n).match(e));t.exports=n;let r=Aj();n.sep=r.sep;let i=Symbol(`globstar **`);n.GLOBSTAR=i;let a=tc(),o={"!":{open:`(?:(?!(?:`,close:`))[^/]*?)`},"?":{open:`(?:`,close:`)?`},"+":{open:`(?:`,close:`)+`},"*":{open:`(?:`,close:`)*`},"@":{open:`(?:`,close:`)`}},s=`[^/]`,c=s+`*?`,l=e=>e.split(``).reduce((e,t)=>(e[t]=!0,e),{}),u=l(`().*{}+?[]^$\\!`),d=l(`[.(`),f=/\/+/;n.filter=(e,t={})=>(r,i,a)=>n(r,e,t);let p=(e,t={})=>{let n={};return Object.keys(e).forEach(t=>n[t]=e[t]),Object.keys(t).forEach(e=>n[e]=t[e]),n};n.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return n;let t=n,r=(n,r,i)=>t(n,r,p(e,i));return r.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,p(e,n))}},r.Minimatch.defaults=n=>t.defaults(p(e,n)).Minimatch,r.filter=(n,r)=>t.filter(n,p(e,r)),r.defaults=n=>t.defaults(p(e,n)),r.makeRe=(n,r)=>t.makeRe(n,p(e,r)),r.braceExpand=(n,r)=>t.braceExpand(n,p(e,r)),r.match=(n,r,i)=>t.match(n,r,p(e,i)),r},n.braceExpand=(e,t)=>m(e,t);let m=(e,t={})=>(h(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:a(e)),h=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},g=Symbol(`subparse`);n.makeRe=(e,t)=>new S(e,t||{}).makeRe(),n.match=(e,t,n={})=>{let r=new S(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};let v=e=>e.replace(/\\(.)/g,`$1`),y=e=>e.replace(/\\([^-\]])/g,`$1`),b=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),x=e=>e.replace(/[[\]\\]/g,`\\$&`);var S=class{constructor(e,t){h(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion===void 0?200:t.maxGlobstarRecursion,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map(e=>e.split(f)),this.debug(this.pattern,n),n=n.map((e,t,n)=>e.map(this.parse,this)),this.debug(this.pattern,n),n=n.filter(e=>e.indexOf(!1)===-1),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r=0;e--)if(t[e]===i){s=e;break}let c=t.slice(a,o),l=n?t.slice(o+1):t.slice(o+1,s),u=n?[]:t.slice(s+1);if(c.length){let t=e.slice(r,r+c.length);if(!this._matchOne(t,c,n,0,0))return!1;r+=c.length}let d=0;if(u.length){if(u.length+r>e.length)return!1;let t=e.length-u.length;if(this._matchOne(e,u,n,t,0))d=u.length;else{if(e[e.length-1]!==``||r+u.length===e.length||!this._matchOne(e,u,n,t-1,0))return!1;d=u.length+1}}if(!l.length){let t=!!d;for(let n=r;nD?``:O?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,A=e=>e.charAt(0)===`.`?``:n.dot?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,j=()=>{if(m){switch(m){case`*`:r+=c,a=!0;break;case`?`:r+=s,a=!0;break;default:r+=`\\`+m;break}this.debug(`clearStateChar %j %j`,m,r),m=!1}};for(let t=0,i;t(n||=`\\`,t+t+n+`|`)),this.debug(`tail=%j - %s`,e,e,T,r);let t=T.type===`*`?c:T.type===`?`?s:`\\`+T.type;a=!0,r=r.slice(0,T.reStart)+t+`\\(`+e}j(),l&&(r+=`\\\\`);let M=d[r.charAt(0)];for(let e=p.length-1;e>-1;e--){let n=p[e],i=r.slice(0,n.reStart),a=r.slice(n.reStart,n.reEnd-8),o=r.slice(n.reEnd),s=r.slice(n.reEnd-8,n.reEnd)+o,c=i.split(`)`).length,l=i.split(`(`).length-c,u=o;for(let e=0;e(e=e.map(e=>typeof e==`string`?b(e):e===i?i:e._src).reduce((e,t)=>(e[e.length-1]===i&&t===i||e.push(t),e),[]),e.forEach((t,r)=>{t!==i||e[r-1]===i||(r===0?e.length>1?e[r+1]=`(?:\\/|`+n+`\\/)?`+e[r+1]:e[r]=n:r===e.length-1?e[r-1]+=`(?:\\/|`+n+`)?`:(e[r-1]+=`(?:\\/|\\/`+n+`\\/)`+e[r+1],e[r+1]=i))}),e.filter(e=>e!==i).join(`/`))).join(`|`);a=`^(?:`+a+`)$`,this.negate&&(a=`^(?!`+a+`).*$`);try{this.regexp=new RegExp(a,r)}catch{this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;r.sep!==`/`&&(e=e.split(r.sep).join(`/`)),e=e.split(f),this.debug(this.pattern,`split`,e);let i=this.set;this.debug(this.pattern,`set`,i);let a;for(let t=e.length-1;t>=0&&(a=e[t],!a);t--);for(let r=0;r{n.exports=p;let r=t(`fs`),{EventEmitter:i}=t(`events`),{Minimatch:a}=jj(),{resolve:o}=t(`path`);function s(e,t){return new Promise((n,i)=>{r.readdir(e,{withFileTypes:!0},(e,r)=>{if(e)switch(e.code){case`ENOTDIR`:t?i(e):n([]);break;case`ENOTSUP`:case`ENOENT`:case`ENAMETOOLONG`:case`UNKNOWN`:n([]);break;default:i(e);break}else n(r)})})}function c(e,t){return new Promise((n,i)=>{(t?r.stat:r.lstat)(e,(r,i)=>{if(r)switch(r.code){case`ENOENT`:n(t?c(e,!1):null);break;default:n(null);break}else n(i)})})}async function*l(e,t,n,r,i,a){let o=await s(t+e,a);for(let a of o){let o=a.name;o===void 0&&(o=a,r=!0);let s=e+`/`+o,u=s.slice(1),d=t+`/`+u,f=null;(r||n)&&(f=await c(d,n)),!f&&a.name!==void 0&&(f=a),f===null&&(f={isDirectory:()=>!1}),f.isDirectory()?i(u)||(yield{relative:u,absolute:d,stats:f},yield*l(s,t,n,r,i,!1)):yield{relative:u,absolute:d,stats:f}}}async function*u(e,t,n,r){yield*l(``,e,t,n,r,!0)}function d(e){return{pattern:e.pattern,dot:!!e.dot,noglobstar:!!e.noglobstar,matchBase:!!e.matchBase,nocase:!!e.nocase,ignore:e.ignore,skip:e.skip,follow:!!e.follow,stat:!!e.stat,nodir:!!e.nodir,mark:!!e.mark,silent:!!e.silent,absolute:!!e.absolute}}var f=class extends i{constructor(e,t,n){if(super(),typeof t==`function`&&(n=t,t=null),this.options=d(t||{}),this.matchers=[],this.options.pattern){let e=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=e.map(e=>new a(e,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let e=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=e.map(e=>new a(e,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let e=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=e.map(e=>new a(e,{dot:!0}))}this.iterator=u(o(e||`.`),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on(`match`,e=>this._matches.push(this.options.absolute?e.absolute:e.relative)),this.on(`error`,e=>n(e)),this.on(`end`,()=>n(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(t=>t.match(e))}_fileMatches(e,t){let n=e+(t?`/`:``);return(this.matchers.length===0||this.matchers.some(e=>e.match(n)))&&!this.ignoreMatchers.some(e=>e.match(n))&&(!this.options.nodir||!t)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit(`end`);else{let t=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,t)){let n=e.value.relative,r=e.value.absolute;this.options.mark&&t&&(n+=`/`,r+=`/`),this.options.stat?this.emit(`match`,{relative:n,absolute:r,stat:e.value.stats}):this.emit(`match`,{relative:n,absolute:r})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit(`error`,e),!e.code&&!this.options.silent&&console.error(e)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};function p(e,t,n){return new f(e,t,n)}p.ReaddirGlob=f})),Nj=i(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.async={}))})(e,(function(e){function t(e,...t){return(...n)=>e(...t,...n)}function n(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}var r=typeof queueMicrotask==`function`&&queueMicrotask,i=typeof setImmediate==`function`&&setImmediate,a=typeof process==`object`&&typeof process.nextTick==`function`;function o(e){setTimeout(e,0)}function s(e){return(t,...n)=>e(()=>t(...n))}var c=s(r?queueMicrotask:i?setImmediate:a?process.nextTick:o);function l(e){return f(e)?function(...t){let n=t.pop();return u(e.apply(this,t),n)}:n(function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&typeof r.then==`function`)return u(r,n);n(null,r)})}function u(e,t){return e.then(e=>{d(t,null,e)},e=>{d(t,e&&(e instanceof Error||e.message)?e:Error(e))})}function d(e,t,n){try{e(t,n)}catch(e){c(e=>{throw e},e)}}function f(e){return e[Symbol.toStringTag]===`AsyncFunction`}function p(e){return e[Symbol.toStringTag]===`AsyncGenerator`}function m(e){return typeof e[Symbol.asyncIterator]==`function`}function h(e){if(typeof e!=`function`)throw Error(`expected a function`);return f(e)?l(e):e}function g(e,t){if(t||=e.length,!t)throw Error(`arity is undefined`);function n(...n){return typeof n[t-1]==`function`?e.apply(this,n):new Promise((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)})}return n}function v(e){return function(t,...n){return g(function(r){var i=this;return e(t,(e,t)=>{h(e).apply(i,n.concat(t))},r)})}}function y(e,t,n,r){t||=[];var i=[],a=0,o=h(n);return e(t,(e,t,n)=>{var r=a++;o(e,(e,t)=>{i[r]=t,n(e)})},e=>{r(e,i)})}function b(e){return e&&typeof e.length==`number`&&e.length>=0&&e.length%1==0}let x={};function S(e){function t(...t){if(e!==null){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function C(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function w(e){var t=-1,n=e.length;return function(){return++t=t||o||i||(o=!0,e.next().then(({value:e,done:t})=>{if(!(a||i)){if(o=!1,t){i=!0,s<=0&&r(null);return}s++,n(e,c,u),c++,l()}}).catch(d))}function u(e,t){if(--s,!a){if(e)return d(e);if(e===!1){i=!0,a=!0;return}if(t===x||i&&s<=0)return i=!0,r(null);l()}}function d(e){a||(o=!1,i=!0,r(e))}l()}var A=e=>(t,n,r)=>{if(r=S(r),e<=0)throw RangeError(`concurrency limit cannot be less than 1`);if(!t)return r(null);if(p(t))return k(t,e,n,r);if(m(t))return k(t[Symbol.asyncIterator](),e,n,r);var i=D(t),a=!1,o=!1,s=0,c=!1;function l(e,t){if(!o)if(--s,e)a=!0,r(e);else if(e===!1)a=!0,o=!0;else if(t===x||a&&s<=0)return a=!0,r(null);else c||u()}function u(){for(c=!0;s1?r:r[0])}return n[re]=new Promise((n,r)=>{e=n,t=r}),n}function ie(e,t,n){typeof t!=`number`&&(n=t,t=null),n=S(n||H());var r=Object.keys(e).length;if(!r)return n(null);t||=r;var i={},a=0,o=!1,s=!1,c=Object.create(null),l=[],u=[],d={};Object.keys(e).forEach(t=>{var n=e[t];if(!Array.isArray(n)){f(t,[n]),u.push(t);return}var r=n.slice(0,n.length-1),i=r.length;if(i===0){f(t,n),u.push(t);return}d[t]=i,r.forEach(a=>{if(!e[a])throw Error("async.auto task `"+t+"` has a non-existent dependency `"+a+"` in "+r.join(`, `));m(a,()=>{i--,i===0&&f(t,n)})})}),y(),p();function f(e,t){l.push(()=>v(e,t))}function p(){if(!o){if(l.length===0&&a===0)return n(null,i);for(;l.length&&ae()),p()}function v(e,t){if(!s){var r=O((t,...r)=>{if(a--,t===!1){o=!0;return}if(r.length<2&&([r]=r),t){var l={};if(Object.keys(i).forEach(e=>{l[e]=i[e]}),l[e]=r,s=!0,c=Object.create(null),o)return;n(t,l)}else i[e]=r,g(e)});a++;var l=h(t[t.length-1]);t.length>1?l(i,r):l(r)}}function y(){for(var e,t=0;u.length;)e=u.pop(),t++,b(e).forEach(e=>{--d[e]===0&&u.push(e)});if(t!==r)throw Error(`async.auto cannot execute tasks due to a recursive dependency`)}function b(t){var n=[];return Object.keys(e).forEach(r=>{let i=e[r];Array.isArray(i)&&i.indexOf(t)>=0&&n.push(r)}),n}return n[re]}var ae=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,oe=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,se=/,/,ce=/(=.+)?(\s*)$/;function le(e){let t=``,n=0,r=e.indexOf(`*/`);for(;n{t.exports={name:`@actions/artifact`,version:`6.2.1`,preview:!0,description:`Actions artifact lib`,keywords:[`github`,`actions`,`artifact`],homepage:`https://github.com/actions/toolkit/tree/main/packages/artifact`,license:`MIT`,type:`module`,main:`lib/artifact.js`,types:`lib/artifact.d.ts`,exports:{".":{types:`./lib/artifact.d.ts`,import:`./lib/artifact.js`}},directories:{lib:`lib`,test:`__tests__`},files:[`lib`,`!.DS_Store`],publishConfig:{access:`public`},repository:{type:`git`,url:`git+https://github.com/actions/toolkit.git`,directory:`packages/artifact`},scripts:{"audit-moderate":`npm install && npm audit --json --audit-level=moderate > audit.json`,test:`cd ../../ && npm run test ./packages/artifact`,bootstrap:`cd ../../ && npm run bootstrap`,"tsc-run":`tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/`,tsc:`npm run bootstrap && npm run tsc-run`,"gen:docs":`typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none`},bugs:{url:`https://github.com/actions/toolkit/issues`},dependencies:{"@actions/core":`^3.0.0`,"@actions/github":`^9.0.0`,"@actions/http-client":`^4.0.0`,"@azure/storage-blob":`^12.30.0`,"@octokit/core":`^7.0.6`,"@octokit/plugin-request-log":`^6.0.0`,"@octokit/plugin-retry":`^8.0.0`,"@octokit/request":`^10.0.7`,"@octokit/request-error":`^7.1.0`,"@protobuf-ts/plugin":`^2.2.3-alpha.1`,"@protobuf-ts/runtime":`^2.9.4`,archiver:`^7.0.1`,"jwt-decode":`^4.0.0`,"unzip-stream":`^0.3.1`},devDependencies:{"@types/archiver":`^7.0.0`,"@types/unzip-stream":`^0.3.4`,typedoc:`^0.28.16`,"typedoc-plugin-markdown":`^4.9.0`,typescript:`^5.9.3`},overrides:{"uri-js":`npm:uri-js-replace@^1.0.1`,"node-fetch":`^3.3.2`}}})),PN=i(((e,t)=>{t.exports={version:NN().version}}))();function FN(){return`@actions/artifact-${PN.version}`}var IN=class extends Error{constructor(e=[]){let t=`No files were found to upload`;e.length>0&&(t+=`: ${e.join(`, `)}`),super(t),this.files=e,this.name=`FilesNotFoundError`}},LN=class extends Error{constructor(e){super(e),this.name=`InvalidResponseError`}},RN=class extends Error{constructor(e=`Artifact not found`){super(e),this.name=`ArtifactNotFoundError`}},zN=class extends Error{constructor(e=`@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES.`){super(e),this.name=`GHESNotSupportedError`}},BN=class extends Error{constructor(e){let t=`Unable to make request: ${e}\nIf 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(t),this.code=e,this.name=`NetworkError`}};BN.isNetworkErrorCode=e=>e?[`ECONNRESET`,`ENOTFOUND`,`ETIMEDOUT`,`ECONNREFUSED`,`EHOSTUNREACH`].includes(e):!1;var VN=class extends Error{constructor(){super(`Artifact storage quota has been hit. Unable to upload any new artifacts. +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`}};VN.isUsageErrorMessage=e=>e?e.includes(`insufficient usage`):!1;var HN=class extends Error{};HN.prototype.name=`InvalidTokenError`;function UN(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n=`0`+n),`%`+n}))}function WN(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);switch(t.length%4){case 0:break;case 2:t+=`==`;break;case 3:t+=`=`;break;default:throw Error(`base64 string is not of the correct length`)}try{return UN(t)}catch{return atob(t)}}function GN(e,t){if(typeof e!=`string`)throw new HN(`Invalid token specified: must be a string`);t||={};let n=t.header===!0?0:1,r=e.split(`.`)[n];if(typeof r!=`string`)throw new HN(`Invalid token specified: missing part #${n+1}`);let i;try{i=WN(r)}catch(e){throw new HN(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new HN(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}const KN=Error(`Failed to get backend IDs: The provided JWT token is invalid and/or missing claims`);function qN(){let e=GN(aN());if(!e.scp)throw KN;let t=e.scp.split(` `);if(t.length===0)throw KN;for(let e of t){let t=e.split(`:`);if(t?.[0]!==`Actions.Results`)continue;if(t.length!==3)throw KN;let n={workflowRunBackendId:t[1],workflowJobRunBackendId:t[2]};return K(`Workflow Run Backend ID: ${n.workflowRunBackendId}`),K(`Workflow Job Run Backend ID: ${n.workflowJobRunBackendId}`),n}throw KN}function JN(e){if(e)try{let t=new URL(e).searchParams.get(`sig`);t&&(ui(t),ui(encodeURIComponent(t)))}catch(t){K(`Failed to parse URL: ${e} ${t instanceof Error?t.message:String(t)}`)}}function YN(e){if(typeof e!=`object`||!e){K(`body is not an object or is null`);return}`signed_upload_url`in e&&typeof e.signed_upload_url==`string`&&JN(e.signed_upload_url),`signed_url`in e&&typeof e.signed_url==`string`&&JN(e.signed_url)}var XN=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},ZN=class{constructor(e,t,n,r){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let i=aN();this.baseUrl=oN(),t&&(this.maxAttempts=t),n&&(this.baseRetryIntervalMilliseconds=n),r&&(this.retryMultiplier=r),this.httpClient=new hr(e,[new vr(i)])}request(e,t,n,r){return XN(this,void 0,void 0,function*(){let i=new URL(`/twirp/${e}/${t}`,this.baseUrl).href;K(`[Request] ${t} ${i}`);let a={"Content-Type":n};try{let{body:e}=yield this.retryableRequest(()=>XN(this,void 0,void 0,function*(){return this.httpClient.post(i,JSON.stringify(r),a)}));return e}catch(e){throw Error(`Failed to ${t}: ${e.message}`)}})}retryableRequest(e){return XN(this,void 0,void 0,function*(){let t=0,n=``,r=``;for(;t=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[sr.BadGateway,sr.GatewayTimeout,sr.InternalServerError,sr.ServiceUnavailable,sr.TooManyRequests].includes(e):!1}sleep(e){return XN(this,void 0,void 0,function*(){return new Promise(t=>setTimeout(t,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw Error(`attempt should be a positive integer`);if(e===0)return this.baseRetryIntervalMilliseconds;let t=this.baseRetryIntervalMilliseconds*this.retryMultiplier**+e,n=t*this.retryMultiplier;return Math.trunc(Math.random()*(n-t)+t)}};function QN(e){return new EN(new ZN(FN(),e?.maxAttempts,e?.retryIntervalMs,e?.retryMultiplier))}function $N(e){if(!fe.existsSync(e))throw Error(`The provided rootDirectory ${e} does not exist`);if(!fe.statSync(e).isDirectory())throw Error(`The provided rootDirectory ${e} is not a valid directory`);vi(`Root directory input is valid!`)}function eP(e,t){let n=[];t=ve(t),t=ye(t);for(let r of e){let e=fe.lstatSync(r,{throwIfNoEntry:!1});if(!e)throw Error(`File ${r} does not exist`);if(e.isDirectory()){let i=r.replace(t,``);MN(i),n.push({sourcePath:null,destinationPath:i,stats:e})}else{if(r=ve(r),r=ye(r),!r.startsWith(t))throw Error(`The rootDirectory: ${t} is not a parent directory of the file: ${r}`);let i=r.replace(t,``);MN(i),n.push({sourcePath:r,destinationPath:i,stats:e})}}return n}var tP=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function nP(e,t,n){return tP(this,void 0,void 0,function*(){let r=0,i=Date.now(),a=new AbortController,o=e=>tP(this,void 0,void 0,function*(){return new Promise((t,n)=>{let r=setInterval(()=>{Date.now()-i>e&&n(Error(`Upload progress stalled.`))},e);a.signal.addEventListener(`abort`,()=>{clearInterval(r),t()})})}),s=lN(),c=iN(),l=new gA(e).getBlockBlobClient();K(`Uploading artifact to blob storage with maxConcurrency: ${s}, bufferSize: ${c}, contentType: ${n}`);let u={blobHTTPHeaders:{blobContentType:n},onProgress:e=>{vi(`Uploaded bytes ${e.loadedBytes}`),r=e.loadedBytes,i=Date.now()},abortSignal:a.signal},d,f=new Ye.PassThrough,p=de.createHash(`sha256`);t.pipe(f),t.pipe(p).setEncoding(`hex`),vi(`Beginning upload of artifact content to blob storage`);try{yield Promise.race([l.uploadStream(f,c,s,u),o(uN())])}catch(e){throw BN.isNetworkErrorCode(e?.code)?new BN(e?.code):e}finally{a.abort()}return vi(`Finished uploading artifact content to blob storage!`),p.end(),d=p.read(),vi(`SHA256 digest of uploaded artifact is ${d}`),r===0&&_i(`No data was uploaded to blob storage. Reported upload byte count is 0.`),{uploadSize:r,sha256Hash:d}})}var rP=i(((e,t)=>{t.exports=typeof process==`object`&&process&&process.platform===`win32`?{sep:`\\`}:{sep:`/`}})),iP=i(((e,t)=>{var n=Td();t.exports=f;var r=`\0SLASH`+Math.random()+`\0`,i=`\0OPEN`+Math.random()+`\0`,a=`\0CLOSE`+Math.random()+`\0`,o=`\0COMMA`+Math.random()+`\0`,s=`\0PERIOD`+Math.random()+`\0`;function c(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function l(e){return e.split(`\\\\`).join(r).split(`\\{`).join(i).split(`\\}`).join(a).split(`\\,`).join(o).split(`\\.`).join(s)}function u(e){return e.split(r).join(`\\`).split(i).join(`{`).split(a).join(`}`).split(o).join(`,`).split(s).join(`.`)}function d(e){if(!e)return[``];var t=[],r=n(`{`,`}`,e);if(!r)return e.split(`,`);var i=r.pre,a=r.body,o=r.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=d(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function f(e,t){if(!e)return[];t||={};var n=t.max==null?1/0:t.max;return e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),v(l(e),n,!0).map(u)}function p(e){return`{`+e+`}`}function m(e){return/^-?0\d/.test(e)}function h(e,t){return e<=t}function g(e,t){return e>=t}function v(e,t,r){var i=[],o=n(`{`,`}`,e);if(!o)return[e];var s=o.pre,l=o.post.length?v(o.post,t,!1):[``];if(/\$$/.test(o.pre))for(var u=0;u=0;if(!x&&!S)return o.post.match(/,(?!,).*\}/)?(e=o.pre+`{`+o.body+a+o.post,v(e,t,!0)):[e];var C;if(x)C=o.body.split(/\.\./);else if(C=d(o.body),C.length===1&&(C=v(C[0],t,!1).map(p),C.length===1))return l.map(function(e){return o.pre+C[0]+e});var w;if(x){var T=c(C[0]),E=c(C[1]),D=Math.max(C[0].length,C[1].length),O=C.length==3?Math.max(Math.abs(c(C[2])),1):1,k=h;E0){var P=Array(N+1).join(`0`);M=j<0?`-`+P+M.slice(1):P+M}}w.push(M)}}else{w=[];for(var F=0;F{let n=t.exports=(e,t,n={})=>(h(t),!n.nocomment&&t.charAt(0)===`#`?!1:new S(t,n).match(e));t.exports=n;let r=rP();n.sep=r.sep;let i=Symbol(`globstar **`);n.GLOBSTAR=i;let a=iP(),o={"!":{open:`(?:(?!(?:`,close:`))[^/]*?)`},"?":{open:`(?:`,close:`)?`},"+":{open:`(?:`,close:`)+`},"*":{open:`(?:`,close:`)*`},"@":{open:`(?:`,close:`)`}},s=`[^/]`,c=s+`*?`,l=e=>e.split(``).reduce((e,t)=>(e[t]=!0,e),{}),u=l(`().*{}+?[]^$\\!`),d=l(`[.(`),f=/\/+/;n.filter=(e,t={})=>(r,i,a)=>n(r,e,t);let p=(e,t={})=>{let n={};return Object.keys(e).forEach(t=>n[t]=e[t]),Object.keys(t).forEach(e=>n[e]=t[e]),n};n.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return n;let t=n,r=(n,r,i)=>t(n,r,p(e,i));return r.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,p(e,n))}},r.Minimatch.defaults=n=>t.defaults(p(e,n)).Minimatch,r.filter=(n,r)=>t.filter(n,p(e,r)),r.defaults=n=>t.defaults(p(e,n)),r.makeRe=(n,r)=>t.makeRe(n,p(e,r)),r.braceExpand=(n,r)=>t.braceExpand(n,p(e,r)),r.match=(n,r,i)=>t.match(n,r,p(e,i)),r},n.braceExpand=(e,t)=>m(e,t);let m=(e,t={})=>(h(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:a(e)),h=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},g=Symbol(`subparse`);n.makeRe=(e,t)=>new S(e,t||{}).makeRe(),n.match=(e,t,n={})=>{let r=new S(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};let v=e=>e.replace(/\\(.)/g,`$1`),y=e=>e.replace(/\\([^-\]])/g,`$1`),b=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),x=e=>e.replace(/[[\]\\]/g,`\\$&`);var S=class{constructor(e,t){h(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion===void 0?200:t.maxGlobstarRecursion,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map(e=>e.split(f)),this.debug(this.pattern,n),n=n.map((e,t,n)=>e.map(this.parse,this)),this.debug(this.pattern,n),n=n.filter(e=>e.indexOf(!1)===-1),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r=0;e--)if(t[e]===i){s=e;break}let c=t.slice(a,o),l=n?t.slice(o+1):t.slice(o+1,s),u=n?[]:t.slice(s+1);if(c.length){let t=e.slice(r,r+c.length);if(!this._matchOne(t,c,n,0,0))return!1;r+=c.length}let d=0;if(u.length){if(u.length+r>e.length)return!1;let t=e.length-u.length;if(this._matchOne(e,u,n,t,0))d=u.length;else{if(e[e.length-1]!==``||r+u.length===e.length||!this._matchOne(e,u,n,t-1,0))return!1;d=u.length+1}}if(!l.length){let t=!!d;for(let n=r;nD?``:O?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,A=e=>e.charAt(0)===`.`?``:n.dot?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,j=()=>{if(m){switch(m){case`*`:r+=c,a=!0;break;case`?`:r+=s,a=!0;break;default:r+=`\\`+m;break}this.debug(`clearStateChar %j %j`,m,r),m=!1}};for(let t=0,i;t(n||=`\\`,t+t+n+`|`)),this.debug(`tail=%j + %s`,e,e,T,r);let t=T.type===`*`?c:T.type===`?`?s:`\\`+T.type;a=!0,r=r.slice(0,T.reStart)+t+`\\(`+e}j(),l&&(r+=`\\\\`);let M=d[r.charAt(0)];for(let e=p.length-1;e>-1;e--){let n=p[e],i=r.slice(0,n.reStart),a=r.slice(n.reStart,n.reEnd-8),o=r.slice(n.reEnd),s=r.slice(n.reEnd-8,n.reEnd)+o,c=i.split(`)`).length,l=i.split(`(`).length-c,u=o;for(let e=0;e(e=e.map(e=>typeof e==`string`?b(e):e===i?i:e._src).reduce((e,t)=>(e[e.length-1]===i&&t===i||e.push(t),e),[]),e.forEach((t,r)=>{t!==i||e[r-1]===i||(r===0?e.length>1?e[r+1]=`(?:\\/|`+n+`\\/)?`+e[r+1]:e[r]=n:r===e.length-1?e[r-1]+=`(?:\\/|`+n+`)?`:(e[r-1]+=`(?:\\/|\\/`+n+`\\/)`+e[r+1],e[r+1]=i))}),e.filter(e=>e!==i).join(`/`))).join(`|`);a=`^(?:`+a+`)$`,this.negate&&(a=`^(?!`+a+`).*$`);try{this.regexp=new RegExp(a,r)}catch{this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;r.sep!==`/`&&(e=e.split(r.sep).join(`/`)),e=e.split(f),this.debug(this.pattern,`split`,e);let i=this.set;this.debug(this.pattern,`set`,i);let a;for(let t=e.length-1;t>=0&&(a=e[t],!a);t--);for(let r=0;r{n.exports=p;let r=t(`fs`),{EventEmitter:i}=t(`events`),{Minimatch:a}=aP(),{resolve:o}=t(`path`);function s(e,t){return new Promise((n,i)=>{r.readdir(e,{withFileTypes:!0},(e,r)=>{if(e)switch(e.code){case`ENOTDIR`:t?i(e):n([]);break;case`ENOTSUP`:case`ENOENT`:case`ENAMETOOLONG`:case`UNKNOWN`:n([]);break;default:i(e);break}else n(r)})})}function c(e,t){return new Promise((n,i)=>{(t?r.stat:r.lstat)(e,(r,i)=>{if(r)switch(r.code){case`ENOENT`:n(t?c(e,!1):null);break;default:n(null);break}else n(i)})})}async function*l(e,t,n,r,i,a){let o=await s(t+e,a);for(let a of o){let o=a.name;o===void 0&&(o=a,r=!0);let s=e+`/`+o,u=s.slice(1),d=t+`/`+u,f=null;(r||n)&&(f=await c(d,n)),!f&&a.name!==void 0&&(f=a),f===null&&(f={isDirectory:()=>!1}),f.isDirectory()?i(u)||(yield{relative:u,absolute:d,stats:f},yield*l(s,t,n,r,i,!1)):yield{relative:u,absolute:d,stats:f}}}async function*u(e,t,n,r){yield*l(``,e,t,n,r,!0)}function d(e){return{pattern:e.pattern,dot:!!e.dot,noglobstar:!!e.noglobstar,matchBase:!!e.matchBase,nocase:!!e.nocase,ignore:e.ignore,skip:e.skip,follow:!!e.follow,stat:!!e.stat,nodir:!!e.nodir,mark:!!e.mark,silent:!!e.silent,absolute:!!e.absolute}}var f=class extends i{constructor(e,t,n){if(super(),typeof t==`function`&&(n=t,t=null),this.options=d(t||{}),this.matchers=[],this.options.pattern){let e=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=e.map(e=>new a(e,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let e=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=e.map(e=>new a(e,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let e=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=e.map(e=>new a(e,{dot:!0}))}this.iterator=u(o(e||`.`),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on(`match`,e=>this._matches.push(this.options.absolute?e.absolute:e.relative)),this.on(`error`,e=>n(e)),this.on(`end`,()=>n(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(t=>t.match(e))}_fileMatches(e,t){let n=e+(t?`/`:``);return(this.matchers.length===0||this.matchers.some(e=>e.match(n)))&&!this.ignoreMatchers.some(e=>e.match(n))&&(!this.options.nodir||!t)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit(`end`);else{let t=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,t)){let n=e.value.relative,r=e.value.absolute;this.options.mark&&t&&(n+=`/`,r+=`/`),this.options.stat?this.emit(`match`,{relative:n,absolute:r,stat:e.value.stats}):this.emit(`match`,{relative:n,absolute:r})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit(`error`,e),!e.code&&!this.options.silent&&console.error(e)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};function p(e,t,n){return new f(e,t,n)}p.ReaddirGlob=f})),sP=i(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.async={}))})(e,(function(e){function t(e,...t){return(...n)=>e(...t,...n)}function n(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}var r=typeof queueMicrotask==`function`&&queueMicrotask,i=typeof setImmediate==`function`&&setImmediate,a=typeof process==`object`&&typeof process.nextTick==`function`;function o(e){setTimeout(e,0)}function s(e){return(t,...n)=>e(()=>t(...n))}var c=s(r?queueMicrotask:i?setImmediate:a?process.nextTick:o);function l(e){return f(e)?function(...t){let n=t.pop();return u(e.apply(this,t),n)}:n(function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&typeof r.then==`function`)return u(r,n);n(null,r)})}function u(e,t){return e.then(e=>{d(t,null,e)},e=>{d(t,e&&(e instanceof Error||e.message)?e:Error(e))})}function d(e,t,n){try{e(t,n)}catch(e){c(e=>{throw e},e)}}function f(e){return e[Symbol.toStringTag]===`AsyncFunction`}function p(e){return e[Symbol.toStringTag]===`AsyncGenerator`}function m(e){return typeof e[Symbol.asyncIterator]==`function`}function h(e){if(typeof e!=`function`)throw Error(`expected a function`);return f(e)?l(e):e}function g(e,t){if(t||=e.length,!t)throw Error(`arity is undefined`);function n(...n){return typeof n[t-1]==`function`?e.apply(this,n):new Promise((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)})}return n}function v(e){return function(t,...n){return g(function(r){var i=this;return e(t,(e,t)=>{h(e).apply(i,n.concat(t))},r)})}}function y(e,t,n,r){t||=[];var i=[],a=0,o=h(n);return e(t,(e,t,n)=>{var r=a++;o(e,(e,t)=>{i[r]=t,n(e)})},e=>{r(e,i)})}function b(e){return e&&typeof e.length==`number`&&e.length>=0&&e.length%1==0}let x={};function S(e){function t(...t){if(e!==null){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function C(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function w(e){var t=-1,n=e.length;return function(){return++t=t||o||i||(o=!0,e.next().then(({value:e,done:t})=>{if(!(a||i)){if(o=!1,t){i=!0,s<=0&&r(null);return}s++,n(e,c,u),c++,l()}}).catch(d))}function u(e,t){if(--s,!a){if(e)return d(e);if(e===!1){i=!0,a=!0;return}if(t===x||i&&s<=0)return i=!0,r(null);l()}}function d(e){a||(o=!1,i=!0,r(e))}l()}var A=e=>(t,n,r)=>{if(r=S(r),e<=0)throw RangeError(`concurrency limit cannot be less than 1`);if(!t)return r(null);if(p(t))return k(t,e,n,r);if(m(t))return k(t[Symbol.asyncIterator](),e,n,r);var i=D(t),a=!1,o=!1,s=0,c=!1;function l(e,t){if(!o)if(--s,e)a=!0,r(e);else if(e===!1)a=!0,o=!0;else if(t===x||a&&s<=0)return a=!0,r(null);else c||u()}function u(){for(c=!0;s1?r:r[0])}return n[re]=new Promise((n,r)=>{e=n,t=r}),n}function ie(e,t,n){typeof t!=`number`&&(n=t,t=null),n=S(n||H());var r=Object.keys(e).length;if(!r)return n(null);t||=r;var i={},a=0,o=!1,s=!1,c=Object.create(null),l=[],u=[],d={};Object.keys(e).forEach(t=>{var n=e[t];if(!Array.isArray(n)){f(t,[n]),u.push(t);return}var r=n.slice(0,n.length-1),i=r.length;if(i===0){f(t,n),u.push(t);return}d[t]=i,r.forEach(a=>{if(!e[a])throw Error("async.auto task `"+t+"` has a non-existent dependency `"+a+"` in "+r.join(`, `));m(a,()=>{i--,i===0&&f(t,n)})})}),y(),p();function f(e,t){l.push(()=>v(e,t))}function p(){if(!o){if(l.length===0&&a===0)return n(null,i);for(;l.length&&ae()),p()}function v(e,t){if(!s){var r=O((t,...r)=>{if(a--,t===!1){o=!0;return}if(r.length<2&&([r]=r),t){var l={};if(Object.keys(i).forEach(e=>{l[e]=i[e]}),l[e]=r,s=!0,c=Object.create(null),o)return;n(t,l)}else i[e]=r,g(e)});a++;var l=h(t[t.length-1]);t.length>1?l(i,r):l(r)}}function y(){for(var e,t=0;u.length;)e=u.pop(),t++,b(e).forEach(e=>{--d[e]===0&&u.push(e)});if(t!==r)throw Error(`async.auto cannot execute tasks due to a recursive dependency`)}function b(t){var n=[];return Object.keys(e).forEach(r=>{let i=e[r];Array.isArray(i)&&i.indexOf(t)>=0&&n.push(r)}),n}return n[re]}var ae=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,oe=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,se=/,/,ce=/(=.+)?(\s*)$/;function le(e){let t=``,n=0,r=e.indexOf(`*/`);for(;ne.replace(ce,``).trim())}function de(e,t){var n={};return Object.keys(e).forEach(t=>{var r=e[t],i,a=f(r),o=!a&&r.length===1||a&&r.length===0;if(Array.isArray(r))i=[...r],r=i.pop(),n[t]=i.concat(i.length>0?s:r);else if(o)n[t]=r;else{if(i=ue(r),r.length===0&&!a&&i.length===0)throw Error(`autoInject task functions require explicit parameters.`);a||i.pop(),n[t]=i.concat(s)}function s(e,t){var n=i.map(t=>e[t]);n.push(t),h(r)(...n)}}),ie(n,t)}class fe{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,--this.length,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):pe(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):pe(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}function pe(e,t){e.length=1,e.head=e.tail=t}function me(e,t,n){if(t==null)t=1;else if(t===0)throw RangeError(`Concurrency must not be zero`);var r=h(e),i=0,a=[];let o={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function s(e,t){o[e].push(t)}function l(e,t){let n=(...r)=>{u(e,n),t(...r)};o[e].push(n)}function u(e,t){if(!e)return Object.keys(o).forEach(e=>o[e]=[]);if(!t)return o[e]=[];o[e]=o[e].filter(e=>e!==t)}function d(e,...t){o[e].forEach(e=>e(...t))}var f=!1;function p(e,t,n,r){if(r!=null&&typeof r!=`function`)throw Error(`task callback must be a function`);b.started=!0;var i,a;function o(e,...t){if(e)return n?a(e):i();if(t.length<=1)return i(t[0]);i(t)}var s=b._createTaskItem(e,n?o:r||o);if(t?b._tasks.unshift(s):b._tasks.push(s),f||(f=!0,c(()=>{f=!1,b.process()})),n||!r)return new Promise((e,t)=>{i=e,a=t})}function m(e){return function(t,...n){--i;for(var r=0,o=e.length;r0&&a.splice(c,1),s.callback(t,...n),t!=null&&d(`error`,t,s.data)}i<=b.concurrency-b.buffer&&d(`unsaturated`),b.idle()&&d(`drain`),b.process()}}function g(e){return e.length===0&&b.idle()?(c(()=>d(`drain`)),!0):!1}let v=e=>t=>{if(!t)return new Promise((t,n)=>{l(e,(e,r)=>{if(e)return n(e);t(r)})});u(e),s(e,t)};var y=!1,b={_tasks:new fe,_createTaskItem(e,t){return{data:e,callback:t}},*[Symbol.iterator](){yield*b._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){return Array.isArray(e)?g(e)?void 0:e.map(e=>p(e,!1,!1,t)):p(e,!1,!1,t)},pushAsync(e,t){return Array.isArray(e)?g(e)?void 0:e.map(e=>p(e,!1,!0,t)):p(e,!1,!0,t)},kill(){u(),b._tasks.empty()},unshift(e,t){return Array.isArray(e)?g(e)?void 0:e.map(e=>p(e,!0,!1,t)):p(e,!0,!1,t)},unshiftAsync(e,t){return Array.isArray(e)?g(e)?void 0:e.map(e=>p(e,!0,!0,t)):p(e,!0,!0,t)},remove(e){b._tasks.remove(e)},process(){if(!y){for(y=!0;!b.paused&&i{i(t,e,(e,n)=>{t=n,r(e)})},e=>r(e,t))}var U=g(_e,4);function ve(...e){var t=e.map(h);return function(...e){var n=this,r=e[e.length-1];return typeof r==`function`?e.pop():r=H(),U(t,e,(e,t,r)=>{t.apply(n,e.concat((e,...t)=>{r(e,t)}))},(e,t)=>r(e,...t)),r[re]}}function ye(...e){return ve(...e.reverse())}function be(e,t,n,r){return y(A(t),e,n,r)}var xe=g(be,4);function Se(e,t,n,r){var i=h(n);return xe(e,t,(e,t)=>{i(e,(e,...n)=>e?t(e):t(e,n))},(e,t)=>{for(var n=[],i=0;i{var o=!1,s;let c=h(i);n(r,(n,r,i)=>{c(n,(r,a)=>{if(r||r===!1)return i(r);if(e(a)&&!s)return o=!0,s=t(!0,n),i(null,x);i()})},e=>{if(e)return a(e);a(null,o?s:t(!1))})}}function ke(e,t,n){return W(e=>e,(e,t)=>t)(I,e,t,n)}var Ae=g(ke,3);function je(e,t,n,r){return W(e=>e,(e,t)=>t)(A(t),e,n,r)}var Me=g(je,4);function Ne(e,t,n){return W(e=>e,(e,t)=>t)(A(1),e,t,n)}var Pe=g(Ne,3);function Fe(e){return(t,...n)=>h(t)(...n,(t,...n)=>{typeof console==`object`&&(t?console.error&&console.error(t):console[e]&&n.forEach(t=>console[e](t)))})}var Ie=Fe(`dir`);function Le(e,t,n){n=O(n);var r=h(e),i=h(t),a;function o(e,...t){if(e)return n(e);e!==!1&&(a=t,i(...t,s))}function s(e,t){if(e)return n(e);if(e!==!1){if(!t)return n(null,...a);r(o)}}return s(null,!0)}var Re=g(Le,3);function ze(e,t,n){let r=h(t);return Re(e,(...e)=>{let t=e.pop();r(...e,(e,n)=>t(e,!n))},n)}function Be(e){return(t,n,r)=>e(t,r)}function Ve(e,t,n){return I(e,Be(h(t)),n)}var He=g(Ve,3);function Ue(e,t,n,r){return A(t)(e,Be(h(n)),r)}var We=g(Ue,4);function Ge(e,t,n){return We(e,1,t,n)}var Ke=g(Ge,3);function qe(e){return f(e)?e:function(...t){var n=t.pop(),r=!0;t.push((...e)=>{r?c(()=>n(...e)):n(...e)}),e.apply(this,t),r=!1}}function Je(e,t,n){return W(e=>!e,e=>!e)(I,e,t,n)}var G=g(Je,3);function Ye(e,t,n,r){return W(e=>!e,e=>!e)(A(t),e,n,r)}var Xe=g(Ye,4);function Ze(e,t,n){return W(e=>!e,e=>!e)(B,e,t,n)}var Qe=g(Ze,3);function $e(e,t,n,r){var i=Array(t.length);e(t,(e,t,r)=>{n(e,(e,n)=>{i[t]=!!n,r(e)})},e=>{if(e)return r(e);for(var n=[],a=0;a{n(e,(n,a)=>{if(n)return r(n);a&&i.push({index:t,value:e}),r(n)})},e=>{if(e)return r(e);r(null,i.sort((e,t)=>e.index-t.index).map(e=>e.value))})}function tt(e,t,n,r){return(b(t)?$e:et)(e,t,h(n),r)}function nt(e,t,n){return tt(I,e,t,n)}var rt=g(nt,3);function it(e,t,n,r){return tt(A(t),e,n,r)}var at=g(it,4);function ot(e,t,n){return tt(B,e,t,n)}var st=g(ot,3);function ct(e,t){var n=O(t),r=h(qe(e));function i(e){if(e)return n(e);e!==!1&&r(i)}return i()}var lt=g(ct,2);function ut(e,t,n,r){var i=h(n);return xe(e,t,(e,t)=>{i(e,(n,r)=>n?t(n):t(n,{key:r,val:e}))},(e,t)=>{for(var n={},{hasOwnProperty:i}=Object.prototype,a=0;a{a(e,t,(e,r)=>{if(e)return n(e);i[t]=r,n(e)})},e=>r(e,i))}var gt=g(ht,4);function _t(e,t,n){return gt(e,1/0,t,n)}function vt(e,t,n){return gt(e,1,t,n)}function yt(e,t=e=>e){var r=Object.create(null),i=Object.create(null),a=h(e),o=n((e,n)=>{var o=t(...e);o in r?c(()=>n(null,...r[o])):o in i?i[o].push(n):(i[o]=[n],a(...e,(e,...t)=>{e||(r[o]=t);var n=i[o];delete i[o];for(var a=0,s=n.length;a{var r=b(t)?[]:{};e(t,(e,t,n)=>{h(e)((e,...i)=>{i.length<2&&([i]=i),r[t]=i,n(e)})},e=>n(e,r))},3);function St(e,t){return xt(I,e,t)}function Ct(e,t,n){return xt(A(t),e,n)}function wt(e,t){var n=h(e);return me((e,t)=>{n(e[0],t)},t,1)}class Tt{constructor(){this.heap=[],this.pushCount=-(2**53-1)}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&Ot(this.heap[e],this.heap[t=Dt(e)]);){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}percDown(e){let t;for(;(t=Et(e))=0;e--)this.percDown(e);return this}}function Et(e){return(e<<1)+1}function Dt(e){return(e+1>>1)-1}function Ot(e,t){return e.priority===t.priority?e.pushCount({data:e,priority:t,callback:n});function a(e,t){return Array.isArray(e)?e.map(e=>({data:e,priority:t})):{data:e,priority:t}}return n.push=function(e,t=0,n){return r(a(e,t),n)},n.pushAsync=function(e,t=0,n){return i(a(e,t),n)},delete n.unshift,delete n.unshiftAsync,n}function At(e,t){if(t=S(t),!Array.isArray(e))return t(TypeError(`First argument to race must be an array of functions`));if(!e.length)return t();for(var n=0,r=e.length;n{let r={};if(e&&(r.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),r.value=i}n(null,r)}),t.apply(this,e)})}function Pt(e){var t;return Array.isArray(e)?t=e.map(Nt):(t={},Object.keys(e).forEach(n=>{t[n]=Nt.call(this,e[n])})),t}function Ft(e,t,n,r){let i=h(n);return tt(e,t,(e,t)=>{i(e,(e,n)=>{t(e,!n)})},r)}function It(e,t,n){return Ft(I,e,t,n)}var Lt=g(It,3);function Rt(e,t,n,r){return Ft(A(t),e,n,r)}var zt=g(Rt,4);function Bt(e,t,n){return Ft(B,e,t,n)}var Vt=g(Bt,3);function Ht(e){return function(){return e}}function Ut(e,t,n){var r={times:5,intervalFunc:Ht(0)};if(arguments.length<3&&typeof e==`function`?(n=t||H(),t=e):(Wt(r,e),n||=H()),typeof t!=`function`)throw Error(`Invalid arguments for async.retry`);var i=h(t),a=1;function o(){i((e,...t)=>{e!==!1&&(e&&a++{(t.lengthe)(I,e,t,n)}var Jt=g(qt,3);function Yt(e,t,n,r){return W(Boolean,e=>e)(A(t),e,n,r)}var Xt=g(Yt,4);function Zt(e,t,n){return W(Boolean,e=>e)(B,e,t,n)}var Qt=g(Zt,3);function $t(e,t,n){var r=h(t);return R(e,(e,t)=>{r(e,(n,r)=>{if(n)return t(n);t(n,{value:e,criteria:r})})},(e,t)=>{if(e)return n(e);n(null,t.sort(i).map(e=>e.value))});function i(e,t){var n=e.criteria,r=t.criteria;return nr)}}var en=g($t,3);function tn(e,t,r){var i=h(e);return n((n,a)=>{var o=!1,s;function c(){var t=e.name||`anonymous`,n=Error(`Callback function "`+t+`" timed out.`);n.code=`ETIMEDOUT`,r&&(n.info=r),o=!0,a(n)}n.push((...e)=>{o||(a(...e),clearTimeout(s))}),s=setTimeout(c,t),i(...n)})}function nn(e){for(var t=Array(e);e--;)t[e]=e;return t}function rn(e,t,n,r){var i=h(n);return xe(nn(e),t,i,r)}function an(e,t,n){return rn(e,1/0,t,n)}function on(e,t,n){return rn(e,1,t,n)}function sn(e,t,n,r){arguments.length<=3&&typeof t==`function`&&(r=n,n=t,t=Array.isArray(e)?[]:{}),r=S(r||H());var i=h(n);return I(e,(e,n,r)=>{i(t,e,n,r)},e=>r(e,t)),r[re]}function cn(e,t){var n=null,r;return Ke(e,(e,t)=>{h(e)((e,...i)=>{if(e===!1)return t(e);i.length<2?[r]=i:r=i,n=e,t(e?null:{})})},()=>t(n,r))}var ln=g(cn);function un(e){return(...t)=>(e.unmemoized||e)(...t)}function dn(e,t,n){n=O(n);var r=h(t),i=h(e),a=[];function o(e,...t){if(e)return n(e);a=t,e!==!1&&i(s)}function s(e,t){if(e)return n(e);if(e!==!1){if(!t)return n(null,...a);r(o)}}return i(s)}var fn=g(dn,3);function pn(e,t,n){let r=h(e);return fn(e=>r((t,n)=>e(t,!n)),t,n)}function mn(e,t){if(t=S(t),!Array.isArray(e))return t(Error(`First argument to waterfall must be an array of functions`));if(!e.length)return t();var n=0;function r(t){h(e[n++])(...t,O(i))}function i(i,...a){if(i!==!1){if(i||n===e.length)return t(i,...a);r(a)}}r([])}var hn=g(mn),gn={apply:t,applyEach:z,applyEachSeries:ne,asyncify:l,auto:ie,autoInject:de,cargo:he,cargoQueue:ge,compose:ye,concat:Te,concatLimit:Ce,concatSeries:De,constant:Oe,detect:Ae,detectLimit:Me,detectSeries:Pe,dir:Ie,doUntil:ze,doWhilst:Re,each:He,eachLimit:We,eachOf:I,eachOfLimit:M,eachOfSeries:B,eachSeries:Ke,ensureAsync:qe,every:G,everyLimit:Xe,everySeries:Qe,filter:rt,filterLimit:at,filterSeries:st,forever:lt,groupBy:ft,groupByLimit:dt,groupBySeries:pt,log:mt,map:R,mapLimit:xe,mapSeries:V,mapValues:_t,mapValuesLimit:gt,mapValuesSeries:vt,memoize:yt,nextTick:bt,parallel:St,parallelLimit:Ct,priorityQueue:kt,queue:wt,race:jt,reduce:U,reduceRight:Mt,reflect:Nt,reflectAll:Pt,reject:Lt,rejectLimit:zt,rejectSeries:Vt,retry:Ut,retryable:Gt,seq:ve,series:Kt,setImmediate:c,some:Jt,someLimit:Xt,someSeries:Qt,sortBy:en,timeout:tn,times:an,timesLimit:rn,timesSeries:on,transform:sn,tryEach:ln,unmemoize:un,until:pn,waterfall:hn,whilst:fn,all:G,allLimit:Xe,allSeries:Qe,any:Jt,anyLimit:Xt,anySeries:Qt,find:Ae,findLimit:Me,findSeries:Pe,flatMap:Te,flatMapLimit:Ce,flatMapSeries:De,forEach:He,forEachSeries:Ke,forEachLimit:We,forEachOf:I,forEachOfSeries:B,forEachOfLimit:M,inject:U,foldl:U,foldr:Mt,select:rt,selectLimit:at,selectSeries:st,wrapSync:l,during:fn,doDuring:Re};e.all=G,e.allLimit=Xe,e.allSeries=Qe,e.any=Jt,e.anyLimit=Xt,e.anySeries=Qt,e.apply=t,e.applyEach=z,e.applyEachSeries=ne,e.asyncify=l,e.auto=ie,e.autoInject=de,e.cargo=he,e.cargoQueue=ge,e.compose=ye,e.concat=Te,e.concatLimit=Ce,e.concatSeries=De,e.constant=Oe,e.default=gn,e.detect=Ae,e.detectLimit=Me,e.detectSeries=Pe,e.dir=Ie,e.doDuring=Re,e.doUntil=ze,e.doWhilst=Re,e.during=fn,e.each=He,e.eachLimit=We,e.eachOf=I,e.eachOfLimit=M,e.eachOfSeries=B,e.eachSeries=Ke,e.ensureAsync=qe,e.every=G,e.everyLimit=Xe,e.everySeries=Qe,e.filter=rt,e.filterLimit=at,e.filterSeries=st,e.find=Ae,e.findLimit=Me,e.findSeries=Pe,e.flatMap=Te,e.flatMapLimit=Ce,e.flatMapSeries=De,e.foldl=U,e.foldr=Mt,e.forEach=He,e.forEachLimit=We,e.forEachOf=I,e.forEachOfLimit=M,e.forEachOfSeries=B,e.forEachSeries=Ke,e.forever=lt,e.groupBy=ft,e.groupByLimit=dt,e.groupBySeries=pt,e.inject=U,e.log=mt,e.map=R,e.mapLimit=xe,e.mapSeries=V,e.mapValues=_t,e.mapValuesLimit=gt,e.mapValuesSeries=vt,e.memoize=yt,e.nextTick=bt,e.parallel=St,e.parallelLimit=Ct,e.priorityQueue=kt,e.queue=wt,e.race=jt,e.reduce=U,e.reduceRight=Mt,e.reflect=Nt,e.reflectAll=Pt,e.reject=Lt,e.rejectLimit=zt,e.rejectSeries=Vt,e.retry=Ut,e.retryable=Gt,e.select=rt,e.selectLimit=at,e.selectSeries=st,e.seq=ve,e.series=Kt,e.setImmediate=c,e.some=Jt,e.someLimit=Xt,e.someSeries=Qt,e.sortBy=en,e.timeout=tn,e.times=an,e.timesLimit=rn,e.timesSeries=on,e.transform=sn,e.tryEach=ln,e.unmemoize=un,e.until=pn,e.waterfall=hn,e.whilst=fn,e.wrapSync=l,Object.defineProperty(e,`__esModule`,{value:!0})}))})),Pj=i(((e,n)=>{var r=t(`constants`),i=process.cwd,a=null,o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return a||=i.call(process),a};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var s=process.chdir;process.chdir=function(e){a=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}n.exports=c;function c(e){r.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||n(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),o===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`||c.code===`EBUSY`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,n,i){e.open(t,r.O_WRONLY|r.O_SYMLINK,n,function(t,r){if(t){i&&i(t);return}e.fchmod(r,n,function(t){e.close(r,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,n){var i=e.openSync(t,r.O_WRONLY|r.O_SYMLINK,n),a=!0,o;try{o=e.fchmodSync(i,n),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function n(e){r.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,n,i,a){e.open(t,r.O_SYMLINK,function(t,r){if(t){a&&a(t);return}e.futimes(r,n,i,function(t){e.close(r,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,n,i){var a=e.openSync(t,r.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,n,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function a(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}}})),Fj=i(((e,n)=>{var r=t(`stream`).Stream;n.exports=i;function i(e){return{ReadStream:t,WriteStream:n};function t(n,i){if(!(this instanceof t))return new t(n,i);r.call(this);var a=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=64*1024,i||={};for(var o=Object.keys(i),s=0,c=o.length;sthis.end)throw Error(`start must be <= end`);this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){a.emit(`error`,e),a.readable=!1;return}a.fd=t,a.emit(`open`,t),a._read()})}function n(t,i){if(!(this instanceof n))return new n(t,i);r.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o= zero`);this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}})),Ij=i(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),Lj=i(((e,n)=>{var r=t(`fs`),i=Pj(),a=Fj(),o=Ij(),s=t(`util`),c,l;typeof Symbol==`function`&&typeof Symbol.for==`function`?(c=Symbol.for(`graceful-fs.queue`),l=Symbol.for(`graceful-fs.previous`)):(c=`___graceful-fs.queue`,l=`___graceful-fs.previous`);function u(){}function d(e,t){Object.defineProperty(e,c,{get:function(){return t}})}var f=u;s.debuglog?f=s.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(f=function(){var e=s.format.apply(s,arguments);e=`GFS4: `+e.split(/\n/).join(` -GFS4: `),console.error(e)}),r[c]||(d(r,global[c]||[]),r.close=(function(e){function t(t,n){return e.call(r,t,function(e){e||g(),typeof n==`function`&&n.apply(this,arguments)})}return Object.defineProperty(t,l,{value:e}),t})(r.close),r.closeSync=(function(e){function t(t){e.apply(r,arguments),g()}return Object.defineProperty(t,l,{value:e}),t})(r.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){f(r[c]),t(`assert`).equal(r[c].length,0)})),global[c]||d(global,r[c]),n.exports=p(o(r)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!r.__patched&&(n.exports=p(r),r.__patched=!0);function p(e){i(e),e.gracefulify=p,e.createReadStream=E,e.createWriteStream=D;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?m([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var r=e.writeFile;e.writeFile=o;function o(e,t,n,i){return typeof n==`function`&&(i=n,n=null),a(e,t,n,i);function a(e,t,n,i,o){return r(e,t,n,function(r){r&&(r.code===`EMFILE`||r.code===`ENFILE`)?m([a,[e,t,n,i],r,o||Date.now(),Date.now()]):typeof i==`function`&&i.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=h;var f=/^v[0-5]\./;function h(e,t,n){typeof t==`function`&&(n=t,t=null);var r=f.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?m([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var g=a(e);S=g.ReadStream,w=g.WriteStream}var v=e.ReadStream;v&&(S.prototype=Object.create(v.prototype),S.prototype.open=C);var y=e.WriteStream;y&&(w.prototype=Object.create(y.prototype),w.prototype.open=T),Object.defineProperty(e,`ReadStream`,{get:function(){return S},set:function(e){S=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,`WriteStream`,{get:function(){return w},set:function(e){w=e},enumerable:!0,configurable:!0});var b=S;Object.defineProperty(e,`FileReadStream`,{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});var x=w;Object.defineProperty(e,`FileWriteStream`,{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0});function S(e,t){return this instanceof S?(v.apply(this,arguments),this):S.apply(Object.create(S.prototype),arguments)}function C(){var e=this;k(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function w(e,t){return this instanceof w?(y.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function T(){var e=this;k(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function E(t,n){return new e.ReadStream(t,n)}function D(t,n){return new e.WriteStream(t,n)}var O=e.open;e.open=k;function k(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return O(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function m(e){f(`ENQUEUE`,e[0].name,e[1]),r[c].push(e),v()}var h;function g(){for(var e=Date.now(),t=0;t2&&(r[c][t][3]=e,r[c][t][4]=e);v()}function v(){if(clearTimeout(h),h=void 0,r[c].length!==0){var e=r[c].shift(),t=e[0],n=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)f(`RETRY`,t.name,n),t.apply(null,n);else if(Date.now()-a>=6e4){f(`TIMEOUT`,t.name,n);var s=n.pop();typeof s==`function`&&s.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1);l>=Math.min(u*1.2,100)?(f(`RETRY`,t.name,n),t.apply(null,n.concat([a]))):r[c].push(e)}h===void 0&&(h=setTimeout(v,0))}}})),Rj=i(((e,t)=>{let n=e=>typeof e==`object`&&!!e&&typeof e.pipe==`function`;n.writable=e=>n(e)&&e.writable!==!1&&typeof e._write==`function`&&typeof e._writableState==`object`,n.readable=e=>n(e)&&e.readable!==!1&&typeof e._read==`function`&&typeof e._readableState==`object`,n.duplex=e=>n.writable(e)&&n.readable(e),n.transform=e=>n.duplex(e)&&typeof e._transform==`function`,t.exports=n})),zj=i(((e,t)=>{typeof process>`u`||!process.version||process.version.indexOf(`v0.`)===0||process.version.indexOf(`v1.`)===0&&process.version.indexOf(`v1.8.`)!==0?t.exports={nextTick:n}:t.exports=process;function n(e,t,n,r){if(typeof e!=`function`)throw TypeError(`"callback" argument must be a function`);var i=arguments.length,a,o;switch(i){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,n)});case 4:return process.nextTick(function(){e.call(null,t,n,r)});default:for(a=Array(i-1),o=0;o{var n={}.toString;t.exports=Array.isArray||function(e){return n.call(e)==`[object Array]`}})),Vj=i(((e,n)=>{n.exports=t(`stream`)})),Hj=i(((e,n)=>{var r=t(`buffer`),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?n.exports=r:(a(r,e),e.Buffer=o);function o(e,t,n){return i(e,t,n)}a(i,o),o.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return i(e,t,n)},o.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var r=i(e);return t===void 0?r.fill(0):typeof n==`string`?r.fill(t,n):r.fill(t),r},o.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return i(e)},o.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r.SlowBuffer(e)}})),Uj=i((e=>{function n(e){return Array.isArray?Array.isArray(e):g(e)===`[object Array]`}e.isArray=n;function r(e){return typeof e==`boolean`}e.isBoolean=r;function i(e){return e===null}e.isNull=i;function a(e){return e==null}e.isNullOrUndefined=a;function o(e){return typeof e==`number`}e.isNumber=o;function s(e){return typeof e==`string`}e.isString=s;function c(e){return typeof e==`symbol`}e.isSymbol=c;function l(e){return e===void 0}e.isUndefined=l;function u(e){return g(e)===`[object RegExp]`}e.isRegExp=u;function d(e){return typeof e==`object`&&!!e}e.isObject=d;function f(e){return g(e)===`[object Date]`}e.isDate=f;function p(e){return g(e)===`[object Error]`||e instanceof Error}e.isError=p;function m(e){return typeof e==`function`}e.isFunction=m;function h(e){return e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`||typeof e==`symbol`||e===void 0}e.isPrimitive=h,e.isBuffer=t(`buffer`).Buffer.isBuffer;function g(e){return Object.prototype.toString.call(e)}})),Wj=i(((e,t)=>{typeof Object.create==`function`?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),Gj=i(((e,n)=>{try{var r=t(`util`);if(typeof r.inherits!=`function`)throw``;n.exports=r.inherits}catch{n.exports=Wj()}})),Kj=i(((e,n)=>{function r(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var i=Hj().Buffer,a=t(`util`);function o(e,t,n){e.copy(t,n)}n.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(this.length===0)return``;for(var t=this.head,n=``+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(this.length===0)return i.alloc(0);for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)o(n.data,t,r),r+=n.data.length,n=n.next;return t},e}(),a&&a.inspect&&a.inspect.custom&&(n.exports.prototype[a.inspect.custom]=function(){var e=a.inspect({length:this.length});return this.constructor.name+` `+e})})),qj=i(((e,t)=>{var n=zj();function r(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(a,r,e)):n.nextTick(a,r,e):t&&t(e)}),this)}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function a(e,t){e.emit(`error`,t)}t.exports={destroy:r,undestroy:i}})),Jj=i(((e,n)=>{n.exports=t(`util`).deprecate})),Yj=i(((e,t)=>{var n=zj();t.exports=v;function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){F(t,e)}}var i=!process.browser&&[`v0.10`,`v0.9.`].indexOf(process.version.slice(0,5))>-1?setImmediate:n.nextTick,a;v.WritableState=h;var o=Object.create(Uj());o.inherits=Gj();var s={deprecate:Jj()},c=Vj(),l=Hj().Buffer,u=(typeof global<`u`?global:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function d(e){return l.from(e)}function f(e){return l.isBuffer(e)||e instanceof u}var p=qj();o.inherits(v,c);function m(){}function h(e,t){a||=Xj(),e||={};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:n&&(o||o===0)?this.highWaterMark=o:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=e.decodeStrings===!1;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){E(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}h.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},(function(){try{Object.defineProperty(h.prototype,`buffer`,{get:s.deprecate(function(){return this.getBuffer()},`_writableState.buffer is deprecated. Use _writableState.getBuffer instead.`,`DEP0003`)})}catch{}})();var g;typeof Symbol==`function`&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==`function`?(g=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return g.call(this,e)?!0:this===v?e&&e._writableState instanceof h:!1}})):g=function(e){return e instanceof this};function v(e){if(a||=Xj(),!g.call(v,this)&&!(this instanceof a))return new v(e);this._writableState=new h(e,this),this.writable=!0,e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final)),c.call(this)}v.prototype.pipe=function(){this.emit(`error`,Error(`Cannot pipe, not readable`))};function y(e,t){var r=Error(`write after end`);e.emit(`error`,r),n.nextTick(t,r)}function b(e,t,r,i){var a=!0,o=!1;return r===null?o=TypeError(`May not write null values to stream`):typeof r!=`string`&&r!==void 0&&!t.objectMode&&(o=TypeError(`Invalid non-string/buffer chunk`)),o&&(e.emit(`error`,o),n.nextTick(i,o),a=!1),a}v.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=!r.objectMode&&f(e);return a&&!l.isBuffer(e)&&(e=d(e)),typeof t==`function`&&(n=t,t=null),a?t=`buffer`:t||=r.defaultEncoding,typeof n!=`function`&&(n=m),r.ended?y(this,n):(a||b(this,r,e,n))&&(r.pendingcb++,i=S(this,r,a,e,t,n)),i},v.prototype.cork=function(){var e=this._writableState;e.corked++},v.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&k(this,e))},v.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=e.toLowerCase()),!([`hex`,`utf8`,`utf-8`,`ascii`,`binary`,`base64`,`ucs2`,`ucs-2`,`utf16le`,`utf-16le`,`raw`].indexOf((e+``).toLowerCase())>-1))throw TypeError(`Unknown encoding: `+e);return this._writableState.defaultEncoding=e,this};function x(e,t,n){return!e.objectMode&&e.decodeStrings!==!1&&typeof t==`string`&&(t=l.from(t,n)),t}Object.defineProperty(v.prototype,`writableHighWaterMark`,{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function S(e,t,n,r,i,a){if(!n){var o=x(t,r,i);r!==o&&(n=!0,i=`buffer`,r=o)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length{var n=zj(),r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=u;var i=Object.create(Uj());i.inherits=Gj();var a=Qj(),o=Yj();i.inherits(u,a);for(var s=r(o.prototype),c=0;c{var t=Hj().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:case`raw`:return!0;default:return!1}};function r(e){if(!e)return`utf8`;for(var t;;)switch(e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):``}})),Qj=i(((e,n)=>{var r=zj();n.exports=S;var i=Bj(),a;S.ReadableState=x,t(`events`).EventEmitter;var o=function(e,t){return e.listeners(t).length},s=Vj(),c=Hj().Buffer,l=(typeof global<`u`?global:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function u(e){return c.from(e)}function d(e){return c.isBuffer(e)||e instanceof l}var f=Object.create(Uj());f.inherits=Gj();var p=t(`util`),m=void 0;m=p&&p.debuglog?p.debuglog(`stream`):function(){};var h=Kj(),g=qj(),v;f.inherits(S,s);var y=[`error`,`close`,`destroy`,`pause`,`resume`];function b(e,t,n){if(typeof e.prependListener==`function`)return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):i(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}function x(e,t){a||=Xj(),e||={};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=e.readableHighWaterMark,o=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:n&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||`utf8`,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||=Zj().StringDecoder,this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(a||=Xj(),!(this instanceof S))return new S(e);this._readableState=new x(e,this),this.readable=!0,e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy)),s.call(this)}Object.defineProperty(S.prototype,`destroyed`,{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=g.destroy,S.prototype._undestroy=g.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:typeof e==`string`&&(t||=n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=``),r=!0),C(this,e,t,!1,r)},S.prototype.unshift=function(e){return C(this,e,null,!0,!1)};function C(e,t,n,r,i){var a=e._readableState;if(t===null)a.reading=!1,A(e,a);else{var o;i||(o=T(a,t)),o?e.emit(`error`,o):a.objectMode||t&&t.length>0?(typeof t!=`string`&&!a.objectMode&&Object.getPrototypeOf(t)!==c.prototype&&(t=u(t)),r?a.endEmitted?e.emit(`error`,Error(`stream.unshift() after end event`)):w(e,a,t,!0):a.ended?e.emit(`error`,Error(`stream.push() after EOF`)):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||t.length!==0?w(e,a,t,!1):N(e,a)):w(e,a,t,!1))):r||(a.reading=!1)}return E(a)}function w(e,t,n,r){t.flowing&&t.length===0&&!t.sync?(e.emit(`data`,n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&j(e)),N(e,t)}function T(e,t){var n;return!d(t)&&typeof t!=`string`&&t!==void 0&&!e.objectMode&&(n=TypeError(`Invalid non-string/buffer chunk`)),n}function E(e){return!e.ended&&(e.needReadable||e.length=D?e=D:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function k(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=O(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}S.prototype.read=function(e){m(`read`,e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return m(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?ne(this):j(this),null;if(e=k(e,t),e===0&&t.ended)return t.length===0&&ne(this),null;var r=t.needReadable;m(`need readable`,r),(t.length===0||t.length-e0?ee(e,t):null;return i===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&ne(this)),i!==null&&this.emit(`data`,i),i};function A(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,j(e)}}function j(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(m(`emitReadable`,t.flowing),t.emittedReadable=!0,t.sync?r.nextTick(M,e):M(e))}function M(e){m(`emit readable`),e.emit(`readable`),z(e)}function N(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(P,e,t))}function P(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length1&&H(i.pipes,e)!==-1)&&!u&&(m(`false write response, pause`,i.awaitDrain),i.awaitDrain++,f=!0),n.pause())}function h(t){m(`onerror`,t),y(),e.removeListener(`error`,h),o(e,`error`)===0&&e.emit(`error`,t)}b(e,`error`,h);function g(){e.removeListener(`finish`,v),y()}e.once(`close`,g);function v(){m(`onfinish`),e.removeListener(`close`,g),y()}e.once(`finish`,v);function y(){m(`unpipe`),n.unpipe(e)}return e.emit(`pipe`,n),i.flowing||(m(`pipe resume`),n.resume()),e};function F(e){return function(){var t=e._readableState;m(`pipeOnDrain`,t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&o(e,`data`)&&(t.flowing=!0,z(e))}}S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||=t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(`unpipe`,this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=B(e,t.buffer,t.decoder),n}function B(e,t,n){var r;return ea.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),e-=o,e===0){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function V(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,e===0){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function ne(e){var t=e._readableState;if(t.length>0)throw Error(`"endReadable()" called on non-empty stream`);t.endEmitted||(t.ended=!0,r.nextTick(re,t,e))}function re(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit(`end`))}function H(e,t){for(var n=0,r=e.length;n{t.exports=a;var n=Xj(),r=Object.create(Uj());r.inherits=Gj(),r.inherits(a,n);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit(`error`,Error(`write callback called multiple times`));n.writechunk=null,n.writecb=null,t!=null&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{t.exports=i;var n=$j(),r=Object.create(Uj());r.inherits=Gj(),r.inherits(i,n);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}i.prototype._transform=function(e,t,n){n(null,e)}})),tM=i(((e,n)=>{var r=t(`stream`);process.env.READABLE_STREAM===`disable`&&r?(n.exports=r,e=n.exports=r.Readable,e.Readable=r.Readable,e.Writable=r.Writable,e.Duplex=r.Duplex,e.Transform=r.Transform,e.PassThrough=r.PassThrough,e.Stream=r):(e=n.exports=Qj(),e.Stream=r||e,e.Readable=e,e.Writable=Yj(),e.Duplex=Xj(),e.Transform=$j(),e.PassThrough=eM())})),nM=i(((e,t)=>{t.exports=tM().PassThrough})),rM=i(((e,n)=>{var r=t(`util`),i=nM();n.exports={Readable:o,Writable:s},r.inherits(o,i),r.inherits(s,i);function a(e,t,n){e[t]=function(){return delete e[t],n.apply(this,arguments),this[t].apply(this,arguments)}}function o(e,t){if(!(this instanceof o))return new o(e,t);i.call(this,t),a(this,`_read`,function(){var n=e.call(this,t),r=this.emit.bind(this,`error`);n.on(`error`,r),n.pipe(this)}),this.emit(`readable`)}function s(e,t){if(!(this instanceof s))return new s(e,t);i.call(this,t),a(this,`_write`,function(){var n=e.call(this,t),r=this.emit.bind(this,`error`);n.on(`error`,r),this.pipe(n)}),this.emit(`writable`)}})),iM=i(((e,t)=>{ +`+t);let[,r]=n;return r.replace(/\s/g,``).split(se).map(e=>e.replace(ce,``).trim())}function de(e,t){var n={};return Object.keys(e).forEach(t=>{var r=e[t],i,a=f(r),o=!a&&r.length===1||a&&r.length===0;if(Array.isArray(r))i=[...r],r=i.pop(),n[t]=i.concat(i.length>0?s:r);else if(o)n[t]=r;else{if(i=ue(r),r.length===0&&!a&&i.length===0)throw Error(`autoInject task functions require explicit parameters.`);a||i.pop(),n[t]=i.concat(s)}function s(e,t){var n=i.map(t=>e[t]);n.push(t),h(r)(...n)}}),ie(n,t)}class fe{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,--this.length,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):pe(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):pe(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}function pe(e,t){e.length=1,e.head=e.tail=t}function me(e,t,n){if(t==null)t=1;else if(t===0)throw RangeError(`Concurrency must not be zero`);var r=h(e),i=0,a=[];let o={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function s(e,t){o[e].push(t)}function l(e,t){let n=(...r)=>{u(e,n),t(...r)};o[e].push(n)}function u(e,t){if(!e)return Object.keys(o).forEach(e=>o[e]=[]);if(!t)return o[e]=[];o[e]=o[e].filter(e=>e!==t)}function d(e,...t){o[e].forEach(e=>e(...t))}var f=!1;function p(e,t,n,r){if(r!=null&&typeof r!=`function`)throw Error(`task callback must be a function`);b.started=!0;var i,a;function o(e,...t){if(e)return n?a(e):i();if(t.length<=1)return i(t[0]);i(t)}var s=b._createTaskItem(e,n?o:r||o);if(t?b._tasks.unshift(s):b._tasks.push(s),f||(f=!0,c(()=>{f=!1,b.process()})),n||!r)return new Promise((e,t)=>{i=e,a=t})}function m(e){return function(t,...n){--i;for(var r=0,o=e.length;r0&&a.splice(c,1),s.callback(t,...n),t!=null&&d(`error`,t,s.data)}i<=b.concurrency-b.buffer&&d(`unsaturated`),b.idle()&&d(`drain`),b.process()}}function g(e){return e.length===0&&b.idle()?(c(()=>d(`drain`)),!0):!1}let v=e=>t=>{if(!t)return new Promise((t,n)=>{l(e,(e,r)=>{if(e)return n(e);t(r)})});u(e),s(e,t)};var y=!1,b={_tasks:new fe,_createTaskItem(e,t){return{data:e,callback:t}},*[Symbol.iterator](){yield*b._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){return Array.isArray(e)?g(e)?void 0:e.map(e=>p(e,!1,!1,t)):p(e,!1,!1,t)},pushAsync(e,t){return Array.isArray(e)?g(e)?void 0:e.map(e=>p(e,!1,!0,t)):p(e,!1,!0,t)},kill(){u(),b._tasks.empty()},unshift(e,t){return Array.isArray(e)?g(e)?void 0:e.map(e=>p(e,!0,!1,t)):p(e,!0,!1,t)},unshiftAsync(e,t){return Array.isArray(e)?g(e)?void 0:e.map(e=>p(e,!0,!0,t)):p(e,!0,!0,t)},remove(e){b._tasks.remove(e)},process(){if(!y){for(y=!0;!b.paused&&i{i(t,e,(e,n)=>{t=n,r(e)})},e=>r(e,t))}var U=g(_e,4);function ve(...e){var t=e.map(h);return function(...e){var n=this,r=e[e.length-1];return typeof r==`function`?e.pop():r=H(),U(t,e,(e,t,r)=>{t.apply(n,e.concat((e,...t)=>{r(e,t)}))},(e,t)=>r(e,...t)),r[re]}}function ye(...e){return ve(...e.reverse())}function be(e,t,n,r){return y(A(t),e,n,r)}var xe=g(be,4);function Se(e,t,n,r){var i=h(n);return xe(e,t,(e,t)=>{i(e,(e,...n)=>e?t(e):t(e,n))},(e,t)=>{for(var n=[],i=0;i{var o=!1,s;let c=h(i);n(r,(n,r,i)=>{c(n,(r,a)=>{if(r||r===!1)return i(r);if(e(a)&&!s)return o=!0,s=t(!0,n),i(null,x);i()})},e=>{if(e)return a(e);a(null,o?s:t(!1))})}}function ke(e,t,n){return W(e=>e,(e,t)=>t)(I,e,t,n)}var Ae=g(ke,3);function je(e,t,n,r){return W(e=>e,(e,t)=>t)(A(t),e,n,r)}var Me=g(je,4);function Ne(e,t,n){return W(e=>e,(e,t)=>t)(A(1),e,t,n)}var Pe=g(Ne,3);function Fe(e){return(t,...n)=>h(t)(...n,(t,...n)=>{typeof console==`object`&&(t?console.error&&console.error(t):console[e]&&n.forEach(t=>console[e](t)))})}var Ie=Fe(`dir`);function Le(e,t,n){n=O(n);var r=h(e),i=h(t),a;function o(e,...t){if(e)return n(e);e!==!1&&(a=t,i(...t,s))}function s(e,t){if(e)return n(e);if(e!==!1){if(!t)return n(null,...a);r(o)}}return s(null,!0)}var Re=g(Le,3);function ze(e,t,n){let r=h(t);return Re(e,(...e)=>{let t=e.pop();r(...e,(e,n)=>t(e,!n))},n)}function Be(e){return(t,n,r)=>e(t,r)}function Ve(e,t,n){return I(e,Be(h(t)),n)}var He=g(Ve,3);function Ue(e,t,n,r){return A(t)(e,Be(h(n)),r)}var We=g(Ue,4);function Ge(e,t,n){return We(e,1,t,n)}var Ke=g(Ge,3);function qe(e){return f(e)?e:function(...t){var n=t.pop(),r=!0;t.push((...e)=>{r?c(()=>n(...e)):n(...e)}),e.apply(this,t),r=!1}}function Je(e,t,n){return W(e=>!e,e=>!e)(I,e,t,n)}var G=g(Je,3);function Ye(e,t,n,r){return W(e=>!e,e=>!e)(A(t),e,n,r)}var Xe=g(Ye,4);function Ze(e,t,n){return W(e=>!e,e=>!e)(B,e,t,n)}var Qe=g(Ze,3);function $e(e,t,n,r){var i=Array(t.length);e(t,(e,t,r)=>{n(e,(e,n)=>{i[t]=!!n,r(e)})},e=>{if(e)return r(e);for(var n=[],a=0;a{n(e,(n,a)=>{if(n)return r(n);a&&i.push({index:t,value:e}),r(n)})},e=>{if(e)return r(e);r(null,i.sort((e,t)=>e.index-t.index).map(e=>e.value))})}function tt(e,t,n,r){return(b(t)?$e:et)(e,t,h(n),r)}function nt(e,t,n){return tt(I,e,t,n)}var rt=g(nt,3);function it(e,t,n,r){return tt(A(t),e,n,r)}var at=g(it,4);function ot(e,t,n){return tt(B,e,t,n)}var st=g(ot,3);function ct(e,t){var n=O(t),r=h(qe(e));function i(e){if(e)return n(e);e!==!1&&r(i)}return i()}var lt=g(ct,2);function ut(e,t,n,r){var i=h(n);return xe(e,t,(e,t)=>{i(e,(n,r)=>n?t(n):t(n,{key:r,val:e}))},(e,t)=>{for(var n={},{hasOwnProperty:i}=Object.prototype,a=0;a{a(e,t,(e,r)=>{if(e)return n(e);i[t]=r,n(e)})},e=>r(e,i))}var gt=g(ht,4);function _t(e,t,n){return gt(e,1/0,t,n)}function vt(e,t,n){return gt(e,1,t,n)}function yt(e,t=e=>e){var r=Object.create(null),i=Object.create(null),a=h(e),o=n((e,n)=>{var o=t(...e);o in r?c(()=>n(null,...r[o])):o in i?i[o].push(n):(i[o]=[n],a(...e,(e,...t)=>{e||(r[o]=t);var n=i[o];delete i[o];for(var a=0,s=n.length;a{var r=b(t)?[]:{};e(t,(e,t,n)=>{h(e)((e,...i)=>{i.length<2&&([i]=i),r[t]=i,n(e)})},e=>n(e,r))},3);function St(e,t){return xt(I,e,t)}function Ct(e,t,n){return xt(A(t),e,n)}function wt(e,t){var n=h(e);return me((e,t)=>{n(e[0],t)},t,1)}class Tt{constructor(){this.heap=[],this.pushCount=-(2**53-1)}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&Ot(this.heap[e],this.heap[t=Dt(e)]);){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}percDown(e){let t;for(;(t=Et(e))=0;e--)this.percDown(e);return this}}function Et(e){return(e<<1)+1}function Dt(e){return(e+1>>1)-1}function Ot(e,t){return e.priority===t.priority?e.pushCount({data:e,priority:t,callback:n});function a(e,t){return Array.isArray(e)?e.map(e=>({data:e,priority:t})):{data:e,priority:t}}return n.push=function(e,t=0,n){return r(a(e,t),n)},n.pushAsync=function(e,t=0,n){return i(a(e,t),n)},delete n.unshift,delete n.unshiftAsync,n}function At(e,t){if(t=S(t),!Array.isArray(e))return t(TypeError(`First argument to race must be an array of functions`));if(!e.length)return t();for(var n=0,r=e.length;n{let r={};if(e&&(r.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),r.value=i}n(null,r)}),t.apply(this,e)})}function Pt(e){var t;return Array.isArray(e)?t=e.map(Nt):(t={},Object.keys(e).forEach(n=>{t[n]=Nt.call(this,e[n])})),t}function Ft(e,t,n,r){let i=h(n);return tt(e,t,(e,t)=>{i(e,(e,n)=>{t(e,!n)})},r)}function It(e,t,n){return Ft(I,e,t,n)}var Lt=g(It,3);function Rt(e,t,n,r){return Ft(A(t),e,n,r)}var zt=g(Rt,4);function Bt(e,t,n){return Ft(B,e,t,n)}var Vt=g(Bt,3);function Ht(e){return function(){return e}}function Ut(e,t,n){var r={times:5,intervalFunc:Ht(0)};if(arguments.length<3&&typeof e==`function`?(n=t||H(),t=e):(Wt(r,e),n||=H()),typeof t!=`function`)throw Error(`Invalid arguments for async.retry`);var i=h(t),a=1;function o(){i((e,...t)=>{e!==!1&&(e&&a++{(t.lengthe)(I,e,t,n)}var Jt=g(qt,3);function Yt(e,t,n,r){return W(Boolean,e=>e)(A(t),e,n,r)}var Xt=g(Yt,4);function Zt(e,t,n){return W(Boolean,e=>e)(B,e,t,n)}var Qt=g(Zt,3);function $t(e,t,n){var r=h(t);return R(e,(e,t)=>{r(e,(n,r)=>{if(n)return t(n);t(n,{value:e,criteria:r})})},(e,t)=>{if(e)return n(e);n(null,t.sort(i).map(e=>e.value))});function i(e,t){var n=e.criteria,r=t.criteria;return nr)}}var en=g($t,3);function tn(e,t,r){var i=h(e);return n((n,a)=>{var o=!1,s;function c(){var t=e.name||`anonymous`,n=Error(`Callback function "`+t+`" timed out.`);n.code=`ETIMEDOUT`,r&&(n.info=r),o=!0,a(n)}n.push((...e)=>{o||(a(...e),clearTimeout(s))}),s=setTimeout(c,t),i(...n)})}function nn(e){for(var t=Array(e);e--;)t[e]=e;return t}function rn(e,t,n,r){var i=h(n);return xe(nn(e),t,i,r)}function an(e,t,n){return rn(e,1/0,t,n)}function on(e,t,n){return rn(e,1,t,n)}function sn(e,t,n,r){arguments.length<=3&&typeof t==`function`&&(r=n,n=t,t=Array.isArray(e)?[]:{}),r=S(r||H());var i=h(n);return I(e,(e,n,r)=>{i(t,e,n,r)},e=>r(e,t)),r[re]}function cn(e,t){var n=null,r;return Ke(e,(e,t)=>{h(e)((e,...i)=>{if(e===!1)return t(e);i.length<2?[r]=i:r=i,n=e,t(e?null:{})})},()=>t(n,r))}var ln=g(cn);function un(e){return(...t)=>(e.unmemoized||e)(...t)}function dn(e,t,n){n=O(n);var r=h(t),i=h(e),a=[];function o(e,...t){if(e)return n(e);a=t,e!==!1&&i(s)}function s(e,t){if(e)return n(e);if(e!==!1){if(!t)return n(null,...a);r(o)}}return i(s)}var fn=g(dn,3);function pn(e,t,n){let r=h(e);return fn(e=>r((t,n)=>e(t,!n)),t,n)}function mn(e,t){if(t=S(t),!Array.isArray(e))return t(Error(`First argument to waterfall must be an array of functions`));if(!e.length)return t();var n=0;function r(t){h(e[n++])(...t,O(i))}function i(i,...a){if(i!==!1){if(i||n===e.length)return t(i,...a);r(a)}}r([])}var hn=g(mn),gn={apply:t,applyEach:z,applyEachSeries:ne,asyncify:l,auto:ie,autoInject:de,cargo:he,cargoQueue:ge,compose:ye,concat:Te,concatLimit:Ce,concatSeries:De,constant:Oe,detect:Ae,detectLimit:Me,detectSeries:Pe,dir:Ie,doUntil:ze,doWhilst:Re,each:He,eachLimit:We,eachOf:I,eachOfLimit:M,eachOfSeries:B,eachSeries:Ke,ensureAsync:qe,every:G,everyLimit:Xe,everySeries:Qe,filter:rt,filterLimit:at,filterSeries:st,forever:lt,groupBy:ft,groupByLimit:dt,groupBySeries:pt,log:mt,map:R,mapLimit:xe,mapSeries:V,mapValues:_t,mapValuesLimit:gt,mapValuesSeries:vt,memoize:yt,nextTick:bt,parallel:St,parallelLimit:Ct,priorityQueue:kt,queue:wt,race:jt,reduce:U,reduceRight:Mt,reflect:Nt,reflectAll:Pt,reject:Lt,rejectLimit:zt,rejectSeries:Vt,retry:Ut,retryable:Gt,seq:ve,series:Kt,setImmediate:c,some:Jt,someLimit:Xt,someSeries:Qt,sortBy:en,timeout:tn,times:an,timesLimit:rn,timesSeries:on,transform:sn,tryEach:ln,unmemoize:un,until:pn,waterfall:hn,whilst:fn,all:G,allLimit:Xe,allSeries:Qe,any:Jt,anyLimit:Xt,anySeries:Qt,find:Ae,findLimit:Me,findSeries:Pe,flatMap:Te,flatMapLimit:Ce,flatMapSeries:De,forEach:He,forEachSeries:Ke,forEachLimit:We,forEachOf:I,forEachOfSeries:B,forEachOfLimit:M,inject:U,foldl:U,foldr:Mt,select:rt,selectLimit:at,selectSeries:st,wrapSync:l,during:fn,doDuring:Re};e.all=G,e.allLimit=Xe,e.allSeries=Qe,e.any=Jt,e.anyLimit=Xt,e.anySeries=Qt,e.apply=t,e.applyEach=z,e.applyEachSeries=ne,e.asyncify=l,e.auto=ie,e.autoInject=de,e.cargo=he,e.cargoQueue=ge,e.compose=ye,e.concat=Te,e.concatLimit=Ce,e.concatSeries=De,e.constant=Oe,e.default=gn,e.detect=Ae,e.detectLimit=Me,e.detectSeries=Pe,e.dir=Ie,e.doDuring=Re,e.doUntil=ze,e.doWhilst=Re,e.during=fn,e.each=He,e.eachLimit=We,e.eachOf=I,e.eachOfLimit=M,e.eachOfSeries=B,e.eachSeries=Ke,e.ensureAsync=qe,e.every=G,e.everyLimit=Xe,e.everySeries=Qe,e.filter=rt,e.filterLimit=at,e.filterSeries=st,e.find=Ae,e.findLimit=Me,e.findSeries=Pe,e.flatMap=Te,e.flatMapLimit=Ce,e.flatMapSeries=De,e.foldl=U,e.foldr=Mt,e.forEach=He,e.forEachLimit=We,e.forEachOf=I,e.forEachOfLimit=M,e.forEachOfSeries=B,e.forEachSeries=Ke,e.forever=lt,e.groupBy=ft,e.groupByLimit=dt,e.groupBySeries=pt,e.inject=U,e.log=mt,e.map=R,e.mapLimit=xe,e.mapSeries=V,e.mapValues=_t,e.mapValuesLimit=gt,e.mapValuesSeries=vt,e.memoize=yt,e.nextTick=bt,e.parallel=St,e.parallelLimit=Ct,e.priorityQueue=kt,e.queue=wt,e.race=jt,e.reduce=U,e.reduceRight=Mt,e.reflect=Nt,e.reflectAll=Pt,e.reject=Lt,e.rejectLimit=zt,e.rejectSeries=Vt,e.retry=Ut,e.retryable=Gt,e.select=rt,e.selectLimit=at,e.selectSeries=st,e.seq=ve,e.series=Kt,e.setImmediate=c,e.some=Jt,e.someLimit=Xt,e.someSeries=Qt,e.sortBy=en,e.timeout=tn,e.times=an,e.timesLimit=rn,e.timesSeries=on,e.transform=sn,e.tryEach=ln,e.unmemoize=un,e.until=pn,e.waterfall=hn,e.whilst=fn,e.wrapSync=l,Object.defineProperty(e,`__esModule`,{value:!0})}))})),cP=i(((e,n)=>{var r=t(`constants`),i=process.cwd,a=null,o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return a||=i.call(process),a};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var s=process.chdir;process.chdir=function(e){a=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}n.exports=c;function c(e){r.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||n(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),o===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`||c.code===`EBUSY`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,n,i){e.open(t,r.O_WRONLY|r.O_SYMLINK,n,function(t,r){if(t){i&&i(t);return}e.fchmod(r,n,function(t){e.close(r,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,n){var i=e.openSync(t,r.O_WRONLY|r.O_SYMLINK,n),a=!0,o;try{o=e.fchmodSync(i,n),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function n(e){r.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,n,i,a){e.open(t,r.O_SYMLINK,function(t,r){if(t){a&&a(t);return}e.futimes(r,n,i,function(t){e.close(r,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,n,i){var a=e.openSync(t,r.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,n,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function a(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}}})),lP=i(((e,n)=>{var r=t(`stream`).Stream;n.exports=i;function i(e){return{ReadStream:t,WriteStream:n};function t(n,i){if(!(this instanceof t))return new t(n,i);r.call(this);var a=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=64*1024,i||={};for(var o=Object.keys(i),s=0,c=o.length;sthis.end)throw Error(`start must be <= end`);this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){a.emit(`error`,e),a.readable=!1;return}a.fd=t,a.emit(`open`,t),a._read()})}function n(t,i){if(!(this instanceof n))return new n(t,i);r.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o= zero`);this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}})),uP=i(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),dP=i(((e,n)=>{var r=t(`fs`),i=cP(),a=lP(),o=uP(),s=t(`util`),c,l;typeof Symbol==`function`&&typeof Symbol.for==`function`?(c=Symbol.for(`graceful-fs.queue`),l=Symbol.for(`graceful-fs.previous`)):(c=`___graceful-fs.queue`,l=`___graceful-fs.previous`);function u(){}function d(e,t){Object.defineProperty(e,c,{get:function(){return t}})}var f=u;s.debuglog?f=s.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(f=function(){var e=s.format.apply(s,arguments);e=`GFS4: `+e.split(/\n/).join(` +GFS4: `),console.error(e)}),r[c]||(d(r,global[c]||[]),r.close=(function(e){function t(t,n){return e.call(r,t,function(e){e||g(),typeof n==`function`&&n.apply(this,arguments)})}return Object.defineProperty(t,l,{value:e}),t})(r.close),r.closeSync=(function(e){function t(t){e.apply(r,arguments),g()}return Object.defineProperty(t,l,{value:e}),t})(r.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){f(r[c]),t(`assert`).equal(r[c].length,0)})),global[c]||d(global,r[c]),n.exports=p(o(r)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!r.__patched&&(n.exports=p(r),r.__patched=!0);function p(e){i(e),e.gracefulify=p,e.createReadStream=E,e.createWriteStream=D;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?m([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var r=e.writeFile;e.writeFile=o;function o(e,t,n,i){return typeof n==`function`&&(i=n,n=null),a(e,t,n,i);function a(e,t,n,i,o){return r(e,t,n,function(r){r&&(r.code===`EMFILE`||r.code===`ENFILE`)?m([a,[e,t,n,i],r,o||Date.now(),Date.now()]):typeof i==`function`&&i.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=h;var f=/^v[0-5]\./;function h(e,t,n){typeof t==`function`&&(n=t,t=null);var r=f.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?m([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var g=a(e);S=g.ReadStream,w=g.WriteStream}var v=e.ReadStream;v&&(S.prototype=Object.create(v.prototype),S.prototype.open=C);var y=e.WriteStream;y&&(w.prototype=Object.create(y.prototype),w.prototype.open=T),Object.defineProperty(e,`ReadStream`,{get:function(){return S},set:function(e){S=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,`WriteStream`,{get:function(){return w},set:function(e){w=e},enumerable:!0,configurable:!0});var b=S;Object.defineProperty(e,`FileReadStream`,{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});var x=w;Object.defineProperty(e,`FileWriteStream`,{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0});function S(e,t){return this instanceof S?(v.apply(this,arguments),this):S.apply(Object.create(S.prototype),arguments)}function C(){var e=this;k(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function w(e,t){return this instanceof w?(y.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function T(){var e=this;k(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function E(t,n){return new e.ReadStream(t,n)}function D(t,n){return new e.WriteStream(t,n)}var O=e.open;e.open=k;function k(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return O(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function m(e){f(`ENQUEUE`,e[0].name,e[1]),r[c].push(e),v()}var h;function g(){for(var e=Date.now(),t=0;t2&&(r[c][t][3]=e,r[c][t][4]=e);v()}function v(){if(clearTimeout(h),h=void 0,r[c].length!==0){var e=r[c].shift(),t=e[0],n=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)f(`RETRY`,t.name,n),t.apply(null,n);else if(Date.now()-a>=6e4){f(`TIMEOUT`,t.name,n);var s=n.pop();typeof s==`function`&&s.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1);l>=Math.min(u*1.2,100)?(f(`RETRY`,t.name,n),t.apply(null,n.concat([a]))):r[c].push(e)}h===void 0&&(h=setTimeout(v,0))}}})),fP=i(((e,t)=>{let n=e=>typeof e==`object`&&!!e&&typeof e.pipe==`function`;n.writable=e=>n(e)&&e.writable!==!1&&typeof e._write==`function`&&typeof e._writableState==`object`,n.readable=e=>n(e)&&e.readable!==!1&&typeof e._read==`function`&&typeof e._readableState==`object`,n.duplex=e=>n.writable(e)&&n.readable(e),n.transform=e=>n.duplex(e)&&typeof e._transform==`function`,t.exports=n})),pP=i(((e,t)=>{typeof process>`u`||!process.version||process.version.indexOf(`v0.`)===0||process.version.indexOf(`v1.`)===0&&process.version.indexOf(`v1.8.`)!==0?t.exports={nextTick:n}:t.exports=process;function n(e,t,n,r){if(typeof e!=`function`)throw TypeError(`"callback" argument must be a function`);var i=arguments.length,a,o;switch(i){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,n)});case 4:return process.nextTick(function(){e.call(null,t,n,r)});default:for(a=Array(i-1),o=0;o{var n={}.toString;t.exports=Array.isArray||function(e){return n.call(e)==`[object Array]`}})),hP=i(((e,n)=>{n.exports=t(`stream`)})),gP=i(((e,n)=>{var r=t(`buffer`),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?n.exports=r:(a(r,e),e.Buffer=o);function o(e,t,n){return i(e,t,n)}a(i,o),o.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return i(e,t,n)},o.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var r=i(e);return t===void 0?r.fill(0):typeof n==`string`?r.fill(t,n):r.fill(t),r},o.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return i(e)},o.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r.SlowBuffer(e)}})),_P=i((e=>{function n(e){return Array.isArray?Array.isArray(e):g(e)===`[object Array]`}e.isArray=n;function r(e){return typeof e==`boolean`}e.isBoolean=r;function i(e){return e===null}e.isNull=i;function a(e){return e==null}e.isNullOrUndefined=a;function o(e){return typeof e==`number`}e.isNumber=o;function s(e){return typeof e==`string`}e.isString=s;function c(e){return typeof e==`symbol`}e.isSymbol=c;function l(e){return e===void 0}e.isUndefined=l;function u(e){return g(e)===`[object RegExp]`}e.isRegExp=u;function d(e){return typeof e==`object`&&!!e}e.isObject=d;function f(e){return g(e)===`[object Date]`}e.isDate=f;function p(e){return g(e)===`[object Error]`||e instanceof Error}e.isError=p;function m(e){return typeof e==`function`}e.isFunction=m;function h(e){return e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`||typeof e==`symbol`||e===void 0}e.isPrimitive=h,e.isBuffer=t(`buffer`).Buffer.isBuffer;function g(e){return Object.prototype.toString.call(e)}})),vP=i(((e,t)=>{typeof Object.create==`function`?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),yP=i(((e,n)=>{try{var r=t(`util`);if(typeof r.inherits!=`function`)throw``;n.exports=r.inherits}catch{n.exports=vP()}})),bP=i(((e,n)=>{function r(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var i=gP().Buffer,a=t(`util`);function o(e,t,n){e.copy(t,n)}n.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(this.length===0)return``;for(var t=this.head,n=``+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(this.length===0)return i.alloc(0);for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)o(n.data,t,r),r+=n.data.length,n=n.next;return t},e}(),a&&a.inspect&&a.inspect.custom&&(n.exports.prototype[a.inspect.custom]=function(){var e=a.inspect({length:this.length});return this.constructor.name+` `+e})})),xP=i(((e,t)=>{var n=pP();function r(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(a,r,e)):n.nextTick(a,r,e):t&&t(e)}),this)}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function a(e,t){e.emit(`error`,t)}t.exports={destroy:r,undestroy:i}})),SP=i(((e,n)=>{n.exports=t(`util`).deprecate})),CP=i(((e,t)=>{var n=pP();t.exports=v;function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){F(t,e)}}var i=!process.browser&&[`v0.10`,`v0.9.`].indexOf(process.version.slice(0,5))>-1?setImmediate:n.nextTick,a;v.WritableState=h;var o=Object.create(_P());o.inherits=yP();var s={deprecate:SP()},c=hP(),l=gP().Buffer,u=(typeof global<`u`?global:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function d(e){return l.from(e)}function f(e){return l.isBuffer(e)||e instanceof u}var p=xP();o.inherits(v,c);function m(){}function h(e,t){a||=wP(),e||={};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:n&&(o||o===0)?this.highWaterMark=o:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=e.decodeStrings===!1;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){E(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}h.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},(function(){try{Object.defineProperty(h.prototype,`buffer`,{get:s.deprecate(function(){return this.getBuffer()},`_writableState.buffer is deprecated. Use _writableState.getBuffer instead.`,`DEP0003`)})}catch{}})();var g;typeof Symbol==`function`&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==`function`?(g=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return g.call(this,e)?!0:this===v?e&&e._writableState instanceof h:!1}})):g=function(e){return e instanceof this};function v(e){if(a||=wP(),!g.call(v,this)&&!(this instanceof a))return new v(e);this._writableState=new h(e,this),this.writable=!0,e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final)),c.call(this)}v.prototype.pipe=function(){this.emit(`error`,Error(`Cannot pipe, not readable`))};function y(e,t){var r=Error(`write after end`);e.emit(`error`,r),n.nextTick(t,r)}function b(e,t,r,i){var a=!0,o=!1;return r===null?o=TypeError(`May not write null values to stream`):typeof r!=`string`&&r!==void 0&&!t.objectMode&&(o=TypeError(`Invalid non-string/buffer chunk`)),o&&(e.emit(`error`,o),n.nextTick(i,o),a=!1),a}v.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=!r.objectMode&&f(e);return a&&!l.isBuffer(e)&&(e=d(e)),typeof t==`function`&&(n=t,t=null),a?t=`buffer`:t||=r.defaultEncoding,typeof n!=`function`&&(n=m),r.ended?y(this,n):(a||b(this,r,e,n))&&(r.pendingcb++,i=S(this,r,a,e,t,n)),i},v.prototype.cork=function(){var e=this._writableState;e.corked++},v.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&k(this,e))},v.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=e.toLowerCase()),!([`hex`,`utf8`,`utf-8`,`ascii`,`binary`,`base64`,`ucs2`,`ucs-2`,`utf16le`,`utf-16le`,`raw`].indexOf((e+``).toLowerCase())>-1))throw TypeError(`Unknown encoding: `+e);return this._writableState.defaultEncoding=e,this};function x(e,t,n){return!e.objectMode&&e.decodeStrings!==!1&&typeof t==`string`&&(t=l.from(t,n)),t}Object.defineProperty(v.prototype,`writableHighWaterMark`,{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function S(e,t,n,r,i,a){if(!n){var o=x(t,r,i);r!==o&&(n=!0,i=`buffer`,r=o)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length{var n=pP(),r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=u;var i=Object.create(_P());i.inherits=yP();var a=EP(),o=CP();i.inherits(u,a);for(var s=r(o.prototype),c=0;c{var t=gP().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:case`raw`:return!0;default:return!1}};function r(e){if(!e)return`utf8`;for(var t;;)switch(e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):``}})),EP=i(((e,n)=>{var r=pP();n.exports=S;var i=mP(),a;S.ReadableState=x,t(`events`).EventEmitter;var o=function(e,t){return e.listeners(t).length},s=hP(),c=gP().Buffer,l=(typeof global<`u`?global:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function u(e){return c.from(e)}function d(e){return c.isBuffer(e)||e instanceof l}var f=Object.create(_P());f.inherits=yP();var p=t(`util`),m=void 0;m=p&&p.debuglog?p.debuglog(`stream`):function(){};var h=bP(),g=xP(),v;f.inherits(S,s);var y=[`error`,`close`,`destroy`,`pause`,`resume`];function b(e,t,n){if(typeof e.prependListener==`function`)return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):i(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}function x(e,t){a||=wP(),e||={};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=e.readableHighWaterMark,o=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:n&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||`utf8`,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||=TP().StringDecoder,this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(a||=wP(),!(this instanceof S))return new S(e);this._readableState=new x(e,this),this.readable=!0,e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy)),s.call(this)}Object.defineProperty(S.prototype,`destroyed`,{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=g.destroy,S.prototype._undestroy=g.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:typeof e==`string`&&(t||=n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=``),r=!0),C(this,e,t,!1,r)},S.prototype.unshift=function(e){return C(this,e,null,!0,!1)};function C(e,t,n,r,i){var a=e._readableState;if(t===null)a.reading=!1,A(e,a);else{var o;i||(o=T(a,t)),o?e.emit(`error`,o):a.objectMode||t&&t.length>0?(typeof t!=`string`&&!a.objectMode&&Object.getPrototypeOf(t)!==c.prototype&&(t=u(t)),r?a.endEmitted?e.emit(`error`,Error(`stream.unshift() after end event`)):w(e,a,t,!0):a.ended?e.emit(`error`,Error(`stream.push() after EOF`)):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||t.length!==0?w(e,a,t,!1):N(e,a)):w(e,a,t,!1))):r||(a.reading=!1)}return E(a)}function w(e,t,n,r){t.flowing&&t.length===0&&!t.sync?(e.emit(`data`,n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&j(e)),N(e,t)}function T(e,t){var n;return!d(t)&&typeof t!=`string`&&t!==void 0&&!e.objectMode&&(n=TypeError(`Invalid non-string/buffer chunk`)),n}function E(e){return!e.ended&&(e.needReadable||e.length=D?e=D:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function k(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=O(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}S.prototype.read=function(e){m(`read`,e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return m(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?ne(this):j(this),null;if(e=k(e,t),e===0&&t.ended)return t.length===0&&ne(this),null;var r=t.needReadable;m(`need readable`,r),(t.length===0||t.length-e0?ee(e,t):null;return i===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&ne(this)),i!==null&&this.emit(`data`,i),i};function A(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,j(e)}}function j(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(m(`emitReadable`,t.flowing),t.emittedReadable=!0,t.sync?r.nextTick(M,e):M(e))}function M(e){m(`emit readable`),e.emit(`readable`),z(e)}function N(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(P,e,t))}function P(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length1&&H(i.pipes,e)!==-1)&&!u&&(m(`false write response, pause`,i.awaitDrain),i.awaitDrain++,f=!0),n.pause())}function h(t){m(`onerror`,t),y(),e.removeListener(`error`,h),o(e,`error`)===0&&e.emit(`error`,t)}b(e,`error`,h);function g(){e.removeListener(`finish`,v),y()}e.once(`close`,g);function v(){m(`onfinish`),e.removeListener(`close`,g),y()}e.once(`finish`,v);function y(){m(`unpipe`),n.unpipe(e)}return e.emit(`pipe`,n),i.flowing||(m(`pipe resume`),n.resume()),e};function F(e){return function(){var t=e._readableState;m(`pipeOnDrain`,t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&o(e,`data`)&&(t.flowing=!0,z(e))}}S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||=t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(`unpipe`,this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=B(e,t.buffer,t.decoder),n}function B(e,t,n){var r;return ea.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),e-=o,e===0){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function V(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,e===0){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function ne(e){var t=e._readableState;if(t.length>0)throw Error(`"endReadable()" called on non-empty stream`);t.endEmitted||(t.ended=!0,r.nextTick(re,t,e))}function re(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit(`end`))}function H(e,t){for(var n=0,r=e.length;n{t.exports=a;var n=wP(),r=Object.create(_P());r.inherits=yP(),r.inherits(a,n);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit(`error`,Error(`write callback called multiple times`));n.writechunk=null,n.writecb=null,t!=null&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{t.exports=i;var n=DP(),r=Object.create(_P());r.inherits=yP(),r.inherits(i,n);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}i.prototype._transform=function(e,t,n){n(null,e)}})),kP=i(((e,n)=>{var r=t(`stream`);process.env.READABLE_STREAM===`disable`&&r?(n.exports=r,e=n.exports=r.Readable,e.Readable=r.Readable,e.Writable=r.Writable,e.Duplex=r.Duplex,e.Transform=r.Transform,e.PassThrough=r.PassThrough,e.Stream=r):(e=n.exports=EP(),e.Stream=r||e,e.Readable=e,e.Writable=CP(),e.Duplex=wP(),e.Transform=DP(),e.PassThrough=OP())})),AP=i(((e,t)=>{t.exports=kP().PassThrough})),jP=i(((e,n)=>{var r=t(`util`),i=AP();n.exports={Readable:o,Writable:s},r.inherits(o,i),r.inherits(s,i);function a(e,t,n){e[t]=function(){return delete e[t],n.apply(this,arguments),this[t].apply(this,arguments)}}function o(e,t){if(!(this instanceof o))return new o(e,t);i.call(this,t),a(this,`_read`,function(){var n=e.call(this,t),r=this.emit.bind(this,`error`);n.on(`error`,r),n.pipe(this)}),this.emit(`readable`)}function s(e,t){if(!(this instanceof s))return new s(e,t);i.call(this,t),a(this,`_write`,function(){var n=e.call(this,t),r=this.emit.bind(this,`error`);n.on(`error`,r),this.pipe(n)}),this.emit(`writable`)}})),MP=i(((e,t)=>{ /*! * normalize-path * * Copyright (c) 2014-2018, Jon Schlinkert. * Released under the MIT License. */ -t.exports=function(e,t){if(typeof e!=`string`)throw TypeError(`expected path to be a string`);if(e===`\\`||e===`/`)return`/`;var n=e.length;if(n<=1)return e;var r=``;if(n>4&&e[3]===`\\`){var i=e[2];(i===`?`||i===`.`)&&e.slice(0,2)===`\\\\`&&(e=e.slice(2),r=`//`)}var a=e.split(/[/\\]+/);return t!==!1&&a[a.length-1]===``&&a.pop(),r+a.join(`/`)}})),aM=i(((e,t)=>{function n(e){return e}t.exports=n})),oM=i(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),sM=i(((e,t)=>{var n=oM(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o{function n(e){return function(){return e}}t.exports=n})),lM=i(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),uM=i(((e,t)=>{var n=lM(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),dM=i(((e,t)=>{t.exports=uM().Symbol})),fM=i(((e,t)=>{var n=dM(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),pM=i(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),mM=i(((e,t)=>{var n=dM(),r=fM(),i=pM(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),hM=i(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),gM=i(((e,t)=>{var n=mM(),r=hM(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),_M=i(((e,t)=>{t.exports=uM()[`__core-js_shared__`]})),vM=i(((e,t)=>{var n=_M(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),yM=i(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),bM=i(((e,t)=>{var n=gM(),r=vM(),i=hM(),a=yM(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),xM=i(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),SM=i(((e,t)=>{var n=bM(),r=xM();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),CM=i(((e,t)=>{var n=SM();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),wM=i(((e,t)=>{var n=cM(),r=CM(),i=aM();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),TM=i(((e,t)=>{var n=800,r=16,i=Date.now;function a(e){var t=0,a=0;return function(){var o=i(),s=r-(o-a);if(a=o,s>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=a})),EM=i(((e,t)=>{var n=wM();t.exports=TM()(n)})),DM=i(((e,t)=>{var n=aM(),r=sM(),i=EM();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),OM=i(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),kM=i(((e,t)=>{var n=9007199254740991;function r(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=n}t.exports=r})),AM=i(((e,t)=>{var n=gM(),r=kM();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),jM=i(((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(e,t){var i=typeof e;return t??=n,!!t&&(i==`number`||i!=`symbol`&&r.test(e))&&e>-1&&e%1==0&&e{var n=OM(),r=AM(),i=jM(),a=hM();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),NM=i(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n{function n(e){return typeof e==`object`&&!!e}t.exports=n})),FM=i(((e,t)=>{var n=mM(),r=PM(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),IM=i(((e,t)=>{var n=FM(),r=PM(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),LM=i(((e,t)=>{t.exports=Array.isArray})),RM=i(((e,t)=>{function n(){return!1}t.exports=n})),zM=i(((e,t)=>{var n=uM(),r=RM(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),BM=i(((e,t)=>{var n=mM(),r=kM(),i=PM(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,v=`[object WeakMap]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=`[object Float32Array]`,S=`[object Float64Array]`,C=`[object Int8Array]`,w=`[object Int16Array]`,T=`[object Int32Array]`,E=`[object Uint8Array]`,D=`[object Uint8ClampedArray]`,O=`[object Uint16Array]`,k=`[object Uint32Array]`,A={};A[x]=A[S]=A[C]=A[w]=A[T]=A[E]=A[D]=A[O]=A[k]=!0,A[a]=A[o]=A[y]=A[s]=A[b]=A[c]=A[l]=A[u]=A[d]=A[f]=A[p]=A[m]=A[h]=A[g]=A[v]=!1;function j(e){return i(e)&&r(e.length)&&!!A[n(e)]}t.exports=j})),VM=i(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),HM=i(((e,t)=>{var n=lM(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),UM=i(((e,t)=>{var n=BM(),r=VM(),i=HM(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),WM=i(((e,t)=>{var n=NM(),r=IM(),i=LM(),a=zM(),o=jM(),s=UM(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),GM=i(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),KM=i(((e,t)=>{function n(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}t.exports=n})),qM=i(((e,t)=>{var n=hM(),r=GM(),i=KM(),a=Object.prototype.hasOwnProperty;function o(e){if(!n(e))return i(e);var t=r(e),o=[];for(var s in e)s==`constructor`&&(t||!a.call(e,s))||o.push(s);return o}t.exports=o})),JM=i(((e,t)=>{var n=WM(),r=qM(),i=AM();function a(e){return i(e)?n(e,!0):r(e)}t.exports=a})),YM=i(((e,t)=>{var n=DM(),r=OM(),i=MM(),a=JM(),o=Object.prototype,s=o.hasOwnProperty;t.exports=n(function(e,t){e=Object(e);var n=-1,c=t.length,l=c>2?t[2]:void 0;for(l&&i(t[0],t[1],l)&&(c=1);++n{t.exports={AggregateError:class extends Error{constructor(e){if(!Array.isArray(e))throw TypeError(`Expected input to be an Array, got ${typeof e}`);let t=``;for(let n=0;n{t.exports={format(e,...t){return e.replace(/%([sdifj])/g,function(...[e,n]){let r=t.shift();return n===`f`?r.toFixed(6):n===`j`?JSON.stringify(r):n===`s`&&typeof r==`object`?`${r.constructor===Object?``:r.constructor.name} {}`.trim():r.toString()})},inspect(e){switch(typeof e){case`string`:if(e.includes(`'`)){if(!e.includes(`"`))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case`number`:return isNaN(e)?`NaN`:Object.is(e,-0)?String(e):e;case`bigint`:return`${String(e)}n`;case`boolean`:case`undefined`:return String(e);case`object`:return`{}`}}}})),QM=i(((e,t)=>{let{format:n,inspect:r}=ZM(),{AggregateError:i}=XM(),a=globalThis.AggregateError||i,o=Symbol(`kIsNodeError`),s=[`string`,`function`,`number`,`object`,`Function`,`Object`,`boolean`,`bigint`,`symbol`],c=/^([A-Z][a-z0-9]*)+$/,l={};function u(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function d(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function f(e,t,r){if(typeof t==`function`)return u(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);let i=(t.match(/%[dfijoOs]/g)||[]).length;return u(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),r.length===0?t:n(t,...r)}function p(e,t,n){n||=Error;class r extends n{constructor(...n){super(f(e,t,n))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(r.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),r.prototype.code=e,r.prototype[o]=!0,l[e]=r}function m(e){let t=`__node_internal_`+e.name;return Object.defineProperty(e,`name`,{value:t}),e}function h(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;let n=new a([t,e],t.message);return n.code=t.code,n}return e||t}var g=class extends Error{constructor(e=`The operation was aborted`,t=void 0){if(t!==void 0&&typeof t!=`object`)throw new l.ERR_INVALID_ARG_TYPE(`options`,`Object`,t);super(e,t),this.code=`ABORT_ERR`,this.name=`AbortError`}};p(`ERR_ASSERTION`,`%s`,Error),p(`ERR_INVALID_ARG_TYPE`,(e,t,n)=>{u(typeof e==`string`,`'name' must be a string`),Array.isArray(t)||(t=[t]);let i=`The `;e.endsWith(` argument`)?i+=`${e} `:i+=`"${e}" ${e.includes(`.`)?`property`:`argument`} `,i+=`must be `;let a=[],o=[],l=[];for(let e of t)u(typeof e==`string`,`All expected entries have to be of type string`),s.includes(e)?a.push(e.toLowerCase()):c.test(e)?o.push(e):(u(e!==`object`,`The value "object" should be written as "Object"`),l.push(e));if(o.length>0){let e=a.indexOf(`object`);e!==-1&&(a.splice(a,e,1),o.push(`Object`))}if(a.length>0){switch(a.length){case 1:i+=`of type ${a[0]}`;break;case 2:i+=`one of type ${a[0]} or ${a[1]}`;break;default:{let e=a.pop();i+=`one of type ${a.join(`, `)}, or ${e}`}}(o.length>0||l.length>0)&&(i+=` or `)}if(o.length>0){switch(o.length){case 1:i+=`an instance of ${o[0]}`;break;case 2:i+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let e=o.pop();i+=`an instance of ${o.join(`, `)}, or ${e}`}}l.length>0&&(i+=` or `)}switch(l.length){case 0:break;case 1:l[0].toLowerCase()!==l[0]&&(i+=`an `),i+=`${l[0]}`;break;case 2:i+=`one of ${l[0]} or ${l[1]}`;break;default:{let e=l.pop();i+=`one of ${l.join(`, `)}, or ${e}`}}if(n==null)i+=`. Received ${n}`;else if(typeof n==`function`&&n.name)i+=`. Received function ${n.name}`;else if(typeof n==`object`){var d;if((d=n.constructor)!=null&&d.name)i+=`. Received an instance of ${n.constructor.name}`;else{let e=r(n,{depth:-1});i+=`. Received ${e}`}}else{let e=r(n,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),i+=`. Received type ${typeof n} (${e})`}return i},TypeError),p(`ERR_INVALID_ARG_VALUE`,(e,t,n=`is invalid`)=>{let i=r(t);return i.length>128&&(i=i.slice(0,128)+`...`),`The ${e.includes(`.`)?`property`:`argument`} '${e}' ${n}. Received ${i}`},TypeError),p(`ERR_INVALID_RETURN_VALUE`,(e,t,n)=>{var r;return`Expected ${e} to be returned from the "${t}" function but got ${n!=null&&(r=n.constructor)!=null&&r.name?`instance of ${n.constructor.name}`:`type ${typeof n}`}.`},TypeError),p(`ERR_MISSING_ARGS`,(...e)=>{u(e.length>0,`At least one arg needs to be specified`);let t,n=e.length;switch(e=(Array.isArray(e)?e:[e]).map(e=>`"${e}"`).join(` or `),n){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{let n=e.pop();t+=`The ${e.join(`, `)}, and ${n} arguments`}break}return`${t} must be specified`},TypeError),p(`ERR_OUT_OF_RANGE`,(e,t,n)=>{u(t,`Missing "range" argument`);let i;if(Number.isInteger(n)&&Math.abs(n)>2**32)i=d(String(n));else if(typeof n==`bigint`){i=String(n);let e=BigInt(2)**BigInt(32);(n>e||n<-e)&&(i=d(i)),i+=`n`}else i=r(n);return`The value of "${e}" is out of range. It must be ${t}. Received ${i}`},RangeError),p(`ERR_MULTIPLE_CALLBACK`,`Callback called multiple times`,Error),p(`ERR_METHOD_NOT_IMPLEMENTED`,`The %s method is not implemented`,Error),p(`ERR_STREAM_ALREADY_FINISHED`,`Cannot call %s after a stream was finished`,Error),p(`ERR_STREAM_CANNOT_PIPE`,`Cannot pipe, not readable`,Error),p(`ERR_STREAM_DESTROYED`,`Cannot call %s after a stream was destroyed`,Error),p(`ERR_STREAM_NULL_VALUES`,`May not write null values to stream`,TypeError),p(`ERR_STREAM_PREMATURE_CLOSE`,`Premature close`,Error),p(`ERR_STREAM_PUSH_AFTER_EOF`,`stream.push() after EOF`,Error),p(`ERR_STREAM_UNSHIFT_AFTER_END_EVENT`,`stream.unshift() after end event`,Error),p(`ERR_STREAM_WRITE_AFTER_END`,`write after end`,Error),p(`ERR_UNKNOWN_ENCODING`,`Unknown encoding: %s`,TypeError),t.exports={AbortError:g,aggregateTwoErrors:m(h),hideStackFrames:m,codes:l}})),$M=i(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});let n=new WeakMap,r=new WeakMap;function i(e){let t=n.get(e);return console.assert(t!=null,`'this' is expected an Event object, but got`,e),t}function a(e){if(e.passiveListener!=null){typeof console<`u`&&typeof console.error==`function`&&console.error(`Unable to preventDefault inside passive event listener invocation.`,e.passiveListener);return}e.event.cancelable&&(e.canceled=!0,typeof e.event.preventDefault==`function`&&e.event.preventDefault())}function o(e,t){n.set(this,{eventTarget:e,event:t,eventPhase:2,currentTarget:e,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:t.timeStamp||Date.now()}),Object.defineProperty(this,`isTrusted`,{value:!1,enumerable:!0});let r=Object.keys(t);for(let e=0;e0){let e=Array(arguments.length);for(let t=0;t{Object.defineProperty(e,`__esModule`,{value:!0});var n=$M(),r=class extends n.EventTarget{constructor(){throw super(),TypeError(`AbortSignal cannot be constructed directly`)}get aborted(){let e=o.get(this);if(typeof e!=`boolean`)throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?`null`:typeof this}`);return e}};n.defineEventAttribute(r.prototype,`abort`);function i(){let e=Object.create(r.prototype);return n.EventTarget.call(e),o.set(e,!1),e}function a(e){o.get(e)===!1&&(o.set(e,!0),e.dispatchEvent({type:`abort`}))}let o=new WeakMap;Object.defineProperties(r.prototype,{aborted:{enumerable:!0}}),typeof Symbol==`function`&&typeof Symbol.toStringTag==`symbol`&&Object.defineProperty(r.prototype,Symbol.toStringTag,{configurable:!0,value:`AbortSignal`});var s=class{constructor(){c.set(this,i())}get signal(){return l(this)}abort(){a(l(this))}};let c=new WeakMap;function l(e){let t=c.get(e);if(t==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${e===null?`null`:typeof e}`);return t}Object.defineProperties(s.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==`function`&&typeof Symbol.toStringTag==`symbol`&&Object.defineProperty(s.prototype,Symbol.toStringTag,{configurable:!0,value:`AbortController`}),e.AbortController=s,e.AbortSignal=r,e.default=s,t.exports=s,t.exports.AbortController=t.exports.default=s,t.exports.AbortSignal=r})),tN=i(((e,n)=>{let r=t(`buffer`),{format:i,inspect:a}=ZM(),{codes:{ERR_INVALID_ARG_TYPE:o}}=QM(),{kResistStopPropagation:s,AggregateError:c,SymbolDispose:l}=XM(),u=globalThis.AbortSignal||eN().AbortSignal,d=globalThis.AbortController||eN().AbortController,f=Object.getPrototypeOf(async function(){}).constructor,p=globalThis.Blob||r.Blob,m=p===void 0?function(e){return!1}:function(e){return e instanceof p},h=(e,t)=>{if(e!==void 0&&(typeof e!=`object`||!e||!(`aborted`in e)))throw new o(t,`AbortSignal`,e)},g=(e,t)=>{if(typeof e!=`function`)throw new o(t,`Function`,e)};n.exports={AggregateError:c,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...n){t||(t=!0,e.apply(this,n))}},createDeferredPromise:function(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},promisify(e){return new Promise((t,n)=>{e((e,...r)=>e?n(e):t(...r))})},debuglog(){return function(){}},format:i,inspect:a,types:{isAsyncFunction(e){return e instanceof f},isArrayBufferView(e){return ArrayBuffer.isView(e)}},isBlob:m,deprecate(e,t){return e},addAbortListener:t(`events`).addAbortListener||function(e,t){if(e===void 0)throw new o(`signal`,`AbortSignal`,e);h(e,`signal`),g(t,`listener`);let n;return e.aborted?queueMicrotask(()=>t()):(e.addEventListener(`abort`,t,{__proto__:null,once:!0,[s]:!0}),n=()=>{e.removeEventListener(`abort`,t)}),{__proto__:null,[l](){var e;(e=n)==null||e()}}},AbortSignalAny:u.any||function(e){if(e.length===1)return e[0];let t=new d,n=()=>t.abort();return e.forEach(e=>{h(e,`signals`),e.addEventListener(`abort`,n,{once:!0})}),t.signal.addEventListener(`abort`,()=>{e.forEach(e=>e.removeEventListener(`abort`,n))},{once:!0}),t.signal}},n.exports.promisify.custom=Symbol.for(`nodejs.util.promisify.custom`)})),nN=i(((e,t)=>{let{ArrayIsArray:n,ArrayPrototypeIncludes:r,ArrayPrototypeJoin:i,ArrayPrototypeMap:a,NumberIsInteger:o,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:c,NumberMIN_SAFE_INTEGER:l,NumberParseInt:u,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:f,String:p,StringPrototypeToUpperCase:m,StringPrototypeTrim:h}=XM(),{hideStackFrames:g,codes:{ERR_SOCKET_BAD_PORT:v,ERR_INVALID_ARG_TYPE:y,ERR_INVALID_ARG_VALUE:b,ERR_OUT_OF_RANGE:x,ERR_UNKNOWN_SIGNAL:S}}=QM(),{normalizeEncoding:C}=tN(),{isAsyncFunction:w,isArrayBufferView:T}=tN().types,E={};function D(e){return e===(e|0)}function O(e){return e===e>>>0}let k=/^[0-7]+$/;function A(e,t,n){if(e===void 0&&(e=n),typeof e==`string`){if(f(k,e)===null)throw new b(t,e,`must be a 32-bit unsigned integer or an octal string`);e=u(e,8)}return N(e,t),e}let j=g((e,t,n=l,r=c)=>{if(typeof e!=`number`)throw new y(t,`number`,e);if(!o(e))throw new x(t,`an integer`,e);if(er)throw new x(t,`>= ${n} && <= ${r}`,e)}),M=g((e,t,n=-2147483648,r=2147483647)=>{if(typeof e!=`number`)throw new y(t,`number`,e);if(!o(e))throw new x(t,`an integer`,e);if(er)throw new x(t,`>= ${n} && <= ${r}`,e)}),N=g((e,t,n=!1)=>{if(typeof e!=`number`)throw new y(t,`number`,e);if(!o(e))throw new x(t,`an integer`,e);let r=+!!n,i=4294967295;if(ei)throw new x(t,`>= ${r} && <= ${i}`,e)});function P(e,t){if(typeof e!=`string`)throw new y(t,`string`,e)}function F(e,t,n=void 0,r){if(typeof e!=`number`)throw new y(t,`number`,e);if(n!=null&&er||(n!=null||r!=null)&&s(e))throw new x(t,`${n==null?``:`>= ${n}`}${n!=null&&r!=null?` && `:``}${r==null?``:`<= ${r}`}`,e)}let I=g((e,t,n)=>{if(!r(n,e))throw new b(t,e,`must be one of: `+i(a(n,e=>typeof e==`string`?`'${e}'`:p(e)),`, `))});function L(e,t){if(typeof e!=`boolean`)throw new y(t,`boolean`,e)}function R(e,t,n){return e==null||!d(e,t)?n:e[t]}let z=g((e,t,r=null)=>{let i=R(r,`allowArray`,!1),a=R(r,`allowFunction`,!1);if(!R(r,`nullable`,!1)&&e===null||!i&&n(e)||typeof e!=`object`&&(!a||typeof e!=`function`))throw new y(t,`Object`,e)}),ee=g((e,t)=>{if(e!=null&&typeof e!=`object`&&typeof e!=`function`)throw new y(t,`a dictionary`,e)}),B=g((e,t,r=0)=>{if(!n(e))throw new y(t,`Array`,e);if(e.length{if(!T(e))throw new y(t,[`Buffer`,`TypedArray`,`DataView`],e)});function ie(e,t){let n=C(t),r=e.length;if(n===`hex`&&r%2!=0)throw new b(`encoding`,t,`is invalid for data of length ${r}`)}function ae(e,t=`Port`,n=!0){if(typeof e!=`number`&&typeof e!=`string`||typeof e==`string`&&h(e).length===0||+e!=e>>>0||e>65535||e===0&&!n)throw new v(t,e,n);return e|0}let oe=g((e,t)=>{if(e!==void 0&&(typeof e!=`object`||!e||!(`aborted`in e)))throw new y(t,`AbortSignal`,e)}),se=g((e,t)=>{if(typeof e!=`function`)throw new y(t,`Function`,e)}),ce=g((e,t)=>{if(typeof e!=`function`||w(e))throw new y(t,`Function`,e)}),le=g((e,t)=>{if(e!==void 0)throw new y(t,`undefined`,e)});function ue(e,t,n){if(!r(n,e))throw new y(t,`('${i(n,`|`)}')`,e)}let de=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function fe(e,t){if(e===void 0||!f(de,e))throw new b(t,e,`must be an array or string of format "; rel=preload; as=style"`)}function pe(e){if(typeof e==`string`)return fe(e,`hints`),e;if(n(e)){let t=e.length,n=``;if(t===0)return n;for(let r=0;r; rel=preload; as=style"`)}t.exports={isInt32:D,isUint32:O,parseFileMode:A,validateArray:B,validateStringArray:te,validateBooleanArray:V,validateAbortSignalArray:ne,validateBoolean:L,validateBuffer:H,validateDictionary:ee,validateEncoding:ie,validateFunction:se,validateInt32:M,validateInteger:j,validateNumber:F,validateObject:z,validateOneOf:I,validatePlainFunction:ce,validatePort:ae,validateSignalName:re,validateString:P,validateUint32:N,validateUndefined:le,validateUnion:ue,validateAbortSignal:oe,validateLinkHeaderValue:pe}})),rN=i(((e,t)=>{t.exports=global.process})),iN=i(((e,t)=>{let{SymbolAsyncIterator:n,SymbolIterator:r,SymbolFor:i}=XM(),a=i(`nodejs.stream.destroyed`),o=i(`nodejs.stream.errored`),s=i(`nodejs.stream.readable`),c=i(`nodejs.stream.writable`),l=i(`nodejs.stream.disturbed`),u=i(`nodejs.webstream.isClosedPromise`),d=i(`nodejs.webstream.controllerErrorFunction`);function f(e,t=!1){return!!(e&&typeof e.pipe==`function`&&typeof e.on==`function`&&(!t||typeof e.pause==`function`&&typeof e.resume==`function`)&&(!e._writableState||e._readableState?.readable!==!1)&&(!e._writableState||e._readableState))}function p(e){return!!(e&&typeof e.write==`function`&&typeof e.on==`function`&&(!e._readableState||e._writableState?.writable!==!1))}function m(e){return!!(e&&typeof e.pipe==`function`&&e._readableState&&typeof e.on==`function`&&typeof e.write==`function`)}function h(e){return e&&(e._readableState||e._writableState||typeof e.write==`function`&&typeof e.on==`function`||typeof e.pipe==`function`&&typeof e.on==`function`)}function g(e){return!!(e&&!h(e)&&typeof e.pipeThrough==`function`&&typeof e.getReader==`function`&&typeof e.cancel==`function`)}function v(e){return!!(e&&!h(e)&&typeof e.getWriter==`function`&&typeof e.abort==`function`)}function y(e){return!!(e&&!h(e)&&typeof e.readable==`object`&&typeof e.writable==`object`)}function b(e){return g(e)||v(e)||y(e)}function x(e,t){return e==null?!1:t===!0?typeof e[n]==`function`:t===!1?typeof e[r]==`function`:typeof e[n]==`function`||typeof e[r]==`function`}function S(e){if(!h(e))return null;let t=e._writableState,n=e._readableState,r=t||n;return!!(e.destroyed||e[a]||r!=null&&r.destroyed)}function C(e){if(!p(e))return null;if(e.writableEnded===!0)return!0;let t=e._writableState;return t!=null&&t.errored?!1:typeof t?.ended==`boolean`?t.ended:null}function w(e,t){if(!p(e))return null;if(e.writableFinished===!0)return!0;let n=e._writableState;return n!=null&&n.errored?!1:typeof n?.finished==`boolean`?!!(n.finished||t===!1&&n.ended===!0&&n.length===0):null}function T(e){if(!f(e))return null;if(e.readableEnded===!0)return!0;let t=e._readableState;return!t||t.errored?!1:typeof t?.ended==`boolean`?t.ended:null}function E(e,t){if(!f(e))return null;let n=e._readableState;return n!=null&&n.errored?!1:typeof n?.endEmitted==`boolean`?!!(n.endEmitted||t===!1&&n.ended===!0&&n.length===0):null}function D(e){return e&&e[s]!=null?e[s]:typeof e?.readable==`boolean`?S(e)?!1:f(e)&&e.readable&&!E(e):null}function O(e){return e&&e[c]!=null?e[c]:typeof e?.writable==`boolean`?S(e)?!1:p(e)&&e.writable&&!C(e):null}function k(e,t){return h(e)?S(e)?!0:!(t?.readable!==!1&&D(e)||t?.writable!==!1&&O(e)):null}function A(e){return h(e)?e.writableErrored?e.writableErrored:e._writableState?.errored??null:null}function j(e){return h(e)?e.readableErrored?e.readableErrored:e._readableState?.errored??null:null}function M(e){if(!h(e))return null;if(typeof e.closed==`boolean`)return e.closed;let t=e._writableState,n=e._readableState;return typeof t?.closed==`boolean`||typeof n?.closed==`boolean`?t?.closed||n?.closed:typeof e._closed==`boolean`&&N(e)?e._closed:null}function N(e){return typeof e._closed==`boolean`&&typeof e._defaultKeepAlive==`boolean`&&typeof e._removedConnection==`boolean`&&typeof e._removedContLen==`boolean`}function P(e){return typeof e._sent100==`boolean`&&N(e)}function F(e){return typeof e._consuming==`boolean`&&typeof e._dumped==`boolean`&&e.req?.upgradeOrConnect===void 0}function I(e){if(!h(e))return null;let t=e._writableState,n=e._readableState,r=t||n;return!r&&P(e)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function L(e){return!!(e&&(e[l]??(e.readableDidRead||e.readableAborted)))}function R(e){return!!(e&&(e[o]??e.readableErrored??e.writableErrored??e._readableState?.errorEmitted??e._writableState?.errorEmitted??e._readableState?.errored??e._writableState?.errored))}t.exports={isDestroyed:S,kIsDestroyed:a,isDisturbed:L,kIsDisturbed:l,isErrored:R,kIsErrored:o,isReadable:D,kIsReadable:s,kIsClosedPromise:u,kControllerErrorFunction:d,kIsWritable:c,isClosed:M,isDuplexNodeStream:m,isFinished:k,isIterable:x,isReadableNodeStream:f,isReadableStream:g,isReadableEnded:T,isReadableFinished:E,isReadableErrored:j,isNodeStream:h,isWebStream:b,isWritable:O,isWritableNodeStream:p,isWritableStream:v,isWritableEnded:C,isWritableFinished:w,isWritableErrored:A,isServerRequest:F,isServerResponse:P,willEmitClose:I,isTransformStream:y}})),aN=i(((e,t)=>{let n=rN(),{AbortError:r,codes:i}=QM(),{ERR_INVALID_ARG_TYPE:a,ERR_STREAM_PREMATURE_CLOSE:o}=i,{kEmptyObject:s,once:c}=tN(),{validateAbortSignal:l,validateFunction:u,validateObject:d,validateBoolean:f}=nN(),{Promise:p,PromisePrototypeThen:m,SymbolDispose:h}=XM(),{isClosed:g,isReadable:v,isReadableNodeStream:y,isReadableStream:b,isReadableFinished:x,isReadableErrored:S,isWritable:C,isWritableNodeStream:w,isWritableStream:T,isWritableFinished:E,isWritableErrored:D,isNodeStream:O,willEmitClose:k,kIsClosedPromise:A}=iN(),j;function M(e){return e.setHeader&&typeof e.abort==`function`}let N=()=>{};function P(e,t,i){if(arguments.length===2?(i=t,t=s):t==null?t=s:d(t,`options`),u(i,`callback`),l(t.signal,`options.signal`),i=c(i),b(e)||T(e))return F(e,t,i);if(!O(e))throw new a(`stream`,[`ReadableStream`,`WritableStream`,`Stream`],e);let f=t.readable??y(e),p=t.writable??w(e),m=e._writableState,A=e._readableState,P=()=>{e.writable||R()},I=k(e)&&y(e)===f&&w(e)===p,L=E(e,!1),R=()=>{L=!0,e.destroyed&&(I=!1),!(I&&(!e.readable||f))&&(!f||z)&&i.call(e)},z=x(e,!1),ee=()=>{z=!0,e.destroyed&&(I=!1),!(I&&(!e.writable||p))&&(!p||L)&&i.call(e)},B=t=>{i.call(e,t)},te=g(e),V=()=>{te=!0;let t=D(e)||S(e);if(t&&typeof t!=`boolean`)return i.call(e,t);if(f&&!z&&y(e,!0)&&!x(e,!1)||p&&!L&&!E(e,!1))return i.call(e,new o);i.call(e)},ne=()=>{te=!0;let t=D(e)||S(e);if(t&&typeof t!=`boolean`)return i.call(e,t);i.call(e)},re=()=>{e.req.on(`finish`,R)};M(e)?(e.on(`complete`,R),I||e.on(`abort`,V),e.req?re():e.on(`request`,re)):p&&!m&&(e.on(`end`,P),e.on(`close`,P)),!I&&typeof e.aborted==`boolean`&&e.on(`aborted`,V),e.on(`end`,ee),e.on(`finish`,R),t.error!==!1&&e.on(`error`,B),e.on(`close`,V),te?n.nextTick(V):m!=null&&m.errorEmitted||A!=null&&A.errorEmitted?I||n.nextTick(ne):(!f&&(!I||v(e))&&(L||C(e)===!1)||!p&&(!I||C(e))&&(z||v(e)===!1)||A&&e.req&&e.aborted)&&n.nextTick(ne);let H=()=>{i=N,e.removeListener(`aborted`,V),e.removeListener(`complete`,R),e.removeListener(`abort`,V),e.removeListener(`request`,re),e.req&&e.req.removeListener(`finish`,R),e.removeListener(`end`,P),e.removeListener(`close`,P),e.removeListener(`finish`,R),e.removeListener(`end`,ee),e.removeListener(`error`,B),e.removeListener(`close`,V)};if(t.signal&&!te){let a=()=>{let n=i;H(),n.call(e,new r(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(a);else{j||=tN().addAbortListener;let n=j(t.signal,a),r=i;i=c((...t)=>{n[h](),r.apply(e,t)})}}return H}function F(e,t,i){let a=!1,o=N;if(t.signal)if(o=()=>{a=!0,i.call(e,new r(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(o);else{j||=tN().addAbortListener;let n=j(t.signal,o),r=i;i=c((...t)=>{n[h](),r.apply(e,t)})}let s=(...t)=>{a||n.nextTick(()=>i.apply(e,t))};return m(e[A].promise,s,s),N}function I(e,t){var n;let r=!1;return t===null&&(t=s),(n=t)!=null&&n.cleanup&&(f(t.cleanup,`cleanup`),r=t.cleanup),new p((n,i)=>{let a=P(e,t,e=>{r&&a(),e?i(e):n()})})}t.exports=P,t.exports.finished=I})),oN=i(((e,t)=>{let n=rN(),{aggregateTwoErrors:r,codes:{ERR_MULTIPLE_CALLBACK:i},AbortError:a}=QM(),{Symbol:o}=XM(),{kIsDestroyed:s,isDestroyed:c,isFinished:l,isServerRequest:u}=iN(),d=o(`kDestroy`),f=o(`kConstruct`);function p(e,t,n){e&&(e.stack,t&&!t.errored&&(t.errored=e),n&&!n.errored&&(n.errored=e))}function m(e,t){let n=this._readableState,i=this._writableState,a=i||n;return i!=null&&i.destroyed||n!=null&&n.destroyed?(typeof t==`function`&&t(),this):(p(e,i,n),i&&(i.destroyed=!0),n&&(n.destroyed=!0),a.constructed?h(this,e,t):this.once(d,function(n){h(this,r(n,e),t)}),this)}function h(e,t,r){let i=!1;function a(t){if(i)return;i=!0;let a=e._readableState,o=e._writableState;p(t,o,a),o&&(o.closed=!0),a&&(a.closed=!0),typeof r==`function`&&r(t),t?n.nextTick(g,e,t):n.nextTick(v,e)}try{e._destroy(t||null,a)}catch(e){a(e)}}function g(e,t){y(e,t),v(e)}function v(e){let t=e._readableState,n=e._writableState;n&&(n.closeEmitted=!0),t&&(t.closeEmitted=!0),(n!=null&&n.emitClose||t!=null&&t.emitClose)&&e.emit(`close`)}function y(e,t){let n=e._readableState,r=e._writableState;r!=null&&r.errorEmitted||n!=null&&n.errorEmitted||(r&&(r.errorEmitted=!0),n&&(n.errorEmitted=!0),e.emit(`error`,t))}function b(){let e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=e.readable===!1,e.endEmitted=e.readable===!1),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=t.writable===!1,t.ending=t.writable===!1,t.finished=t.writable===!1)}function x(e,t,r){let i=e._readableState,a=e._writableState;if(a!=null&&a.destroyed||i!=null&&i.destroyed)return this;i!=null&&i.autoDestroy||a!=null&&a.autoDestroy?e.destroy(t):t&&(t.stack,a&&!a.errored&&(a.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(y,e,t):y(e,t))}function S(e,t){if(typeof e._construct!=`function`)return;let r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(f,t),!(e.listenerCount(f)>1)&&n.nextTick(C,e)}function C(e){let t=!1;function r(r){if(t){x(e,r??new i);return}t=!0;let a=e._readableState,o=e._writableState,s=o||a;a&&(a.constructed=!0),o&&(o.constructed=!0),s.destroyed?e.emit(d,r):r?x(e,r,!0):n.nextTick(w,e)}try{e._construct(e=>{n.nextTick(r,e)})}catch(e){n.nextTick(r,e)}}function w(e){e.emit(f)}function T(e){return e?.setHeader&&typeof e.abort==`function`}function E(e){e.emit(`close`)}function D(e,t){e.emit(`error`,t),n.nextTick(E,e)}function O(e,t){!e||c(e)||(!t&&!l(e)&&(t=new a),u(e)?(e.socket=null,e.destroy(t)):T(e)?e.abort():T(e.req)?e.req.abort():typeof e.destroy==`function`?e.destroy(t):typeof e.close==`function`?e.close():t?n.nextTick(D,e,t):n.nextTick(E,e),e.destroyed||(e[s]=!0))}t.exports={construct:S,destroyer:O,destroy:m,undestroy:b,errorOrDestroy:x}})),sN=i(((e,n)=>{let{ArrayIsArray:r,ObjectSetPrototypeOf:i}=XM(),{EventEmitter:a}=t(`events`);function o(e){a.call(this,e)}i(o.prototype,a.prototype),i(o,a),o.prototype.pipe=function(e,t){let n=this;function r(t){e.writable&&e.write(t)===!1&&n.pause&&n.pause()}n.on(`data`,r);function i(){n.readable&&n.resume&&n.resume()}e.on(`drain`,i),!e._isStdio&&(!t||t.end!==!1)&&(n.on(`end`,c),n.on(`close`,l));let o=!1;function c(){o||(o=!0,e.end())}function l(){o||(o=!0,typeof e.destroy==`function`&&e.destroy())}function u(e){d(),a.listenerCount(this,`error`)===0&&this.emit(`error`,e)}s(n,`error`,u),s(e,`error`,u);function d(){n.removeListener(`data`,r),e.removeListener(`drain`,i),n.removeListener(`end`,c),n.removeListener(`close`,l),n.removeListener(`error`,u),e.removeListener(`error`,u),n.removeListener(`end`,d),n.removeListener(`close`,d),e.removeListener(`close`,d)}return n.on(`end`,d),n.on(`close`,d),e.on(`close`,d),e.emit(`pipe`,n),e};function s(e,t,n){if(typeof e.prependListener==`function`)return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):r(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}n.exports={Stream:o,prependListener:s}})),cN=i(((e,t)=>{let{SymbolDispose:n}=XM(),{AbortError:r,codes:i}=QM(),{isNodeStream:a,isWebStream:o,kControllerErrorFunction:s}=iN(),c=aN(),{ERR_INVALID_ARG_TYPE:l}=i,u,d=(e,t)=>{if(typeof e!=`object`||!(`aborted`in e))throw new l(t,`AbortSignal`,e)};t.exports.addAbortSignal=function(e,n){if(d(e,`signal`),!a(n)&&!o(n))throw new l(`stream`,[`ReadableStream`,`WritableStream`,`Stream`],n);return t.exports.addAbortSignalNoValidate(e,n)},t.exports.addAbortSignalNoValidate=function(e,t){if(typeof e!=`object`||!(`aborted`in e))return t;let i=a(t)?()=>{t.destroy(new r(void 0,{cause:e.reason}))}:()=>{t[s](new r(void 0,{cause:e.reason}))};return e.aborted?i():(u||=tN().addAbortListener,c(t,u(e,i)[n])),t}})),lN=i(((e,n)=>{let{StringPrototypeSlice:r,SymbolIterator:i,TypedArrayPrototypeSet:a,Uint8Array:o}=XM(),{Buffer:s}=t(`buffer`),{inspect:c}=tN();n.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){let t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){let t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length}shift(){if(this.length===0)return;let e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(this.length===0)return``;let t=this.head,n=``+t.data;for(;(t=t.next)!==null;)n+=e+t.data;return n}concat(e){if(this.length===0)return s.alloc(0);let t=s.allocUnsafe(e>>>0),n=this.head,r=0;for(;n;)a(t,n.data,r),r+=n.data.length,n=n.next;return t}consume(e,t){let n=this.head.data;if(ea.length)t+=a,e-=a.length;else{e===a.length?(t+=a,++i,n.next?this.head=n.next:this.head=this.tail=null):(t+=r(a,0,e),this.head=n,n.data=r(a,e));break}++i}while((n=n.next)!==null);return this.length-=i,t}_getBuffer(e){let t=s.allocUnsafe(e),n=e,r=this.head,i=0;do{let s=r.data;if(e>s.length)a(t,s,n-e),e-=s.length;else{e===s.length?(a(t,s,n-e),++i,r.next?this.head=r.next:this.head=this.tail=null):(a(t,new o(s.buffer,s.byteOffset,e),n-e),this.head=r,r.data=s.slice(e));break}++i}while((r=r.next)!==null);return this.length-=i,t}[Symbol.for(`nodejs.util.inspect.custom`)](e,t){return c(this,{...t,depth:0,customInspect:!1})}}})),uN=i(((e,t)=>{let{MathFloor:n,NumberIsInteger:r}=XM(),{validateInteger:i}=nN(),{ERR_INVALID_ARG_VALUE:a}=QM().codes,o=16*1024,s=16;function c(e,t,n){return e.highWaterMark==null?t?e[n]:null:e.highWaterMark}function l(e){return e?s:o}function u(e,t){i(t,`value`,0),e?s=t:o=t}function d(e,t,i,o){let s=c(t,o,i);if(s!=null){if(!r(s)||s<0)throw new a(o?`options.${i}`:`options.highWaterMark`,s);return n(s)}return l(e.objectMode)}t.exports={getHighWaterMark:d,getDefaultHighWaterMark:l,setDefaultHighWaterMark:u}})),dN=i(((e,n)=>{ +t.exports=function(e,t){if(typeof e!=`string`)throw TypeError(`expected path to be a string`);if(e===`\\`||e===`/`)return`/`;var n=e.length;if(n<=1)return e;var r=``;if(n>4&&e[3]===`\\`){var i=e[2];(i===`?`||i===`.`)&&e.slice(0,2)===`\\\\`&&(e=e.slice(2),r=`//`)}var a=e.split(/[/\\]+/);return t!==!1&&a[a.length-1]===``&&a.pop(),r+a.join(`/`)}})),NP=i(((e,t)=>{function n(e){return e}t.exports=n})),PP=i(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),FP=i(((e,t)=>{var n=PP(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o{function n(e){return function(){return e}}t.exports=n})),LP=i(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),RP=i(((e,t)=>{var n=LP(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),zP=i(((e,t)=>{t.exports=RP().Symbol})),BP=i(((e,t)=>{var n=zP(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),VP=i(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),HP=i(((e,t)=>{var n=zP(),r=BP(),i=VP(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),UP=i(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),WP=i(((e,t)=>{var n=HP(),r=UP(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),GP=i(((e,t)=>{t.exports=RP()[`__core-js_shared__`]})),KP=i(((e,t)=>{var n=GP(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),qP=i(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),JP=i(((e,t)=>{var n=WP(),r=KP(),i=UP(),a=qP(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),YP=i(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),XP=i(((e,t)=>{var n=JP(),r=YP();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),ZP=i(((e,t)=>{var n=XP();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),QP=i(((e,t)=>{var n=IP(),r=ZP(),i=NP();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),$P=i(((e,t)=>{var n=800,r=16,i=Date.now;function a(e){var t=0,a=0;return function(){var o=i(),s=r-(o-a);if(a=o,s>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=a})),eF=i(((e,t)=>{var n=QP();t.exports=$P()(n)})),tF=i(((e,t)=>{var n=NP(),r=FP(),i=eF();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),nF=i(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),rF=i(((e,t)=>{var n=9007199254740991;function r(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=n}t.exports=r})),iF=i(((e,t)=>{var n=WP(),r=rF();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),aF=i(((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(e,t){var i=typeof e;return t??=n,!!t&&(i==`number`||i!=`symbol`&&r.test(e))&&e>-1&&e%1==0&&e{var n=nF(),r=iF(),i=aF(),a=UP();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),sF=i(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n{function n(e){return typeof e==`object`&&!!e}t.exports=n})),lF=i(((e,t)=>{var n=HP(),r=cF(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),uF=i(((e,t)=>{var n=lF(),r=cF(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),dF=i(((e,t)=>{t.exports=Array.isArray})),fF=i(((e,t)=>{function n(){return!1}t.exports=n})),pF=i(((e,t)=>{var n=RP(),r=fF(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),mF=i(((e,t)=>{var n=HP(),r=rF(),i=cF(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,v=`[object WeakMap]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=`[object Float32Array]`,S=`[object Float64Array]`,C=`[object Int8Array]`,w=`[object Int16Array]`,T=`[object Int32Array]`,E=`[object Uint8Array]`,D=`[object Uint8ClampedArray]`,O=`[object Uint16Array]`,k=`[object Uint32Array]`,A={};A[x]=A[S]=A[C]=A[w]=A[T]=A[E]=A[D]=A[O]=A[k]=!0,A[a]=A[o]=A[y]=A[s]=A[b]=A[c]=A[l]=A[u]=A[d]=A[f]=A[p]=A[m]=A[h]=A[g]=A[v]=!1;function j(e){return i(e)&&r(e.length)&&!!A[n(e)]}t.exports=j})),hF=i(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),gF=i(((e,t)=>{var n=LP(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),_F=i(((e,t)=>{var n=mF(),r=hF(),i=gF(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),vF=i(((e,t)=>{var n=sF(),r=uF(),i=dF(),a=pF(),o=aF(),s=_F(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),yF=i(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),bF=i(((e,t)=>{function n(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}t.exports=n})),xF=i(((e,t)=>{var n=UP(),r=yF(),i=bF(),a=Object.prototype.hasOwnProperty;function o(e){if(!n(e))return i(e);var t=r(e),o=[];for(var s in e)s==`constructor`&&(t||!a.call(e,s))||o.push(s);return o}t.exports=o})),SF=i(((e,t)=>{var n=vF(),r=xF(),i=iF();function a(e){return i(e)?n(e,!0):r(e)}t.exports=a})),CF=i(((e,t)=>{var n=tF(),r=nF(),i=oF(),a=SF(),o=Object.prototype,s=o.hasOwnProperty;t.exports=n(function(e,t){e=Object(e);var n=-1,c=t.length,l=c>2?t[2]:void 0;for(l&&i(t[0],t[1],l)&&(c=1);++n{t.exports={AggregateError:class extends Error{constructor(e){if(!Array.isArray(e))throw TypeError(`Expected input to be an Array, got ${typeof e}`);let t=``;for(let n=0;n{t.exports={format(e,...t){return e.replace(/%([sdifj])/g,function(...[e,n]){let r=t.shift();return n===`f`?r.toFixed(6):n===`j`?JSON.stringify(r):n===`s`&&typeof r==`object`?`${r.constructor===Object?``:r.constructor.name} {}`.trim():r.toString()})},inspect(e){switch(typeof e){case`string`:if(e.includes(`'`)){if(!e.includes(`"`))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case`number`:return isNaN(e)?`NaN`:Object.is(e,-0)?String(e):e;case`bigint`:return`${String(e)}n`;case`boolean`:case`undefined`:return String(e);case`object`:return`{}`}}}})),EF=i(((e,t)=>{let{format:n,inspect:r}=TF(),{AggregateError:i}=wF(),a=globalThis.AggregateError||i,o=Symbol(`kIsNodeError`),s=[`string`,`function`,`number`,`object`,`Function`,`Object`,`boolean`,`bigint`,`symbol`],c=/^([A-Z][a-z0-9]*)+$/,l={};function u(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function d(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function f(e,t,r){if(typeof t==`function`)return u(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);let i=(t.match(/%[dfijoOs]/g)||[]).length;return u(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),r.length===0?t:n(t,...r)}function p(e,t,n){n||=Error;class r extends n{constructor(...n){super(f(e,t,n))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(r.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),r.prototype.code=e,r.prototype[o]=!0,l[e]=r}function m(e){let t=`__node_internal_`+e.name;return Object.defineProperty(e,`name`,{value:t}),e}function h(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;let n=new a([t,e],t.message);return n.code=t.code,n}return e||t}var g=class extends Error{constructor(e=`The operation was aborted`,t=void 0){if(t!==void 0&&typeof t!=`object`)throw new l.ERR_INVALID_ARG_TYPE(`options`,`Object`,t);super(e,t),this.code=`ABORT_ERR`,this.name=`AbortError`}};p(`ERR_ASSERTION`,`%s`,Error),p(`ERR_INVALID_ARG_TYPE`,(e,t,n)=>{u(typeof e==`string`,`'name' must be a string`),Array.isArray(t)||(t=[t]);let i=`The `;e.endsWith(` argument`)?i+=`${e} `:i+=`"${e}" ${e.includes(`.`)?`property`:`argument`} `,i+=`must be `;let a=[],o=[],l=[];for(let e of t)u(typeof e==`string`,`All expected entries have to be of type string`),s.includes(e)?a.push(e.toLowerCase()):c.test(e)?o.push(e):(u(e!==`object`,`The value "object" should be written as "Object"`),l.push(e));if(o.length>0){let e=a.indexOf(`object`);e!==-1&&(a.splice(a,e,1),o.push(`Object`))}if(a.length>0){switch(a.length){case 1:i+=`of type ${a[0]}`;break;case 2:i+=`one of type ${a[0]} or ${a[1]}`;break;default:{let e=a.pop();i+=`one of type ${a.join(`, `)}, or ${e}`}}(o.length>0||l.length>0)&&(i+=` or `)}if(o.length>0){switch(o.length){case 1:i+=`an instance of ${o[0]}`;break;case 2:i+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let e=o.pop();i+=`an instance of ${o.join(`, `)}, or ${e}`}}l.length>0&&(i+=` or `)}switch(l.length){case 0:break;case 1:l[0].toLowerCase()!==l[0]&&(i+=`an `),i+=`${l[0]}`;break;case 2:i+=`one of ${l[0]} or ${l[1]}`;break;default:{let e=l.pop();i+=`one of ${l.join(`, `)}, or ${e}`}}if(n==null)i+=`. Received ${n}`;else if(typeof n==`function`&&n.name)i+=`. Received function ${n.name}`;else if(typeof n==`object`){var d;if((d=n.constructor)!=null&&d.name)i+=`. Received an instance of ${n.constructor.name}`;else{let e=r(n,{depth:-1});i+=`. Received ${e}`}}else{let e=r(n,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),i+=`. Received type ${typeof n} (${e})`}return i},TypeError),p(`ERR_INVALID_ARG_VALUE`,(e,t,n=`is invalid`)=>{let i=r(t);return i.length>128&&(i=i.slice(0,128)+`...`),`The ${e.includes(`.`)?`property`:`argument`} '${e}' ${n}. Received ${i}`},TypeError),p(`ERR_INVALID_RETURN_VALUE`,(e,t,n)=>{var r;return`Expected ${e} to be returned from the "${t}" function but got ${n!=null&&(r=n.constructor)!=null&&r.name?`instance of ${n.constructor.name}`:`type ${typeof n}`}.`},TypeError),p(`ERR_MISSING_ARGS`,(...e)=>{u(e.length>0,`At least one arg needs to be specified`);let t,n=e.length;switch(e=(Array.isArray(e)?e:[e]).map(e=>`"${e}"`).join(` or `),n){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{let n=e.pop();t+=`The ${e.join(`, `)}, and ${n} arguments`}break}return`${t} must be specified`},TypeError),p(`ERR_OUT_OF_RANGE`,(e,t,n)=>{u(t,`Missing "range" argument`);let i;if(Number.isInteger(n)&&Math.abs(n)>2**32)i=d(String(n));else if(typeof n==`bigint`){i=String(n);let e=BigInt(2)**BigInt(32);(n>e||n<-e)&&(i=d(i)),i+=`n`}else i=r(n);return`The value of "${e}" is out of range. It must be ${t}. Received ${i}`},RangeError),p(`ERR_MULTIPLE_CALLBACK`,`Callback called multiple times`,Error),p(`ERR_METHOD_NOT_IMPLEMENTED`,`The %s method is not implemented`,Error),p(`ERR_STREAM_ALREADY_FINISHED`,`Cannot call %s after a stream was finished`,Error),p(`ERR_STREAM_CANNOT_PIPE`,`Cannot pipe, not readable`,Error),p(`ERR_STREAM_DESTROYED`,`Cannot call %s after a stream was destroyed`,Error),p(`ERR_STREAM_NULL_VALUES`,`May not write null values to stream`,TypeError),p(`ERR_STREAM_PREMATURE_CLOSE`,`Premature close`,Error),p(`ERR_STREAM_PUSH_AFTER_EOF`,`stream.push() after EOF`,Error),p(`ERR_STREAM_UNSHIFT_AFTER_END_EVENT`,`stream.unshift() after end event`,Error),p(`ERR_STREAM_WRITE_AFTER_END`,`write after end`,Error),p(`ERR_UNKNOWN_ENCODING`,`Unknown encoding: %s`,TypeError),t.exports={AbortError:g,aggregateTwoErrors:m(h),hideStackFrames:m,codes:l}})),DF=i(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});let n=new WeakMap,r=new WeakMap;function i(e){let t=n.get(e);return console.assert(t!=null,`'this' is expected an Event object, but got`,e),t}function a(e){if(e.passiveListener!=null){typeof console<`u`&&typeof console.error==`function`&&console.error(`Unable to preventDefault inside passive event listener invocation.`,e.passiveListener);return}e.event.cancelable&&(e.canceled=!0,typeof e.event.preventDefault==`function`&&e.event.preventDefault())}function o(e,t){n.set(this,{eventTarget:e,event:t,eventPhase:2,currentTarget:e,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:t.timeStamp||Date.now()}),Object.defineProperty(this,`isTrusted`,{value:!1,enumerable:!0});let r=Object.keys(t);for(let e=0;e0){let e=Array(arguments.length);for(let t=0;t{Object.defineProperty(e,`__esModule`,{value:!0});var n=DF(),r=class extends n.EventTarget{constructor(){throw super(),TypeError(`AbortSignal cannot be constructed directly`)}get aborted(){let e=o.get(this);if(typeof e!=`boolean`)throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?`null`:typeof this}`);return e}};n.defineEventAttribute(r.prototype,`abort`);function i(){let e=Object.create(r.prototype);return n.EventTarget.call(e),o.set(e,!1),e}function a(e){o.get(e)===!1&&(o.set(e,!0),e.dispatchEvent({type:`abort`}))}let o=new WeakMap;Object.defineProperties(r.prototype,{aborted:{enumerable:!0}}),typeof Symbol==`function`&&typeof Symbol.toStringTag==`symbol`&&Object.defineProperty(r.prototype,Symbol.toStringTag,{configurable:!0,value:`AbortSignal`});var s=class{constructor(){c.set(this,i())}get signal(){return l(this)}abort(){a(l(this))}};let c=new WeakMap;function l(e){let t=c.get(e);if(t==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${e===null?`null`:typeof e}`);return t}Object.defineProperties(s.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==`function`&&typeof Symbol.toStringTag==`symbol`&&Object.defineProperty(s.prototype,Symbol.toStringTag,{configurable:!0,value:`AbortController`}),e.AbortController=s,e.AbortSignal=r,e.default=s,t.exports=s,t.exports.AbortController=t.exports.default=s,t.exports.AbortSignal=r})),kF=i(((e,n)=>{let r=t(`buffer`),{format:i,inspect:a}=TF(),{codes:{ERR_INVALID_ARG_TYPE:o}}=EF(),{kResistStopPropagation:s,AggregateError:c,SymbolDispose:l}=wF(),u=globalThis.AbortSignal||OF().AbortSignal,d=globalThis.AbortController||OF().AbortController,f=Object.getPrototypeOf(async function(){}).constructor,p=globalThis.Blob||r.Blob,m=p===void 0?function(e){return!1}:function(e){return e instanceof p},h=(e,t)=>{if(e!==void 0&&(typeof e!=`object`||!e||!(`aborted`in e)))throw new o(t,`AbortSignal`,e)},g=(e,t)=>{if(typeof e!=`function`)throw new o(t,`Function`,e)};n.exports={AggregateError:c,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...n){t||(t=!0,e.apply(this,n))}},createDeferredPromise:function(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},promisify(e){return new Promise((t,n)=>{e((e,...r)=>e?n(e):t(...r))})},debuglog(){return function(){}},format:i,inspect:a,types:{isAsyncFunction(e){return e instanceof f},isArrayBufferView(e){return ArrayBuffer.isView(e)}},isBlob:m,deprecate(e,t){return e},addAbortListener:t(`events`).addAbortListener||function(e,t){if(e===void 0)throw new o(`signal`,`AbortSignal`,e);h(e,`signal`),g(t,`listener`);let n;return e.aborted?queueMicrotask(()=>t()):(e.addEventListener(`abort`,t,{__proto__:null,once:!0,[s]:!0}),n=()=>{e.removeEventListener(`abort`,t)}),{__proto__:null,[l](){var e;(e=n)==null||e()}}},AbortSignalAny:u.any||function(e){if(e.length===1)return e[0];let t=new d,n=()=>t.abort();return e.forEach(e=>{h(e,`signals`),e.addEventListener(`abort`,n,{once:!0})}),t.signal.addEventListener(`abort`,()=>{e.forEach(e=>e.removeEventListener(`abort`,n))},{once:!0}),t.signal}},n.exports.promisify.custom=Symbol.for(`nodejs.util.promisify.custom`)})),AF=i(((e,t)=>{let{ArrayIsArray:n,ArrayPrototypeIncludes:r,ArrayPrototypeJoin:i,ArrayPrototypeMap:a,NumberIsInteger:o,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:c,NumberMIN_SAFE_INTEGER:l,NumberParseInt:u,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:f,String:p,StringPrototypeToUpperCase:m,StringPrototypeTrim:h}=wF(),{hideStackFrames:g,codes:{ERR_SOCKET_BAD_PORT:v,ERR_INVALID_ARG_TYPE:y,ERR_INVALID_ARG_VALUE:b,ERR_OUT_OF_RANGE:x,ERR_UNKNOWN_SIGNAL:S}}=EF(),{normalizeEncoding:C}=kF(),{isAsyncFunction:w,isArrayBufferView:T}=kF().types,E={};function D(e){return e===(e|0)}function O(e){return e===e>>>0}let k=/^[0-7]+$/;function A(e,t,n){if(e===void 0&&(e=n),typeof e==`string`){if(f(k,e)===null)throw new b(t,e,`must be a 32-bit unsigned integer or an octal string`);e=u(e,8)}return N(e,t),e}let j=g((e,t,n=l,r=c)=>{if(typeof e!=`number`)throw new y(t,`number`,e);if(!o(e))throw new x(t,`an integer`,e);if(er)throw new x(t,`>= ${n} && <= ${r}`,e)}),M=g((e,t,n=-2147483648,r=2147483647)=>{if(typeof e!=`number`)throw new y(t,`number`,e);if(!o(e))throw new x(t,`an integer`,e);if(er)throw new x(t,`>= ${n} && <= ${r}`,e)}),N=g((e,t,n=!1)=>{if(typeof e!=`number`)throw new y(t,`number`,e);if(!o(e))throw new x(t,`an integer`,e);let r=+!!n,i=4294967295;if(ei)throw new x(t,`>= ${r} && <= ${i}`,e)});function P(e,t){if(typeof e!=`string`)throw new y(t,`string`,e)}function F(e,t,n=void 0,r){if(typeof e!=`number`)throw new y(t,`number`,e);if(n!=null&&er||(n!=null||r!=null)&&s(e))throw new x(t,`${n==null?``:`>= ${n}`}${n!=null&&r!=null?` && `:``}${r==null?``:`<= ${r}`}`,e)}let I=g((e,t,n)=>{if(!r(n,e))throw new b(t,e,`must be one of: `+i(a(n,e=>typeof e==`string`?`'${e}'`:p(e)),`, `))});function L(e,t){if(typeof e!=`boolean`)throw new y(t,`boolean`,e)}function R(e,t,n){return e==null||!d(e,t)?n:e[t]}let z=g((e,t,r=null)=>{let i=R(r,`allowArray`,!1),a=R(r,`allowFunction`,!1);if(!R(r,`nullable`,!1)&&e===null||!i&&n(e)||typeof e!=`object`&&(!a||typeof e!=`function`))throw new y(t,`Object`,e)}),ee=g((e,t)=>{if(e!=null&&typeof e!=`object`&&typeof e!=`function`)throw new y(t,`a dictionary`,e)}),B=g((e,t,r=0)=>{if(!n(e))throw new y(t,`Array`,e);if(e.length{if(!T(e))throw new y(t,[`Buffer`,`TypedArray`,`DataView`],e)});function ie(e,t){let n=C(t),r=e.length;if(n===`hex`&&r%2!=0)throw new b(`encoding`,t,`is invalid for data of length ${r}`)}function ae(e,t=`Port`,n=!0){if(typeof e!=`number`&&typeof e!=`string`||typeof e==`string`&&h(e).length===0||+e!=e>>>0||e>65535||e===0&&!n)throw new v(t,e,n);return e|0}let oe=g((e,t)=>{if(e!==void 0&&(typeof e!=`object`||!e||!(`aborted`in e)))throw new y(t,`AbortSignal`,e)}),se=g((e,t)=>{if(typeof e!=`function`)throw new y(t,`Function`,e)}),ce=g((e,t)=>{if(typeof e!=`function`||w(e))throw new y(t,`Function`,e)}),le=g((e,t)=>{if(e!==void 0)throw new y(t,`undefined`,e)});function ue(e,t,n){if(!r(n,e))throw new y(t,`('${i(n,`|`)}')`,e)}let de=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function fe(e,t){if(e===void 0||!f(de,e))throw new b(t,e,`must be an array or string of format "; rel=preload; as=style"`)}function pe(e){if(typeof e==`string`)return fe(e,`hints`),e;if(n(e)){let t=e.length,n=``;if(t===0)return n;for(let r=0;r; rel=preload; as=style"`)}t.exports={isInt32:D,isUint32:O,parseFileMode:A,validateArray:B,validateStringArray:te,validateBooleanArray:V,validateAbortSignalArray:ne,validateBoolean:L,validateBuffer:H,validateDictionary:ee,validateEncoding:ie,validateFunction:se,validateInt32:M,validateInteger:j,validateNumber:F,validateObject:z,validateOneOf:I,validatePlainFunction:ce,validatePort:ae,validateSignalName:re,validateString:P,validateUint32:N,validateUndefined:le,validateUnion:ue,validateAbortSignal:oe,validateLinkHeaderValue:pe}})),jF=i(((e,t)=>{t.exports=global.process})),MF=i(((e,t)=>{let{SymbolAsyncIterator:n,SymbolIterator:r,SymbolFor:i}=wF(),a=i(`nodejs.stream.destroyed`),o=i(`nodejs.stream.errored`),s=i(`nodejs.stream.readable`),c=i(`nodejs.stream.writable`),l=i(`nodejs.stream.disturbed`),u=i(`nodejs.webstream.isClosedPromise`),d=i(`nodejs.webstream.controllerErrorFunction`);function f(e,t=!1){return!!(e&&typeof e.pipe==`function`&&typeof e.on==`function`&&(!t||typeof e.pause==`function`&&typeof e.resume==`function`)&&(!e._writableState||e._readableState?.readable!==!1)&&(!e._writableState||e._readableState))}function p(e){return!!(e&&typeof e.write==`function`&&typeof e.on==`function`&&(!e._readableState||e._writableState?.writable!==!1))}function m(e){return!!(e&&typeof e.pipe==`function`&&e._readableState&&typeof e.on==`function`&&typeof e.write==`function`)}function h(e){return e&&(e._readableState||e._writableState||typeof e.write==`function`&&typeof e.on==`function`||typeof e.pipe==`function`&&typeof e.on==`function`)}function g(e){return!!(e&&!h(e)&&typeof e.pipeThrough==`function`&&typeof e.getReader==`function`&&typeof e.cancel==`function`)}function v(e){return!!(e&&!h(e)&&typeof e.getWriter==`function`&&typeof e.abort==`function`)}function y(e){return!!(e&&!h(e)&&typeof e.readable==`object`&&typeof e.writable==`object`)}function b(e){return g(e)||v(e)||y(e)}function x(e,t){return e==null?!1:t===!0?typeof e[n]==`function`:t===!1?typeof e[r]==`function`:typeof e[n]==`function`||typeof e[r]==`function`}function S(e){if(!h(e))return null;let t=e._writableState,n=e._readableState,r=t||n;return!!(e.destroyed||e[a]||r!=null&&r.destroyed)}function C(e){if(!p(e))return null;if(e.writableEnded===!0)return!0;let t=e._writableState;return t!=null&&t.errored?!1:typeof t?.ended==`boolean`?t.ended:null}function w(e,t){if(!p(e))return null;if(e.writableFinished===!0)return!0;let n=e._writableState;return n!=null&&n.errored?!1:typeof n?.finished==`boolean`?!!(n.finished||t===!1&&n.ended===!0&&n.length===0):null}function T(e){if(!f(e))return null;if(e.readableEnded===!0)return!0;let t=e._readableState;return!t||t.errored?!1:typeof t?.ended==`boolean`?t.ended:null}function E(e,t){if(!f(e))return null;let n=e._readableState;return n!=null&&n.errored?!1:typeof n?.endEmitted==`boolean`?!!(n.endEmitted||t===!1&&n.ended===!0&&n.length===0):null}function D(e){return e&&e[s]!=null?e[s]:typeof e?.readable==`boolean`?S(e)?!1:f(e)&&e.readable&&!E(e):null}function O(e){return e&&e[c]!=null?e[c]:typeof e?.writable==`boolean`?S(e)?!1:p(e)&&e.writable&&!C(e):null}function k(e,t){return h(e)?S(e)?!0:!(t?.readable!==!1&&D(e)||t?.writable!==!1&&O(e)):null}function A(e){return h(e)?e.writableErrored?e.writableErrored:e._writableState?.errored??null:null}function j(e){return h(e)?e.readableErrored?e.readableErrored:e._readableState?.errored??null:null}function M(e){if(!h(e))return null;if(typeof e.closed==`boolean`)return e.closed;let t=e._writableState,n=e._readableState;return typeof t?.closed==`boolean`||typeof n?.closed==`boolean`?t?.closed||n?.closed:typeof e._closed==`boolean`&&N(e)?e._closed:null}function N(e){return typeof e._closed==`boolean`&&typeof e._defaultKeepAlive==`boolean`&&typeof e._removedConnection==`boolean`&&typeof e._removedContLen==`boolean`}function P(e){return typeof e._sent100==`boolean`&&N(e)}function F(e){return typeof e._consuming==`boolean`&&typeof e._dumped==`boolean`&&e.req?.upgradeOrConnect===void 0}function I(e){if(!h(e))return null;let t=e._writableState,n=e._readableState,r=t||n;return!r&&P(e)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function L(e){return!!(e&&(e[l]??(e.readableDidRead||e.readableAborted)))}function R(e){return!!(e&&(e[o]??e.readableErrored??e.writableErrored??e._readableState?.errorEmitted??e._writableState?.errorEmitted??e._readableState?.errored??e._writableState?.errored))}t.exports={isDestroyed:S,kIsDestroyed:a,isDisturbed:L,kIsDisturbed:l,isErrored:R,kIsErrored:o,isReadable:D,kIsReadable:s,kIsClosedPromise:u,kControllerErrorFunction:d,kIsWritable:c,isClosed:M,isDuplexNodeStream:m,isFinished:k,isIterable:x,isReadableNodeStream:f,isReadableStream:g,isReadableEnded:T,isReadableFinished:E,isReadableErrored:j,isNodeStream:h,isWebStream:b,isWritable:O,isWritableNodeStream:p,isWritableStream:v,isWritableEnded:C,isWritableFinished:w,isWritableErrored:A,isServerRequest:F,isServerResponse:P,willEmitClose:I,isTransformStream:y}})),NF=i(((e,t)=>{let n=jF(),{AbortError:r,codes:i}=EF(),{ERR_INVALID_ARG_TYPE:a,ERR_STREAM_PREMATURE_CLOSE:o}=i,{kEmptyObject:s,once:c}=kF(),{validateAbortSignal:l,validateFunction:u,validateObject:d,validateBoolean:f}=AF(),{Promise:p,PromisePrototypeThen:m,SymbolDispose:h}=wF(),{isClosed:g,isReadable:v,isReadableNodeStream:y,isReadableStream:b,isReadableFinished:x,isReadableErrored:S,isWritable:C,isWritableNodeStream:w,isWritableStream:T,isWritableFinished:E,isWritableErrored:D,isNodeStream:O,willEmitClose:k,kIsClosedPromise:A}=MF(),j;function M(e){return e.setHeader&&typeof e.abort==`function`}let N=()=>{};function P(e,t,i){if(arguments.length===2?(i=t,t=s):t==null?t=s:d(t,`options`),u(i,`callback`),l(t.signal,`options.signal`),i=c(i),b(e)||T(e))return F(e,t,i);if(!O(e))throw new a(`stream`,[`ReadableStream`,`WritableStream`,`Stream`],e);let f=t.readable??y(e),p=t.writable??w(e),m=e._writableState,A=e._readableState,P=()=>{e.writable||R()},I=k(e)&&y(e)===f&&w(e)===p,L=E(e,!1),R=()=>{L=!0,e.destroyed&&(I=!1),!(I&&(!e.readable||f))&&(!f||z)&&i.call(e)},z=x(e,!1),ee=()=>{z=!0,e.destroyed&&(I=!1),!(I&&(!e.writable||p))&&(!p||L)&&i.call(e)},B=t=>{i.call(e,t)},te=g(e),V=()=>{te=!0;let t=D(e)||S(e);if(t&&typeof t!=`boolean`)return i.call(e,t);if(f&&!z&&y(e,!0)&&!x(e,!1)||p&&!L&&!E(e,!1))return i.call(e,new o);i.call(e)},ne=()=>{te=!0;let t=D(e)||S(e);if(t&&typeof t!=`boolean`)return i.call(e,t);i.call(e)},re=()=>{e.req.on(`finish`,R)};M(e)?(e.on(`complete`,R),I||e.on(`abort`,V),e.req?re():e.on(`request`,re)):p&&!m&&(e.on(`end`,P),e.on(`close`,P)),!I&&typeof e.aborted==`boolean`&&e.on(`aborted`,V),e.on(`end`,ee),e.on(`finish`,R),t.error!==!1&&e.on(`error`,B),e.on(`close`,V),te?n.nextTick(V):m!=null&&m.errorEmitted||A!=null&&A.errorEmitted?I||n.nextTick(ne):(!f&&(!I||v(e))&&(L||C(e)===!1)||!p&&(!I||C(e))&&(z||v(e)===!1)||A&&e.req&&e.aborted)&&n.nextTick(ne);let H=()=>{i=N,e.removeListener(`aborted`,V),e.removeListener(`complete`,R),e.removeListener(`abort`,V),e.removeListener(`request`,re),e.req&&e.req.removeListener(`finish`,R),e.removeListener(`end`,P),e.removeListener(`close`,P),e.removeListener(`finish`,R),e.removeListener(`end`,ee),e.removeListener(`error`,B),e.removeListener(`close`,V)};if(t.signal&&!te){let a=()=>{let n=i;H(),n.call(e,new r(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(a);else{j||=kF().addAbortListener;let n=j(t.signal,a),r=i;i=c((...t)=>{n[h](),r.apply(e,t)})}}return H}function F(e,t,i){let a=!1,o=N;if(t.signal)if(o=()=>{a=!0,i.call(e,new r(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(o);else{j||=kF().addAbortListener;let n=j(t.signal,o),r=i;i=c((...t)=>{n[h](),r.apply(e,t)})}let s=(...t)=>{a||n.nextTick(()=>i.apply(e,t))};return m(e[A].promise,s,s),N}function I(e,t){var n;let r=!1;return t===null&&(t=s),(n=t)!=null&&n.cleanup&&(f(t.cleanup,`cleanup`),r=t.cleanup),new p((n,i)=>{let a=P(e,t,e=>{r&&a(),e?i(e):n()})})}t.exports=P,t.exports.finished=I})),PF=i(((e,t)=>{let n=jF(),{aggregateTwoErrors:r,codes:{ERR_MULTIPLE_CALLBACK:i},AbortError:a}=EF(),{Symbol:o}=wF(),{kIsDestroyed:s,isDestroyed:c,isFinished:l,isServerRequest:u}=MF(),d=o(`kDestroy`),f=o(`kConstruct`);function p(e,t,n){e&&(e.stack,t&&!t.errored&&(t.errored=e),n&&!n.errored&&(n.errored=e))}function m(e,t){let n=this._readableState,i=this._writableState,a=i||n;return i!=null&&i.destroyed||n!=null&&n.destroyed?(typeof t==`function`&&t(),this):(p(e,i,n),i&&(i.destroyed=!0),n&&(n.destroyed=!0),a.constructed?h(this,e,t):this.once(d,function(n){h(this,r(n,e),t)}),this)}function h(e,t,r){let i=!1;function a(t){if(i)return;i=!0;let a=e._readableState,o=e._writableState;p(t,o,a),o&&(o.closed=!0),a&&(a.closed=!0),typeof r==`function`&&r(t),t?n.nextTick(g,e,t):n.nextTick(v,e)}try{e._destroy(t||null,a)}catch(e){a(e)}}function g(e,t){y(e,t),v(e)}function v(e){let t=e._readableState,n=e._writableState;n&&(n.closeEmitted=!0),t&&(t.closeEmitted=!0),(n!=null&&n.emitClose||t!=null&&t.emitClose)&&e.emit(`close`)}function y(e,t){let n=e._readableState,r=e._writableState;r!=null&&r.errorEmitted||n!=null&&n.errorEmitted||(r&&(r.errorEmitted=!0),n&&(n.errorEmitted=!0),e.emit(`error`,t))}function b(){let e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=e.readable===!1,e.endEmitted=e.readable===!1),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=t.writable===!1,t.ending=t.writable===!1,t.finished=t.writable===!1)}function x(e,t,r){let i=e._readableState,a=e._writableState;if(a!=null&&a.destroyed||i!=null&&i.destroyed)return this;i!=null&&i.autoDestroy||a!=null&&a.autoDestroy?e.destroy(t):t&&(t.stack,a&&!a.errored&&(a.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(y,e,t):y(e,t))}function S(e,t){if(typeof e._construct!=`function`)return;let r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(f,t),!(e.listenerCount(f)>1)&&n.nextTick(C,e)}function C(e){let t=!1;function r(r){if(t){x(e,r??new i);return}t=!0;let a=e._readableState,o=e._writableState,s=o||a;a&&(a.constructed=!0),o&&(o.constructed=!0),s.destroyed?e.emit(d,r):r?x(e,r,!0):n.nextTick(w,e)}try{e._construct(e=>{n.nextTick(r,e)})}catch(e){n.nextTick(r,e)}}function w(e){e.emit(f)}function T(e){return e?.setHeader&&typeof e.abort==`function`}function E(e){e.emit(`close`)}function D(e,t){e.emit(`error`,t),n.nextTick(E,e)}function O(e,t){!e||c(e)||(!t&&!l(e)&&(t=new a),u(e)?(e.socket=null,e.destroy(t)):T(e)?e.abort():T(e.req)?e.req.abort():typeof e.destroy==`function`?e.destroy(t):typeof e.close==`function`?e.close():t?n.nextTick(D,e,t):n.nextTick(E,e),e.destroyed||(e[s]=!0))}t.exports={construct:S,destroyer:O,destroy:m,undestroy:b,errorOrDestroy:x}})),FF=i(((e,n)=>{let{ArrayIsArray:r,ObjectSetPrototypeOf:i}=wF(),{EventEmitter:a}=t(`events`);function o(e){a.call(this,e)}i(o.prototype,a.prototype),i(o,a),o.prototype.pipe=function(e,t){let n=this;function r(t){e.writable&&e.write(t)===!1&&n.pause&&n.pause()}n.on(`data`,r);function i(){n.readable&&n.resume&&n.resume()}e.on(`drain`,i),!e._isStdio&&(!t||t.end!==!1)&&(n.on(`end`,c),n.on(`close`,l));let o=!1;function c(){o||(o=!0,e.end())}function l(){o||(o=!0,typeof e.destroy==`function`&&e.destroy())}function u(e){d(),a.listenerCount(this,`error`)===0&&this.emit(`error`,e)}s(n,`error`,u),s(e,`error`,u);function d(){n.removeListener(`data`,r),e.removeListener(`drain`,i),n.removeListener(`end`,c),n.removeListener(`close`,l),n.removeListener(`error`,u),e.removeListener(`error`,u),n.removeListener(`end`,d),n.removeListener(`close`,d),e.removeListener(`close`,d)}return n.on(`end`,d),n.on(`close`,d),e.on(`close`,d),e.emit(`pipe`,n),e};function s(e,t,n){if(typeof e.prependListener==`function`)return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):r(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}n.exports={Stream:o,prependListener:s}})),IF=i(((e,t)=>{let{SymbolDispose:n}=wF(),{AbortError:r,codes:i}=EF(),{isNodeStream:a,isWebStream:o,kControllerErrorFunction:s}=MF(),c=NF(),{ERR_INVALID_ARG_TYPE:l}=i,u,d=(e,t)=>{if(typeof e!=`object`||!(`aborted`in e))throw new l(t,`AbortSignal`,e)};t.exports.addAbortSignal=function(e,n){if(d(e,`signal`),!a(n)&&!o(n))throw new l(`stream`,[`ReadableStream`,`WritableStream`,`Stream`],n);return t.exports.addAbortSignalNoValidate(e,n)},t.exports.addAbortSignalNoValidate=function(e,t){if(typeof e!=`object`||!(`aborted`in e))return t;let i=a(t)?()=>{t.destroy(new r(void 0,{cause:e.reason}))}:()=>{t[s](new r(void 0,{cause:e.reason}))};return e.aborted?i():(u||=kF().addAbortListener,c(t,u(e,i)[n])),t}})),LF=i(((e,n)=>{let{StringPrototypeSlice:r,SymbolIterator:i,TypedArrayPrototypeSet:a,Uint8Array:o}=wF(),{Buffer:s}=t(`buffer`),{inspect:c}=kF();n.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){let t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){let t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length}shift(){if(this.length===0)return;let e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(this.length===0)return``;let t=this.head,n=``+t.data;for(;(t=t.next)!==null;)n+=e+t.data;return n}concat(e){if(this.length===0)return s.alloc(0);let t=s.allocUnsafe(e>>>0),n=this.head,r=0;for(;n;)a(t,n.data,r),r+=n.data.length,n=n.next;return t}consume(e,t){let n=this.head.data;if(ea.length)t+=a,e-=a.length;else{e===a.length?(t+=a,++i,n.next?this.head=n.next:this.head=this.tail=null):(t+=r(a,0,e),this.head=n,n.data=r(a,e));break}++i}while((n=n.next)!==null);return this.length-=i,t}_getBuffer(e){let t=s.allocUnsafe(e),n=e,r=this.head,i=0;do{let s=r.data;if(e>s.length)a(t,s,n-e),e-=s.length;else{e===s.length?(a(t,s,n-e),++i,r.next?this.head=r.next:this.head=this.tail=null):(a(t,new o(s.buffer,s.byteOffset,e),n-e),this.head=r,r.data=s.slice(e));break}++i}while((r=r.next)!==null);return this.length-=i,t}[Symbol.for(`nodejs.util.inspect.custom`)](e,t){return c(this,{...t,depth:0,customInspect:!1})}}})),RF=i(((e,t)=>{let{MathFloor:n,NumberIsInteger:r}=wF(),{validateInteger:i}=AF(),{ERR_INVALID_ARG_VALUE:a}=EF().codes,o=16*1024,s=16;function c(e,t,n){return e.highWaterMark==null?t?e[n]:null:e.highWaterMark}function l(e){return e?s:o}function u(e,t){i(t,`value`,0),e?s=t:o=t}function d(e,t,i,o){let s=c(t,o,i);if(s!=null){if(!r(s)||s<0)throw new a(o?`options.${i}`:`options.highWaterMark`,s);return n(s)}return l(e.objectMode)}t.exports={getHighWaterMark:d,getDefaultHighWaterMark:l,setDefaultHighWaterMark:u}})),zF=i(((e,n)=>{ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ -var r=t(`buffer`),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?n.exports=r:(a(r,e),e.Buffer=o);function o(e,t,n){return i(e,t,n)}o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return i(e,t,n)},o.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var r=i(e);return t===void 0?r.fill(0):typeof n==`string`?r.fill(t,n):r.fill(t),r},o.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return i(e)},o.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r.SlowBuffer(e)}})),fN=i((e=>{var t=dN().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:case`raw`:return!0;default:return!1}};function r(e){if(!e)return`utf8`;for(var t;;)switch(e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):``}})),pN=i(((e,n)=>{let r=rN(),{PromisePrototypeThen:i,SymbolAsyncIterator:a,SymbolIterator:o}=XM(),{Buffer:s}=t(`buffer`),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:l}=QM().codes;function u(e,t,n){let u;if(typeof t==`string`||t instanceof s)return new e({objectMode:!0,...n,read(){this.push(t),this.push(null)}});let d;if(t&&t[a])d=!0,u=t[a]();else if(t&&t[o])d=!1,u=t[o]();else throw new c(`iterable`,[`Iterable`],t);let f=new e({objectMode:!0,highWaterMark:1,...n}),p=!1;f._read=function(){p||(p=!0,h())},f._destroy=function(e,t){i(m(e),()=>r.nextTick(t,e),n=>r.nextTick(t,n||e))};async function m(e){let t=e!=null,n=typeof u.throw==`function`;if(t&&n){let{value:t,done:n}=await u.throw(e);if(await t,n)return}if(typeof u.return==`function`){let{value:e}=await u.return();await e}}async function h(){for(;;){try{let{value:e,done:t}=d?await u.next():u.next();if(t)f.push(null);else{let t=e&&typeof e.then==`function`?await e:e;if(t===null)throw p=!1,new l;if(f.push(t))continue;p=!1}}catch(e){f.destroy(e)}break}}return f}n.exports=u})),mN=i(((e,n)=>{let r=rN(),{ArrayPrototypeIndexOf:i,NumberIsInteger:a,NumberIsNaN:o,NumberParseInt:s,ObjectDefineProperties:c,ObjectKeys:l,ObjectSetPrototypeOf:u,Promise:d,SafeSet:f,SymbolAsyncDispose:p,SymbolAsyncIterator:m,Symbol:h}=XM();n.exports=H,H.ReadableState=re;let{EventEmitter:g}=t(`events`),{Stream:v,prependListener:y}=sN(),{Buffer:b}=t(`buffer`),{addAbortSignal:x}=cN(),S=aN(),C=tN().debuglog(`stream`,e=>{C=e}),w=lN(),T=oN(),{getHighWaterMark:E,getDefaultHighWaterMark:D}=uN(),{aggregateTwoErrors:O,codes:{ERR_INVALID_ARG_TYPE:k,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_OUT_OF_RANGE:j,ERR_STREAM_PUSH_AFTER_EOF:M,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:P}=QM(),{validateObject:F}=nN(),I=h(`kPaused`),{StringDecoder:L}=fN(),R=pN();u(H.prototype,v.prototype),u(H,v);let z=()=>{},{errorOrDestroy:ee}=T,B=2048,te=4096,V=65536;function ne(e){return{enumerable:!1,get(){return(this.state&e)!==0},set(t){t?this.state|=e:this.state&=~e}}}c(re.prototype,{objectMode:ne(1),ended:ne(2),endEmitted:ne(4),reading:ne(8),constructed:ne(16),sync:ne(32),needReadable:ne(64),emittedReadable:ne(128),readableListening:ne(256),resumeScheduled:ne(512),errorEmitted:ne(1024),emitClose:ne(B),autoDestroy:ne(te),destroyed:ne(8192),closed:ne(16384),closeEmitted:ne(32768),multiAwaitDrain:ne(V),readingMore:ne(131072),dataEmitted:ne(262144)});function re(e,t,n){typeof n!=`boolean`&&(n=t instanceof _N()),this.state=6192,e&&e.objectMode&&(this.state|=1),n&&e&&e.readableObjectMode&&(this.state|=1),this.highWaterMark=e?E(this,e,`readableHighWaterMark`,n):D(!1),this.buffer=new w,this.length=0,this.pipes=[],this.flowing=null,this[I]=null,e&&e.emitClose===!1&&(this.state&=~B),e&&e.autoDestroy===!1&&(this.state&=~te),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||`utf8`,this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new L(e.encoding),this.encoding=e.encoding)}function H(e){if(!(this instanceof H))return new H(e);let t=this instanceof _N();this._readableState=new re(e,this,t),e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.construct==`function`&&(this._construct=e.construct),e.signal&&!t&&x(e.signal,this)),v.call(this,e),T.construct(this,()=>{this._readableState.needReadable&&de(this,this._readableState)})}H.prototype.destroy=T.destroy,H.prototype._undestroy=T.undestroy,H.prototype._destroy=function(e,t){t(e)},H.prototype[g.captureRejectionSymbol]=function(e){this.destroy(e)},H.prototype[p]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new P,this.destroy(e)),new d((t,n)=>S(this,r=>r&&r!==e?n(r):t(null)))},H.prototype.push=function(e,t){return ie(this,e,t,!1)},H.prototype.unshift=function(e,t){return ie(this,e,t,!0)};function ie(e,t,n,r){C(`readableAddChunk`,t);let i=e._readableState,a;if(i.state&1||(typeof t==`string`?(n||=i.defaultEncoding,i.encoding!==n&&(r&&i.encoding?t=b.from(t,n).toString(i.encoding):(t=b.from(t,n),n=``))):t instanceof b?n=``:v._isUint8Array(t)?(t=v._uint8ArrayToBuffer(t),n=``):t!=null&&(a=new k(`chunk`,[`string`,`Buffer`,`Uint8Array`],t))),a)ee(e,a);else if(t===null)i.state&=-9,ce(e,i);else if(i.state&1||t&&t.length>0)if(r)if(i.state&4)ee(e,new N);else if(i.destroyed||i.errored)return!1;else ae(e,i,t,!0);else if(i.ended)ee(e,new M);else if(i.destroyed||i.errored)return!1;else i.state&=-9,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||t.length!==0?ae(e,i,t,!1):de(e,i)):ae(e,i,t,!1);else r||(i.state&=-9,de(e,i));return!i.ended&&(i.length0?((t.state&V)===0?t.awaitDrainWriters=null:t.awaitDrainWriters.clear(),t.dataEmitted=!0,e.emit(`data`,n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.state&64&&le(e)),de(e,t)}H.prototype.isPaused=function(){let e=this._readableState;return e[I]===!0||e.flowing===!1},H.prototype.setEncoding=function(e){let t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;let n=this._readableState.buffer,r=``;for(let e of n)r+=t.write(e);return n.clear(),r!==``&&n.push(r),this._readableState.length=r.length,this};function oe(e){if(e>1073741824)throw new j(`size`,`<= 1GiB`,e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++,e}function se(e,t){return e<=0||t.length===0&&t.ended?0:t.state&1?1:o(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}H.prototype.read=function(e){C(`read`,e),e===void 0?e=NaN:a(e)||(e=s(e,10));let t=this._readableState,n=e;if(e>t.highWaterMark&&(t.highWaterMark=oe(e)),e!==0&&(t.state&=-129),e===0&&t.needReadable&&((t.highWaterMark===0?t.length>0:t.length>=t.highWaterMark)||t.ended))return C(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?xe(this):le(this),null;if(e=se(e,t),e===0&&t.ended)return t.length===0&&xe(this),null;let r=(t.state&64)!=0;if(C(`need readable`,r),(t.length===0||t.length-e0?be(e,t):null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&xe(this)),i!==null&&!t.errorEmitted&&!t.closeEmitted&&(t.dataEmitted=!0,this.emit(`data`,i)),i};function ce(e,t){if(C(`onEofChunk`),!t.ended){if(t.decoder){let e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?le(e):(t.needReadable=!1,t.emittedReadable=!0,ue(e))}}function le(e){let t=e._readableState;C(`emitReadable`,t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(C(`emitReadable`,t.flowing),t.emittedReadable=!0,r.nextTick(ue,e))}function ue(e){let t=e._readableState;C(`emitReadable_`,t.destroyed,t.length,t.ended),!t.destroyed&&!t.errored&&(t.length||t.ended)&&(e.emit(`readable`),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function de(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,r.nextTick(fe,e,t))}function fe(e,t){for(;!t.reading&&!t.ended&&(t.length1&&i.pipes.includes(e)&&(C(`false write response, pause`,i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),n.pause()),c||(c=pe(n,e),e.on(`drain`,c))}n.on(`data`,p);function p(t){C(`ondata`);let n=e.write(t);C(`dest.write`,n),n===!1&&d()}function m(t){if(C(`onerror`,t),v(),e.removeListener(`error`,m),e.listenerCount(`error`)===0){let n=e._writableState||e._readableState;n&&!n.errorEmitted?ee(e,t):e.emit(`error`,t)}}y(e,`error`,m);function h(){e.removeListener(`finish`,g),v()}e.once(`close`,h);function g(){C(`onfinish`),e.removeListener(`close`,h),v()}e.once(`finish`,g);function v(){C(`unpipe`),n.unpipe(e)}return e.emit(`pipe`,n),e.writableNeedDrain===!0?d():i.flowing||(C(`pipe resume`),n.resume()),e};function pe(e,t){return function(){let n=e._readableState;n.awaitDrainWriters===t?(C(`pipeOnDrain`,1),n.awaitDrainWriters=null):n.multiAwaitDrain&&(C(`pipeOnDrain`,n.awaitDrainWriters.size),n.awaitDrainWriters.delete(t)),(!n.awaitDrainWriters||n.awaitDrainWriters.size===0)&&e.listenerCount(`data`)&&e.resume()}}H.prototype.unpipe=function(e){let t=this._readableState,n={hasUnpiped:!1};if(t.pipes.length===0)return this;if(!e){let e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,i.flowing!==!1&&this.resume()):e===`readable`&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,C(`on readable`,i.length,i.reading),i.length?le(this):i.reading||r.nextTick(he,this)),n},H.prototype.addListener=H.prototype.on,H.prototype.removeListener=function(e,t){let n=v.prototype.removeListener.call(this,e,t);return e===`readable`&&r.nextTick(me,this),n},H.prototype.off=H.prototype.removeListener,H.prototype.removeAllListeners=function(e){let t=v.prototype.removeAllListeners.apply(this,arguments);return(e===`readable`||e===void 0)&&r.nextTick(me,this),t};function me(e){let t=e._readableState;t.readableListening=e.listenerCount(`readable`)>0,t.resumeScheduled&&t[I]===!1?t.flowing=!0:e.listenerCount(`data`)>0?e.resume():t.readableListening||(t.flowing=null)}function he(e){C(`readable nexttick read 0`),e.read(0)}H.prototype.resume=function(){let e=this._readableState;return e.flowing||(C(`resume`),e.flowing=!e.readableListening,ge(this,e)),e[I]=!1,this};function ge(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(_e,e,t))}function _e(e,t){C(`resume`,t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(`resume`),U(e),t.flowing&&!t.reading&&e.read(0)}H.prototype.pause=function(){return C(`call pause flowing=%j`,this._readableState.flowing),this._readableState.flowing!==!1&&(C(`pause`),this._readableState.flowing=!1,this.emit(`pause`)),this._readableState[I]=!0,this};function U(e){let t=e._readableState;for(C(`flow`,t.flowing);t.flowing&&e.read()!==null;);}H.prototype.wrap=function(e){let t=!1;e.on(`data`,n=>{!this.push(n)&&e.pause&&(t=!0,e.pause())}),e.on(`end`,()=>{this.push(null)}),e.on(`error`,e=>{ee(this,e)}),e.on(`close`,()=>{this.destroy()}),e.on(`destroy`,()=>{this.destroy()}),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};let n=l(e);for(let t=1;t{i=e?O(i,e):null,n(),n=z});try{for(;;){let t=e.destroyed?null:e.read();if(t!==null)yield t;else if(i)throw i;else if(i===null)return;else await new d(r)}}catch(e){throw i=O(i,e),i}finally{(i||t?.destroyOnReturn!==!1)&&(i===void 0||e._readableState.autoDestroy)?T.destroyer(e,null):(e.off(`readable`,r),a())}}c(H.prototype,{readable:{__proto__:null,get(){let e=this._readableState;return!!e&&e.readable!==!1&&!e.destroyed&&!e.errorEmitted&&!e.endEmitted},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),c(re.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[I]!==!1},set(e){this[I]=!!e}}}),H._fromList=be;function be(e,t){if(t.length===0)return null;let n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n}function xe(e){let t=e._readableState;C(`endReadable`,t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(Se,t,e))}function Se(e,t){if(C(`endReadableNT`,e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&e.length===0){if(e.endEmitted=!0,t.emit(`end`),t.writable&&t.allowHalfOpen===!1)r.nextTick(Ce,t);else if(e.autoDestroy){let e=t._writableState;(!e||e.autoDestroy&&(e.finished||e.writable===!1))&&t.destroy()}}}function Ce(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}H.from=function(e,t){return R(H,e,t)};let we;function Te(){return we===void 0&&(we={}),we}H.fromWeb=function(e,t){return Te().newStreamReadableFromReadableStream(e,t)},H.toWeb=function(e,t){return Te().newReadableStreamFromStreamReadable(e,t)},H.wrap=function(e,t){return new H({objectMode:e.readableObjectMode??e.objectMode??!0,...t,destroy(t,n){T.destroyer(e,t),n(t)}}).wrap(e)}})),hN=i(((e,n)=>{let r=rN(),{ArrayPrototypeSlice:i,Error:a,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:s,ObjectDefineProperties:c,ObjectSetPrototypeOf:l,StringPrototypeToLowerCase:u,Symbol:d,SymbolHasInstance:f}=XM();n.exports=F,F.WritableState=N;let{EventEmitter:p}=t(`events`),m=sN().Stream,{Buffer:h}=t(`buffer`),g=oN(),{addAbortSignal:v}=cN(),{getHighWaterMark:y,getDefaultHighWaterMark:b}=uN(),{ERR_INVALID_ARG_TYPE:x,ERR_METHOD_NOT_IMPLEMENTED:S,ERR_MULTIPLE_CALLBACK:C,ERR_STREAM_CANNOT_PIPE:w,ERR_STREAM_DESTROYED:T,ERR_STREAM_ALREADY_FINISHED:E,ERR_STREAM_NULL_VALUES:D,ERR_STREAM_WRITE_AFTER_END:O,ERR_UNKNOWN_ENCODING:k}=QM().codes,{errorOrDestroy:A}=g;l(F.prototype,m.prototype),l(F,m);function j(){}let M=d(`kOnFinished`);function N(e,t,n){typeof n!=`boolean`&&(n=t instanceof _N()),this.objectMode=!!(e&&e.objectMode),n&&(this.objectMode=this.objectMode||!!(e&&e.writableObjectMode)),this.highWaterMark=e?y(this,e,`writableHighWaterMark`,n):b(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let r=!!(e&&e.decodeStrings===!1);this.decodeStrings=!r,this.defaultEncoding=e&&e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=ee.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,P(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||e.emitClose!==!1,this.autoDestroy=!e||e.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[M]=[]}function P(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}N.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},s(N.prototype,`bufferedRequestCount`,{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function F(e){let t=this instanceof _N();if(!t&&!o(F,this))return new F(e);this._writableState=new N(e,this,t),e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final),typeof e.construct==`function`&&(this._construct=e.construct),e.signal&&v(e.signal,this)),m.call(this,e),g.construct(this,()=>{let e=this._writableState;e.writing||ne(this,e),ae(this,e)})}s(F,f,{__proto__:null,value:function(e){return o(this,e)?!0:this===F?e&&e._writableState instanceof N:!1}}),F.prototype.pipe=function(){A(this,new w)};function I(e,t,n,i){let a=e._writableState;if(typeof n==`function`)i=n,n=a.defaultEncoding;else{if(!n)n=a.defaultEncoding;else if(n!==`buffer`&&!h.isEncoding(n))throw new k(n);typeof i!=`function`&&(i=j)}if(t===null)throw new D;if(!a.objectMode)if(typeof t==`string`)a.decodeStrings!==!1&&(t=h.from(t,n),n=`buffer`);else if(t instanceof h)n=`buffer`;else if(m._isUint8Array(t))t=m._uint8ArrayToBuffer(t),n=`buffer`;else throw new x(`chunk`,[`string`,`Buffer`,`Uint8Array`],t);let o;return a.ending?o=new O:a.destroyed&&(o=new T(`write`)),o?(r.nextTick(i,o),A(e,o,!0),o):(a.pendingcb++,L(e,a,t,n,i))}F.prototype.write=function(e,t,n){return I(this,e,t,n)===!0},F.prototype.cork=function(){this._writableState.corked++},F.prototype.uncork=function(){let e=this._writableState;e.corked&&(e.corked--,e.writing||ne(this,e))},F.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=u(e)),!h.isEncoding(e))throw new k(e);return this._writableState.defaultEncoding=e,this};function L(e,t,n,r,i){let a=t.objectMode?1:n.length;t.length+=a;let o=t.lengthn.bufferedIndex&&ne(e,n),i?n.afterWriteTickInfo!==null&&n.afterWriteTickInfo.cb===a?n.afterWriteTickInfo.count++:(n.afterWriteTickInfo={count:1,cb:a,stream:e,state:n},r.nextTick(B,n.afterWriteTickInfo)):te(e,n,1,a))}function B({stream:e,state:t,count:n,cb:r}){return t.afterWriteTickInfo=null,te(e,t,n,r)}function te(e,t,n,r){for(!t.ending&&!e.destroyed&&t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit(`drain`));n-- >0;)t.pendingcb--,r();t.destroyed&&V(t),ae(e,t)}function V(e){if(e.writing)return;for(let t=e.bufferedIndex;t1&&e._writev){t.pendingcb-=o-1;let r=t.allNoop?j:e=>{for(let t=s;t256?(n.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}F.prototype._write=function(e,t,n){if(this._writev)this._writev([{chunk:e,encoding:t}],n);else throw new S(`_write()`)},F.prototype._writev=null,F.prototype.end=function(e,t,n){let i=this._writableState;typeof e==`function`?(n=e,e=null,t=null):typeof t==`function`&&(n=t,t=null);let o;if(e!=null){let n=I(this,e,t);n instanceof a&&(o=n)}return i.corked&&(i.corked=1,this.uncork()),o||(!i.errored&&!i.ending?(i.ending=!0,ae(this,i,!0),i.ended=!0):i.finished?o=new E(`end`):i.destroyed&&(o=new T(`end`))),typeof n==`function`&&(o||i.finished?r.nextTick(n,o):i[M].push(n)),this};function re(e){return e.ending&&!e.destroyed&&e.constructed&&e.length===0&&!e.errored&&e.buffered.length===0&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function H(e,t){let n=!1;function i(i){if(n){A(e,i??C());return}if(n=!0,t.pendingcb--,i){let n=t[M].splice(0);for(let e=0;e{re(t)?oe(e,t):t.pendingcb--},e,t)):re(t)&&(t.pendingcb++,oe(e,t))))}function oe(e,t){t.pendingcb--,t.finished=!0;let n=t[M].splice(0);for(let e=0;e{let r=rN(),i=t(`buffer`),{isReadable:a,isWritable:o,isIterable:s,isNodeStream:c,isReadableNodeStream:l,isWritableNodeStream:u,isDuplexNodeStream:d,isReadableStream:f,isWritableStream:p}=iN(),m=aN(),{AbortError:h,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:v}}=QM(),{destroyer:y}=oN(),b=_N(),x=mN(),S=hN(),{createDeferredPromise:C}=tN(),w=pN(),T=globalThis.Blob||i.Blob,E=T===void 0?function(e){return!1}:function(e){return e instanceof T},D=globalThis.AbortController||eN().AbortController,{FunctionPrototypeCall:O}=XM();var k=class extends b{constructor(e){super(e),e?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};n.exports=function e(t,n){if(d(t))return t;if(l(t))return j({readable:t});if(u(t))return j({writable:t});if(c(t))return j({writable:!1,readable:!1});if(f(t))return j({readable:x.fromWeb(t)});if(p(t))return j({writable:S.fromWeb(t)});if(typeof t==`function`){let{value:e,write:i,final:a,destroy:o}=A(t);if(s(e))return w(k,e,{objectMode:!0,write:i,final:a,destroy:o});let c=e?.then;if(typeof c==`function`){let t,n=O(c,e,e=>{if(e!=null)throw new v(`nully`,`body`,e)},e=>{y(t,e)});return t=new k({objectMode:!0,readable:!1,write:i,final(e){a(async()=>{try{await n,r.nextTick(e,null)}catch(t){r.nextTick(e,t)}})},destroy:o})}throw new v(`Iterable, AsyncIterable or AsyncFunction`,n,e)}if(E(t))return e(t.arrayBuffer());if(s(t))return w(k,t,{objectMode:!0,writable:!1});if(f(t?.readable)&&p(t?.writable))return k.fromWeb(t);if(typeof t?.writable==`object`||typeof t?.readable==`object`)return j({readable:t!=null&&t.readable?l(t?.readable)?t?.readable:e(t.readable):void 0,writable:t!=null&&t.writable?u(t?.writable)?t?.writable:e(t.writable):void 0});let i=t?.then;if(typeof i==`function`){let e;return O(i,t,t=>{t!=null&&e.push(t),e.push(null)},t=>{y(e,t)}),e=new k({objectMode:!0,writable:!1,read(){}})}throw new g(n,[`Blob`,`ReadableStream`,`WritableStream`,`Stream`,`Iterable`,`AsyncIterable`,`Function`,`{ readable, writable } pair`,`Promise`],t)};function A(e){let{promise:t,resolve:n}=C(),i=new D,a=i.signal;return{value:e((async function*(){for(;;){let e=t;t=null;let{chunk:i,done:o,cb:s}=await e;if(r.nextTick(s),o)return;if(a.aborted)throw new h(void 0,{cause:a.reason});({promise:t,resolve:n}=C()),yield i}})(),{signal:a}),write(e,t,r){let i=n;n=null,i({chunk:e,done:!1,cb:r})},final(e){let t=n;n=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}function j(e){let t=e.readable&&typeof e.readable.read!=`function`?x.wrap(e.readable):e.readable,n=e.writable,r=!!a(t),i=!!o(n),s,c,l,u,d;function f(e){let t=u;u=null,t?t(e):e&&d.destroy(e)}return d=new k({readableObjectMode:!!(t!=null&&t.readableObjectMode),writableObjectMode:!!(n!=null&&n.writableObjectMode),readable:r,writable:i}),i&&(m(n,e=>{i=!1,e&&y(t,e),f(e)}),d._write=function(e,t,r){n.write(e,t)?r():s=r},d._final=function(e){n.end(),c=e},n.on(`drain`,function(){if(s){let e=s;s=null,e()}}),n.on(`finish`,function(){if(c){let e=c;c=null,e()}})),r&&(m(t,e=>{r=!1,e&&y(t,e),f(e)}),t.on(`readable`,function(){if(l){let e=l;l=null,e()}}),t.on(`end`,function(){d.push(null)}),d._read=function(){for(;;){let e=t.read();if(e===null){l=d._read;return}if(!d.push(e))return}}),d._destroy=function(e,r){!e&&u!==null&&(e=new h),l=null,s=null,c=null,u===null?r(e):(u=r,y(n,e),y(t,e))},d}})),_N=i(((e,t)=>{let{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:r,ObjectKeys:i,ObjectSetPrototypeOf:a}=XM();t.exports=c;let o=mN(),s=hN();a(c.prototype,o.prototype),a(c,o);{let e=i(s.prototype);for(let t=0;t{let{ObjectSetPrototypeOf:n,Symbol:r}=XM();t.exports=c;let{ERR_METHOD_NOT_IMPLEMENTED:i}=QM().codes,a=_N(),{getHighWaterMark:o}=uN();n(c.prototype,a.prototype),n(c,a);let s=r(`kCallback`);function c(e){if(!(this instanceof c))return new c(e);let t=e?o(this,e,`readableHighWaterMark`,!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),a.call(this,e),this._readableState.sync=!1,this[s]=null,e&&(typeof e.transform==`function`&&(this._transform=e.transform),typeof e.flush==`function`&&(this._flush=e.flush)),this.on(`prefinish`,u)}function l(e){typeof this._flush==`function`&&!this.destroyed?this._flush((t,n)=>{if(t){e?e(t):this.destroy(t);return}n!=null&&this.push(n),this.push(null),e&&e()}):(this.push(null),e&&e())}function u(){this._final!==l&&l.call(this)}c.prototype._final=l,c.prototype._transform=function(e,t,n){throw new i(`_transform()`)},c.prototype._write=function(e,t,n){let r=this._readableState,i=this._writableState,a=r.length;this._transform(e,t,(e,t)=>{if(e){n(e);return}t!=null&&this.push(t),i.ended||a===r.length||r.length{let{ObjectSetPrototypeOf:n}=XM();t.exports=i;let r=vN();n(i.prototype,r.prototype),n(i,r);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}i.prototype._transform=function(e,t,n){n(null,e)}})),bN=i(((e,t)=>{let n=rN(),{ArrayIsArray:r,Promise:i,SymbolAsyncIterator:a,SymbolDispose:o}=XM(),s=aN(),{once:c}=tN(),l=oN(),u=_N(),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:f,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:m,ERR_STREAM_DESTROYED:h,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:v}=QM(),{validateFunction:y,validateAbortSignal:b}=nN(),{isIterable:x,isReadable:S,isReadableNodeStream:C,isNodeStream:w,isTransformStream:T,isWebStream:E,isReadableStream:D,isReadableFinished:O}=iN(),k=globalThis.AbortController||eN().AbortController,A,j,M;function N(e,t,n){let r=!1;return e.on(`close`,()=>{r=!0}),{destroy:t=>{r||(r=!0,l.destroyer(e,t||new h(`pipe`)))},cleanup:s(e,{readable:t,writable:n},e=>{r=!e})}}function P(e){return y(e[e.length-1],`streams[stream.length - 1]`),e.pop()}function F(e){if(x(e))return e;if(C(e))return I(e);throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`],e)}async function*I(e){j||=mN(),yield*j.prototype[a].call(e)}async function L(e,t,n,{end:r}){let a,o=null,c=e=>{if(e&&(a=e),o){let e=o;o=null,e()}},l=()=>new i((e,t)=>{a?t(a):o=()=>{a?t(a):e()}});t.on(`drain`,c);let u=s(t,{readable:!1},c);try{t.writableNeedDrain&&await l();for await(let n of e)t.write(n)||await l();r&&(t.end(),await l()),n()}catch(e){n(a===e?e:d(a,e))}finally{u(),t.off(`drain`,c)}}async function R(e,t,n,{end:r}){T(t)&&(t=t.writable);let i=t.getWriter();try{for await(let t of e)await i.ready,i.write(t).catch(()=>{});await i.ready,r&&await i.close(),n()}catch(e){try{await i.abort(e),n(e)}catch(e){n(e)}}}function z(...e){return ee(e,c(P(e)))}function ee(e,t,i){if(e.length===1&&r(e[0])&&(e=e[0]),e.length<2)throw new m(`streams`);let a=new k,s=a.signal,c=i?.signal,l=[];b(c,`options.signal`);function d(){I(new v)}M||=tN().addAbortListener;let h;c&&(h=M(c,d));let g,y,O=[],j=0;function P(e){I(e,--j===0)}function I(e,r){var i;if(e&&(!g||g.code===`ERR_STREAM_PREMATURE_CLOSE`)&&(g=e),!(!g&&!r)){for(;O.length;)O.shift()(g);(i=h)==null||i[o](),a.abort(),r&&(g||l.forEach(e=>e()),n.nextTick(t,g,y))}}let z;for(let t=0;t0,c=a||i?.end!==!1,d=t===e.length-1;if(w(r)){if(c){let{destroy:e,cleanup:t}=N(r,a,o);O.push(e),S(r)&&d&&l.push(t)}function e(e){e&&e.name!==`AbortError`&&e.code!==`ERR_STREAM_PREMATURE_CLOSE`&&P(e)}r.on(`error`,e),S(r)&&d&&l.push(()=>{r.removeListener(`error`,e)})}if(t===0)if(typeof r==`function`){if(z=r({signal:s}),!x(z))throw new p(`Iterable, AsyncIterable or Stream`,`source`,z)}else z=x(r)||C(r)||T(r)?r:u.from(r);else if(typeof r==`function`)if(z=T(z)?F(z?.readable):F(z),z=r(z,{signal:s}),a){if(!x(z,!0))throw new p(`AsyncIterable`,`transform[${t-1}]`,z)}else{A||=yN();let e=new A({objectMode:!0}),t=z?.then;if(typeof t==`function`)j++,t.call(z,t=>{y=t,t!=null&&e.write(t),c&&e.end(),n.nextTick(P)},t=>{e.destroy(t),n.nextTick(P,t)});else if(x(z,!0))j++,L(z,e,P,{end:c});else if(D(z)||T(z)){let t=z.readable||z;j++,L(t,e,P,{end:c})}else throw new p(`AsyncIterable or Promise`,`destination`,z);z=e;let{destroy:r,cleanup:i}=N(z,!1,!0);O.push(r),d&&l.push(i)}else if(w(r)){if(C(z)){j+=2;let e=B(z,r,P,{end:c});S(r)&&d&&l.push(e)}else if(T(z)||D(z)){let e=z.readable||z;j++,L(e,r,P,{end:c})}else if(x(z))j++,L(z,r,P,{end:c});else throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`,`ReadableStream`,`TransformStream`],z);z=r}else if(E(r)){if(C(z))j++,R(F(z),r,P,{end:c});else if(D(z)||x(z))j++,R(z,r,P,{end:c});else if(T(z))j++,R(z.readable,r,P,{end:c});else throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`,`ReadableStream`,`TransformStream`],z);z=r}else z=u.from(r)}return(s!=null&&s.aborted||c!=null&&c.aborted)&&n.nextTick(d),z}function B(e,t,r,{end:i}){let a=!1;if(t.on(`close`,()=>{a||r(new g)}),e.pipe(t,{end:!1}),i){function r(){a=!0,t.end()}O(e)?n.nextTick(r):e.once(`end`,r)}else r();return s(e,{readable:!0,writable:!1},t=>{let n=e._readableState;t&&t.code===`ERR_STREAM_PREMATURE_CLOSE`&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once(`end`,r).once(`error`,r):r(t)}),s(t,{readable:!1,writable:!0},r)}t.exports={pipelineImpl:ee,pipeline:z}})),xN=i(((e,t)=>{let{pipeline:n}=bN(),r=_N(),{destroyer:i}=oN(),{isNodeStream:a,isReadable:o,isWritable:s,isWebStream:c,isTransformStream:l,isWritableStream:u,isReadableStream:d}=iN(),{AbortError:f,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:m}}=QM(),h=aN();t.exports=function(...e){if(e.length===0)throw new m(`streams`);if(e.length===1)return r.from(e[0]);let t=[...e];if(typeof e[0]==`function`&&(e[0]=r.from(e[0])),typeof e[e.length-1]==`function`){let t=e.length-1;e[t]=r.from(e[t])}for(let n=0;n0&&!(s(e[n])||u(e[n])||l(e[n])))throw new p(`streams[${n}]`,t[n],`must be writable`)}let g,v,y,b,x;function S(e){let t=b;b=null,t?t(e):e?x.destroy(e):!E&&!T&&x.destroy()}let C=e[0],w=n(e,S),T=!!(s(C)||u(C)||l(C)),E=!!(o(w)||d(w)||l(w));if(x=new r({writableObjectMode:!!(C!=null&&C.writableObjectMode),readableObjectMode:!!(w!=null&&w.readableObjectMode),writable:T,readable:E}),T){if(a(C))x._write=function(e,t,n){C.write(e,t)?n():g=n},x._final=function(e){C.end(),v=e},C.on(`drain`,function(){if(g){let e=g;g=null,e()}});else if(c(C)){let e=(l(C)?C.writable:C).getWriter();x._write=async function(t,n,r){try{await e.ready,e.write(t).catch(()=>{}),r()}catch(e){r(e)}},x._final=async function(t){try{await e.ready,e.close().catch(()=>{}),v=t}catch(e){t(e)}}}h(l(w)?w.readable:w,()=>{if(v){let e=v;v=null,e()}})}if(E){if(a(w))w.on(`readable`,function(){if(y){let e=y;y=null,e()}}),w.on(`end`,function(){x.push(null)}),x._read=function(){for(;;){let e=w.read();if(e===null){y=x._read;return}if(!x.push(e))return}};else if(c(w)){let e=(l(w)?w.readable:w).getReader();x._read=async function(){for(;;)try{let{value:t,done:n}=await e.read();if(!x.push(t))return;if(n){x.push(null);return}}catch{return}}}}return x._destroy=function(e,t){!e&&b!==null&&(e=new f),y=null,g=null,v=null,b===null?t(e):(b=t,a(w)&&i(w,e))},x}})),SN=i(((e,t)=>{let n=globalThis.AbortController||eN().AbortController,{codes:{ERR_INVALID_ARG_VALUE:r,ERR_INVALID_ARG_TYPE:i,ERR_MISSING_ARGS:a,ERR_OUT_OF_RANGE:o},AbortError:s}=QM(),{validateAbortSignal:c,validateInteger:l,validateObject:u}=nN(),d=XM().Symbol(`kWeak`),f=XM().Symbol(`kResistStopPropagation`),{finished:p}=aN(),m=xN(),{addAbortSignalNoValidate:h}=cN(),{isWritable:g,isNodeStream:v}=iN(),{deprecate:y}=tN(),{ArrayPrototypePush:b,Boolean:x,MathFloor:S,Number:C,NumberIsNaN:w,Promise:T,PromiseReject:E,PromiseResolve:D,PromisePrototypeThen:O,Symbol:k}=XM(),A=k(`kEmpty`),j=k(`kEof`);function M(e,t){if(t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),v(e)&&!g(e))throw new r(`stream`,e,`must be writable`);let n=m(this,e);return t!=null&&t.signal&&h(t.signal,n),n}function N(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`);let n=1;t?.concurrency!=null&&(n=S(t.concurrency));let r=n-1;return t?.highWaterMark!=null&&(r=S(t.highWaterMark)),l(n,`options.concurrency`,1),l(r,`options.highWaterMark`,0),r+=n,async function*(){let i=tN().AbortSignalAny([t?.signal].filter(x)),a=this,o=[],c={signal:i},l,u,d=!1,f=0;function p(){d=!0,m()}function m(){--f,h()}function h(){u&&!d&&f=r||f>=n)&&await new T(e=>{u=e})}o.push(j)}catch(e){let t=E(e);O(t,m,p),o.push(t)}finally{d=!0,l&&=(l(),null)}}g();try{for(;;){for(;o.length>0;){let e=await o[0];if(e===j)return;if(i.aborted)throw new s;e!==A&&(yield e),o.shift(),h()}await new T(e=>{l=e})}}finally{d=!0,u&&=(u(),null)}}.call(this)}function P(e=void 0){return e!=null&&u(e,`options`),e?.signal!=null&&c(e.signal,`options.signal`),async function*(){let t=0;for await(let r of this){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)throw new s({cause:e.signal.reason});yield[t++,r]}}.call(this)}async function F(e,t=void 0){for await(let n of z.call(this,e,t))return!0;return!1}async function I(e,t=void 0){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);return!await F.call(this,async(...t)=>!await e(...t),t)}async function L(e,t){for await(let n of z.call(this,e,t))return n}async function R(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);async function n(t,n){return await e(t,n),A}for await(let e of N.call(this,n,t));}function z(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);async function n(t,n){return await e(t,n)?t:A}return N.call(this,n,t)}var ee=class extends a{constructor(){super(`reduce`),this.message=`Reduce of an empty stream requires an initial value`}};async function B(e,t,r){var a;if(typeof e!=`function`)throw new i(`reducer`,[`Function`,`AsyncFunction`],e);r!=null&&u(r,`options`),r?.signal!=null&&c(r.signal,`options.signal`);let o=arguments.length>1;if(r!=null&&(a=r.signal)!=null&&a.aborted){let e=new s(void 0,{cause:r.signal.reason});throw this.once(`error`,()=>{}),await p(this.destroy(e)),e}let l=new n,m=l.signal;if(r!=null&&r.signal){let e={once:!0,[d]:this,[f]:!0};r.signal.addEventListener(`abort`,()=>l.abort(),e)}let h=!1;try{for await(let n of this){var g;if(h=!0,r!=null&&(g=r.signal)!=null&&g.aborted)throw new s;o?t=await e(t,n,{signal:m}):(t=n,o=!0)}if(!h&&!o)throw new ee}finally{l.abort()}return t}async function te(e){e!=null&&u(e,`options`),e?.signal!=null&&c(e.signal,`options.signal`);let t=[];for await(let r of this){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)throw new s(void 0,{cause:e.signal.reason});b(t,r)}return t}function V(e,t){let n=N.call(this,e,t);return async function*(){for await(let e of n)yield*e}.call(this)}function ne(e){if(e=C(e),w(e))return 0;if(e<0)throw new o(`number`,`>= 0`,e);return e}function re(e,t=void 0){return t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),e=ne(e),async function*(){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)throw new s;for await(let n of this){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)throw new s;e--<=0&&(yield n)}}.call(this)}function H(e,t=void 0){return t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),e=ne(e),async function*(){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)throw new s;for await(let n of this){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)throw new s;if(e-- >0&&(yield n),e<=0)return}}.call(this)}t.exports.streamReturningOperators={asIndexedPairs:y(P,`readable.asIndexedPairs will be removed in a future version.`),drop:re,filter:z,flatMap:V,map:N,take:H,compose:M},t.exports.promiseReturningOperators={every:I,forEach:R,reduce:B,toArray:te,some:F,find:L}})),CN=i(((e,t)=>{let{ArrayPrototypePop:n,Promise:r}=XM(),{isIterable:i,isNodeStream:a,isWebStream:o}=iN(),{pipelineImpl:s}=bN(),{finished:c}=aN();wN();function l(...e){return new r((t,r)=>{let c,l,u=e[e.length-1];if(u&&typeof u==`object`&&!a(u)&&!i(u)&&!o(u)){let t=n(e);c=t.signal,l=t.end}s(e,(e,n)=>{e?r(e):t(n)},{signal:c,end:l})})}t.exports={finished:c,pipeline:l}})),wN=i(((e,n)=>{let{Buffer:r}=t(`buffer`),{ObjectDefineProperty:i,ObjectKeys:a,ReflectApply:o}=XM(),{promisify:{custom:s}}=tN(),{streamReturningOperators:c,promiseReturningOperators:l}=SN(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:u}}=QM(),d=xN(),{setDefaultHighWaterMark:f,getDefaultHighWaterMark:p}=uN(),{pipeline:m}=bN(),{destroyer:h}=oN(),g=aN(),v=CN(),y=iN(),b=n.exports=sN().Stream;b.isDestroyed=y.isDestroyed,b.isDisturbed=y.isDisturbed,b.isErrored=y.isErrored,b.isReadable=y.isReadable,b.isWritable=y.isWritable,b.Readable=mN();for(let e of a(c)){let t=c[e];function n(...e){if(new.target)throw u();return b.Readable.from(o(t,this,e))}i(n,`name`,{__proto__:null,value:t.name}),i(n,`length`,{__proto__:null,value:t.length}),i(b.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}for(let e of a(l)){let t=l[e];function n(...e){if(new.target)throw u();return o(t,this,e)}i(n,`name`,{__proto__:null,value:t.name}),i(n,`length`,{__proto__:null,value:t.length}),i(b.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}b.Writable=hN(),b.Duplex=_N(),b.Transform=vN(),b.PassThrough=yN(),b.pipeline=m;let{addAbortSignal:x}=cN();b.addAbortSignal=x,b.finished=g,b.destroy=h,b.compose=d,b.setDefaultHighWaterMark=f,b.getDefaultHighWaterMark=p,i(b,`promises`,{__proto__:null,configurable:!0,enumerable:!0,get(){return v}}),i(m,s,{__proto__:null,enumerable:!0,get(){return v.pipeline}}),i(g,s,{__proto__:null,enumerable:!0,get(){return v.finished}}),b.Stream=b,b._isUint8Array=function(e){return e instanceof Uint8Array},b._uint8ArrayToBuffer=function(e){return r.from(e.buffer,e.byteOffset,e.byteLength)}})),TN=i(((e,n)=>{let r=t(`stream`);if(r&&process.env.READABLE_STREAM===`disable`){let e=r.promises;n.exports._uint8ArrayToBuffer=r._uint8ArrayToBuffer,n.exports._isUint8Array=r._isUint8Array,n.exports.isDisturbed=r.isDisturbed,n.exports.isErrored=r.isErrored,n.exports.isReadable=r.isReadable,n.exports.Readable=r.Readable,n.exports.Writable=r.Writable,n.exports.Duplex=r.Duplex,n.exports.Transform=r.Transform,n.exports.PassThrough=r.PassThrough,n.exports.addAbortSignal=r.addAbortSignal,n.exports.finished=r.finished,n.exports.destroy=r.destroy,n.exports.pipeline=r.pipeline,n.exports.compose=r.compose,Object.defineProperty(r,`promises`,{configurable:!0,enumerable:!0,get(){return e}}),n.exports.Stream=r.Stream}else{let e=wN(),t=CN(),r=e.Readable.destroy;n.exports=e.Readable,n.exports._uint8ArrayToBuffer=e._uint8ArrayToBuffer,n.exports._isUint8Array=e._isUint8Array,n.exports.isDisturbed=e.isDisturbed,n.exports.isErrored=e.isErrored,n.exports.isReadable=e.isReadable,n.exports.Readable=e.Readable,n.exports.Writable=e.Writable,n.exports.Duplex=e.Duplex,n.exports.Transform=e.Transform,n.exports.PassThrough=e.PassThrough,n.exports.addAbortSignal=e.addAbortSignal,n.exports.finished=e.finished,n.exports.destroy=e.destroy,n.exports.destroy=r,n.exports.pipeline=e.pipeline,n.exports.compose=e.compose,Object.defineProperty(e,`promises`,{configurable:!0,enumerable:!0,get(){return t}}),n.exports.Stream=e.Stream}n.exports.default=n.exports})),EN=i(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n{var n=dM(),r=IM(),i=LM(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),ON=i(((e,t)=>{var n=EN(),r=DN();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),kN=i(((e,t)=>{var n=ON();function r(e){return e!=null&&e.length?n(e,1):[]}t.exports=r})),AN=i(((e,t)=>{t.exports=SM()(Object,`create`)})),jN=i(((e,t)=>{var n=AN();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),MN=i(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),NN=i(((e,t)=>{var n=AN(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),PN=i(((e,t)=>{var n=AN(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),FN=i(((e,t)=>{var n=AN(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),IN=i(((e,t)=>{var n=jN(),r=MN(),i=NN(),a=PN(),o=FN();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{function n(){this.__data__=[],this.size=0}t.exports=n})),RN=i(((e,t)=>{var n=OM();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),zN=i(((e,t)=>{var n=RN(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),BN=i(((e,t)=>{var n=RN();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),VN=i(((e,t)=>{var n=RN();function r(e){return n(this.__data__,e)>-1}t.exports=r})),HN=i(((e,t)=>{var n=RN();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),UN=i(((e,t)=>{var n=LN(),r=zN(),i=BN(),a=VN(),o=HN();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{t.exports=SM()(uM(),`Map`)})),GN=i(((e,t)=>{var n=IN(),r=UN(),i=WN();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),KN=i(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),qN=i(((e,t)=>{var n=KN();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),JN=i(((e,t)=>{var n=qN();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),YN=i(((e,t)=>{var n=qN();function r(e){return n(this,e).get(e)}t.exports=r})),XN=i(((e,t)=>{var n=qN();function r(e){return n(this,e).has(e)}t.exports=r})),ZN=i(((e,t)=>{var n=qN();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),QN=i(((e,t)=>{var n=GN(),r=JN(),i=YN(),a=XN(),o=ZN();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{var n=`__lodash_hash_undefined__`;function r(e){return this.__data__.set(e,n),this}t.exports=r})),eP=i(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),tP=i(((e,t)=>{var n=QN(),r=$N(),i=eP();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a{function n(e){return e!==e}t.exports=n})),iP=i(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r{var n=nP(),r=rP(),i=iP();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),oP=i(((e,t)=>{var n=aP();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),sP=i(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n{function n(e,t){return e.has(t)}t.exports=n})),uP=i(((e,t)=>{var n=tP(),r=oP(),i=sP(),a=cP(),o=VM(),s=lP(),c=200;function l(e,t,l,u){var d=-1,f=r,p=!0,m=e.length,h=[],g=t.length;if(!m)return h;l&&(t=a(t,o(l))),u?(f=i,p=!1):t.length>=c&&(f=s,p=!1,t=new n(t));outer:for(;++d{var n=AM(),r=PM();function i(e){return r(e)&&n(e)}t.exports=i})),fP=i(((e,t)=>{var n=uP(),r=ON(),i=DM(),a=dP();t.exports=i(function(e,t){return a(e)?n(e,r(t,1,a,!0)):[]})})),pP=i(((e,t)=>{t.exports=SM()(uM(),`Set`)})),mP=i(((e,t)=>{function n(){}t.exports=n})),hP=i(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),gP=i(((e,t)=>{var n=pP(),r=mP(),i=hP();t.exports=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:r})),_P=i(((e,t)=>{var n=tP(),r=oP(),i=sP(),a=lP(),o=gP(),s=hP(),c=200;function l(e,t,l){var u=-1,d=r,f=e.length,p=!0,m=[],h=m;if(l)p=!1,d=i;else if(f>=c){var g=t?null:o(e);if(g)return s(g);p=!1,d=a,h=new n}else h=t?[]:m;outer:for(;++u{var n=ON(),r=DM(),i=_P(),a=dP();t.exports=r(function(e){return i(n(e,1,a,!0))})})),yP=i(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),bP=i(((e,t)=>{t.exports=yP()(Object.getPrototypeOf,Object)})),xP=i(((e,t)=>{var n=mM(),r=bP(),i=PM(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),SP=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assertValidPattern=void 0,e.assertValidPattern=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)}})),CP=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.parseClass=void 0;let t={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},n=e=>e.replace(/[[\]\\-]/g,`\\$&`),r=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),i=e=>e.join(``);e.parseClass=(e,a)=>{let o=a;if(e.charAt(o)!==`[`)throw Error(`not in a brace expression`);let s=[],c=[],l=o+1,u=!1,d=!1,f=!1,p=!1,m=o,h=``;WHILE:for(;lh?s.push(n(h)+`-`+n(r)):r===h&&s.push(n(r)),h=``,l++;continue}if(e.startsWith(`-]`,l+1)){s.push(n(r+`-`)),l+=2;continue}if(e.startsWith(`-`,l+1)){h=r,l+=2;continue}s.push(n(r)),l++}if(m{Object.defineProperty(e,`__esModule`,{value:!0}),e.unescape=void 0,e.unescape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,`$1$2`).replace(/\\([^\/])/g,`$1`)})),TP=i((e=>{var t;Object.defineProperty(e,`__esModule`,{value:!0}),e.AST=void 0;let n=CP(),r=wP(),i=new Set([`!`,`?`,`+`,`*`,`@`]),a=e=>i.has(e),o=e=>a(e.type),s=new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),c=new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),l=new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),u=new Map([[`!`,new Map([[`!`,`@`]])],[`?`,new Map([[`*`,`*`],[`+`,`*`]])],[`@`,new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,new Map([[`?`,`*`],[`*`,`*`]])]]),d=`(?!\\.)`,f=new Set([`[`,`.`]),p=new Set([`..`,`.`]),m=new Set(`().*{}+?[]^$\\!`),h=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),g=`[^/]`,v=g+`*?`,y=g+`+?`;var b=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#l=this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&rtypeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let n=0;n{let[r,a,o,s]=typeof n==`string`?t.#C(n,this.#t,i):n.toRegExpSource(e);return this.#t=this.#t||o,this.#n=this.#n||s,r}).join(``),o=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&p.has(this.#r[0]))){let t=f,r=n&&t.has(a.charAt(0))||a.startsWith(`\\.`)&&t.has(a.charAt(2))||a.startsWith(`\\.\\.`)&&t.has(a.charAt(4)),i=!n&&!e&&t.has(a.charAt(0));o=r?`(?!(?:^|/)\\.\\.?(?:$|/))`:i?d:``}let s=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(s=`(?:$|\\/)`),[o+a+s,(0,r.unescape)(a),this.#t=!!this.#t,this.#n]}let i=this.type===`*`||this.type===`+`,a=this.type===`!`?`(?:(?!(?:`:`(?:`,s=this.#S(n);if(this.isStart()&&this.isEnd()&&!s&&this.type!==`!`){let e=this.toString(),t=this;return t.#r=[e],t.type=null,t.#t=void 0,[e,(0,r.unescape)(this.toString()),!1,!1]}let c=!i||e||n?``:this.#S(!0);c===s&&(c=``),c&&(s=`(?:${s})(?:${c})*?`);let l=``;if(this.type===`!`&&this.#u)l=(this.isStart()&&!n?d:``)+y;else{let t=this.type===`!`?`))`+(this.isStart()&&!n&&!e?d:``)+v+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&c?`)`:this.type===`*`&&c?`)?`:`)${this.type}`;l=a+s+t}return[l,(0,r.unescape)(s),this.#t=!!this.#t,this.#n]}#S(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#C(e,t,i=!1){let a=!1,o=``,s=!1,c=!1;for(let r=0;r{Object.defineProperty(e,`__esModule`,{value:!0}),e.escape=void 0,e.escape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`)})),DP=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;let n=t(tc()),r=SP(),i=TP(),a=EP(),o=wP();e.minimatch=(e,t,n={})=>((0,r.assertValidPattern)(t),!n.nocomment&&t.charAt(0)===`#`?!1:new N(t,n).match(e));let s=/^\*+([^+@!?\*\[\(]*)$/,c=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),l=e=>t=>t.endsWith(e),u=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),d=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),f=/^\*+\.\*+$/,p=e=>!e.startsWith(`.`)&&e.includes(`.`),m=e=>e!==`.`&&e!==`..`&&e.includes(`.`),h=/^\.\*+$/,g=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),v=/^\*+$/,y=e=>e.length!==0&&!e.startsWith(`.`),b=e=>e.length!==0&&e!==`.`&&e!==`..`,x=/^\?+([^+@!?\*\[\(]*)?$/,S=([e,t=``])=>{let n=E([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},C=([e,t=``])=>{let n=D([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},w=([e,t=``])=>{let n=D([e]);return t?e=>n(e)&&e.endsWith(t):n},T=([e,t=``])=>{let n=E([e]);return t?e=>n(e)&&e.endsWith(t):n},E=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},D=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},O=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,k={win32:{sep:`\\`},posix:{sep:`/`}};e.sep=O===`win32`?k.win32.sep:k.posix.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol(`globstar **`),e.minimatch.GLOBSTAR=e.GLOBSTAR,e.filter=(t,n={})=>r=>(0,e.minimatch)(r,t,n),e.minimatch.filter=e.filter;let A=(e,t={})=>Object.assign({},e,t);e.defaults=t=>{if(!t||typeof t!=`object`||!Object.keys(t).length)return e.minimatch;let n=e.minimatch;return Object.assign((e,r,i={})=>n(e,r,A(t,i)),{Minimatch:class extends n.Minimatch{constructor(e,n={}){super(e,A(t,n))}static defaults(e){return n.defaults(A(t,e)).Minimatch}},AST:class extends n.AST{constructor(e,n,r={}){super(e,n,A(t,r))}static fromGlob(e,r={}){return n.AST.fromGlob(e,A(t,r))}},unescape:(e,r={})=>n.unescape(e,A(t,r)),escape:(e,r={})=>n.escape(e,A(t,r)),filter:(e,r={})=>n.filter(e,A(t,r)),defaults:e=>n.defaults(A(t,e)),makeRe:(e,r={})=>n.makeRe(e,A(t,r)),braceExpand:(e,r={})=>n.braceExpand(e,A(t,r)),match:(e,r,i={})=>n.match(e,r,A(t,i)),sep:n.sep,GLOBSTAR:e.GLOBSTAR})},e.minimatch.defaults=e.defaults,e.braceExpand=(e,t={})=>((0,r.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,n.default)(e)),e.minimatch.braceExpand=e.braceExpand,e.makeRe=(e,t={})=>new N(e,t).makeRe(),e.minimatch.makeRe=e.makeRe,e.match=(e,t,n={})=>{let r=new N(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e},e.minimatch.match=e.match;let j=/[?*]|[+@!]\(.*?\)|\[|\]/,M=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`);var N=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){(0,r.assertValidPattern)(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||O,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!j.test(e[2]))&&!j.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;nr&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;ee.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r=2&&(t=this.levelTwoFileOptimize(t)),n.includes(e.GLOBSTAR)?this.#e(t,n,r,i,a):this.#n(t,n,r,i,a)}#e(t,n,r,i,a){let o=n.indexOf(e.GLOBSTAR,a),s=n.lastIndexOf(e.GLOBSTAR),[c,l,u]=r?[n.slice(a,o),n.slice(o+1),[]]:[n.slice(a,o),n.slice(o+1,s),n.slice(s+1)];if(c.length){let e=t.slice(i,i+c.length);if(!this.#n(e,c,r,0,0))return!1;i+=c.length}let d=0;if(u.length){if(u.length+i>t.length)return!1;let e=t.length-u.length;if(this.#n(t,u,r,e,0))d=u.length;else{if(t[t.length-1]!==``||i+u.length===t.length||(e--,!this.#n(t,u,r,e,0)))return!1;d=u.length+1}}if(!l.length){let e=!!d;for(let n=i;n{let n=t.map(t=>{if(t instanceof RegExp)for(let e of t.flags.split(``))i.add(e);return typeof t==`string`?M(t):t===e.GLOBSTAR?e.GLOBSTAR:t._src});return n.forEach((t,i)=>{let a=n[i+1],o=n[i-1];t!==e.GLOBSTAR||o===e.GLOBSTAR||(o===void 0?a!==void 0&&a!==e.GLOBSTAR?n[i+1]=`(?:\\/|`+r+`\\/)?`+a:n[i]=r:a===void 0?n[i-1]=o+`(?:\\/|`+r+`)?`:a!==e.GLOBSTAR&&(n[i-1]=o+`(?:\\/|\\/`+r+`\\/)`+a,n[i+1]=e.GLOBSTAR))}),n.filter(t=>t!==e.GLOBSTAR).join(`/`)}).join(`|`),[o,s]=t.length>1?[`(?:`,`)`]:[``,``];a=`^`+o+a+s+`$`,this.negate&&(a=`^(?!`+a+`).+$`);try{this.regexp=new RegExp(a,[...i].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^\/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e{Object.defineProperty(e,`__esModule`,{value:!0}),e.LRUCache=void 0;let t=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,n=new Set,r=typeof process==`object`&&process?process:{},i=(e,t,n,i)=>{typeof r.emitWarning==`function`?r.emitWarning(e,t,n,i):console.error(`[${n}] ${t}: ${e}`)},a=globalThis.AbortController,o=globalThis.AbortSignal;if(a===void 0){o=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},a=class{constructor(){t()}signal=new o;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e=r.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,t=()=>{e&&(e=!1,i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",`NO_ABORT_CONTROLLER`,`ENOTSUP`,t))}}let s=e=>!n.has(e),c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),l=e=>c(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?u:null:null;var u=class extends Array{constructor(e){super(e),this.fill(0)}},d=class e{heap;length;static#e=!1;static create(t){let n=l(t);if(!n)return[];e.#e=!0;let r=new e(t,n);return e.#e=!1,r}constructor(t,n){if(!e.#e)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};e.LRUCache=class e{#e;#t;#n;#r;#i;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y;#b;#x;#S;static unsafeExposeInternals(e){return{starts:e.#v,ttls:e.#y,sizes:e.#_,keyMap:e.#c,keyList:e.#l,valList:e.#u,next:e.#d,prev:e.#f,get head(){return e.#p},get tail(){return e.#m},free:e.#h,isBackgroundFetch:t=>e.#L(t),backgroundFetch:(t,n,r,i)=>e.#I(t,n,r,i),moveToTail:t=>e.#z(t),indexes:t=>e.#M(t),rindexes:t=>e.#N(t),isStale:t=>e.#D(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#s}get size(){return this.#o}get fetchMethod(){return this.#i}get memoMethod(){return this.#a}get dispose(){return this.#n}get disposeAfter(){return this.#r}constructor(t){let{max:r=0,ttl:a,ttlResolution:o=1,ttlAutopurge:u,updateAgeOnGet:f,updateAgeOnHas:p,allowStale:m,dispose:h,disposeAfter:g,noDisposeOnSet:v,noUpdateTTL:y,maxSize:b=0,maxEntrySize:x=0,sizeCalculation:S,fetchMethod:C,memoMethod:w,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:O,ignoreFetchAbort:k}=t;if(r!==0&&!c(r))throw TypeError(`max option must be a nonnegative integer`);let A=r?l(r):Array;if(!A)throw Error(`invalid max value: `+r);if(this.#e=r,this.#t=b,this.maxEntrySize=x||this.#t,this.sizeCalculation=S,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(w!==void 0&&typeof w!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(this.#a=w,C!==void 0&&typeof C!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.#i=C,this.#x=!!C,this.#c=new Map,this.#l=Array(r).fill(void 0),this.#u=Array(r).fill(void 0),this.#d=new A(r),this.#f=new A(r),this.#p=0,this.#m=0,this.#h=d.create(r),this.#o=0,this.#s=0,typeof h==`function`&&(this.#n=h),typeof g==`function`?(this.#r=g,this.#g=[]):(this.#r=void 0,this.#g=void 0),this.#b=!!this.#n,this.#S=!!this.#r,this.noDisposeOnSet=!!v,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#t!==0&&!c(this.#t))throw TypeError(`maxSize must be a positive integer if specified`);if(!c(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.#O()}if(this.allowStale=!!m,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!f,this.updateAgeOnHas=!!p,this.ttlResolution=c(o)||o===0?o:1,this.ttlAutopurge=!!u,this.ttl=a||0,this.ttl){if(!c(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.#C()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t=`LRU_CACHE_UNBOUNDED`;s(t)&&(n.add(t),i(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#C(){let e=new u(this.#e),n=new u(this.#e);this.#y=e,this.#v=n,this.#E=(r,i,a=t.now())=>{if(n[r]=i===0?0:a,e[r]=i,i!==0&&this.ttlAutopurge){let e=setTimeout(()=>{this.#D(r)&&this.#B(this.#l[r],`expire`)},i+1);e.unref&&e.unref()}},this.#w=r=>{n[r]=e[r]===0?0:t.now()},this.#T=(t,a)=>{if(e[a]){let o=e[a],s=n[a];if(!o||!s)return;t.ttl=o,t.start=s,t.now=r||i(),t.remainingTTL=o-(t.now-s)}};let r=0,i=()=>{let e=t.now();if(this.ttlResolution>0){r=e;let t=setTimeout(()=>r=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=t=>{let a=this.#c.get(t);if(a===void 0)return 0;let o=e[a],s=n[a];return!o||!s?1/0:o-((r||i())-s)},this.#D=t=>{let a=n[t],o=e[t];return!!o&&!!a&&(r||i())-a>o}}#w=()=>{};#T=()=>{};#E=()=>{};#D=()=>!1;#O(){let e=new u(this.#e);this.#s=0,this.#_=e,this.#k=t=>{this.#s-=e[t],e[t]=0},this.#j=(e,t,n,r)=>{if(this.#L(t))return 0;if(!c(n))if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!c(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n},this.#A=(t,n,r)=>{if(e[t]=n,this.#t){let n=this.#t-e[t];for(;this.#s>n;)this.#F(!0)}this.#s+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#s)}}#k=e=>{};#A=(e,t,n)=>{};#j=(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0};*#M({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#m;!(!this.#P(t)||((e||!this.#D(t))&&(yield t),t===this.#p));)t=this.#f[t]}*#N({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#p;!(!this.#P(t)||((e||!this.#D(t))&&(yield t),t===this.#m));)t=this.#d[t]}#P(e){return e!==void 0&&this.#c.get(this.#l[e])===e}*entries(){for(let e of this.#M())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#L(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*rentries(){for(let e of this.#N())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#L(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*keys(){for(let e of this.#M()){let t=this.#l[e];t!==void 0&&!this.#L(this.#u[e])&&(yield t)}}*rkeys(){for(let e of this.#N()){let t=this.#l[e];t!==void 0&&!this.#L(this.#u[e])&&(yield t)}}*values(){for(let e of this.#M())this.#u[e]!==void 0&&!this.#L(this.#u[e])&&(yield this.#u[e])}*rvalues(){for(let e of this.#N())this.#u[e]!==void 0&&!this.#L(this.#u[e])&&(yield this.#u[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=`LRUCache`;find(e,t={}){for(let n of this.#M()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.#l[n],this))return this.get(this.#l[n],t)}}forEach(e,t=this){for(let n of this.#M()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#l[n],this)}}rforEach(e,t=this){for(let n of this.#N()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#l[n],this)}}purgeStale(){let e=!1;for(let t of this.#N({allowStale:!0}))this.#D(t)&&(this.#B(this.#l[t],`expire`),e=!0);return e}info(e){let n=this.#c.get(e);if(n===void 0)return;let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;if(i===void 0)return;let a={value:i};if(this.#y&&this.#v){let e=this.#y[n],r=this.#v[n];e&&r&&(a.ttl=e-(t.now()-r),a.start=Date.now())}return this.#_&&(a.size=this.#_[n]),a}dump(){let e=[];for(let n of this.#M({allowStale:!0})){let r=this.#l[n],i=this.#u[n],a=this.#L(i)?i.__staleWhileFetching:i;if(a===void 0||r===void 0)continue;let o={value:a};if(this.#y&&this.#v){o.ttl=this.#y[n];let e=t.now()-this.#v[n];o.start=Math.floor(Date.now()-e)}this.#_&&(o.size=this.#_[n]),e.unshift([r,o])}return e}load(e){this.clear();for(let[n,r]of e){if(r.start){let e=Date.now()-r.start;r.start=t.now()-e}this.set(n,r.value,r)}}set(e,t,n={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,l=this.#j(e,t,n.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return s&&(s.set=`miss`,s.maxEntrySizeExceeded=!0),this.#B(e,`set`),this;let u=this.#o===0?void 0:this.#c.get(e);if(u===void 0)u=this.#o===0?this.#m:this.#h.length===0?this.#o===this.#e?this.#F(!1):this.#o:this.#h.pop(),this.#l[u]=e,this.#u[u]=t,this.#c.set(e,u),this.#d[this.#m]=u,this.#f[u]=this.#m,this.#m=u,this.#o++,this.#A(u,l,s),s&&(s.set=`add`),c=!1;else{this.#z(u);let n=this.#u[u];if(t!==n){if(this.#x&&this.#L(n)){n.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!a&&(this.#b&&this.#n?.(t,e,`set`),this.#S&&this.#g?.push([t,e,`set`]))}else a||(this.#b&&this.#n?.(n,e,`set`),this.#S&&this.#g?.push([n,e,`set`]));if(this.#k(u),this.#A(u,l,s),this.#u[u]=t,s){s.set=`replace`;let e=n&&this.#L(n)?n.__staleWhileFetching:n;e!==void 0&&(s.oldValue=e)}}else s&&(s.set=`update`)}if(r!==0&&!this.#y&&this.#C(),this.#y&&(c||this.#E(u,r,i),s&&this.#T(s,u)),!a&&this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return this}pop(){try{for(;this.#o;){let e=this.#u[this.#p];if(this.#F(!0),this.#L(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}#F(e){let t=this.#p,n=this.#l[t],r=this.#u[t];return this.#x&&this.#L(r)?r.__abortController.abort(Error(`evicted`)):(this.#b||this.#S)&&(this.#b&&this.#n?.(r,n,`evict`),this.#S&&this.#g?.push([r,n,`evict`])),this.#k(t),e&&(this.#l[t]=void 0,this.#u[t]=void 0,this.#h.push(t)),this.#o===1?(this.#p=this.#m=0,this.#h.length=0):this.#p=this.#d[t],this.#c.delete(n),this.#o--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#c.get(e);if(i!==void 0){let e=this.#u[i];if(this.#L(e)&&e.__staleWhileFetching===void 0)return!1;if(this.#D(i))r&&(r.has=`stale`,this.#T(r,i));else return n&&this.#w(i),r&&(r.has=`hit`,this.#T(r,i)),!0}else r&&(r.has=`miss`);return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=this.#c.get(e);if(r===void 0||!n&&this.#D(r))return;let i=this.#u[r];return this.#L(i)?i.__staleWhileFetching:i}#I(e,t,n,r){let i=t===void 0?void 0:this.#u[t];if(this.#L(i))return i;let o=new a,{signal:s}=n;s?.addEventListener(`abort`,()=>o.abort(s.reason),{signal:o.signal});let c={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:a}=o.signal,s=n.ignoreFetchAbort&&r!==void 0;if(n.status&&(a&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,s&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),a&&!s&&!i)return d(o.signal.reason);let l=p;return this.#u[t]===p&&(r===void 0?l.__staleWhileFetching?this.#u[t]=l.__staleWhileFetching:this.#B(e,`fetch`):(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,c.options))),r},u=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),d(e)),d=r=>{let{aborted:i}=o.signal,a=i&&n.allowStaleOnFetchAbort,s=a||n.allowStaleOnFetchRejection,c=s||n.noDeleteOnFetchRejection,l=p;if(this.#u[t]===p&&(!c||l.__staleWhileFetching===void 0?this.#B(e,`fetch`):a||(this.#u[t]=l.__staleWhileFetching)),s)return n.status&&l.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),l.__staleWhileFetching;if(l.__returned===l)throw r},f=(t,r)=>{let a=this.#i?.(e,i,c);a&&a instanceof Promise&&a.then(e=>t(e===void 0?void 0:e),r),o.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(f).then(l,u),m=Object.assign(p,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return t===void 0?(this.set(e,m,{...c.options,status:void 0}),t=this.#c.get(e)):this.#u[t]=m,m}#L(e){if(!this.#x)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof a}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:h=!1,status:g,signal:v}=t;if(!this.#x)return g&&(g.fetch=`get`),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let y={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:v},b=this.#c.get(e);if(b===void 0){g&&(g.fetch=`miss`);let t=this.#I(e,b,y,m);return t.__returned=t}else{let t=this.#u[b];if(this.#L(t)){let e=n&&t.__staleWhileFetching!==void 0;return g&&(g.fetch=`inflight`,e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#D(b);if(!h&&!i)return g&&(g.fetch=`hit`),this.#z(b),r&&this.#w(b),g&&this.#T(g,b),t;let a=this.#I(e,b,y,m),o=a.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=i?`stale`:`refresh`,o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}memo(e,t={}){let n=this.#a;if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,forceRefresh:i,...a}=t,o=this.get(e,a);if(!i&&o!==void 0)return o;let s=n(e,o,{options:a,context:r});return this.set(e,s,a),s}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#c.get(e);if(o!==void 0){let t=this.#u[o],s=this.#L(t);return a&&this.#T(a,o),this.#D(o)?(a&&(a.get=`stale`),s?(a&&n&&t.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#B(e,`expire`),a&&n&&(a.returnedStale=!0),n?t:void 0)):(a&&(a.get=`hit`),s?t.__staleWhileFetching:(this.#z(o),r&&this.#w(o),t))}else a&&(a.get=`miss`)}#R(e,t){this.#f[t]=e,this.#d[e]=t}#z(e){e!==this.#m&&(e===this.#p?this.#p=this.#d[e]:this.#R(this.#f[e],this.#d[e]),this.#R(this.#m,e),this.#m=e)}delete(e){return this.#B(e,`delete`)}#B(e,t){let n=!1;if(this.#o!==0){let r=this.#c.get(e);if(r!==void 0)if(n=!0,this.#o===1)this.#V(t);else{this.#k(r);let n=this.#u[r];if(this.#L(n)?n.__abortController.abort(Error(`deleted`)):(this.#b||this.#S)&&(this.#b&&this.#n?.(n,e,t),this.#S&&this.#g?.push([n,e,t])),this.#c.delete(e),this.#l[r]=void 0,this.#u[r]=void 0,r===this.#m)this.#m=this.#f[r];else if(r===this.#p)this.#p=this.#d[r];else{let e=this.#f[r];this.#d[e]=this.#d[r];let t=this.#d[r];this.#f[t]=this.#f[r]}this.#o--,this.#h.push(r)}}if(this.#S&&this.#g?.length){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return n}clear(){return this.#V(`delete`)}#V(e){for(let t of this.#N({allowStale:!0})){let n=this.#u[t];if(this.#L(n))n.__abortController.abort(Error(`deleted`));else{let r=this.#l[t];this.#b&&this.#n?.(n,r,e),this.#S&&this.#g?.push([n,r,e])}}if(this.#c.clear(),this.#u.fill(void 0),this.#l.fill(void 0),this.#y&&this.#v&&(this.#y.fill(0),this.#v.fill(0)),this.#_&&this.#_.fill(0),this.#p=0,this.#m=0,this.#h.length=0,this.#s=0,this.#o=0,this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}})),kP=i((e=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;let r=typeof process==`object`&&process?process:{stdout:null,stderr:null},i=t(`node:events`),a=n(t(`node:stream`)),o=t(`node:string_decoder`);e.isStream=t=>!!t&&typeof t==`object`&&(t instanceof ae||t instanceof a.default||(0,e.isReadable)(t)||(0,e.isWritable)(t)),e.isReadable=e=>!!e&&typeof e==`object`&&e instanceof i.EventEmitter&&typeof e.pipe==`function`&&e.pipe!==a.default.Writable.prototype.pipe,e.isWritable=e=>!!e&&typeof e==`object`&&e instanceof i.EventEmitter&&typeof e.write==`function`&&typeof e.end==`function`;let s=Symbol(`EOF`),c=Symbol(`maybeEmitEnd`),l=Symbol(`emittedEnd`),u=Symbol(`emittingEnd`),d=Symbol(`emittedError`),f=Symbol(`closed`),p=Symbol(`read`),m=Symbol(`flush`),h=Symbol(`flushChunk`),g=Symbol(`encoding`),v=Symbol(`decoder`),y=Symbol(`flowing`),b=Symbol(`paused`),x=Symbol(`resume`),S=Symbol(`buffer`),C=Symbol(`pipes`),w=Symbol(`bufferLength`),T=Symbol(`bufferPush`),E=Symbol(`bufferShift`),D=Symbol(`objectMode`),O=Symbol(`destroyed`),k=Symbol(`error`),A=Symbol(`emitData`),j=Symbol(`emitEnd`),M=Symbol(`emitEnd2`),N=Symbol(`async`),P=Symbol(`abort`),F=Symbol(`aborted`),I=Symbol(`signal`),L=Symbol(`dataListeners`),R=Symbol(`discarded`),z=e=>Promise.resolve().then(e),ee=e=>e(),B=e=>e===`end`||e===`finish`||e===`prefinish`,te=e=>e instanceof ArrayBuffer||!!e&&typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,V=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);var ne=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[x](),this.dest.on(`drain`,this.ondrain)}unpipe(){this.dest.removeListener(`drain`,this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},re=class extends ne{unpipe(){this.src.removeListener(`error`,this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>this.dest.emit(`error`,e),e.on(`error`,this.proxyErrors)}};let H=e=>!!e.objectMode,ie=e=>!e.objectMode&&!!e.encoding&&e.encoding!==`buffer`;var ae=class extends i.EventEmitter{[y]=!1;[b]=!1;[C]=[];[S]=[];[D];[g];[N];[v];[s]=!1;[l]=!1;[u]=!1;[f]=!1;[d]=null;[w]=0;[O]=!1;[I];[F]=!1;[L]=0;[R]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding==`string`)throw TypeError(`Encoding and objectMode may not be used together`);H(t)?(this[D]=!0,this[g]=null):ie(t)?(this[g]=t.encoding,this[D]=!1):(this[D]=!1,this[g]=null),this[N]=!!t.async,this[v]=this[g]?new o.StringDecoder(this[g]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,`buffer`,{get:()=>this[S]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,`pipes`,{get:()=>this[C]});let{signal:n}=t;n&&(this[I]=n,n.aborted?this[P]():n.addEventListener(`abort`,()=>this[P]()))}get bufferLength(){return this[w]}get encoding(){return this[g]}set encoding(e){throw Error(`Encoding must be set at instantiation time`)}setEncoding(e){throw Error(`Encoding must be set at instantiation time`)}get objectMode(){return this[D]}set objectMode(e){throw Error(`objectMode must be set at instantiation time`)}get async(){return this[N]}set async(e){this[N]=this[N]||!!e}[P](){this[F]=!0,this.emit(`abort`,this[I]?.reason),this.destroy(this[I]?.reason)}get aborted(){return this[F]}set aborted(e){}write(e,t,n){if(this[F])return!1;if(this[s])throw Error(`write after end`);if(this[O])return this.emit(`error`,Object.assign(Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0;typeof t==`function`&&(n=t,t=`utf8`),t||=`utf8`;let r=this[N]?z:ee;if(!this[D]&&!Buffer.isBuffer(e)){if(V(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(te(e))e=Buffer.from(e);else if(typeof e!=`string`)throw Error(`Non-contiguous data written to non-objectMode stream`)}return this[D]?(this[y]&&this[w]!==0&&this[m](!0),this[y]?this.emit(`data`,e):this[T](e),this[w]!==0&&this.emit(`readable`),n&&r(n),this[y]):e.length?(typeof e==`string`&&!(t===this[g]&&!this[v]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[g]&&(e=this[v].write(e)),this[y]&&this[w]!==0&&this[m](!0),this[y]?this.emit(`data`,e):this[T](e),this[w]!==0&&this.emit(`readable`),n&&r(n),this[y]):(this[w]!==0&&this.emit(`readable`),n&&r(n),this[y])}read(e){if(this[O])return null;if(this[R]=!1,this[w]===0||e===0||e&&e>this[w])return this[c](),null;this[D]&&(e=null),this[S].length>1&&!this[D]&&(this[S]=[this[g]?this[S].join(``):Buffer.concat(this[S],this[w])]);let t=this[p](e||null,this[S][0]);return this[c](),t}[p](e,t){if(this[D])this[E]();else{let n=t;e===n.length||e===null?this[E]():typeof n==`string`?(this[S][0]=n.slice(e),t=n.slice(0,e),this[w]-=e):(this[S][0]=n.subarray(e),t=n.subarray(0,e),this[w]-=e)}return this.emit(`data`,t),!this[S].length&&!this[s]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=`utf8`),e!==void 0&&this.write(e,t),n&&this.once(`end`,n),this[s]=!0,this.writable=!1,(this[y]||!this[b])&&this[c](),this}[x](){this[O]||(!this[L]&&!this[C].length&&(this[R]=!0),this[b]=!1,this[y]=!0,this.emit(`resume`),this[S].length?this[m]():this[s]?this[c]():this.emit(`drain`))}resume(){return this[x]()}pause(){this[y]=!1,this[b]=!0,this[R]=!1}get destroyed(){return this[O]}get flowing(){return this[y]}get paused(){return this[b]}[T](e){this[D]?this[w]+=1:this[w]+=e.length,this[S].push(e)}[E](){return this[D]?--this[w]:this[w]-=this[S][0].length,this[S].shift()}[m](e=!1){do;while(this[h](this[E]())&&this[S].length);!e&&!this[S].length&&!this[s]&&this.emit(`drain`)}[h](e){return this.emit(`data`,e),this[y]}pipe(e,t){if(this[O])return e;this[R]=!1;let n=this[l];return t||={},e===r.stdout||e===r.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[C].push(t.proxyErrors?new re(this,e,t):new ne(this,e,t)),this[N]?z(()=>this[x]()):this[x]()),e}unpipe(e){let t=this[C].find(t=>t.dest===e);t&&(this[C].length===1?(this[y]&&this[L]===0&&(this[y]=!1),this[C]=[]):this[C].splice(this[C].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e===`data`)this[R]=!1,this[L]++,!this[C].length&&!this[y]&&this[x]();else if(e===`readable`&&this[w]!==0)super.emit(`readable`);else if(B(e)&&this[l])super.emit(e),this.removeAllListeners(e);else if(e===`error`&&this[d]){let e=t;this[N]?z(()=>e.call(this,this[d])):e.call(this,this[d])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e===`data`&&(this[L]=this.listeners(`data`).length,this[L]===0&&!this[R]&&!this[C].length&&(this[y]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e===`data`||e===void 0)&&(this[L]=0,!this[R]&&!this[C].length&&(this[y]=!1)),t}get emittedEnd(){return this[l]}[c](){!this[u]&&!this[l]&&!this[O]&&this[S].length===0&&this[s]&&(this[u]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[f]&&this.emit(`close`),this[u]=!1)}emit(e,...t){let n=t[0];if(e!==`error`&&e!==`close`&&e!==O&&this[O])return!1;if(e===`data`)return!this[D]&&!n?!1:this[N]?(z(()=>this[A](n)),!0):this[A](n);if(e===`end`)return this[j]();if(e===`close`){if(this[f]=!0,!this[l]&&!this[O])return!1;let e=super.emit(`close`);return this.removeAllListeners(`close`),e}else if(e===`error`){this[d]=n,super.emit(k,n);let e=!this[I]||this.listeners(`error`).length?super.emit(`error`,n):!1;return this[c](),e}else if(e===`resume`){let e=super.emit(`resume`);return this[c](),e}else if(e===`finish`||e===`prefinish`){let t=super.emit(e);return this.removeAllListeners(e),t}let r=super.emit(e,...t);return this[c](),r}[A](e){for(let t of this[C])t.dest.write(e)===!1&&this.pause();let t=this[R]?!1:super.emit(`data`,e);return this[c](),t}[j](){return this[l]?!1:(this[l]=!0,this.readable=!1,this[N]?(z(()=>this[M]()),!0):this[M]())}[M](){if(this[v]){let e=this[v].end();if(e){for(let t of this[C])t.dest.write(e);this[R]||super.emit(`data`,e)}}for(let e of this[C])e.end();let e=super.emit(`end`);return this.removeAllListeners(`end`),e}async collect(){let e=Object.assign([],{dataLength:0});this[D]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[D]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[D])throw Error(`cannot concat in objectMode`);let e=await this.collect();return this[g]?e.join(``):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(O,()=>t(Error(`stream destroyed`))),this.on(`error`,e=>t(e)),this.on(`end`,()=>e())})}[Symbol.asyncIterator](){this[R]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[s])return t();let r,i,a=e=>{this.off(`data`,o),this.off(`end`,c),this.off(O,l),t(),i(e)},o=e=>{this.off(`error`,a),this.off(`end`,c),this.off(O,l),this.pause(),r({value:e,done:!!this[s]})},c=()=>{this.off(`error`,a),this.off(`data`,o),this.off(O,l),t(),r({done:!0,value:void 0})},l=()=>a(Error(`stream destroyed`));return new Promise((e,t)=>{i=t,r=e,this.once(O,l),this.once(`error`,a),this.once(`end`,c),this.once(`data`,o)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[R]=!1;let e=!1,t=()=>(this.pause(),this.off(k,t),this.off(O,t),this.off(`end`,t),e=!0,{done:!0,value:void 0});return this.once(`end`,t),this.once(k,t),this.once(O,t),{next:()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[O])return e?this.emit(`error`,e):this.emit(O),this;this[O]=!0,this[R]=!0,this[S].length=0,this[w]=0;let t=this;return typeof t.close==`function`&&!this[f]&&t.close(),e?this.emit(`error`,e):this.emit(O),this}static get isStream(){return e.isStream}};e.Minipass=ae})),AP=i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t};Object.defineProperty(e,`__esModule`,{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;let a=OP(),o=t(`node:path`),s=t(`node:url`),c=t(`fs`),l=i(t(`node:fs`)),u=c.realpathSync.native,d=t(`node:fs/promises`),f=kP(),p={lstatSync:c.lstatSync,readdir:c.readdir,readdirSync:c.readdirSync,readlinkSync:c.readlinkSync,realpathSync:u,promises:{lstat:d.lstat,readdir:d.readdir,readlink:d.readlink,realpath:d.realpath}},m=e=>!e||e===p||e===l?p:{...p,...e,promises:{...p.promises,...e.promises||{}}},h=/^\\\\\?\\([a-z]:)\\?$/i,g=e=>e.replace(/\//g,`\\`).replace(h,`$1\\`),v=/[\\\/]/,y=e=>e.isFile()?8:e.isDirectory()?4:e.isSymbolicLink()?10:e.isCharacterDevice()?2:e.isBlockDevice()?6:e.isSocket()?12:+!!e.isFIFO(),b=new Map,x=e=>{let t=b.get(e);if(t)return t;let n=e.normalize(`NFKD`);return b.set(e,n),n},S=new Map,C=e=>{let t=S.get(e);if(t)return t;let n=x(e.toLowerCase());return S.set(e,n),n};var w=class extends a.LRUCache{constructor(){super({max:256})}};e.ResolveCache=w;var T=class extends a.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}};e.ChildrenCache=T;let E=Symbol(`PathScurry setAsCwd`);var D=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#o;get rdev(){return this.#o}#s;get blksize(){return this.#s}#c;get ino(){return this.#c}#l;get size(){return this.#l}#u;get blocks(){return this.#u}#d;get atimeMs(){return this.#d}#f;get mtimeMs(){return this.#f}#p;get ctimeMs(){return this.#p}#m;get birthtimeMs(){return this.#m}#h;get atime(){return this.#h}#g;get mtime(){return this.#g}#_;get ctime(){return this.#_}#v;get birthtime(){return this.#v}#y;#b;#x;#S;#C;#w;#T;#E;#D;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=0,n,r,i,a,o){this.name=e,this.#y=i?C(e):x(e),this.#T=t&1023,this.nocase=i,this.roots=r,this.root=n||this,this.#E=a,this.#x=o.fullpath,this.#C=o.relative,this.#w=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=m(o.fs)}depth(){return this.#b===void 0?this.parent?this.#b=this.parent.depth()+1:this.#b=0:this.#b}childrenCache(){return this.#E}resolve(e){if(!e)return this;let t=this.getRootString(e),n=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#k(n):this.#k(n)}#k(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#E.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#E.set(this,t),this.#T&=-17,t}child(e,t){if(e===``||e===`.`)return this;if(e===`..`)return this.parent||this;let n=this.children(),r=this.nocase?C(e):x(e);for(let e of n)if(e.#y===r)return e;let i=this.parent?this.sep:``,a=this.#x?this.#x+i+e:void 0,o=this.newChild(e,0,{...t,parent:this,fullpath:a});return this.canReaddir()||(o.#T|=128),n.push(o),o}relative(){if(this.isCWD)return``;if(this.#C!==void 0)return this.#C;let e=this.name,t=this.parent;if(!t)return this.#C=this.name;let n=t.relative();return n+(!n||!t.parent?``:this.sep)+e}relativePosix(){if(this.sep===`/`)return this.relative();if(this.isCWD)return``;if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?``:`/`)+e}fullpath(){if(this.#x!==void 0)return this.#x;let e=this.name,t=this.parent;if(!t)return this.#x=this.name;let n=t.fullpath()+(t.parent?this.sep:``)+e;return this.#x=n}fullpathPosix(){if(this.#S!==void 0)return this.#S;if(this.sep===`/`)return this.#S=this.fullpath();if(!this.parent){let e=this.fullpath().replace(/\\/g,`/`);return/^[a-z]:\//i.test(e)?this.#S=`//?/${e}`:this.#S=e}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?``:`/`)+this.name;return this.#S=n}isUnknown(){return(this.#T&15)==0}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?`Unknown`:this.isDirectory()?`Directory`:this.isFile()?`File`:this.isSymbolicLink()?`SymbolicLink`:this.isFIFO()?`FIFO`:this.isCharacterDevice()?`CharacterDevice`:this.isBlockDevice()?`BlockDevice`:this.isSocket()?`Socket`:`Unknown`}isFile(){return(this.#T&15)==8}isDirectory(){return(this.#T&15)==4}isCharacterDevice(){return(this.#T&15)==2}isBlockDevice(){return(this.#T&15)==6}isFIFO(){return(this.#T&15)==1}isSocket(){return(this.#T&15)==12}isSymbolicLink(){return(this.#T&10)==10}lstatCached(){return this.#T&32?this:void 0}readlinkCached(){return this.#D}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#D)return!0;if(!this.parent)return!1;let e=this.#T&15;return!(e!==0&&e!==10||this.#T&256||this.#T&128)}calledReaddir(){return!!(this.#T&16)}isENOENT(){return!!(this.#T&128)}isNamed(e){return this.nocase?this.#y===C(e):this.#y===x(e)}async readlink(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=await this.#e.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}readlinkSync(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=this.#e.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}#A(e){this.#T|=16;for(let t=e.provisional;tt(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let r=n.slice(0,n.provisional);t?e(null,r):queueMicrotask(()=>e(null,r));return}if(this.#U.push(e),this.#W)return;this.#W=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(e,t)=>{if(e)this.#F(e.code),n.provisional=0;else{for(let e of t)this.#R(e,n);this.#A(n)}this.#G(n.slice(0,n.provisional))})}#K;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#K)await this.#K;else{let n=()=>{};this.#K=new Promise(e=>n=e);try{for(let n of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}this.#K=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#e.readdirSync(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#T&704)return!1;let e=15&this.#T;return e===0||e===4||e===10}shouldWalk(e,t){return(this.#T&4)==4&&!(this.#T&704)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#O)return this.#O;if(!(896&this.#T))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#O)return this.#O;if(!(896&this.#T))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}[E](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#C=n.join(this.sep),r.#w=n.join(`/`),r=r.parent,n.push(`..`);for(r=e;r&&r.parent&&!t.has(r);)r.#C=void 0,r.#w=void 0,r=r.parent}};e.PathBase=D;var O=class e extends D{sep=`\\`;splitSep=v;constructor(e,t=0,n,r,i,a,o){super(e,t,n,r,i,a,o)}newChild(t,n=0,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return o.win32.parse(e).root}getRoot(e){if(e=g(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new j(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,`\\`).replace(h,`$1\\`),e===t}};e.PathWin32=O;var k=class e extends D{splitSep=`/`;sep=`/`;constructor(e,t=0,n,r,i,a,o){super(e,t,n,r,i,a,o)}getRootString(e){return e.startsWith(`/`)?`/`:``}getRoot(e){return this.root}newChild(t,n=0,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}};e.PathPosix=k;var A=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#r;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:i=16*1024,fs:a=p}={}){this.#r=m(a),(e instanceof URL||e.startsWith(`file://`))&&(e=(0,s.fileURLToPath)(e));let o=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new w,this.#t=new w,this.#n=new T(i);let c=o.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),r===void 0)throw TypeError(`must provide nocase setting to PathScurryBase ctor`);this.nocase=r,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,u=c.length-1,d=t.sep,f=this.rootPath,h=!1;for(let e of c){let t=u--;l=l.child(e,{relative:Array(t).fill(`..`).join(d),relativePosix:Array(t).fill(`..`).join(`/`),fullpath:f+=(h?``:d)+e}),h=!0}this.cwd=l}depth(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#e.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#t.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,r),r}relative(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let t=await e.readdir();return n?t:t.map(e=>e.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(e=>e.name):[]}async lstat(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set,c=(e,t)=>{s.add(e),e.readdirCB((e,l)=>{if(e)return t(e);let u=l.length;if(!u)return t();let d=()=>{--u===0&&t()};for(let e of l)(!i||i(e))&&o.push(n?e:e.fullpath()),r&&e.isSymbolicLink()?e.realpath().then(e=>e?.isUnknown()?e.lstat():e).then(e=>e?.shouldWalk(s,a)?c(e,d):d()):e.shouldWalk(s,a)?c(e,d):d()},!0)},l=e;return new Promise((e,t)=>{c(l,n=>{if(n)return t(n);e(o)})})}walkSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set([e]);for(let e of s){let t=e.readdirSync();for(let e of t){(!i||i(e))&&o.push(n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&s.add(t)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t;(!i||i(e))&&(yield n?e:e.fullpath());let o=new Set([e]);for(let e of o){let t=e.readdirSync();for(let e of t){(!i||i(e))&&(yield n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,a)&&o.add(t)}}}stream(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new f.Minipass({objectMode:!0});(!i||i(e))&&o.write(n?e:e.fullpath());let s=new Set,c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let d=(t,p,m=!1)=>{if(t)return o.emit(`error`,t);if(r&&!m){let e=[];for(let t of p)t.isSymbolicLink()&&e.push(t.realpath().then(e=>e?.isUnknown()?e.lstat():e));if(e.length){Promise.all(e).then(()=>d(null,p,!0));return}}for(let t of p)t&&(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of p){let t=e.realpathCached()||e;t.shouldWalk(s,a)&&c.push(t)}e&&!o.flowing?o.once(`drain`,u):f||u()},f=!0;t.readdirCB(d,!0),f=!1}};return u(),o}streamSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new f.Minipass({objectMode:!0}),s=new Set;(!i||i(e))&&o.write(n?e:e.fullpath());let c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let u=t.readdirSync();for(let t of u)(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of u){let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&c.push(t)}}e&&!o.flowing&&o.once(`drain`,u)};return u(),o}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e==`string`?this.cwd.resolve(e):e,this.cwd[E](t)}};e.PathScurryBase=A;var j=class extends A{sep=`\\`;constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,o.win32,`\\`,{...t,nocase:n}),this.nocase=n;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return o.win32.parse(e).root.toUpperCase()}newRoot(e){return new O(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)||e.startsWith(`\\`)||/^[a-z]:(\/|\\)/i.test(e)}};e.PathScurryWin32=j;var M=class extends A{sep=`/`;constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,o.posix,`/`,{...t,nocase:n}),this.nocase=n}parseRootPath(e){return`/`}newRoot(e){return new k(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)}};e.PathScurryPosix=M;var N=class extends M{constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}};e.PathScurryDarwin=N,e.Path=process.platform===`win32`?O:k,e.PathScurry=process.platform===`win32`?j:process.platform===`darwin`?N:M})),jP=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pattern=void 0;let t=DP(),n=e=>e.length>=1,r=e=>e.length>=1;e.Pattern=class e{#e;#t;#n;length;#r;#i;#a;#o;#s;#c;#l=!0;constructor(e,t,i,a){if(!n(e))throw TypeError(`empty pattern list`);if(!r(t))throw TypeError(`empty glob list`);if(t.length!==e.length)throw TypeError(`mismatched pattern list and glob list lengths`);if(this.length=e.length,i<0||i>=this.length)throw TypeError(`index out of range`);if(this.#e=e,this.#t=t,this.#n=i,this.#r=a,this.#n===0){if(this.isUNC()){let[e,t,n,r,...i]=this.#e,[a,o,s,c,...l]=this.#t;i[0]===``&&(i.shift(),l.shift());let u=[e,t,n,r,``].join(`/`),d=[a,o,s,c,``].join(`/`);this.#e=[u,...i],this.#t=[d,...l],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[e,...t]=this.#e,[n,...r]=this.#t;t[0]===``&&(t.shift(),r.shift());let i=e+`/`,a=n+`/`;this.#e=[i,...t],this.#t=[a,...r],this.length=this.#e.length}}}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]==`string`}isGlobstar(){return this.#e[this.#n]===t.GLOBSTAR}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#a=this.#a||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join(`/`):this.#t.join(`/`):this.#t.slice(this.#n).join(`/`))}hasMore(){return this.length>this.#n+1}rest(){return this.#i===void 0?this.hasMore()?(this.#i=new e(this.#e,this.#t,this.#n+1,this.#r),this.#i.#c=this.#c,this.#i.#s=this.#s,this.#i.#o=this.#o,this.#i):this.#i=null:this.#i}isUNC(){let e=this.#e;return this.#s===void 0?this.#s=this.#r===`win32`&&this.#n===0&&e[0]===``&&e[1]===``&&typeof e[2]==`string`&&!!e[2]&&typeof e[3]==`string`&&!!e[3]:this.#s}isDrive(){let e=this.#e;return this.#o===void 0?this.#o=this.#r===`win32`&&this.#n===0&&this.length>1&&typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]):this.#o}isAbsolute(){let e=this.#e;return this.#c===void 0?this.#c=e[0]===``&&e.length>1||this.isDrive()||this.isUNC():this.#c}root(){let e=this.#e[0];return typeof e==`string`&&this.isAbsolute()&&this.#n===0?e:``}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}}})),MP=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Ignore=void 0;let t=DP(),n=jP(),r=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:i,noglobstar:a,platform:o=r}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:i,noglobstar:a,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let t of e)this.add(t)}add(e){let r=new t.Minimatch(e,this.mmopts);for(let e=0;e{Object.defineProperty(e,`__esModule`,{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;let t=DP();var n=class e{store;constructor(e=new Map){this.store=e}copy(){return new e(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,new Set([t.globString()]))}};e.HasWalkedCache=n;var r=class{store=new Map;add(e,t,n){let r=(t?2:0)|!!n,i=this.store.get(e);this.store.set(e,i===void 0?r:r&i)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}};e.MatchRecord=r;var i=class{store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(e=>e.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw Error(`attempting to walk unknown path`);return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};e.SubWalks=i,e.Processor=class e{hasWalkedCache;matches=new r;subwalks=new i;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new n}processPatterns(e,n){this.patterns=n;let r=n.map(t=>[e,t]);for(let[e,n]of r){this.hasWalkedCache.storeWalked(e,n);let r=n.root(),i=n.isAbsolute()&&this.opts.absolute!==!1;if(r){e=e.resolve(r===`/`&&this.opts.root!==void 0?this.opts.root:r);let t=n.rest();if(t)n=t;else{this.matches.add(e,!0,!1);continue}}if(e.isENOENT())continue;let a,o,s=!1;for(;typeof(a=n.pattern())==`string`&&(o=n.rest());)e=e.resolve(a),n=o,s=!0;if(a=n.pattern(),o=n.rest(),s){if(this.hasWalkedCache.hasWalked(e,n))continue;this.hasWalkedCache.storeWalked(e,n)}if(typeof a==`string`){let t=a===`..`||a===``||a===`.`;this.matches.add(e.resolve(a),i,t);continue}else if(a===t.GLOBSTAR){(!e.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(e,n);let t=o?.pattern(),r=o?.rest();if(!o||(t===``||t===`.`)&&!r)this.matches.add(e,i,t===``||t===`.`);else if(t===`..`){let t=e.parent||e;r?this.hasWalkedCache.hasWalked(t,r)||this.subwalks.add(t,r):this.matches.add(t,i,!0)}}else a instanceof RegExp&&this.subwalks.add(e,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(e,n){let r=this.subwalks.get(e),i=this.child();for(let e of n)for(let n of r){let r=n.isAbsolute(),a=n.pattern(),o=n.rest();a===t.GLOBSTAR?i.testGlobstar(e,n,o,r):a instanceof RegExp?i.testRegExp(e,a,o,r):i.testString(e,a,o,r)}return i}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith(`.`))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let t=n.pattern();if(typeof t==`string`&&t!==`..`&&t!==``&&t!==`.`)this.testString(e,t,n.rest(),r);else if(t===`..`){let t=e.parent||e;this.subwalks.add(t,n)}else t instanceof RegExp&&this.testRegExp(e,t,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}}})),PP=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;let t=kP(),n=MP(),r=NP(),i=(e,t)=>typeof e==`string`?new n.Ignore([e],t):Array.isArray(e)?new n.Ignore(e,t):e;var a=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform===`win32`?`\\`:`/`,this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#t=i(n.ignore??[],n),!this.includeChildMatches&&typeof this.#t.add!=`function`))throw Error(`cannot ignore child matches, ignore lacks add() method.`);this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener(`abort`,()=>{this.#e.length=0}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=await r.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(r,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=r.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(r,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let t=`${e.relativePosix()}/**`;this.#t.add(t)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#n:``;if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+r)}else{let t=this.opts.posix?e.relativePosix():e.relative(),n=this.opts.dotRelative&&!t.startsWith(`..`+this.#n)?`.`+this.#n:``;this.matchEmit(t?n+t+r:`.`+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new r.Processor(this.opts),n)}walkCB2(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,n,a):e.readdirCB((t,r)=>this.walkCB3(e,r,n,a),!0)}a()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let[e,t]of n.subwalks.entries())i++,this.walkCB2(e,t,n.child(),a);a()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new r.Processor(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirSync();this.walkCB3Sync(e,t,n,a)}a()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let[e,t]of n.subwalks.entries())i++,this.walkCB2Sync(e,t,n.child(),a);a()}};e.GlobUtil=a,e.GlobWalker=class extends a{matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},e.GlobStream=class extends a{results;constructor(e,n,r){super(e,n,r),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on(`drain`,()=>this.resume()),this.results.on(`resume`,()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}})),FP=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Glob=void 0;let n=DP(),r=t(`node:url`),i=AP(),a=jP(),o=PP(),s=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Glob=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw TypeError(`glob options required`);if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith(`file://`))&&(t.cwd=(0,r.fileURLToPath)(t.cwd)):this.cwd=``,this.cwd=t.cwd||``,this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth==`number`?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw Error(`cannot set absolute and withFileTypes:true`);if(typeof e==`string`&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(e=>e.replace(/\\/g,`/`))),this.matchBase){if(t.noglobstar)throw TypeError(`base matching requires globstar`);e=e.map(e=>e.includes(`/`)?e:`./**/${e}`)}if(this.pattern=e,this.platform=t.platform||s,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw Error(`nocase option contradicts provided scurry option`)}else{let e=t.platform===`win32`?i.PathScurryWin32:t.platform===`darwin`?i.PathScurryDarwin:t.platform?i.PathScurryPosix:i.PathScurry;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let o=this.platform===`darwin`||this.platform===`win32`,c={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:o,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},[l,u]=this.pattern.map(e=>new n.Minimatch(e,c)).reduce((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e),[[],[]]);this.patterns=l.map((e,t)=>{let n=u[t];if(!n)throw Error(`invalid pattern object`);return new a.Pattern(e,n,0,this.platform)})}async walk(){return[...await new o.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new o.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new o.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new o.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}})),IP=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasMagic=void 0;let t=DP();e.hasMagic=(e,n={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new t.Minimatch(r,n).hasMagic())return!0;return!1}})),LP=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.glob=e.sync=e.iterate=e.iterateSync=e.stream=e.streamSync=e.Ignore=e.hasMagic=e.Glob=e.unescape=e.escape=void 0,e.globStreamSync=c,e.globStream=l,e.globSync=u,e.globIterateSync=f,e.globIterate=p;let t=DP(),n=FP(),r=IP();var i=DP();Object.defineProperty(e,`escape`,{enumerable:!0,get:function(){return i.escape}}),Object.defineProperty(e,`unescape`,{enumerable:!0,get:function(){return i.unescape}});var a=FP();Object.defineProperty(e,`Glob`,{enumerable:!0,get:function(){return a.Glob}});var o=IP();Object.defineProperty(e,`hasMagic`,{enumerable:!0,get:function(){return o.hasMagic}});var s=MP();Object.defineProperty(e,`Ignore`,{enumerable:!0,get:function(){return s.Ignore}});function c(e,t={}){return new n.Glob(e,t).streamSync()}function l(e,t={}){return new n.Glob(e,t).stream()}function u(e,t={}){return new n.Glob(e,t).walkSync()}async function d(e,t={}){return new n.Glob(e,t).walk()}function f(e,t={}){return new n.Glob(e,t).iterateSync()}function p(e,t={}){return new n.Glob(e,t).iterate()}e.streamSync=c,e.stream=Object.assign(l,{sync:c}),e.iterateSync=f,e.iterate=Object.assign(p,{sync:f}),e.sync=Object.assign(u,{stream:c,iterate:f}),e.glob=Object.assign(d,{glob:d,globSync:u,sync:e.sync,globStream:l,stream:e.stream,globStreamSync:c,streamSync:e.streamSync,globIterate:p,iterate:e.iterate,globIterateSync:f,iterateSync:e.iterateSync,Glob:n.Glob,hasMagic:r.hasMagic,escape:t.escape,unescape:t.unescape}),e.glob.glob=e.glob})),RP=i(((e,n)=>{var r=Lj(),i=t(`path`),a=kN(),o=fP(),s=vP(),c=xP(),l=LP(),u=n.exports={},d=/[\/\\]/g,f=function(e,t){var n=[];return a(e).forEach(function(e){var r=e.indexOf(`!`)===0;r&&(e=e.slice(1));var i=t(e);n=r?o(n,i):s(n,i)}),n};u.exists=function(){var e=i.join.apply(i,arguments);return r.existsSync(e)},u.expand=function(...e){var t=c(e[0])?e.shift():{},n=Array.isArray(e[0])?e[0]:e;if(n.length===0)return[];var a=f(n,function(e){return l.sync(e,t)});return t.filter&&(a=a.filter(function(e){e=i.join(t.cwd||``,e);try{return typeof t.filter==`function`?t.filter(e):r.statSync(e)[t.filter]()}catch{return!1}})),a},u.expandMapping=function(e,t,n){n=Object.assign({rename:function(e,t){return i.join(e||``,t)}},n);var r=[],a={};return u.expand(n,e).forEach(function(e){var o=e;n.flatten&&(o=i.basename(o)),n.ext&&(o=o.replace(/(\.[^\/]*)?$/,n.ext));var s=n.rename(t,o,n);n.cwd&&(e=i.join(n.cwd,e)),s=s.replace(d,`/`),e=e.replace(d,`/`),a[s]?a[s].src.push(e):(r.push({src:[e],dest:s}),a[s]=r[r.length-1])}),r},u.normalizeFilesArray=function(e){var t=[];return e.forEach(function(e){(`src`in e||`dest`in e)&&t.push(e)}),t.length===0?[]:(t=_(t).chain().forEach(function(e){!(`src`in e)||!e.src||(Array.isArray(e.src)?e.src=a(e.src):e.src=[e.src])}).map(function(e){var t=Object.assign({},e);if(delete t.src,delete t.dest,e.expand)return u.expandMapping(e.src,e.dest,t).map(function(t){var n=Object.assign({},e);return n.orig=Object.assign({},e),n.src=t.src,n.dest=t.dest,[`expand`,`cwd`,`flatten`,`rename`,`ext`].forEach(function(e){delete n[e]}),n});var n=Object.assign({},e);return n.orig=Object.assign({},e),`src`in n&&Object.defineProperty(n,`src`,{enumerable:!0,get:function n(){var r;return`result`in n||(r=e.src,r=Array.isArray(r)?a(r):[r],n.result=u.expand(t,r)),n.result}}),`dest`in n&&(n.dest=e.dest),n}).flatten().value(),t)}})),zP=i(((e,n)=>{var r=Lj(),i=t(`path`),a=Rj(),o=rM(),s=iM(),c=YM();t(`stream`).Stream;var l=TN().PassThrough,u=n.exports={};u.file=RP(),u.collectStream=function(e,t){var n=[],r=0;e.on(`error`,t),e.on(`data`,function(e){n.push(e),r+=e.length}),e.on(`end`,function(){var e=Buffer.alloc(r),i=0;n.forEach(function(t){t.copy(e,i),i+=t.length}),t(null,e)})},u.dateify=function(e){return e||=new Date,e=e instanceof Date?e:typeof e==`string`?new Date(e):new Date,e},u.defaults=function(e,t,n){var r=arguments;return r[0]=r[0]||{},c(...r)},u.isStream=function(e){return a(e)},u.lazyReadStream=function(e){return new o.Readable(function(){return r.createReadStream(e)})},u.normalizeInputSource=function(e){return e===null?Buffer.alloc(0):typeof e==`string`?Buffer.from(e):u.isStream(e)?e.pipe(new l):e},u.sanitizePath=function(e){return s(e,!1).replace(/^\w+:/,``).replace(/^(\.\.\/|\/)+/,``)},u.trailingSlashIt=function(e){return e.slice(-1)===`/`?e:e+`/`},u.unixifyPath=function(e){return s(e,!1).replace(/^\w+:/,``)},u.walkdir=function(e,t,n){var a=[];typeof t==`function`&&(n=t,t=e),r.readdir(e,function(o,s){var c=0,l,d;if(o)return n(o);(function o(){if(l=s[c++],!l)return n(null,a);d=i.join(e,l),r.stat(d,function(e,r){a.push({path:d,relative:i.relative(t,d).replace(/\\/g,`/`),stats:r}),r&&r.isDirectory()?u.walkdir(d,t,function(e,t){if(e)return n(e);t.forEach(function(e){a.push(e)}),o()}):o()})})()})}})),BP=i(((e,n)=>{ +var r=t(`buffer`),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?n.exports=r:(a(r,e),e.Buffer=o);function o(e,t,n){return i(e,t,n)}o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return i(e,t,n)},o.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var r=i(e);return t===void 0?r.fill(0):typeof n==`string`?r.fill(t,n):r.fill(t),r},o.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return i(e)},o.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r.SlowBuffer(e)}})),BF=i((e=>{var t=zF().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:case`raw`:return!0;default:return!1}};function r(e){if(!e)return`utf8`;for(var t;;)switch(e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):``}})),VF=i(((e,n)=>{let r=jF(),{PromisePrototypeThen:i,SymbolAsyncIterator:a,SymbolIterator:o}=wF(),{Buffer:s}=t(`buffer`),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:l}=EF().codes;function u(e,t,n){let u;if(typeof t==`string`||t instanceof s)return new e({objectMode:!0,...n,read(){this.push(t),this.push(null)}});let d;if(t&&t[a])d=!0,u=t[a]();else if(t&&t[o])d=!1,u=t[o]();else throw new c(`iterable`,[`Iterable`],t);let f=new e({objectMode:!0,highWaterMark:1,...n}),p=!1;f._read=function(){p||(p=!0,h())},f._destroy=function(e,t){i(m(e),()=>r.nextTick(t,e),n=>r.nextTick(t,n||e))};async function m(e){let t=e!=null,n=typeof u.throw==`function`;if(t&&n){let{value:t,done:n}=await u.throw(e);if(await t,n)return}if(typeof u.return==`function`){let{value:e}=await u.return();await e}}async function h(){for(;;){try{let{value:e,done:t}=d?await u.next():u.next();if(t)f.push(null);else{let t=e&&typeof e.then==`function`?await e:e;if(t===null)throw p=!1,new l;if(f.push(t))continue;p=!1}}catch(e){f.destroy(e)}break}}return f}n.exports=u})),HF=i(((e,n)=>{let r=jF(),{ArrayPrototypeIndexOf:i,NumberIsInteger:a,NumberIsNaN:o,NumberParseInt:s,ObjectDefineProperties:c,ObjectKeys:l,ObjectSetPrototypeOf:u,Promise:d,SafeSet:f,SymbolAsyncDispose:p,SymbolAsyncIterator:m,Symbol:h}=wF();n.exports=H,H.ReadableState=re;let{EventEmitter:g}=t(`events`),{Stream:v,prependListener:y}=FF(),{Buffer:b}=t(`buffer`),{addAbortSignal:x}=IF(),S=NF(),C=kF().debuglog(`stream`,e=>{C=e}),w=LF(),T=PF(),{getHighWaterMark:E,getDefaultHighWaterMark:D}=RF(),{aggregateTwoErrors:O,codes:{ERR_INVALID_ARG_TYPE:k,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_OUT_OF_RANGE:j,ERR_STREAM_PUSH_AFTER_EOF:M,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:P}=EF(),{validateObject:F}=AF(),I=h(`kPaused`),{StringDecoder:L}=BF(),R=VF();u(H.prototype,v.prototype),u(H,v);let z=()=>{},{errorOrDestroy:ee}=T,B=2048,te=4096,V=65536;function ne(e){return{enumerable:!1,get(){return(this.state&e)!==0},set(t){t?this.state|=e:this.state&=~e}}}c(re.prototype,{objectMode:ne(1),ended:ne(2),endEmitted:ne(4),reading:ne(8),constructed:ne(16),sync:ne(32),needReadable:ne(64),emittedReadable:ne(128),readableListening:ne(256),resumeScheduled:ne(512),errorEmitted:ne(1024),emitClose:ne(B),autoDestroy:ne(te),destroyed:ne(8192),closed:ne(16384),closeEmitted:ne(32768),multiAwaitDrain:ne(V),readingMore:ne(131072),dataEmitted:ne(262144)});function re(e,t,n){typeof n!=`boolean`&&(n=t instanceof GF()),this.state=6192,e&&e.objectMode&&(this.state|=1),n&&e&&e.readableObjectMode&&(this.state|=1),this.highWaterMark=e?E(this,e,`readableHighWaterMark`,n):D(!1),this.buffer=new w,this.length=0,this.pipes=[],this.flowing=null,this[I]=null,e&&e.emitClose===!1&&(this.state&=~B),e&&e.autoDestroy===!1&&(this.state&=~te),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||`utf8`,this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new L(e.encoding),this.encoding=e.encoding)}function H(e){if(!(this instanceof H))return new H(e);let t=this instanceof GF();this._readableState=new re(e,this,t),e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.construct==`function`&&(this._construct=e.construct),e.signal&&!t&&x(e.signal,this)),v.call(this,e),T.construct(this,()=>{this._readableState.needReadable&&de(this,this._readableState)})}H.prototype.destroy=T.destroy,H.prototype._undestroy=T.undestroy,H.prototype._destroy=function(e,t){t(e)},H.prototype[g.captureRejectionSymbol]=function(e){this.destroy(e)},H.prototype[p]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new P,this.destroy(e)),new d((t,n)=>S(this,r=>r&&r!==e?n(r):t(null)))},H.prototype.push=function(e,t){return ie(this,e,t,!1)},H.prototype.unshift=function(e,t){return ie(this,e,t,!0)};function ie(e,t,n,r){C(`readableAddChunk`,t);let i=e._readableState,a;if(i.state&1||(typeof t==`string`?(n||=i.defaultEncoding,i.encoding!==n&&(r&&i.encoding?t=b.from(t,n).toString(i.encoding):(t=b.from(t,n),n=``))):t instanceof b?n=``:v._isUint8Array(t)?(t=v._uint8ArrayToBuffer(t),n=``):t!=null&&(a=new k(`chunk`,[`string`,`Buffer`,`Uint8Array`],t))),a)ee(e,a);else if(t===null)i.state&=-9,ce(e,i);else if(i.state&1||t&&t.length>0)if(r)if(i.state&4)ee(e,new N);else if(i.destroyed||i.errored)return!1;else ae(e,i,t,!0);else if(i.ended)ee(e,new M);else if(i.destroyed||i.errored)return!1;else i.state&=-9,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||t.length!==0?ae(e,i,t,!1):de(e,i)):ae(e,i,t,!1);else r||(i.state&=-9,de(e,i));return!i.ended&&(i.length0?((t.state&V)===0?t.awaitDrainWriters=null:t.awaitDrainWriters.clear(),t.dataEmitted=!0,e.emit(`data`,n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.state&64&&le(e)),de(e,t)}H.prototype.isPaused=function(){let e=this._readableState;return e[I]===!0||e.flowing===!1},H.prototype.setEncoding=function(e){let t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;let n=this._readableState.buffer,r=``;for(let e of n)r+=t.write(e);return n.clear(),r!==``&&n.push(r),this._readableState.length=r.length,this};function oe(e){if(e>1073741824)throw new j(`size`,`<= 1GiB`,e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++,e}function se(e,t){return e<=0||t.length===0&&t.ended?0:t.state&1?1:o(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}H.prototype.read=function(e){C(`read`,e),e===void 0?e=NaN:a(e)||(e=s(e,10));let t=this._readableState,n=e;if(e>t.highWaterMark&&(t.highWaterMark=oe(e)),e!==0&&(t.state&=-129),e===0&&t.needReadable&&((t.highWaterMark===0?t.length>0:t.length>=t.highWaterMark)||t.ended))return C(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?xe(this):le(this),null;if(e=se(e,t),e===0&&t.ended)return t.length===0&&xe(this),null;let r=(t.state&64)!=0;if(C(`need readable`,r),(t.length===0||t.length-e0?be(e,t):null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&xe(this)),i!==null&&!t.errorEmitted&&!t.closeEmitted&&(t.dataEmitted=!0,this.emit(`data`,i)),i};function ce(e,t){if(C(`onEofChunk`),!t.ended){if(t.decoder){let e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?le(e):(t.needReadable=!1,t.emittedReadable=!0,ue(e))}}function le(e){let t=e._readableState;C(`emitReadable`,t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(C(`emitReadable`,t.flowing),t.emittedReadable=!0,r.nextTick(ue,e))}function ue(e){let t=e._readableState;C(`emitReadable_`,t.destroyed,t.length,t.ended),!t.destroyed&&!t.errored&&(t.length||t.ended)&&(e.emit(`readable`),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function de(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,r.nextTick(fe,e,t))}function fe(e,t){for(;!t.reading&&!t.ended&&(t.length1&&i.pipes.includes(e)&&(C(`false write response, pause`,i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),n.pause()),c||(c=pe(n,e),e.on(`drain`,c))}n.on(`data`,p);function p(t){C(`ondata`);let n=e.write(t);C(`dest.write`,n),n===!1&&d()}function m(t){if(C(`onerror`,t),v(),e.removeListener(`error`,m),e.listenerCount(`error`)===0){let n=e._writableState||e._readableState;n&&!n.errorEmitted?ee(e,t):e.emit(`error`,t)}}y(e,`error`,m);function h(){e.removeListener(`finish`,g),v()}e.once(`close`,h);function g(){C(`onfinish`),e.removeListener(`close`,h),v()}e.once(`finish`,g);function v(){C(`unpipe`),n.unpipe(e)}return e.emit(`pipe`,n),e.writableNeedDrain===!0?d():i.flowing||(C(`pipe resume`),n.resume()),e};function pe(e,t){return function(){let n=e._readableState;n.awaitDrainWriters===t?(C(`pipeOnDrain`,1),n.awaitDrainWriters=null):n.multiAwaitDrain&&(C(`pipeOnDrain`,n.awaitDrainWriters.size),n.awaitDrainWriters.delete(t)),(!n.awaitDrainWriters||n.awaitDrainWriters.size===0)&&e.listenerCount(`data`)&&e.resume()}}H.prototype.unpipe=function(e){let t=this._readableState,n={hasUnpiped:!1};if(t.pipes.length===0)return this;if(!e){let e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,i.flowing!==!1&&this.resume()):e===`readable`&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,C(`on readable`,i.length,i.reading),i.length?le(this):i.reading||r.nextTick(he,this)),n},H.prototype.addListener=H.prototype.on,H.prototype.removeListener=function(e,t){let n=v.prototype.removeListener.call(this,e,t);return e===`readable`&&r.nextTick(me,this),n},H.prototype.off=H.prototype.removeListener,H.prototype.removeAllListeners=function(e){let t=v.prototype.removeAllListeners.apply(this,arguments);return(e===`readable`||e===void 0)&&r.nextTick(me,this),t};function me(e){let t=e._readableState;t.readableListening=e.listenerCount(`readable`)>0,t.resumeScheduled&&t[I]===!1?t.flowing=!0:e.listenerCount(`data`)>0?e.resume():t.readableListening||(t.flowing=null)}function he(e){C(`readable nexttick read 0`),e.read(0)}H.prototype.resume=function(){let e=this._readableState;return e.flowing||(C(`resume`),e.flowing=!e.readableListening,ge(this,e)),e[I]=!1,this};function ge(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(_e,e,t))}function _e(e,t){C(`resume`,t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(`resume`),U(e),t.flowing&&!t.reading&&e.read(0)}H.prototype.pause=function(){return C(`call pause flowing=%j`,this._readableState.flowing),this._readableState.flowing!==!1&&(C(`pause`),this._readableState.flowing=!1,this.emit(`pause`)),this._readableState[I]=!0,this};function U(e){let t=e._readableState;for(C(`flow`,t.flowing);t.flowing&&e.read()!==null;);}H.prototype.wrap=function(e){let t=!1;e.on(`data`,n=>{!this.push(n)&&e.pause&&(t=!0,e.pause())}),e.on(`end`,()=>{this.push(null)}),e.on(`error`,e=>{ee(this,e)}),e.on(`close`,()=>{this.destroy()}),e.on(`destroy`,()=>{this.destroy()}),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};let n=l(e);for(let t=1;t{i=e?O(i,e):null,n(),n=z});try{for(;;){let t=e.destroyed?null:e.read();if(t!==null)yield t;else if(i)throw i;else if(i===null)return;else await new d(r)}}catch(e){throw i=O(i,e),i}finally{(i||t?.destroyOnReturn!==!1)&&(i===void 0||e._readableState.autoDestroy)?T.destroyer(e,null):(e.off(`readable`,r),a())}}c(H.prototype,{readable:{__proto__:null,get(){let e=this._readableState;return!!e&&e.readable!==!1&&!e.destroyed&&!e.errorEmitted&&!e.endEmitted},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),c(re.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[I]!==!1},set(e){this[I]=!!e}}}),H._fromList=be;function be(e,t){if(t.length===0)return null;let n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n}function xe(e){let t=e._readableState;C(`endReadable`,t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(Se,t,e))}function Se(e,t){if(C(`endReadableNT`,e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&e.length===0){if(e.endEmitted=!0,t.emit(`end`),t.writable&&t.allowHalfOpen===!1)r.nextTick(Ce,t);else if(e.autoDestroy){let e=t._writableState;(!e||e.autoDestroy&&(e.finished||e.writable===!1))&&t.destroy()}}}function Ce(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}H.from=function(e,t){return R(H,e,t)};let we;function Te(){return we===void 0&&(we={}),we}H.fromWeb=function(e,t){return Te().newStreamReadableFromReadableStream(e,t)},H.toWeb=function(e,t){return Te().newReadableStreamFromStreamReadable(e,t)},H.wrap=function(e,t){return new H({objectMode:e.readableObjectMode??e.objectMode??!0,...t,destroy(t,n){T.destroyer(e,t),n(t)}}).wrap(e)}})),UF=i(((e,n)=>{let r=jF(),{ArrayPrototypeSlice:i,Error:a,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:s,ObjectDefineProperties:c,ObjectSetPrototypeOf:l,StringPrototypeToLowerCase:u,Symbol:d,SymbolHasInstance:f}=wF();n.exports=F,F.WritableState=N;let{EventEmitter:p}=t(`events`),m=FF().Stream,{Buffer:h}=t(`buffer`),g=PF(),{addAbortSignal:v}=IF(),{getHighWaterMark:y,getDefaultHighWaterMark:b}=RF(),{ERR_INVALID_ARG_TYPE:x,ERR_METHOD_NOT_IMPLEMENTED:S,ERR_MULTIPLE_CALLBACK:C,ERR_STREAM_CANNOT_PIPE:w,ERR_STREAM_DESTROYED:T,ERR_STREAM_ALREADY_FINISHED:E,ERR_STREAM_NULL_VALUES:D,ERR_STREAM_WRITE_AFTER_END:O,ERR_UNKNOWN_ENCODING:k}=EF().codes,{errorOrDestroy:A}=g;l(F.prototype,m.prototype),l(F,m);function j(){}let M=d(`kOnFinished`);function N(e,t,n){typeof n!=`boolean`&&(n=t instanceof GF()),this.objectMode=!!(e&&e.objectMode),n&&(this.objectMode=this.objectMode||!!(e&&e.writableObjectMode)),this.highWaterMark=e?y(this,e,`writableHighWaterMark`,n):b(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let r=!!(e&&e.decodeStrings===!1);this.decodeStrings=!r,this.defaultEncoding=e&&e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=ee.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,P(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||e.emitClose!==!1,this.autoDestroy=!e||e.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[M]=[]}function P(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}N.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},s(N.prototype,`bufferedRequestCount`,{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function F(e){let t=this instanceof GF();if(!t&&!o(F,this))return new F(e);this._writableState=new N(e,this,t),e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final),typeof e.construct==`function`&&(this._construct=e.construct),e.signal&&v(e.signal,this)),m.call(this,e),g.construct(this,()=>{let e=this._writableState;e.writing||ne(this,e),ae(this,e)})}s(F,f,{__proto__:null,value:function(e){return o(this,e)?!0:this===F?e&&e._writableState instanceof N:!1}}),F.prototype.pipe=function(){A(this,new w)};function I(e,t,n,i){let a=e._writableState;if(typeof n==`function`)i=n,n=a.defaultEncoding;else{if(!n)n=a.defaultEncoding;else if(n!==`buffer`&&!h.isEncoding(n))throw new k(n);typeof i!=`function`&&(i=j)}if(t===null)throw new D;if(!a.objectMode)if(typeof t==`string`)a.decodeStrings!==!1&&(t=h.from(t,n),n=`buffer`);else if(t instanceof h)n=`buffer`;else if(m._isUint8Array(t))t=m._uint8ArrayToBuffer(t),n=`buffer`;else throw new x(`chunk`,[`string`,`Buffer`,`Uint8Array`],t);let o;return a.ending?o=new O:a.destroyed&&(o=new T(`write`)),o?(r.nextTick(i,o),A(e,o,!0),o):(a.pendingcb++,L(e,a,t,n,i))}F.prototype.write=function(e,t,n){return I(this,e,t,n)===!0},F.prototype.cork=function(){this._writableState.corked++},F.prototype.uncork=function(){let e=this._writableState;e.corked&&(e.corked--,e.writing||ne(this,e))},F.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=u(e)),!h.isEncoding(e))throw new k(e);return this._writableState.defaultEncoding=e,this};function L(e,t,n,r,i){let a=t.objectMode?1:n.length;t.length+=a;let o=t.lengthn.bufferedIndex&&ne(e,n),i?n.afterWriteTickInfo!==null&&n.afterWriteTickInfo.cb===a?n.afterWriteTickInfo.count++:(n.afterWriteTickInfo={count:1,cb:a,stream:e,state:n},r.nextTick(B,n.afterWriteTickInfo)):te(e,n,1,a))}function B({stream:e,state:t,count:n,cb:r}){return t.afterWriteTickInfo=null,te(e,t,n,r)}function te(e,t,n,r){for(!t.ending&&!e.destroyed&&t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit(`drain`));n-- >0;)t.pendingcb--,r();t.destroyed&&V(t),ae(e,t)}function V(e){if(e.writing)return;for(let t=e.bufferedIndex;t1&&e._writev){t.pendingcb-=o-1;let r=t.allNoop?j:e=>{for(let t=s;t256?(n.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}F.prototype._write=function(e,t,n){if(this._writev)this._writev([{chunk:e,encoding:t}],n);else throw new S(`_write()`)},F.prototype._writev=null,F.prototype.end=function(e,t,n){let i=this._writableState;typeof e==`function`?(n=e,e=null,t=null):typeof t==`function`&&(n=t,t=null);let o;if(e!=null){let n=I(this,e,t);n instanceof a&&(o=n)}return i.corked&&(i.corked=1,this.uncork()),o||(!i.errored&&!i.ending?(i.ending=!0,ae(this,i,!0),i.ended=!0):i.finished?o=new E(`end`):i.destroyed&&(o=new T(`end`))),typeof n==`function`&&(o||i.finished?r.nextTick(n,o):i[M].push(n)),this};function re(e){return e.ending&&!e.destroyed&&e.constructed&&e.length===0&&!e.errored&&e.buffered.length===0&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function H(e,t){let n=!1;function i(i){if(n){A(e,i??C());return}if(n=!0,t.pendingcb--,i){let n=t[M].splice(0);for(let e=0;e{re(t)?oe(e,t):t.pendingcb--},e,t)):re(t)&&(t.pendingcb++,oe(e,t))))}function oe(e,t){t.pendingcb--,t.finished=!0;let n=t[M].splice(0);for(let e=0;e{let r=jF(),i=t(`buffer`),{isReadable:a,isWritable:o,isIterable:s,isNodeStream:c,isReadableNodeStream:l,isWritableNodeStream:u,isDuplexNodeStream:d,isReadableStream:f,isWritableStream:p}=MF(),m=NF(),{AbortError:h,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:v}}=EF(),{destroyer:y}=PF(),b=GF(),x=HF(),S=UF(),{createDeferredPromise:C}=kF(),w=VF(),T=globalThis.Blob||i.Blob,E=T===void 0?function(e){return!1}:function(e){return e instanceof T},D=globalThis.AbortController||OF().AbortController,{FunctionPrototypeCall:O}=wF();var k=class extends b{constructor(e){super(e),e?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};n.exports=function e(t,n){if(d(t))return t;if(l(t))return j({readable:t});if(u(t))return j({writable:t});if(c(t))return j({writable:!1,readable:!1});if(f(t))return j({readable:x.fromWeb(t)});if(p(t))return j({writable:S.fromWeb(t)});if(typeof t==`function`){let{value:e,write:i,final:a,destroy:o}=A(t);if(s(e))return w(k,e,{objectMode:!0,write:i,final:a,destroy:o});let c=e?.then;if(typeof c==`function`){let t,n=O(c,e,e=>{if(e!=null)throw new v(`nully`,`body`,e)},e=>{y(t,e)});return t=new k({objectMode:!0,readable:!1,write:i,final(e){a(async()=>{try{await n,r.nextTick(e,null)}catch(t){r.nextTick(e,t)}})},destroy:o})}throw new v(`Iterable, AsyncIterable or AsyncFunction`,n,e)}if(E(t))return e(t.arrayBuffer());if(s(t))return w(k,t,{objectMode:!0,writable:!1});if(f(t?.readable)&&p(t?.writable))return k.fromWeb(t);if(typeof t?.writable==`object`||typeof t?.readable==`object`)return j({readable:t!=null&&t.readable?l(t?.readable)?t?.readable:e(t.readable):void 0,writable:t!=null&&t.writable?u(t?.writable)?t?.writable:e(t.writable):void 0});let i=t?.then;if(typeof i==`function`){let e;return O(i,t,t=>{t!=null&&e.push(t),e.push(null)},t=>{y(e,t)}),e=new k({objectMode:!0,writable:!1,read(){}})}throw new g(n,[`Blob`,`ReadableStream`,`WritableStream`,`Stream`,`Iterable`,`AsyncIterable`,`Function`,`{ readable, writable } pair`,`Promise`],t)};function A(e){let{promise:t,resolve:n}=C(),i=new D,a=i.signal;return{value:e((async function*(){for(;;){let e=t;t=null;let{chunk:i,done:o,cb:s}=await e;if(r.nextTick(s),o)return;if(a.aborted)throw new h(void 0,{cause:a.reason});({promise:t,resolve:n}=C()),yield i}})(),{signal:a}),write(e,t,r){let i=n;n=null,i({chunk:e,done:!1,cb:r})},final(e){let t=n;n=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}function j(e){let t=e.readable&&typeof e.readable.read!=`function`?x.wrap(e.readable):e.readable,n=e.writable,r=!!a(t),i=!!o(n),s,c,l,u,d;function f(e){let t=u;u=null,t?t(e):e&&d.destroy(e)}return d=new k({readableObjectMode:!!(t!=null&&t.readableObjectMode),writableObjectMode:!!(n!=null&&n.writableObjectMode),readable:r,writable:i}),i&&(m(n,e=>{i=!1,e&&y(t,e),f(e)}),d._write=function(e,t,r){n.write(e,t)?r():s=r},d._final=function(e){n.end(),c=e},n.on(`drain`,function(){if(s){let e=s;s=null,e()}}),n.on(`finish`,function(){if(c){let e=c;c=null,e()}})),r&&(m(t,e=>{r=!1,e&&y(t,e),f(e)}),t.on(`readable`,function(){if(l){let e=l;l=null,e()}}),t.on(`end`,function(){d.push(null)}),d._read=function(){for(;;){let e=t.read();if(e===null){l=d._read;return}if(!d.push(e))return}}),d._destroy=function(e,r){!e&&u!==null&&(e=new h),l=null,s=null,c=null,u===null?r(e):(u=r,y(n,e),y(t,e))},d}})),GF=i(((e,t)=>{let{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:r,ObjectKeys:i,ObjectSetPrototypeOf:a}=wF();t.exports=c;let o=HF(),s=UF();a(c.prototype,o.prototype),a(c,o);{let e=i(s.prototype);for(let t=0;t{let{ObjectSetPrototypeOf:n,Symbol:r}=wF();t.exports=c;let{ERR_METHOD_NOT_IMPLEMENTED:i}=EF().codes,a=GF(),{getHighWaterMark:o}=RF();n(c.prototype,a.prototype),n(c,a);let s=r(`kCallback`);function c(e){if(!(this instanceof c))return new c(e);let t=e?o(this,e,`readableHighWaterMark`,!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),a.call(this,e),this._readableState.sync=!1,this[s]=null,e&&(typeof e.transform==`function`&&(this._transform=e.transform),typeof e.flush==`function`&&(this._flush=e.flush)),this.on(`prefinish`,u)}function l(e){typeof this._flush==`function`&&!this.destroyed?this._flush((t,n)=>{if(t){e?e(t):this.destroy(t);return}n!=null&&this.push(n),this.push(null),e&&e()}):(this.push(null),e&&e())}function u(){this._final!==l&&l.call(this)}c.prototype._final=l,c.prototype._transform=function(e,t,n){throw new i(`_transform()`)},c.prototype._write=function(e,t,n){let r=this._readableState,i=this._writableState,a=r.length;this._transform(e,t,(e,t)=>{if(e){n(e);return}t!=null&&this.push(t),i.ended||a===r.length||r.length{let{ObjectSetPrototypeOf:n}=wF();t.exports=i;let r=KF();n(i.prototype,r.prototype),n(i,r);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}i.prototype._transform=function(e,t,n){n(null,e)}})),JF=i(((e,t)=>{let n=jF(),{ArrayIsArray:r,Promise:i,SymbolAsyncIterator:a,SymbolDispose:o}=wF(),s=NF(),{once:c}=kF(),l=PF(),u=GF(),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:f,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:m,ERR_STREAM_DESTROYED:h,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:v}=EF(),{validateFunction:y,validateAbortSignal:b}=AF(),{isIterable:x,isReadable:S,isReadableNodeStream:C,isNodeStream:w,isTransformStream:T,isWebStream:E,isReadableStream:D,isReadableFinished:O}=MF(),k=globalThis.AbortController||OF().AbortController,A,j,M;function N(e,t,n){let r=!1;return e.on(`close`,()=>{r=!0}),{destroy:t=>{r||(r=!0,l.destroyer(e,t||new h(`pipe`)))},cleanup:s(e,{readable:t,writable:n},e=>{r=!e})}}function P(e){return y(e[e.length-1],`streams[stream.length - 1]`),e.pop()}function F(e){if(x(e))return e;if(C(e))return I(e);throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`],e)}async function*I(e){j||=HF(),yield*j.prototype[a].call(e)}async function L(e,t,n,{end:r}){let a,o=null,c=e=>{if(e&&(a=e),o){let e=o;o=null,e()}},l=()=>new i((e,t)=>{a?t(a):o=()=>{a?t(a):e()}});t.on(`drain`,c);let u=s(t,{readable:!1},c);try{t.writableNeedDrain&&await l();for await(let n of e)t.write(n)||await l();r&&(t.end(),await l()),n()}catch(e){n(a===e?e:d(a,e))}finally{u(),t.off(`drain`,c)}}async function R(e,t,n,{end:r}){T(t)&&(t=t.writable);let i=t.getWriter();try{for await(let t of e)await i.ready,i.write(t).catch(()=>{});await i.ready,r&&await i.close(),n()}catch(e){try{await i.abort(e),n(e)}catch(e){n(e)}}}function z(...e){return ee(e,c(P(e)))}function ee(e,t,i){if(e.length===1&&r(e[0])&&(e=e[0]),e.length<2)throw new m(`streams`);let a=new k,s=a.signal,c=i?.signal,l=[];b(c,`options.signal`);function d(){I(new v)}M||=kF().addAbortListener;let h;c&&(h=M(c,d));let g,y,O=[],j=0;function P(e){I(e,--j===0)}function I(e,r){var i;if(e&&(!g||g.code===`ERR_STREAM_PREMATURE_CLOSE`)&&(g=e),!(!g&&!r)){for(;O.length;)O.shift()(g);(i=h)==null||i[o](),a.abort(),r&&(g||l.forEach(e=>e()),n.nextTick(t,g,y))}}let z;for(let t=0;t0,c=a||i?.end!==!1,d=t===e.length-1;if(w(r)){if(c){let{destroy:e,cleanup:t}=N(r,a,o);O.push(e),S(r)&&d&&l.push(t)}function e(e){e&&e.name!==`AbortError`&&e.code!==`ERR_STREAM_PREMATURE_CLOSE`&&P(e)}r.on(`error`,e),S(r)&&d&&l.push(()=>{r.removeListener(`error`,e)})}if(t===0)if(typeof r==`function`){if(z=r({signal:s}),!x(z))throw new p(`Iterable, AsyncIterable or Stream`,`source`,z)}else z=x(r)||C(r)||T(r)?r:u.from(r);else if(typeof r==`function`)if(z=T(z)?F(z?.readable):F(z),z=r(z,{signal:s}),a){if(!x(z,!0))throw new p(`AsyncIterable`,`transform[${t-1}]`,z)}else{A||=qF();let e=new A({objectMode:!0}),t=z?.then;if(typeof t==`function`)j++,t.call(z,t=>{y=t,t!=null&&e.write(t),c&&e.end(),n.nextTick(P)},t=>{e.destroy(t),n.nextTick(P,t)});else if(x(z,!0))j++,L(z,e,P,{end:c});else if(D(z)||T(z)){let t=z.readable||z;j++,L(t,e,P,{end:c})}else throw new p(`AsyncIterable or Promise`,`destination`,z);z=e;let{destroy:r,cleanup:i}=N(z,!1,!0);O.push(r),d&&l.push(i)}else if(w(r)){if(C(z)){j+=2;let e=B(z,r,P,{end:c});S(r)&&d&&l.push(e)}else if(T(z)||D(z)){let e=z.readable||z;j++,L(e,r,P,{end:c})}else if(x(z))j++,L(z,r,P,{end:c});else throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`,`ReadableStream`,`TransformStream`],z);z=r}else if(E(r)){if(C(z))j++,R(F(z),r,P,{end:c});else if(D(z)||x(z))j++,R(z,r,P,{end:c});else if(T(z))j++,R(z.readable,r,P,{end:c});else throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`,`ReadableStream`,`TransformStream`],z);z=r}else z=u.from(r)}return(s!=null&&s.aborted||c!=null&&c.aborted)&&n.nextTick(d),z}function B(e,t,r,{end:i}){let a=!1;if(t.on(`close`,()=>{a||r(new g)}),e.pipe(t,{end:!1}),i){function r(){a=!0,t.end()}O(e)?n.nextTick(r):e.once(`end`,r)}else r();return s(e,{readable:!0,writable:!1},t=>{let n=e._readableState;t&&t.code===`ERR_STREAM_PREMATURE_CLOSE`&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once(`end`,r).once(`error`,r):r(t)}),s(t,{readable:!1,writable:!0},r)}t.exports={pipelineImpl:ee,pipeline:z}})),YF=i(((e,t)=>{let{pipeline:n}=JF(),r=GF(),{destroyer:i}=PF(),{isNodeStream:a,isReadable:o,isWritable:s,isWebStream:c,isTransformStream:l,isWritableStream:u,isReadableStream:d}=MF(),{AbortError:f,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:m}}=EF(),h=NF();t.exports=function(...e){if(e.length===0)throw new m(`streams`);if(e.length===1)return r.from(e[0]);let t=[...e];if(typeof e[0]==`function`&&(e[0]=r.from(e[0])),typeof e[e.length-1]==`function`){let t=e.length-1;e[t]=r.from(e[t])}for(let n=0;n0&&!(s(e[n])||u(e[n])||l(e[n])))throw new p(`streams[${n}]`,t[n],`must be writable`)}let g,v,y,b,x;function S(e){let t=b;b=null,t?t(e):e?x.destroy(e):!E&&!T&&x.destroy()}let C=e[0],w=n(e,S),T=!!(s(C)||u(C)||l(C)),E=!!(o(w)||d(w)||l(w));if(x=new r({writableObjectMode:!!(C!=null&&C.writableObjectMode),readableObjectMode:!!(w!=null&&w.readableObjectMode),writable:T,readable:E}),T){if(a(C))x._write=function(e,t,n){C.write(e,t)?n():g=n},x._final=function(e){C.end(),v=e},C.on(`drain`,function(){if(g){let e=g;g=null,e()}});else if(c(C)){let e=(l(C)?C.writable:C).getWriter();x._write=async function(t,n,r){try{await e.ready,e.write(t).catch(()=>{}),r()}catch(e){r(e)}},x._final=async function(t){try{await e.ready,e.close().catch(()=>{}),v=t}catch(e){t(e)}}}h(l(w)?w.readable:w,()=>{if(v){let e=v;v=null,e()}})}if(E){if(a(w))w.on(`readable`,function(){if(y){let e=y;y=null,e()}}),w.on(`end`,function(){x.push(null)}),x._read=function(){for(;;){let e=w.read();if(e===null){y=x._read;return}if(!x.push(e))return}};else if(c(w)){let e=(l(w)?w.readable:w).getReader();x._read=async function(){for(;;)try{let{value:t,done:n}=await e.read();if(!x.push(t))return;if(n){x.push(null);return}}catch{return}}}}return x._destroy=function(e,t){!e&&b!==null&&(e=new f),y=null,g=null,v=null,b===null?t(e):(b=t,a(w)&&i(w,e))},x}})),XF=i(((e,t)=>{let n=globalThis.AbortController||OF().AbortController,{codes:{ERR_INVALID_ARG_VALUE:r,ERR_INVALID_ARG_TYPE:i,ERR_MISSING_ARGS:a,ERR_OUT_OF_RANGE:o},AbortError:s}=EF(),{validateAbortSignal:c,validateInteger:l,validateObject:u}=AF(),d=wF().Symbol(`kWeak`),f=wF().Symbol(`kResistStopPropagation`),{finished:p}=NF(),m=YF(),{addAbortSignalNoValidate:h}=IF(),{isWritable:g,isNodeStream:v}=MF(),{deprecate:y}=kF(),{ArrayPrototypePush:b,Boolean:x,MathFloor:S,Number:C,NumberIsNaN:w,Promise:T,PromiseReject:E,PromiseResolve:D,PromisePrototypeThen:O,Symbol:k}=wF(),A=k(`kEmpty`),j=k(`kEof`);function M(e,t){if(t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),v(e)&&!g(e))throw new r(`stream`,e,`must be writable`);let n=m(this,e);return t!=null&&t.signal&&h(t.signal,n),n}function N(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`);let n=1;t?.concurrency!=null&&(n=S(t.concurrency));let r=n-1;return t?.highWaterMark!=null&&(r=S(t.highWaterMark)),l(n,`options.concurrency`,1),l(r,`options.highWaterMark`,0),r+=n,async function*(){let i=kF().AbortSignalAny([t?.signal].filter(x)),a=this,o=[],c={signal:i},l,u,d=!1,f=0;function p(){d=!0,m()}function m(){--f,h()}function h(){u&&!d&&f=r||f>=n)&&await new T(e=>{u=e})}o.push(j)}catch(e){let t=E(e);O(t,m,p),o.push(t)}finally{d=!0,l&&=(l(),null)}}g();try{for(;;){for(;o.length>0;){let e=await o[0];if(e===j)return;if(i.aborted)throw new s;e!==A&&(yield e),o.shift(),h()}await new T(e=>{l=e})}}finally{d=!0,u&&=(u(),null)}}.call(this)}function P(e=void 0){return e!=null&&u(e,`options`),e?.signal!=null&&c(e.signal,`options.signal`),async function*(){let t=0;for await(let r of this){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)throw new s({cause:e.signal.reason});yield[t++,r]}}.call(this)}async function F(e,t=void 0){for await(let n of z.call(this,e,t))return!0;return!1}async function I(e,t=void 0){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);return!await F.call(this,async(...t)=>!await e(...t),t)}async function L(e,t){for await(let n of z.call(this,e,t))return n}async function R(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);async function n(t,n){return await e(t,n),A}for await(let e of N.call(this,n,t));}function z(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);async function n(t,n){return await e(t,n)?t:A}return N.call(this,n,t)}var ee=class extends a{constructor(){super(`reduce`),this.message=`Reduce of an empty stream requires an initial value`}};async function B(e,t,r){var a;if(typeof e!=`function`)throw new i(`reducer`,[`Function`,`AsyncFunction`],e);r!=null&&u(r,`options`),r?.signal!=null&&c(r.signal,`options.signal`);let o=arguments.length>1;if(r!=null&&(a=r.signal)!=null&&a.aborted){let e=new s(void 0,{cause:r.signal.reason});throw this.once(`error`,()=>{}),await p(this.destroy(e)),e}let l=new n,m=l.signal;if(r!=null&&r.signal){let e={once:!0,[d]:this,[f]:!0};r.signal.addEventListener(`abort`,()=>l.abort(),e)}let h=!1;try{for await(let n of this){var g;if(h=!0,r!=null&&(g=r.signal)!=null&&g.aborted)throw new s;o?t=await e(t,n,{signal:m}):(t=n,o=!0)}if(!h&&!o)throw new ee}finally{l.abort()}return t}async function te(e){e!=null&&u(e,`options`),e?.signal!=null&&c(e.signal,`options.signal`);let t=[];for await(let r of this){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)throw new s(void 0,{cause:e.signal.reason});b(t,r)}return t}function V(e,t){let n=N.call(this,e,t);return async function*(){for await(let e of n)yield*e}.call(this)}function ne(e){if(e=C(e),w(e))return 0;if(e<0)throw new o(`number`,`>= 0`,e);return e}function re(e,t=void 0){return t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),e=ne(e),async function*(){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)throw new s;for await(let n of this){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)throw new s;e--<=0&&(yield n)}}.call(this)}function H(e,t=void 0){return t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),e=ne(e),async function*(){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)throw new s;for await(let n of this){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)throw new s;if(e-- >0&&(yield n),e<=0)return}}.call(this)}t.exports.streamReturningOperators={asIndexedPairs:y(P,`readable.asIndexedPairs will be removed in a future version.`),drop:re,filter:z,flatMap:V,map:N,take:H,compose:M},t.exports.promiseReturningOperators={every:I,forEach:R,reduce:B,toArray:te,some:F,find:L}})),ZF=i(((e,t)=>{let{ArrayPrototypePop:n,Promise:r}=wF(),{isIterable:i,isNodeStream:a,isWebStream:o}=MF(),{pipelineImpl:s}=JF(),{finished:c}=NF();QF();function l(...e){return new r((t,r)=>{let c,l,u=e[e.length-1];if(u&&typeof u==`object`&&!a(u)&&!i(u)&&!o(u)){let t=n(e);c=t.signal,l=t.end}s(e,(e,n)=>{e?r(e):t(n)},{signal:c,end:l})})}t.exports={finished:c,pipeline:l}})),QF=i(((e,n)=>{let{Buffer:r}=t(`buffer`),{ObjectDefineProperty:i,ObjectKeys:a,ReflectApply:o}=wF(),{promisify:{custom:s}}=kF(),{streamReturningOperators:c,promiseReturningOperators:l}=XF(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:u}}=EF(),d=YF(),{setDefaultHighWaterMark:f,getDefaultHighWaterMark:p}=RF(),{pipeline:m}=JF(),{destroyer:h}=PF(),g=NF(),v=ZF(),y=MF(),b=n.exports=FF().Stream;b.isDestroyed=y.isDestroyed,b.isDisturbed=y.isDisturbed,b.isErrored=y.isErrored,b.isReadable=y.isReadable,b.isWritable=y.isWritable,b.Readable=HF();for(let e of a(c)){let t=c[e];function n(...e){if(new.target)throw u();return b.Readable.from(o(t,this,e))}i(n,`name`,{__proto__:null,value:t.name}),i(n,`length`,{__proto__:null,value:t.length}),i(b.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}for(let e of a(l)){let t=l[e];function n(...e){if(new.target)throw u();return o(t,this,e)}i(n,`name`,{__proto__:null,value:t.name}),i(n,`length`,{__proto__:null,value:t.length}),i(b.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}b.Writable=UF(),b.Duplex=GF(),b.Transform=KF(),b.PassThrough=qF(),b.pipeline=m;let{addAbortSignal:x}=IF();b.addAbortSignal=x,b.finished=g,b.destroy=h,b.compose=d,b.setDefaultHighWaterMark=f,b.getDefaultHighWaterMark=p,i(b,`promises`,{__proto__:null,configurable:!0,enumerable:!0,get(){return v}}),i(m,s,{__proto__:null,enumerable:!0,get(){return v.pipeline}}),i(g,s,{__proto__:null,enumerable:!0,get(){return v.finished}}),b.Stream=b,b._isUint8Array=function(e){return e instanceof Uint8Array},b._uint8ArrayToBuffer=function(e){return r.from(e.buffer,e.byteOffset,e.byteLength)}})),$F=i(((e,n)=>{let r=t(`stream`);if(r&&process.env.READABLE_STREAM===`disable`){let e=r.promises;n.exports._uint8ArrayToBuffer=r._uint8ArrayToBuffer,n.exports._isUint8Array=r._isUint8Array,n.exports.isDisturbed=r.isDisturbed,n.exports.isErrored=r.isErrored,n.exports.isReadable=r.isReadable,n.exports.Readable=r.Readable,n.exports.Writable=r.Writable,n.exports.Duplex=r.Duplex,n.exports.Transform=r.Transform,n.exports.PassThrough=r.PassThrough,n.exports.addAbortSignal=r.addAbortSignal,n.exports.finished=r.finished,n.exports.destroy=r.destroy,n.exports.pipeline=r.pipeline,n.exports.compose=r.compose,Object.defineProperty(r,`promises`,{configurable:!0,enumerable:!0,get(){return e}}),n.exports.Stream=r.Stream}else{let e=QF(),t=ZF(),r=e.Readable.destroy;n.exports=e.Readable,n.exports._uint8ArrayToBuffer=e._uint8ArrayToBuffer,n.exports._isUint8Array=e._isUint8Array,n.exports.isDisturbed=e.isDisturbed,n.exports.isErrored=e.isErrored,n.exports.isReadable=e.isReadable,n.exports.Readable=e.Readable,n.exports.Writable=e.Writable,n.exports.Duplex=e.Duplex,n.exports.Transform=e.Transform,n.exports.PassThrough=e.PassThrough,n.exports.addAbortSignal=e.addAbortSignal,n.exports.finished=e.finished,n.exports.destroy=e.destroy,n.exports.destroy=r,n.exports.pipeline=e.pipeline,n.exports.compose=e.compose,Object.defineProperty(e,`promises`,{configurable:!0,enumerable:!0,get(){return t}}),n.exports.Stream=e.Stream}n.exports.default=n.exports})),eI=i(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n{var n=zP(),r=uF(),i=dF(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),nI=i(((e,t)=>{var n=eI(),r=tI();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),rI=i(((e,t)=>{var n=nI();function r(e){return e!=null&&e.length?n(e,1):[]}t.exports=r})),iI=i(((e,t)=>{t.exports=XP()(Object,`create`)})),aI=i(((e,t)=>{var n=iI();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),oI=i(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),sI=i(((e,t)=>{var n=iI(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),cI=i(((e,t)=>{var n=iI(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),lI=i(((e,t)=>{var n=iI(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),uI=i(((e,t)=>{var n=aI(),r=oI(),i=sI(),a=cI(),o=lI();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{function n(){this.__data__=[],this.size=0}t.exports=n})),fI=i(((e,t)=>{var n=nF();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),pI=i(((e,t)=>{var n=fI(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),mI=i(((e,t)=>{var n=fI();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),hI=i(((e,t)=>{var n=fI();function r(e){return n(this.__data__,e)>-1}t.exports=r})),gI=i(((e,t)=>{var n=fI();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),_I=i(((e,t)=>{var n=dI(),r=pI(),i=mI(),a=hI(),o=gI();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{t.exports=XP()(RP(),`Map`)})),yI=i(((e,t)=>{var n=uI(),r=_I(),i=vI();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),bI=i(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),xI=i(((e,t)=>{var n=bI();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),SI=i(((e,t)=>{var n=xI();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),CI=i(((e,t)=>{var n=xI();function r(e){return n(this,e).get(e)}t.exports=r})),wI=i(((e,t)=>{var n=xI();function r(e){return n(this,e).has(e)}t.exports=r})),TI=i(((e,t)=>{var n=xI();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),EI=i(((e,t)=>{var n=yI(),r=SI(),i=CI(),a=wI(),o=TI();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{var n=`__lodash_hash_undefined__`;function r(e){return this.__data__.set(e,n),this}t.exports=r})),OI=i(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),kI=i(((e,t)=>{var n=EI(),r=DI(),i=OI();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a{function n(e){return e!==e}t.exports=n})),MI=i(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r{var n=AI(),r=jI(),i=MI();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),PI=i(((e,t)=>{var n=NI();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),FI=i(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n{function n(e,t){return e.has(t)}t.exports=n})),RI=i(((e,t)=>{var n=kI(),r=PI(),i=FI(),a=II(),o=hF(),s=LI(),c=200;function l(e,t,l,u){var d=-1,f=r,p=!0,m=e.length,h=[],g=t.length;if(!m)return h;l&&(t=a(t,o(l))),u?(f=i,p=!1):t.length>=c&&(f=s,p=!1,t=new n(t));outer:for(;++d{var n=iF(),r=cF();function i(e){return r(e)&&n(e)}t.exports=i})),BI=i(((e,t)=>{var n=RI(),r=nI(),i=tF(),a=zI();t.exports=i(function(e,t){return a(e)?n(e,r(t,1,a,!0)):[]})})),VI=i(((e,t)=>{t.exports=XP()(RP(),`Set`)})),HI=i(((e,t)=>{function n(){}t.exports=n})),UI=i(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),WI=i(((e,t)=>{var n=VI(),r=HI(),i=UI();t.exports=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:r})),GI=i(((e,t)=>{var n=kI(),r=PI(),i=FI(),a=LI(),o=WI(),s=UI(),c=200;function l(e,t,l){var u=-1,d=r,f=e.length,p=!0,m=[],h=m;if(l)p=!1,d=i;else if(f>=c){var g=t?null:o(e);if(g)return s(g);p=!1,d=a,h=new n}else h=t?[]:m;outer:for(;++u{var n=nI(),r=tF(),i=GI(),a=zI();t.exports=r(function(e){return i(n(e,1,a,!0))})})),qI=i(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),JI=i(((e,t)=>{t.exports=qI()(Object.getPrototypeOf,Object)})),YI=i(((e,t)=>{var n=HP(),r=JI(),i=cF(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),XI=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assertValidPattern=void 0,e.assertValidPattern=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)}})),ZI=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.parseClass=void 0;let t={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},n=e=>e.replace(/[[\]\\-]/g,`\\$&`),r=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),i=e=>e.join(``);e.parseClass=(e,a)=>{let o=a;if(e.charAt(o)!==`[`)throw Error(`not in a brace expression`);let s=[],c=[],l=o+1,u=!1,d=!1,f=!1,p=!1,m=o,h=``;WHILE:for(;lh?s.push(n(h)+`-`+n(r)):r===h&&s.push(n(r)),h=``,l++;continue}if(e.startsWith(`-]`,l+1)){s.push(n(r+`-`)),l+=2;continue}if(e.startsWith(`-`,l+1)){h=r,l+=2;continue}s.push(n(r)),l++}if(m{Object.defineProperty(e,`__esModule`,{value:!0}),e.unescape=void 0,e.unescape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,`$1$2`).replace(/\\([^\/])/g,`$1`)})),$I=i((e=>{var t;Object.defineProperty(e,`__esModule`,{value:!0}),e.AST=void 0;let n=ZI(),r=QI(),i=new Set([`!`,`?`,`+`,`*`,`@`]),a=e=>i.has(e),o=e=>a(e.type),s=new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),c=new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),l=new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),u=new Map([[`!`,new Map([[`!`,`@`]])],[`?`,new Map([[`*`,`*`],[`+`,`*`]])],[`@`,new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,new Map([[`?`,`*`],[`*`,`*`]])]]),d=`(?!\\.)`,f=new Set([`[`,`.`]),p=new Set([`..`,`.`]),m=new Set(`().*{}+?[]^$\\!`),h=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),g=`[^/]`,v=g+`*?`,y=g+`+?`;var b=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#l=this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&rtypeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let n=0;n{let[r,a,o,s]=typeof n==`string`?t.#C(n,this.#t,i):n.toRegExpSource(e);return this.#t=this.#t||o,this.#n=this.#n||s,r}).join(``),o=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&p.has(this.#r[0]))){let t=f,r=n&&t.has(a.charAt(0))||a.startsWith(`\\.`)&&t.has(a.charAt(2))||a.startsWith(`\\.\\.`)&&t.has(a.charAt(4)),i=!n&&!e&&t.has(a.charAt(0));o=r?`(?!(?:^|/)\\.\\.?(?:$|/))`:i?d:``}let s=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(s=`(?:$|\\/)`),[o+a+s,(0,r.unescape)(a),this.#t=!!this.#t,this.#n]}let i=this.type===`*`||this.type===`+`,a=this.type===`!`?`(?:(?!(?:`:`(?:`,s=this.#S(n);if(this.isStart()&&this.isEnd()&&!s&&this.type!==`!`){let e=this.toString(),t=this;return t.#r=[e],t.type=null,t.#t=void 0,[e,(0,r.unescape)(this.toString()),!1,!1]}let c=!i||e||n?``:this.#S(!0);c===s&&(c=``),c&&(s=`(?:${s})(?:${c})*?`);let l=``;if(this.type===`!`&&this.#u)l=(this.isStart()&&!n?d:``)+y;else{let t=this.type===`!`?`))`+(this.isStart()&&!n&&!e?d:``)+v+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&c?`)`:this.type===`*`&&c?`)?`:`)${this.type}`;l=a+s+t}return[l,(0,r.unescape)(s),this.#t=!!this.#t,this.#n]}#S(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#C(e,t,i=!1){let a=!1,o=``,s=!1,c=!1;for(let r=0;r{Object.defineProperty(e,`__esModule`,{value:!0}),e.escape=void 0,e.escape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`)})),tL=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;let n=t(iP()),r=XI(),i=$I(),a=eL(),o=QI();e.minimatch=(e,t,n={})=>((0,r.assertValidPattern)(t),!n.nocomment&&t.charAt(0)===`#`?!1:new N(t,n).match(e));let s=/^\*+([^+@!?\*\[\(]*)$/,c=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),l=e=>t=>t.endsWith(e),u=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),d=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),f=/^\*+\.\*+$/,p=e=>!e.startsWith(`.`)&&e.includes(`.`),m=e=>e!==`.`&&e!==`..`&&e.includes(`.`),h=/^\.\*+$/,g=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),v=/^\*+$/,y=e=>e.length!==0&&!e.startsWith(`.`),b=e=>e.length!==0&&e!==`.`&&e!==`..`,x=/^\?+([^+@!?\*\[\(]*)?$/,S=([e,t=``])=>{let n=E([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},C=([e,t=``])=>{let n=D([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},w=([e,t=``])=>{let n=D([e]);return t?e=>n(e)&&e.endsWith(t):n},T=([e,t=``])=>{let n=E([e]);return t?e=>n(e)&&e.endsWith(t):n},E=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},D=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},O=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,k={win32:{sep:`\\`},posix:{sep:`/`}};e.sep=O===`win32`?k.win32.sep:k.posix.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol(`globstar **`),e.minimatch.GLOBSTAR=e.GLOBSTAR,e.filter=(t,n={})=>r=>(0,e.minimatch)(r,t,n),e.minimatch.filter=e.filter;let A=(e,t={})=>Object.assign({},e,t);e.defaults=t=>{if(!t||typeof t!=`object`||!Object.keys(t).length)return e.minimatch;let n=e.minimatch;return Object.assign((e,r,i={})=>n(e,r,A(t,i)),{Minimatch:class extends n.Minimatch{constructor(e,n={}){super(e,A(t,n))}static defaults(e){return n.defaults(A(t,e)).Minimatch}},AST:class extends n.AST{constructor(e,n,r={}){super(e,n,A(t,r))}static fromGlob(e,r={}){return n.AST.fromGlob(e,A(t,r))}},unescape:(e,r={})=>n.unescape(e,A(t,r)),escape:(e,r={})=>n.escape(e,A(t,r)),filter:(e,r={})=>n.filter(e,A(t,r)),defaults:e=>n.defaults(A(t,e)),makeRe:(e,r={})=>n.makeRe(e,A(t,r)),braceExpand:(e,r={})=>n.braceExpand(e,A(t,r)),match:(e,r,i={})=>n.match(e,r,A(t,i)),sep:n.sep,GLOBSTAR:e.GLOBSTAR})},e.minimatch.defaults=e.defaults,e.braceExpand=(e,t={})=>((0,r.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,n.default)(e)),e.minimatch.braceExpand=e.braceExpand,e.makeRe=(e,t={})=>new N(e,t).makeRe(),e.minimatch.makeRe=e.makeRe,e.match=(e,t,n={})=>{let r=new N(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e},e.minimatch.match=e.match;let j=/[?*]|[+@!]\(.*?\)|\[|\]/,M=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`);var N=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){(0,r.assertValidPattern)(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||O,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!j.test(e[2]))&&!j.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;nr&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;ee.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r=2&&(t=this.levelTwoFileOptimize(t)),n.includes(e.GLOBSTAR)?this.#e(t,n,r,i,a):this.#n(t,n,r,i,a)}#e(t,n,r,i,a){let o=n.indexOf(e.GLOBSTAR,a),s=n.lastIndexOf(e.GLOBSTAR),[c,l,u]=r?[n.slice(a,o),n.slice(o+1),[]]:[n.slice(a,o),n.slice(o+1,s),n.slice(s+1)];if(c.length){let e=t.slice(i,i+c.length);if(!this.#n(e,c,r,0,0))return!1;i+=c.length}let d=0;if(u.length){if(u.length+i>t.length)return!1;let e=t.length-u.length;if(this.#n(t,u,r,e,0))d=u.length;else{if(t[t.length-1]!==``||i+u.length===t.length||(e--,!this.#n(t,u,r,e,0)))return!1;d=u.length+1}}if(!l.length){let e=!!d;for(let n=i;n{let n=t.map(t=>{if(t instanceof RegExp)for(let e of t.flags.split(``))i.add(e);return typeof t==`string`?M(t):t===e.GLOBSTAR?e.GLOBSTAR:t._src});return n.forEach((t,i)=>{let a=n[i+1],o=n[i-1];t!==e.GLOBSTAR||o===e.GLOBSTAR||(o===void 0?a!==void 0&&a!==e.GLOBSTAR?n[i+1]=`(?:\\/|`+r+`\\/)?`+a:n[i]=r:a===void 0?n[i-1]=o+`(?:\\/|`+r+`)?`:a!==e.GLOBSTAR&&(n[i-1]=o+`(?:\\/|\\/`+r+`\\/)`+a,n[i+1]=e.GLOBSTAR))}),n.filter(t=>t!==e.GLOBSTAR).join(`/`)}).join(`|`),[o,s]=t.length>1?[`(?:`,`)`]:[``,``];a=`^`+o+a+s+`$`,this.negate&&(a=`^(?!`+a+`).+$`);try{this.regexp=new RegExp(a,[...i].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^\/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e{Object.defineProperty(e,`__esModule`,{value:!0}),e.LRUCache=void 0;let t=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,n=new Set,r=typeof process==`object`&&process?process:{},i=(e,t,n,i)=>{typeof r.emitWarning==`function`?r.emitWarning(e,t,n,i):console.error(`[${n}] ${t}: ${e}`)},a=globalThis.AbortController,o=globalThis.AbortSignal;if(a===void 0){o=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},a=class{constructor(){t()}signal=new o;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e=r.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,t=()=>{e&&(e=!1,i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",`NO_ABORT_CONTROLLER`,`ENOTSUP`,t))}}let s=e=>!n.has(e),c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),l=e=>c(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?u:null:null;var u=class extends Array{constructor(e){super(e),this.fill(0)}},d=class e{heap;length;static#e=!1;static create(t){let n=l(t);if(!n)return[];e.#e=!0;let r=new e(t,n);return e.#e=!1,r}constructor(t,n){if(!e.#e)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};e.LRUCache=class e{#e;#t;#n;#r;#i;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y;#b;#x;#S;static unsafeExposeInternals(e){return{starts:e.#v,ttls:e.#y,sizes:e.#_,keyMap:e.#c,keyList:e.#l,valList:e.#u,next:e.#d,prev:e.#f,get head(){return e.#p},get tail(){return e.#m},free:e.#h,isBackgroundFetch:t=>e.#L(t),backgroundFetch:(t,n,r,i)=>e.#I(t,n,r,i),moveToTail:t=>e.#z(t),indexes:t=>e.#M(t),rindexes:t=>e.#N(t),isStale:t=>e.#D(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#s}get size(){return this.#o}get fetchMethod(){return this.#i}get memoMethod(){return this.#a}get dispose(){return this.#n}get disposeAfter(){return this.#r}constructor(t){let{max:r=0,ttl:a,ttlResolution:o=1,ttlAutopurge:u,updateAgeOnGet:f,updateAgeOnHas:p,allowStale:m,dispose:h,disposeAfter:g,noDisposeOnSet:v,noUpdateTTL:y,maxSize:b=0,maxEntrySize:x=0,sizeCalculation:S,fetchMethod:C,memoMethod:w,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:O,ignoreFetchAbort:k}=t;if(r!==0&&!c(r))throw TypeError(`max option must be a nonnegative integer`);let A=r?l(r):Array;if(!A)throw Error(`invalid max value: `+r);if(this.#e=r,this.#t=b,this.maxEntrySize=x||this.#t,this.sizeCalculation=S,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(w!==void 0&&typeof w!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(this.#a=w,C!==void 0&&typeof C!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.#i=C,this.#x=!!C,this.#c=new Map,this.#l=Array(r).fill(void 0),this.#u=Array(r).fill(void 0),this.#d=new A(r),this.#f=new A(r),this.#p=0,this.#m=0,this.#h=d.create(r),this.#o=0,this.#s=0,typeof h==`function`&&(this.#n=h),typeof g==`function`?(this.#r=g,this.#g=[]):(this.#r=void 0,this.#g=void 0),this.#b=!!this.#n,this.#S=!!this.#r,this.noDisposeOnSet=!!v,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#t!==0&&!c(this.#t))throw TypeError(`maxSize must be a positive integer if specified`);if(!c(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.#O()}if(this.allowStale=!!m,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!f,this.updateAgeOnHas=!!p,this.ttlResolution=c(o)||o===0?o:1,this.ttlAutopurge=!!u,this.ttl=a||0,this.ttl){if(!c(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.#C()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t=`LRU_CACHE_UNBOUNDED`;s(t)&&(n.add(t),i(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#C(){let e=new u(this.#e),n=new u(this.#e);this.#y=e,this.#v=n,this.#E=(r,i,a=t.now())=>{if(n[r]=i===0?0:a,e[r]=i,i!==0&&this.ttlAutopurge){let e=setTimeout(()=>{this.#D(r)&&this.#B(this.#l[r],`expire`)},i+1);e.unref&&e.unref()}},this.#w=r=>{n[r]=e[r]===0?0:t.now()},this.#T=(t,a)=>{if(e[a]){let o=e[a],s=n[a];if(!o||!s)return;t.ttl=o,t.start=s,t.now=r||i(),t.remainingTTL=o-(t.now-s)}};let r=0,i=()=>{let e=t.now();if(this.ttlResolution>0){r=e;let t=setTimeout(()=>r=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=t=>{let a=this.#c.get(t);if(a===void 0)return 0;let o=e[a],s=n[a];return!o||!s?1/0:o-((r||i())-s)},this.#D=t=>{let a=n[t],o=e[t];return!!o&&!!a&&(r||i())-a>o}}#w=()=>{};#T=()=>{};#E=()=>{};#D=()=>!1;#O(){let e=new u(this.#e);this.#s=0,this.#_=e,this.#k=t=>{this.#s-=e[t],e[t]=0},this.#j=(e,t,n,r)=>{if(this.#L(t))return 0;if(!c(n))if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!c(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n},this.#A=(t,n,r)=>{if(e[t]=n,this.#t){let n=this.#t-e[t];for(;this.#s>n;)this.#F(!0)}this.#s+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#s)}}#k=e=>{};#A=(e,t,n)=>{};#j=(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0};*#M({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#m;!(!this.#P(t)||((e||!this.#D(t))&&(yield t),t===this.#p));)t=this.#f[t]}*#N({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#p;!(!this.#P(t)||((e||!this.#D(t))&&(yield t),t===this.#m));)t=this.#d[t]}#P(e){return e!==void 0&&this.#c.get(this.#l[e])===e}*entries(){for(let e of this.#M())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#L(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*rentries(){for(let e of this.#N())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#L(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*keys(){for(let e of this.#M()){let t=this.#l[e];t!==void 0&&!this.#L(this.#u[e])&&(yield t)}}*rkeys(){for(let e of this.#N()){let t=this.#l[e];t!==void 0&&!this.#L(this.#u[e])&&(yield t)}}*values(){for(let e of this.#M())this.#u[e]!==void 0&&!this.#L(this.#u[e])&&(yield this.#u[e])}*rvalues(){for(let e of this.#N())this.#u[e]!==void 0&&!this.#L(this.#u[e])&&(yield this.#u[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=`LRUCache`;find(e,t={}){for(let n of this.#M()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.#l[n],this))return this.get(this.#l[n],t)}}forEach(e,t=this){for(let n of this.#M()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#l[n],this)}}rforEach(e,t=this){for(let n of this.#N()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#l[n],this)}}purgeStale(){let e=!1;for(let t of this.#N({allowStale:!0}))this.#D(t)&&(this.#B(this.#l[t],`expire`),e=!0);return e}info(e){let n=this.#c.get(e);if(n===void 0)return;let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;if(i===void 0)return;let a={value:i};if(this.#y&&this.#v){let e=this.#y[n],r=this.#v[n];e&&r&&(a.ttl=e-(t.now()-r),a.start=Date.now())}return this.#_&&(a.size=this.#_[n]),a}dump(){let e=[];for(let n of this.#M({allowStale:!0})){let r=this.#l[n],i=this.#u[n],a=this.#L(i)?i.__staleWhileFetching:i;if(a===void 0||r===void 0)continue;let o={value:a};if(this.#y&&this.#v){o.ttl=this.#y[n];let e=t.now()-this.#v[n];o.start=Math.floor(Date.now()-e)}this.#_&&(o.size=this.#_[n]),e.unshift([r,o])}return e}load(e){this.clear();for(let[n,r]of e){if(r.start){let e=Date.now()-r.start;r.start=t.now()-e}this.set(n,r.value,r)}}set(e,t,n={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,l=this.#j(e,t,n.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return s&&(s.set=`miss`,s.maxEntrySizeExceeded=!0),this.#B(e,`set`),this;let u=this.#o===0?void 0:this.#c.get(e);if(u===void 0)u=this.#o===0?this.#m:this.#h.length===0?this.#o===this.#e?this.#F(!1):this.#o:this.#h.pop(),this.#l[u]=e,this.#u[u]=t,this.#c.set(e,u),this.#d[this.#m]=u,this.#f[u]=this.#m,this.#m=u,this.#o++,this.#A(u,l,s),s&&(s.set=`add`),c=!1;else{this.#z(u);let n=this.#u[u];if(t!==n){if(this.#x&&this.#L(n)){n.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!a&&(this.#b&&this.#n?.(t,e,`set`),this.#S&&this.#g?.push([t,e,`set`]))}else a||(this.#b&&this.#n?.(n,e,`set`),this.#S&&this.#g?.push([n,e,`set`]));if(this.#k(u),this.#A(u,l,s),this.#u[u]=t,s){s.set=`replace`;let e=n&&this.#L(n)?n.__staleWhileFetching:n;e!==void 0&&(s.oldValue=e)}}else s&&(s.set=`update`)}if(r!==0&&!this.#y&&this.#C(),this.#y&&(c||this.#E(u,r,i),s&&this.#T(s,u)),!a&&this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return this}pop(){try{for(;this.#o;){let e=this.#u[this.#p];if(this.#F(!0),this.#L(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}#F(e){let t=this.#p,n=this.#l[t],r=this.#u[t];return this.#x&&this.#L(r)?r.__abortController.abort(Error(`evicted`)):(this.#b||this.#S)&&(this.#b&&this.#n?.(r,n,`evict`),this.#S&&this.#g?.push([r,n,`evict`])),this.#k(t),e&&(this.#l[t]=void 0,this.#u[t]=void 0,this.#h.push(t)),this.#o===1?(this.#p=this.#m=0,this.#h.length=0):this.#p=this.#d[t],this.#c.delete(n),this.#o--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#c.get(e);if(i!==void 0){let e=this.#u[i];if(this.#L(e)&&e.__staleWhileFetching===void 0)return!1;if(this.#D(i))r&&(r.has=`stale`,this.#T(r,i));else return n&&this.#w(i),r&&(r.has=`hit`,this.#T(r,i)),!0}else r&&(r.has=`miss`);return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=this.#c.get(e);if(r===void 0||!n&&this.#D(r))return;let i=this.#u[r];return this.#L(i)?i.__staleWhileFetching:i}#I(e,t,n,r){let i=t===void 0?void 0:this.#u[t];if(this.#L(i))return i;let o=new a,{signal:s}=n;s?.addEventListener(`abort`,()=>o.abort(s.reason),{signal:o.signal});let c={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:a}=o.signal,s=n.ignoreFetchAbort&&r!==void 0;if(n.status&&(a&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,s&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),a&&!s&&!i)return d(o.signal.reason);let l=p;return this.#u[t]===p&&(r===void 0?l.__staleWhileFetching?this.#u[t]=l.__staleWhileFetching:this.#B(e,`fetch`):(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,c.options))),r},u=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),d(e)),d=r=>{let{aborted:i}=o.signal,a=i&&n.allowStaleOnFetchAbort,s=a||n.allowStaleOnFetchRejection,c=s||n.noDeleteOnFetchRejection,l=p;if(this.#u[t]===p&&(!c||l.__staleWhileFetching===void 0?this.#B(e,`fetch`):a||(this.#u[t]=l.__staleWhileFetching)),s)return n.status&&l.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),l.__staleWhileFetching;if(l.__returned===l)throw r},f=(t,r)=>{let a=this.#i?.(e,i,c);a&&a instanceof Promise&&a.then(e=>t(e===void 0?void 0:e),r),o.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(f).then(l,u),m=Object.assign(p,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return t===void 0?(this.set(e,m,{...c.options,status:void 0}),t=this.#c.get(e)):this.#u[t]=m,m}#L(e){if(!this.#x)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof a}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:h=!1,status:g,signal:v}=t;if(!this.#x)return g&&(g.fetch=`get`),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let y={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:v},b=this.#c.get(e);if(b===void 0){g&&(g.fetch=`miss`);let t=this.#I(e,b,y,m);return t.__returned=t}else{let t=this.#u[b];if(this.#L(t)){let e=n&&t.__staleWhileFetching!==void 0;return g&&(g.fetch=`inflight`,e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#D(b);if(!h&&!i)return g&&(g.fetch=`hit`),this.#z(b),r&&this.#w(b),g&&this.#T(g,b),t;let a=this.#I(e,b,y,m),o=a.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=i?`stale`:`refresh`,o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}memo(e,t={}){let n=this.#a;if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,forceRefresh:i,...a}=t,o=this.get(e,a);if(!i&&o!==void 0)return o;let s=n(e,o,{options:a,context:r});return this.set(e,s,a),s}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#c.get(e);if(o!==void 0){let t=this.#u[o],s=this.#L(t);return a&&this.#T(a,o),this.#D(o)?(a&&(a.get=`stale`),s?(a&&n&&t.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#B(e,`expire`),a&&n&&(a.returnedStale=!0),n?t:void 0)):(a&&(a.get=`hit`),s?t.__staleWhileFetching:(this.#z(o),r&&this.#w(o),t))}else a&&(a.get=`miss`)}#R(e,t){this.#f[t]=e,this.#d[e]=t}#z(e){e!==this.#m&&(e===this.#p?this.#p=this.#d[e]:this.#R(this.#f[e],this.#d[e]),this.#R(this.#m,e),this.#m=e)}delete(e){return this.#B(e,`delete`)}#B(e,t){let n=!1;if(this.#o!==0){let r=this.#c.get(e);if(r!==void 0)if(n=!0,this.#o===1)this.#V(t);else{this.#k(r);let n=this.#u[r];if(this.#L(n)?n.__abortController.abort(Error(`deleted`)):(this.#b||this.#S)&&(this.#b&&this.#n?.(n,e,t),this.#S&&this.#g?.push([n,e,t])),this.#c.delete(e),this.#l[r]=void 0,this.#u[r]=void 0,r===this.#m)this.#m=this.#f[r];else if(r===this.#p)this.#p=this.#d[r];else{let e=this.#f[r];this.#d[e]=this.#d[r];let t=this.#d[r];this.#f[t]=this.#f[r]}this.#o--,this.#h.push(r)}}if(this.#S&&this.#g?.length){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return n}clear(){return this.#V(`delete`)}#V(e){for(let t of this.#N({allowStale:!0})){let n=this.#u[t];if(this.#L(n))n.__abortController.abort(Error(`deleted`));else{let r=this.#l[t];this.#b&&this.#n?.(n,r,e),this.#S&&this.#g?.push([n,r,e])}}if(this.#c.clear(),this.#u.fill(void 0),this.#l.fill(void 0),this.#y&&this.#v&&(this.#y.fill(0),this.#v.fill(0)),this.#_&&this.#_.fill(0),this.#p=0,this.#m=0,this.#h.length=0,this.#s=0,this.#o=0,this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}})),rL=i((e=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;let r=typeof process==`object`&&process?process:{stdout:null,stderr:null},i=t(`node:events`),a=n(t(`node:stream`)),o=t(`node:string_decoder`);e.isStream=t=>!!t&&typeof t==`object`&&(t instanceof ae||t instanceof a.default||(0,e.isReadable)(t)||(0,e.isWritable)(t)),e.isReadable=e=>!!e&&typeof e==`object`&&e instanceof i.EventEmitter&&typeof e.pipe==`function`&&e.pipe!==a.default.Writable.prototype.pipe,e.isWritable=e=>!!e&&typeof e==`object`&&e instanceof i.EventEmitter&&typeof e.write==`function`&&typeof e.end==`function`;let s=Symbol(`EOF`),c=Symbol(`maybeEmitEnd`),l=Symbol(`emittedEnd`),u=Symbol(`emittingEnd`),d=Symbol(`emittedError`),f=Symbol(`closed`),p=Symbol(`read`),m=Symbol(`flush`),h=Symbol(`flushChunk`),g=Symbol(`encoding`),v=Symbol(`decoder`),y=Symbol(`flowing`),b=Symbol(`paused`),x=Symbol(`resume`),S=Symbol(`buffer`),C=Symbol(`pipes`),w=Symbol(`bufferLength`),T=Symbol(`bufferPush`),E=Symbol(`bufferShift`),D=Symbol(`objectMode`),O=Symbol(`destroyed`),k=Symbol(`error`),A=Symbol(`emitData`),j=Symbol(`emitEnd`),M=Symbol(`emitEnd2`),N=Symbol(`async`),P=Symbol(`abort`),F=Symbol(`aborted`),I=Symbol(`signal`),L=Symbol(`dataListeners`),R=Symbol(`discarded`),z=e=>Promise.resolve().then(e),ee=e=>e(),B=e=>e===`end`||e===`finish`||e===`prefinish`,te=e=>e instanceof ArrayBuffer||!!e&&typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,V=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);var ne=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[x](),this.dest.on(`drain`,this.ondrain)}unpipe(){this.dest.removeListener(`drain`,this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},re=class extends ne{unpipe(){this.src.removeListener(`error`,this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>this.dest.emit(`error`,e),e.on(`error`,this.proxyErrors)}};let H=e=>!!e.objectMode,ie=e=>!e.objectMode&&!!e.encoding&&e.encoding!==`buffer`;var ae=class extends i.EventEmitter{[y]=!1;[b]=!1;[C]=[];[S]=[];[D];[g];[N];[v];[s]=!1;[l]=!1;[u]=!1;[f]=!1;[d]=null;[w]=0;[O]=!1;[I];[F]=!1;[L]=0;[R]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding==`string`)throw TypeError(`Encoding and objectMode may not be used together`);H(t)?(this[D]=!0,this[g]=null):ie(t)?(this[g]=t.encoding,this[D]=!1):(this[D]=!1,this[g]=null),this[N]=!!t.async,this[v]=this[g]?new o.StringDecoder(this[g]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,`buffer`,{get:()=>this[S]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,`pipes`,{get:()=>this[C]});let{signal:n}=t;n&&(this[I]=n,n.aborted?this[P]():n.addEventListener(`abort`,()=>this[P]()))}get bufferLength(){return this[w]}get encoding(){return this[g]}set encoding(e){throw Error(`Encoding must be set at instantiation time`)}setEncoding(e){throw Error(`Encoding must be set at instantiation time`)}get objectMode(){return this[D]}set objectMode(e){throw Error(`objectMode must be set at instantiation time`)}get async(){return this[N]}set async(e){this[N]=this[N]||!!e}[P](){this[F]=!0,this.emit(`abort`,this[I]?.reason),this.destroy(this[I]?.reason)}get aborted(){return this[F]}set aborted(e){}write(e,t,n){if(this[F])return!1;if(this[s])throw Error(`write after end`);if(this[O])return this.emit(`error`,Object.assign(Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0;typeof t==`function`&&(n=t,t=`utf8`),t||=`utf8`;let r=this[N]?z:ee;if(!this[D]&&!Buffer.isBuffer(e)){if(V(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(te(e))e=Buffer.from(e);else if(typeof e!=`string`)throw Error(`Non-contiguous data written to non-objectMode stream`)}return this[D]?(this[y]&&this[w]!==0&&this[m](!0),this[y]?this.emit(`data`,e):this[T](e),this[w]!==0&&this.emit(`readable`),n&&r(n),this[y]):e.length?(typeof e==`string`&&!(t===this[g]&&!this[v]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[g]&&(e=this[v].write(e)),this[y]&&this[w]!==0&&this[m](!0),this[y]?this.emit(`data`,e):this[T](e),this[w]!==0&&this.emit(`readable`),n&&r(n),this[y]):(this[w]!==0&&this.emit(`readable`),n&&r(n),this[y])}read(e){if(this[O])return null;if(this[R]=!1,this[w]===0||e===0||e&&e>this[w])return this[c](),null;this[D]&&(e=null),this[S].length>1&&!this[D]&&(this[S]=[this[g]?this[S].join(``):Buffer.concat(this[S],this[w])]);let t=this[p](e||null,this[S][0]);return this[c](),t}[p](e,t){if(this[D])this[E]();else{let n=t;e===n.length||e===null?this[E]():typeof n==`string`?(this[S][0]=n.slice(e),t=n.slice(0,e),this[w]-=e):(this[S][0]=n.subarray(e),t=n.subarray(0,e),this[w]-=e)}return this.emit(`data`,t),!this[S].length&&!this[s]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=`utf8`),e!==void 0&&this.write(e,t),n&&this.once(`end`,n),this[s]=!0,this.writable=!1,(this[y]||!this[b])&&this[c](),this}[x](){this[O]||(!this[L]&&!this[C].length&&(this[R]=!0),this[b]=!1,this[y]=!0,this.emit(`resume`),this[S].length?this[m]():this[s]?this[c]():this.emit(`drain`))}resume(){return this[x]()}pause(){this[y]=!1,this[b]=!0,this[R]=!1}get destroyed(){return this[O]}get flowing(){return this[y]}get paused(){return this[b]}[T](e){this[D]?this[w]+=1:this[w]+=e.length,this[S].push(e)}[E](){return this[D]?--this[w]:this[w]-=this[S][0].length,this[S].shift()}[m](e=!1){do;while(this[h](this[E]())&&this[S].length);!e&&!this[S].length&&!this[s]&&this.emit(`drain`)}[h](e){return this.emit(`data`,e),this[y]}pipe(e,t){if(this[O])return e;this[R]=!1;let n=this[l];return t||={},e===r.stdout||e===r.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[C].push(t.proxyErrors?new re(this,e,t):new ne(this,e,t)),this[N]?z(()=>this[x]()):this[x]()),e}unpipe(e){let t=this[C].find(t=>t.dest===e);t&&(this[C].length===1?(this[y]&&this[L]===0&&(this[y]=!1),this[C]=[]):this[C].splice(this[C].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e===`data`)this[R]=!1,this[L]++,!this[C].length&&!this[y]&&this[x]();else if(e===`readable`&&this[w]!==0)super.emit(`readable`);else if(B(e)&&this[l])super.emit(e),this.removeAllListeners(e);else if(e===`error`&&this[d]){let e=t;this[N]?z(()=>e.call(this,this[d])):e.call(this,this[d])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e===`data`&&(this[L]=this.listeners(`data`).length,this[L]===0&&!this[R]&&!this[C].length&&(this[y]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e===`data`||e===void 0)&&(this[L]=0,!this[R]&&!this[C].length&&(this[y]=!1)),t}get emittedEnd(){return this[l]}[c](){!this[u]&&!this[l]&&!this[O]&&this[S].length===0&&this[s]&&(this[u]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[f]&&this.emit(`close`),this[u]=!1)}emit(e,...t){let n=t[0];if(e!==`error`&&e!==`close`&&e!==O&&this[O])return!1;if(e===`data`)return!this[D]&&!n?!1:this[N]?(z(()=>this[A](n)),!0):this[A](n);if(e===`end`)return this[j]();if(e===`close`){if(this[f]=!0,!this[l]&&!this[O])return!1;let e=super.emit(`close`);return this.removeAllListeners(`close`),e}else if(e===`error`){this[d]=n,super.emit(k,n);let e=!this[I]||this.listeners(`error`).length?super.emit(`error`,n):!1;return this[c](),e}else if(e===`resume`){let e=super.emit(`resume`);return this[c](),e}else if(e===`finish`||e===`prefinish`){let t=super.emit(e);return this.removeAllListeners(e),t}let r=super.emit(e,...t);return this[c](),r}[A](e){for(let t of this[C])t.dest.write(e)===!1&&this.pause();let t=this[R]?!1:super.emit(`data`,e);return this[c](),t}[j](){return this[l]?!1:(this[l]=!0,this.readable=!1,this[N]?(z(()=>this[M]()),!0):this[M]())}[M](){if(this[v]){let e=this[v].end();if(e){for(let t of this[C])t.dest.write(e);this[R]||super.emit(`data`,e)}}for(let e of this[C])e.end();let e=super.emit(`end`);return this.removeAllListeners(`end`),e}async collect(){let e=Object.assign([],{dataLength:0});this[D]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[D]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[D])throw Error(`cannot concat in objectMode`);let e=await this.collect();return this[g]?e.join(``):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(O,()=>t(Error(`stream destroyed`))),this.on(`error`,e=>t(e)),this.on(`end`,()=>e())})}[Symbol.asyncIterator](){this[R]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[s])return t();let r,i,a=e=>{this.off(`data`,o),this.off(`end`,c),this.off(O,l),t(),i(e)},o=e=>{this.off(`error`,a),this.off(`end`,c),this.off(O,l),this.pause(),r({value:e,done:!!this[s]})},c=()=>{this.off(`error`,a),this.off(`data`,o),this.off(O,l),t(),r({done:!0,value:void 0})},l=()=>a(Error(`stream destroyed`));return new Promise((e,t)=>{i=t,r=e,this.once(O,l),this.once(`error`,a),this.once(`end`,c),this.once(`data`,o)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[R]=!1;let e=!1,t=()=>(this.pause(),this.off(k,t),this.off(O,t),this.off(`end`,t),e=!0,{done:!0,value:void 0});return this.once(`end`,t),this.once(k,t),this.once(O,t),{next:()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[O])return e?this.emit(`error`,e):this.emit(O),this;this[O]=!0,this[R]=!0,this[S].length=0,this[w]=0;let t=this;return typeof t.close==`function`&&!this[f]&&t.close(),e?this.emit(`error`,e):this.emit(O),this}static get isStream(){return e.isStream}};e.Minipass=ae})),iL=i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t};Object.defineProperty(e,`__esModule`,{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;let a=nL(),o=t(`node:path`),s=t(`node:url`),c=t(`fs`),l=i(t(`node:fs`)),u=c.realpathSync.native,d=t(`node:fs/promises`),f=rL(),p={lstatSync:c.lstatSync,readdir:c.readdir,readdirSync:c.readdirSync,readlinkSync:c.readlinkSync,realpathSync:u,promises:{lstat:d.lstat,readdir:d.readdir,readlink:d.readlink,realpath:d.realpath}},m=e=>!e||e===p||e===l?p:{...p,...e,promises:{...p.promises,...e.promises||{}}},h=/^\\\\\?\\([a-z]:)\\?$/i,g=e=>e.replace(/\//g,`\\`).replace(h,`$1\\`),v=/[\\\/]/,y=e=>e.isFile()?8:e.isDirectory()?4:e.isSymbolicLink()?10:e.isCharacterDevice()?2:e.isBlockDevice()?6:e.isSocket()?12:+!!e.isFIFO(),b=new Map,x=e=>{let t=b.get(e);if(t)return t;let n=e.normalize(`NFKD`);return b.set(e,n),n},S=new Map,C=e=>{let t=S.get(e);if(t)return t;let n=x(e.toLowerCase());return S.set(e,n),n};var w=class extends a.LRUCache{constructor(){super({max:256})}};e.ResolveCache=w;var T=class extends a.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}};e.ChildrenCache=T;let E=Symbol(`PathScurry setAsCwd`);var D=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#o;get rdev(){return this.#o}#s;get blksize(){return this.#s}#c;get ino(){return this.#c}#l;get size(){return this.#l}#u;get blocks(){return this.#u}#d;get atimeMs(){return this.#d}#f;get mtimeMs(){return this.#f}#p;get ctimeMs(){return this.#p}#m;get birthtimeMs(){return this.#m}#h;get atime(){return this.#h}#g;get mtime(){return this.#g}#_;get ctime(){return this.#_}#v;get birthtime(){return this.#v}#y;#b;#x;#S;#C;#w;#T;#E;#D;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=0,n,r,i,a,o){this.name=e,this.#y=i?C(e):x(e),this.#T=t&1023,this.nocase=i,this.roots=r,this.root=n||this,this.#E=a,this.#x=o.fullpath,this.#C=o.relative,this.#w=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=m(o.fs)}depth(){return this.#b===void 0?this.parent?this.#b=this.parent.depth()+1:this.#b=0:this.#b}childrenCache(){return this.#E}resolve(e){if(!e)return this;let t=this.getRootString(e),n=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#k(n):this.#k(n)}#k(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#E.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#E.set(this,t),this.#T&=-17,t}child(e,t){if(e===``||e===`.`)return this;if(e===`..`)return this.parent||this;let n=this.children(),r=this.nocase?C(e):x(e);for(let e of n)if(e.#y===r)return e;let i=this.parent?this.sep:``,a=this.#x?this.#x+i+e:void 0,o=this.newChild(e,0,{...t,parent:this,fullpath:a});return this.canReaddir()||(o.#T|=128),n.push(o),o}relative(){if(this.isCWD)return``;if(this.#C!==void 0)return this.#C;let e=this.name,t=this.parent;if(!t)return this.#C=this.name;let n=t.relative();return n+(!n||!t.parent?``:this.sep)+e}relativePosix(){if(this.sep===`/`)return this.relative();if(this.isCWD)return``;if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?``:`/`)+e}fullpath(){if(this.#x!==void 0)return this.#x;let e=this.name,t=this.parent;if(!t)return this.#x=this.name;let n=t.fullpath()+(t.parent?this.sep:``)+e;return this.#x=n}fullpathPosix(){if(this.#S!==void 0)return this.#S;if(this.sep===`/`)return this.#S=this.fullpath();if(!this.parent){let e=this.fullpath().replace(/\\/g,`/`);return/^[a-z]:\//i.test(e)?this.#S=`//?/${e}`:this.#S=e}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?``:`/`)+this.name;return this.#S=n}isUnknown(){return(this.#T&15)==0}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?`Unknown`:this.isDirectory()?`Directory`:this.isFile()?`File`:this.isSymbolicLink()?`SymbolicLink`:this.isFIFO()?`FIFO`:this.isCharacterDevice()?`CharacterDevice`:this.isBlockDevice()?`BlockDevice`:this.isSocket()?`Socket`:`Unknown`}isFile(){return(this.#T&15)==8}isDirectory(){return(this.#T&15)==4}isCharacterDevice(){return(this.#T&15)==2}isBlockDevice(){return(this.#T&15)==6}isFIFO(){return(this.#T&15)==1}isSocket(){return(this.#T&15)==12}isSymbolicLink(){return(this.#T&10)==10}lstatCached(){return this.#T&32?this:void 0}readlinkCached(){return this.#D}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#D)return!0;if(!this.parent)return!1;let e=this.#T&15;return!(e!==0&&e!==10||this.#T&256||this.#T&128)}calledReaddir(){return!!(this.#T&16)}isENOENT(){return!!(this.#T&128)}isNamed(e){return this.nocase?this.#y===C(e):this.#y===x(e)}async readlink(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=await this.#e.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}readlinkSync(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=this.#e.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}#A(e){this.#T|=16;for(let t=e.provisional;tt(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let r=n.slice(0,n.provisional);t?e(null,r):queueMicrotask(()=>e(null,r));return}if(this.#U.push(e),this.#W)return;this.#W=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(e,t)=>{if(e)this.#F(e.code),n.provisional=0;else{for(let e of t)this.#R(e,n);this.#A(n)}this.#G(n.slice(0,n.provisional))})}#K;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#K)await this.#K;else{let n=()=>{};this.#K=new Promise(e=>n=e);try{for(let n of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}this.#K=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#e.readdirSync(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#T&704)return!1;let e=15&this.#T;return e===0||e===4||e===10}shouldWalk(e,t){return(this.#T&4)==4&&!(this.#T&704)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#O)return this.#O;if(!(896&this.#T))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#O)return this.#O;if(!(896&this.#T))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}[E](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#C=n.join(this.sep),r.#w=n.join(`/`),r=r.parent,n.push(`..`);for(r=e;r&&r.parent&&!t.has(r);)r.#C=void 0,r.#w=void 0,r=r.parent}};e.PathBase=D;var O=class e extends D{sep=`\\`;splitSep=v;constructor(e,t=0,n,r,i,a,o){super(e,t,n,r,i,a,o)}newChild(t,n=0,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return o.win32.parse(e).root}getRoot(e){if(e=g(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new j(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,`\\`).replace(h,`$1\\`),e===t}};e.PathWin32=O;var k=class e extends D{splitSep=`/`;sep=`/`;constructor(e,t=0,n,r,i,a,o){super(e,t,n,r,i,a,o)}getRootString(e){return e.startsWith(`/`)?`/`:``}getRoot(e){return this.root}newChild(t,n=0,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}};e.PathPosix=k;var A=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#r;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:i=16*1024,fs:a=p}={}){this.#r=m(a),(e instanceof URL||e.startsWith(`file://`))&&(e=(0,s.fileURLToPath)(e));let o=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new w,this.#t=new w,this.#n=new T(i);let c=o.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),r===void 0)throw TypeError(`must provide nocase setting to PathScurryBase ctor`);this.nocase=r,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,u=c.length-1,d=t.sep,f=this.rootPath,h=!1;for(let e of c){let t=u--;l=l.child(e,{relative:Array(t).fill(`..`).join(d),relativePosix:Array(t).fill(`..`).join(`/`),fullpath:f+=(h?``:d)+e}),h=!0}this.cwd=l}depth(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#e.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#t.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,r),r}relative(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let t=await e.readdir();return n?t:t.map(e=>e.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(e=>e.name):[]}async lstat(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set,c=(e,t)=>{s.add(e),e.readdirCB((e,l)=>{if(e)return t(e);let u=l.length;if(!u)return t();let d=()=>{--u===0&&t()};for(let e of l)(!i||i(e))&&o.push(n?e:e.fullpath()),r&&e.isSymbolicLink()?e.realpath().then(e=>e?.isUnknown()?e.lstat():e).then(e=>e?.shouldWalk(s,a)?c(e,d):d()):e.shouldWalk(s,a)?c(e,d):d()},!0)},l=e;return new Promise((e,t)=>{c(l,n=>{if(n)return t(n);e(o)})})}walkSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set([e]);for(let e of s){let t=e.readdirSync();for(let e of t){(!i||i(e))&&o.push(n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&s.add(t)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t;(!i||i(e))&&(yield n?e:e.fullpath());let o=new Set([e]);for(let e of o){let t=e.readdirSync();for(let e of t){(!i||i(e))&&(yield n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,a)&&o.add(t)}}}stream(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new f.Minipass({objectMode:!0});(!i||i(e))&&o.write(n?e:e.fullpath());let s=new Set,c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let d=(t,p,m=!1)=>{if(t)return o.emit(`error`,t);if(r&&!m){let e=[];for(let t of p)t.isSymbolicLink()&&e.push(t.realpath().then(e=>e?.isUnknown()?e.lstat():e));if(e.length){Promise.all(e).then(()=>d(null,p,!0));return}}for(let t of p)t&&(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of p){let t=e.realpathCached()||e;t.shouldWalk(s,a)&&c.push(t)}e&&!o.flowing?o.once(`drain`,u):f||u()},f=!0;t.readdirCB(d,!0),f=!1}};return u(),o}streamSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new f.Minipass({objectMode:!0}),s=new Set;(!i||i(e))&&o.write(n?e:e.fullpath());let c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let u=t.readdirSync();for(let t of u)(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of u){let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&c.push(t)}}e&&!o.flowing&&o.once(`drain`,u)};return u(),o}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e==`string`?this.cwd.resolve(e):e,this.cwd[E](t)}};e.PathScurryBase=A;var j=class extends A{sep=`\\`;constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,o.win32,`\\`,{...t,nocase:n}),this.nocase=n;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return o.win32.parse(e).root.toUpperCase()}newRoot(e){return new O(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)||e.startsWith(`\\`)||/^[a-z]:(\/|\\)/i.test(e)}};e.PathScurryWin32=j;var M=class extends A{sep=`/`;constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,o.posix,`/`,{...t,nocase:n}),this.nocase=n}parseRootPath(e){return`/`}newRoot(e){return new k(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)}};e.PathScurryPosix=M;var N=class extends M{constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}};e.PathScurryDarwin=N,e.Path=process.platform===`win32`?O:k,e.PathScurry=process.platform===`win32`?j:process.platform===`darwin`?N:M})),aL=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pattern=void 0;let t=tL(),n=e=>e.length>=1,r=e=>e.length>=1;e.Pattern=class e{#e;#t;#n;length;#r;#i;#a;#o;#s;#c;#l=!0;constructor(e,t,i,a){if(!n(e))throw TypeError(`empty pattern list`);if(!r(t))throw TypeError(`empty glob list`);if(t.length!==e.length)throw TypeError(`mismatched pattern list and glob list lengths`);if(this.length=e.length,i<0||i>=this.length)throw TypeError(`index out of range`);if(this.#e=e,this.#t=t,this.#n=i,this.#r=a,this.#n===0){if(this.isUNC()){let[e,t,n,r,...i]=this.#e,[a,o,s,c,...l]=this.#t;i[0]===``&&(i.shift(),l.shift());let u=[e,t,n,r,``].join(`/`),d=[a,o,s,c,``].join(`/`);this.#e=[u,...i],this.#t=[d,...l],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[e,...t]=this.#e,[n,...r]=this.#t;t[0]===``&&(t.shift(),r.shift());let i=e+`/`,a=n+`/`;this.#e=[i,...t],this.#t=[a,...r],this.length=this.#e.length}}}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]==`string`}isGlobstar(){return this.#e[this.#n]===t.GLOBSTAR}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#a=this.#a||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join(`/`):this.#t.join(`/`):this.#t.slice(this.#n).join(`/`))}hasMore(){return this.length>this.#n+1}rest(){return this.#i===void 0?this.hasMore()?(this.#i=new e(this.#e,this.#t,this.#n+1,this.#r),this.#i.#c=this.#c,this.#i.#s=this.#s,this.#i.#o=this.#o,this.#i):this.#i=null:this.#i}isUNC(){let e=this.#e;return this.#s===void 0?this.#s=this.#r===`win32`&&this.#n===0&&e[0]===``&&e[1]===``&&typeof e[2]==`string`&&!!e[2]&&typeof e[3]==`string`&&!!e[3]:this.#s}isDrive(){let e=this.#e;return this.#o===void 0?this.#o=this.#r===`win32`&&this.#n===0&&this.length>1&&typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]):this.#o}isAbsolute(){let e=this.#e;return this.#c===void 0?this.#c=e[0]===``&&e.length>1||this.isDrive()||this.isUNC():this.#c}root(){let e=this.#e[0];return typeof e==`string`&&this.isAbsolute()&&this.#n===0?e:``}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}}})),oL=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Ignore=void 0;let t=tL(),n=aL(),r=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:i,noglobstar:a,platform:o=r}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:i,noglobstar:a,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let t of e)this.add(t)}add(e){let r=new t.Minimatch(e,this.mmopts);for(let e=0;e{Object.defineProperty(e,`__esModule`,{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;let t=tL();var n=class e{store;constructor(e=new Map){this.store=e}copy(){return new e(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,new Set([t.globString()]))}};e.HasWalkedCache=n;var r=class{store=new Map;add(e,t,n){let r=(t?2:0)|!!n,i=this.store.get(e);this.store.set(e,i===void 0?r:r&i)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}};e.MatchRecord=r;var i=class{store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(e=>e.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw Error(`attempting to walk unknown path`);return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};e.SubWalks=i,e.Processor=class e{hasWalkedCache;matches=new r;subwalks=new i;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new n}processPatterns(e,n){this.patterns=n;let r=n.map(t=>[e,t]);for(let[e,n]of r){this.hasWalkedCache.storeWalked(e,n);let r=n.root(),i=n.isAbsolute()&&this.opts.absolute!==!1;if(r){e=e.resolve(r===`/`&&this.opts.root!==void 0?this.opts.root:r);let t=n.rest();if(t)n=t;else{this.matches.add(e,!0,!1);continue}}if(e.isENOENT())continue;let a,o,s=!1;for(;typeof(a=n.pattern())==`string`&&(o=n.rest());)e=e.resolve(a),n=o,s=!0;if(a=n.pattern(),o=n.rest(),s){if(this.hasWalkedCache.hasWalked(e,n))continue;this.hasWalkedCache.storeWalked(e,n)}if(typeof a==`string`){let t=a===`..`||a===``||a===`.`;this.matches.add(e.resolve(a),i,t);continue}else if(a===t.GLOBSTAR){(!e.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(e,n);let t=o?.pattern(),r=o?.rest();if(!o||(t===``||t===`.`)&&!r)this.matches.add(e,i,t===``||t===`.`);else if(t===`..`){let t=e.parent||e;r?this.hasWalkedCache.hasWalked(t,r)||this.subwalks.add(t,r):this.matches.add(t,i,!0)}}else a instanceof RegExp&&this.subwalks.add(e,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(e,n){let r=this.subwalks.get(e),i=this.child();for(let e of n)for(let n of r){let r=n.isAbsolute(),a=n.pattern(),o=n.rest();a===t.GLOBSTAR?i.testGlobstar(e,n,o,r):a instanceof RegExp?i.testRegExp(e,a,o,r):i.testString(e,a,o,r)}return i}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith(`.`))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let t=n.pattern();if(typeof t==`string`&&t!==`..`&&t!==``&&t!==`.`)this.testString(e,t,n.rest(),r);else if(t===`..`){let t=e.parent||e;this.subwalks.add(t,n)}else t instanceof RegExp&&this.testRegExp(e,t,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}}})),cL=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;let t=rL(),n=oL(),r=sL(),i=(e,t)=>typeof e==`string`?new n.Ignore([e],t):Array.isArray(e)?new n.Ignore(e,t):e;var a=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform===`win32`?`\\`:`/`,this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#t=i(n.ignore??[],n),!this.includeChildMatches&&typeof this.#t.add!=`function`))throw Error(`cannot ignore child matches, ignore lacks add() method.`);this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener(`abort`,()=>{this.#e.length=0}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=await r.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(r,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=r.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(r,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let t=`${e.relativePosix()}/**`;this.#t.add(t)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#n:``;if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+r)}else{let t=this.opts.posix?e.relativePosix():e.relative(),n=this.opts.dotRelative&&!t.startsWith(`..`+this.#n)?`.`+this.#n:``;this.matchEmit(t?n+t+r:`.`+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new r.Processor(this.opts),n)}walkCB2(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,n,a):e.readdirCB((t,r)=>this.walkCB3(e,r,n,a),!0)}a()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let[e,t]of n.subwalks.entries())i++,this.walkCB2(e,t,n.child(),a);a()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new r.Processor(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirSync();this.walkCB3Sync(e,t,n,a)}a()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let[e,t]of n.subwalks.entries())i++,this.walkCB2Sync(e,t,n.child(),a);a()}};e.GlobUtil=a,e.GlobWalker=class extends a{matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},e.GlobStream=class extends a{results;constructor(e,n,r){super(e,n,r),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on(`drain`,()=>this.resume()),this.results.on(`resume`,()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}})),lL=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Glob=void 0;let n=tL(),r=t(`node:url`),i=iL(),a=aL(),o=cL(),s=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Glob=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw TypeError(`glob options required`);if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith(`file://`))&&(t.cwd=(0,r.fileURLToPath)(t.cwd)):this.cwd=``,this.cwd=t.cwd||``,this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth==`number`?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw Error(`cannot set absolute and withFileTypes:true`);if(typeof e==`string`&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(e=>e.replace(/\\/g,`/`))),this.matchBase){if(t.noglobstar)throw TypeError(`base matching requires globstar`);e=e.map(e=>e.includes(`/`)?e:`./**/${e}`)}if(this.pattern=e,this.platform=t.platform||s,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw Error(`nocase option contradicts provided scurry option`)}else{let e=t.platform===`win32`?i.PathScurryWin32:t.platform===`darwin`?i.PathScurryDarwin:t.platform?i.PathScurryPosix:i.PathScurry;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let o=this.platform===`darwin`||this.platform===`win32`,c={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:o,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},[l,u]=this.pattern.map(e=>new n.Minimatch(e,c)).reduce((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e),[[],[]]);this.patterns=l.map((e,t)=>{let n=u[t];if(!n)throw Error(`invalid pattern object`);return new a.Pattern(e,n,0,this.platform)})}async walk(){return[...await new o.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new o.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new o.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new o.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}})),uL=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasMagic=void 0;let t=tL();e.hasMagic=(e,n={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new t.Minimatch(r,n).hasMagic())return!0;return!1}})),dL=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.glob=e.sync=e.iterate=e.iterateSync=e.stream=e.streamSync=e.Ignore=e.hasMagic=e.Glob=e.unescape=e.escape=void 0,e.globStreamSync=c,e.globStream=l,e.globSync=u,e.globIterateSync=f,e.globIterate=p;let t=tL(),n=lL(),r=uL();var i=tL();Object.defineProperty(e,`escape`,{enumerable:!0,get:function(){return i.escape}}),Object.defineProperty(e,`unescape`,{enumerable:!0,get:function(){return i.unescape}});var a=lL();Object.defineProperty(e,`Glob`,{enumerable:!0,get:function(){return a.Glob}});var o=uL();Object.defineProperty(e,`hasMagic`,{enumerable:!0,get:function(){return o.hasMagic}});var s=oL();Object.defineProperty(e,`Ignore`,{enumerable:!0,get:function(){return s.Ignore}});function c(e,t={}){return new n.Glob(e,t).streamSync()}function l(e,t={}){return new n.Glob(e,t).stream()}function u(e,t={}){return new n.Glob(e,t).walkSync()}async function d(e,t={}){return new n.Glob(e,t).walk()}function f(e,t={}){return new n.Glob(e,t).iterateSync()}function p(e,t={}){return new n.Glob(e,t).iterate()}e.streamSync=c,e.stream=Object.assign(l,{sync:c}),e.iterateSync=f,e.iterate=Object.assign(p,{sync:f}),e.sync=Object.assign(u,{stream:c,iterate:f}),e.glob=Object.assign(d,{glob:d,globSync:u,sync:e.sync,globStream:l,stream:e.stream,globStreamSync:c,streamSync:e.streamSync,globIterate:p,iterate:e.iterate,globIterateSync:f,iterateSync:e.iterateSync,Glob:n.Glob,hasMagic:r.hasMagic,escape:t.escape,unescape:t.unescape}),e.glob.glob=e.glob})),fL=i(((e,n)=>{var r=dP(),i=t(`path`),a=rI(),o=BI(),s=KI(),c=YI(),l=dL(),u=n.exports={},d=/[\/\\]/g,f=function(e,t){var n=[];return a(e).forEach(function(e){var r=e.indexOf(`!`)===0;r&&(e=e.slice(1));var i=t(e);n=r?o(n,i):s(n,i)}),n};u.exists=function(){var e=i.join.apply(i,arguments);return r.existsSync(e)},u.expand=function(...e){var t=c(e[0])?e.shift():{},n=Array.isArray(e[0])?e[0]:e;if(n.length===0)return[];var a=f(n,function(e){return l.sync(e,t)});return t.filter&&(a=a.filter(function(e){e=i.join(t.cwd||``,e);try{return typeof t.filter==`function`?t.filter(e):r.statSync(e)[t.filter]()}catch{return!1}})),a},u.expandMapping=function(e,t,n){n=Object.assign({rename:function(e,t){return i.join(e||``,t)}},n);var r=[],a={};return u.expand(n,e).forEach(function(e){var o=e;n.flatten&&(o=i.basename(o)),n.ext&&(o=o.replace(/(\.[^\/]*)?$/,n.ext));var s=n.rename(t,o,n);n.cwd&&(e=i.join(n.cwd,e)),s=s.replace(d,`/`),e=e.replace(d,`/`),a[s]?a[s].src.push(e):(r.push({src:[e],dest:s}),a[s]=r[r.length-1])}),r},u.normalizeFilesArray=function(e){var t=[];return e.forEach(function(e){(`src`in e||`dest`in e)&&t.push(e)}),t.length===0?[]:(t=_(t).chain().forEach(function(e){!(`src`in e)||!e.src||(Array.isArray(e.src)?e.src=a(e.src):e.src=[e.src])}).map(function(e){var t=Object.assign({},e);if(delete t.src,delete t.dest,e.expand)return u.expandMapping(e.src,e.dest,t).map(function(t){var n=Object.assign({},e);return n.orig=Object.assign({},e),n.src=t.src,n.dest=t.dest,[`expand`,`cwd`,`flatten`,`rename`,`ext`].forEach(function(e){delete n[e]}),n});var n=Object.assign({},e);return n.orig=Object.assign({},e),`src`in n&&Object.defineProperty(n,`src`,{enumerable:!0,get:function n(){var r;return`result`in n||(r=e.src,r=Array.isArray(r)?a(r):[r],n.result=u.expand(t,r)),n.result}}),`dest`in n&&(n.dest=e.dest),n}).flatten().value(),t)}})),pL=i(((e,n)=>{var r=dP(),i=t(`path`),a=fP(),o=jP(),s=MP(),c=CF();t(`stream`).Stream;var l=$F().PassThrough,u=n.exports={};u.file=fL(),u.collectStream=function(e,t){var n=[],r=0;e.on(`error`,t),e.on(`data`,function(e){n.push(e),r+=e.length}),e.on(`end`,function(){var e=Buffer.alloc(r),i=0;n.forEach(function(t){t.copy(e,i),i+=t.length}),t(null,e)})},u.dateify=function(e){return e||=new Date,e=e instanceof Date?e:typeof e==`string`?new Date(e):new Date,e},u.defaults=function(e,t,n){var r=arguments;return r[0]=r[0]||{},c(...r)},u.isStream=function(e){return a(e)},u.lazyReadStream=function(e){return new o.Readable(function(){return r.createReadStream(e)})},u.normalizeInputSource=function(e){return e===null?Buffer.alloc(0):typeof e==`string`?Buffer.from(e):u.isStream(e)?e.pipe(new l):e},u.sanitizePath=function(e){return s(e,!1).replace(/^\w+:/,``).replace(/^(\.\.\/|\/)+/,``)},u.trailingSlashIt=function(e){return e.slice(-1)===`/`?e:e+`/`},u.unixifyPath=function(e){return s(e,!1).replace(/^\w+:/,``)},u.walkdir=function(e,t,n){var a=[];typeof t==`function`&&(n=t,t=e),r.readdir(e,function(o,s){var c=0,l,d;if(o)return n(o);(function o(){if(l=s[c++],!l)return n(null,a);d=i.join(e,l),r.stat(d,function(e,r){a.push({path:d,relative:i.relative(t,d).replace(/\\/g,`/`),stats:r}),r&&r.isDirectory()?u.walkdir(d,t,function(e,t){if(e)return n(e);t.forEach(function(e){a.push(e)}),o()}):o()})})()})}})),mL=i(((e,n)=>{ /** * Archiver Core * @@ -98,7 +179,7 @@ var r=t(`buffer`),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}i.from&&i. * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} * @copyright (c) 2012-2014 Chris Talkington, contributors. */ -var r=t(`util`);let i={ABORTED:`archive was aborted`,DIRECTORYDIRPATHREQUIRED:`diretory dirpath argument must be a non-empty string value`,DIRECTORYFUNCTIONINVALIDDATA:`invalid data returned by directory custom data function`,ENTRYNAMEREQUIRED:`entry name must be a non-empty string value`,FILEFILEPATHREQUIRED:`file filepath argument must be a non-empty string value`,FINALIZING:`archive already finalizing`,QUEUECLOSED:`queue closed`,NOENDMETHOD:`no suitable finalize/end method defined by module`,DIRECTORYNOTSUPPORTED:`support for directory entries not defined by module`,FORMATSET:`archive format already set`,INPUTSTEAMBUFFERREQUIRED:`input source must be valid Stream or Buffer instance`,MODULESET:`module already set`,SYMLINKNOTSUPPORTED:`support for symlink entries not defined by module`,SYMLINKFILEPATHREQUIRED:`symlink filepath argument must be a non-empty string value`,SYMLINKTARGETREQUIRED:`symlink target argument must be a non-empty string value`,ENTRYNOTSUPPORTED:`entry not supported`};function a(e,t){Error.captureStackTrace(this,this.constructor),this.message=i[e]||e,this.code=e,this.data=t}r.inherits(a,Error),e=n.exports=a})),VP=i(((e,n)=>{ +var r=t(`util`);let i={ABORTED:`archive was aborted`,DIRECTORYDIRPATHREQUIRED:`diretory dirpath argument must be a non-empty string value`,DIRECTORYFUNCTIONINVALIDDATA:`invalid data returned by directory custom data function`,ENTRYNAMEREQUIRED:`entry name must be a non-empty string value`,FILEFILEPATHREQUIRED:`file filepath argument must be a non-empty string value`,FINALIZING:`archive already finalizing`,QUEUECLOSED:`queue closed`,NOENDMETHOD:`no suitable finalize/end method defined by module`,DIRECTORYNOTSUPPORTED:`support for directory entries not defined by module`,FORMATSET:`archive format already set`,INPUTSTEAMBUFFERREQUIRED:`input source must be valid Stream or Buffer instance`,MODULESET:`module already set`,SYMLINKNOTSUPPORTED:`support for symlink entries not defined by module`,SYMLINKFILEPATHREQUIRED:`symlink filepath argument must be a non-empty string value`,SYMLINKTARGETREQUIRED:`symlink target argument must be a non-empty string value`,ENTRYNOTSUPPORTED:`entry not supported`};function a(e,t){Error.captureStackTrace(this,this.constructor),this.message=i[e]||e,this.code=e,this.data=t}r.inherits(a,Error),e=n.exports=a})),hL=i(((e,n)=>{ /** * Archiver Core * @@ -106,7 +187,7 @@ var r=t(`util`);let i={ABORTED:`archive was aborted`,DIRECTORYDIRPATHREQUIRED:`d * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} * @copyright (c) 2012-2014 Chris Talkington, contributors. */ -var r=t(`fs`),i=Mj(),a=Nj(),o=t(`path`),s=zP(),c=t(`util`).inherits,l=BP(),u=TN().Transform,d=process.platform===`win32`,f=function(e,t){if(!(this instanceof f))return new f(e,t);typeof e!=`string`&&(t=e,e=`zip`),t=this.options=s.defaults(t,{highWaterMark:1024*1024,statConcurrency:4}),u.call(this,t),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=a.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=a.queue(this._onStatQueueTask.bind(this),t.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};c(f,u),f.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()},f.prototype._append=function(e,t){t||={};var n={source:null,filepath:e};t.name||=e,t.sourcePath=e,n.data=t,this._entriesCount++,t.stats&&t.stats instanceof r.Stats?(n=this._updateQueueTaskWithStats(n,t.stats),n&&(t.stats.size&&(this._fsEntriesTotalBytes+=t.stats.size),this._queue.push(n))):this._statQueue.push(n)},f.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)},f.prototype._maybeFinalize=function(){return this._state.finalizing||this._state.finalized||this._state.aborted?!1:this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()?(this._finalize(),!0):!1},f.prototype._moduleAppend=function(e,t,n){if(this._state.aborted){n();return}this._module.append(e,t,function(e){if(this._task=null,this._state.aborted){this._shutdown();return}if(e){this.emit(`error`,e),setImmediate(n);return}this.emit(`entry`,t),this._entriesProcessedCount++,t.stats&&t.stats.size&&(this._fsEntriesProcessedBytes+=t.stats.size),this.emit(`progress`,{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(n)}.bind(this))},f.prototype._moduleFinalize=function(){typeof this._module.finalize==`function`?this._module.finalize():typeof this._module.end==`function`?this._module.end():this.emit(`error`,new l(`NOENDMETHOD`))},f.prototype._modulePipe=function(){this._module.on(`error`,this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0},f.prototype._moduleSupports=function(e){return!this._module.supports||!this._module.supports[e]?!1:this._module.supports[e]},f.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1},f.prototype._normalizeEntryData=function(e,t){e=s.defaults(e,{type:`file`,name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),t&&e.stats===!1&&(e.stats=t);var n=e.type===`directory`;return e.name&&(typeof e.prefix==`string`&&e.prefix!==``&&(e.name=e.prefix+`/`+e.name,e.prefix=null),e.name=s.sanitizePath(e.name),e.type!==`symlink`&&e.name.slice(-1)===`/`?(n=!0,e.type=`directory`):n&&(e.name+=`/`)),typeof e.mode==`number`?d?e.mode&=511:e.mode&=4095:e.stats&&e.mode===null?(d?e.mode=e.stats.mode&511:e.mode=e.stats.mode&4095,d&&n&&(e.mode=493)):e.mode===null&&(e.mode=n?493:420),e.stats&&e.date===null?e.date=e.stats.mtime:e.date=s.dateify(e.date),e},f.prototype._onModuleError=function(e){this.emit(`error`,e)},f.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()},f.prototype._onQueueTask=function(e,t){var n=()=>{e.data.callback&&e.data.callback(),t()};if(this._state.finalizing||this._state.finalized||this._state.aborted){n();return}this._task=e,this._moduleAppend(e.source,e.data,n)},f.prototype._onStatQueueTask=function(e,t){if(this._state.finalizing||this._state.finalized||this._state.aborted){t();return}r.lstat(e.filepath,function(n,r){if(this._state.aborted){setImmediate(t);return}if(n){this._entriesCount--,this.emit(`warning`,n),setImmediate(t);return}e=this._updateQueueTaskWithStats(e,r),e&&(r.size&&(this._fsEntriesTotalBytes+=r.size),this._queue.push(e)),setImmediate(t)}.bind(this))},f.prototype._shutdown=function(){this._moduleUnpipe(),this.end()},f.prototype._transform=function(e,t,n){e&&(this._pointer+=e.length),n(null,e)},f.prototype._updateQueueTaskWithStats=function(e,t){if(t.isFile())e.data.type=`file`,e.data.sourceType=`stream`,e.source=s.lazyReadStream(e.filepath);else if(t.isDirectory()&&this._moduleSupports(`directory`))e.data.name=s.trailingSlashIt(e.data.name),e.data.type=`directory`,e.data.sourcePath=s.trailingSlashIt(e.filepath),e.data.sourceType=`buffer`,e.source=Buffer.concat([]);else if(t.isSymbolicLink()&&this._moduleSupports(`symlink`)){var n=r.readlinkSync(e.filepath),i=o.dirname(e.filepath);e.data.type=`symlink`,e.data.linkname=o.relative(i,o.resolve(i,n)),e.data.sourceType=`buffer`,e.source=Buffer.concat([])}else return t.isDirectory()?this.emit(`warning`,new l(`DIRECTORYNOTSUPPORTED`,e.data)):t.isSymbolicLink()?this.emit(`warning`,new l(`SYMLINKNOTSUPPORTED`,e.data)):this.emit(`warning`,new l(`ENTRYNOTSUPPORTED`,e.data)),null;return e.data=this._normalizeEntryData(e.data,t),e},f.prototype.abort=function(){return this._state.aborted||this._state.finalized||this._abort(),this},f.prototype.append=function(e,t){if(this._state.finalize||this._state.aborted)return this.emit(`error`,new l(`QUEUECLOSED`)),this;if(t=this._normalizeEntryData(t),typeof t.name!=`string`||t.name.length===0)return this.emit(`error`,new l(`ENTRYNAMEREQUIRED`)),this;if(t.type===`directory`&&!this._moduleSupports(`directory`))return this.emit(`error`,new l(`DIRECTORYNOTSUPPORTED`,{name:t.name})),this;if(e=s.normalizeInputSource(e),Buffer.isBuffer(e))t.sourceType=`buffer`;else if(s.isStream(e))t.sourceType=`stream`;else return this.emit(`error`,new l(`INPUTSTEAMBUFFERREQUIRED`,{name:t.name})),this;return this._entriesCount++,this._queue.push({data:t,source:e}),this},f.prototype.directory=function(e,t,n){if(this._state.finalize||this._state.aborted)return this.emit(`error`,new l(`QUEUECLOSED`)),this;if(typeof e!=`string`||e.length===0)return this.emit(`error`,new l(`DIRECTORYDIRPATHREQUIRED`)),this;this._pending++,t===!1?t=``:typeof t!=`string`&&(t=e);var r=!1;typeof n==`function`?(r=n,n={}):typeof n!=`object`&&(n={});var a={stat:!0,dot:!0};function o(){this._pending--,this._maybeFinalize()}function s(e){this.emit(`error`,e)}function c(i){u.pause();var a=!1,o=Object.assign({},n);o.name=i.relative,o.prefix=t,o.stats=i.stat,o.callback=u.resume.bind(u);try{if(r){if(o=r(o),o===!1)a=!0;else if(typeof o!=`object`)throw new l(`DIRECTORYFUNCTIONINVALIDDATA`,{dirpath:e})}}catch(e){this.emit(`error`,e);return}if(a){u.resume();return}this._append(i.absolute,o)}var u=i(e,a);return u.on(`error`,s.bind(this)),u.on(`match`,c.bind(this)),u.on(`end`,o.bind(this)),this},f.prototype.file=function(e,t){return this._state.finalize||this._state.aborted?(this.emit(`error`,new l(`QUEUECLOSED`)),this):typeof e!=`string`||e.length===0?(this.emit(`error`,new l(`FILEFILEPATHREQUIRED`)),this):(this._append(e,t),this)},f.prototype.glob=function(e,t,n){this._pending++,t=s.defaults(t,{stat:!0,pattern:e});function r(){this._pending--,this._maybeFinalize()}function a(e){this.emit(`error`,e)}function o(e){c.pause();var t=Object.assign({},n);t.callback=c.resume.bind(c),t.stats=e.stat,t.name=e.relative,this._append(e.absolute,t)}var c=i(t.cwd||`.`,t);return c.on(`error`,a.bind(this)),c.on(`match`,o.bind(this)),c.on(`end`,r.bind(this)),this},f.prototype.finalize=function(){if(this._state.aborted){var e=new l(`ABORTED`);return this.emit(`error`,e),Promise.reject(e)}if(this._state.finalize){var t=new l(`FINALIZING`);return this.emit(`error`,t),Promise.reject(t)}this._state.finalize=!0,this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var n=this;return new Promise(function(e,t){var r;n._module.on(`end`,function(){r||e()}),n._module.on(`error`,function(e){r=!0,t(e)})})},f.prototype.setFormat=function(e){return this._format?(this.emit(`error`,new l(`FORMATSET`)),this):(this._format=e,this)},f.prototype.setModule=function(e){return this._state.aborted?(this.emit(`error`,new l(`ABORTED`)),this):this._state.module?(this.emit(`error`,new l(`MODULESET`)),this):(this._module=e,this._modulePipe(),this)},f.prototype.symlink=function(e,t,n){if(this._state.finalize||this._state.aborted)return this.emit(`error`,new l(`QUEUECLOSED`)),this;if(typeof e!=`string`||e.length===0)return this.emit(`error`,new l(`SYMLINKFILEPATHREQUIRED`)),this;if(typeof t!=`string`||t.length===0)return this.emit(`error`,new l(`SYMLINKTARGETREQUIRED`,{filepath:e})),this;if(!this._moduleSupports(`symlink`))return this.emit(`error`,new l(`SYMLINKNOTSUPPORTED`,{filepath:e})),this;var r={};return r.type=`symlink`,r.name=e.replace(/\\/g,`/`),r.linkname=t.replace(/\\/g,`/`),r.sourceType=`buffer`,typeof n==`number`&&(r.mode=n),this._entriesCount++,this._queue.push({data:r,source:Buffer.concat([])}),this},f.prototype.pointer=function(){return this._pointer},f.prototype.use=function(e){return this._streams.push(e),this},n.exports=f})),HP=i(((e,t)=>{var n=t.exports=function(){};n.prototype.getName=function(){},n.prototype.getSize=function(){},n.prototype.getLastModifiedDate=function(){},n.prototype.isDirectory=function(){}})),UP=i(((e,t)=>{var n=t.exports={};n.dateToDos=function(e,t){t||=!1;var n=t?e.getFullYear():e.getUTCFullYear();if(n<1980)return 2162688;if(n>=2044)return 2141175677;var r={year:n,month:t?e.getMonth():e.getUTCMonth(),date:t?e.getDate():e.getUTCDate(),hours:t?e.getHours():e.getUTCHours(),minutes:t?e.getMinutes():e.getUTCMinutes(),seconds:t?e.getSeconds():e.getUTCSeconds()};return r.year-1980<<25|r.month+1<<21|r.date<<16|r.hours<<11|r.minutes<<5|r.seconds/2},n.dosToDate=function(e){return new Date((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1)},n.fromDosTime=function(e){return n.dosToDate(e.readUInt32LE(0))},n.getEightBytes=function(e){var t=Buffer.alloc(8);return t.writeUInt32LE(e%4294967296,0),t.writeUInt32LE(e/4294967296|0,4),t},n.getShortBytes=function(e){var t=Buffer.alloc(2);return t.writeUInt16LE((e&65535)>>>0,0),t},n.getShortBytesValue=function(e,t){return e.readUInt16LE(t)},n.getLongBytes=function(e){var t=Buffer.alloc(4);return t.writeUInt32LE((e&4294967295)>>>0,0),t},n.getLongBytesValue=function(e,t){return e.readUInt32LE(t)},n.toDosTime=function(e){return n.getLongBytes(n.dateToDos(e))}})),WP=i(((e,t)=>{var n=UP(),r=8,i=1,a=4,o=2,s=64,c=2048,l=t.exports=function(){return this instanceof l?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new l};l.prototype.encode=function(){return n.getShortBytes((this.descriptor?r:0)|(this.utf8?c:0)|(this.encryption?i:0)|(this.strongEncryption?s:0))},l.prototype.parse=function(e,t){var u=n.getShortBytesValue(e,t),d=new l;return d.useDataDescriptor((u&r)!==0),d.useUTF8ForNames((u&c)!==0),d.useStrongEncryption((u&s)!==0),d.useEncryption((u&i)!==0),d.setSlidingDictionarySize((u&o)===0?4096:8192),d.setNumberOfShannonFanoTrees((u&a)===0?2:3),d},l.prototype.setNumberOfShannonFanoTrees=function(e){this.numberOfShannonFanoTrees=e},l.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees},l.prototype.setSlidingDictionarySize=function(e){this.slidingDictionarySize=e},l.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize},l.prototype.useDataDescriptor=function(e){this.descriptor=e},l.prototype.usesDataDescriptor=function(){return this.descriptor},l.prototype.useEncryption=function(e){this.encryption=e},l.prototype.usesEncryption=function(){return this.encryption},l.prototype.useStrongEncryption=function(e){this.strongEncryption=e},l.prototype.usesStrongEncryption=function(){return this.strongEncryption},l.prototype.useUTF8ForNames=function(e){this.utf8=e},l.prototype.usesUTF8ForNames=function(){return this.utf8}})),GP=i(((e,t)=>{t.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}})),KP=i(((e,t)=>{t.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from([,,]),LONG:4,LONG_ZERO:Buffer.from([,,,,]),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}})),qP=i(((e,n)=>{var r=t(`util`).inherits,i=iM(),a=HP(),o=WP(),s=GP(),c=KP(),l=UP(),u=n.exports=function(e){if(!(this instanceof u))return new u(e);a.call(this),this.platform=c.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new o,this.crc=0,this.time=-1,this.minver=c.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,e&&this.setName(e)};r(u,a),u.prototype.getCentralDirectoryExtra=function(){return this.getExtra()},u.prototype.getComment=function(){return this.comment===null?``:this.comment},u.prototype.getCompressedSize=function(){return this.csize},u.prototype.getCrc=function(){return this.crc},u.prototype.getExternalAttributes=function(){return this.exattr},u.prototype.getExtra=function(){return this.extra===null?c.EMPTY:this.extra},u.prototype.getGeneralPurposeBit=function(){return this.gpb},u.prototype.getInternalAttributes=function(){return this.inattr},u.prototype.getLastModifiedDate=function(){return this.getTime()},u.prototype.getLocalFileDataExtra=function(){return this.getExtra()},u.prototype.getMethod=function(){return this.method},u.prototype.getName=function(){return this.name},u.prototype.getPlatform=function(){return this.platform},u.prototype.getSize=function(){return this.size},u.prototype.getTime=function(){return this.time===-1?-1:l.dosToDate(this.time)},u.prototype.getTimeDos=function(){return this.time===-1?0:this.time},u.prototype.getUnixMode=function(){return this.platform===c.PLATFORM_UNIX?this.getExternalAttributes()>>c.SHORT_SHIFT&c.SHORT_MASK:0},u.prototype.getVersionNeededToExtract=function(){return this.minver},u.prototype.setComment=function(e){Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=e},u.prototype.setCompressedSize=function(e){if(e<0)throw Error(`invalid entry compressed size`);this.csize=e},u.prototype.setCrc=function(e){if(e<0)throw Error(`invalid entry crc32`);this.crc=e},u.prototype.setExternalAttributes=function(e){this.exattr=e>>>0},u.prototype.setExtra=function(e){this.extra=e},u.prototype.setGeneralPurposeBit=function(e){if(!(e instanceof o))throw Error(`invalid entry GeneralPurposeBit`);this.gpb=e},u.prototype.setInternalAttributes=function(e){this.inattr=e},u.prototype.setMethod=function(e){if(e<0)throw Error(`invalid entry compression method`);this.method=e},u.prototype.setName=function(e,t=!1){e=i(e,!1).replace(/^\w+:/,``).replace(/^(\.\.\/|\/)+/,``),t&&(e=`/${e}`),Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=e},u.prototype.setPlatform=function(e){this.platform=e},u.prototype.setSize=function(e){if(e<0)throw Error(`invalid entry size`);this.size=e},u.prototype.setTime=function(e,t){if(!(e instanceof Date))throw Error(`invalid entry time`);this.time=l.dateToDos(e,t)},u.prototype.setUnixMode=function(e){e|=this.isDirectory()?c.S_IFDIR:c.S_IFREG;var t=0;t|=e<c.ZIP64_MAGIC||this.size>c.ZIP64_MAGIC}})),JP=i(((e,n)=>{t(`stream`).Stream;var r=TN().PassThrough,i=Rj(),a=n.exports={};a.normalizeInputSource=function(e){if(e===null)return Buffer.alloc(0);if(typeof e==`string`)return Buffer.from(e);if(i(e)&&!e._readableState){var t=new r;return e.pipe(t),t}return e}})),YP=i(((e,n)=>{var r=t(`util`).inherits,i=Rj(),a=TN().Transform,o=HP(),s=JP(),c=n.exports=function(e){if(!(this instanceof c))return new c(e);a.call(this,e),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};r(c,a),c.prototype._appendBuffer=function(e,t,n){},c.prototype._appendStream=function(e,t,n){},c.prototype._emitErrorCallback=function(e){e&&this.emit(`error`,e)},c.prototype._finish=function(e){},c.prototype._normalizeEntry=function(e){},c.prototype._transform=function(e,t,n){n(null,e)},c.prototype.entry=function(e,t,n){if(t||=null,typeof n!=`function`&&(n=this._emitErrorCallback.bind(this)),!(e instanceof o)){n(Error(`not a valid instance of ArchiveEntry`));return}if(this._archive.finish||this._archive.finished){n(Error(`unacceptable entry after finish`));return}if(this._archive.processing){n(Error(`already processing an entry`));return}if(this._archive.processing=!0,this._normalizeEntry(e),this._entry=e,t=s.normalizeInputSource(t),Buffer.isBuffer(t))this._appendBuffer(e,t,n);else if(i(t))this._appendStream(e,t,n);else{this._archive.processing=!1,n(Error(`input source must be valid Stream or Buffer instance`));return}return this},c.prototype.finish=function(){if(this._archive.processing){this._archive.finish=!0;return}this._finish()},c.prototype.getBytesWritten=function(){return this.offset},c.prototype.write=function(e,t){return e&&(this.offset+=e.length),a.prototype.write.call(this,e,t)}})),XP=i((e=>{(function(t){typeof DO_NOT_EXPORT_CRC>`u`?typeof e==`object`?t(e):typeof define==`function`&&define.amd?define(function(){var e={};return t(e),e}):t({}):t({})})(function(e){e.version=`1.2.2`;function t(){for(var e=0,t=Array(256),n=0;n!=256;++n)e=n,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,t[n]=e;return typeof Int32Array<`u`?new Int32Array(t):t}var n=t();function r(e){var t=0,n=0,r=0,i=typeof Int32Array<`u`?new Int32Array(4096):Array(4096);for(r=0;r!=256;++r)i[r]=e[r];for(r=0;r!=256;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[n&255];var a=[];for(r=1;r!=16;++r)a[r-1]=typeof Int32Array<`u`?i.subarray(r*256,r*256+256):i.slice(r*256,r*256+256);return a}var i=r(n),a=i[0],o=i[1],s=i[2],c=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9],h=i[10],g=i[11],v=i[12],y=i[13],b=i[14];function x(e,t){for(var r=t^-1,i=0,a=e.length;i>>8^n[(r^e.charCodeAt(i++))&255];return~r}function S(e,t){for(var r=t^-1,i=e.length-15,x=0;x>8&255]^v[e[x++]^r>>16&255]^g[e[x++]^r>>>24]^h[e[x++]]^m[e[x++]]^p[e[x++]]^f[e[x++]]^d[e[x++]]^u[e[x++]]^l[e[x++]]^c[e[x++]]^s[e[x++]]^o[e[x++]]^a[e[x++]]^n[e[x++]];for(i+=15;x>>8^n[(r^e[x++])&255];return~r}function C(e,t){for(var r=t^-1,i=0,a=e.length,o=0,s=0;i>>8^n[(r^o)&255]:o<2048?(r=r>>>8^n[(r^(192|o>>6&31))&255],r=r>>>8^n[(r^(128|o&63))&255]):o>=55296&&o<57344?(o=(o&1023)+64,s=e.charCodeAt(i++)&1023,r=r>>>8^n[(r^(240|o>>8&7))&255],r=r>>>8^n[(r^(128|o>>2&63))&255],r=r>>>8^n[(r^(128|s>>6&15|(o&3)<<4))&255],r=r>>>8^n[(r^(128|s&63))&255]):(r=r>>>8^n[(r^(224|o>>12&15))&255],r=r>>>8^n[(r^(128|o>>6&63))&255],r=r>>>8^n[(r^(128|o&63))&255]);return~r}e.table=n,e.bstr=x,e.buf=S,e.str=C})})),ZP=i(((e,t)=>{let{Transform:n}=TN(),r=XP();t.exports=class extends n{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,t,n){e&&(this.checksum=r.buf(e,this.checksum)>>>0,this.rawSize+=e.length),n(null,e)}digest(e){let t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),e?t.toString(e):t}hex(){return this.digest(`hex`).toUpperCase()}size(){return this.rawSize}}})),QP=i(((e,n)=>{let{DeflateRaw:r}=t(`zlib`),i=XP();n.exports=class extends r{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,t){return e&&(this.compressedSize+=e.length),super.push(e,t)}_transform(e,t,n){e&&(this.checksum=i.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,t,n)}digest(e){let t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),e?t.toString(e):t}hex(){return this.digest(`hex`).toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}}})),$P=i(((e,t)=>{t.exports={CRC32Stream:ZP(),DeflateCRC32Stream:QP()}})),eF=i(((e,n)=>{var r=t(`util`).inherits,i=XP(),{CRC32Stream:a}=$P(),{DeflateCRC32Stream:o}=$P(),s=YP();qP(),WP();var c=KP();JP();var l=UP(),u=n.exports=function(e){if(!(this instanceof u))return new u(e);e=this.options=this._defaults(e),s.call(this,e),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:``,finish:!1,finished:!1,processing:!1,forceZip64:e.forceZip64,forceLocalTime:e.forceLocalTime}};r(u,s),u.prototype._afterAppend=function(e){this._entries.push(e),e.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(e),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()},u.prototype._appendBuffer=function(e,t,n){t.length===0&&e.setMethod(c.METHOD_STORED);var r=e.getMethod();if(r===c.METHOD_STORED&&(e.setSize(t.length),e.setCompressedSize(t.length),e.setCrc(i.buf(t)>>>0)),this._writeLocalFileHeader(e),r===c.METHOD_STORED){this.write(t),this._afterAppend(e),n(null,e);return}else if(r===c.METHOD_DEFLATED){this._smartStream(e,n).end(t);return}else{n(Error(`compression method `+r+` not implemented`));return}},u.prototype._appendStream=function(e,t,n){e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(c.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(e);var r=this._smartStream(e,n);t.once(`error`,function(e){r.emit(`error`,e),r.end()}),t.pipe(r)},u.prototype._defaults=function(e){return typeof e!=`object`&&(e={}),typeof e.zlib!=`object`&&(e.zlib={}),typeof e.zlib.level!=`number`&&(e.zlib.level=c.ZLIB_BEST_SPEED),e.forceZip64=!!e.forceZip64,e.forceLocalTime=!!e.forceLocalTime,e},u.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(e){this._writeCentralFileHeader(e)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()},u.prototype._normalizeEntry=function(e){e.getMethod()===-1&&e.setMethod(c.METHOD_DEFLATED),e.getMethod()===c.METHOD_DEFLATED&&(e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(c.MIN_VERSION_DATA_DESCRIPTOR)),e.getTime()===-1&&e.setTime(new Date,this._archive.forceLocalTime),e._offsets={file:0,data:0,contents:0}},u.prototype._smartStream=function(e,t){var n=e.getMethod()===c.METHOD_DEFLATED?new o(this.options.zlib):new a,r=null;function i(){var i=n.digest().readUInt32BE(0);e.setCrc(i),e.setSize(n.size()),e.setCompressedSize(n.size(!0)),this._afterAppend(e),t(r,e)}return n.once(`end`,i.bind(this)),n.once(`error`,function(e){r=e}),n.pipe(this,{end:!1}),n},u.prototype._writeCentralDirectoryEnd=function(){var e=this._entries.length,t=this._archive.centralLength,n=this._archive.centralOffset;this.isZip64()&&(e=c.ZIP64_MAGIC_SHORT,t=c.ZIP64_MAGIC,n=c.ZIP64_MAGIC),this.write(l.getLongBytes(c.SIG_EOCD)),this.write(c.SHORT_ZERO),this.write(c.SHORT_ZERO),this.write(l.getShortBytes(e)),this.write(l.getShortBytes(e)),this.write(l.getLongBytes(t)),this.write(l.getLongBytes(n));var r=this.getComment(),i=Buffer.byteLength(r);this.write(l.getShortBytes(i)),this.write(r)},u.prototype._writeCentralDirectoryZip64=function(){this.write(l.getLongBytes(c.SIG_ZIP64_EOCD)),this.write(l.getEightBytes(44)),this.write(l.getShortBytes(c.MIN_VERSION_ZIP64)),this.write(l.getShortBytes(c.MIN_VERSION_ZIP64)),this.write(c.LONG_ZERO),this.write(c.LONG_ZERO),this.write(l.getEightBytes(this._entries.length)),this.write(l.getEightBytes(this._entries.length)),this.write(l.getEightBytes(this._archive.centralLength)),this.write(l.getEightBytes(this._archive.centralOffset)),this.write(l.getLongBytes(c.SIG_ZIP64_EOCD_LOC)),this.write(c.LONG_ZERO),this.write(l.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(l.getLongBytes(1))},u.prototype._writeCentralFileHeader=function(e){var t=e.getGeneralPurposeBit(),n=e.getMethod(),r=e._offsets.file,i=e.getSize(),a=e.getCompressedSize();if(e.isZip64()||r>c.ZIP64_MAGIC){i=c.ZIP64_MAGIC,a=c.ZIP64_MAGIC,r=c.ZIP64_MAGIC,e.setVersionNeededToExtract(c.MIN_VERSION_ZIP64);var o=Buffer.concat([l.getShortBytes(c.ZIP64_EXTRA_ID),l.getShortBytes(24),l.getEightBytes(e.getSize()),l.getEightBytes(e.getCompressedSize()),l.getEightBytes(e._offsets.file)],28);e.setExtra(o)}this.write(l.getLongBytes(c.SIG_CFH)),this.write(l.getShortBytes(e.getPlatform()<<8|c.VERSION_MADEBY)),this.write(l.getShortBytes(e.getVersionNeededToExtract())),this.write(t.encode()),this.write(l.getShortBytes(n)),this.write(l.getLongBytes(e.getTimeDos())),this.write(l.getLongBytes(e.getCrc())),this.write(l.getLongBytes(a)),this.write(l.getLongBytes(i));var s=e.getName(),u=e.getComment(),d=e.getCentralDirectoryExtra();t.usesUTF8ForNames()&&(s=Buffer.from(s),u=Buffer.from(u)),this.write(l.getShortBytes(s.length)),this.write(l.getShortBytes(d.length)),this.write(l.getShortBytes(u.length)),this.write(c.SHORT_ZERO),this.write(l.getShortBytes(e.getInternalAttributes())),this.write(l.getLongBytes(e.getExternalAttributes())),this.write(l.getLongBytes(r)),this.write(s),this.write(d),this.write(u)},u.prototype._writeDataDescriptor=function(e){this.write(l.getLongBytes(c.SIG_DD)),this.write(l.getLongBytes(e.getCrc())),e.isZip64()?(this.write(l.getEightBytes(e.getCompressedSize())),this.write(l.getEightBytes(e.getSize()))):(this.write(l.getLongBytes(e.getCompressedSize())),this.write(l.getLongBytes(e.getSize())))},u.prototype._writeLocalFileHeader=function(e){var t=e.getGeneralPurposeBit(),n=e.getMethod(),r=e.getName(),i=e.getLocalFileDataExtra();e.isZip64()&&(t.useDataDescriptor(!0),e.setVersionNeededToExtract(c.MIN_VERSION_ZIP64)),t.usesUTF8ForNames()&&(r=Buffer.from(r)),e._offsets.file=this.offset,this.write(l.getLongBytes(c.SIG_LFH)),this.write(l.getShortBytes(e.getVersionNeededToExtract())),this.write(t.encode()),this.write(l.getShortBytes(n)),this.write(l.getLongBytes(e.getTimeDos())),e._offsets.data=this.offset,t.usesDataDescriptor()?(this.write(c.LONG_ZERO),this.write(c.LONG_ZERO),this.write(c.LONG_ZERO)):(this.write(l.getLongBytes(e.getCrc())),this.write(l.getLongBytes(e.getCompressedSize())),this.write(l.getLongBytes(e.getSize()))),this.write(l.getShortBytes(r.length)),this.write(l.getShortBytes(i.length)),this.write(r),this.write(i),e._offsets.contents=this.offset},u.prototype.getComment=function(e){return this._archive.comment===null?``:this._archive.comment},u.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>c.ZIP64_MAGIC_SHORT||this._archive.centralLength>c.ZIP64_MAGIC||this._archive.centralOffset>c.ZIP64_MAGIC},u.prototype.setComment=function(e){this._archive.comment=e}})),tF=i(((e,t)=>{t.exports={ArchiveEntry:HP(),ZipArchiveEntry:qP(),ArchiveOutputStream:YP(),ZipArchiveOutputStream:eF()}})),nF=i(((e,n)=>{ +var r=t(`fs`),i=oP(),a=sP(),o=t(`path`),s=pL(),c=t(`util`).inherits,l=mL(),u=$F().Transform,d=process.platform===`win32`,f=function(e,t){if(!(this instanceof f))return new f(e,t);typeof e!=`string`&&(t=e,e=`zip`),t=this.options=s.defaults(t,{highWaterMark:1024*1024,statConcurrency:4}),u.call(this,t),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=a.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=a.queue(this._onStatQueueTask.bind(this),t.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};c(f,u),f.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()},f.prototype._append=function(e,t){t||={};var n={source:null,filepath:e};t.name||=e,t.sourcePath=e,n.data=t,this._entriesCount++,t.stats&&t.stats instanceof r.Stats?(n=this._updateQueueTaskWithStats(n,t.stats),n&&(t.stats.size&&(this._fsEntriesTotalBytes+=t.stats.size),this._queue.push(n))):this._statQueue.push(n)},f.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)},f.prototype._maybeFinalize=function(){return this._state.finalizing||this._state.finalized||this._state.aborted?!1:this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()?(this._finalize(),!0):!1},f.prototype._moduleAppend=function(e,t,n){if(this._state.aborted){n();return}this._module.append(e,t,function(e){if(this._task=null,this._state.aborted){this._shutdown();return}if(e){this.emit(`error`,e),setImmediate(n);return}this.emit(`entry`,t),this._entriesProcessedCount++,t.stats&&t.stats.size&&(this._fsEntriesProcessedBytes+=t.stats.size),this.emit(`progress`,{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(n)}.bind(this))},f.prototype._moduleFinalize=function(){typeof this._module.finalize==`function`?this._module.finalize():typeof this._module.end==`function`?this._module.end():this.emit(`error`,new l(`NOENDMETHOD`))},f.prototype._modulePipe=function(){this._module.on(`error`,this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0},f.prototype._moduleSupports=function(e){return!this._module.supports||!this._module.supports[e]?!1:this._module.supports[e]},f.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1},f.prototype._normalizeEntryData=function(e,t){e=s.defaults(e,{type:`file`,name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),t&&e.stats===!1&&(e.stats=t);var n=e.type===`directory`;return e.name&&(typeof e.prefix==`string`&&e.prefix!==``&&(e.name=e.prefix+`/`+e.name,e.prefix=null),e.name=s.sanitizePath(e.name),e.type!==`symlink`&&e.name.slice(-1)===`/`?(n=!0,e.type=`directory`):n&&(e.name+=`/`)),typeof e.mode==`number`?d?e.mode&=511:e.mode&=4095:e.stats&&e.mode===null?(d?e.mode=e.stats.mode&511:e.mode=e.stats.mode&4095,d&&n&&(e.mode=493)):e.mode===null&&(e.mode=n?493:420),e.stats&&e.date===null?e.date=e.stats.mtime:e.date=s.dateify(e.date),e},f.prototype._onModuleError=function(e){this.emit(`error`,e)},f.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()},f.prototype._onQueueTask=function(e,t){var n=()=>{e.data.callback&&e.data.callback(),t()};if(this._state.finalizing||this._state.finalized||this._state.aborted){n();return}this._task=e,this._moduleAppend(e.source,e.data,n)},f.prototype._onStatQueueTask=function(e,t){if(this._state.finalizing||this._state.finalized||this._state.aborted){t();return}r.lstat(e.filepath,function(n,r){if(this._state.aborted){setImmediate(t);return}if(n){this._entriesCount--,this.emit(`warning`,n),setImmediate(t);return}e=this._updateQueueTaskWithStats(e,r),e&&(r.size&&(this._fsEntriesTotalBytes+=r.size),this._queue.push(e)),setImmediate(t)}.bind(this))},f.prototype._shutdown=function(){this._moduleUnpipe(),this.end()},f.prototype._transform=function(e,t,n){e&&(this._pointer+=e.length),n(null,e)},f.prototype._updateQueueTaskWithStats=function(e,t){if(t.isFile())e.data.type=`file`,e.data.sourceType=`stream`,e.source=s.lazyReadStream(e.filepath);else if(t.isDirectory()&&this._moduleSupports(`directory`))e.data.name=s.trailingSlashIt(e.data.name),e.data.type=`directory`,e.data.sourcePath=s.trailingSlashIt(e.filepath),e.data.sourceType=`buffer`,e.source=Buffer.concat([]);else if(t.isSymbolicLink()&&this._moduleSupports(`symlink`)){var n=r.readlinkSync(e.filepath),i=o.dirname(e.filepath);e.data.type=`symlink`,e.data.linkname=o.relative(i,o.resolve(i,n)),e.data.sourceType=`buffer`,e.source=Buffer.concat([])}else return t.isDirectory()?this.emit(`warning`,new l(`DIRECTORYNOTSUPPORTED`,e.data)):t.isSymbolicLink()?this.emit(`warning`,new l(`SYMLINKNOTSUPPORTED`,e.data)):this.emit(`warning`,new l(`ENTRYNOTSUPPORTED`,e.data)),null;return e.data=this._normalizeEntryData(e.data,t),e},f.prototype.abort=function(){return this._state.aborted||this._state.finalized||this._abort(),this},f.prototype.append=function(e,t){if(this._state.finalize||this._state.aborted)return this.emit(`error`,new l(`QUEUECLOSED`)),this;if(t=this._normalizeEntryData(t),typeof t.name!=`string`||t.name.length===0)return this.emit(`error`,new l(`ENTRYNAMEREQUIRED`)),this;if(t.type===`directory`&&!this._moduleSupports(`directory`))return this.emit(`error`,new l(`DIRECTORYNOTSUPPORTED`,{name:t.name})),this;if(e=s.normalizeInputSource(e),Buffer.isBuffer(e))t.sourceType=`buffer`;else if(s.isStream(e))t.sourceType=`stream`;else return this.emit(`error`,new l(`INPUTSTEAMBUFFERREQUIRED`,{name:t.name})),this;return this._entriesCount++,this._queue.push({data:t,source:e}),this},f.prototype.directory=function(e,t,n){if(this._state.finalize||this._state.aborted)return this.emit(`error`,new l(`QUEUECLOSED`)),this;if(typeof e!=`string`||e.length===0)return this.emit(`error`,new l(`DIRECTORYDIRPATHREQUIRED`)),this;this._pending++,t===!1?t=``:typeof t!=`string`&&(t=e);var r=!1;typeof n==`function`?(r=n,n={}):typeof n!=`object`&&(n={});var a={stat:!0,dot:!0};function o(){this._pending--,this._maybeFinalize()}function s(e){this.emit(`error`,e)}function c(i){u.pause();var a=!1,o=Object.assign({},n);o.name=i.relative,o.prefix=t,o.stats=i.stat,o.callback=u.resume.bind(u);try{if(r){if(o=r(o),o===!1)a=!0;else if(typeof o!=`object`)throw new l(`DIRECTORYFUNCTIONINVALIDDATA`,{dirpath:e})}}catch(e){this.emit(`error`,e);return}if(a){u.resume();return}this._append(i.absolute,o)}var u=i(e,a);return u.on(`error`,s.bind(this)),u.on(`match`,c.bind(this)),u.on(`end`,o.bind(this)),this},f.prototype.file=function(e,t){return this._state.finalize||this._state.aborted?(this.emit(`error`,new l(`QUEUECLOSED`)),this):typeof e!=`string`||e.length===0?(this.emit(`error`,new l(`FILEFILEPATHREQUIRED`)),this):(this._append(e,t),this)},f.prototype.glob=function(e,t,n){this._pending++,t=s.defaults(t,{stat:!0,pattern:e});function r(){this._pending--,this._maybeFinalize()}function a(e){this.emit(`error`,e)}function o(e){c.pause();var t=Object.assign({},n);t.callback=c.resume.bind(c),t.stats=e.stat,t.name=e.relative,this._append(e.absolute,t)}var c=i(t.cwd||`.`,t);return c.on(`error`,a.bind(this)),c.on(`match`,o.bind(this)),c.on(`end`,r.bind(this)),this},f.prototype.finalize=function(){if(this._state.aborted){var e=new l(`ABORTED`);return this.emit(`error`,e),Promise.reject(e)}if(this._state.finalize){var t=new l(`FINALIZING`);return this.emit(`error`,t),Promise.reject(t)}this._state.finalize=!0,this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var n=this;return new Promise(function(e,t){var r;n._module.on(`end`,function(){r||e()}),n._module.on(`error`,function(e){r=!0,t(e)})})},f.prototype.setFormat=function(e){return this._format?(this.emit(`error`,new l(`FORMATSET`)),this):(this._format=e,this)},f.prototype.setModule=function(e){return this._state.aborted?(this.emit(`error`,new l(`ABORTED`)),this):this._state.module?(this.emit(`error`,new l(`MODULESET`)),this):(this._module=e,this._modulePipe(),this)},f.prototype.symlink=function(e,t,n){if(this._state.finalize||this._state.aborted)return this.emit(`error`,new l(`QUEUECLOSED`)),this;if(typeof e!=`string`||e.length===0)return this.emit(`error`,new l(`SYMLINKFILEPATHREQUIRED`)),this;if(typeof t!=`string`||t.length===0)return this.emit(`error`,new l(`SYMLINKTARGETREQUIRED`,{filepath:e})),this;if(!this._moduleSupports(`symlink`))return this.emit(`error`,new l(`SYMLINKNOTSUPPORTED`,{filepath:e})),this;var r={};return r.type=`symlink`,r.name=e.replace(/\\/g,`/`),r.linkname=t.replace(/\\/g,`/`),r.sourceType=`buffer`,typeof n==`number`&&(r.mode=n),this._entriesCount++,this._queue.push({data:r,source:Buffer.concat([])}),this},f.prototype.pointer=function(){return this._pointer},f.prototype.use=function(e){return this._streams.push(e),this},n.exports=f})),gL=i(((e,t)=>{var n=t.exports=function(){};n.prototype.getName=function(){},n.prototype.getSize=function(){},n.prototype.getLastModifiedDate=function(){},n.prototype.isDirectory=function(){}})),_L=i(((e,t)=>{var n=t.exports={};n.dateToDos=function(e,t){t||=!1;var n=t?e.getFullYear():e.getUTCFullYear();if(n<1980)return 2162688;if(n>=2044)return 2141175677;var r={year:n,month:t?e.getMonth():e.getUTCMonth(),date:t?e.getDate():e.getUTCDate(),hours:t?e.getHours():e.getUTCHours(),minutes:t?e.getMinutes():e.getUTCMinutes(),seconds:t?e.getSeconds():e.getUTCSeconds()};return r.year-1980<<25|r.month+1<<21|r.date<<16|r.hours<<11|r.minutes<<5|r.seconds/2},n.dosToDate=function(e){return new Date((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1)},n.fromDosTime=function(e){return n.dosToDate(e.readUInt32LE(0))},n.getEightBytes=function(e){var t=Buffer.alloc(8);return t.writeUInt32LE(e%4294967296,0),t.writeUInt32LE(e/4294967296|0,4),t},n.getShortBytes=function(e){var t=Buffer.alloc(2);return t.writeUInt16LE((e&65535)>>>0,0),t},n.getShortBytesValue=function(e,t){return e.readUInt16LE(t)},n.getLongBytes=function(e){var t=Buffer.alloc(4);return t.writeUInt32LE((e&4294967295)>>>0,0),t},n.getLongBytesValue=function(e,t){return e.readUInt32LE(t)},n.toDosTime=function(e){return n.getLongBytes(n.dateToDos(e))}})),vL=i(((e,t)=>{var n=_L(),r=8,i=1,a=4,o=2,s=64,c=2048,l=t.exports=function(){return this instanceof l?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new l};l.prototype.encode=function(){return n.getShortBytes((this.descriptor?r:0)|(this.utf8?c:0)|(this.encryption?i:0)|(this.strongEncryption?s:0))},l.prototype.parse=function(e,t){var u=n.getShortBytesValue(e,t),d=new l;return d.useDataDescriptor((u&r)!==0),d.useUTF8ForNames((u&c)!==0),d.useStrongEncryption((u&s)!==0),d.useEncryption((u&i)!==0),d.setSlidingDictionarySize((u&o)===0?4096:8192),d.setNumberOfShannonFanoTrees((u&a)===0?2:3),d},l.prototype.setNumberOfShannonFanoTrees=function(e){this.numberOfShannonFanoTrees=e},l.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees},l.prototype.setSlidingDictionarySize=function(e){this.slidingDictionarySize=e},l.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize},l.prototype.useDataDescriptor=function(e){this.descriptor=e},l.prototype.usesDataDescriptor=function(){return this.descriptor},l.prototype.useEncryption=function(e){this.encryption=e},l.prototype.usesEncryption=function(){return this.encryption},l.prototype.useStrongEncryption=function(e){this.strongEncryption=e},l.prototype.usesStrongEncryption=function(){return this.strongEncryption},l.prototype.useUTF8ForNames=function(e){this.utf8=e},l.prototype.usesUTF8ForNames=function(){return this.utf8}})),yL=i(((e,t)=>{t.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}})),bL=i(((e,t)=>{t.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from([,,]),LONG:4,LONG_ZERO:Buffer.from([,,,,]),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}})),xL=i(((e,n)=>{var r=t(`util`).inherits,i=MP(),a=gL(),o=vL(),s=yL(),c=bL(),l=_L(),u=n.exports=function(e){if(!(this instanceof u))return new u(e);a.call(this),this.platform=c.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new o,this.crc=0,this.time=-1,this.minver=c.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,e&&this.setName(e)};r(u,a),u.prototype.getCentralDirectoryExtra=function(){return this.getExtra()},u.prototype.getComment=function(){return this.comment===null?``:this.comment},u.prototype.getCompressedSize=function(){return this.csize},u.prototype.getCrc=function(){return this.crc},u.prototype.getExternalAttributes=function(){return this.exattr},u.prototype.getExtra=function(){return this.extra===null?c.EMPTY:this.extra},u.prototype.getGeneralPurposeBit=function(){return this.gpb},u.prototype.getInternalAttributes=function(){return this.inattr},u.prototype.getLastModifiedDate=function(){return this.getTime()},u.prototype.getLocalFileDataExtra=function(){return this.getExtra()},u.prototype.getMethod=function(){return this.method},u.prototype.getName=function(){return this.name},u.prototype.getPlatform=function(){return this.platform},u.prototype.getSize=function(){return this.size},u.prototype.getTime=function(){return this.time===-1?-1:l.dosToDate(this.time)},u.prototype.getTimeDos=function(){return this.time===-1?0:this.time},u.prototype.getUnixMode=function(){return this.platform===c.PLATFORM_UNIX?this.getExternalAttributes()>>c.SHORT_SHIFT&c.SHORT_MASK:0},u.prototype.getVersionNeededToExtract=function(){return this.minver},u.prototype.setComment=function(e){Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=e},u.prototype.setCompressedSize=function(e){if(e<0)throw Error(`invalid entry compressed size`);this.csize=e},u.prototype.setCrc=function(e){if(e<0)throw Error(`invalid entry crc32`);this.crc=e},u.prototype.setExternalAttributes=function(e){this.exattr=e>>>0},u.prototype.setExtra=function(e){this.extra=e},u.prototype.setGeneralPurposeBit=function(e){if(!(e instanceof o))throw Error(`invalid entry GeneralPurposeBit`);this.gpb=e},u.prototype.setInternalAttributes=function(e){this.inattr=e},u.prototype.setMethod=function(e){if(e<0)throw Error(`invalid entry compression method`);this.method=e},u.prototype.setName=function(e,t=!1){e=i(e,!1).replace(/^\w+:/,``).replace(/^(\.\.\/|\/)+/,``),t&&(e=`/${e}`),Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=e},u.prototype.setPlatform=function(e){this.platform=e},u.prototype.setSize=function(e){if(e<0)throw Error(`invalid entry size`);this.size=e},u.prototype.setTime=function(e,t){if(!(e instanceof Date))throw Error(`invalid entry time`);this.time=l.dateToDos(e,t)},u.prototype.setUnixMode=function(e){e|=this.isDirectory()?c.S_IFDIR:c.S_IFREG;var t=0;t|=e<c.ZIP64_MAGIC||this.size>c.ZIP64_MAGIC}})),SL=i(((e,n)=>{t(`stream`).Stream;var r=$F().PassThrough,i=fP(),a=n.exports={};a.normalizeInputSource=function(e){if(e===null)return Buffer.alloc(0);if(typeof e==`string`)return Buffer.from(e);if(i(e)&&!e._readableState){var t=new r;return e.pipe(t),t}return e}})),CL=i(((e,n)=>{var r=t(`util`).inherits,i=fP(),a=$F().Transform,o=gL(),s=SL(),c=n.exports=function(e){if(!(this instanceof c))return new c(e);a.call(this,e),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};r(c,a),c.prototype._appendBuffer=function(e,t,n){},c.prototype._appendStream=function(e,t,n){},c.prototype._emitErrorCallback=function(e){e&&this.emit(`error`,e)},c.prototype._finish=function(e){},c.prototype._normalizeEntry=function(e){},c.prototype._transform=function(e,t,n){n(null,e)},c.prototype.entry=function(e,t,n){if(t||=null,typeof n!=`function`&&(n=this._emitErrorCallback.bind(this)),!(e instanceof o)){n(Error(`not a valid instance of ArchiveEntry`));return}if(this._archive.finish||this._archive.finished){n(Error(`unacceptable entry after finish`));return}if(this._archive.processing){n(Error(`already processing an entry`));return}if(this._archive.processing=!0,this._normalizeEntry(e),this._entry=e,t=s.normalizeInputSource(t),Buffer.isBuffer(t))this._appendBuffer(e,t,n);else if(i(t))this._appendStream(e,t,n);else{this._archive.processing=!1,n(Error(`input source must be valid Stream or Buffer instance`));return}return this},c.prototype.finish=function(){if(this._archive.processing){this._archive.finish=!0;return}this._finish()},c.prototype.getBytesWritten=function(){return this.offset},c.prototype.write=function(e,t){return e&&(this.offset+=e.length),a.prototype.write.call(this,e,t)}})),wL=i((e=>{(function(t){typeof DO_NOT_EXPORT_CRC>`u`?typeof e==`object`?t(e):typeof define==`function`&&define.amd?define(function(){var e={};return t(e),e}):t({}):t({})})(function(e){e.version=`1.2.2`;function t(){for(var e=0,t=Array(256),n=0;n!=256;++n)e=n,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,t[n]=e;return typeof Int32Array<`u`?new Int32Array(t):t}var n=t();function r(e){var t=0,n=0,r=0,i=typeof Int32Array<`u`?new Int32Array(4096):Array(4096);for(r=0;r!=256;++r)i[r]=e[r];for(r=0;r!=256;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[n&255];var a=[];for(r=1;r!=16;++r)a[r-1]=typeof Int32Array<`u`?i.subarray(r*256,r*256+256):i.slice(r*256,r*256+256);return a}var i=r(n),a=i[0],o=i[1],s=i[2],c=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9],h=i[10],g=i[11],v=i[12],y=i[13],b=i[14];function x(e,t){for(var r=t^-1,i=0,a=e.length;i>>8^n[(r^e.charCodeAt(i++))&255];return~r}function S(e,t){for(var r=t^-1,i=e.length-15,x=0;x>8&255]^v[e[x++]^r>>16&255]^g[e[x++]^r>>>24]^h[e[x++]]^m[e[x++]]^p[e[x++]]^f[e[x++]]^d[e[x++]]^u[e[x++]]^l[e[x++]]^c[e[x++]]^s[e[x++]]^o[e[x++]]^a[e[x++]]^n[e[x++]];for(i+=15;x>>8^n[(r^e[x++])&255];return~r}function C(e,t){for(var r=t^-1,i=0,a=e.length,o=0,s=0;i>>8^n[(r^o)&255]:o<2048?(r=r>>>8^n[(r^(192|o>>6&31))&255],r=r>>>8^n[(r^(128|o&63))&255]):o>=55296&&o<57344?(o=(o&1023)+64,s=e.charCodeAt(i++)&1023,r=r>>>8^n[(r^(240|o>>8&7))&255],r=r>>>8^n[(r^(128|o>>2&63))&255],r=r>>>8^n[(r^(128|s>>6&15|(o&3)<<4))&255],r=r>>>8^n[(r^(128|s&63))&255]):(r=r>>>8^n[(r^(224|o>>12&15))&255],r=r>>>8^n[(r^(128|o>>6&63))&255],r=r>>>8^n[(r^(128|o&63))&255]);return~r}e.table=n,e.bstr=x,e.buf=S,e.str=C})})),TL=i(((e,t)=>{let{Transform:n}=$F(),r=wL();t.exports=class extends n{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,t,n){e&&(this.checksum=r.buf(e,this.checksum)>>>0,this.rawSize+=e.length),n(null,e)}digest(e){let t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),e?t.toString(e):t}hex(){return this.digest(`hex`).toUpperCase()}size(){return this.rawSize}}})),EL=i(((e,n)=>{let{DeflateRaw:r}=t(`zlib`),i=wL();n.exports=class extends r{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,t){return e&&(this.compressedSize+=e.length),super.push(e,t)}_transform(e,t,n){e&&(this.checksum=i.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,t,n)}digest(e){let t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),e?t.toString(e):t}hex(){return this.digest(`hex`).toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}}})),DL=i(((e,t)=>{t.exports={CRC32Stream:TL(),DeflateCRC32Stream:EL()}})),OL=i(((e,n)=>{var r=t(`util`).inherits,i=wL(),{CRC32Stream:a}=DL(),{DeflateCRC32Stream:o}=DL(),s=CL();xL(),vL();var c=bL();SL();var l=_L(),u=n.exports=function(e){if(!(this instanceof u))return new u(e);e=this.options=this._defaults(e),s.call(this,e),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:``,finish:!1,finished:!1,processing:!1,forceZip64:e.forceZip64,forceLocalTime:e.forceLocalTime}};r(u,s),u.prototype._afterAppend=function(e){this._entries.push(e),e.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(e),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()},u.prototype._appendBuffer=function(e,t,n){t.length===0&&e.setMethod(c.METHOD_STORED);var r=e.getMethod();if(r===c.METHOD_STORED&&(e.setSize(t.length),e.setCompressedSize(t.length),e.setCrc(i.buf(t)>>>0)),this._writeLocalFileHeader(e),r===c.METHOD_STORED){this.write(t),this._afterAppend(e),n(null,e);return}else if(r===c.METHOD_DEFLATED){this._smartStream(e,n).end(t);return}else{n(Error(`compression method `+r+` not implemented`));return}},u.prototype._appendStream=function(e,t,n){e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(c.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(e);var r=this._smartStream(e,n);t.once(`error`,function(e){r.emit(`error`,e),r.end()}),t.pipe(r)},u.prototype._defaults=function(e){return typeof e!=`object`&&(e={}),typeof e.zlib!=`object`&&(e.zlib={}),typeof e.zlib.level!=`number`&&(e.zlib.level=c.ZLIB_BEST_SPEED),e.forceZip64=!!e.forceZip64,e.forceLocalTime=!!e.forceLocalTime,e},u.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(e){this._writeCentralFileHeader(e)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()},u.prototype._normalizeEntry=function(e){e.getMethod()===-1&&e.setMethod(c.METHOD_DEFLATED),e.getMethod()===c.METHOD_DEFLATED&&(e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(c.MIN_VERSION_DATA_DESCRIPTOR)),e.getTime()===-1&&e.setTime(new Date,this._archive.forceLocalTime),e._offsets={file:0,data:0,contents:0}},u.prototype._smartStream=function(e,t){var n=e.getMethod()===c.METHOD_DEFLATED?new o(this.options.zlib):new a,r=null;function i(){var i=n.digest().readUInt32BE(0);e.setCrc(i),e.setSize(n.size()),e.setCompressedSize(n.size(!0)),this._afterAppend(e),t(r,e)}return n.once(`end`,i.bind(this)),n.once(`error`,function(e){r=e}),n.pipe(this,{end:!1}),n},u.prototype._writeCentralDirectoryEnd=function(){var e=this._entries.length,t=this._archive.centralLength,n=this._archive.centralOffset;this.isZip64()&&(e=c.ZIP64_MAGIC_SHORT,t=c.ZIP64_MAGIC,n=c.ZIP64_MAGIC),this.write(l.getLongBytes(c.SIG_EOCD)),this.write(c.SHORT_ZERO),this.write(c.SHORT_ZERO),this.write(l.getShortBytes(e)),this.write(l.getShortBytes(e)),this.write(l.getLongBytes(t)),this.write(l.getLongBytes(n));var r=this.getComment(),i=Buffer.byteLength(r);this.write(l.getShortBytes(i)),this.write(r)},u.prototype._writeCentralDirectoryZip64=function(){this.write(l.getLongBytes(c.SIG_ZIP64_EOCD)),this.write(l.getEightBytes(44)),this.write(l.getShortBytes(c.MIN_VERSION_ZIP64)),this.write(l.getShortBytes(c.MIN_VERSION_ZIP64)),this.write(c.LONG_ZERO),this.write(c.LONG_ZERO),this.write(l.getEightBytes(this._entries.length)),this.write(l.getEightBytes(this._entries.length)),this.write(l.getEightBytes(this._archive.centralLength)),this.write(l.getEightBytes(this._archive.centralOffset)),this.write(l.getLongBytes(c.SIG_ZIP64_EOCD_LOC)),this.write(c.LONG_ZERO),this.write(l.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(l.getLongBytes(1))},u.prototype._writeCentralFileHeader=function(e){var t=e.getGeneralPurposeBit(),n=e.getMethod(),r=e._offsets.file,i=e.getSize(),a=e.getCompressedSize();if(e.isZip64()||r>c.ZIP64_MAGIC){i=c.ZIP64_MAGIC,a=c.ZIP64_MAGIC,r=c.ZIP64_MAGIC,e.setVersionNeededToExtract(c.MIN_VERSION_ZIP64);var o=Buffer.concat([l.getShortBytes(c.ZIP64_EXTRA_ID),l.getShortBytes(24),l.getEightBytes(e.getSize()),l.getEightBytes(e.getCompressedSize()),l.getEightBytes(e._offsets.file)],28);e.setExtra(o)}this.write(l.getLongBytes(c.SIG_CFH)),this.write(l.getShortBytes(e.getPlatform()<<8|c.VERSION_MADEBY)),this.write(l.getShortBytes(e.getVersionNeededToExtract())),this.write(t.encode()),this.write(l.getShortBytes(n)),this.write(l.getLongBytes(e.getTimeDos())),this.write(l.getLongBytes(e.getCrc())),this.write(l.getLongBytes(a)),this.write(l.getLongBytes(i));var s=e.getName(),u=e.getComment(),d=e.getCentralDirectoryExtra();t.usesUTF8ForNames()&&(s=Buffer.from(s),u=Buffer.from(u)),this.write(l.getShortBytes(s.length)),this.write(l.getShortBytes(d.length)),this.write(l.getShortBytes(u.length)),this.write(c.SHORT_ZERO),this.write(l.getShortBytes(e.getInternalAttributes())),this.write(l.getLongBytes(e.getExternalAttributes())),this.write(l.getLongBytes(r)),this.write(s),this.write(d),this.write(u)},u.prototype._writeDataDescriptor=function(e){this.write(l.getLongBytes(c.SIG_DD)),this.write(l.getLongBytes(e.getCrc())),e.isZip64()?(this.write(l.getEightBytes(e.getCompressedSize())),this.write(l.getEightBytes(e.getSize()))):(this.write(l.getLongBytes(e.getCompressedSize())),this.write(l.getLongBytes(e.getSize())))},u.prototype._writeLocalFileHeader=function(e){var t=e.getGeneralPurposeBit(),n=e.getMethod(),r=e.getName(),i=e.getLocalFileDataExtra();e.isZip64()&&(t.useDataDescriptor(!0),e.setVersionNeededToExtract(c.MIN_VERSION_ZIP64)),t.usesUTF8ForNames()&&(r=Buffer.from(r)),e._offsets.file=this.offset,this.write(l.getLongBytes(c.SIG_LFH)),this.write(l.getShortBytes(e.getVersionNeededToExtract())),this.write(t.encode()),this.write(l.getShortBytes(n)),this.write(l.getLongBytes(e.getTimeDos())),e._offsets.data=this.offset,t.usesDataDescriptor()?(this.write(c.LONG_ZERO),this.write(c.LONG_ZERO),this.write(c.LONG_ZERO)):(this.write(l.getLongBytes(e.getCrc())),this.write(l.getLongBytes(e.getCompressedSize())),this.write(l.getLongBytes(e.getSize()))),this.write(l.getShortBytes(r.length)),this.write(l.getShortBytes(i.length)),this.write(r),this.write(i),e._offsets.contents=this.offset},u.prototype.getComment=function(e){return this._archive.comment===null?``:this._archive.comment},u.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>c.ZIP64_MAGIC_SHORT||this._archive.centralLength>c.ZIP64_MAGIC||this._archive.centralOffset>c.ZIP64_MAGIC},u.prototype.setComment=function(e){this._archive.comment=e}})),kL=i(((e,t)=>{t.exports={ArchiveEntry:gL(),ZipArchiveEntry:xL(),ArchiveOutputStream:CL(),ZipArchiveOutputStream:OL()}})),AL=i(((e,n)=>{ /** * ZipStream * @@ -114,7 +195,7 @@ var r=t(`fs`),i=Mj(),a=Nj(),o=t(`path`),s=zP(),c=t(`util`).inherits,l=BP(),u=TN( * @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE} * @copyright (c) 2014 Chris Talkington, contributors. */ -var r=t(`util`).inherits,i=tF().ZipArchiveOutputStream,a=tF().ZipArchiveEntry,o=zP(),s=n.exports=function(e){if(!(this instanceof s))return new s(e);e=this.options=e||{},e.zlib=e.zlib||{},i.call(this,e),typeof e.level==`number`&&e.level>=0&&(e.zlib.level=e.level,delete e.level),!e.forceZip64&&typeof e.zlib.level==`number`&&e.zlib.level===0&&(e.store=!0),e.namePrependSlash=e.namePrependSlash||!1,e.comment&&e.comment.length>0&&this.setComment(e.comment)};r(s,i),s.prototype._normalizeFileData=function(e){e=o.defaults(e,{type:`file`,name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:``});var t=e.type===`directory`,n=e.type===`symlink`;return e.name&&(e.name=o.sanitizePath(e.name),!n&&e.name.slice(-1)===`/`?(t=!0,e.type=`directory`):t&&(e.name+=`/`)),(t||n)&&(e.store=!0),e.date=o.dateify(e.date),e},s.prototype.entry=function(e,t,n){if(typeof n!=`function`&&(n=this._emitErrorCallback.bind(this)),t=this._normalizeFileData(t),t.type!==`file`&&t.type!==`directory`&&t.type!==`symlink`){n(Error(t.type+` entries not currently supported`));return}if(typeof t.name!=`string`||t.name.length===0){n(Error(`entry name must be a non-empty string value`));return}if(t.type===`symlink`&&typeof t.linkname!=`string`){n(Error(`entry linkname must be a non-empty string value when type equals symlink`));return}var r=new a(t.name);return r.setTime(t.date,this.options.forceLocalTime),t.namePrependSlash&&r.setName(t.name,!0),t.store&&r.setMethod(0),t.comment.length>0&&r.setComment(t.comment),t.type===`symlink`&&typeof t.mode!=`number`&&(t.mode=40960),typeof t.mode==`number`&&(t.type===`symlink`&&(t.mode|=40960),r.setUnixMode(t.mode)),t.type===`symlink`&&typeof t.linkname==`string`&&(e=Buffer.from(t.linkname)),i.prototype.entry.call(this,r,e,n)},s.prototype.finalize=function(){this.finish()}})),rF=i(((e,t)=>{ +var r=t(`util`).inherits,i=kL().ZipArchiveOutputStream,a=kL().ZipArchiveEntry,o=pL(),s=n.exports=function(e){if(!(this instanceof s))return new s(e);e=this.options=e||{},e.zlib=e.zlib||{},i.call(this,e),typeof e.level==`number`&&e.level>=0&&(e.zlib.level=e.level,delete e.level),!e.forceZip64&&typeof e.zlib.level==`number`&&e.zlib.level===0&&(e.store=!0),e.namePrependSlash=e.namePrependSlash||!1,e.comment&&e.comment.length>0&&this.setComment(e.comment)};r(s,i),s.prototype._normalizeFileData=function(e){e=o.defaults(e,{type:`file`,name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:``});var t=e.type===`directory`,n=e.type===`symlink`;return e.name&&(e.name=o.sanitizePath(e.name),!n&&e.name.slice(-1)===`/`?(t=!0,e.type=`directory`):t&&(e.name+=`/`)),(t||n)&&(e.store=!0),e.date=o.dateify(e.date),e},s.prototype.entry=function(e,t,n){if(typeof n!=`function`&&(n=this._emitErrorCallback.bind(this)),t=this._normalizeFileData(t),t.type!==`file`&&t.type!==`directory`&&t.type!==`symlink`){n(Error(t.type+` entries not currently supported`));return}if(typeof t.name!=`string`||t.name.length===0){n(Error(`entry name must be a non-empty string value`));return}if(t.type===`symlink`&&typeof t.linkname!=`string`){n(Error(`entry linkname must be a non-empty string value when type equals symlink`));return}var r=new a(t.name);return r.setTime(t.date,this.options.forceLocalTime),t.namePrependSlash&&r.setName(t.name,!0),t.store&&r.setMethod(0),t.comment.length>0&&r.setComment(t.comment),t.type===`symlink`&&typeof t.mode!=`number`&&(t.mode=40960),typeof t.mode==`number`&&(t.type===`symlink`&&(t.mode|=40960),r.setUnixMode(t.mode)),t.type===`symlink`&&typeof t.linkname==`string`&&(e=Buffer.from(t.linkname)),i.prototype.entry.call(this,r,e,n)},s.prototype.finalize=function(){this.finish()}})),jL=i(((e,t)=>{ /** * ZIP Format Plugin * @@ -122,10 +203,10 @@ var r=t(`util`).inherits,i=tF().ZipArchiveOutputStream,a=tF().ZipArchiveEntry,o= * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} * @copyright (c) 2012-2014 Chris Talkington, contributors. */ -var n=nF(),r=zP(),i=function(e){if(!(this instanceof i))return new i(e);e=this.options=r.defaults(e,{comment:``,forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new n(e)};i.prototype.append=function(e,t,n){this.engine.entry(e,t,n)},i.prototype.finalize=function(){this.engine.finalize()},i.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},i.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)},i.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)},t.exports=i})),iF=i(((e,n)=>{n.exports=t(`events`)})),aF=i(((e,t)=>{t.exports=class{constructor(e){if(!(e>0)||e-1&e)throw Error(`Max size for a FixedFIFO should be a power of two`);this.buffer=Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(e){return this.buffer[this.top]===void 0?(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0):!1}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}}})),oF=i(((e,t)=>{let n=aF();t.exports=class{constructor(e){this.hwm=e||16,this.head=new n(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(e){if(this.length++,!this.head.push(e)){let t=this.head;this.head=t.next=new n(2*this.head.buffer.length),this.head.push(e)}}shift(){this.length!==0&&this.length--;let e=this.tail.shift();if(e===void 0&&this.tail.next){let e=this.tail.next;return this.tail.next=null,this.tail=e,this.tail.shift()}return e}peek(){let e=this.tail.peek();return e===void 0&&this.tail.next?this.tail.next.peek():e}isEmpty(){return this.length===0}}})),sF=i(((e,t)=>{function n(e){return Buffer.isBuffer(e)||e instanceof Uint8Array}function r(e){return Buffer.isEncoding(e)}function i(e,t,n){return Buffer.alloc(e,t,n)}function a(e){return Buffer.allocUnsafe(e)}function o(e){return Buffer.allocUnsafeSlow(e)}function s(e,t){return Buffer.byteLength(e,t)}function c(e,t){return Buffer.compare(e,t)}function l(e,t){return Buffer.concat(e,t)}function u(e,t,n,r,i){return x(e).copy(t,n,r,i)}function d(e,t){return x(e).equals(t)}function f(e,t,n,r,i){return x(e).fill(t,n,r,i)}function p(e,t,n){return Buffer.from(e,t,n)}function m(e,t,n,r){return x(e).includes(t,n,r)}function h(e,t,n,r){return x(e).indexOf(t,n,r)}function g(e,t,n,r){return x(e).lastIndexOf(t,n,r)}function v(e){return x(e).swap16()}function y(e){return x(e).swap32()}function b(e){return x(e).swap64()}function x(e){return Buffer.isBuffer(e)?e:Buffer.from(e.buffer,e.byteOffset,e.byteLength)}function S(e,t,n,r){return x(e).toString(t,n,r)}function C(e,t,n,r,i){return x(e).write(t,n,r,i)}function w(e,t){return x(e).readDoubleBE(t)}function T(e,t){return x(e).readDoubleLE(t)}function E(e,t){return x(e).readFloatBE(t)}function D(e,t){return x(e).readFloatLE(t)}function O(e,t){return x(e).readInt32BE(t)}function k(e,t){return x(e).readInt32LE(t)}function A(e,t){return x(e).readUInt32BE(t)}function j(e,t){return x(e).readUInt32LE(t)}function M(e,t,n){return x(e).writeDoubleBE(t,n)}function N(e,t,n){return x(e).writeDoubleLE(t,n)}function P(e,t,n){return x(e).writeFloatBE(t,n)}function F(e,t,n){return x(e).writeFloatLE(t,n)}function I(e,t,n){return x(e).writeInt32BE(t,n)}function L(e,t,n){return x(e).writeInt32LE(t,n)}function R(e,t,n){return x(e).writeUInt32BE(t,n)}function z(e,t,n){return x(e).writeUInt32LE(t,n)}t.exports={isBuffer:n,isEncoding:r,alloc:i,allocUnsafe:a,allocUnsafeSlow:o,byteLength:s,compare:c,concat:l,copy:u,equals:d,fill:f,from:p,includes:m,indexOf:h,lastIndexOf:g,swap16:v,swap32:y,swap64:b,toBuffer:x,toString:S,write:C,readDoubleBE:w,readDoubleLE:T,readFloatBE:E,readFloatLE:D,readInt32BE:O,readInt32LE:k,readUInt32BE:A,readUInt32LE:j,writeDoubleBE:M,writeDoubleLE:N,writeFloatBE:P,writeFloatLE:F,writeInt32BE:I,writeInt32LE:L,writeUInt32BE:R,writeUInt32LE:z}})),cF=i(((e,t)=>{let n=sF();t.exports=class{constructor(e){this.encoding=e}get remaining(){return 0}decode(e){return n.toString(e,this.encoding)}flush(){return``}}})),lF=i(((e,t)=>{let n=sF();t.exports=class{constructor(){this._reset()}get remaining(){return this.bytesSeen}decode(e){if(e.byteLength===0)return``;if(this.bytesNeeded===0&&r(e,0)===0)return this.bytesSeen=i(e),n.toString(e,`utf8`);let t=``,a=0;if(this.bytesNeeded>0){for(;athis.upperBoundary){t+=`�`,this._reset();break}if(this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|n&63,this.bytesSeen++,a++,this.bytesSeen===this.bytesNeeded){t+=String.fromCodePoint(this.codePoint),this._reset();break}}if(this.bytesNeeded>0)return t}let o=r(e,a),s=e.byteLength-o;s>a&&(t+=n.toString(e,`utf8`,a,s));for(let n=s;n=194&&r<=223?(this.bytesNeeded=2,this.bytesSeen=1,this.codePoint=r&31):r>=224&&r<=239?(r===224?this.lowerBoundary=160:r===237&&(this.upperBoundary=159),this.bytesNeeded=3,this.bytesSeen=1,this.codePoint=r&15):r>=240&&r<=244?(r===240?this.lowerBoundary=144:r===244&&(this.upperBoundary=143),this.bytesNeeded=4,this.bytesSeen=1,this.codePoint=r&7):(this.bytesSeen=1,t+=`�`);continue}if(rthis.upperBoundary){t+=`�`,n--,this._reset();continue}this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|r&63,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(t+=String.fromCodePoint(this.codePoint),this._reset())}return t}flush(){let e=this.bytesNeeded>0?`�`:``;return this._reset(),e}_reset(){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191}};function r(e,t){let n=e.byteLength;if(n<=t)return 0;let r=Math.max(t,n-4),i=n-1;for(;i>r&&(e[i]&192)==128;)i--;if(i=194&&a<=223)o=2;else if(a>=224&&a<=239)o=3;else if(a>=240&&a<=244)o=4;else return 0;let s=n-i;return s=r&&(e[i]&192)==128;)i--;if(i<0)return 1;let a=e[i],o;if(a>=194&&a<=223)o=2;else if(a>=224&&a<=239)o=3;else if(a>=240&&a<=244)o=4;else return 1;if(t-i!==o)return 1;if(o>=3){let t=e[i+1];if(a===224&&t<160||a===237&&t>159||a===240&&t<144||a===244&&t>143)return 1}return 0}})),uF=i(((e,t)=>{let n=cF(),r=lF();t.exports=class{constructor(e=`utf8`){switch(this.encoding=i(e),this.encoding){case`utf8`:this.decoder=new r;break;case`utf16le`:case`base64`:throw Error(`Unsupported encoding: `+this.encoding);default:this.decoder=new n(this.encoding)}}get remaining(){return this.decoder.remaining}push(e){return typeof e==`string`?e:this.decoder.decode(e)}write(e){return this.push(e)}end(e){let t=``;return e&&(t=this.push(e)),t+=this.decoder.flush(),t}};function i(e){switch(e=e.toLowerCase(),e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:throw Error(`Unknown encoding: `+e)}}})),dF=i(((e,t)=>{let{EventEmitter:n}=iF(),r=Error(`Stream was destroyed`),i=Error(`Premature close`),a=oF(),o=uF(),s=typeof queueMicrotask>`u`?e=>global.process.nextTick(e):queueMicrotask,c=(1<<29)-1,l=c^1;c^2;let u=1024,d=2048,f=4096,p=8192,m=16384,h=32768,g=65536,v=131072;16|g,f|128;let y=256|v;c^16,c^64,c^(64|g);let b=c^g;c^256,c^(128|p),c^u;let x=c^768,S=c^h;c^32;let C=c^v;c^y;let w=1<<18,T=2<<18,E=4<<18,D=8<<18,O=16<<18,k=32<<18,A=64<<18,j=128<<18,M=256<<18,N=512<<18,P=1024<<18;c^(w|M);let F=c^E;c^(w|N),c^O,c^D;let I=c^j;c^T;let L=c^P,R=16|w,z=c^R,ee=m|k,B=14|ee;F&536870847;let te=j|h,V=15|te&z;u|16399;let ne=m|143;u|143,u|16398,h|1,N|8388623,D|O,D|w;let re=270794767;E|w,w|M,k|134217742;let H=Symbol.asyncIterator||Symbol(`asyncIterator`);var ie=class{constructor(e,{highWaterMark:t=16384,map:n=null,mapWritable:r,byteLength:i,byteLengthWritable:o}={}){this.stream=e,this.queue=new a,this.highWaterMark=t,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=o||i||Le,this.map=r||n,this.afterWrite=de.bind(this),this.afterUpdateNextTick=me.bind(this)}get ending(){return(this.stream._duplexState&N)!==0}get ended(){return(this.stream._duplexState&k)!==0}push(e){return this.stream._duplexState&142606350?!1:(this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered0,this.error=null,this.pipeline=null,this.byteLength=o||i||Le,this.map=r||n,this.pipeTo=null,this.afterRead=fe.bind(this),this.afterUpdateNextTick=pe.bind(this)}get ending(){return(this.stream._duplexState&u)!==0}get ended(){return(this.stream._duplexState&m)!==0}pipe(e,t){if(this.pipeTo!==null)throw Error(`Can only pipe to one destination`);if(typeof t!=`function`&&(t=null),this.stream._duplexState|=512,this.pipeTo=e,this.pipeline=new se(this.stream,e,t),t&&this.stream.on(`error`,Re),W(e))e._writableState.pipeline=this.pipeline,t&&e.on(`error`,Re),e.on(`finish`,this.pipeline.finished.bind(this.pipeline));else{let t=this.pipeline.done.bind(this.pipeline,e),n=this.pipeline.done.bind(this.pipeline,e,null);e.on(`error`,t),e.on(`close`,n),e.on(`finish`,this.pipeline.finished.bind(this.pipeline))}e.on(`drain`,ce.bind(this)),this.stream.emit(`piping`,e),e.emit(`pipe`,this.stream)}push(e){let t=this.stream;return e===null?(this.highWaterMark=0,t._duplexState=(t._duplexState|u)&536805311,!1):this.map!==null&&(e=this.map(e),e===null)?(t._duplexState&=b,this.buffered0;)t.push(this.shift());for(let e=0;e0;)i.drains.shift().resolve(!1);i.pipeline!==null&&i.pipeline.done(t,e)}}function de(e){let t=this.stream;e&&t.destroy(e),t._duplexState&=469499903,this.drains!==null&&he(this.drains),(t._duplexState&6553615)===O&&(t._duplexState&=532676607,(t._duplexState&A)===A&&t.emit(`drain`)),this.updateCallback()}function fe(e){e&&this.stream.destroy(e),this.stream._duplexState&=536870895,this.readAhead===!1&&!(this.stream._duplexState&256)&&(this.stream._duplexState&=C),this.updateCallback()}function pe(){this.stream._duplexState&32||(this.stream._duplexState&=S,this.update())}function me(){(this.stream._duplexState&T)===0&&(this.stream._duplexState&=I,this.update())}function he(e){for(let t=0;t0)?null:n(r)}}_read(e){e(null)}pipe(e,t){return this._readableState.updateNextTick(),this._readableState.pipe(e,t),e}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(e){return this._readableState.updateNextTickIfOpen(),this._readableState.push(e)}unshift(e){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(e)}resume(){return this._duplexState|=y,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=this._readableState.readAhead===!1?536739583:536870655,this}static _fromAsyncIterator(t,n){let r,i=new e({...n,read(e){t.next().then(a).then(e.bind(null,null)).catch(e)},predestroy(){r=t.return()},destroy(e){if(!r)return e(null);r.then(e.bind(null,null)).catch(e)}});return i;function a(e){e.done?i.push(null):i.push(e.value)}}static from(t,n){if(Pe(t))return t;if(t[H])return this._fromAsyncIterator(t[H](),n);Array.isArray(t)||(t=t===void 0?[]:[t]);let r=0;return new e({...n,read(e){this.push(r===t.length?null:t[r++]),e(null)}})}static isBackpressured(e){return(e._duplexState&17422)!=0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&256)==0}[H](){let e=this,t=null,n=null,i=null;return this.on(`error`,e=>{t=e}),this.on(`readable`,a),this.on(`close`,o),{[H](){return this},next(){return new Promise(function(t,r){n=t,i=r;let a=e.read();a===null?e._duplexState&8&&s(null):s(a)})},return(){return c(null)},throw(e){return c(e)}};function a(){n!==null&&s(e.read())}function o(){n!==null&&s(null)}function s(a){i!==null&&(t?i(t):a===null&&(e._duplexState&m)===0?i(r):n({value:a,done:a===null}),i=n=null)}function c(t){return e.destroy(t),new Promise((n,r)=>{if(e._duplexState&8)return n({value:void 0,done:!0});e.once(`close`,function(){t?r(t):n({value:void 0,done:!0})})})}}},be=class extends ve{constructor(e){super(e),this._duplexState|=1|m,this._writableState=new ie(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final),e.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=P}uncork(){this._duplexState&=L,this._writableState.updateNextTick()}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&146800654)!=0}static drained(e){if(e.destroyed)return Promise.resolve(!1);let t=e._writableState,n=(Be(e)?Math.min(1,t.queue.length):t.queue.length)+(e._duplexState&M?1:0);return n===0?Promise.resolve(!0):(t.drains===null&&(t.drains=[]),new Promise(e=>{t.drains.push({writes:n,resolve:e})}))}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},xe=class extends ye{constructor(e){super(e),this._duplexState=1|this._duplexState&v,this._writableState=new ie(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final))}cork(){this._duplexState|=P}uncork(){this._duplexState&=L,this._writableState.updateNextTick()}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},Se=class extends xe{constructor(e){super(e),this._transformState=new oe(this),e&&(e.transform&&(this._transform=e.transform),e.flush&&(this._flush=e.flush))}_write(e,t){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=e:this._transform(e,this._transformState.afterTransform)}_read(e){if(this._transformState.data!==null){let t=this._transformState.data;this._transformState.data=null,e(null),this._transform(t,this._transformState.afterTransform)}else e(null)}destroy(e){super.destroy(e),this._transformState.data!==null&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(e,t){t(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e,this._flush(we.bind(this))}},Ce=class extends Se{};function we(e,t){let n=this._transformState.afterFinal;if(e)return n(e);t!=null&&this.push(t),this.push(null),n(null)}function Te(...e){return new Promise((t,n)=>Ee(...e,e=>{if(e)return n(e);t()}))}function Ee(e,...t){let n=Array.isArray(e)?[...e,...t]:[e,...t],r=n.length&&typeof n[n.length-1]==`function`?n.pop():null;if(n.length<2)throw Error(`Pipeline requires at least 2 streams`);let a=n[0],o=null,s=null;for(let e=1;e1,l),a.pipe(o)),a=o;if(r){let e=!1,t=W(o)||!!(o._writableState&&o._writableState.autoDestroy);o.on(`error`,e=>{s===null&&(s=e)}),o.on(`finish`,()=>{e=!0,t||r(s)}),t&&o.on(`close`,()=>r(s||(e?null:i)))}return o;function c(e,t,n,r){e.on(`error`,r),e.on(`close`,a);function a(){if(t&&e._readableState&&!e._readableState.ended||n&&e._writableState&&!e._writableState.ended)return r(i)}}function l(e){if(!(!e||s)){s=e;for(let t of n)t.destroy(e)}}}function De(e){return e}function Oe(e){return!!e._readableState||!!e._writableState}function W(e){return typeof e._duplexState==`number`&&Oe(e)}function ke(e){return!!e._readableState&&e._readableState.ending}function Ae(e){return!!e._readableState&&e._readableState.ended}function je(e){return!!e._writableState&&e._writableState.ending}function Me(e){return!!e._writableState&&e._writableState.ended}function Ne(e,t={}){let n=e._readableState&&e._readableState.error||e._writableState&&e._writableState.error;return!t.all&&n===r?null:n}function Pe(e){return W(e)&&e.readable}function Fe(e){return(e._duplexState&1)!=1||(e._duplexState&4)==4||(e._duplexState&te)!==0}function Ie(e){return typeof e==`object`&&!!e&&typeof e.byteLength==`number`}function Le(e){return Ie(e)?e.byteLength:1024}function Re(){}function ze(){this.destroy(Error(`Stream aborted.`))}function Be(e){return e._writev!==be.prototype._writev&&e._writev!==xe.prototype._writev}t.exports={pipeline:Ee,pipelinePromise:Te,isStream:Oe,isStreamx:W,isEnding:ke,isEnded:Ae,isFinishing:je,isFinished:Me,isDisturbed:Fe,getStreamError:Ne,Stream:ve,Writable:be,Readable:ye,Duplex:xe,Transform:Se,PassThrough:Ce}})),fF=i((e=>{let t=sF(),n=t.from([117,115,116,97,114,0]),r=t.from([48,48]),i=t.from([117,115,116,97,114,32]),a=t.from([32,0]);e.decodeLongPath=function(e,t){return y(e,0,e.length,t)},e.encodePax=function(e){let n=``;e.name&&(n+=b(` path=`+e.name+` +var n=AL(),r=pL(),i=function(e){if(!(this instanceof i))return new i(e);e=this.options=r.defaults(e,{comment:``,forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new n(e)};i.prototype.append=function(e,t,n){this.engine.entry(e,t,n)},i.prototype.finalize=function(){this.engine.finalize()},i.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},i.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)},i.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)},t.exports=i})),ML=i(((e,n)=>{n.exports=t(`events`)})),NL=i(((e,t)=>{t.exports=class{constructor(e){if(!(e>0)||e-1&e)throw Error(`Max size for a FixedFIFO should be a power of two`);this.buffer=Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(e){return this.buffer[this.top]===void 0?(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0):!1}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}}})),PL=i(((e,t)=>{let n=NL();t.exports=class{constructor(e){this.hwm=e||16,this.head=new n(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(e){if(this.length++,!this.head.push(e)){let t=this.head;this.head=t.next=new n(2*this.head.buffer.length),this.head.push(e)}}shift(){this.length!==0&&this.length--;let e=this.tail.shift();if(e===void 0&&this.tail.next){let e=this.tail.next;return this.tail.next=null,this.tail=e,this.tail.shift()}return e}peek(){let e=this.tail.peek();return e===void 0&&this.tail.next?this.tail.next.peek():e}isEmpty(){return this.length===0}}})),FL=i(((e,t)=>{function n(e){return Buffer.isBuffer(e)||e instanceof Uint8Array}function r(e){return Buffer.isEncoding(e)}function i(e,t,n){return Buffer.alloc(e,t,n)}function a(e){return Buffer.allocUnsafe(e)}function o(e){return Buffer.allocUnsafeSlow(e)}function s(e,t){return Buffer.byteLength(e,t)}function c(e,t){return Buffer.compare(e,t)}function l(e,t){return Buffer.concat(e,t)}function u(e,t,n,r,i){return x(e).copy(t,n,r,i)}function d(e,t){return x(e).equals(t)}function f(e,t,n,r,i){return x(e).fill(t,n,r,i)}function p(e,t,n){return Buffer.from(e,t,n)}function m(e,t,n,r){return x(e).includes(t,n,r)}function h(e,t,n,r){return x(e).indexOf(t,n,r)}function g(e,t,n,r){return x(e).lastIndexOf(t,n,r)}function v(e){return x(e).swap16()}function y(e){return x(e).swap32()}function b(e){return x(e).swap64()}function x(e){return Buffer.isBuffer(e)?e:Buffer.from(e.buffer,e.byteOffset,e.byteLength)}function S(e,t,n,r){return x(e).toString(t,n,r)}function C(e,t,n,r,i){return x(e).write(t,n,r,i)}function w(e,t){return x(e).readDoubleBE(t)}function T(e,t){return x(e).readDoubleLE(t)}function E(e,t){return x(e).readFloatBE(t)}function D(e,t){return x(e).readFloatLE(t)}function O(e,t){return x(e).readInt32BE(t)}function k(e,t){return x(e).readInt32LE(t)}function A(e,t){return x(e).readUInt32BE(t)}function j(e,t){return x(e).readUInt32LE(t)}function M(e,t,n){return x(e).writeDoubleBE(t,n)}function N(e,t,n){return x(e).writeDoubleLE(t,n)}function P(e,t,n){return x(e).writeFloatBE(t,n)}function F(e,t,n){return x(e).writeFloatLE(t,n)}function I(e,t,n){return x(e).writeInt32BE(t,n)}function L(e,t,n){return x(e).writeInt32LE(t,n)}function R(e,t,n){return x(e).writeUInt32BE(t,n)}function z(e,t,n){return x(e).writeUInt32LE(t,n)}t.exports={isBuffer:n,isEncoding:r,alloc:i,allocUnsafe:a,allocUnsafeSlow:o,byteLength:s,compare:c,concat:l,copy:u,equals:d,fill:f,from:p,includes:m,indexOf:h,lastIndexOf:g,swap16:v,swap32:y,swap64:b,toBuffer:x,toString:S,write:C,readDoubleBE:w,readDoubleLE:T,readFloatBE:E,readFloatLE:D,readInt32BE:O,readInt32LE:k,readUInt32BE:A,readUInt32LE:j,writeDoubleBE:M,writeDoubleLE:N,writeFloatBE:P,writeFloatLE:F,writeInt32BE:I,writeInt32LE:L,writeUInt32BE:R,writeUInt32LE:z}})),IL=i(((e,t)=>{let n=FL();t.exports=class{constructor(e){this.encoding=e}get remaining(){return 0}decode(e){return n.toString(e,this.encoding)}flush(){return``}}})),LL=i(((e,t)=>{let n=FL();t.exports=class{constructor(){this._reset()}get remaining(){return this.bytesSeen}decode(e){if(e.byteLength===0)return``;if(this.bytesNeeded===0&&r(e,0)===0)return this.bytesSeen=i(e),n.toString(e,`utf8`);let t=``,a=0;if(this.bytesNeeded>0){for(;athis.upperBoundary){t+=`�`,this._reset();break}if(this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|n&63,this.bytesSeen++,a++,this.bytesSeen===this.bytesNeeded){t+=String.fromCodePoint(this.codePoint),this._reset();break}}if(this.bytesNeeded>0)return t}let o=r(e,a),s=e.byteLength-o;s>a&&(t+=n.toString(e,`utf8`,a,s));for(let n=s;n=194&&r<=223?(this.bytesNeeded=2,this.bytesSeen=1,this.codePoint=r&31):r>=224&&r<=239?(r===224?this.lowerBoundary=160:r===237&&(this.upperBoundary=159),this.bytesNeeded=3,this.bytesSeen=1,this.codePoint=r&15):r>=240&&r<=244?(r===240?this.lowerBoundary=144:r===244&&(this.upperBoundary=143),this.bytesNeeded=4,this.bytesSeen=1,this.codePoint=r&7):(this.bytesSeen=1,t+=`�`);continue}if(rthis.upperBoundary){t+=`�`,n--,this._reset();continue}this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|r&63,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(t+=String.fromCodePoint(this.codePoint),this._reset())}return t}flush(){let e=this.bytesNeeded>0?`�`:``;return this._reset(),e}_reset(){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191}};function r(e,t){let n=e.byteLength;if(n<=t)return 0;let r=Math.max(t,n-4),i=n-1;for(;i>r&&(e[i]&192)==128;)i--;if(i=194&&a<=223)o=2;else if(a>=224&&a<=239)o=3;else if(a>=240&&a<=244)o=4;else return 0;let s=n-i;return s=r&&(e[i]&192)==128;)i--;if(i<0)return 1;let a=e[i],o;if(a>=194&&a<=223)o=2;else if(a>=224&&a<=239)o=3;else if(a>=240&&a<=244)o=4;else return 1;if(t-i!==o)return 1;if(o>=3){let t=e[i+1];if(a===224&&t<160||a===237&&t>159||a===240&&t<144||a===244&&t>143)return 1}return 0}})),RL=i(((e,t)=>{let n=IL(),r=LL();t.exports=class{constructor(e=`utf8`){switch(this.encoding=i(e),this.encoding){case`utf8`:this.decoder=new r;break;case`utf16le`:case`base64`:throw Error(`Unsupported encoding: `+this.encoding);default:this.decoder=new n(this.encoding)}}get remaining(){return this.decoder.remaining}push(e){return typeof e==`string`?e:this.decoder.decode(e)}write(e){return this.push(e)}end(e){let t=``;return e&&(t=this.push(e)),t+=this.decoder.flush(),t}};function i(e){switch(e=e.toLowerCase(),e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:throw Error(`Unknown encoding: `+e)}}})),zL=i(((e,t)=>{let{EventEmitter:n}=ML(),r=Error(`Stream was destroyed`),i=Error(`Premature close`),a=PL(),o=RL(),s=typeof queueMicrotask>`u`?e=>global.process.nextTick(e):queueMicrotask,c=(1<<29)-1,l=c^1;c^2;let u=1024,d=2048,f=4096,p=8192,m=16384,h=32768,g=65536,v=131072;16|g,f|128;let y=256|v;c^16,c^64,c^(64|g);let b=c^g;c^256,c^(128|p),c^u;let x=c^768,S=c^h;c^32;let C=c^v;c^y;let w=1<<18,T=2<<18,E=4<<18,D=8<<18,O=16<<18,k=32<<18,A=64<<18,j=128<<18,M=256<<18,N=512<<18,P=1024<<18;c^(w|M);let F=c^E;c^(w|N),c^O,c^D;let I=c^j;c^T;let L=c^P,R=16|w,z=c^R,ee=m|k,B=14|ee;F&536870847;let te=j|h,V=15|te&z;u|16399;let ne=m|143;u|143,u|16398,h|1,N|8388623,D|O,D|w;let re=270794767;E|w,w|M,k|134217742;let H=Symbol.asyncIterator||Symbol(`asyncIterator`);var ie=class{constructor(e,{highWaterMark:t=16384,map:n=null,mapWritable:r,byteLength:i,byteLengthWritable:o}={}){this.stream=e,this.queue=new a,this.highWaterMark=t,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=o||i||Le,this.map=r||n,this.afterWrite=de.bind(this),this.afterUpdateNextTick=me.bind(this)}get ending(){return(this.stream._duplexState&N)!==0}get ended(){return(this.stream._duplexState&k)!==0}push(e){return this.stream._duplexState&142606350?!1:(this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered0,this.error=null,this.pipeline=null,this.byteLength=o||i||Le,this.map=r||n,this.pipeTo=null,this.afterRead=fe.bind(this),this.afterUpdateNextTick=pe.bind(this)}get ending(){return(this.stream._duplexState&u)!==0}get ended(){return(this.stream._duplexState&m)!==0}pipe(e,t){if(this.pipeTo!==null)throw Error(`Can only pipe to one destination`);if(typeof t!=`function`&&(t=null),this.stream._duplexState|=512,this.pipeTo=e,this.pipeline=new se(this.stream,e,t),t&&this.stream.on(`error`,Re),W(e))e._writableState.pipeline=this.pipeline,t&&e.on(`error`,Re),e.on(`finish`,this.pipeline.finished.bind(this.pipeline));else{let t=this.pipeline.done.bind(this.pipeline,e),n=this.pipeline.done.bind(this.pipeline,e,null);e.on(`error`,t),e.on(`close`,n),e.on(`finish`,this.pipeline.finished.bind(this.pipeline))}e.on(`drain`,ce.bind(this)),this.stream.emit(`piping`,e),e.emit(`pipe`,this.stream)}push(e){let t=this.stream;return e===null?(this.highWaterMark=0,t._duplexState=(t._duplexState|u)&536805311,!1):this.map!==null&&(e=this.map(e),e===null)?(t._duplexState&=b,this.buffered0;)t.push(this.shift());for(let e=0;e0;)i.drains.shift().resolve(!1);i.pipeline!==null&&i.pipeline.done(t,e)}}function de(e){let t=this.stream;e&&t.destroy(e),t._duplexState&=469499903,this.drains!==null&&he(this.drains),(t._duplexState&6553615)===O&&(t._duplexState&=532676607,(t._duplexState&A)===A&&t.emit(`drain`)),this.updateCallback()}function fe(e){e&&this.stream.destroy(e),this.stream._duplexState&=536870895,this.readAhead===!1&&!(this.stream._duplexState&256)&&(this.stream._duplexState&=C),this.updateCallback()}function pe(){this.stream._duplexState&32||(this.stream._duplexState&=S,this.update())}function me(){(this.stream._duplexState&T)===0&&(this.stream._duplexState&=I,this.update())}function he(e){for(let t=0;t0)?null:n(r)}}_read(e){e(null)}pipe(e,t){return this._readableState.updateNextTick(),this._readableState.pipe(e,t),e}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(e){return this._readableState.updateNextTickIfOpen(),this._readableState.push(e)}unshift(e){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(e)}resume(){return this._duplexState|=y,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=this._readableState.readAhead===!1?536739583:536870655,this}static _fromAsyncIterator(t,n){let r,i=new e({...n,read(e){t.next().then(a).then(e.bind(null,null)).catch(e)},predestroy(){r=t.return()},destroy(e){if(!r)return e(null);r.then(e.bind(null,null)).catch(e)}});return i;function a(e){e.done?i.push(null):i.push(e.value)}}static from(t,n){if(Pe(t))return t;if(t[H])return this._fromAsyncIterator(t[H](),n);Array.isArray(t)||(t=t===void 0?[]:[t]);let r=0;return new e({...n,read(e){this.push(r===t.length?null:t[r++]),e(null)}})}static isBackpressured(e){return(e._duplexState&17422)!=0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&256)==0}[H](){let e=this,t=null,n=null,i=null;return this.on(`error`,e=>{t=e}),this.on(`readable`,a),this.on(`close`,o),{[H](){return this},next(){return new Promise(function(t,r){n=t,i=r;let a=e.read();a===null?e._duplexState&8&&s(null):s(a)})},return(){return c(null)},throw(e){return c(e)}};function a(){n!==null&&s(e.read())}function o(){n!==null&&s(null)}function s(a){i!==null&&(t?i(t):a===null&&(e._duplexState&m)===0?i(r):n({value:a,done:a===null}),i=n=null)}function c(t){return e.destroy(t),new Promise((n,r)=>{if(e._duplexState&8)return n({value:void 0,done:!0});e.once(`close`,function(){t?r(t):n({value:void 0,done:!0})})})}}},be=class extends ve{constructor(e){super(e),this._duplexState|=1|m,this._writableState=new ie(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final),e.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=P}uncork(){this._duplexState&=L,this._writableState.updateNextTick()}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&146800654)!=0}static drained(e){if(e.destroyed)return Promise.resolve(!1);let t=e._writableState,n=(Be(e)?Math.min(1,t.queue.length):t.queue.length)+(e._duplexState&M?1:0);return n===0?Promise.resolve(!0):(t.drains===null&&(t.drains=[]),new Promise(e=>{t.drains.push({writes:n,resolve:e})}))}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},xe=class extends ye{constructor(e){super(e),this._duplexState=1|this._duplexState&v,this._writableState=new ie(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final))}cork(){this._duplexState|=P}uncork(){this._duplexState&=L,this._writableState.updateNextTick()}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},Se=class extends xe{constructor(e){super(e),this._transformState=new oe(this),e&&(e.transform&&(this._transform=e.transform),e.flush&&(this._flush=e.flush))}_write(e,t){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=e:this._transform(e,this._transformState.afterTransform)}_read(e){if(this._transformState.data!==null){let t=this._transformState.data;this._transformState.data=null,e(null),this._transform(t,this._transformState.afterTransform)}else e(null)}destroy(e){super.destroy(e),this._transformState.data!==null&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(e,t){t(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e,this._flush(we.bind(this))}},Ce=class extends Se{};function we(e,t){let n=this._transformState.afterFinal;if(e)return n(e);t!=null&&this.push(t),this.push(null),n(null)}function Te(...e){return new Promise((t,n)=>Ee(...e,e=>{if(e)return n(e);t()}))}function Ee(e,...t){let n=Array.isArray(e)?[...e,...t]:[e,...t],r=n.length&&typeof n[n.length-1]==`function`?n.pop():null;if(n.length<2)throw Error(`Pipeline requires at least 2 streams`);let a=n[0],o=null,s=null;for(let e=1;e1,l),a.pipe(o)),a=o;if(r){let e=!1,t=W(o)||!!(o._writableState&&o._writableState.autoDestroy);o.on(`error`,e=>{s===null&&(s=e)}),o.on(`finish`,()=>{e=!0,t||r(s)}),t&&o.on(`close`,()=>r(s||(e?null:i)))}return o;function c(e,t,n,r){e.on(`error`,r),e.on(`close`,a);function a(){if(t&&e._readableState&&!e._readableState.ended||n&&e._writableState&&!e._writableState.ended)return r(i)}}function l(e){if(!(!e||s)){s=e;for(let t of n)t.destroy(e)}}}function De(e){return e}function Oe(e){return!!e._readableState||!!e._writableState}function W(e){return typeof e._duplexState==`number`&&Oe(e)}function ke(e){return!!e._readableState&&e._readableState.ending}function Ae(e){return!!e._readableState&&e._readableState.ended}function je(e){return!!e._writableState&&e._writableState.ending}function Me(e){return!!e._writableState&&e._writableState.ended}function Ne(e,t={}){let n=e._readableState&&e._readableState.error||e._writableState&&e._writableState.error;return!t.all&&n===r?null:n}function Pe(e){return W(e)&&e.readable}function Fe(e){return(e._duplexState&1)!=1||(e._duplexState&4)==4||(e._duplexState&te)!==0}function Ie(e){return typeof e==`object`&&!!e&&typeof e.byteLength==`number`}function Le(e){return Ie(e)?e.byteLength:1024}function Re(){}function ze(){this.destroy(Error(`Stream aborted.`))}function Be(e){return e._writev!==be.prototype._writev&&e._writev!==xe.prototype._writev}t.exports={pipeline:Ee,pipelinePromise:Te,isStream:Oe,isStreamx:W,isEnding:ke,isEnded:Ae,isFinishing:je,isFinished:Me,isDisturbed:Fe,getStreamError:Ne,Stream:ve,Writable:be,Readable:ye,Duplex:xe,Transform:Se,PassThrough:Ce}})),BL=i((e=>{let t=FL(),n=t.from([117,115,116,97,114,0]),r=t.from([48,48]),i=t.from([117,115,116,97,114,32]),a=t.from([32,0]);e.decodeLongPath=function(e,t){return y(e,0,e.length,t)},e.encodePax=function(e){let n=``;e.name&&(n+=b(` path=`+e.name+` `)),e.linkname&&(n+=b(` linkpath=`+e.linkname+` `));let r=e.pax;if(r)for(let e in r)n+=b(` `+e+`=`+r[e]+` -`);return t.from(n)},e.decodePax=function(e){let n={};for(;e.length;){let r=0;for(;r100;){let e=a.indexOf(`/`);if(e===-1)return null;o+=o?`/`+a.slice(0,e):a.slice(0,e),a=a.slice(e+1)}return t.byteLength(a)>100||t.byteLength(o)>155||e.linkname&&t.byteLength(e.linkname)>100?null:(t.write(i,a),t.write(i,p(e.mode&4095,6),100),t.write(i,p(e.uid,6),108),t.write(i,p(e.gid,6),116),h(e.size,i,124),t.write(i,p(e.mtime.getTime()/1e3|0,11),136),i[156]=48+u(e.type),e.linkname&&t.write(i,e.linkname,157),t.copy(n,i,257),t.copy(r,i,263),e.uname&&t.write(i,e.uname,265),e.gname&&t.write(i,e.gname,297),t.write(i,p(e.devmajor||0,6),329),t.write(i,p(e.devminor||0,6),337),o&&t.write(i,o,345),t.write(i,p(f(i),6),148),i)},e.decode=function(e,t,n){let r=e[156]===0?0:e[156]-48,i=y(e,0,100,t),a=v(e,100,8),c=v(e,108,8),u=v(e,116,8),d=v(e,124,12),p=v(e,136,12),m=l(r),h=e[157]===0?null:y(e,157,100,t),g=y(e,265,32),b=y(e,297,32),x=v(e,329,8),S=v(e,337,8),C=f(e);if(C===256)return null;if(C!==v(e,148,8))throw Error(`Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?`);if(o(e))e[345]&&(i=y(e,345,155,t)+`/`+i);else if(!s(e)&&!n)throw Error(`Invalid tar header: unknown format.`);return r===0&&i&&i[i.length-1]===`/`&&(r=5),{name:i,mode:a,uid:c,gid:u,size:d,mtime:new Date(1e3*p),type:m,linkname:h,uname:g,gname:b,devmajor:x,devminor:S,pax:null}};function o(e){return t.equals(n,e.subarray(257,263))}function s(e){return t.equals(i,e.subarray(257,263))&&t.equals(a,e.subarray(263,265))}function c(e,t,n){return typeof e==`number`?(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0):n}function l(e){switch(e){case 0:return`file`;case 1:return`link`;case 2:return`symlink`;case 3:return`character-device`;case 4:return`block-device`;case 5:return`directory`;case 6:return`fifo`;case 7:return`contiguous-file`;case 72:return`pax-header`;case 55:return`pax-global-header`;case 27:return`gnu-long-link-path`;case 28:case 30:return`gnu-long-path`}return null}function u(e){switch(e){case`file`:return 0;case`link`:return 1;case`symlink`:return 2;case`character-device`:return 3;case`block-device`:return 4;case`directory`:return 5;case`fifo`:return 6;case`contiguous-file`:return 7;case`pax-header`:return 72}return 0}function d(e,t,n,r){for(;nt?`7777777777777777777`.slice(0,t)+` `:`0000000000000000000`.slice(0,t-e.length)+e+` `}function m(e,t,n){t[n]=128;for(let r=11;r>0;r--)t[n+r]=e&255,e=Math.floor(e/256)}function h(e,n,r){e.toString(8).length>11?m(e,n,r):t.write(n,p(e,11),r)}function g(e){let t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;let n=[],r;for(r=e.length-1;r>0;r--){let i=e[r];t?n.push(i):n.push(255-i)}let i=0,a=n.length;for(r=0;r=10**r&&r++,n+r+e}})),pF=i(((e,t)=>{let{Writable:n,Readable:r,getStreamError:i}=dF(),a=oF(),o=sF(),s=fF(),c=o.alloc(0);var l=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new a,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return c;let t=this._next(e);if(e===t.byteLength)return t;let n=[t];for(;(e-=t.byteLength)>0;)t=this._next(e),n.push(t);return o.concat(n)}_next(e){let t=this.queue.peek(),n=t.byteLength-this._offset;if(e>=n){let e=this._offset?t.subarray(this._offset,t.byteLength):t;return this.queue.shift(),this._offset=0,this.buffered-=n,this.shifted+=n,e}return this.buffered-=e,this.shifted+=e,t.subarray(this._offset,this._offset+=e)}},u=class extends r{constructor(e,t,n){super(),this.header=t,this.offset=n,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(i(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=p(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},d=class extends n{constructor(e){super(e),e||={},this._buffer=new l,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=f,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=e.filenameEncoding||`utf-8`,this._allowUnknownFormat=!!e.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(e){if(this._locked=!1,e){this.destroy(e),this._continueWrite(e);return}this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=s.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(e){return this._continueWrite(e),!1}if(!this._header)return!0;switch(this._header.type){case`gnu-long-path`:case`gnu-long-link-path`:case`pax-global-header`:case`pax-header`:return this._longHeader=!0,this._missing=this._header.size,!0}return this._locked=!0,this._applyLongHeaders(),this._header.size===0||this._header.type===`directory`?(this.emit(`entry`,this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit(`entry`,this._header,this._stream,this._unlockBound),!0)}_applyLongHeaders(){this._gnuLongPath&&=(this._header.name=this._gnuLongPath,null),this._gnuLongLinkPath&&=(this._header.linkname=this._gnuLongLinkPath,null),this._pax&&=(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,null)}_decodeLongHeader(e){switch(this._header.type){case`gnu-long-path`:this._gnuLongPath=s.decodeLongPath(e,this._filenameEncoding);break;case`gnu-long-link-path`:this._gnuLongLinkPath=s.decodeLongPath(e,this._filenameEncoding);break;case`pax-global-header`:this._paxGlobal=s.decodePax(e);break;case`pax-header`:this._pax=this._paxGlobal===null?s.decodePax(e):Object.assign({},this._paxGlobal,s.decodePax(e));break}}_consumeLongHeader(){this._longHeader=!1,this._missing=p(this._header.size);let e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(e){return this._continueWrite(e),!1}return!0}_consumeStream(){let e=this._buffer.shiftFirst(this._missing);if(e===null)return!1;this._missing-=e.byteLength;let t=this._stream.push(e);return this._missing===0?(this._stream.push(null),t&&this._stream._detach(),t&&this._locked===!1):t}_createStream(){return new u(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(this._stream!==null){if(this._consumeStream()===!1)return;continue}if(this._longHeader===!0){if(this._missing>this._buffer.buffered)break;if(this._consumeLongHeader()===!1)return!1;continue}let e=this._buffer.shiftFirst(this._missing);e!==null&&(this._missing-=e.byteLength);continue}if(this._buffer.buffered<512)break;if(this._stream!==null||this._consumeHeader()===!1)return}this._continueWrite(null)}_continueWrite(e){let t=this._callback;this._callback=f,t(e)}_write(e,t){this._callback=t,this._buffer.push(e),this._update()}_final(e){this._finished=this._missing===0&&this._buffer.buffered===0,e(this._finished?null:Error(`Unexpected end of data`))}_predestroy(){this._continueWrite(null)}_destroy(e){this._stream&&this._stream.destroy(i(this)),e(null)}[Symbol.asyncIterator](){let e=null,t=null,n=null,r=null,i=null,a=this;return this.on(`entry`,c),this.on(`error`,t=>{e=t}),this.on(`close`,l),{[Symbol.asyncIterator](){return this},next(){return new Promise(s)},return(){return u(null)},throw(e){return u(e)}};function o(e){if(!i)return;let t=i;i=null,t(e)}function s(i,s){if(e)return s(e);if(r){i({value:r,done:!1}),r=null;return}t=i,n=s,o(null),a._finished&&t&&(t({value:void 0,done:!0}),t=n=null)}function c(e,a,o){i=o,a.on(`error`,f),t?(t({value:a,done:!1}),t=n=null):r=a}function l(){o(e),t&&=(e?n(e):t({value:void 0,done:!0}),n=null)}function u(e){return a.destroy(e),o(e),new Promise((t,n)=>{if(a.destroyed)return t({value:void 0,done:!0});a.once(`close`,function(){e?n(e):t({value:void 0,done:!0})})})}}};t.exports=function(e){return new d(e)};function f(){}function p(e){return e&=511,e&&512-e}})),mF=i(((e,n)=>{let r={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{n.exports=t(`fs`).constants||r}catch{n.exports=r}})),hF=i(((e,t)=>{let{Readable:n,Writable:r,getStreamError:i}=dF(),a=sF(),o=mF(),s=fF(),c=a.alloc(1024);var l=class extends r{constructor(e,t,n){super({mapWritable:m,eagerOpen:!0}),this.written=0,this.header=t,this._callback=n,this._linkname=null,this._isLinkname=t.type===`symlink`&&!t.linkname,this._isVoid=t.type!==`file`&&t.type!==`contiguous-file`,this._finished=!1,this._pack=e,this._openCallback=null,this._pack._stream===null?this._pack._stream=this:this._pack._pending.push(this)}_open(e){this._openCallback=e,this._pack._stream===this&&this._continueOpen()}_continuePack(e){if(this._callback===null)return;let t=this._callback;this._callback=null,t(e)}_continueOpen(){this._pack._stream===null&&(this._pack._stream=this);let e=this._openCallback;if(this._openCallback=null,e!==null){if(this._pack.destroying)return e(Error(`pack stream destroyed`));if(this._pack._finalized)return e(Error(`pack stream is already finalized`));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),e(null)}}_write(e,t){if(this._isLinkname)return this._linkname=this._linkname?a.concat([this._linkname,e]):e,t(null);if(this._isVoid)return e.byteLength>0?t(Error(`No body allowed for this entry`)):t();if(this.written+=e.byteLength,this._pack.push(e))return t();this._pack._drain=t}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?a.toString(this._linkname,`utf-8`):``,this._pack._encode(this.header)),p(this._pack,this.header.size),this._pack._done(this))}_final(e){if(this.written!==this.header.size)return e(Error(`Size mismatch`));this._finish(),e(null)}_getError(){return i(this)||Error(`tar entry destroyed`)}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),e()}},u=class extends n{constructor(e){super(e),this._drain=f,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(e,t,n){if(this._finalized||this.destroying)throw Error(`already finalized or destroyed`);typeof t==`function`&&(n=t,t=null),n||=f,(!e.size||e.type===`symlink`)&&(e.size=0),e.type||=d(e.mode),e.mode||=e.type===`directory`?493:420,e.uid||=0,e.gid||=0,e.mtime||=new Date,typeof t==`string`&&(t=a.from(t));let r=new l(this,e,n);return a.isBuffer(t)?(e.size=t.byteLength,r.write(t),r.end(),r):(r._isVoid,r)}finalize(){if(this._stream||this._pending.length>0){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(c),this.push(null))}_done(e){e===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(e){if(!e.pax){let t=s.encode(e);if(t){this.push(t);return}}this._encodePax(e)}_encodePax(e){let t=s.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),n={name:`PaxHeader`,mode:e.mode,uid:e.uid,gid:e.gid,size:t.byteLength,mtime:e.mtime,type:`pax-header`,linkname:e.linkname&&`PaxHeader`,uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(s.encode(n)),this.push(t),p(this,t.byteLength),n.size=e.size,n.type=e.type,this.push(s.encode(n))}_doDrain(){let e=this._drain;this._drain=f,e()}_predestroy(){let e=i(this);for(this._stream&&this._stream.destroy(e);this._pending.length;){let t=this._pending.shift();t.destroy(e),t._continueOpen()}this._doDrain()}_read(e){this._doDrain(),e()}};t.exports=function(e){return new u(e)};function d(e){switch(e&o.S_IFMT){case o.S_IFBLK:return`block-device`;case o.S_IFCHR:return`character-device`;case o.S_IFDIR:return`directory`;case o.S_IFIFO:return`fifo`;case o.S_IFLNK:return`symlink`}return`file`}function f(){}function p(e,t){t&=511,t&&e.push(c.subarray(0,512-t))}function m(e){return a.isBuffer(e)?e:a.from(e)}})),gF=i((e=>{e.extract=pF(),e.pack=hF()})),_F=i(((e,n)=>{ +`);return t.from(n)},e.decodePax=function(e){let n={};for(;e.length;){let r=0;for(;r100;){let e=a.indexOf(`/`);if(e===-1)return null;o+=o?`/`+a.slice(0,e):a.slice(0,e),a=a.slice(e+1)}return t.byteLength(a)>100||t.byteLength(o)>155||e.linkname&&t.byteLength(e.linkname)>100?null:(t.write(i,a),t.write(i,p(e.mode&4095,6),100),t.write(i,p(e.uid,6),108),t.write(i,p(e.gid,6),116),h(e.size,i,124),t.write(i,p(e.mtime.getTime()/1e3|0,11),136),i[156]=48+u(e.type),e.linkname&&t.write(i,e.linkname,157),t.copy(n,i,257),t.copy(r,i,263),e.uname&&t.write(i,e.uname,265),e.gname&&t.write(i,e.gname,297),t.write(i,p(e.devmajor||0,6),329),t.write(i,p(e.devminor||0,6),337),o&&t.write(i,o,345),t.write(i,p(f(i),6),148),i)},e.decode=function(e,t,n){let r=e[156]===0?0:e[156]-48,i=y(e,0,100,t),a=v(e,100,8),c=v(e,108,8),u=v(e,116,8),d=v(e,124,12),p=v(e,136,12),m=l(r),h=e[157]===0?null:y(e,157,100,t),g=y(e,265,32),b=y(e,297,32),x=v(e,329,8),S=v(e,337,8),C=f(e);if(C===256)return null;if(C!==v(e,148,8))throw Error(`Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?`);if(o(e))e[345]&&(i=y(e,345,155,t)+`/`+i);else if(!s(e)&&!n)throw Error(`Invalid tar header: unknown format.`);return r===0&&i&&i[i.length-1]===`/`&&(r=5),{name:i,mode:a,uid:c,gid:u,size:d,mtime:new Date(1e3*p),type:m,linkname:h,uname:g,gname:b,devmajor:x,devminor:S,pax:null}};function o(e){return t.equals(n,e.subarray(257,263))}function s(e){return t.equals(i,e.subarray(257,263))&&t.equals(a,e.subarray(263,265))}function c(e,t,n){return typeof e==`number`?(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0):n}function l(e){switch(e){case 0:return`file`;case 1:return`link`;case 2:return`symlink`;case 3:return`character-device`;case 4:return`block-device`;case 5:return`directory`;case 6:return`fifo`;case 7:return`contiguous-file`;case 72:return`pax-header`;case 55:return`pax-global-header`;case 27:return`gnu-long-link-path`;case 28:case 30:return`gnu-long-path`}return null}function u(e){switch(e){case`file`:return 0;case`link`:return 1;case`symlink`:return 2;case`character-device`:return 3;case`block-device`:return 4;case`directory`:return 5;case`fifo`:return 6;case`contiguous-file`:return 7;case`pax-header`:return 72}return 0}function d(e,t,n,r){for(;nt?`7777777777777777777`.slice(0,t)+` `:`0000000000000000000`.slice(0,t-e.length)+e+` `}function m(e,t,n){t[n]=128;for(let r=11;r>0;r--)t[n+r]=e&255,e=Math.floor(e/256)}function h(e,n,r){e.toString(8).length>11?m(e,n,r):t.write(n,p(e,11),r)}function g(e){let t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;let n=[],r;for(r=e.length-1;r>0;r--){let i=e[r];t?n.push(i):n.push(255-i)}let i=0,a=n.length;for(r=0;r=10**r&&r++,n+r+e}})),VL=i(((e,t)=>{let{Writable:n,Readable:r,getStreamError:i}=zL(),a=PL(),o=FL(),s=BL(),c=o.alloc(0);var l=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new a,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return c;let t=this._next(e);if(e===t.byteLength)return t;let n=[t];for(;(e-=t.byteLength)>0;)t=this._next(e),n.push(t);return o.concat(n)}_next(e){let t=this.queue.peek(),n=t.byteLength-this._offset;if(e>=n){let e=this._offset?t.subarray(this._offset,t.byteLength):t;return this.queue.shift(),this._offset=0,this.buffered-=n,this.shifted+=n,e}return this.buffered-=e,this.shifted+=e,t.subarray(this._offset,this._offset+=e)}},u=class extends r{constructor(e,t,n){super(),this.header=t,this.offset=n,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(i(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=p(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},d=class extends n{constructor(e){super(e),e||={},this._buffer=new l,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=f,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=e.filenameEncoding||`utf-8`,this._allowUnknownFormat=!!e.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(e){if(this._locked=!1,e){this.destroy(e),this._continueWrite(e);return}this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=s.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(e){return this._continueWrite(e),!1}if(!this._header)return!0;switch(this._header.type){case`gnu-long-path`:case`gnu-long-link-path`:case`pax-global-header`:case`pax-header`:return this._longHeader=!0,this._missing=this._header.size,!0}return this._locked=!0,this._applyLongHeaders(),this._header.size===0||this._header.type===`directory`?(this.emit(`entry`,this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit(`entry`,this._header,this._stream,this._unlockBound),!0)}_applyLongHeaders(){this._gnuLongPath&&=(this._header.name=this._gnuLongPath,null),this._gnuLongLinkPath&&=(this._header.linkname=this._gnuLongLinkPath,null),this._pax&&=(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,null)}_decodeLongHeader(e){switch(this._header.type){case`gnu-long-path`:this._gnuLongPath=s.decodeLongPath(e,this._filenameEncoding);break;case`gnu-long-link-path`:this._gnuLongLinkPath=s.decodeLongPath(e,this._filenameEncoding);break;case`pax-global-header`:this._paxGlobal=s.decodePax(e);break;case`pax-header`:this._pax=this._paxGlobal===null?s.decodePax(e):Object.assign({},this._paxGlobal,s.decodePax(e));break}}_consumeLongHeader(){this._longHeader=!1,this._missing=p(this._header.size);let e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(e){return this._continueWrite(e),!1}return!0}_consumeStream(){let e=this._buffer.shiftFirst(this._missing);if(e===null)return!1;this._missing-=e.byteLength;let t=this._stream.push(e);return this._missing===0?(this._stream.push(null),t&&this._stream._detach(),t&&this._locked===!1):t}_createStream(){return new u(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(this._stream!==null){if(this._consumeStream()===!1)return;continue}if(this._longHeader===!0){if(this._missing>this._buffer.buffered)break;if(this._consumeLongHeader()===!1)return!1;continue}let e=this._buffer.shiftFirst(this._missing);e!==null&&(this._missing-=e.byteLength);continue}if(this._buffer.buffered<512)break;if(this._stream!==null||this._consumeHeader()===!1)return}this._continueWrite(null)}_continueWrite(e){let t=this._callback;this._callback=f,t(e)}_write(e,t){this._callback=t,this._buffer.push(e),this._update()}_final(e){this._finished=this._missing===0&&this._buffer.buffered===0,e(this._finished?null:Error(`Unexpected end of data`))}_predestroy(){this._continueWrite(null)}_destroy(e){this._stream&&this._stream.destroy(i(this)),e(null)}[Symbol.asyncIterator](){let e=null,t=null,n=null,r=null,i=null,a=this;return this.on(`entry`,c),this.on(`error`,t=>{e=t}),this.on(`close`,l),{[Symbol.asyncIterator](){return this},next(){return new Promise(s)},return(){return u(null)},throw(e){return u(e)}};function o(e){if(!i)return;let t=i;i=null,t(e)}function s(i,s){if(e)return s(e);if(r){i({value:r,done:!1}),r=null;return}t=i,n=s,o(null),a._finished&&t&&(t({value:void 0,done:!0}),t=n=null)}function c(e,a,o){i=o,a.on(`error`,f),t?(t({value:a,done:!1}),t=n=null):r=a}function l(){o(e),t&&=(e?n(e):t({value:void 0,done:!0}),n=null)}function u(e){return a.destroy(e),o(e),new Promise((t,n)=>{if(a.destroyed)return t({value:void 0,done:!0});a.once(`close`,function(){e?n(e):t({value:void 0,done:!0})})})}}};t.exports=function(e){return new d(e)};function f(){}function p(e){return e&=511,e&&512-e}})),HL=i(((e,n)=>{let r={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{n.exports=t(`fs`).constants||r}catch{n.exports=r}})),UL=i(((e,t)=>{let{Readable:n,Writable:r,getStreamError:i}=zL(),a=FL(),o=HL(),s=BL(),c=a.alloc(1024);var l=class extends r{constructor(e,t,n){super({mapWritable:m,eagerOpen:!0}),this.written=0,this.header=t,this._callback=n,this._linkname=null,this._isLinkname=t.type===`symlink`&&!t.linkname,this._isVoid=t.type!==`file`&&t.type!==`contiguous-file`,this._finished=!1,this._pack=e,this._openCallback=null,this._pack._stream===null?this._pack._stream=this:this._pack._pending.push(this)}_open(e){this._openCallback=e,this._pack._stream===this&&this._continueOpen()}_continuePack(e){if(this._callback===null)return;let t=this._callback;this._callback=null,t(e)}_continueOpen(){this._pack._stream===null&&(this._pack._stream=this);let e=this._openCallback;if(this._openCallback=null,e!==null){if(this._pack.destroying)return e(Error(`pack stream destroyed`));if(this._pack._finalized)return e(Error(`pack stream is already finalized`));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),e(null)}}_write(e,t){if(this._isLinkname)return this._linkname=this._linkname?a.concat([this._linkname,e]):e,t(null);if(this._isVoid)return e.byteLength>0?t(Error(`No body allowed for this entry`)):t();if(this.written+=e.byteLength,this._pack.push(e))return t();this._pack._drain=t}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?a.toString(this._linkname,`utf-8`):``,this._pack._encode(this.header)),p(this._pack,this.header.size),this._pack._done(this))}_final(e){if(this.written!==this.header.size)return e(Error(`Size mismatch`));this._finish(),e(null)}_getError(){return i(this)||Error(`tar entry destroyed`)}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),e()}},u=class extends n{constructor(e){super(e),this._drain=f,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(e,t,n){if(this._finalized||this.destroying)throw Error(`already finalized or destroyed`);typeof t==`function`&&(n=t,t=null),n||=f,(!e.size||e.type===`symlink`)&&(e.size=0),e.type||=d(e.mode),e.mode||=e.type===`directory`?493:420,e.uid||=0,e.gid||=0,e.mtime||=new Date,typeof t==`string`&&(t=a.from(t));let r=new l(this,e,n);return a.isBuffer(t)?(e.size=t.byteLength,r.write(t),r.end(),r):(r._isVoid,r)}finalize(){if(this._stream||this._pending.length>0){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(c),this.push(null))}_done(e){e===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(e){if(!e.pax){let t=s.encode(e);if(t){this.push(t);return}}this._encodePax(e)}_encodePax(e){let t=s.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),n={name:`PaxHeader`,mode:e.mode,uid:e.uid,gid:e.gid,size:t.byteLength,mtime:e.mtime,type:`pax-header`,linkname:e.linkname&&`PaxHeader`,uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(s.encode(n)),this.push(t),p(this,t.byteLength),n.size=e.size,n.type=e.type,this.push(s.encode(n))}_doDrain(){let e=this._drain;this._drain=f,e()}_predestroy(){let e=i(this);for(this._stream&&this._stream.destroy(e);this._pending.length;){let t=this._pending.shift();t.destroy(e),t._continueOpen()}this._doDrain()}_read(e){this._doDrain(),e()}};t.exports=function(e){return new u(e)};function d(e){switch(e&o.S_IFMT){case o.S_IFBLK:return`block-device`;case o.S_IFCHR:return`character-device`;case o.S_IFDIR:return`directory`;case o.S_IFIFO:return`fifo`;case o.S_IFLNK:return`symlink`}return`file`}function f(){}function p(e,t){t&=511,t&&e.push(c.subarray(0,512-t))}function m(e){return a.isBuffer(e)?e:a.from(e)}})),WL=i((e=>{e.extract=VL(),e.pack=UL()})),GL=i(((e,n)=>{ /** * TAR Format Plugin * @@ -133,7 +214,7 @@ var n=nF(),r=zP(),i=function(e){if(!(this instanceof i))return new i(e);e=this.o * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} * @copyright (c) 2012-2014 Chris Talkington, contributors. */ -var r=t(`zlib`),i=gF(),a=zP(),o=function(e){if(!(this instanceof o))return new o(e);e=this.options=a.defaults(e,{gzip:!1}),typeof e.gzipOptions!=`object`&&(e.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=i.pack(e),this.compressor=!1,e.gzip&&(this.compressor=r.createGzip(e.gzipOptions),this.compressor.on(`error`,this._onCompressorError.bind(this)))};o.prototype._onCompressorError=function(e){this.engine.emit(`error`,e)},o.prototype.append=function(e,t,n){var r=this;t.mtime=t.date;function i(e,i){if(e){n(e);return}r.engine.entry(t,i,function(e){n(e,t)})}if(t.sourceType===`buffer`)i(null,e);else if(t.sourceType===`stream`&&t.stats){t.size=t.stats.size;var o=r.engine.entry(t,function(e){n(e,t)});e.pipe(o)}else t.sourceType===`stream`&&a.collectStream(e,i)},o.prototype.finalize=function(){this.engine.finalize()},o.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},o.prototype.pipe=function(e,t){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(e,t):this.engine.pipe.apply(this.engine,arguments)},o.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)},n.exports=o})),vF=i(((e,t)=>{function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}let r=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function i(e){if(Buffer.isBuffer(e))return e;if(typeof e==`number`)return Buffer.alloc(e);if(typeof e==`string`)return Buffer.from(e);throw Error(`input must be buffer, number, or string, received `+typeof e)}function a(e){let t=i(4);return t.writeInt32BE(e,0),t}function o(e,t){e=i(e),Buffer.isBuffer(t)&&(t=t.readUInt32BE(0));let n=~~t^-1;for(var a=0;a>>8;return n^-1}function s(){return a(o.apply(null,arguments))}s.signed=function(){return o.apply(null,arguments)},s.unsigned=function(){return o.apply(null,arguments)>>>0},t.exports=n(s)})),yF=i(((e,n)=>{ +var r=t(`zlib`),i=WL(),a=pL(),o=function(e){if(!(this instanceof o))return new o(e);e=this.options=a.defaults(e,{gzip:!1}),typeof e.gzipOptions!=`object`&&(e.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=i.pack(e),this.compressor=!1,e.gzip&&(this.compressor=r.createGzip(e.gzipOptions),this.compressor.on(`error`,this._onCompressorError.bind(this)))};o.prototype._onCompressorError=function(e){this.engine.emit(`error`,e)},o.prototype.append=function(e,t,n){var r=this;t.mtime=t.date;function i(e,i){if(e){n(e);return}r.engine.entry(t,i,function(e){n(e,t)})}if(t.sourceType===`buffer`)i(null,e);else if(t.sourceType===`stream`&&t.stats){t.size=t.stats.size;var o=r.engine.entry(t,function(e){n(e,t)});e.pipe(o)}else t.sourceType===`stream`&&a.collectStream(e,i)},o.prototype.finalize=function(){this.engine.finalize()},o.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},o.prototype.pipe=function(e,t){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(e,t):this.engine.pipe.apply(this.engine,arguments)},o.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)},n.exports=o})),KL=i(((e,t)=>{function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}let r=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function i(e){if(Buffer.isBuffer(e))return e;if(typeof e==`number`)return Buffer.alloc(e);if(typeof e==`string`)return Buffer.from(e);throw Error(`input must be buffer, number, or string, received `+typeof e)}function a(e){let t=i(4);return t.writeInt32BE(e,0),t}function o(e,t){e=i(e),Buffer.isBuffer(t)&&(t=t.readUInt32BE(0));let n=~~t^-1;for(var a=0;a>>8;return n^-1}function s(){return a(o.apply(null,arguments))}s.signed=function(){return o.apply(null,arguments)},s.unsigned=function(){return o.apply(null,arguments)>>>0},t.exports=n(s)})),qL=i(((e,n)=>{ /** * JSON Format Plugin * @@ -141,7 +222,7 @@ var r=t(`zlib`),i=gF(),a=zP(),o=function(e){if(!(this instanceof o))return new o * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} * @copyright (c) 2012-2014 Chris Talkington, contributors. */ -var r=t(`util`).inherits,i=TN().Transform,a=vF(),o=zP(),s=function(e){if(!(this instanceof s))return new s(e);e=this.options=o.defaults(e,{}),i.call(this,e),this.supports={directory:!0,symlink:!0},this.files=[]};r(s,i),s.prototype._transform=function(e,t,n){n(null,e)},s.prototype._writeStringified=function(){var e=JSON.stringify(this.files);this.write(e)},s.prototype.append=function(e,t,n){var r=this;t.crc32=0;function i(e,i){if(e){n(e);return}t.size=i.length||0,t.crc32=a.unsigned(i),r.files.push(t),n(null,t)}t.sourceType===`buffer`?i(null,e):t.sourceType===`stream`&&o.collectStream(e,i)},s.prototype.finalize=function(){this._writeStringified(),this.end()},n.exports=s})),bF=n(i(((e,t)=>{ +var r=t(`util`).inherits,i=$F().Transform,a=KL(),o=pL(),s=function(e){if(!(this instanceof s))return new s(e);e=this.options=o.defaults(e,{}),i.call(this,e),this.supports={directory:!0,symlink:!0},this.files=[]};r(s,i),s.prototype._transform=function(e,t,n){n(null,e)},s.prototype._writeStringified=function(){var e=JSON.stringify(this.files);this.write(e)},s.prototype.append=function(e,t,n){var r=this;t.crc32=0;function i(e,i){if(e){n(e);return}t.size=i.length||0,t.crc32=a.unsigned(i),r.files.push(t),n(null,t)}t.sourceType===`buffer`?i(null,e):t.sourceType===`stream`&&o.collectStream(e,i)},s.prototype.finalize=function(){this._writeStringified(),this.end()},n.exports=s})),JL=n(i(((e,t)=>{ /** * Archiver Vending * @@ -149,28 +230,28 @@ var r=t(`util`).inherits,i=TN().Transform,a=vF(),o=zP(),s=function(e){if(!(this * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} * @copyright (c) 2012-2014 Chris Talkington, contributors. */ -var n=VP(),r={},i=function(e,t){return i.create(e,t)};i.create=function(e,t){if(r[e]){var i=new n(e,t);return i.setFormat(e),i.setModule(new r[e](t)),i}else throw Error(`create(`+e+`): format not registered`)},i.registerFormat=function(e,t){if(r[e])throw Error(`register(`+e+`): format already registered`);if(typeof t!=`function`)throw Error(`register(`+e+`): format module invalid`);if(typeof t.prototype.append!=`function`||typeof t.prototype.finalize!=`function`)throw Error(`register(`+e+`): format module missing methods`);r[e]=t},i.isRegisteredFormat=function(e){return!!r[e]},i.registerFormat(`zip`,rF()),i.registerFormat(`tar`,_F()),i.registerFormat(`json`,yF()),t.exports=i}))(),1),xF=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},SF=class extends Ue.Transform{constructor(e){super({highWaterMark:e})}_transform(e,t,n){n(null,e)}};function CF(e){return xF(this,void 0,void 0,function*(){K(`Creating raw file upload stream for: ${e}`);let t=jA(),n=new SF(t),r=e;(yield fe.promises.lstat(e)).isSymbolicLink()&&(r=yield Qe(e));let i=fe.createReadStream(r,{highWaterMark:t});return i.on(`error`,e=>{mi(`An error has occurred while reading the file for upload`),mi(String(e)),n.destroy(Error(`An error has occurred during file read for the artifact`))}),i.pipe(n),n})}var wF=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function TF(e){return wF(this,arguments,void 0,function*(e,t=6){K(`Creating Artifact archive with compressionLevel: ${t}`);let n=bF.default.create(`zip`,{highWaterMark:jA(),zlib:{level:t}});n.on(`error`,EF),n.on(`warning`,DF),n.on(`finish`,OF),n.on(`end`,kF);for(let t of e)if(t.sourcePath!==null){let e=t.sourcePath;t.stats.isSymbolicLink()&&(e=yield Qe(t.sourcePath)),n.file(e,{name:t.destinationPath})}else n.append(``,{name:t.destinationPath});let r=new SF(jA());return K(`Zip write high watermark value ${r.writableHighWaterMark}`),K(`Zip read high watermark value ${r.readableHighWaterMark}`),n.pipe(r),n.finalize(),r})}const EF=e=>{throw mi(`An error has occurred while creating the zip file for upload`),gi(e),Error(`An error has occurred during zip creation for the artifact`)},DF=e=>{e.code===`ENOENT`?(hi(`ENOENT warning during artifact zip creation. No such file or directory`),gi(e)):(hi(`A non-blocking warning has occurred during artifact zip creation: ${e.code}`),gi(e))},OF=()=>{K(`Zip stream for upload has finished.`)},kF=()=>{K(`Zip stream for upload has ended.`)},AF={".txt":`text/plain`,".html":`text/html`,".htm":`text/html`,".css":`text/css`,".csv":`text/csv`,".xml":`text/xml`,".md":`text/markdown`,".js":`application/javascript`,".mjs":`application/javascript`,".json":`application/json`,".png":`image/png`,".jpg":`image/jpeg`,".jpeg":`image/jpeg`,".gif":`image/gif`,".svg":`image/svg+xml`,".webp":`image/webp`,".ico":`image/x-icon`,".bmp":`image/bmp`,".tiff":`image/tiff`,".tif":`image/tiff`,".mp3":`audio/mpeg`,".wav":`audio/wav`,".ogg":`audio/ogg`,".flac":`audio/flac`,".mp4":`video/mp4`,".webm":`video/webm`,".avi":`video/x-msvideo`,".mov":`video/quicktime`,".pdf":`application/pdf`,".doc":`application/msword`,".docx":`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,".xls":`application/vnd.ms-excel`,".xlsx":`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,".ppt":`application/vnd.ms-powerpoint`,".pptx":`application/vnd.openxmlformats-officedocument.presentationml.presentation`,".zip":`application/zip`,".tar":`application/x-tar`,".gz":`application/gzip`,".rar":`application/vnd.rar`,".7z":`application/x-7z-compressed`,".wasm":`application/wasm`,".yaml":`application/x-yaml`,".yml":`application/x-yaml`,".woff":`font/woff`,".woff2":`font/woff2`,".ttf":`font/ttf`,".otf":`font/otf`,".eot":`application/vnd.ms-fontobject`};function jF(e){return AF[U.extname(e).toLowerCase()]||`application/octet-stream`}var MF=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function NF(e,t,n,r){return MF(this,void 0,void 0,function*(){let i=`${e}.zip`;if(r?.skipArchive){if(t.length===0)throw new lj([]);if(t.length>1)throw Error(`skipArchive option is only supported when uploading a single file`);if(!fe.existsSync(t[0]))throw new lj(t);i=U.basename(t[0]),e=i}ij(e),Ej(n);let a=[];if(!r?.skipArchive&&(a=Dj(t,n),a.length===0))throw new lj(a.flatMap(e=>e.sourcePath?[e.sourcePath]:[]));let o=jF(i),s=bj(),c=Tj(),l={workflowRunBackendId:s.workflowRunBackendId,workflowJobRunBackendId:s.workflowJobRunBackendId,name:e,mimeType:VA.create({value:o}),version:7},u=ej(r?.retentionDays);u&&(l.expiresAt=u);let d=yield c.CreateArtifact(l);if(!d.ok)throw new uj(`CreateArtifact: response from backend was not ok`);let f;f=r?.skipArchive?yield CF(t[0]):yield TF(a,r?.compressionLevel),gi(`Uploading artifact: ${i}`);let p=yield kj(d.signedUploadUrl,f,o),m={workflowRunBackendId:s.workflowRunBackendId,workflowJobRunBackendId:s.workflowJobRunBackendId,name:e,size:p.uploadSize?p.uploadSize.toString():`0`};p.sha256Hash&&(m.hash=VA.create({value:`sha256:${p.sha256Hash}`})),gi(`Finalizing artifact upload`);let h=yield c.FinalizeArtifact(m);if(!h.ok)throw new uj(`FinalizeArtifact: response from backend was not ok`);let g=BigInt(h.artifactId);return gi(`Artifact ${e} successfully finalized. Artifact ID ${g}`),{size:p.uploadSize,digest:p.sha256Hash,id:Number(g)}})}var PF=i(((e,t)=>{t.exports=n;function n(e){if(!(this instanceof n))return new n(e);this.value=e}n.prototype.get=function(e){for(var t=this.value,n=0;n{var r=PF(),i=t(`events`).EventEmitter;n.exports=a;function a(e){var t=a.saw(e,{}),n=e.call(t.handlers,t);return n!==void 0&&(t.handlers=n),t.record(),t.chain()}a.light=function(e){var t=a.saw(e,{}),n=e.call(t.handlers,t);return n!==void 0&&(t.handlers=n),t.chain()},a.saw=function(e,t){var n=new i;return n.handlers=t,n.actions=[],n.chain=function(){var e=r(n.handlers).map(function(t){if(this.isRoot)return t;var r=this.path;typeof t==`function`&&this.update(function(){return n.actions.push({path:r,args:[].slice.call(arguments)}),e})});return process.nextTick(function(){n.emit(`begin`),n.next()}),e},n.pop=function(){return n.actions.shift()},n.next=function(){var e=n.pop();if(!e)n.emit(`end`);else if(!e.trap){var t=n.handlers;e.path.forEach(function(e){t=t[e]}),t.apply(n.handlers,e.args)}},n.nest=function(t){var r=[].slice.call(arguments,1),i=!0;if(typeof t==`boolean`){var i=t;t=r.shift()}var o=a.saw(e,{}),s=e.call(o.handlers,o);s!==void 0&&(o.handlers=s),n.step!==void 0&&o.record(),t.apply(o.chain(),r),i!==!1&&o.on(`end`,n.next)},n.record=function(){o(n)},[`trap`,`down`,`jump`].forEach(function(e){n[e]=function(){throw Error(`To use the trap, down and jump features, please call record() first to start recording actions.`)}}),n};function o(e){e.step=0,e.pop=function(){return e.actions[e.step++]},e.trap=function(t,n){var r=Array.isArray(t)?t:[t];e.actions.push({path:r,step:e.step,cb:n,trap:!0})},e.down=function(t){var n=(Array.isArray(t)?t:[t]).join(`/`),r=e.actions.slice(e.step).map(function(t){return t.trap&&t.step<=e.step?!1:t.path.join(`/`)==n}).indexOf(!0);r>=0?e.step+=r:e.step=e.actions.length;var i=e.actions[e.step-1];i&&i.trap?(e.step=i.step,i.cb()):e.next()},e.jump=function(t){e.step=t,e.next()}}})),IF=i(((e,t)=>{t.exports=n;function n(e){if(!(this instanceof n))return new n(e);this.buffers=e||[],this.length=this.buffers.reduce(function(e,t){return e+t.length},0)}n.prototype.push=function(){for(var e=0;e=0?e:this.length-e,a=[].slice.call(arguments,2);(t===void 0||t>this.length-i)&&(t=this.length-i);for(var e=0;e0){var l=i-s;if(l+t0){var p=a.slice();p.unshift(d),p.push(f),r.splice.apply(r,[c,1].concat(p)),c+=p.length,a=[]}else r.splice(c,1,d,f),c+=2}else o.push(r[c].slice(l)),r[c]=r[c].slice(0,l),c++}for(a.length>0&&(r.splice.apply(r,[c,0].concat(a)),c+=a.length);o.lengththis.length&&(t=this.length);for(var r=0,i=0;i=t-e?Math.min(l+(t-e)-o,c):c;n[s].copy(a,o,l,u),o+=u-l}return a},n.prototype.pos=function(e){if(e<0||e>=this.length)throw Error(`oob`);for(var t=e,n=0,r=null;;){if(r=this.buffers[n],t=this.buffers[n].length;)if(r=0,n++,n>=this.buffers.length)return-1;if(this.buffers[n][r]==e[i]){if(i==0&&(a={i:n,j:r,pos:o}),i++,i==e.length)return a.pos}else i!=0&&(n=a.i,r=a.j,o=a.pos,i=0);r++,o++}},n.prototype.toBuffer=function(){return this.slice()},n.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)}})),LF=i(((e,t)=>{t.exports=function(e){function t(e,t){var r=n.store,i=e.split(`.`);i.slice(0,-1).forEach(function(e){r[e]===void 0&&(r[e]={}),r=r[e]});var a=i[i.length-1];return arguments.length==1?r[a]:r[a]=t}var n={get:function(e){return t(e)},set:function(e,n){return t(e,n)},store:e||{}};return n}})),RF=i(((e,n)=>{var r=FF(),i=t(`events`).EventEmitter,a=IF(),o=LF(),s=t(`stream`).Stream;e=n.exports=function(t,n){if(Buffer.isBuffer(t))return e.parse(t);var r=e.stream();return t&&t.pipe?t.pipe(r):t&&(t.on(n||`data`,function(e){r.write(e)}),t.on(`end`,function(){r.end()})),r},e.stream=function(t){if(t)return e.apply(null,arguments);var n=null;function c(e,t,r){n={bytes:e,skip:r,cb:function(e){n=null,t(e)}},u()}var l=null;function u(){if(!n){v&&(g=!0);return}if(typeof n==`function`)n();else{var e=l+n.bytes;if(m.length>=e){var t;l==null?(t=m.splice(0,e),n.skip||(t=t.slice())):(n.skip||(t=m.slice(l,e)),l=e),n.skip?n.cb():n.cb(t)}}}function d(e){function t(){g||e.next()}var r=f(function(e,n){return function(r){c(e,function(e){h.set(r,n(e)),t()})}});return r.tap=function(t){e.nest(t,h.store)},r.into=function(t,n){h.get(t)||h.set(t,{});var r=h;h=o(r.get(t)),e.nest(function(){n.apply(this,arguments),this.tap(function(){h=r})},h.store)},r.flush=function(){h.store={},t()},r.loop=function(n){var r=!1;e.nest(!1,function i(){this.vars=h.store,n.call(this,function(){r=!0,t()},h.store),this.tap(function(){r?e.next():i.call(this)}.bind(this))},h.store)},r.buffer=function(e,n){typeof n==`string`&&(n=h.get(n)),c(n,function(n){h.set(e,n),t()})},r.skip=function(e){typeof e==`string`&&(e=h.get(e)),c(e,function(){t()})},r.scan=function(e,r){if(typeof r==`string`)r=new Buffer(r);else if(!Buffer.isBuffer(r))throw Error(`search must be a Buffer or a string`);var i=0;n=function(){var a=m.indexOf(r,l+i),o=a-l-i;a===-1?o=Math.max(m.length-r.length-l-i,0):(n=null,l==null?(h.set(e,m.slice(0,i+o)),m.splice(0,i+o+r.length)):(h.set(e,m.slice(l,l+i+o)),l+=i+o+r.length),t(),u()),i+=o},u()},r.peek=function(t){l=0,e.nest(function(){t.call(this,h.store),this.tap(function(){l=null})})},r}var p=r.light(d);p.writable=!0;var m=a();p.write=function(e){m.push(e),u()};var h=o(),g=!1,v=!1;return p.end=function(){v=!0},p.pipe=s.prototype.pipe,Object.getOwnPropertyNames(i.prototype).forEach(function(e){p[e]=i.prototype[e]}),p},e.parse=function(e){var t=f(function(i,a){return function(o){if(n+i<=e.length){var s=e.slice(n,n+i);n+=i,r.set(o,a(s))}else r.set(o,null);return t}}),n=0,r=o();return t.vars=r.store,t.tap=function(e){return e.call(t,r.store),t},t.into=function(e,n){r.get(e)||r.set(e,{});var i=r;return r=o(i.get(e)),n.call(t,r.store),r=i,t},t.loop=function(e){for(var n=!1,i=function(){n=!0};n===!1;)e.call(t,i,r.store);return t},t.buffer=function(i,a){typeof a==`string`&&(a=r.get(a));var o=e.slice(n,Math.min(e.length,n+a));return n+=a,r.set(i,o),t},t.skip=function(e){return typeof e==`string`&&(e=r.get(e)),n+=e,t},t.scan=function(i,a){if(typeof a==`string`)a=new Buffer(a);else if(!Buffer.isBuffer(a))throw Error(`search must be a Buffer or a string`);r.set(i,null);for(var o=0;o+n<=e.length-a.length+1;o++){for(var s=0;s=e.length},t};function c(e){for(var t=0,n=0;n{var r=t(`stream`).Transform,i=t(`util`);function a(e,t){if(!(this instanceof a))return new a;r.call(this);var n=typeof e==`object`?e.pattern:e;this.pattern=Buffer.isBuffer(n)?n:Buffer.from(n),this.requiredLength=this.pattern.length,e.requiredExtraSize&&(this.requiredLength+=e.requiredExtraSize),this.data=new Buffer(``),this.bytesSoFar=0,this.matchFn=t}i.inherits(a,r),a.prototype.checkDataChunk=function(e){if(this.data.length>=this.requiredLength){var t=this.data.indexOf(this.pattern,+!!e);if(t>=0&&t+this.requiredLength>this.data.length){if(t>0){var n=this.data.slice(0,t);this.push(n),this.bytesSoFar+=t,this.data=this.data.slice(t)}return}if(t===-1){var r=this.data.length-this.requiredLength+1,n=this.data.slice(0,r);this.push(n),this.bytesSoFar+=r,this.data=this.data.slice(r);return}if(t>0){var n=this.data.slice(0,t);this.data=this.data.slice(t),this.push(n),this.bytesSoFar+=t}if(!this.matchFn||this.matchFn(this.data,this.bytesSoFar)){this.data=new Buffer(``);return}return!0}},a.prototype._transform=function(e,t,n){this.data=Buffer.concat([this.data,e]);for(var r=!0;this.checkDataChunk(!r);)r=!1;n()},a.prototype._flush=function(e){if(this.data.length>0)for(var t=!0;this.checkDataChunk(!t);)t=!1;this.data.length>0&&(this.push(this.data),this.data=null),e()},n.exports=a})),BF=i(((e,n)=>{var r=t(`stream`),i=t(`util`).inherits;function a(){if(!(this instanceof a))return new a;r.PassThrough.call(this),this.path=null,this.type=null,this.isDirectory=!1}i(a,r.PassThrough),a.prototype.autodrain=function(){return this.pipe(new r.Transform({transform:function(e,t,n){n()}}))},n.exports=a})),VF=i(((e,n)=>{var r=RF(),i=t(`stream`),a=t(`util`),o=t(`zlib`),s=zF(),c=BF();let l={STREAM_START:0,START:1,LOCAL_FILE_HEADER:2,LOCAL_FILE_HEADER_SUFFIX:3,FILE_DATA:4,FILE_DATA_END:5,DATA_DESCRIPTOR:6,CENTRAL_DIRECTORY_FILE_HEADER:7,CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:8,CDIR64_END:9,CDIR64_END_DATA_SECTOR:10,CDIR64_LOCATOR:11,CENTRAL_DIRECTORY_END:12,CENTRAL_DIRECTORY_END_COMMENT:13,TRAILING_JUNK:14,ERROR:99},u=4294967296;function d(e){if(!(this instanceof d))return new d(e);i.Transform.call(this),this.options=e||{},this.data=new Buffer(``),this.state=l.STREAM_START,this.skippedBytes=0,this.parsedEntity=null,this.outStreamInfo={}}a.inherits(d,i.Transform),d.prototype.processDataChunk=function(e){var t;switch(this.state){case l.STREAM_START:case l.START:t=4;break;case l.LOCAL_FILE_HEADER:t=26;break;case l.LOCAL_FILE_HEADER_SUFFIX:t=this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength;break;case l.DATA_DESCRIPTOR:t=12;break;case l.CENTRAL_DIRECTORY_FILE_HEADER:t=42;break;case l.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:t=this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength+this.parsedEntity.fileCommentLength;break;case l.CDIR64_END:t=52;break;case l.CDIR64_END_DATA_SECTOR:t=this.parsedEntity.centralDirectoryRecordSize-44;break;case l.CDIR64_LOCATOR:t=16;break;case l.CENTRAL_DIRECTORY_END:t=18;break;case l.CENTRAL_DIRECTORY_END_COMMENT:t=this.parsedEntity.commentLength;break;case l.FILE_DATA:return 0;case l.FILE_DATA_END:return 0;case l.TRAILING_JUNK:return this.options.debug&&console.log(`found`,e.length,`bytes of TRAILING_JUNK`),e.length;default:return e.length}if(e.length>>=8,(i&255)==80){a=o;break}return this.skippedBytes+=a,this.options.debug&&console.log(`Skipped`,this.skippedBytes,`bytes`),a}this.state=l.ERROR;var s=r?`Not a valid zip file`:`Invalid signature in zip file`;if(this.options.debug){var d=e.readUInt32LE(0),f;try{f=e.slice(0,4).toString()}catch{}console.log(`Unexpected signature in zip file: 0x`+d.toString(16),`"`+f+`", skipped`,this.skippedBytes,`bytes`)}return this.emit(`error`,Error(s)),e.length}return this.skippedBytes=0,t;case l.LOCAL_FILE_HEADER:return this.parsedEntity=this._readFile(e),this.state=l.LOCAL_FILE_HEADER_SUFFIX,t;case l.LOCAL_FILE_HEADER_SUFFIX:var p=new c,m=(this.parsedEntity.flags&2048)!=0;p.path=this._decodeString(e.slice(0,this.parsedEntity.fileNameLength),m);var h=e.slice(this.parsedEntity.fileNameLength,this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength),g=this._readExtraFields(h);if(g&&g.parsed&&(g.parsed.path&&!m&&(p.path=g.parsed.path),Number.isFinite(g.parsed.uncompressedSize)&&this.parsedEntity.uncompressedSize===u-1&&(this.parsedEntity.uncompressedSize=g.parsed.uncompressedSize),Number.isFinite(g.parsed.compressedSize)&&this.parsedEntity.compressedSize===u-1&&(this.parsedEntity.compressedSize=g.parsed.compressedSize)),this.parsedEntity.extra=g.parsed||{},this.options.debug){let e=Object.assign({},this.parsedEntity,{path:p.path,flags:`0x`+this.parsedEntity.flags.toString(16),extraFields:g&&g.debug});console.log(`decoded LOCAL_FILE_HEADER:`,JSON.stringify(e,null,2))}return this._prepareOutStream(this.parsedEntity,p),this.emit(`entry`,p),this.state=l.FILE_DATA,t;case l.CENTRAL_DIRECTORY_FILE_HEADER:return this.parsedEntity=this._readCentralDirectoryEntry(e),this.state=l.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX,t;case l.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:var m=(this.parsedEntity.flags&2048)!=0,v=this._decodeString(e.slice(0,this.parsedEntity.fileNameLength),m),h=e.slice(this.parsedEntity.fileNameLength,this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength),g=this._readExtraFields(h);g&&g.parsed&&g.parsed.path&&!m&&(v=g.parsed.path),this.parsedEntity.extra=g.parsed;var y=(this.parsedEntity.versionMadeBy&65280)>>8==3,b,x;if(y&&(b=this.parsedEntity.externalFileAttributes>>>16,x=(b>>>12&10)==10),this.options.debug){let e=Object.assign({},this.parsedEntity,{path:v,flags:`0x`+this.parsedEntity.flags.toString(16),unixAttrs:b&&`0`+b.toString(8),isSymlink:x,extraFields:g.debug});console.log(`decoded CENTRAL_DIRECTORY_FILE_HEADER:`,JSON.stringify(e,null,2))}return this.state=l.START,t;case l.CDIR64_END:return this.parsedEntity=this._readEndOfCentralDirectory64(e),this.options.debug&&console.log(`decoded CDIR64_END_RECORD:`,this.parsedEntity),this.state=l.CDIR64_END_DATA_SECTOR,t;case l.CDIR64_END_DATA_SECTOR:return this.state=l.START,t;case l.CDIR64_LOCATOR:return this.state=l.START,t;case l.CENTRAL_DIRECTORY_END:return this.parsedEntity=this._readEndOfCentralDirectory(e),this.options.debug&&console.log(`decoded CENTRAL_DIRECTORY_END:`,this.parsedEntity),this.state=l.CENTRAL_DIRECTORY_END_COMMENT,t;case l.CENTRAL_DIRECTORY_END_COMMENT:return this.options.debug&&console.log(`decoded CENTRAL_DIRECTORY_END_COMMENT:`,e.slice(0,t).toString()),this.state=l.TRAILING_JUNK,t;case l.ERROR:return e.length;default:return console.log(`didn't handle state #`,this.state,`discarding`),e.length}},d.prototype._prepareOutStream=function(e,t){var n=this,r=e.uncompressedSize===0&&/[\/\\]$/.test(t.path);t.path=t.path.replace(/(?<=^|[/\\]+)[.][.]+(?=[/\\]+|$)/g,`.`),t.type=r?`Directory`:`File`,t.isDirectory=r;var a=!(e.flags&8);a&&(t.size=e.uncompressedSize);var d=e.versionsNeededToExtract<=45;if(this.outStreamInfo={stream:null,limit:a?e.compressedSize:-1,written:0},a)this.outStreamInfo.stream=new i.PassThrough;else{var f=new Buffer(4);f.writeUInt32LE(134695760,0);var p=e.extra.zip64Mode,m=new s({pattern:f,requiredExtraSize:p?20:12},function(e,t){var r=n._readDataDescriptor(e,p),i=r.compressedSize===t;if(!p&&!i&&t>=u)for(var a=t-u;a>=0&&(i=r.compressedSize===a,!i);)a-=u;if(i){n.state=l.FILE_DATA_END;var o=p?24:16;return n.data.length>0?n.data=Buffer.concat([e.slice(o),n.data]):n.data=e.slice(o),!0}});this.outStreamInfo.stream=m}var h=e.flags&1||e.flags&64;if(h||!d){var g=h?`Encrypted files are not supported!`:`Zip version `+Math.floor(e.versionsNeededToExtract/10)+`.`+e.versionsNeededToExtract%10+` is not supported`;t.skip=!0,setImmediate(()=>{n.emit(`error`,Error(g))}),this.outStreamInfo.stream.pipe(new c().autodrain());return}if(e.compressionMethod>0){var v=o.createInflateRaw();v.on(`error`,function(e){n.state=l.ERROR,n.emit(`error`,e)}),this.outStreamInfo.stream.pipe(v).pipe(t)}else this.outStreamInfo.stream.pipe(t);this._drainAllEntries&&t.autodrain()},d.prototype._readFile=function(e){return r.parse(e).word16lu(`versionsNeededToExtract`).word16lu(`flags`).word16lu(`compressionMethod`).word16lu(`lastModifiedTime`).word16lu(`lastModifiedDate`).word32lu(`crc32`).word32lu(`compressedSize`).word32lu(`uncompressedSize`).word16lu(`fileNameLength`).word16lu(`extraFieldLength`).vars},d.prototype._readExtraFields=function(e){var t={},n={parsed:t};this.options.debug&&(n.debug=[]);for(var i=0;i=l+4&&c&1&&(t.mtime=new Date(e.readUInt32LE(i+l)*1e3),l+=4),a.extraSize>=l+4&&c&2&&(t.atime=new Date(e.readUInt32LE(i+l)*1e3),l+=4),a.extraSize>=l+4&&c&4&&(t.ctime=new Date(e.readUInt32LE(i+l)*1e3));break;case 28789:if(o=`Info-ZIP Unicode Path Extra Field`,e.readUInt8(i)===1){var l=1;e.readUInt32LE(i+l),l+=4,t.path=e.slice(i+l).toString()}break;case 13:case 22613:o=a.extraId===13?`PKWARE Unix`:`Info-ZIP UNIX (type 1)`;var l=0;if(a.extraSize>=8){var u=new Date(e.readUInt32LE(i+l)*1e3);l+=4;var d=new Date(e.readUInt32LE(i+l)*1e3);if(l+=4,t.atime=u,t.mtime=d,a.extraSize>=12){var f=e.readUInt16LE(i+l);l+=2;var p=e.readUInt16LE(i+l);l+=2,t.uid=f,t.gid=p}}break;case 30805:o=`Info-ZIP UNIX (type 2)`;var l=0;if(a.extraSize>=4){var f=e.readUInt16LE(i+l);l+=2;var p=e.readUInt16LE(i+l);l+=2,t.uid=f,t.gid=p}break;case 30837:o=`Info-ZIP New Unix`;var l=0,m=e.readUInt8(i);if(l+=1,m===1){var h=e.readUInt8(i+l);l+=1,h<=6&&(t.uid=e.readUIntLE(i+l,h)),l+=h;var g=e.readUInt8(i+l);l+=1,g<=6&&(t.gid=e.readUIntLE(i+l,g))}break;case 30062:o=`ASi Unix`;var l=0;if(a.extraSize>=14){e.readUInt32LE(i+l),l+=4;var v=e.readUInt16LE(i+l);l+=2,e.readUInt32LE(i+l),l+=4;var f=e.readUInt16LE(i+l);l+=2;var p=e.readUInt16LE(i+l);if(l+=2,t.mode=v,t.uid=f,t.gid=p,a.extraSize>14){var y=i+l,b=i+a.extraSize-14;t.symlink=this._decodeString(e.slice(y,b))}}break}this.options.debug&&n.debug.push({extraId:`0x`+a.extraId.toString(16),description:o,data:e.slice(i,i+a.extraSize).inspect()}),i+=a.extraSize}return n},d.prototype._readDataDescriptor=function(e,t){if(t){var n=r.parse(e).word32lu(`dataDescriptorSignature`).word32lu(`crc32`).word64lu(`compressedSize`).word64lu(`uncompressedSize`).vars;return n}var n=r.parse(e).word32lu(`dataDescriptorSignature`).word32lu(`crc32`).word32lu(`compressedSize`).word32lu(`uncompressedSize`).vars;return n},d.prototype._readCentralDirectoryEntry=function(e){return r.parse(e).word16lu(`versionMadeBy`).word16lu(`versionsNeededToExtract`).word16lu(`flags`).word16lu(`compressionMethod`).word16lu(`lastModifiedTime`).word16lu(`lastModifiedDate`).word32lu(`crc32`).word32lu(`compressedSize`).word32lu(`uncompressedSize`).word16lu(`fileNameLength`).word16lu(`extraFieldLength`).word16lu(`fileCommentLength`).word16lu(`diskNumber`).word16lu(`internalFileAttributes`).word32lu(`externalFileAttributes`).word32lu(`offsetToLocalFileHeader`).vars},d.prototype._readEndOfCentralDirectory64=function(e){return r.parse(e).word64lu(`centralDirectoryRecordSize`).word16lu(`versionMadeBy`).word16lu(`versionsNeededToExtract`).word32lu(`diskNumber`).word32lu(`diskNumberWithCentralDirectoryStart`).word64lu(`centralDirectoryEntries`).word64lu(`totalCentralDirectoryEntries`).word64lu(`sizeOfCentralDirectory`).word64lu(`offsetToStartOfCentralDirectory`).vars},d.prototype._readEndOfCentralDirectory=function(e){return r.parse(e).word16lu(`diskNumber`).word16lu(`diskStart`).word16lu(`centralDirectoryEntries`).word16lu(`totalCentralDirectoryEntries`).word32lu(`sizeOfCentralDirectory`).word32lu(`offsetToStartOfCentralDirectory`).word16lu(`commentLength`).vars},d.prototype._decodeString=function(e,t){if(t)return e.toString(`utf8`);if(this.options.decodeString)return this.options.decodeString(e);let n=``;for(var r=0;r?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ `[e[r]];return n},d.prototype._parseOrOutput=function(e,t){for(var n;(n=this.processDataChunk(this.data))>0&&(this.data=this.data.slice(n),this.data.length!==0););if(this.state===l.FILE_DATA){if(this.outStreamInfo.limit>=0){var r=this.outStreamInfo.limit-this.outStreamInfo.written,i;r{if(this.state===l.FILE_DATA_END)return this.state=l.START,a.end(t);t()})}return}t()},d.prototype.drainAll=function(){this._drainAllEntries=!0},d.prototype._transform=function(e,t,n){var r=this;r.data.length>0?r.data=Buffer.concat([r.data,e]):r.data=e;var i=r.data.length,a=function(){if(r.data.length>0&&r.data.length0){t._parseOrOutput(`buffer`,function(){if(t.data.length>0)return setImmediate(function(){t._flush(e)});e()});return}if(t.state===l.FILE_DATA)return e(Error(`Stream finished in an invalid state, uncompression failed`));setImmediate(e)},n.exports=d})),HF=i(((e,n)=>{var r=t(`stream`).Transform,i=t(`util`),a=VF();function o(e){if(!(this instanceof o))return new o(e);r.call(this,{readableObjectMode:!0}),this.opts=e||{},this.unzipStream=new a(this.opts);var t=this;this.unzipStream.on(`entry`,function(e){t.push(e)}),this.unzipStream.on(`error`,function(e){t.emit(`error`,e)})}i.inherits(o,r),o.prototype._transform=function(e,t,n){this.unzipStream.write(e,t,n)},o.prototype._flush=function(e){var t=this;this.unzipStream.end(function(){process.nextTick(function(){t.emit(`close`)}),e()})},o.prototype.on=function(e,t){return e===`entry`?r.prototype.on.call(this,`data`,t):r.prototype.on.call(this,e,t)},o.prototype.drainAll=function(){return this.unzipStream.drainAll(),this.pipe(new r({objectMode:!0,transform:function(e,t,n){n()}}))},n.exports=o})),UF=i(((e,n)=>{var r=t(`path`),i=t(`fs`),a=511;n.exports=o.mkdirp=o.mkdirP=o;function o(e,t,n,s){typeof t==`function`?(n=t,t={}):(!t||typeof t!=`object`)&&(t={mode:t});var c=t.mode,l=t.fs||i;c===void 0&&(c=a),s||=null;var u=n||function(){};e=r.resolve(e),l.mkdir(e,c,function(n){if(!n)return s||=e,u(null,s);switch(n.code){case`ENOENT`:if(r.dirname(e)===e)return u(n);o(r.dirname(e),t,function(n,r){n?u(n,r):o(e,t,u,r)});break;default:l.stat(e,function(e,t){e||!t.isDirectory()?u(n,s):u(null,s)});break}})}o.sync=function e(t,n,o){(!n||typeof n!=`object`)&&(n={mode:n});var s=n.mode,c=n.fs||i;s===void 0&&(s=a),o||=null,t=r.resolve(t);try{c.mkdirSync(t,s),o||=t}catch(i){switch(i.code){case`ENOENT`:o=e(r.dirname(t),n,o),e(t,n,o);break;default:var l;try{l=c.statSync(t)}catch{throw i}if(!l.isDirectory())throw i;break}}return o}})),WF=i(((e,n)=>{var r=t(`fs`),i=t(`path`),a=t(`util`),o=UF(),s=t(`stream`).Transform,c=VF();function l(e){if(!(this instanceof l))return new l(e);s.call(this),this.opts=e||{},this.unzipStream=new c(this.opts),this.unfinishedEntries=0,this.afterFlushWait=!1,this.createdDirectories={};var t=this;this.unzipStream.on(`entry`,this._processEntry.bind(this)),this.unzipStream.on(`error`,function(e){t.emit(`error`,e)})}a.inherits(l,s),l.prototype._transform=function(e,t,n){this.unzipStream.write(e,t,n)},l.prototype._flush=function(e){var t=this,n=function(){process.nextTick(function(){t.emit(`close`)}),e()};this.unzipStream.end(function(){if(t.unfinishedEntries>0)return t.afterFlushWait=!0,t.on(`await-finished`,n);n()})},l.prototype._processEntry=function(e){var t=this,n=i.join(this.opts.path,e.path),a=e.isDirectory?n:i.dirname(n);this.unfinishedEntries++;var s=function(){var i=r.createWriteStream(n);i.on(`close`,function(){t.unfinishedEntries--,t._notifyAwaiter()}),i.on(`error`,function(e){t.emit(`error`,e)}),e.pipe(i)};if(this.createdDirectories[a]||a===`.`)return s();o(a,function(n){if(n)return t.emit(`error`,n);if(t.createdDirectories[a]=!0,e.isDirectory){t.unfinishedEntries--,t._notifyAwaiter();return}s()})},l.prototype._notifyAwaiter=function(){this.afterFlushWait&&this.unfinishedEntries===0&&(this.emit(`await-finished`),this.afterFlushWait=!1)},n.exports=l})),GF=n(i((e=>{e.Parse=HF(),e.Extract=WF()}))(),1),KF=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const qF=e=>{let t=new URL(e);return t.search=``,t.toString()};function JF(e){return KF(this,void 0,void 0,function*(){try{return yield Ze.access(e),!0}catch(e){if(e.code===`ENOENT`)return!1;throw e}})}function YF(e,t,n){return KF(this,void 0,void 0,function*(){let r=0;for(;r<5;)try{return yield XF(e,t,{skipDecompress:n})}catch(e){r++,K(`Failed to download artifact after ${r} retries due to ${e.message}. Retrying in 5 seconds...`),yield new Promise(e=>setTimeout(e,5e3))}throw Error(`Artifact download failed after ${r} retries.`)})}function XF(e,t){return KF(this,arguments,void 0,function*(e,t,n={}){let{timeout:r=30*1e3,skipDecompress:i=!1}=n,a=yield new pr(cj()).get(e);if(a.message.statusCode!==200)throw Error(`Unexpected HTTP response from blob storage: ${a.message.statusCode} ${a.message.statusMessage}`);let o=a.message.headers[`content-type`]||``,s=o.split(`;`,1)[0].trim().toLowerCase(),c=new URL(e).pathname.toLowerCase().endsWith(`.zip`),l=s===`application/zip`||s===`application/x-zip-compressed`||s===`application/zip-compressed`||c,u=a.message.headers[`content-disposition`]||``,d=`artifact`,f=u.match(/filename\*\s*=\s*UTF-8''([^;\r\n]*)/i),p=u.match(/(?{let o=setTimeout(()=>{let e=Error(`Blob storage chunk did not respond in ${r}ms`);a.message.destroy(e),n(e)},r),s=e=>{K(`response.message: Artifact download failed: ${e.message}`),clearTimeout(o),n(e)},c=de.createHash(`sha256`).setEncoding(`hex`),u=new Ue.PassThrough().on(`data`,()=>{o.refresh()}).on(`error`,s);a.message.pipe(u),u.pipe(c);let f=()=>{clearTimeout(o),c&&(c.end(),h=c.read(),gi(`SHA256 digest of downloaded artifact is ${h}`)),e({sha256Digest:`sha256:${h}`})};if(l&&!i)u.pipe(GF.Extract({path:t})).on(`close`,f).on(`error`,s);else{let e=U.join(t,d),n=fe.createWriteStream(e);gi(`Downloading raw file (non-zip) to: ${e}`),u.pipe(n).on(`close`,f).on(`error`,s)}})})}function ZF(e,t,n,r,i){return KF(this,void 0,void 0,function*(){let a=yield $F(i?.path),o=Yo(r),s=!1;gi(`Downloading artifact '${e}' from '${t}/${n}'`);let{headers:c,status:l}=yield o.rest.actions.downloadArtifact({owner:t,repo:n,artifact_id:e,archive_format:`zip`,request:{redirect:`manual`}});if(l!==302)throw Error(`Unable to download artifact. Unexpected status: ${l}`);let{location:u}=c;if(!u)throw Error(`Unable to redirect to artifact download url`);gi(`Redirecting to blob download url: ${qF(u)}`);try{gi(`Starting download of artifact to: ${a}`);let e=yield YF(u,a,i?.skipDecompress);gi(`Artifact download completed successfully.`),i?.expectedHash&&i?.expectedHash!==e.sha256Digest&&(s=!0,K(`Computed digest: ${e.sha256Digest}`),K(`Expected digest: ${i.expectedHash}`))}catch(e){throw Error(`Unable to download and extract artifact: ${e.message}`)}return{downloadPath:a,digestMismatch:s}})}function QF(e,t){return KF(this,void 0,void 0,function*(){let n=yield $F(t?.path),r=Tj(),i=!1,{workflowRunBackendId:a,workflowJobRunBackendId:o}=bj(),s={workflowRunBackendId:a,workflowJobRunBackendId:o,idFilter:BA.create({value:e.toString()})},{artifacts:c}=yield r.ListArtifacts(s);if(c.length===0)throw new dj(`No artifacts found for ID: ${e}\nAre you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`);c.length>1&&hi(`Multiple artifacts found, defaulting to first.`);let l={workflowRunBackendId:c[0].workflowRunBackendId,workflowJobRunBackendId:c[0].workflowJobRunBackendId,name:c[0].name},{signedUrl:u}=yield r.GetSignedArtifactURL(l);gi(`Redirecting to blob download url: ${qF(u)}`);try{gi(`Starting download of artifact to: ${n}`);let e=yield YF(u,n,t?.skipDecompress);gi(`Artifact download completed successfully.`),t?.expectedHash&&t?.expectedHash!==e.sha256Digest&&(i=!0,K(`Computed digest: ${e.sha256Digest}`),K(`Expected digest: ${t.expectedHash}`))}catch(e){throw Error(`Unable to download and extract artifact: ${e.message}`)}return{downloadPath:n,digestMismatch:i}})}function $F(){return KF(this,arguments,void 0,function*(e=FA()){return(yield JF(e))?K(`Artifact destination folder already exists: ${e}`):(K(`Artifact destination folder does not exist, creating: ${e}`),yield Ze.mkdir(e,{recursive:!0})),e})}const eI=[400,401,403,404,422];function tI(e,t=5,n=eI){if(t<=0)return[{enabled:!1},e.request];let r={enabled:!0};n.length>0&&(r.doNotRetry=n);let i=Object.assign(Object.assign({},e.request),{retries:t});return K(`GitHub client configured with: (retries: ${i.retries}, retry-exempt-status-code: ${r.doNotRetry??`octokit default: [400, 401, 403, 404, 422]`})`),[r,i]}function nI(e){e.hook.wrap(`request`,(t,n)=>{e.log.debug(`request`,n);let r=Date.now(),i=e.request.endpoint.parse(n),a=i.url.replace(n.baseUrl,``);return t(n).then(t=>{let n=t.headers[`x-github-request-id`];return e.log.info(`${i.method} ${a} - ${t.status} with id ${n} in ${Date.now()-r}ms`),t}).catch(t=>{let n=t.response?.headers[`x-github-request-id`]||`UNKNOWN`;throw e.log.error(`${i.method} ${a} - ${t.status} with id ${n} in ${Date.now()-r}ms`),t})})}nI.VERSION=`6.0.0`;var rI=n(i(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.Bottleneck=r()})(e,(function(){var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function t(e){return e&&e.default||e}var n={load:function(e,t,n={}){var r,i;for(r in t)i=t[r],n[r]=e[r]??i;return n},overwrite:function(e,t,n={}){var r,i;for(r in e)i=e[r],t[r]!==void 0&&(n[r]=i);return n}},r=class{constructor(e,t){this.incr=e,this.decr=t,this._first=null,this._last=null,this.length=0}push(e){var t;this.length++,typeof this.incr==`function`&&this.incr(),t={value:e,prev:this._last,next:null},this._last==null?this._first=this._last=t:(this._last.next=t,this._last=t)}shift(){var e;if(this._first!=null)return this.length--,typeof this.decr==`function`&&this.decr(),e=this._first.value,(this._first=this._first.next)==null?this._last=null:this._first.prev=null,e}first(){if(this._first!=null)return this._first.value}getArray(){for(var e=this._first,t,n=[];e!=null;)n.push((t=e,e=e.next,t.value));return n}forEachShift(e){for(var t=this.shift();t!=null;)e(t),t=this.shift()}debug(){for(var e=this._first,t,n=[];e!=null;)n.push((t=e,e=e.next,{value:t.value,prev:t.prev?.value,next:t.next?.value}));return n}},i=class{constructor(e){if(this.instance=e,this._events={},this.instance.on!=null||this.instance.once!=null||this.instance.removeAllListeners!=null)throw Error(`An Emitter already exists for this object`);this.instance.on=(e,t)=>this._addListener(e,`many`,t),this.instance.once=(e,t)=>this._addListener(e,`once`,t),this.instance.removeAllListeners=(e=null)=>e==null?this._events={}:delete this._events[e]}_addListener(e,t,n){var r;return(r=this._events)[e]??(r[e]=[]),this._events[e].push({cb:n,status:t}),this.instance}listenerCount(e){return this._events[e]==null?0:this._events[e].length}async trigger(e,...t){var n,r;try{return e!==`debug`&&this.trigger(`debug`,`Event triggered: ${e}`,t),this._events[e]==null?void 0:(this._events[e]=this._events[e].filter(function(e){return e.status!==`none`}),r=this._events[e].map(async e=>{var n,r;if(e.status!==`none`){e.status===`once`&&(e.status=`none`);try{return r=typeof e.cb==`function`?e.cb(...t):void 0,typeof r?.then==`function`?await r:r}catch(e){return n=e,this.trigger(`error`,n),null}}}),(await Promise.all(r)).find(function(e){return e!=null}))}catch(e){return n=e,this.trigger(`error`,n),null}}},a=r,o=i,s=class{constructor(e){this.Events=new o(this),this._length=0,this._lists=(function(){var t,n,r=[];for(t=1,n=e;1<=n?t<=n:t>=n;1<=n?++t:--t)r.push(new a((()=>this.incr()),(()=>this.decr())));return r}).call(this)}incr(){if(this._length++===0)return this.Events.trigger(`leftzero`)}decr(){if(--this._length===0)return this.Events.trigger(`zero`)}push(e){return this._lists[e.options.priority].push(e)}queued(e){return e==null?this._length:this._lists[e].length}shiftAll(e){return this._lists.forEach(function(t){return t.forEachShift(e)})}getFirst(e=this._lists){var t,n,r;for(t=0,n=e.length;t0)return r;return[]}shiftLastFrom(e){return this.getFirst(this._lists.slice(e).reverse()).shift()}},c=class extends Error{},l,u,d,f=10,p;u=5,p=n,l=c,d=class{constructor(e,t,n,r,i,a,o,s){this.task=e,this.args=t,this.rejectOnDrop=i,this.Events=a,this._states=o,this.Promise=s,this.options=p.load(n,r),this.options.priority=this._sanitizePriority(this.options.priority),this.options.id===r.id&&(this.options.id=`${this.options.id}-${this._randomIndex()}`),this.promise=new this.Promise((e,t)=>{this._resolve=e,this._reject=t}),this.retryCount=0}_sanitizePriority(e){var t=~~e===e?e:u;return t<0?0:t>f-1?f-1:t}_randomIndex(){return Math.random().toString(36).slice(2)}doDrop({error:e,message:t=`This job has been dropped by Bottleneck`}={}){return this._states.remove(this.options.id)?(this.rejectOnDrop&&this._reject(e??new l(t)),this.Events.trigger(`dropped`,{args:this.args,options:this.options,task:this.task,promise:this.promise}),!0):!1}_assertStatus(e){var t=this._states.jobStatus(this.options.id);if(!(t===e||e===`DONE`&&t===null))throw new l(`Invalid job status ${t}, expected ${e}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`)}doReceive(){return this._states.start(this.options.id),this.Events.trigger(`received`,{args:this.args,options:this.options})}doQueue(e,t){return this._assertStatus(`RECEIVED`),this._states.next(this.options.id),this.Events.trigger(`queued`,{args:this.args,options:this.options,reachedHWM:e,blocked:t})}doRun(){return this.retryCount===0?(this._assertStatus(`QUEUED`),this._states.next(this.options.id)):this._assertStatus(`EXECUTING`),this.Events.trigger(`scheduled`,{args:this.args,options:this.options})}async doExecute(e,t,n,r){var i,a,o;this.retryCount===0?(this._assertStatus(`RUNNING`),this._states.next(this.options.id)):this._assertStatus(`EXECUTING`),a={args:this.args,options:this.options,retryCount:this.retryCount},this.Events.trigger(`executing`,a);try{if(o=await(e==null?this.task(...this.args):e.schedule(this.options,this.task,...this.args)),t())return this.doDone(a),await r(this.options,a),this._assertStatus(`DONE`),this._resolve(o)}catch(e){return i=e,this._onFailure(i,a,t,n,r)}}doExpire(e,t,n){var r,i;return this._states.jobStatus(this.options.id===`RUNNING`)&&this._states.next(this.options.id),this._assertStatus(`EXECUTING`),i={args:this.args,options:this.options,retryCount:this.retryCount},r=new l(`This job timed out after ${this.options.expiration} ms.`),this._onFailure(r,i,e,t,n)}async _onFailure(e,t,n,r,i){var a,o;if(n())return a=await this.Events.trigger(`failed`,e,t),a==null?(this.doDone(t),await i(this.options,t),this._assertStatus(`DONE`),this._reject(e)):(o=~~a,this.Events.trigger(`retry`,`Retrying ${this.options.id} after ${o} ms`,t),this.retryCount++,r(o))}doDone(e){return this._assertStatus(`EXECUTING`),this._states.next(this.options.id),this.Events.trigger(`done`,e)}};var m=d,h,g,v=n;h=c,g=class{constructor(e,t,n){this.instance=e,this.storeOptions=t,this.clientId=this.instance._randomIndex(),v.load(n,n,this),this._nextRequest=this._lastReservoirRefresh=this._lastReservoirIncrease=Date.now(),this._running=0,this._done=0,this._unblockTime=0,this.ready=this.Promise.resolve(),this.clients={},this._startHeartbeat()}_startHeartbeat(){var e;return this.heartbeat==null&&(this.storeOptions.reservoirRefreshInterval!=null&&this.storeOptions.reservoirRefreshAmount!=null||this.storeOptions.reservoirIncreaseInterval!=null&&this.storeOptions.reservoirIncreaseAmount!=null)?typeof(e=this.heartbeat=setInterval(()=>{var e,t,n,r=Date.now(),i;if(this.storeOptions.reservoirRefreshInterval!=null&&r>=this._lastReservoirRefresh+this.storeOptions.reservoirRefreshInterval&&(this._lastReservoirRefresh=r,this.storeOptions.reservoir=this.storeOptions.reservoirRefreshAmount,this.instance._drainAll(this.computeCapacity())),this.storeOptions.reservoirIncreaseInterval!=null&&r>=this._lastReservoirIncrease+this.storeOptions.reservoirIncreaseInterval&&({reservoirIncreaseAmount:e,reservoirIncreaseMaximum:n,reservoir:i}=this.storeOptions,this._lastReservoirIncrease=r,t=n==null?e:Math.min(e,n-i),t>0))return this.storeOptions.reservoir+=t,this.instance._drainAll(this.computeCapacity())},this.heartbeatInterval)).unref==`function`?e.unref():void 0:clearInterval(this.heartbeat)}async __publish__(e){return await this.yieldLoop(),this.instance.Events.trigger(`message`,e.toString())}async __disconnect__(e){return await this.yieldLoop(),clearInterval(this.heartbeat),this.Promise.resolve()}yieldLoop(e=0){return new this.Promise(function(t,n){return setTimeout(t,e)})}computePenalty(){return this.storeOptions.penalty??(15*this.storeOptions.minTime||5e3)}async __updateSettings__(e){return await this.yieldLoop(),v.overwrite(e,e,this.storeOptions),this._startHeartbeat(),this.instance._drainAll(this.computeCapacity()),!0}async __running__(){return await this.yieldLoop(),this._running}async __queued__(){return await this.yieldLoop(),this.instance.queued()}async __done__(){return await this.yieldLoop(),this._done}async __groupCheck__(e){return await this.yieldLoop(),this._nextRequest+this.timeout=e}check(e,t){return this.conditionsCheck(e)&&this._nextRequest-t<=0}async __check__(e){var t;return await this.yieldLoop(),t=Date.now(),this.check(e,t)}async __register__(e,t,n){var r,i;return await this.yieldLoop(),r=Date.now(),this.conditionsCheck(t)?(this._running+=t,this.storeOptions.reservoir!=null&&(this.storeOptions.reservoir-=t),i=Math.max(this._nextRequest-r,0),this._nextRequest=r+i+this.storeOptions.minTime,{success:!0,wait:i,reservoir:this.storeOptions.reservoir}):{success:!1}}strategyIsBlock(){return this.storeOptions.strategy===3}async __submit__(e,t){var n,r,i;if(await this.yieldLoop(),this.storeOptions.maxConcurrent!=null&&t>this.storeOptions.maxConcurrent)throw new h(`Impossible to add a job having a weight of ${t} to a limiter having a maxConcurrent setting of ${this.storeOptions.maxConcurrent}`);return r=Date.now(),i=this.storeOptions.highWater!=null&&e===this.storeOptions.highWater&&!this.check(t,r),n=this.strategyIsBlock()&&(i||this.isBlocked(r)),n&&(this._unblockTime=r+this.computePenalty(),this._nextRequest=this._unblockTime+this.storeOptions.minTime,this.instance._dropAllQueued()),{reachedHWM:i,blocked:n,strategy:this.storeOptions.strategy}}async __free__(e,t){return await this.yieldLoop(),this._running-=t,this._done+=t,this.instance._drainAll(this.computeCapacity()),{running:this._running}}};var y=g,b=c,x=class{constructor(e){this.status=e,this._jobs={},this.counts=this.status.map(function(){return 0})}next(e){var t=this._jobs[e],n=t+1;if(t!=null&&n(e[this.status[n]]=t,e)),{})}},S=r,C=class{constructor(e,t){this.schedule=this.schedule.bind(this),this.name=e,this.Promise=t,this._running=0,this._queue=new S}isEmpty(){return this._queue.length===0}async _tryToRun(){var e,t,n,r,i,a,o;if(this._running<1&&this._queue.length>0)return this._running++,{task:o,args:e,resolve:i,reject:r}=this._queue.shift(),t=await(async function(){try{return a=await o(...e),function(){return i(a)}}catch(e){return n=e,function(){return r(n)}}})(),this._running--,this._tryToRun(),t()}schedule(e,...t){var n,r,i=r=null;return n=new this.Promise(function(e,t){return i=e,r=t}),this._queue.push({task:e,args:t,resolve:i,reject:r}),this._tryToRun(),n}},w=`2.19.5`,T=Object.freeze({version:w,default:{version:w}}),E=()=>console.log(`You must import the full version of Bottleneck in order to use this feature.`),D=()=>console.log(`You must import the full version of Bottleneck in order to use this feature.`),O=()=>console.log(`You must import the full version of Bottleneck in order to use this feature.`),k,A,j,M,N,P=n;k=i,M=E,j=D,N=O,A=(function(){class e{constructor(e={}){this.deleteKey=this.deleteKey.bind(this),this.limiterOptions=e,P.load(this.limiterOptions,this.defaults,this),this.Events=new k(this),this.instances={},this.Bottleneck=de,this._startAutoCleanup(),this.sharedConnection=this.connection!=null,this.connection??(this.limiterOptions.datastore===`redis`?this.connection=new M(Object.assign({},this.limiterOptions,{Events:this.Events})):this.limiterOptions.datastore===`ioredis`&&(this.connection=new j(Object.assign({},this.limiterOptions,{Events:this.Events}))))}key(e=``){return this.instances[e]??(()=>{var t=this.instances[e]=new this.Bottleneck(Object.assign(this.limiterOptions,{id:`${this.id}-${e}`,timeout:this.timeout,connection:this.connection}));return this.Events.trigger(`created`,t,e),t})()}async deleteKey(e=``){var t,n=this.instances[e];return this.connection&&(t=await this.connection.__runCommand__([`del`,...N.allKeys(`${this.id}-${e}`)])),n!=null&&(delete this.instances[e],await n.disconnect()),n!=null||t>0}limiters(){var e,t=this.instances,n=[],r;for(e in t)r=t[e],n.push({key:e,limiter:r});return n}keys(){return Object.keys(this.instances)}async clusterKeys(){var e,t,n,r,i,a,o,s,c;if(this.connection==null)return this.Promise.resolve(this.keys());for(a=[],e=null,c=`b_${this.id}-`.length,t=9;e!==0;)for([s,n]=await this.connection.__runCommand__([`scan`,e??0,`match`,`b_${this.id}-*_settings`,`count`,1e4]),e=~~s,r=0,o=n.length;r{var e,t,n,r,i=Date.now(),a;for(t in n=this.instances,r=[],n){a=n[t];try{await a._store.__groupCheck__(i)?r.push(this.deleteKey(t)):r.push(void 0)}catch(t){e=t,r.push(a.Events.trigger(`error`,e))}}return r},this.timeout/2)).unref==`function`?e.unref():void 0}updateSettings(e={}){if(P.overwrite(e,this.defaults,this),P.overwrite(e,e,this.limiterOptions),e.timeout!=null)return this._startAutoCleanup()}disconnect(e=!0){if(!this.sharedConnection)return this.connection?.disconnect(e)}}return e.prototype.defaults={timeout:1e3*60*5,connection:null,Promise,id:`group-key`},e}).call(e);var F=A,I,L,R=n;L=i,I=(function(){class e{constructor(e={}){this.options=e,R.load(this.options,this.defaults,this),this.Events=new L(this),this._arr=[],this._resetPromise(),this._lastFlush=Date.now()}_resetPromise(){return this._promise=new this.Promise((e,t)=>this._resolve=e)}_flush(){return clearTimeout(this._timeout),this._lastFlush=Date.now(),this._resolve(),this.Events.trigger(`batch`,this._arr),this._arr=[],this._resetPromise()}add(e){var t;return this._arr.push(e),t=this._promise,this._arr.length===this.maxSize?this._flush():this.maxTime!=null&&this._arr.length===1&&(this._timeout=setTimeout(()=>this._flush(),this.maxTime)),t}}return e.prototype.defaults={maxTime:null,maxSize:null,Promise},e}).call(e);var z=I,ee=()=>console.log(`You must import the full version of Bottleneck in order to use this feature.`),B=t(T),te,V,ne,re,H,ie,ae,oe,se,ce,le,ue=[].splice;ie=10,V=5,le=n,ae=s,re=m,H=y,oe=ee,ne=i,se=x,ce=C,te=(function(){class e{constructor(t={},...n){var r,i;this._addToQueue=this._addToQueue.bind(this),this._validateOptions(t,n),le.load(t,this.instanceDefaults,this),this._queues=new ae(ie),this._scheduled={},this._states=new se([`RECEIVED`,`QUEUED`,`RUNNING`,`EXECUTING`].concat(this.trackDoneStatus?[`DONE`]:[])),this._limiter=null,this.Events=new ne(this),this._submitLock=new ce(`submit`,this.Promise),this._registerLock=new ce(`register`,this.Promise),i=le.load(t,this.storeDefaults,{}),this._store=(function(){if(this.datastore===`redis`||this.datastore===`ioredis`||this.connection!=null)return r=le.load(t,this.redisStoreDefaults,{}),new oe(this,i,r);if(this.datastore===`local`)return r=le.load(t,this.localStoreDefaults,{}),new H(this,i,r);throw new e.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`)}).call(this),this._queues.on(`leftzero`,()=>{var e;return(e=this._store.heartbeat)==null?void 0:typeof e.ref==`function`?e.ref():void 0}),this._queues.on(`zero`,()=>{var e;return(e=this._store.heartbeat)==null?void 0:typeof e.unref==`function`?e.unref():void 0})}_validateOptions(t,n){if(!(typeof t==`object`&&t&&n.length===0))throw new e.prototype.BottleneckError(`Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1.`)}ready(){return this._store.ready}clients(){return this._store.clients}channel(){return`b_${this.id}`}channel_client(){return`b_${this.id}_${this._store.clientId}`}publish(e){return this._store.__publish__(e)}disconnect(e=!0){return this._store.__disconnect__(e)}chain(e){return this._limiter=e,this}queued(e){return this._queues.queued(e)}clusterQueued(){return this._store.__queued__()}empty(){return this.queued()===0&&this._submitLock.isEmpty()}running(){return this._store.__running__()}done(){return this._store.__done__()}jobStatus(e){return this._states.jobStatus(e)}jobs(e){return this._states.statusJobs(e)}counts(){return this._states.statusCounts()}_randomIndex(){return Math.random().toString(36).slice(2)}check(e=1){return this._store.__check__(e)}_clearGlobalState(e){return this._scheduled[e]==null?!1:(clearTimeout(this._scheduled[e].expiration),delete this._scheduled[e],!0)}async _free(e,t,n,r){var i,a;try{if({running:a}=await this._store.__free__(e,n.weight),this.Events.trigger(`debug`,`Freed ${n.id}`,r),a===0&&this.empty())return this.Events.trigger(`idle`)}catch(e){return i=e,this.Events.trigger(`error`,i)}}_run(e,t,n){var r,i,a;return t.doRun(),r=this._clearGlobalState.bind(this,e),a=this._run.bind(this,e,t),i=this._free.bind(this,e,t),this._scheduled[e]={timeout:setTimeout(()=>t.doExecute(this._limiter,r,a,i),n),expiration:t.options.expiration==null?void 0:setTimeout(function(){return t.doExpire(r,a,i)},n+t.options.expiration),job:t}}_drainOne(e){return this._registerLock.schedule(()=>{var t,n,r,i,a;return this.queued()===0||(a=this._queues.getFirst(),{options:i,args:t}=r=a.first(),e!=null&&i.weight>e)?this.Promise.resolve(null):(this.Events.trigger(`debug`,`Draining ${i.id}`,{args:t,options:i}),n=this._randomIndex(),this._store.__register__(n,i.weight,i.expiration).then(({success:e,wait:o,reservoir:s})=>{var c;return this.Events.trigger(`debug`,`Drained ${i.id}`,{success:e,args:t,options:i}),e?(a.shift(),c=this.empty(),c&&this.Events.trigger(`empty`),s===0&&this.Events.trigger(`depleted`,c),this._run(n,r,o),this.Promise.resolve(i.weight)):this.Promise.resolve(null)}))})}_drainAll(e,t=0){return this._drainOne(e).then(n=>{var r;return n==null?this.Promise.resolve(t):(r=e==null?e:e-n,this._drainAll(r,t+n))}).catch(e=>this.Events.trigger(`error`,e))}_dropAllQueued(e){return this._queues.shiftAll(function(t){return t.doDrop({message:e})})}stop(t={}){var n,r;return t=le.load(t,this.stopDefaults),r=e=>{var t=()=>{var t=this._states.counts;return t[0]+t[1]+t[2]+t[3]===e};return new this.Promise((e,n)=>t()?e():this.on(`done`,()=>{if(t())return this.removeAllListeners(`done`),e()}))},n=t.dropWaitingJobs?(this._run=function(e,n){return n.doDrop({message:t.dropErrorMessage})},this._drainOne=()=>this.Promise.resolve(null),this._registerLock.schedule(()=>this._submitLock.schedule(()=>{var e,n=this._scheduled,i;for(e in n)i=n[e],this.jobStatus(i.job.options.id)===`RUNNING`&&(clearTimeout(i.timeout),clearTimeout(i.expiration),i.job.doDrop({message:t.dropErrorMessage}));return this._dropAllQueued(t.dropErrorMessage),r(0)}))):this.schedule({priority:ie-1,weight:0},()=>r(1)),this._receive=function(n){return n._reject(new e.prototype.BottleneckError(t.enqueueErrorMessage))},this.stop=()=>this.Promise.reject(new e.prototype.BottleneckError(`stop() has already been called`)),n}async _addToQueue(t){var n,r,i,a,o,s,c;({args:n,options:a}=t);try{({reachedHWM:o,blocked:r,strategy:c}=await this._store.__submit__(this.queued(),a.weight))}catch(e){return i=e,this.Events.trigger(`debug`,`Could not queue ${a.id}`,{args:n,options:a,error:i}),t.doDrop({error:i}),!1}return r?(t.doDrop(),!0):o&&(s=c===e.prototype.strategy.LEAK?this._queues.shiftLastFrom(a.priority):c===e.prototype.strategy.OVERFLOW_PRIORITY?this._queues.shiftLastFrom(a.priority+1):c===e.prototype.strategy.OVERFLOW?t:void 0,s?.doDrop(),s==null||c===e.prototype.strategy.OVERFLOW)?(s??t.doDrop(),o):(t.doQueue(o,r),this._queues.push(t),await this._drainAll(),o)}_receive(t){return this._states.jobStatus(t.options.id)==null?(t.doReceive(),this._submitLock.schedule(this._addToQueue,t)):(t._reject(new e.prototype.BottleneckError(`A job with the same id already exists (id=${t.options.id})`)),!1)}submit(...e){var t,n,r,i,a,o,s;return typeof e[0]==`function`?(a=e,[n,...e]=a,[t]=ue.call(e,-1),i=le.load({},this.jobDefaults)):(o=e,[i,n,...e]=o,[t]=ue.call(e,-1),i=le.load(i,this.jobDefaults)),s=(...e)=>new this.Promise(function(t,r){return n(...e,function(...e){return(e[0]==null?t:r)(e)})}),r=new re(s,e,i,this.jobDefaults,this.rejectOnDrop,this.Events,this._states,this.Promise),r.promise.then(function(e){return typeof t==`function`?t(...e):void 0}).catch(function(e){return Array.isArray(e)?typeof t==`function`?t(...e):void 0:typeof t==`function`?t(e):void 0}),this._receive(r)}schedule(...e){var t,n,r;return typeof e[0]==`function`?([r,...e]=e,n={}):[n,r,...e]=e,t=new re(r,e,n,this.jobDefaults,this.rejectOnDrop,this.Events,this._states,this.Promise),this._receive(t),t.promise}wrap(e){var t=this.schedule.bind(this),n=function(...n){return t(e.bind(this),...n)};return n.withOptions=function(n,...r){return t(n,e,...r)},n}async updateSettings(e={}){return await this._store.__updateSettings__(le.overwrite(e,this.storeDefaults)),le.overwrite(e,this.instanceDefaults,this),this}currentReservoir(){return this._store.__currentReservoir__()}incrementReservoir(e=0){return this._store.__incrementReservoir__(e)}}return e.default=e,e.Events=ne,e.version=e.prototype.version=B.version,e.strategy=e.prototype.strategy={LEAK:1,OVERFLOW:2,OVERFLOW_PRIORITY:4,BLOCK:3},e.BottleneckError=e.prototype.BottleneckError=c,e.Group=e.prototype.Group=F,e.RedisConnection=e.prototype.RedisConnection=E,e.IORedisConnection=e.prototype.IORedisConnection=D,e.Batcher=e.prototype.Batcher=z,e.prototype.jobDefaults={priority:V,weight:1,expiration:null,id:``},e.prototype.storeDefaults={maxConcurrent:null,minTime:0,highWater:null,strategy:e.prototype.strategy.LEAK,penalty:null,reservoir:null,reservoirRefreshInterval:null,reservoirRefreshAmount:null,reservoirIncreaseInterval:null,reservoirIncreaseAmount:null,reservoirIncreaseMaximum:null},e.prototype.localStoreDefaults={Promise,timeout:null,heartbeatInterval:250},e.prototype.redisStoreDefaults={Promise,timeout:null,heartbeatInterval:5e3,clientTimeout:1e4,Redis:null,clientOptions:{},clusterNodes:null,clearDatastore:!1,connection:null},e.prototype.instanceDefaults={datastore:`local`,connection:null,id:``,rejectOnDrop:!0,trackDoneStatus:!1,Promise},e.prototype.stopDefaults={enqueueErrorMessage:`This limiter has been stopped and cannot accept new jobs.`,dropWaitingJobs:!0,dropErrorMessage:`This limiter has been stopped.`},e}).call(e);var de=te;return de}))}))(),1),iI=`0.0.0-development`;function aI(e){return e.request!==void 0}async function oI(e,t,n,r){if(!aI(n)||!n?.request.request)throw n;if(n.status>=400&&!e.doNotRetry.includes(n.status)){let i=r.request.retries==null?e.retries:r.request.retries,a=((r.request.retryCount||0)+1)**2;throw t.retry.retryRequest(n,i,a)}throw n}async function sI(e,t,n,r){let i=new rI.default;return i.on(`failed`,function(t,n){let i=~~t.request.request?.retries,a=~~t.request.request?.retryAfter;if(r.request.retryCount=n.retryCount+1,i>n.retryCount)return a*e.retryAfterBaseValue}),i.schedule(cI.bind(null,e,t,n),r)}async function cI(e,t,n,r){let i=await n(r);return i.data&&i.data.errors&&i.data.errors.length>0&&/Something went wrong while executing your query/.test(i.data.errors[0].message)?oI(e,t,new Xa(i.data.errors[0].message,500,{request:r,response:i}),r):i}function lI(e,t){let n=Object.assign({enabled:!0,retryAfterBaseValue:1e3,doNotRetry:[400,401,403,404,410,422,451],retries:3},t.retry),r={retry:{retryRequest:(e,t,n)=>(e.request.request=Object.assign({},e.request.request,{retries:t,retryAfter:n}),e)}};return n.enabled&&(e.hook.error(`request`,oI.bind(null,n,r)),e.hook.wrap(`request`,sI.bind(null,n,r))),r}lI.VERSION=iI;var uI=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function dI(e,t,n,r,i){return uI(this,void 0,void 0,function*(){let[a,o]=tI(Go),s=yield Yo(i,{log:void 0,userAgent:cj(),previews:void 0,retry:a,request:o},lI,nI).request(`GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}`,{owner:n,repo:r,run_id:t,name:e});if(s.status!==200)throw new uj(`Invalid response from GitHub API: ${s.status} (${s?.headers?.[`x-github-request-id`]})`);if(s.data.artifacts.length===0)throw new dj(`Artifact not found for name: ${e} +var n=hL(),r={},i=function(e,t){return i.create(e,t)};i.create=function(e,t){if(r[e]){var i=new n(e,t);return i.setFormat(e),i.setModule(new r[e](t)),i}else throw Error(`create(`+e+`): format not registered`)},i.registerFormat=function(e,t){if(r[e])throw Error(`register(`+e+`): format already registered`);if(typeof t!=`function`)throw Error(`register(`+e+`): format module invalid`);if(typeof t.prototype.append!=`function`||typeof t.prototype.finalize!=`function`)throw Error(`register(`+e+`): format module missing methods`);r[e]=t},i.isRegisteredFormat=function(e){return!!r[e]},i.registerFormat(`zip`,jL()),i.registerFormat(`tar`,GL()),i.registerFormat(`json`,qL()),t.exports=i}))(),1),YL=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},XL=class extends Ye.Transform{constructor(e){super({highWaterMark:e})}_transform(e,t,n){n(null,e)}};function ZL(e){return YL(this,void 0,void 0,function*(){K(`Creating raw file upload stream for: ${e}`);let t=iN(),n=new XL(t),r=e;(yield fe.promises.lstat(e)).isSymbolicLink()&&(r=yield $e(e));let i=fe.createReadStream(r,{highWaterMark:t});return i.on(`error`,e=>{gi(`An error has occurred while reading the file for upload`),gi(String(e)),n.destroy(Error(`An error has occurred during file read for the artifact`))}),i.pipe(n),n})}var QL=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function $L(e){return QL(this,arguments,void 0,function*(e,t=6){K(`Creating Artifact archive with compressionLevel: ${t}`);let n=JL.default.create(`zip`,{highWaterMark:iN(),zlib:{level:t}});n.on(`error`,eR),n.on(`warning`,tR),n.on(`finish`,nR),n.on(`end`,rR);for(let t of e)if(t.sourcePath!==null){let e=t.sourcePath;t.stats.isSymbolicLink()&&(e=yield $e(t.sourcePath)),n.file(e,{name:t.destinationPath})}else n.append(``,{name:t.destinationPath});let r=new XL(iN());return K(`Zip write high watermark value ${r.writableHighWaterMark}`),K(`Zip read high watermark value ${r.readableHighWaterMark}`),n.pipe(r),n.finalize(),r})}const eR=e=>{throw gi(`An error has occurred while creating the zip file for upload`),vi(e),Error(`An error has occurred during zip creation for the artifact`)},tR=e=>{e.code===`ENOENT`?(_i(`ENOENT warning during artifact zip creation. No such file or directory`),vi(e)):(_i(`A non-blocking warning has occurred during artifact zip creation: ${e.code}`),vi(e))},nR=()=>{K(`Zip stream for upload has finished.`)},rR=()=>{K(`Zip stream for upload has ended.`)},iR={".txt":`text/plain`,".html":`text/html`,".htm":`text/html`,".css":`text/css`,".csv":`text/csv`,".xml":`text/xml`,".md":`text/markdown`,".js":`application/javascript`,".mjs":`application/javascript`,".json":`application/json`,".png":`image/png`,".jpg":`image/jpeg`,".jpeg":`image/jpeg`,".gif":`image/gif`,".svg":`image/svg+xml`,".webp":`image/webp`,".ico":`image/x-icon`,".bmp":`image/bmp`,".tiff":`image/tiff`,".tif":`image/tiff`,".mp3":`audio/mpeg`,".wav":`audio/wav`,".ogg":`audio/ogg`,".flac":`audio/flac`,".mp4":`video/mp4`,".webm":`video/webm`,".avi":`video/x-msvideo`,".mov":`video/quicktime`,".pdf":`application/pdf`,".doc":`application/msword`,".docx":`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,".xls":`application/vnd.ms-excel`,".xlsx":`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,".ppt":`application/vnd.ms-powerpoint`,".pptx":`application/vnd.openxmlformats-officedocument.presentationml.presentation`,".zip":`application/zip`,".tar":`application/x-tar`,".gz":`application/gzip`,".rar":`application/vnd.rar`,".7z":`application/x-7z-compressed`,".wasm":`application/wasm`,".yaml":`application/x-yaml`,".yml":`application/x-yaml`,".woff":`font/woff`,".woff2":`font/woff2`,".ttf":`font/ttf`,".otf":`font/otf`,".eot":`application/vnd.ms-fontobject`};function aR(e){return iR[U.extname(e).toLowerCase()]||`application/octet-stream`}var oR=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function sR(e,t,n,r){return oR(this,void 0,void 0,function*(){let i=`${e}.zip`;if(r?.skipArchive){if(t.length===0)throw new IN([]);if(t.length>1)throw Error(`skipArchive option is only supported when uploading a single file`);if(!fe.existsSync(t[0]))throw new IN(t);i=U.basename(t[0]),e=i}jN(e),$N(n);let a=[];if(!r?.skipArchive&&(a=eP(t,n),a.length===0))throw new IN(a.flatMap(e=>e.sourcePath?[e.sourcePath]:[]));let o=aR(i),s=qN(),c=QN(),l={workflowRunBackendId:s.workflowRunBackendId,workflowJobRunBackendId:s.workflowJobRunBackendId,name:e,mimeType:mN.create({value:o}),version:7},u=DN(r?.retentionDays);u&&(l.expiresAt=u);let d=yield c.CreateArtifact(l);if(!d.ok)throw new LN(`CreateArtifact: response from backend was not ok`);let f;f=r?.skipArchive?yield ZL(t[0]):yield $L(a,r?.compressionLevel),vi(`Uploading artifact: ${i}`);let p=yield nP(d.signedUploadUrl,f,o),m={workflowRunBackendId:s.workflowRunBackendId,workflowJobRunBackendId:s.workflowJobRunBackendId,name:e,size:p.uploadSize?p.uploadSize.toString():`0`};p.sha256Hash&&(m.hash=mN.create({value:`sha256:${p.sha256Hash}`})),vi(`Finalizing artifact upload`);let h=yield c.FinalizeArtifact(m);if(!h.ok)throw new LN(`FinalizeArtifact: response from backend was not ok`);let g=BigInt(h.artifactId);return vi(`Artifact ${e} successfully finalized. Artifact ID ${g}`),{size:p.uploadSize,digest:p.sha256Hash,id:Number(g)}})}var cR=i(((e,t)=>{t.exports=n;function n(e){if(!(this instanceof n))return new n(e);this.value=e}n.prototype.get=function(e){for(var t=this.value,n=0;n{var r=cR(),i=t(`events`).EventEmitter;n.exports=a;function a(e){var t=a.saw(e,{}),n=e.call(t.handlers,t);return n!==void 0&&(t.handlers=n),t.record(),t.chain()}a.light=function(e){var t=a.saw(e,{}),n=e.call(t.handlers,t);return n!==void 0&&(t.handlers=n),t.chain()},a.saw=function(e,t){var n=new i;return n.handlers=t,n.actions=[],n.chain=function(){var e=r(n.handlers).map(function(t){if(this.isRoot)return t;var r=this.path;typeof t==`function`&&this.update(function(){return n.actions.push({path:r,args:[].slice.call(arguments)}),e})});return process.nextTick(function(){n.emit(`begin`),n.next()}),e},n.pop=function(){return n.actions.shift()},n.next=function(){var e=n.pop();if(!e)n.emit(`end`);else if(!e.trap){var t=n.handlers;e.path.forEach(function(e){t=t[e]}),t.apply(n.handlers,e.args)}},n.nest=function(t){var r=[].slice.call(arguments,1),i=!0;if(typeof t==`boolean`){var i=t;t=r.shift()}var o=a.saw(e,{}),s=e.call(o.handlers,o);s!==void 0&&(o.handlers=s),n.step!==void 0&&o.record(),t.apply(o.chain(),r),i!==!1&&o.on(`end`,n.next)},n.record=function(){o(n)},[`trap`,`down`,`jump`].forEach(function(e){n[e]=function(){throw Error(`To use the trap, down and jump features, please call record() first to start recording actions.`)}}),n};function o(e){e.step=0,e.pop=function(){return e.actions[e.step++]},e.trap=function(t,n){var r=Array.isArray(t)?t:[t];e.actions.push({path:r,step:e.step,cb:n,trap:!0})},e.down=function(t){var n=(Array.isArray(t)?t:[t]).join(`/`),r=e.actions.slice(e.step).map(function(t){return t.trap&&t.step<=e.step?!1:t.path.join(`/`)==n}).indexOf(!0);r>=0?e.step+=r:e.step=e.actions.length;var i=e.actions[e.step-1];i&&i.trap?(e.step=i.step,i.cb()):e.next()},e.jump=function(t){e.step=t,e.next()}}})),uR=i(((e,t)=>{t.exports=n;function n(e){if(!(this instanceof n))return new n(e);this.buffers=e||[],this.length=this.buffers.reduce(function(e,t){return e+t.length},0)}n.prototype.push=function(){for(var e=0;e=0?e:this.length-e,a=[].slice.call(arguments,2);(t===void 0||t>this.length-i)&&(t=this.length-i);for(var e=0;e0){var l=i-s;if(l+t0){var p=a.slice();p.unshift(d),p.push(f),r.splice.apply(r,[c,1].concat(p)),c+=p.length,a=[]}else r.splice(c,1,d,f),c+=2}else o.push(r[c].slice(l)),r[c]=r[c].slice(0,l),c++}for(a.length>0&&(r.splice.apply(r,[c,0].concat(a)),c+=a.length);o.lengththis.length&&(t=this.length);for(var r=0,i=0;i=t-e?Math.min(l+(t-e)-o,c):c;n[s].copy(a,o,l,u),o+=u-l}return a},n.prototype.pos=function(e){if(e<0||e>=this.length)throw Error(`oob`);for(var t=e,n=0,r=null;;){if(r=this.buffers[n],t=this.buffers[n].length;)if(r=0,n++,n>=this.buffers.length)return-1;if(this.buffers[n][r]==e[i]){if(i==0&&(a={i:n,j:r,pos:o}),i++,i==e.length)return a.pos}else i!=0&&(n=a.i,r=a.j,o=a.pos,i=0);r++,o++}},n.prototype.toBuffer=function(){return this.slice()},n.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)}})),dR=i(((e,t)=>{t.exports=function(e){function t(e,t){var r=n.store,i=e.split(`.`);i.slice(0,-1).forEach(function(e){r[e]===void 0&&(r[e]={}),r=r[e]});var a=i[i.length-1];return arguments.length==1?r[a]:r[a]=t}var n={get:function(e){return t(e)},set:function(e,n){return t(e,n)},store:e||{}};return n}})),fR=i(((e,n)=>{var r=lR(),i=t(`events`).EventEmitter,a=uR(),o=dR(),s=t(`stream`).Stream;e=n.exports=function(t,n){if(Buffer.isBuffer(t))return e.parse(t);var r=e.stream();return t&&t.pipe?t.pipe(r):t&&(t.on(n||`data`,function(e){r.write(e)}),t.on(`end`,function(){r.end()})),r},e.stream=function(t){if(t)return e.apply(null,arguments);var n=null;function c(e,t,r){n={bytes:e,skip:r,cb:function(e){n=null,t(e)}},u()}var l=null;function u(){if(!n){v&&(g=!0);return}if(typeof n==`function`)n();else{var e=l+n.bytes;if(m.length>=e){var t;l==null?(t=m.splice(0,e),n.skip||(t=t.slice())):(n.skip||(t=m.slice(l,e)),l=e),n.skip?n.cb():n.cb(t)}}}function d(e){function t(){g||e.next()}var r=f(function(e,n){return function(r){c(e,function(e){h.set(r,n(e)),t()})}});return r.tap=function(t){e.nest(t,h.store)},r.into=function(t,n){h.get(t)||h.set(t,{});var r=h;h=o(r.get(t)),e.nest(function(){n.apply(this,arguments),this.tap(function(){h=r})},h.store)},r.flush=function(){h.store={},t()},r.loop=function(n){var r=!1;e.nest(!1,function i(){this.vars=h.store,n.call(this,function(){r=!0,t()},h.store),this.tap(function(){r?e.next():i.call(this)}.bind(this))},h.store)},r.buffer=function(e,n){typeof n==`string`&&(n=h.get(n)),c(n,function(n){h.set(e,n),t()})},r.skip=function(e){typeof e==`string`&&(e=h.get(e)),c(e,function(){t()})},r.scan=function(e,r){if(typeof r==`string`)r=new Buffer(r);else if(!Buffer.isBuffer(r))throw Error(`search must be a Buffer or a string`);var i=0;n=function(){var a=m.indexOf(r,l+i),o=a-l-i;a===-1?o=Math.max(m.length-r.length-l-i,0):(n=null,l==null?(h.set(e,m.slice(0,i+o)),m.splice(0,i+o+r.length)):(h.set(e,m.slice(l,l+i+o)),l+=i+o+r.length),t(),u()),i+=o},u()},r.peek=function(t){l=0,e.nest(function(){t.call(this,h.store),this.tap(function(){l=null})})},r}var p=r.light(d);p.writable=!0;var m=a();p.write=function(e){m.push(e),u()};var h=o(),g=!1,v=!1;return p.end=function(){v=!0},p.pipe=s.prototype.pipe,Object.getOwnPropertyNames(i.prototype).forEach(function(e){p[e]=i.prototype[e]}),p},e.parse=function(e){var t=f(function(i,a){return function(o){if(n+i<=e.length){var s=e.slice(n,n+i);n+=i,r.set(o,a(s))}else r.set(o,null);return t}}),n=0,r=o();return t.vars=r.store,t.tap=function(e){return e.call(t,r.store),t},t.into=function(e,n){r.get(e)||r.set(e,{});var i=r;return r=o(i.get(e)),n.call(t,r.store),r=i,t},t.loop=function(e){for(var n=!1,i=function(){n=!0};n===!1;)e.call(t,i,r.store);return t},t.buffer=function(i,a){typeof a==`string`&&(a=r.get(a));var o=e.slice(n,Math.min(e.length,n+a));return n+=a,r.set(i,o),t},t.skip=function(e){return typeof e==`string`&&(e=r.get(e)),n+=e,t},t.scan=function(i,a){if(typeof a==`string`)a=new Buffer(a);else if(!Buffer.isBuffer(a))throw Error(`search must be a Buffer or a string`);r.set(i,null);for(var o=0;o+n<=e.length-a.length+1;o++){for(var s=0;s=e.length},t};function c(e){for(var t=0,n=0;n{var r=t(`stream`).Transform,i=t(`util`);function a(e,t){if(!(this instanceof a))return new a;r.call(this);var n=typeof e==`object`?e.pattern:e;this.pattern=Buffer.isBuffer(n)?n:Buffer.from(n),this.requiredLength=this.pattern.length,e.requiredExtraSize&&(this.requiredLength+=e.requiredExtraSize),this.data=new Buffer(``),this.bytesSoFar=0,this.matchFn=t}i.inherits(a,r),a.prototype.checkDataChunk=function(e){if(this.data.length>=this.requiredLength){var t=this.data.indexOf(this.pattern,+!!e);if(t>=0&&t+this.requiredLength>this.data.length){if(t>0){var n=this.data.slice(0,t);this.push(n),this.bytesSoFar+=t,this.data=this.data.slice(t)}return}if(t===-1){var r=this.data.length-this.requiredLength+1,n=this.data.slice(0,r);this.push(n),this.bytesSoFar+=r,this.data=this.data.slice(r);return}if(t>0){var n=this.data.slice(0,t);this.data=this.data.slice(t),this.push(n),this.bytesSoFar+=t}if(!this.matchFn||this.matchFn(this.data,this.bytesSoFar)){this.data=new Buffer(``);return}return!0}},a.prototype._transform=function(e,t,n){this.data=Buffer.concat([this.data,e]);for(var r=!0;this.checkDataChunk(!r);)r=!1;n()},a.prototype._flush=function(e){if(this.data.length>0)for(var t=!0;this.checkDataChunk(!t);)t=!1;this.data.length>0&&(this.push(this.data),this.data=null),e()},n.exports=a})),mR=i(((e,n)=>{var r=t(`stream`),i=t(`util`).inherits;function a(){if(!(this instanceof a))return new a;r.PassThrough.call(this),this.path=null,this.type=null,this.isDirectory=!1}i(a,r.PassThrough),a.prototype.autodrain=function(){return this.pipe(new r.Transform({transform:function(e,t,n){n()}}))},n.exports=a})),hR=i(((e,n)=>{var r=fR(),i=t(`stream`),a=t(`util`),o=t(`zlib`),s=pR(),c=mR();let l={STREAM_START:0,START:1,LOCAL_FILE_HEADER:2,LOCAL_FILE_HEADER_SUFFIX:3,FILE_DATA:4,FILE_DATA_END:5,DATA_DESCRIPTOR:6,CENTRAL_DIRECTORY_FILE_HEADER:7,CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:8,CDIR64_END:9,CDIR64_END_DATA_SECTOR:10,CDIR64_LOCATOR:11,CENTRAL_DIRECTORY_END:12,CENTRAL_DIRECTORY_END_COMMENT:13,TRAILING_JUNK:14,ERROR:99},u=4294967296;function d(e){if(!(this instanceof d))return new d(e);i.Transform.call(this),this.options=e||{},this.data=new Buffer(``),this.state=l.STREAM_START,this.skippedBytes=0,this.parsedEntity=null,this.outStreamInfo={}}a.inherits(d,i.Transform),d.prototype.processDataChunk=function(e){var t;switch(this.state){case l.STREAM_START:case l.START:t=4;break;case l.LOCAL_FILE_HEADER:t=26;break;case l.LOCAL_FILE_HEADER_SUFFIX:t=this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength;break;case l.DATA_DESCRIPTOR:t=12;break;case l.CENTRAL_DIRECTORY_FILE_HEADER:t=42;break;case l.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:t=this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength+this.parsedEntity.fileCommentLength;break;case l.CDIR64_END:t=52;break;case l.CDIR64_END_DATA_SECTOR:t=this.parsedEntity.centralDirectoryRecordSize-44;break;case l.CDIR64_LOCATOR:t=16;break;case l.CENTRAL_DIRECTORY_END:t=18;break;case l.CENTRAL_DIRECTORY_END_COMMENT:t=this.parsedEntity.commentLength;break;case l.FILE_DATA:return 0;case l.FILE_DATA_END:return 0;case l.TRAILING_JUNK:return this.options.debug&&console.log(`found`,e.length,`bytes of TRAILING_JUNK`),e.length;default:return e.length}if(e.length>>=8,(i&255)==80){a=o;break}return this.skippedBytes+=a,this.options.debug&&console.log(`Skipped`,this.skippedBytes,`bytes`),a}this.state=l.ERROR;var s=r?`Not a valid zip file`:`Invalid signature in zip file`;if(this.options.debug){var d=e.readUInt32LE(0),f;try{f=e.slice(0,4).toString()}catch{}console.log(`Unexpected signature in zip file: 0x`+d.toString(16),`"`+f+`", skipped`,this.skippedBytes,`bytes`)}return this.emit(`error`,Error(s)),e.length}return this.skippedBytes=0,t;case l.LOCAL_FILE_HEADER:return this.parsedEntity=this._readFile(e),this.state=l.LOCAL_FILE_HEADER_SUFFIX,t;case l.LOCAL_FILE_HEADER_SUFFIX:var p=new c,m=(this.parsedEntity.flags&2048)!=0;p.path=this._decodeString(e.slice(0,this.parsedEntity.fileNameLength),m);var h=e.slice(this.parsedEntity.fileNameLength,this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength),g=this._readExtraFields(h);if(g&&g.parsed&&(g.parsed.path&&!m&&(p.path=g.parsed.path),Number.isFinite(g.parsed.uncompressedSize)&&this.parsedEntity.uncompressedSize===u-1&&(this.parsedEntity.uncompressedSize=g.parsed.uncompressedSize),Number.isFinite(g.parsed.compressedSize)&&this.parsedEntity.compressedSize===u-1&&(this.parsedEntity.compressedSize=g.parsed.compressedSize)),this.parsedEntity.extra=g.parsed||{},this.options.debug){let e=Object.assign({},this.parsedEntity,{path:p.path,flags:`0x`+this.parsedEntity.flags.toString(16),extraFields:g&&g.debug});console.log(`decoded LOCAL_FILE_HEADER:`,JSON.stringify(e,null,2))}return this._prepareOutStream(this.parsedEntity,p),this.emit(`entry`,p),this.state=l.FILE_DATA,t;case l.CENTRAL_DIRECTORY_FILE_HEADER:return this.parsedEntity=this._readCentralDirectoryEntry(e),this.state=l.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX,t;case l.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:var m=(this.parsedEntity.flags&2048)!=0,v=this._decodeString(e.slice(0,this.parsedEntity.fileNameLength),m),h=e.slice(this.parsedEntity.fileNameLength,this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength),g=this._readExtraFields(h);g&&g.parsed&&g.parsed.path&&!m&&(v=g.parsed.path),this.parsedEntity.extra=g.parsed;var y=(this.parsedEntity.versionMadeBy&65280)>>8==3,b,x;if(y&&(b=this.parsedEntity.externalFileAttributes>>>16,x=(b>>>12&10)==10),this.options.debug){let e=Object.assign({},this.parsedEntity,{path:v,flags:`0x`+this.parsedEntity.flags.toString(16),unixAttrs:b&&`0`+b.toString(8),isSymlink:x,extraFields:g.debug});console.log(`decoded CENTRAL_DIRECTORY_FILE_HEADER:`,JSON.stringify(e,null,2))}return this.state=l.START,t;case l.CDIR64_END:return this.parsedEntity=this._readEndOfCentralDirectory64(e),this.options.debug&&console.log(`decoded CDIR64_END_RECORD:`,this.parsedEntity),this.state=l.CDIR64_END_DATA_SECTOR,t;case l.CDIR64_END_DATA_SECTOR:return this.state=l.START,t;case l.CDIR64_LOCATOR:return this.state=l.START,t;case l.CENTRAL_DIRECTORY_END:return this.parsedEntity=this._readEndOfCentralDirectory(e),this.options.debug&&console.log(`decoded CENTRAL_DIRECTORY_END:`,this.parsedEntity),this.state=l.CENTRAL_DIRECTORY_END_COMMENT,t;case l.CENTRAL_DIRECTORY_END_COMMENT:return this.options.debug&&console.log(`decoded CENTRAL_DIRECTORY_END_COMMENT:`,e.slice(0,t).toString()),this.state=l.TRAILING_JUNK,t;case l.ERROR:return e.length;default:return console.log(`didn't handle state #`,this.state,`discarding`),e.length}},d.prototype._prepareOutStream=function(e,t){var n=this,r=e.uncompressedSize===0&&/[\/\\]$/.test(t.path);t.path=t.path.replace(/(?<=^|[/\\]+)[.][.]+(?=[/\\]+|$)/g,`.`),t.type=r?`Directory`:`File`,t.isDirectory=r;var a=!(e.flags&8);a&&(t.size=e.uncompressedSize);var d=e.versionsNeededToExtract<=45;if(this.outStreamInfo={stream:null,limit:a?e.compressedSize:-1,written:0},a)this.outStreamInfo.stream=new i.PassThrough;else{var f=new Buffer(4);f.writeUInt32LE(134695760,0);var p=e.extra.zip64Mode,m=new s({pattern:f,requiredExtraSize:p?20:12},function(e,t){var r=n._readDataDescriptor(e,p),i=r.compressedSize===t;if(!p&&!i&&t>=u)for(var a=t-u;a>=0&&(i=r.compressedSize===a,!i);)a-=u;if(i){n.state=l.FILE_DATA_END;var o=p?24:16;return n.data.length>0?n.data=Buffer.concat([e.slice(o),n.data]):n.data=e.slice(o),!0}});this.outStreamInfo.stream=m}var h=e.flags&1||e.flags&64;if(h||!d){var g=h?`Encrypted files are not supported!`:`Zip version `+Math.floor(e.versionsNeededToExtract/10)+`.`+e.versionsNeededToExtract%10+` is not supported`;t.skip=!0,setImmediate(()=>{n.emit(`error`,Error(g))}),this.outStreamInfo.stream.pipe(new c().autodrain());return}if(e.compressionMethod>0){var v=o.createInflateRaw();v.on(`error`,function(e){n.state=l.ERROR,n.emit(`error`,e)}),this.outStreamInfo.stream.pipe(v).pipe(t)}else this.outStreamInfo.stream.pipe(t);this._drainAllEntries&&t.autodrain()},d.prototype._readFile=function(e){return r.parse(e).word16lu(`versionsNeededToExtract`).word16lu(`flags`).word16lu(`compressionMethod`).word16lu(`lastModifiedTime`).word16lu(`lastModifiedDate`).word32lu(`crc32`).word32lu(`compressedSize`).word32lu(`uncompressedSize`).word16lu(`fileNameLength`).word16lu(`extraFieldLength`).vars},d.prototype._readExtraFields=function(e){var t={},n={parsed:t};this.options.debug&&(n.debug=[]);for(var i=0;i=l+4&&c&1&&(t.mtime=new Date(e.readUInt32LE(i+l)*1e3),l+=4),a.extraSize>=l+4&&c&2&&(t.atime=new Date(e.readUInt32LE(i+l)*1e3),l+=4),a.extraSize>=l+4&&c&4&&(t.ctime=new Date(e.readUInt32LE(i+l)*1e3));break;case 28789:if(o=`Info-ZIP Unicode Path Extra Field`,e.readUInt8(i)===1){var l=1;e.readUInt32LE(i+l),l+=4,t.path=e.slice(i+l).toString()}break;case 13:case 22613:o=a.extraId===13?`PKWARE Unix`:`Info-ZIP UNIX (type 1)`;var l=0;if(a.extraSize>=8){var u=new Date(e.readUInt32LE(i+l)*1e3);l+=4;var d=new Date(e.readUInt32LE(i+l)*1e3);if(l+=4,t.atime=u,t.mtime=d,a.extraSize>=12){var f=e.readUInt16LE(i+l);l+=2;var p=e.readUInt16LE(i+l);l+=2,t.uid=f,t.gid=p}}break;case 30805:o=`Info-ZIP UNIX (type 2)`;var l=0;if(a.extraSize>=4){var f=e.readUInt16LE(i+l);l+=2;var p=e.readUInt16LE(i+l);l+=2,t.uid=f,t.gid=p}break;case 30837:o=`Info-ZIP New Unix`;var l=0,m=e.readUInt8(i);if(l+=1,m===1){var h=e.readUInt8(i+l);l+=1,h<=6&&(t.uid=e.readUIntLE(i+l,h)),l+=h;var g=e.readUInt8(i+l);l+=1,g<=6&&(t.gid=e.readUIntLE(i+l,g))}break;case 30062:o=`ASi Unix`;var l=0;if(a.extraSize>=14){e.readUInt32LE(i+l),l+=4;var v=e.readUInt16LE(i+l);l+=2,e.readUInt32LE(i+l),l+=4;var f=e.readUInt16LE(i+l);l+=2;var p=e.readUInt16LE(i+l);if(l+=2,t.mode=v,t.uid=f,t.gid=p,a.extraSize>14){var y=i+l,b=i+a.extraSize-14;t.symlink=this._decodeString(e.slice(y,b))}}break}this.options.debug&&n.debug.push({extraId:`0x`+a.extraId.toString(16),description:o,data:e.slice(i,i+a.extraSize).inspect()}),i+=a.extraSize}return n},d.prototype._readDataDescriptor=function(e,t){if(t){var n=r.parse(e).word32lu(`dataDescriptorSignature`).word32lu(`crc32`).word64lu(`compressedSize`).word64lu(`uncompressedSize`).vars;return n}var n=r.parse(e).word32lu(`dataDescriptorSignature`).word32lu(`crc32`).word32lu(`compressedSize`).word32lu(`uncompressedSize`).vars;return n},d.prototype._readCentralDirectoryEntry=function(e){return r.parse(e).word16lu(`versionMadeBy`).word16lu(`versionsNeededToExtract`).word16lu(`flags`).word16lu(`compressionMethod`).word16lu(`lastModifiedTime`).word16lu(`lastModifiedDate`).word32lu(`crc32`).word32lu(`compressedSize`).word32lu(`uncompressedSize`).word16lu(`fileNameLength`).word16lu(`extraFieldLength`).word16lu(`fileCommentLength`).word16lu(`diskNumber`).word16lu(`internalFileAttributes`).word32lu(`externalFileAttributes`).word32lu(`offsetToLocalFileHeader`).vars},d.prototype._readEndOfCentralDirectory64=function(e){return r.parse(e).word64lu(`centralDirectoryRecordSize`).word16lu(`versionMadeBy`).word16lu(`versionsNeededToExtract`).word32lu(`diskNumber`).word32lu(`diskNumberWithCentralDirectoryStart`).word64lu(`centralDirectoryEntries`).word64lu(`totalCentralDirectoryEntries`).word64lu(`sizeOfCentralDirectory`).word64lu(`offsetToStartOfCentralDirectory`).vars},d.prototype._readEndOfCentralDirectory=function(e){return r.parse(e).word16lu(`diskNumber`).word16lu(`diskStart`).word16lu(`centralDirectoryEntries`).word16lu(`totalCentralDirectoryEntries`).word32lu(`sizeOfCentralDirectory`).word32lu(`offsetToStartOfCentralDirectory`).word16lu(`commentLength`).vars},d.prototype._decodeString=function(e,t){if(t)return e.toString(`utf8`);if(this.options.decodeString)return this.options.decodeString(e);let n=``;for(var r=0;r?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ `[e[r]];return n},d.prototype._parseOrOutput=function(e,t){for(var n;(n=this.processDataChunk(this.data))>0&&(this.data=this.data.slice(n),this.data.length!==0););if(this.state===l.FILE_DATA){if(this.outStreamInfo.limit>=0){var r=this.outStreamInfo.limit-this.outStreamInfo.written,i;r{if(this.state===l.FILE_DATA_END)return this.state=l.START,a.end(t);t()})}return}t()},d.prototype.drainAll=function(){this._drainAllEntries=!0},d.prototype._transform=function(e,t,n){var r=this;r.data.length>0?r.data=Buffer.concat([r.data,e]):r.data=e;var i=r.data.length,a=function(){if(r.data.length>0&&r.data.length0){t._parseOrOutput(`buffer`,function(){if(t.data.length>0)return setImmediate(function(){t._flush(e)});e()});return}if(t.state===l.FILE_DATA)return e(Error(`Stream finished in an invalid state, uncompression failed`));setImmediate(e)},n.exports=d})),gR=i(((e,n)=>{var r=t(`stream`).Transform,i=t(`util`),a=hR();function o(e){if(!(this instanceof o))return new o(e);r.call(this,{readableObjectMode:!0}),this.opts=e||{},this.unzipStream=new a(this.opts);var t=this;this.unzipStream.on(`entry`,function(e){t.push(e)}),this.unzipStream.on(`error`,function(e){t.emit(`error`,e)})}i.inherits(o,r),o.prototype._transform=function(e,t,n){this.unzipStream.write(e,t,n)},o.prototype._flush=function(e){var t=this;this.unzipStream.end(function(){process.nextTick(function(){t.emit(`close`)}),e()})},o.prototype.on=function(e,t){return e===`entry`?r.prototype.on.call(this,`data`,t):r.prototype.on.call(this,e,t)},o.prototype.drainAll=function(){return this.unzipStream.drainAll(),this.pipe(new r({objectMode:!0,transform:function(e,t,n){n()}}))},n.exports=o})),_R=i(((e,n)=>{var r=t(`path`),i=t(`fs`),a=511;n.exports=o.mkdirp=o.mkdirP=o;function o(e,t,n,s){typeof t==`function`?(n=t,t={}):(!t||typeof t!=`object`)&&(t={mode:t});var c=t.mode,l=t.fs||i;c===void 0&&(c=a),s||=null;var u=n||function(){};e=r.resolve(e),l.mkdir(e,c,function(n){if(!n)return s||=e,u(null,s);switch(n.code){case`ENOENT`:if(r.dirname(e)===e)return u(n);o(r.dirname(e),t,function(n,r){n?u(n,r):o(e,t,u,r)});break;default:l.stat(e,function(e,t){e||!t.isDirectory()?u(n,s):u(null,s)});break}})}o.sync=function e(t,n,o){(!n||typeof n!=`object`)&&(n={mode:n});var s=n.mode,c=n.fs||i;s===void 0&&(s=a),o||=null,t=r.resolve(t);try{c.mkdirSync(t,s),o||=t}catch(i){switch(i.code){case`ENOENT`:o=e(r.dirname(t),n,o),e(t,n,o);break;default:var l;try{l=c.statSync(t)}catch{throw i}if(!l.isDirectory())throw i;break}}return o}})),vR=i(((e,n)=>{var r=t(`fs`),i=t(`path`),a=t(`util`),o=_R(),s=t(`stream`).Transform,c=hR();function l(e){if(!(this instanceof l))return new l(e);s.call(this),this.opts=e||{},this.unzipStream=new c(this.opts),this.unfinishedEntries=0,this.afterFlushWait=!1,this.createdDirectories={};var t=this;this.unzipStream.on(`entry`,this._processEntry.bind(this)),this.unzipStream.on(`error`,function(e){t.emit(`error`,e)})}a.inherits(l,s),l.prototype._transform=function(e,t,n){this.unzipStream.write(e,t,n)},l.prototype._flush=function(e){var t=this,n=function(){process.nextTick(function(){t.emit(`close`)}),e()};this.unzipStream.end(function(){if(t.unfinishedEntries>0)return t.afterFlushWait=!0,t.on(`await-finished`,n);n()})},l.prototype._processEntry=function(e){var t=this,n=i.join(this.opts.path,e.path),a=e.isDirectory?n:i.dirname(n);this.unfinishedEntries++;var s=function(){var i=r.createWriteStream(n);i.on(`close`,function(){t.unfinishedEntries--,t._notifyAwaiter()}),i.on(`error`,function(e){t.emit(`error`,e)}),e.pipe(i)};if(this.createdDirectories[a]||a===`.`)return s();o(a,function(n){if(n)return t.emit(`error`,n);if(t.createdDirectories[a]=!0,e.isDirectory){t.unfinishedEntries--,t._notifyAwaiter();return}s()})},l.prototype._notifyAwaiter=function(){this.afterFlushWait&&this.unfinishedEntries===0&&(this.emit(`await-finished`),this.afterFlushWait=!1)},n.exports=l})),yR=n(i((e=>{e.Parse=gR(),e.Extract=vR()}))(),1),bR=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const xR=e=>{let t=new URL(e);return t.search=``,t.toString()};function SR(e){return bR(this,void 0,void 0,function*(){try{return yield Qe.access(e),!0}catch(e){if(e.code===`ENOENT`)return!1;throw e}})}function CR(e,t,n){return bR(this,void 0,void 0,function*(){let r=0;for(;r<5;)try{return yield wR(e,t,{skipDecompress:n})}catch(e){r++,K(`Failed to download artifact after ${r} retries due to ${e.message}. Retrying in 5 seconds...`),yield new Promise(e=>setTimeout(e,5e3))}throw Error(`Artifact download failed after ${r} retries.`)})}function wR(e,t){return bR(this,arguments,void 0,function*(e,t,n={}){let{timeout:r=30*1e3,skipDecompress:i=!1}=n,a=yield new hr(FN()).get(e);if(a.message.statusCode!==200)throw Error(`Unexpected HTTP response from blob storage: ${a.message.statusCode} ${a.message.statusMessage}`);let o=a.message.headers[`content-type`]||``,s=o.split(`;`,1)[0].trim().toLowerCase(),c=new URL(e).pathname.toLowerCase().endsWith(`.zip`),l=s===`application/zip`||s===`application/x-zip-compressed`||s===`application/zip-compressed`||c,u=a.message.headers[`content-disposition`]||``,d=`artifact`,f=u.match(/filename\*\s*=\s*UTF-8''([^;\r\n]*)/i),p=u.match(/(?{let o=setTimeout(()=>{let e=Error(`Blob storage chunk did not respond in ${r}ms`);a.message.destroy(e),n(e)},r),s=e=>{K(`response.message: Artifact download failed: ${e.message}`),clearTimeout(o),n(e)},c=de.createHash(`sha256`).setEncoding(`hex`),u=new Ye.PassThrough().on(`data`,()=>{o.refresh()}).on(`error`,s);a.message.pipe(u),u.pipe(c);let f=()=>{clearTimeout(o),c&&(c.end(),h=c.read(),vi(`SHA256 digest of downloaded artifact is ${h}`)),e({sha256Digest:`sha256:${h}`})};if(l&&!i)u.pipe(yR.Extract({path:t})).on(`close`,f).on(`error`,s);else{let e=U.join(t,d),n=fe.createWriteStream(e);vi(`Downloading raw file (non-zip) to: ${e}`),u.pipe(n).on(`close`,f).on(`error`,s)}})})}function TR(e,t,n,r,i){return bR(this,void 0,void 0,function*(){let a=yield DR(i?.path),o=yu(r),s=!1;vi(`Downloading artifact '${e}' from '${t}/${n}'`);let{headers:c,status:l}=yield o.rest.actions.downloadArtifact({owner:t,repo:n,artifact_id:e,archive_format:`zip`,request:{redirect:`manual`}});if(l!==302)throw Error(`Unable to download artifact. Unexpected status: ${l}`);let{location:u}=c;if(!u)throw Error(`Unable to redirect to artifact download url`);vi(`Redirecting to blob download url: ${xR(u)}`);try{vi(`Starting download of artifact to: ${a}`);let e=yield CR(u,a,i?.skipDecompress);vi(`Artifact download completed successfully.`),i?.expectedHash&&i?.expectedHash!==e.sha256Digest&&(s=!0,K(`Computed digest: ${e.sha256Digest}`),K(`Expected digest: ${i.expectedHash}`))}catch(e){throw Error(`Unable to download and extract artifact: ${e.message}`)}return{downloadPath:a,digestMismatch:s}})}function ER(e,t){return bR(this,void 0,void 0,function*(){let n=yield DR(t?.path),r=QN(),i=!1,{workflowRunBackendId:a,workflowJobRunBackendId:o}=qN(),s={workflowRunBackendId:a,workflowJobRunBackendId:o,idFilter:pN.create({value:e.toString()})},{artifacts:c}=yield r.ListArtifacts(s);if(c.length===0)throw new RN(`No artifacts found for ID: ${e}\nAre you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`);c.length>1&&_i(`Multiple artifacts found, defaulting to first.`);let l={workflowRunBackendId:c[0].workflowRunBackendId,workflowJobRunBackendId:c[0].workflowJobRunBackendId,name:c[0].name},{signedUrl:u}=yield r.GetSignedArtifactURL(l);vi(`Redirecting to blob download url: ${xR(u)}`);try{vi(`Starting download of artifact to: ${n}`);let e=yield CR(u,n,t?.skipDecompress);vi(`Artifact download completed successfully.`),t?.expectedHash&&t?.expectedHash!==e.sha256Digest&&(i=!0,K(`Computed digest: ${e.sha256Digest}`),K(`Expected digest: ${t.expectedHash}`))}catch(e){throw Error(`Unable to download and extract artifact: ${e.message}`)}return{downloadPath:n,digestMismatch:i}})}function DR(){return bR(this,arguments,void 0,function*(e=cN()){return(yield SR(e))?K(`Artifact destination folder already exists: ${e}`):(K(`Artifact destination folder does not exist, creating: ${e}`),yield Qe.mkdir(e,{recursive:!0})),e})}const OR=[400,401,403,404,422];function kR(e,t=5,n=OR){if(t<=0)return[{enabled:!1},e.request];let r={enabled:!0};n.length>0&&(r.doNotRetry=n);let i=Object.assign(Object.assign({},e.request),{retries:t});return K(`GitHub client configured with: (retries: ${i.retries}, retry-exempt-status-code: ${r.doNotRetry??`octokit default: [400, 401, 403, 404, 422]`})`),[r,i]}function AR(e){e.hook.wrap(`request`,(t,n)=>{e.log.debug(`request`,n);let r=Date.now(),i=e.request.endpoint.parse(n),a=i.url.replace(n.baseUrl,``);return t(n).then(t=>{let n=t.headers[`x-github-request-id`];return e.log.info(`${i.method} ${a} - ${t.status} with id ${n} in ${Date.now()-r}ms`),t}).catch(t=>{let n=t.response?.headers[`x-github-request-id`]||`UNKNOWN`;throw e.log.error(`${i.method} ${a} - ${t.status} with id ${n} in ${Date.now()-r}ms`),t})})}AR.VERSION=`6.0.0`;var jR=n(i(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.Bottleneck=r()})(e,(function(){var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function t(e){return e&&e.default||e}var n={load:function(e,t,n={}){var r,i;for(r in t)i=t[r],n[r]=e[r]??i;return n},overwrite:function(e,t,n={}){var r,i;for(r in e)i=e[r],t[r]!==void 0&&(n[r]=i);return n}},r=class{constructor(e,t){this.incr=e,this.decr=t,this._first=null,this._last=null,this.length=0}push(e){var t;this.length++,typeof this.incr==`function`&&this.incr(),t={value:e,prev:this._last,next:null},this._last==null?this._first=this._last=t:(this._last.next=t,this._last=t)}shift(){var e;if(this._first!=null)return this.length--,typeof this.decr==`function`&&this.decr(),e=this._first.value,(this._first=this._first.next)==null?this._last=null:this._first.prev=null,e}first(){if(this._first!=null)return this._first.value}getArray(){for(var e=this._first,t,n=[];e!=null;)n.push((t=e,e=e.next,t.value));return n}forEachShift(e){for(var t=this.shift();t!=null;)e(t),t=this.shift()}debug(){for(var e=this._first,t,n=[];e!=null;)n.push((t=e,e=e.next,{value:t.value,prev:t.prev?.value,next:t.next?.value}));return n}},i=class{constructor(e){if(this.instance=e,this._events={},this.instance.on!=null||this.instance.once!=null||this.instance.removeAllListeners!=null)throw Error(`An Emitter already exists for this object`);this.instance.on=(e,t)=>this._addListener(e,`many`,t),this.instance.once=(e,t)=>this._addListener(e,`once`,t),this.instance.removeAllListeners=(e=null)=>e==null?this._events={}:delete this._events[e]}_addListener(e,t,n){var r;return(r=this._events)[e]??(r[e]=[]),this._events[e].push({cb:n,status:t}),this.instance}listenerCount(e){return this._events[e]==null?0:this._events[e].length}async trigger(e,...t){var n,r;try{return e!==`debug`&&this.trigger(`debug`,`Event triggered: ${e}`,t),this._events[e]==null?void 0:(this._events[e]=this._events[e].filter(function(e){return e.status!==`none`}),r=this._events[e].map(async e=>{var n,r;if(e.status!==`none`){e.status===`once`&&(e.status=`none`);try{return r=typeof e.cb==`function`?e.cb(...t):void 0,typeof r?.then==`function`?await r:r}catch(e){return n=e,this.trigger(`error`,n),null}}}),(await Promise.all(r)).find(function(e){return e!=null}))}catch(e){return n=e,this.trigger(`error`,n),null}}},a=r,o=i,s=class{constructor(e){this.Events=new o(this),this._length=0,this._lists=(function(){var t,n,r=[];for(t=1,n=e;1<=n?t<=n:t>=n;1<=n?++t:--t)r.push(new a((()=>this.incr()),(()=>this.decr())));return r}).call(this)}incr(){if(this._length++===0)return this.Events.trigger(`leftzero`)}decr(){if(--this._length===0)return this.Events.trigger(`zero`)}push(e){return this._lists[e.options.priority].push(e)}queued(e){return e==null?this._length:this._lists[e].length}shiftAll(e){return this._lists.forEach(function(t){return t.forEachShift(e)})}getFirst(e=this._lists){var t,n,r;for(t=0,n=e.length;t0)return r;return[]}shiftLastFrom(e){return this.getFirst(this._lists.slice(e).reverse()).shift()}},c=class extends Error{},l,u,d,f=10,p;u=5,p=n,l=c,d=class{constructor(e,t,n,r,i,a,o,s){this.task=e,this.args=t,this.rejectOnDrop=i,this.Events=a,this._states=o,this.Promise=s,this.options=p.load(n,r),this.options.priority=this._sanitizePriority(this.options.priority),this.options.id===r.id&&(this.options.id=`${this.options.id}-${this._randomIndex()}`),this.promise=new this.Promise((e,t)=>{this._resolve=e,this._reject=t}),this.retryCount=0}_sanitizePriority(e){var t=~~e===e?e:u;return t<0?0:t>f-1?f-1:t}_randomIndex(){return Math.random().toString(36).slice(2)}doDrop({error:e,message:t=`This job has been dropped by Bottleneck`}={}){return this._states.remove(this.options.id)?(this.rejectOnDrop&&this._reject(e??new l(t)),this.Events.trigger(`dropped`,{args:this.args,options:this.options,task:this.task,promise:this.promise}),!0):!1}_assertStatus(e){var t=this._states.jobStatus(this.options.id);if(!(t===e||e===`DONE`&&t===null))throw new l(`Invalid job status ${t}, expected ${e}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`)}doReceive(){return this._states.start(this.options.id),this.Events.trigger(`received`,{args:this.args,options:this.options})}doQueue(e,t){return this._assertStatus(`RECEIVED`),this._states.next(this.options.id),this.Events.trigger(`queued`,{args:this.args,options:this.options,reachedHWM:e,blocked:t})}doRun(){return this.retryCount===0?(this._assertStatus(`QUEUED`),this._states.next(this.options.id)):this._assertStatus(`EXECUTING`),this.Events.trigger(`scheduled`,{args:this.args,options:this.options})}async doExecute(e,t,n,r){var i,a,o;this.retryCount===0?(this._assertStatus(`RUNNING`),this._states.next(this.options.id)):this._assertStatus(`EXECUTING`),a={args:this.args,options:this.options,retryCount:this.retryCount},this.Events.trigger(`executing`,a);try{if(o=await(e==null?this.task(...this.args):e.schedule(this.options,this.task,...this.args)),t())return this.doDone(a),await r(this.options,a),this._assertStatus(`DONE`),this._resolve(o)}catch(e){return i=e,this._onFailure(i,a,t,n,r)}}doExpire(e,t,n){var r,i;return this._states.jobStatus(this.options.id===`RUNNING`)&&this._states.next(this.options.id),this._assertStatus(`EXECUTING`),i={args:this.args,options:this.options,retryCount:this.retryCount},r=new l(`This job timed out after ${this.options.expiration} ms.`),this._onFailure(r,i,e,t,n)}async _onFailure(e,t,n,r,i){var a,o;if(n())return a=await this.Events.trigger(`failed`,e,t),a==null?(this.doDone(t),await i(this.options,t),this._assertStatus(`DONE`),this._reject(e)):(o=~~a,this.Events.trigger(`retry`,`Retrying ${this.options.id} after ${o} ms`,t),this.retryCount++,r(o))}doDone(e){return this._assertStatus(`EXECUTING`),this._states.next(this.options.id),this.Events.trigger(`done`,e)}};var m=d,h,g,v=n;h=c,g=class{constructor(e,t,n){this.instance=e,this.storeOptions=t,this.clientId=this.instance._randomIndex(),v.load(n,n,this),this._nextRequest=this._lastReservoirRefresh=this._lastReservoirIncrease=Date.now(),this._running=0,this._done=0,this._unblockTime=0,this.ready=this.Promise.resolve(),this.clients={},this._startHeartbeat()}_startHeartbeat(){var e;return this.heartbeat==null&&(this.storeOptions.reservoirRefreshInterval!=null&&this.storeOptions.reservoirRefreshAmount!=null||this.storeOptions.reservoirIncreaseInterval!=null&&this.storeOptions.reservoirIncreaseAmount!=null)?typeof(e=this.heartbeat=setInterval(()=>{var e,t,n,r=Date.now(),i;if(this.storeOptions.reservoirRefreshInterval!=null&&r>=this._lastReservoirRefresh+this.storeOptions.reservoirRefreshInterval&&(this._lastReservoirRefresh=r,this.storeOptions.reservoir=this.storeOptions.reservoirRefreshAmount,this.instance._drainAll(this.computeCapacity())),this.storeOptions.reservoirIncreaseInterval!=null&&r>=this._lastReservoirIncrease+this.storeOptions.reservoirIncreaseInterval&&({reservoirIncreaseAmount:e,reservoirIncreaseMaximum:n,reservoir:i}=this.storeOptions,this._lastReservoirIncrease=r,t=n==null?e:Math.min(e,n-i),t>0))return this.storeOptions.reservoir+=t,this.instance._drainAll(this.computeCapacity())},this.heartbeatInterval)).unref==`function`?e.unref():void 0:clearInterval(this.heartbeat)}async __publish__(e){return await this.yieldLoop(),this.instance.Events.trigger(`message`,e.toString())}async __disconnect__(e){return await this.yieldLoop(),clearInterval(this.heartbeat),this.Promise.resolve()}yieldLoop(e=0){return new this.Promise(function(t,n){return setTimeout(t,e)})}computePenalty(){return this.storeOptions.penalty??(15*this.storeOptions.minTime||5e3)}async __updateSettings__(e){return await this.yieldLoop(),v.overwrite(e,e,this.storeOptions),this._startHeartbeat(),this.instance._drainAll(this.computeCapacity()),!0}async __running__(){return await this.yieldLoop(),this._running}async __queued__(){return await this.yieldLoop(),this.instance.queued()}async __done__(){return await this.yieldLoop(),this._done}async __groupCheck__(e){return await this.yieldLoop(),this._nextRequest+this.timeout=e}check(e,t){return this.conditionsCheck(e)&&this._nextRequest-t<=0}async __check__(e){var t;return await this.yieldLoop(),t=Date.now(),this.check(e,t)}async __register__(e,t,n){var r,i;return await this.yieldLoop(),r=Date.now(),this.conditionsCheck(t)?(this._running+=t,this.storeOptions.reservoir!=null&&(this.storeOptions.reservoir-=t),i=Math.max(this._nextRequest-r,0),this._nextRequest=r+i+this.storeOptions.minTime,{success:!0,wait:i,reservoir:this.storeOptions.reservoir}):{success:!1}}strategyIsBlock(){return this.storeOptions.strategy===3}async __submit__(e,t){var n,r,i;if(await this.yieldLoop(),this.storeOptions.maxConcurrent!=null&&t>this.storeOptions.maxConcurrent)throw new h(`Impossible to add a job having a weight of ${t} to a limiter having a maxConcurrent setting of ${this.storeOptions.maxConcurrent}`);return r=Date.now(),i=this.storeOptions.highWater!=null&&e===this.storeOptions.highWater&&!this.check(t,r),n=this.strategyIsBlock()&&(i||this.isBlocked(r)),n&&(this._unblockTime=r+this.computePenalty(),this._nextRequest=this._unblockTime+this.storeOptions.minTime,this.instance._dropAllQueued()),{reachedHWM:i,blocked:n,strategy:this.storeOptions.strategy}}async __free__(e,t){return await this.yieldLoop(),this._running-=t,this._done+=t,this.instance._drainAll(this.computeCapacity()),{running:this._running}}};var y=g,b=c,x=class{constructor(e){this.status=e,this._jobs={},this.counts=this.status.map(function(){return 0})}next(e){var t=this._jobs[e],n=t+1;if(t!=null&&n(e[this.status[n]]=t,e)),{})}},S=r,C=class{constructor(e,t){this.schedule=this.schedule.bind(this),this.name=e,this.Promise=t,this._running=0,this._queue=new S}isEmpty(){return this._queue.length===0}async _tryToRun(){var e,t,n,r,i,a,o;if(this._running<1&&this._queue.length>0)return this._running++,{task:o,args:e,resolve:i,reject:r}=this._queue.shift(),t=await(async function(){try{return a=await o(...e),function(){return i(a)}}catch(e){return n=e,function(){return r(n)}}})(),this._running--,this._tryToRun(),t()}schedule(e,...t){var n,r,i=r=null;return n=new this.Promise(function(e,t){return i=e,r=t}),this._queue.push({task:e,args:t,resolve:i,reject:r}),this._tryToRun(),n}},w=`2.19.5`,T=Object.freeze({version:w,default:{version:w}}),E=()=>console.log(`You must import the full version of Bottleneck in order to use this feature.`),D=()=>console.log(`You must import the full version of Bottleneck in order to use this feature.`),O=()=>console.log(`You must import the full version of Bottleneck in order to use this feature.`),k,A,j,M,N,P=n;k=i,M=E,j=D,N=O,A=(function(){class e{constructor(e={}){this.deleteKey=this.deleteKey.bind(this),this.limiterOptions=e,P.load(this.limiterOptions,this.defaults,this),this.Events=new k(this),this.instances={},this.Bottleneck=de,this._startAutoCleanup(),this.sharedConnection=this.connection!=null,this.connection??(this.limiterOptions.datastore===`redis`?this.connection=new M(Object.assign({},this.limiterOptions,{Events:this.Events})):this.limiterOptions.datastore===`ioredis`&&(this.connection=new j(Object.assign({},this.limiterOptions,{Events:this.Events}))))}key(e=``){return this.instances[e]??(()=>{var t=this.instances[e]=new this.Bottleneck(Object.assign(this.limiterOptions,{id:`${this.id}-${e}`,timeout:this.timeout,connection:this.connection}));return this.Events.trigger(`created`,t,e),t})()}async deleteKey(e=``){var t,n=this.instances[e];return this.connection&&(t=await this.connection.__runCommand__([`del`,...N.allKeys(`${this.id}-${e}`)])),n!=null&&(delete this.instances[e],await n.disconnect()),n!=null||t>0}limiters(){var e,t=this.instances,n=[],r;for(e in t)r=t[e],n.push({key:e,limiter:r});return n}keys(){return Object.keys(this.instances)}async clusterKeys(){var e,t,n,r,i,a,o,s,c;if(this.connection==null)return this.Promise.resolve(this.keys());for(a=[],e=null,c=`b_${this.id}-`.length,t=9;e!==0;)for([s,n]=await this.connection.__runCommand__([`scan`,e??0,`match`,`b_${this.id}-*_settings`,`count`,1e4]),e=~~s,r=0,o=n.length;r{var e,t,n,r,i=Date.now(),a;for(t in n=this.instances,r=[],n){a=n[t];try{await a._store.__groupCheck__(i)?r.push(this.deleteKey(t)):r.push(void 0)}catch(t){e=t,r.push(a.Events.trigger(`error`,e))}}return r},this.timeout/2)).unref==`function`?e.unref():void 0}updateSettings(e={}){if(P.overwrite(e,this.defaults,this),P.overwrite(e,e,this.limiterOptions),e.timeout!=null)return this._startAutoCleanup()}disconnect(e=!0){if(!this.sharedConnection)return this.connection?.disconnect(e)}}return e.prototype.defaults={timeout:1e3*60*5,connection:null,Promise,id:`group-key`},e}).call(e);var F=A,I,L,R=n;L=i,I=(function(){class e{constructor(e={}){this.options=e,R.load(this.options,this.defaults,this),this.Events=new L(this),this._arr=[],this._resetPromise(),this._lastFlush=Date.now()}_resetPromise(){return this._promise=new this.Promise((e,t)=>this._resolve=e)}_flush(){return clearTimeout(this._timeout),this._lastFlush=Date.now(),this._resolve(),this.Events.trigger(`batch`,this._arr),this._arr=[],this._resetPromise()}add(e){var t;return this._arr.push(e),t=this._promise,this._arr.length===this.maxSize?this._flush():this.maxTime!=null&&this._arr.length===1&&(this._timeout=setTimeout(()=>this._flush(),this.maxTime)),t}}return e.prototype.defaults={maxTime:null,maxSize:null,Promise},e}).call(e);var z=I,ee=()=>console.log(`You must import the full version of Bottleneck in order to use this feature.`),B=t(T),te,V,ne,re,H,ie,ae,oe,se,ce,le,ue=[].splice;ie=10,V=5,le=n,ae=s,re=m,H=y,oe=ee,ne=i,se=x,ce=C,te=(function(){class e{constructor(t={},...n){var r,i;this._addToQueue=this._addToQueue.bind(this),this._validateOptions(t,n),le.load(t,this.instanceDefaults,this),this._queues=new ae(ie),this._scheduled={},this._states=new se([`RECEIVED`,`QUEUED`,`RUNNING`,`EXECUTING`].concat(this.trackDoneStatus?[`DONE`]:[])),this._limiter=null,this.Events=new ne(this),this._submitLock=new ce(`submit`,this.Promise),this._registerLock=new ce(`register`,this.Promise),i=le.load(t,this.storeDefaults,{}),this._store=(function(){if(this.datastore===`redis`||this.datastore===`ioredis`||this.connection!=null)return r=le.load(t,this.redisStoreDefaults,{}),new oe(this,i,r);if(this.datastore===`local`)return r=le.load(t,this.localStoreDefaults,{}),new H(this,i,r);throw new e.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`)}).call(this),this._queues.on(`leftzero`,()=>{var e;return(e=this._store.heartbeat)==null?void 0:typeof e.ref==`function`?e.ref():void 0}),this._queues.on(`zero`,()=>{var e;return(e=this._store.heartbeat)==null?void 0:typeof e.unref==`function`?e.unref():void 0})}_validateOptions(t,n){if(!(typeof t==`object`&&t&&n.length===0))throw new e.prototype.BottleneckError(`Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1.`)}ready(){return this._store.ready}clients(){return this._store.clients}channel(){return`b_${this.id}`}channel_client(){return`b_${this.id}_${this._store.clientId}`}publish(e){return this._store.__publish__(e)}disconnect(e=!0){return this._store.__disconnect__(e)}chain(e){return this._limiter=e,this}queued(e){return this._queues.queued(e)}clusterQueued(){return this._store.__queued__()}empty(){return this.queued()===0&&this._submitLock.isEmpty()}running(){return this._store.__running__()}done(){return this._store.__done__()}jobStatus(e){return this._states.jobStatus(e)}jobs(e){return this._states.statusJobs(e)}counts(){return this._states.statusCounts()}_randomIndex(){return Math.random().toString(36).slice(2)}check(e=1){return this._store.__check__(e)}_clearGlobalState(e){return this._scheduled[e]==null?!1:(clearTimeout(this._scheduled[e].expiration),delete this._scheduled[e],!0)}async _free(e,t,n,r){var i,a;try{if({running:a}=await this._store.__free__(e,n.weight),this.Events.trigger(`debug`,`Freed ${n.id}`,r),a===0&&this.empty())return this.Events.trigger(`idle`)}catch(e){return i=e,this.Events.trigger(`error`,i)}}_run(e,t,n){var r,i,a;return t.doRun(),r=this._clearGlobalState.bind(this,e),a=this._run.bind(this,e,t),i=this._free.bind(this,e,t),this._scheduled[e]={timeout:setTimeout(()=>t.doExecute(this._limiter,r,a,i),n),expiration:t.options.expiration==null?void 0:setTimeout(function(){return t.doExpire(r,a,i)},n+t.options.expiration),job:t}}_drainOne(e){return this._registerLock.schedule(()=>{var t,n,r,i,a;return this.queued()===0||(a=this._queues.getFirst(),{options:i,args:t}=r=a.first(),e!=null&&i.weight>e)?this.Promise.resolve(null):(this.Events.trigger(`debug`,`Draining ${i.id}`,{args:t,options:i}),n=this._randomIndex(),this._store.__register__(n,i.weight,i.expiration).then(({success:e,wait:o,reservoir:s})=>{var c;return this.Events.trigger(`debug`,`Drained ${i.id}`,{success:e,args:t,options:i}),e?(a.shift(),c=this.empty(),c&&this.Events.trigger(`empty`),s===0&&this.Events.trigger(`depleted`,c),this._run(n,r,o),this.Promise.resolve(i.weight)):this.Promise.resolve(null)}))})}_drainAll(e,t=0){return this._drainOne(e).then(n=>{var r;return n==null?this.Promise.resolve(t):(r=e==null?e:e-n,this._drainAll(r,t+n))}).catch(e=>this.Events.trigger(`error`,e))}_dropAllQueued(e){return this._queues.shiftAll(function(t){return t.doDrop({message:e})})}stop(t={}){var n,r;return t=le.load(t,this.stopDefaults),r=e=>{var t=()=>{var t=this._states.counts;return t[0]+t[1]+t[2]+t[3]===e};return new this.Promise((e,n)=>t()?e():this.on(`done`,()=>{if(t())return this.removeAllListeners(`done`),e()}))},n=t.dropWaitingJobs?(this._run=function(e,n){return n.doDrop({message:t.dropErrorMessage})},this._drainOne=()=>this.Promise.resolve(null),this._registerLock.schedule(()=>this._submitLock.schedule(()=>{var e,n=this._scheduled,i;for(e in n)i=n[e],this.jobStatus(i.job.options.id)===`RUNNING`&&(clearTimeout(i.timeout),clearTimeout(i.expiration),i.job.doDrop({message:t.dropErrorMessage}));return this._dropAllQueued(t.dropErrorMessage),r(0)}))):this.schedule({priority:ie-1,weight:0},()=>r(1)),this._receive=function(n){return n._reject(new e.prototype.BottleneckError(t.enqueueErrorMessage))},this.stop=()=>this.Promise.reject(new e.prototype.BottleneckError(`stop() has already been called`)),n}async _addToQueue(t){var n,r,i,a,o,s,c;({args:n,options:a}=t);try{({reachedHWM:o,blocked:r,strategy:c}=await this._store.__submit__(this.queued(),a.weight))}catch(e){return i=e,this.Events.trigger(`debug`,`Could not queue ${a.id}`,{args:n,options:a,error:i}),t.doDrop({error:i}),!1}return r?(t.doDrop(),!0):o&&(s=c===e.prototype.strategy.LEAK?this._queues.shiftLastFrom(a.priority):c===e.prototype.strategy.OVERFLOW_PRIORITY?this._queues.shiftLastFrom(a.priority+1):c===e.prototype.strategy.OVERFLOW?t:void 0,s?.doDrop(),s==null||c===e.prototype.strategy.OVERFLOW)?(s??t.doDrop(),o):(t.doQueue(o,r),this._queues.push(t),await this._drainAll(),o)}_receive(t){return this._states.jobStatus(t.options.id)==null?(t.doReceive(),this._submitLock.schedule(this._addToQueue,t)):(t._reject(new e.prototype.BottleneckError(`A job with the same id already exists (id=${t.options.id})`)),!1)}submit(...e){var t,n,r,i,a,o,s;return typeof e[0]==`function`?(a=e,[n,...e]=a,[t]=ue.call(e,-1),i=le.load({},this.jobDefaults)):(o=e,[i,n,...e]=o,[t]=ue.call(e,-1),i=le.load(i,this.jobDefaults)),s=(...e)=>new this.Promise(function(t,r){return n(...e,function(...e){return(e[0]==null?t:r)(e)})}),r=new re(s,e,i,this.jobDefaults,this.rejectOnDrop,this.Events,this._states,this.Promise),r.promise.then(function(e){return typeof t==`function`?t(...e):void 0}).catch(function(e){return Array.isArray(e)?typeof t==`function`?t(...e):void 0:typeof t==`function`?t(e):void 0}),this._receive(r)}schedule(...e){var t,n,r;return typeof e[0]==`function`?([r,...e]=e,n={}):[n,r,...e]=e,t=new re(r,e,n,this.jobDefaults,this.rejectOnDrop,this.Events,this._states,this.Promise),this._receive(t),t.promise}wrap(e){var t=this.schedule.bind(this),n=function(...n){return t(e.bind(this),...n)};return n.withOptions=function(n,...r){return t(n,e,...r)},n}async updateSettings(e={}){return await this._store.__updateSettings__(le.overwrite(e,this.storeDefaults)),le.overwrite(e,this.instanceDefaults,this),this}currentReservoir(){return this._store.__currentReservoir__()}incrementReservoir(e=0){return this._store.__incrementReservoir__(e)}}return e.default=e,e.Events=ne,e.version=e.prototype.version=B.version,e.strategy=e.prototype.strategy={LEAK:1,OVERFLOW:2,OVERFLOW_PRIORITY:4,BLOCK:3},e.BottleneckError=e.prototype.BottleneckError=c,e.Group=e.prototype.Group=F,e.RedisConnection=e.prototype.RedisConnection=E,e.IORedisConnection=e.prototype.IORedisConnection=D,e.Batcher=e.prototype.Batcher=z,e.prototype.jobDefaults={priority:V,weight:1,expiration:null,id:``},e.prototype.storeDefaults={maxConcurrent:null,minTime:0,highWater:null,strategy:e.prototype.strategy.LEAK,penalty:null,reservoir:null,reservoirRefreshInterval:null,reservoirRefreshAmount:null,reservoirIncreaseInterval:null,reservoirIncreaseAmount:null,reservoirIncreaseMaximum:null},e.prototype.localStoreDefaults={Promise,timeout:null,heartbeatInterval:250},e.prototype.redisStoreDefaults={Promise,timeout:null,heartbeatInterval:5e3,clientTimeout:1e4,Redis:null,clientOptions:{},clusterNodes:null,clearDatastore:!1,connection:null},e.prototype.instanceDefaults={datastore:`local`,connection:null,id:``,rejectOnDrop:!0,trackDoneStatus:!1,Promise},e.prototype.stopDefaults={enqueueErrorMessage:`This limiter has been stopped and cannot accept new jobs.`,dropWaitingJobs:!0,dropErrorMessage:`This limiter has been stopped.`},e}).call(e);var de=te;return de}))}))(),1),MR=`0.0.0-development`;function NR(e){return e.request!==void 0}async function PR(e,t,n,r){if(!NR(n)||!n?.request.request)throw n;if(n.status>=400&&!e.doNotRetry.includes(n.status)){let i=r.request.retries==null?e.retries:r.request.retries,a=((r.request.retryCount||0)+1)**2;throw t.retry.retryRequest(n,i,a)}throw n}async function FR(e,t,n,r){let i=new jR.default;return i.on(`failed`,function(t,n){let i=~~t.request.request?.retries,a=~~t.request.request?.retryAfter;if(r.request.retryCount=n.retryCount+1,i>n.retryCount)return a*e.retryAfterBaseValue}),i.schedule(IR.bind(null,e,t,n),r)}async function IR(e,t,n,r){let i=await n(r);return i.data&&i.data.errors&&i.data.errors.length>0&&/Something went wrong while executing your query/.test(i.data.errors[0].message)?PR(e,t,new bl(i.data.errors[0].message,500,{request:r,response:i}),r):i}function LR(e,t){let n=Object.assign({enabled:!0,retryAfterBaseValue:1e3,doNotRetry:[400,401,403,404,410,422,451],retries:3},t.retry),r={retry:{retryRequest:(e,t,n)=>(e.request.request=Object.assign({},e.request.request,{retries:t,retryAfter:n}),e)}};return n.enabled&&(e.hook.error(`request`,PR.bind(null,n,r)),e.hook.wrap(`request`,FR.bind(null,n,r))),r}LR.VERSION=MR;var RR=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function zR(e,t,n,r,i){return RR(this,void 0,void 0,function*(){let[a,o]=kR(hu),s=yield yu(i,{log:void 0,userAgent:FN(),previews:void 0,retry:a,request:o},LR,AR).request(`GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}`,{owner:n,repo:r,run_id:t,name:e});if(s.status!==200)throw new LN(`Invalid response from GitHub API: ${s.status} (${s?.headers?.[`x-github-request-id`]})`);if(s.data.artifacts.length===0)throw new RN(`Artifact not found for name: ${e} Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact. - For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let c=s.data.artifacts[0];return s.data.artifacts.length>1&&(c=s.data.artifacts.sort((e,t)=>t.id-e.id)[0],K(`More than one artifact found for a single name, returning newest (id: ${c.id})`)),{artifact:{name:c.name,id:c.id,size:c.size_in_bytes,createdAt:c.created_at?new Date(c.created_at):void 0,digest:c.digest}}})}function fI(e){return uI(this,void 0,void 0,function*(){let t=Tj(),{workflowRunBackendId:n,workflowJobRunBackendId:r}=bj(),i={workflowRunBackendId:n,workflowJobRunBackendId:r,nameFilter:VA.create({value:e})},a=yield t.ListArtifacts(i);if(a.artifacts.length===0)throw new dj(`Artifact not found for name: ${e} + For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let c=s.data.artifacts[0];return s.data.artifacts.length>1&&(c=s.data.artifacts.sort((e,t)=>t.id-e.id)[0],K(`More than one artifact found for a single name, returning newest (id: ${c.id})`)),{artifact:{name:c.name,id:c.id,size:c.size_in_bytes,createdAt:c.created_at?new Date(c.created_at):void 0,digest:c.digest}}})}function BR(e){return RR(this,void 0,void 0,function*(){let t=QN(),{workflowRunBackendId:n,workflowJobRunBackendId:r}=qN(),i={workflowRunBackendId:n,workflowJobRunBackendId:r,nameFilter:mN.create({value:e})},a=yield t.ListArtifacts(i);if(a.artifacts.length===0)throw new RN(`Artifact not found for name: ${e} Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact. - For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let o=a.artifacts[0];return a.artifacts.length>1&&(o=a.artifacts.sort((e,t)=>Number(t.databaseId)-Number(e.databaseId))[0],K(`More than one artifact found for a single name, returning newest (id: ${o.databaseId})`)),{artifact:{name:o.name,id:Number(o.databaseId),size:Number(o.size),createdAt:o.createdAt?zA.toDate(o.createdAt):void 0,digest:o.digest?.value}}})}var pI=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function mI(e,t,n,r,i){return pI(this,void 0,void 0,function*(){let[a,o]=tI(Go),s=Yo(i,{log:void 0,userAgent:cj(),previews:void 0,retry:a,request:o},lI,nI),c=yield dI(e,t,n,r,i),l=yield s.rest.actions.deleteArtifact({owner:n,repo:r,artifact_id:c.artifact.id});if(l.status!==204)throw new uj(`Invalid response from GitHub API: ${l.status} (${l?.headers?.[`x-github-request-id`]})`);return{id:c.artifact.id}})}function hI(e){return pI(this,void 0,void 0,function*(){let t=Tj(),{workflowRunBackendId:n,workflowJobRunBackendId:r}=bj(),i={workflowRunBackendId:n,workflowJobRunBackendId:r,nameFilter:VA.create({value:e})},a=yield t.ListArtifacts(i);if(a.artifacts.length===0)throw new dj(`Artifact not found for name: ${e}`);let o=a.artifacts[0];a.artifacts.length>1&&(o=a.artifacts.sort((e,t)=>Number(t.databaseId)-Number(e.databaseId))[0],K(`More than one artifact found for a single name, returning newest (id: ${o.databaseId})`));let s={workflowRunBackendId:o.workflowRunBackendId,workflowJobRunBackendId:o.workflowJobRunBackendId,name:o.name},c=yield t.DeleteArtifact(s);return gi(`Artifact '${e}' (ID: ${c.artifactId}) deleted`),{id:Number(c.artifactId)}})}var gI=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const _I=RA(),vI=Math.ceil(_I/100);function yI(e,t,n,r){return gI(this,arguments,void 0,function*(e,t,n,r,i=!1){gi(`Fetching artifact list for workflow run ${e} in repository ${t}/${n}`);let a=[],[o,s]=tI(Go),c=Yo(r,{log:void 0,userAgent:cj(),previews:void 0,retry:o,request:s},lI,nI),l=1,{data:u}=yield c.request(`GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts`,{owner:t,repo:n,run_id:e,per_page:100,page:l}),d=Math.ceil(u.total_count/100),f=u.total_count;f>_I&&(hi(`Workflow run ${e} has ${f} artifacts, exceeding the limit of ${_I}. Results will be incomplete as only the first ${_I} artifacts will be returned`),d=vI);for(let e of u.artifacts)a.push({name:e.name,id:e.id,size:e.size_in_bytes,createdAt:e.created_at?new Date(e.created_at):void 0,digest:e.digest});for(l++;l<=d;l++){K(`Fetching page ${l} of artifact list`);let{data:r}=yield c.request(`GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts`,{owner:t,repo:n,run_id:e,per_page:100,page:l});for(let e of r.artifacts)a.push({name:e.name,id:e.id,size:e.size_in_bytes,createdAt:e.created_at?new Date(e.created_at):void 0,digest:e.digest})}return i&&(a=xI(a)),gi(`Found ${a.length} artifact(s)`),{artifacts:a}})}function bI(){return gI(this,arguments,void 0,function*(e=!1){let t=Tj(),{workflowRunBackendId:n,workflowJobRunBackendId:r}=bj(),i={workflowRunBackendId:n,workflowJobRunBackendId:r},a=(yield t.ListArtifacts(i)).artifacts.map(e=>({name:e.name,id:Number(e.databaseId),size:Number(e.size),createdAt:e.createdAt?zA.toDate(e.createdAt):void 0,digest:e.digest?.value}));return e&&(a=xI(a)),gi(`Found ${a.length} artifact(s)`),{artifacts:a}})}function xI(e){e.sort((e,t)=>t.id-e.id);let t=[],n=new Set;for(let r of e)n.has(r.name)||(t.push(r),n.add(r.name));return t}var SI=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},CI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i1&&(o=a.artifacts.sort((e,t)=>Number(t.databaseId)-Number(e.databaseId))[0],K(`More than one artifact found for a single name, returning newest (id: ${o.databaseId})`)),{artifact:{name:o.name,id:Number(o.databaseId),size:Number(o.size),createdAt:o.createdAt?fN.toDate(o.createdAt):void 0,digest:o.digest?.value}}})}var VR=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function HR(e,t,n,r,i){return VR(this,void 0,void 0,function*(){let[a,o]=kR(hu),s=yu(i,{log:void 0,userAgent:FN(),previews:void 0,retry:a,request:o},LR,AR),c=yield zR(e,t,n,r,i),l=yield s.rest.actions.deleteArtifact({owner:n,repo:r,artifact_id:c.artifact.id});if(l.status!==204)throw new LN(`Invalid response from GitHub API: ${l.status} (${l?.headers?.[`x-github-request-id`]})`);return{id:c.artifact.id}})}function UR(e){return VR(this,void 0,void 0,function*(){let t=QN(),{workflowRunBackendId:n,workflowJobRunBackendId:r}=qN(),i={workflowRunBackendId:n,workflowJobRunBackendId:r,nameFilter:mN.create({value:e})},a=yield t.ListArtifacts(i);if(a.artifacts.length===0)throw new RN(`Artifact not found for name: ${e}`);let o=a.artifacts[0];a.artifacts.length>1&&(o=a.artifacts.sort((e,t)=>Number(t.databaseId)-Number(e.databaseId))[0],K(`More than one artifact found for a single name, returning newest (id: ${o.databaseId})`));let s={workflowRunBackendId:o.workflowRunBackendId,workflowJobRunBackendId:o.workflowJobRunBackendId,name:o.name},c=yield t.DeleteArtifact(s);return vi(`Artifact '${e}' (ID: ${c.artifactId}) deleted`),{id:Number(c.artifactId)}})}var WR=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const GR=dN(),KR=Math.ceil(GR/100);function qR(e,t,n,r){return WR(this,arguments,void 0,function*(e,t,n,r,i=!1){vi(`Fetching artifact list for workflow run ${e} in repository ${t}/${n}`);let a=[],[o,s]=kR(hu),c=yu(r,{log:void 0,userAgent:FN(),previews:void 0,retry:o,request:s},LR,AR),l=1,{data:u}=yield c.request(`GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts`,{owner:t,repo:n,run_id:e,per_page:100,page:l}),d=Math.ceil(u.total_count/100),f=u.total_count;f>GR&&(_i(`Workflow run ${e} has ${f} artifacts, exceeding the limit of ${GR}. Results will be incomplete as only the first ${GR} artifacts will be returned`),d=KR);for(let e of u.artifacts)a.push({name:e.name,id:e.id,size:e.size_in_bytes,createdAt:e.created_at?new Date(e.created_at):void 0,digest:e.digest});for(l++;l<=d;l++){K(`Fetching page ${l} of artifact list`);let{data:r}=yield c.request(`GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts`,{owner:t,repo:n,run_id:e,per_page:100,page:l});for(let e of r.artifacts)a.push({name:e.name,id:e.id,size:e.size_in_bytes,createdAt:e.created_at?new Date(e.created_at):void 0,digest:e.digest})}return i&&(a=YR(a)),vi(`Found ${a.length} artifact(s)`),{artifacts:a}})}function JR(){return WR(this,arguments,void 0,function*(e=!1){let t=QN(),{workflowRunBackendId:n,workflowJobRunBackendId:r}=qN(),i={workflowRunBackendId:n,workflowJobRunBackendId:r},a=(yield t.ListArtifacts(i)).artifacts.map(e=>({name:e.name,id:Number(e.databaseId),size:Number(e.size),createdAt:e.createdAt?fN.toDate(e.createdAt):void 0,digest:e.digest?.value}));return e&&(a=YR(a)),vi(`Found ${a.length} artifact(s)`),{artifacts:a}})}function YR(e){e.sort((e,t)=>t.id-e.id);let t=[],n=new Set;for(let r of e)n.has(r.name)||(t.push(r),n.add(r.name));return t}var XR=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},ZR=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{var r=(a(),e(o)),l=s(),u=c(),d=i(),f=t(`node:crypto`),p=t(`node:fs`),m=t(`node:os`),h=t(`node:path`),g=class e{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300*1e3;constructor(e,t,n){this.profileData=e,this.init=t,this.callerClientConfig=n}async loadCredentials(){let t=await this.loadToken();if(!t)throw new l.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let n=t.accessToken,r=Date.now();return new Date(n.expiresAt).getTime()-r<=e.REFRESH_THRESHOLD?this.refresh(t):{accessKeyId:n.accessKeyId,secretAccessKey:n.secretAccessKey,sessionToken:n.sessionToken,accountId:n.accountId,expiration:new Date(n.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(e){let{SigninClient:t,CreateOAuth2TokenCommand:n}=await import(`./signin-mtMDXBSv.js`),{logger:r,userAgentAppId:i}=this.callerClientConfig??{},a=(e=>e?.metadata?.handlerProtocol===`h2`)(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,o=new t({credentials:{accessKeyId:``,secretAccessKey:``},region:this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,requestHandler:a,logger:r,userAgentAppId:i,...this.init?.clientConfig});this.createDPoPInterceptor(o.middlewareStack);let s={tokenInput:{clientId:e.clientId,refreshToken:e.refreshToken,grantType:`refresh_token`}};try{let t=await o.send(new n(s)),{accessKeyId:r,secretAccessKey:i,sessionToken:a}=t.tokenOutput?.accessToken??{},{refreshToken:c,expiresIn:u}=t.tokenOutput??{};if(!r||!i||!a||!c)throw new l.CredentialsProviderError(`Token refresh response missing required fields`,{logger:this.logger,tryNextLink:!1});let d=(u??900)*1e3,f=new Date(Date.now()+d),p={...e,accessToken:{...e.accessToken,accessKeyId:r,secretAccessKey:i,sessionToken:a,expiresAt:f.toISOString()},refreshToken:c};await this.saveToken(p);let m=p.accessToken;return{accessKeyId:m.accessKeyId,secretAccessKey:m.secretAccessKey,sessionToken:m.sessionToken,accountId:m.accountId,expiration:f}}catch(e){if(e.name===`AccessDeniedException`){let t=e.error,n;switch(t){case`TOKEN_EXPIRED`:n=`Your session has expired. Please reauthenticate.`;break;case`USER_CREDENTIALS_CHANGED`:n=`Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.`;break;case`INSUFFICIENT_PERMISSIONS`:n=`Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.`;break;default:n=`Failed to refresh token: ${String(e)}. Please re-authenticate using \`aws login\``}throw new l.CredentialsProviderError(n,{logger:this.logger,tryNextLink:!1})}throw new l.CredentialsProviderError(`Failed to refresh token: ${String(e)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let e=this.getTokenFilePath();try{let t;try{t=await u.readFile(e,{ignoreCache:this.init?.ignoreCache})}catch{t=await p.promises.readFile(e,`utf8`)}let n=JSON.parse(t),r=[`accessToken`,`clientId`,`refreshToken`,`dpopKey`].filter(e=>!n[e]);if(n.accessToken?.accountId||r.push(`accountId`),r.length>0)throw new l.CredentialsProviderError(`Token validation failed, missing fields: ${r.join(`, `)}`,{logger:this.logger,tryNextLink:!1});return n}catch(t){throw new l.CredentialsProviderError(`Failed to load token from ${e}: ${String(t)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(e){let t=this.getTokenFilePath(),n=h.dirname(t);try{await p.promises.mkdir(n,{recursive:!0})}catch{}await p.promises.writeFile(t,JSON.stringify(e,null,2),`utf8`)}getTokenFilePath(){let e=process.env.AWS_LOGIN_CACHE_DIRECTORY??h.join(m.homedir(),`.aws`,`login`,`cache`),t=Buffer.from(this.loginSession,`utf8`),n=f.createHash(`sha256`).update(t).digest(`hex`);return h.join(e,`${n}.json`)}derToRawSignature(e){let t=2;if(e[t]!==2)throw Error(`Invalid DER signature`);t++;let n=e[t++],r=e.subarray(t,t+n);if(t+=n,e[t]!==2)throw Error(`Invalid DER signature`);t++;let i=e[t++],a=e.subarray(t,t+i);r=r[0]===0?r.subarray(1):r,a=a[0]===0?a.subarray(1):a;let o=Buffer.concat([Buffer.alloc(32-r.length),r]),s=Buffer.concat([Buffer.alloc(32-a.length),a]);return Buffer.concat([o,s])}createDPoPInterceptor(e){e.add(e=>async t=>{if(d.HttpRequest.isInstance(t.request)){let e=t.request,n=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:``}${e.path}`,r=await this.generateDpop(e.method,n);e.headers={...e.headers,DPoP:r}}return e(t)},{step:`finalizeRequest`,name:`dpopInterceptor`,override:!0})}async generateDpop(e=`POST`,t){let n=await this.loadToken();try{let r=f.createPrivateKey({key:n.dpopKey,format:`pem`,type:`sec1`}),i=f.createPublicKey(r).export({format:`der`,type:`spki`}),a=-1;for(let e=0;easync({callerClientConfig:t}={})=>{e?.logger?.debug?.(`@aws-sdk/credential-providers - fromLoginCredentials`);let n=await u.parseKnownFiles(e||{}),i=u.getProfileName({profile:e?.profile??t?.profile}),a=n[i];if(!a?.login_session)throw new l.CredentialsProviderError(`Profile ${i} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});let o=await new g(a,e,t).loadCredentials();return r.setCredentialFeature(o,`CREDENTIALS_LOGIN`,`AD`)}})),u=r((t=>{var r=c(),i=s(),u=(a(),e(o)),d=l();let f=(e,t,r)=>{let a={EcsContainer:async e=>{let{fromHttp:t}=await import(`./dist-cjs-B9IZmIkA.js`).then(e=>n(e.default)),{fromContainerMetadata:a}=await import(`./dist-cjs-Cp2qKG5f.js`).then(e=>n(e.default));return r?.debug(`@aws-sdk/credential-provider-ini - credential_source is EcsContainer`),async()=>i.chain(t(e??{}),a(e))().then(p)},Ec2InstanceMetadata:async e=>{r?.debug(`@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata`);let{fromInstanceMetadata:t}=await import(`./dist-cjs-Cp2qKG5f.js`).then(e=>n(e.default));return async()=>t(e)().then(p)},Environment:async e=>{r?.debug(`@aws-sdk/credential-provider-ini - credential_source is Environment`);let{fromEnv:t}=await import(`./dist-cjs-DyvddXh_.js`).then(e=>n(e.default));return async()=>t(e)().then(p)}};if(e in a)return a[e];throw new i.CredentialsProviderError(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r})},p=e=>u.setCredentialFeature(e,`CREDENTIALS_PROFILE_NAMED_PROVIDER`,`p`),m=(e,{profile:t=`default`,logger:n}={})=>!!e&&typeof e==`object`&&typeof e.role_arn==`string`&&[`undefined`,`string`].indexOf(typeof e.role_session_name)>-1&&[`undefined`,`string`].indexOf(typeof e.external_id)>-1&&[`undefined`,`string`].indexOf(typeof e.mfa_serial)>-1&&(h(e,{profile:t,logger:n})||g(e,{profile:t,logger:n})),h=(e,{profile:t,logger:n})=>{let r=typeof e.source_profile==`string`&&e.credential_source===void 0;return r&&n?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),r},g=(e,{profile:t,logger:n})=>{let r=typeof e.credential_source==`string`&&e.source_profile===void 0;return r&&n?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`),r},_=async(e,t,n,a,o={},s)=>{n.logger?.debug(`@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)`);let c=t[e],{source_profile:l,region:d}=c;if(!n.roleAssumer){let{getDefaultRoleAssumer:e}=await import(`./sts-DNrP3XaX.js`);n.roleAssumer=e({...n.clientConfig,credentialProviderLogger:n.logger,parentClientConfig:{...a,...n?.parentClientConfig,region:d??n?.parentClientConfig?.region??a?.region}},n.clientPlugins)}if(l&&l in o)throw new i.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${r.getProfileName(n)}. Profiles visited: `+Object.keys(o).join(`, `),{logger:n.logger});n.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${l?`source_profile=[${l}]`:`profile=[${e}]`}`);let p=l?s(l,t,n,a,{...o,[l]:!0},v(t[l]??{})):(await f(c.credential_source,e,n.logger)(n))();if(v(c))return p.then(e=>u.setCredentialFeature(e,`CREDENTIALS_PROFILE_SOURCE_PROFILE`,`o`));{let t={RoleArn:c.role_arn,RoleSessionName:c.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:c.external_id,DurationSeconds:parseInt(c.duration_seconds||`3600`,10)},{mfa_serial:r}=c;if(r){if(!n.mfaCodeProvider)throw new i.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:n.logger,tryNextLink:!1});t.SerialNumber=r,t.TokenCode=await n.mfaCodeProvider(r)}let a=await p;return n.roleAssumer(a,t).then(e=>u.setCredentialFeature(e,`CREDENTIALS_PROFILE_SOURCE_PROFILE`,`o`))}},v=e=>!e.role_arn&&!!e.credential_source,y=e=>!!(e&&e.login_session),b=async(e,t,n)=>{let r=await d.fromLoginCredentials({...t,profile:e})({callerClientConfig:n});return u.setCredentialFeature(r,`CREDENTIALS_PROFILE_LOGIN`,`AC`)},x=e=>!!e&&typeof e==`object`&&typeof e.credential_process==`string`,S=async(e,t)=>import(`./dist-cjs-Bvzte9iG.js`).then(e=>n(e.default)).then(({fromProcess:n})=>n({...e,profile:t})().then(e=>u.setCredentialFeature(e,`CREDENTIALS_PROFILE_PROCESS`,`v`))),C=async(e,t,r={},i)=>{let{fromSSO:a}=await import(`./dist-cjs-BG7BRI_J.js`).then(e=>n(e.default));return a({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:i}).then(e=>t.sso_session?u.setCredentialFeature(e,`CREDENTIALS_PROFILE_SSO`,`r`):u.setCredentialFeature(e,`CREDENTIALS_PROFILE_SSO_LEGACY`,`t`))},w=e=>e&&(typeof e.sso_start_url==`string`||typeof e.sso_account_id==`string`||typeof e.sso_session==`string`||typeof e.sso_region==`string`||typeof e.sso_role_name==`string`),T=e=>!!e&&typeof e==`object`&&typeof e.aws_access_key_id==`string`&&typeof e.aws_secret_access_key==`string`&&[`undefined`,`string`].indexOf(typeof e.aws_session_token)>-1&&[`undefined`,`string`].indexOf(typeof e.aws_account_id)>-1,E=async(e,t)=>{t?.logger?.debug(`@aws-sdk/credential-provider-ini - resolveStaticCredentials`);let n={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return u.setCredentialFeature(n,`CREDENTIALS_PROFILE`,`n`)},D=e=>!!e&&typeof e==`object`&&typeof e.web_identity_token_file==`string`&&typeof e.role_arn==`string`&&[`undefined`,`string`].indexOf(typeof e.role_session_name)>-1,O=async(e,t,r)=>import(`./dist-cjs-qMH96PP6.js`).then(e=>n(e.default)).then(({fromTokenFile:n})=>n({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r}).then(e=>u.setCredentialFeature(e,`CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN`,`q`))),k=async(e,t,n,r,a={},o=!1)=>{let s=t[e];if(Object.keys(a).length>0&&T(s))return E(s,n);if(o||m(s,{profile:e,logger:n.logger}))return _(e,t,n,r,a,k);if(T(s))return E(s,n);if(D(s))return O(s,n,r);if(x(s))return S(n,e);if(w(s))return await C(e,s,n,r);if(y(s))return b(e,n,r);throw new i.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:n.logger})};t.fromIni=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug(`@aws-sdk/credential-provider-ini - fromIni`);let n=await r.parseKnownFiles(e);return k(r.getProfileName({profile:e.profile??t?.profile}),n,e,t)}}));export default u();export{}; \ No newline at end of file +import{a as e,i as t,o as n,t as r}from"./chunk-Bdh3yLIe.js";import{t as i}from"./dist-cjs-BU-OH1DU.js";import{n as a,t as o}from"./client-D8hez-QA.js";import{t as s}from"./dist-cjs-DJKA3UWR.js";import{t as c}from"./dist-cjs-Dia4jG8x.js";var l=r((n=>{var r=(a(),e(o)),l=s(),u=c(),d=i(),f=t(`node:crypto`),p=t(`node:fs`),m=t(`node:os`),h=t(`node:path`),g=class e{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300*1e3;constructor(e,t,n){this.profileData=e,this.init=t,this.callerClientConfig=n}async loadCredentials(){let t=await this.loadToken();if(!t)throw new l.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let n=t.accessToken,r=Date.now();return new Date(n.expiresAt).getTime()-r<=e.REFRESH_THRESHOLD?this.refresh(t):{accessKeyId:n.accessKeyId,secretAccessKey:n.secretAccessKey,sessionToken:n.sessionToken,accountId:n.accountId,expiration:new Date(n.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(e){let{SigninClient:t,CreateOAuth2TokenCommand:n}=await import(`./signin-DQvIXhZH.js`),{logger:r,userAgentAppId:i}=this.callerClientConfig??{},a=(e=>e?.metadata?.handlerProtocol===`h2`)(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,o=new t({credentials:{accessKeyId:``,secretAccessKey:``},region:this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,requestHandler:a,logger:r,userAgentAppId:i,...this.init?.clientConfig});this.createDPoPInterceptor(o.middlewareStack);let s={tokenInput:{clientId:e.clientId,refreshToken:e.refreshToken,grantType:`refresh_token`}};try{let t=await o.send(new n(s)),{accessKeyId:r,secretAccessKey:i,sessionToken:a}=t.tokenOutput?.accessToken??{},{refreshToken:c,expiresIn:u}=t.tokenOutput??{};if(!r||!i||!a||!c)throw new l.CredentialsProviderError(`Token refresh response missing required fields`,{logger:this.logger,tryNextLink:!1});let d=(u??900)*1e3,f=new Date(Date.now()+d),p={...e,accessToken:{...e.accessToken,accessKeyId:r,secretAccessKey:i,sessionToken:a,expiresAt:f.toISOString()},refreshToken:c};await this.saveToken(p);let m=p.accessToken;return{accessKeyId:m.accessKeyId,secretAccessKey:m.secretAccessKey,sessionToken:m.sessionToken,accountId:m.accountId,expiration:f}}catch(e){if(e.name===`AccessDeniedException`){let t=e.error,n;switch(t){case`TOKEN_EXPIRED`:n=`Your session has expired. Please reauthenticate.`;break;case`USER_CREDENTIALS_CHANGED`:n=`Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.`;break;case`INSUFFICIENT_PERMISSIONS`:n=`Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.`;break;default:n=`Failed to refresh token: ${String(e)}. Please re-authenticate using \`aws login\``}throw new l.CredentialsProviderError(n,{logger:this.logger,tryNextLink:!1})}throw new l.CredentialsProviderError(`Failed to refresh token: ${String(e)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let e=this.getTokenFilePath();try{let t;try{t=await u.readFile(e,{ignoreCache:this.init?.ignoreCache})}catch{t=await p.promises.readFile(e,`utf8`)}let n=JSON.parse(t),r=[`accessToken`,`clientId`,`refreshToken`,`dpopKey`].filter(e=>!n[e]);if(n.accessToken?.accountId||r.push(`accountId`),r.length>0)throw new l.CredentialsProviderError(`Token validation failed, missing fields: ${r.join(`, `)}`,{logger:this.logger,tryNextLink:!1});return n}catch(t){throw new l.CredentialsProviderError(`Failed to load token from ${e}: ${String(t)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(e){let t=this.getTokenFilePath(),n=h.dirname(t);try{await p.promises.mkdir(n,{recursive:!0})}catch{}await p.promises.writeFile(t,JSON.stringify(e,null,2),`utf8`)}getTokenFilePath(){let e=process.env.AWS_LOGIN_CACHE_DIRECTORY??h.join(m.homedir(),`.aws`,`login`,`cache`),t=Buffer.from(this.loginSession,`utf8`),n=f.createHash(`sha256`).update(t).digest(`hex`);return h.join(e,`${n}.json`)}derToRawSignature(e){let t=2;if(e[t]!==2)throw Error(`Invalid DER signature`);t++;let n=e[t++],r=e.subarray(t,t+n);if(t+=n,e[t]!==2)throw Error(`Invalid DER signature`);t++;let i=e[t++],a=e.subarray(t,t+i);r=r[0]===0?r.subarray(1):r,a=a[0]===0?a.subarray(1):a;let o=Buffer.concat([Buffer.alloc(32-r.length),r]),s=Buffer.concat([Buffer.alloc(32-a.length),a]);return Buffer.concat([o,s])}createDPoPInterceptor(e){e.add(e=>async t=>{if(d.HttpRequest.isInstance(t.request)){let e=t.request,n=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:``}${e.path}`,r=await this.generateDpop(e.method,n);e.headers={...e.headers,DPoP:r}}return e(t)},{step:`finalizeRequest`,name:`dpopInterceptor`,override:!0})}async generateDpop(e=`POST`,t){let n=await this.loadToken();try{let r=f.createPrivateKey({key:n.dpopKey,format:`pem`,type:`sec1`}),i=f.createPublicKey(r).export({format:`der`,type:`spki`}),a=-1;for(let e=0;easync({callerClientConfig:t}={})=>{e?.logger?.debug?.(`@aws-sdk/credential-providers - fromLoginCredentials`);let n=await u.parseKnownFiles(e||{}),i=u.getProfileName({profile:e?.profile??t?.profile}),a=n[i];if(!a?.login_session)throw new l.CredentialsProviderError(`Profile ${i} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});let o=await new g(a,e,t).loadCredentials();return r.setCredentialFeature(o,`CREDENTIALS_LOGIN`,`AD`)}})),u=r((t=>{var r=c(),i=s(),u=(a(),e(o)),d=l();let f=(e,t,r)=>{let a={EcsContainer:async e=>{let{fromHttp:t}=await import(`./dist-cjs-B9IZmIkA.js`).then(e=>n(e.default)),{fromContainerMetadata:a}=await import(`./dist-cjs-Cp2qKG5f.js`).then(e=>n(e.default));return r?.debug(`@aws-sdk/credential-provider-ini - credential_source is EcsContainer`),async()=>i.chain(t(e??{}),a(e))().then(p)},Ec2InstanceMetadata:async e=>{r?.debug(`@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata`);let{fromInstanceMetadata:t}=await import(`./dist-cjs-Cp2qKG5f.js`).then(e=>n(e.default));return async()=>t(e)().then(p)},Environment:async e=>{r?.debug(`@aws-sdk/credential-provider-ini - credential_source is Environment`);let{fromEnv:t}=await import(`./dist-cjs-DyvddXh_.js`).then(e=>n(e.default));return async()=>t(e)().then(p)}};if(e in a)return a[e];throw new i.CredentialsProviderError(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r})},p=e=>u.setCredentialFeature(e,`CREDENTIALS_PROFILE_NAMED_PROVIDER`,`p`),m=(e,{profile:t=`default`,logger:n}={})=>!!e&&typeof e==`object`&&typeof e.role_arn==`string`&&[`undefined`,`string`].indexOf(typeof e.role_session_name)>-1&&[`undefined`,`string`].indexOf(typeof e.external_id)>-1&&[`undefined`,`string`].indexOf(typeof e.mfa_serial)>-1&&(h(e,{profile:t,logger:n})||g(e,{profile:t,logger:n})),h=(e,{profile:t,logger:n})=>{let r=typeof e.source_profile==`string`&&e.credential_source===void 0;return r&&n?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),r},g=(e,{profile:t,logger:n})=>{let r=typeof e.credential_source==`string`&&e.source_profile===void 0;return r&&n?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`),r},_=async(e,t,n,a,o={},s)=>{n.logger?.debug(`@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)`);let c=t[e],{source_profile:l,region:d}=c;if(!n.roleAssumer){let{getDefaultRoleAssumer:e}=await import(`./sts-CrgoKTJR.js`);n.roleAssumer=e({...n.clientConfig,credentialProviderLogger:n.logger,parentClientConfig:{...a,...n?.parentClientConfig,region:d??n?.parentClientConfig?.region??a?.region}},n.clientPlugins)}if(l&&l in o)throw new i.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${r.getProfileName(n)}. Profiles visited: `+Object.keys(o).join(`, `),{logger:n.logger});n.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${l?`source_profile=[${l}]`:`profile=[${e}]`}`);let p=l?s(l,t,n,a,{...o,[l]:!0},v(t[l]??{})):(await f(c.credential_source,e,n.logger)(n))();if(v(c))return p.then(e=>u.setCredentialFeature(e,`CREDENTIALS_PROFILE_SOURCE_PROFILE`,`o`));{let t={RoleArn:c.role_arn,RoleSessionName:c.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:c.external_id,DurationSeconds:parseInt(c.duration_seconds||`3600`,10)},{mfa_serial:r}=c;if(r){if(!n.mfaCodeProvider)throw new i.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:n.logger,tryNextLink:!1});t.SerialNumber=r,t.TokenCode=await n.mfaCodeProvider(r)}let a=await p;return n.roleAssumer(a,t).then(e=>u.setCredentialFeature(e,`CREDENTIALS_PROFILE_SOURCE_PROFILE`,`o`))}},v=e=>!e.role_arn&&!!e.credential_source,y=e=>!!(e&&e.login_session),b=async(e,t,n)=>{let r=await d.fromLoginCredentials({...t,profile:e})({callerClientConfig:n});return u.setCredentialFeature(r,`CREDENTIALS_PROFILE_LOGIN`,`AC`)},x=e=>!!e&&typeof e==`object`&&typeof e.credential_process==`string`,S=async(e,t)=>import(`./dist-cjs-Bvzte9iG.js`).then(e=>n(e.default)).then(({fromProcess:n})=>n({...e,profile:t})().then(e=>u.setCredentialFeature(e,`CREDENTIALS_PROFILE_PROCESS`,`v`))),C=async(e,t,r={},i)=>{let{fromSSO:a}=await import(`./dist-cjs-DiCA1R3I.js`).then(e=>n(e.default));return a({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:i}).then(e=>t.sso_session?u.setCredentialFeature(e,`CREDENTIALS_PROFILE_SSO`,`r`):u.setCredentialFeature(e,`CREDENTIALS_PROFILE_SSO_LEGACY`,`t`))},w=e=>e&&(typeof e.sso_start_url==`string`||typeof e.sso_account_id==`string`||typeof e.sso_session==`string`||typeof e.sso_region==`string`||typeof e.sso_role_name==`string`),T=e=>!!e&&typeof e==`object`&&typeof e.aws_access_key_id==`string`&&typeof e.aws_secret_access_key==`string`&&[`undefined`,`string`].indexOf(typeof e.aws_session_token)>-1&&[`undefined`,`string`].indexOf(typeof e.aws_account_id)>-1,E=async(e,t)=>{t?.logger?.debug(`@aws-sdk/credential-provider-ini - resolveStaticCredentials`);let n={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return u.setCredentialFeature(n,`CREDENTIALS_PROFILE`,`n`)},D=e=>!!e&&typeof e==`object`&&typeof e.web_identity_token_file==`string`&&typeof e.role_arn==`string`&&[`undefined`,`string`].indexOf(typeof e.role_session_name)>-1,O=async(e,t,r)=>import(`./dist-cjs-PmUTcsyT.js`).then(e=>n(e.default)).then(({fromTokenFile:n})=>n({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r}).then(e=>u.setCredentialFeature(e,`CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN`,`q`))),k=async(e,t,n,r,a={},o=!1)=>{let s=t[e];if(Object.keys(a).length>0&&T(s))return E(s,n);if(o||m(s,{profile:e,logger:n.logger}))return _(e,t,n,r,a,k);if(T(s))return E(s,n);if(D(s))return O(s,n,r);if(x(s))return S(n,e);if(w(s))return await C(e,s,n,r);if(y(s))return b(e,n,r);throw new i.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:n.logger})};t.fromIni=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug(`@aws-sdk/credential-provider-ini - fromIni`);let n=await r.parseKnownFiles(e);return k(r.getProfileName({profile:e.profile??t?.profile}),n,e,t)}}));export default u();export{}; \ No newline at end of file diff --git a/dist/dist-cjs-DAPjxWOj.js b/dist/dist-cjs-DAPjxWOj.js new file mode 100644 index 00000000..a4158db0 --- /dev/null +++ b/dist/dist-cjs-DAPjxWOj.js @@ -0,0 +1,22 @@ +import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-Bdh3yLIe.js";import{t as o}from"./dist-cjs-DTPeWY3Q.js";import{t as s}from"./dist-cjs-BU-OH1DU.js";import{n as c,r as l,t as u}from"./client-D8hez-QA.js";import{n as d,r as f,t as p}from"./dist-cjs-BKjtSutv.js";import{A as m,B as h,C as g,D as _,L as v,M as y,N as b,O as x,S,T as C,_ as w,a as T,b as E,c as D,d as O,f as ee,g as k,h as A,i as j,j as M,l as te,m as N,n as P,o as F,p as I,r as L,s as ne,t as R,u as z,v as re,w as ie,x as ae,y as B,z as oe}from"./dist-cjs-CHwZlzSt.js";import{t as se}from"./dist-cjs-BLKf4vef.js";import{t as V}from"./dist-cjs-DJKA3UWR.js";import{t as ce}from"./dist-cjs-Dia4jG8x.js";import{t as le}from"./dist-cjs-DHscMTSt.js";var ue=a((e=>{var t=s();function n(e){return e}let r=e=>n=>async r=>{if(!t.HttpRequest.isInstance(r.request))return n(r);let{request:i}=r,{handlerProtocol:a=``}=e.requestHandler.metadata||{};if(a.indexOf(`h2`)>=0&&!i.headers[`:authority`])delete i.headers.host,i.headers[`:authority`]=i.hostname+(i.port?`:`+i.port:``);else if(!i.headers.host){let e=i.hostname;i.port!=null&&(e+=`:${i.port}`),i.headers.host=e}return n(r)},i={name:`hostHeaderMiddleware`,step:`build`,priority:`low`,tags:[`HOST`],override:!0};e.getHostHeaderPlugin=e=>({applyToStack:t=>{t.add(r(e),i)}}),e.hostHeaderMiddleware=r,e.hostHeaderMiddlewareOptions=i,e.resolveHostHeaderConfig=n})),de=a((e=>{let t=()=>(e,t)=>async n=>{try{let r=await e(n),{clientName:i,commandName:a,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=s,u=c??t.inputFilterSensitiveLog,d=l??t.outputFilterSensitiveLog,{$metadata:f,...p}=r.output;return o?.info?.({clientName:i,commandName:a,input:u(n.input),output:d(p),metadata:f}),r}catch(e){let{clientName:r,commandName:i,logger:a,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:s}=o,c=s??t.inputFilterSensitiveLog;throw a?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},n={name:`loggerMiddleware`,tags:[`LOGGER`],step:`initialize`,override:!0};e.getLoggerPlugin=e=>({applyToStack:e=>{e.add(t(),n)}}),e.loggerMiddleware=t,e.loggerMiddlewareOptions=n})),fe=i({InvokeStore:()=>_e,InvokeStoreBase:()=>me}),H,pe,me,he,ge,_e,ve=n((()=>{H={REQUEST_ID:Symbol.for(`_AWS_LAMBDA_REQUEST_ID`),X_RAY_TRACE_ID:Symbol.for(`_AWS_LAMBDA_X_RAY_TRACE_ID`),TENANT_ID:Symbol.for(`_AWS_LAMBDA_TENANT_ID`)},pe=[`true`,`1`].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA??``),pe||(globalThis.awslambda=globalThis.awslambda||{}),me=class{static PROTECTED_KEYS=H;isProtectedKey(e){return Object.values(H).includes(e)}getRequestId(){return this.get(H.REQUEST_ID)??`-`}getXRayTraceId(){return this.get(H.X_RAY_TRACE_ID)}getTenantId(){return this.get(H.TENANT_ID)}},he=class extends me{currentContext;getContext(){return this.currentContext}hasContext(){return this.currentContext!==void 0}get(e){return this.currentContext?.[e]}set(e,t){if(this.isProtectedKey(e))throw Error(`Cannot modify protected Lambda context field: ${String(e)}`);this.currentContext=this.currentContext||{},this.currentContext[e]=t}run(e,t){return this.currentContext=e,t()}},ge=class e extends me{als;static async create(){let t=new e;return t.als=new(await(import(`node:async_hooks`))).AsyncLocalStorage,t}getContext(){return this.als.getStore()}hasContext(){return this.als.getStore()!==void 0}get(e){return this.als.getStore()?.[e]}set(e,t){if(this.isProtectedKey(e))throw Error(`Cannot modify protected Lambda context field: ${String(e)}`);let n=this.als.getStore();if(!n)throw Error(`No context available`);n[e]=t}run(e,t){return this.als.run(e,t)}},(function(e){let t=null;async function n(e){return t||=(async()=>{let t=e===!0||`AWS_LAMBDA_MAX_CONCURRENCY`in process.env?await ge.create():new he;return!pe&&globalThis.awslambda?.InvokeStore?globalThis.awslambda.InvokeStore:(!pe&&globalThis.awslambda&&(globalThis.awslambda.InvokeStore=t),t)})(),t}e.getInstanceAsync=n,e._testing=process.env.AWS_LAMBDA_BENCHMARK_MODE===`1`?{reset:()=>{t=null,globalThis.awslambda?.InvokeStore&&delete globalThis.awslambda.InvokeStore,globalThis.awslambda={InvokeStore:void 0}}}:void 0})(_e||={})})),ye=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.recursionDetectionMiddleware=void 0;let n=(ve(),e(fe)),r=s(),i=`X-Amzn-Trace-Id`;t.recursionDetectionMiddleware=()=>e=>async t=>{let{request:a}=t;if(!r.HttpRequest.isInstance(a))return e(t);let o=Object.keys(a.headers??{}).find(e=>e.toLowerCase()===`x-amzn-trace-id`)??i;if(a.headers.hasOwnProperty(o))return e(t);let s=process.env.AWS_LAMBDA_FUNCTION_NAME,c=process.env._X_AMZN_TRACE_ID,l=(await n.InvokeStore.getInstanceAsync())?.getXRayTraceId()??c,u=e=>typeof e==`string`&&e.length>0;return u(s)&&u(l)&&(a.headers[i]=l),e({...t,request:a})}})),be=a((e=>{var t=ye();let n={step:`build`,tags:[`RECURSION_DETECTION`],name:`recursionDetectionMiddleware`,override:!0,priority:`low`};e.getRecursionDetectionPlugin=e=>({applyToStack:e=>{e.add(t.recursionDetectionMiddleware(),n)}}),Object.prototype.hasOwnProperty.call(t,`__proto__`)&&!Object.prototype.hasOwnProperty.call(e,`__proto__`)&&Object.defineProperty(e,`__proto__`,{enumerable:!0,value:t.__proto__}),Object.keys(t).forEach(function(n){n!==`default`&&!Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])})}));function U(e){return typeof Buffer<`u`?Buffer.alloc(e):new Uint8Array(e)}function xe(e){return e[Se]=!0,e}var Se,Ce=n((()=>{Se=Symbol(`@smithy/core/cbor::tagSymbol`)}));function we(e){G=e,K=new DataView(G.buffer,G.byteOffset,G.byteLength)}function W(e,t){if(e>=t)throw Error(`unexpected end of (decode) payload.`);let n=(G[e]&224)>>5,r=G[e]&31;switch(n){case 0:case 1:case 6:let i,a;if(r<24)i=r,a=1;else switch(r){case 24:case 25:case 26:case 27:let n=He[r],o=n+1;if(a=o,t-e>7,r=(e&124)>>2,i=(e&3)<<8|t,a=n===0?1:-1,o,s;if(r===0){if(i===0)return 0;o=2**-14,s=0}else if(r===31)return i===0?a*(1/0):NaN;else o=2**(r-15),s=1;return s+=i/1024,o*s*a}function Oe(e,t){let n=G[e]&31;if(n<24)return J=1,n;if(n===24||n===25||n===26||n===27){let r=He[n];if(J=r+1,t-e>5,a=G[e]&31;if(i!==3)throw Error(`unexpected major type ${i} in indefinite string.`);if(a===31)throw Error(`nested indefinite string.`);let o=je(e,t);e+=J;for(let e=0;e>5,a=G[e]&31;if(i!==2)throw Error(`unexpected major type ${i} in indefinite string.`);if(a===31)throw Error(`nested indefinite string.`);let o=je(e,t);e+=J;for(let e=0;e=t)throw Error(`unexpected end of map payload.`);let n=(G[e]&224)>>5;if(n!==3)throw Error(`unexpected major type ${n} for map key at index ${e}.`);let r=W(e,t);e+=J;let i=W(e,t);e+=J,a[r]=i}return J=r+(e-i),a}function Ie(e,t){e+=1;let n=e,r={};for(;e=t)throw Error(`unexpected end of map payload.`);if(G[e]===255)return J=e-n+2,r;let i=(G[e]&224)>>5;if(i!==3)throw Error(`unexpected major type ${i} for map key.`);let a=W(e,t);e+=J;let o=W(e,t);e+=J,r[a]=o}throw Error(`expected break marker.`)}function Le(e,t){let n=G[e]&31;switch(n){case 21:case 20:return J=1,n===21;case 22:return J=1,null;case 23:return J=1,null;case 25:if(t-e<3)throw Error(`incomplete float16 at end of buf.`);return J=3,De(G[e+1],G[e+2]);case 26:if(t-e<5)throw Error(`incomplete float32 at end of buf.`);return J=5,K.getFloat32(e+1);case 27:if(t-e<9)throw Error(`incomplete float64 at end of buf.`);return J=9,K.getFloat64(e+1);default:throw Error(`unexpected minor value ${n}.`)}}function Re(e){if(typeof e==`number`)return e;let t=Number(e);return-(2**53-1)<=t&&t<=2**53-1?t:e}var ze,Be,Ve,G,K,q,J,He,Ue=n((()=>{I(),ze=p(),Ce(),Be=typeof TextDecoder<`u`,Ve=typeof Buffer<`u`,G=U(0),K=new DataView(G.buffer,G.byteOffset,G.byteLength),q=Be?new TextDecoder:null,J=0,He={24:1,25:2,26:4,27:8}}));function We(e){X.byteLength-Q=0,n=+!t,r=t?e:-e-1;r<24?X[Q++]=n<<5|r:r<256?(X[Q++]=n<<5|24,X[Q++]=r):r<65536?(X[Q++]=n<<5|25,X[Q++]=r>>8,X[Q++]=r):r<4294967296?(X[Q++]=n<<5|26,Z.setUint32(Q,r),Q+=4):(X[Q++]=n<<5|27,Z.setBigUint64(Q,BigInt(r)),Q+=8);continue}X[Q++]=251,Z.setFloat64(Q,e),Q+=8;continue}else if(typeof e==`bigint`){let t=e>=0,n=+!t,r=t?e:-e-BigInt(1),i=Number(r);if(i<24)X[Q++]=n<<5|i;else if(i<256)X[Q++]=n<<5|24,X[Q++]=i;else if(i<65536)X[Q++]=n<<5|25,X[Q++]=i>>8,X[Q++]=i&255;else if(i<4294967296)X[Q++]=n<<5|26,Z.setUint32(Q,i),Q+=4;else if(r=0;)n[n.byteLength-a]=Number(i&BigInt(255)),i>>=BigInt(8);We(n.byteLength*2),X[Q++]=t?194:195,Ye?Y(2,Buffer.byteLength(n)):Y(2,n.byteLength),X.set(n,Q),Q+=n.byteLength}continue}else if(e===null){X[Q++]=246;continue}else if(typeof e==`boolean`){X[Q++]=224|(e?21:20);continue}else if(e===void 0)throw Error(`@smithy/core/cbor: client may not serialize undefined value.`);else if(Array.isArray(e)){for(let n=e.length-1;n>=0;--n)t.push(e[n]);Y(4,e.length);continue}else if(typeof e.byteLength==`number`){We(e.length*2),Y(2,e.length),X.set(e,Q),Q+=e.byteLength;continue}else if(typeof e==`object`){if(e instanceof A){let n=e.string.indexOf(`.`),r=n===-1?0:n-e.string.length+1,i=BigInt(e.string.replace(`.`,``));X[Q++]=196,t.push(i),t.push(r),Y(4,2);continue}if(e[Se])if(`tag`in e&&`value`in e){t.push(e.value),Y(6,e.tag);continue}else throw Error(`tag encountered with missing fields, need 'tag' and 'value', found: `+JSON.stringify(e));let n=Object.keys(e);for(let r=n.length-1;r>=0;--r){let i=n[r];t.push(e[i]),t.push(i)}Y(5,n.length);continue}throw Error(`data type ${e?.constructor?.name??typeof e} not compatible for encoding.`)}}var Je,Ye,X,Z,Q,Xe=n((()=>{I(),Je=p(),Ce(),Ye=typeof Buffer<`u`,X=U(2048),Z=new DataView(X.buffer,X.byteOffset,X.byteLength),Q=0})),Ze,Qe=n((()=>{Ue(),Xe(),Ze={deserialize(e){return we(e),W(0,e.length)},serialize(e){try{return qe(e),Ge()}catch(e){throw Ge(),e}},resizeEncodingBuffer(e){Ke(e)}}})),$e,et,tt=n((()=>{Ce(),$e=e=>xe({tag:1,value:e.getTime()/1e3}),et=(e,t)=>{let n=e=>{let t=e;return typeof t==`number`&&(t=t.toString()),t.indexOf(`,`)>=0&&(t=t.split(`,`)[0]),t.indexOf(`:`)>=0&&(t=t.split(`:`)[0]),t.indexOf(`#`)>=0&&(t=t.split(`#`)[1]),t};if(t.__type!==void 0)return n(t.__type);let r=Object.keys(t).find(e=>e.toLowerCase()===`code`);if(r&&t[r]!==void 0)return n(t[r])}})),nt,rt,it,at,ot=n((()=>{P(),C(),I(),nt=h(),Qe(),tt(),rt=class extends z{createSerializer(){let e=new it;return e.setSerdeContext(this.serdeContext),e}createDeserializer(){let e=new at;return e.setSerdeContext(this.serdeContext),e}},it=class extends z{value;write(e,t){this.value=this.serialize(e,t)}serialize(e,t){let n=x.of(e);if(t==null)return n.isIdempotencyToken()?(0,B.v4)():t;if(n.isBlobSchema())return typeof t==`string`?(this.serdeContext?.base64Decoder??nt.fromBase64)(t):t;if(n.isTimestampSchema())return $e(typeof t==`number`||typeof t==`bigint`?new Date(Number(t)/1e3|0):t);if(typeof t==`function`||typeof t==`object`){let e=t;if(n.isListSchema()&&Array.isArray(e)){let t=!!n.getMergedTraits().sparse,r=[],i=0;for(let a of e){let e=this.serialize(n.getValueSchema(),a);(e!=null||t)&&(r[i++]=e)}return r}if(e instanceof Date)return $e(e);let r={};if(n.isMapSchema()){let t=!!n.getMergedTraits().sparse;for(let i of Object.keys(e)){let a=this.serialize(n.getValueSchema(),e[i]);(a!=null||t)&&(r[i]=a)}}else if(n.isStructSchema()){for(let[t,i]of n.structIterator()){let n=this.serialize(i,e[t]);n!=null&&(r[t]=n)}if(n.isUnionSchema()&&Array.isArray(e.$unknown)){let[t,n]=e.$unknown;r[t]=n}else if(typeof e.__type==`string`)for(let[t,n]of Object.entries(e))t in r||(r[t]=this.serialize(15,n))}else if(n.isDocumentSchema())for(let t of Object.keys(e))r[t]=this.serialize(n.getValueSchema(),e[t]);else if(n.isBigDecimalSchema())return e;return r}return t}flush(){let e=Ze.serialize(this.value);return this.value=void 0,e}},at=class extends z{read(e,t){let n=Ze.deserialize(t);return this.readValue(e,n)}readValue(e,t){let n=x.of(e);if(n.isTimestampSchema()){if(typeof t==`number`)return w(t);if(typeof t==`object`&&t.tag===1&&`value`in t)return w(t.value)}if(n.isBlobSchema())return typeof t==`string`?(this.serdeContext?.base64Decoder??nt.fromBase64)(t):t;if(t===void 0||typeof t==`boolean`||typeof t==`number`||typeof t==`string`||typeof t==`bigint`||typeof t==`symbol`)return t;if(typeof t==`object`){if(t===null)return null;if(`byteLength`in t||t instanceof Date||n.isDocumentSchema())return t;if(n.isListSchema()){let e=[],r=n.getValueSchema();for(let n of t){let t=this.readValue(r,n);e.push(t)}return e}let e={};if(n.isMapSchema()){let r=n.getValueSchema();for(let n of Object.keys(t))e[n]=this.readValue(r,t[n])}else if(n.isStructSchema()){let r=n.isUnionSchema(),i;r&&(i=new Set(Object.keys(t).filter(e=>e!==`__type`)));for(let[a,o]of n.structIterator())r&&i.delete(a),t[a]!=null&&(e[a]=this.readValue(o,t[a]));if(r&&i?.size===1&&Object.keys(e).length===0){let n=i.values().next().value;e.$unknown=[n,t[n]]}else if(typeof t.__type==`string`)for(let[n,r]of Object.entries(t))n in e||(e[n]=r)}else if(t instanceof A)return t;return e}else return t}}})),st,ct,lt=n((()=>{P(),C(),st=b(),ot(),tt(),ct=class extends D{codec=new rt;serializer=this.codec.createSerializer();deserializer=this.codec.createDeserializer();constructor({defaultNamespace:e,errorTypeRegistries:t}){super({defaultNamespace:e,errorTypeRegistries:t})}getShapeId(){return`smithy.protocols#rpcv2Cbor`}getPayloadCodec(){return this.codec}async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n);if(Object.assign(r.headers,{"content-type":this.getDefaultContentType(),"smithy-protocol":`rpc-v2-cbor`,accept:this.getDefaultContentType()}),y(e.input)===`unit`)delete r.body,delete r.headers[`content-type`];else{r.body||=(this.serializer.write(15,{}),this.serializer.flush());try{r.headers[`content-length`]=String(r.body.byteLength)}catch{}}let{service:i,operation:a}=(0,st.getSmithyContext)(n),o=`/service/${i}/operation/${a}`;return r.path.endsWith(`/`)?r.path+=o.slice(1):r.path+=o,r}async deserializeResponse(e,t,n){return super.deserializeResponse(e,t,n)}async handleError(e,t,n,r,i){let a=et(n,r)??`Unknown`,o={$metadata:i,$fault:n.statusCode<=500?`client`:`server`},s=this.options.defaultNamespace;a.includes(`#`)&&([s]=a.split(`#`));let c=this.compositeErrorRegistry,l=_.for(s);c.copyFrom(l);let u;try{u=c.getSchema(a)}catch{r.Message&&(r.message=r.Message);let e=_.for(`smithy.ts.sdk.synthetic.`+s);c.copyFrom(e);let t=c.getBaseException();if(t){let e=c.getErrorCtor(t);throw Object.assign(new e({name:a}),o,r)}throw Object.assign(Error(a),o,r)}let d=x.of(u),f=c.getErrorCtor(u),p=r.message??r.Message??`Unknown`,m=new f(p),h={};for(let[e,t]of d.structIterator())h[e]=this.deserializer.readValue(t,r[e]);throw Object.assign(m,o,{$fault:d.getMergedTraits().error,message:p},h)}getDefaultContentType(){return`application/cbor`}}})),ut=n((()=>{Qe(),Ce(),tt(),lt(),ot()})),dt,ft,pt=n((()=>{C(),dt=R(),ft=class{queryCompat;errorRegistry;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,t){let n=t.getMemberSchemas(),r=Object.values(n).find(e=>!!e.getMergedTraits().httpPayload);if(r)return r.getMergedTraits().mediaType||(r.isStringSchema()?`text/plain`:r.isBlobSchema()?`application/octet-stream`:e);if(!t.isUnitSchema()&&Object.values(n).find(e=>{let{httpQuery:t,httpQueryParams:n,httpHeader:r,httpLabel:i,httpPrefixHeaders:a}=e.getMergedTraits();return!t&&!n&&!r&&!i&&a===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,t,n,r,i,a){let o=e;e.includes(`#`)&&([,o]=e.split(`#`));let s={$metadata:i,$fault:n.statusCode<500?`client`:`server`};if(!this.errorRegistry)throw Error(`@aws-sdk/core/protocols - error handler not initialized.`);try{return{errorSchema:a?.(this.errorRegistry,o)??this.errorRegistry.getSchema(e),errorMetadata:s}}catch{r.message=r.message??r.Message??`UnknownError`;let e=this.errorRegistry,t=e.getBaseException();if(t){let n=e.getErrorCtor(t)??Error;throw this.decorateServiceException(Object.assign(new n({name:o}),s),r)}let n=r,i=n?.message??n?.Message??n?.Error?.Message??n?.Error?.message;throw this.decorateServiceException(Object.assign(Error(i),{name:o},s),r)}}compose(e,t,n){let r=n;t.includes(`#`)&&([r]=t.split(`#`));let i=_.for(r),a=_.for(`smithy.ts.sdk.synthetic.`+n);e.copyFrom(i),e.copyFrom(a),this.errorRegistry=e}decorateServiceException(e,t={}){if(this.queryCompat){let n=e.Message??t.Message,r=(0,dt.decorateServiceException)(e,t);n&&(r.message=n);let i=r.Error??{};i.Type=r.Error?.Type,i.Code=r.Error?.Code,i.Message=r.Error?.message??r.Error?.Message??n,r.Error=i;let a=r.$metadata.requestId;return a&&(r.RequestId=a),r}return(0,dt.decorateServiceException)(e,t)}setQueryCompatError(e,t){let n=t.headers?.[`x-amzn-query-error`];if(e!==void 0&&n!=null){let[t,r]=n.split(`;`),i=Object.keys(e),a={Code:t,Type:r};e.Code=t,e.Type=r;for(let t=0;tx.of(e).getMergedTraits().awsQueryError?.[0]===t)}}}})),mt,ht=n((()=>{ut(),C(),pt(),mt=class extends ct{awsQueryCompatible;mixin;constructor({defaultNamespace:e,errorTypeRegistries:t,awsQueryCompatible:n}){super({defaultNamespace:e,errorTypeRegistries:t}),this.awsQueryCompatible=!!n,this.mixin=new ft(this.awsQueryCompatible)}async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n);return this.awsQueryCompatible&&(r.headers[`x-amzn-query-mode`]=`true`),r}async handleError(e,t,n,r,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,n);let a=(()=>{let e=n.headers[`x-amzn-query-error`];return e&&this.awsQueryCompatible?e.split(`;`)[0]:et(n,r)??`Unknown`})();this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);let{errorSchema:o,errorMetadata:s}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,r,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=x.of(o),l=r.message??r.Message??`UnknownError`,u=new((this.compositeErrorRegistry.getErrorCtor(o))??Error)(l),d={};for(let[e,t]of c.structIterator())r[e]!=null&&(d[e]=this.deserializer.readValue(t,r[e]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,d),this.mixin.decorateServiceException(Object.assign(u,s,{$fault:c.getMergedTraits().error,message:l},d),r)}}})),gt,_t,vt,yt=n((()=>{gt=e=>{if(e==null)return e;if(typeof e==`number`||typeof e==`bigint`){let t=Error(`Received number ${e} where a string was expected.`);return t.name=`Warning`,console.warn(t),String(e)}if(typeof e==`boolean`){let t=Error(`Received boolean ${e} where a string was expected.`);return t.name=`Warning`,console.warn(t),String(e)}return e},_t=e=>{if(e==null)return e;if(typeof e==`string`){let t=e.toLowerCase();if(e!==``&&t!==`false`&&t!==`true`){let t=Error(`Received string "${e}" where a boolean was expected.`);t.name=`Warning`,console.warn(t)}return e!==``&&t!==`false`}return e},vt=e=>{if(e==null)return e;if(typeof e==`string`){let t=Number(e);if(t.toString()!==e){let t=Error(`Received string "${e}" where a number was expected.`);return t.name=`Warning`,console.warn(t),e}return t}return e}})),bt,xt=n((()=>{bt=class{serdeContext;setSerdeContext(e){this.serdeContext=e}}})),St,Ct=n((()=>{St=class{from;to;keys;constructor(e,t){this.from=e,this.to=t;let n=Object.keys(this.from),r=new Set(n);r.delete(`__type`),this.keys=r}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){let e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}}));function wt(e,t,n){if(n?.source){let e=n.source;if(typeof t==`number`&&(t>2**53-1||t<-(2**53-1)||e!==String(t)))return e.includes(`.`)?new A(e,`bigDecimal`):BigInt(e)}return t}var Tt=n((()=>{I()})),Et,Dt,Ot,kt=n((()=>{Et=R(),Dt=p(),Ot=(e,t)=>(0,Et.collectBody)(e,t).then(e=>(t?.utf8Encoder??Dt.toUtf8)(e))})),At,jt,Mt,Nt,Pt,Ft=n((()=>{kt(),At=(e,t)=>Ot(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw t?.name===`SyntaxError`&&Object.defineProperty(t,`$responseBodyText`,{value:e}),t}return{}}),jt=async(e,t)=>{let n=await At(e,t);return n.message=n.message??n.Message,n},Mt=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),Nt=e=>{let t=e;return typeof t==`number`&&(t=t.toString()),t.indexOf(`,`)>=0&&(t=t.split(`,`)[0]),t.indexOf(`:`)>=0&&(t=t.split(`:`)[0]),t.indexOf(`#`)>=0&&(t=t.split(`#`)[1]),t},Pt=(e,t)=>{let n=Mt(e.headers,`x-amzn-errortype`);if(n!==void 0)return Nt(e.headers[n]);if(t&&typeof t==`object`){let e=Mt(t,`code`);if(e&&t[e]!==void 0)return Nt(t[e]);if(t.__type!==void 0)return Nt(t.__type)}}})),It,Lt,Rt=n((()=>{P(),C(),I(),It=h(),xt(),Ct(),Tt(),Ft(),Lt=class extends bt{settings;constructor(e){super(),this.settings=e}async read(e,t){return this._read(e,typeof t==`string`?JSON.parse(t,wt):await At(t,this.serdeContext))}readObject(e,t){return this._read(e,t)}_read(e,t){let n=typeof t==`object`&&!!t,r=x.of(e);if(n){if(r.isStructSchema()){let e=t,n=r.isUnionSchema(),i={},a,{jsonName:o}=this.settings;o&&(a={});let s;n&&(s=new St(e,i));for(let[t,c]of r.structIterator()){let r=t;o&&(r=c.getMergedTraits().jsonName??r,a[r]=t),n&&s.mark(r),e[r]!=null&&(i[t]=this._read(c,e[r]))}if(n)s.writeUnknown();else if(typeof e.__type==`string`)for(let[t,n]of Object.entries(e)){let e=o?a[t]??t:t;e in i||(i[e]=n)}return i}if(Array.isArray(t)&&r.isListSchema()){let e=r.getValueSchema(),n=[];for(let r of t)n.push(this._read(e,r));return n}if(r.isMapSchema()){let e=r.getValueSchema(),n={};for(let[r,i]of Object.entries(t))n[r]=this._read(e,i);return n}}if(r.isBlobSchema()&&typeof t==`string`)return(0,It.fromBase64)(t);let i=r.getMergedTraits().mediaType;if(r.isStringSchema()&&typeof t==`string`&&i)return i===`application/json`||i.endsWith(`+json`)?re.from(t):t;if(r.isTimestampSchema()&&t!=null)switch(F(r,this.settings)){case 5:return g(t);case 6:return ie(t);case 7:return S(t);default:return console.warn(`Missing timestamp format, parsing value with Date constructor:`,t),new Date(t)}if(r.isBigIntegerSchema()&&(typeof t==`number`||typeof t==`string`))return BigInt(t);if(r.isBigDecimalSchema()&&t!=null){if(t instanceof A)return t;let e=t;return e.type===`bigDecimal`&&`string`in e?new A(e.string,e.type):new A(String(t),`bigDecimal`)}if(r.isNumericSchema()&&typeof t==`string`){switch(t){case`Infinity`:return 1/0;case`-Infinity`:return-1/0;case`NaN`:return NaN}return t}if(r.isDocumentSchema())if(n){let e=Array.isArray(t)?[]:{};for(let[n,i]of Object.entries(t))i instanceof A?e[n]=i:e[n]=this._read(r,i);return e}else return structuredClone(t);return t}}})),zt,Bt,Vt=n((()=>{I(),zt=`Ν`,Bt=class{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw Error(`@aws-sdk/core/protocols - JsonReplacer already created.`);if(this.stage===2)throw Error(`@aws-sdk/core/protocols - JsonReplacer exhausted.`);return this.stage=1,(e,t)=>{if(t instanceof A){let e=`${zt+`nv`+ this.counter++}_`+t.string;return this.values.set(`"${e}"`,t.string),e}if(typeof t==`bigint`){let e=t.toString(),n=`${zt+`b`+ this.counter++}_`+e;return this.values.set(`"${n}"`,e),n}return t}}replaceInJson(e){if(this.stage===0)throw Error(`@aws-sdk/core/protocols - JsonReplacer not created yet.`);if(this.stage===2)throw Error(`@aws-sdk/core/protocols - JsonReplacer exhausted.`);if(this.stage=2,this.counter===0)return e;for(let[t,n]of this.values)e=e.replace(t,n);return e}}})),Ht,Ut,Wt=n((()=>{P(),C(),I(),Ht=h(),xt(),Vt(),Ut=class extends bt{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,t){this.rootSchema=x.of(e),this.buffer=this._write(this.rootSchema,t)}flush(){let{rootSchema:e,useReplacer:t}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!t)return JSON.stringify(this.buffer);let e=new Bt;return e.replaceInJson(JSON.stringify(this.buffer,e.createReplacer(),0))}return this.buffer}writeDiscriminatedDocument(e,t){this.write(e,t),typeof this.buffer==`object`&&(this.buffer.__type=x.of(e).getName(!0))}_write(e,t,n){let r=typeof t==`object`&&!!t,i=x.of(e);if(r){if(i.isStructSchema()){let e=t,n={},{jsonName:r}=this.settings,a;r&&(a={});let o=0;for(let[t,s]of i.structIterator()){let c=this._write(s,e[t],i);if(c!==void 0){let e=t;r&&(e=s.getMergedTraits().jsonName??t,a[t]=e),n[e]=c,o++}}if(i.isUnionSchema()&&o===0){let{$unknown:t}=e;if(Array.isArray(t)){let[e,r]=t;n[e]=this._write(15,r)}}else if(typeof e.__type==`string`)for(let[t,i]of Object.entries(e)){let e=r?a[t]??t:t;e in n||(n[e]=this._write(15,i))}return n}if(Array.isArray(t)&&i.isListSchema()){let e=i.getValueSchema(),n=[],r=!!i.getMergedTraits().sparse;for(let i of t)(r||i!=null)&&n.push(this._write(e,i));return n}if(i.isMapSchema()){let e=i.getValueSchema(),n={},r=!!i.getMergedTraits().sparse;for(let[i,a]of Object.entries(t))(r||a!=null)&&(n[i]=this._write(e,a));return n}if(t instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?t:(this.serdeContext?.base64Encoder??Ht.toBase64)(t);if(t instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(F(i,this.settings)){case 5:return t.toISOString().replace(`.000Z`,`Z`);case 6:return ae(t);case 7:return t.getTime()/1e3;default:return console.warn(`Missing timestamp format, using epoch seconds`,t),t.getTime()/1e3}t instanceof A&&(this.useReplacer=!0)}if(!(t===null&&n?.isStructSchema())){if(i.isStringSchema()){if(t===void 0&&i.isIdempotencyToken())return(0,B.v4)();let e=i.getMergedTraits().mediaType;return t!=null&&e&&(e===`application/json`||e.endsWith(`+json`))?re.from(t):t}if(typeof t==`number`&&i.isNumericSchema())return Math.abs(t)===1/0||isNaN(t)?String(t):t;if(typeof t==`string`&&i.isBlobSchema())return i===this.rootSchema?t:(this.serdeContext?.base64Encoder??Ht.toBase64)(t);if(typeof t==`bigint`&&(this.useReplacer=!0),i.isDocumentSchema())if(r){let e=Array.isArray(t)?[]:{};for(let[n,r]of Object.entries(t))r instanceof A?(this.useReplacer=!0,e[n]=r):e[n]=this._write(i,r);return e}else return structuredClone(t);return t}}}})),Gt,Kt=n((()=>{xt(),Rt(),Wt(),Gt=class extends bt{settings;constructor(e){super(),this.settings=e}createSerializer(){let e=new Ut(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){let e=new Lt(this.settings);return e.setSerdeContext(this.serdeContext),e}}})),qt,Jt=n((()=>{P(),C(),pt(),Kt(),Ft(),qt=class extends D{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:r,jsonCodec:i}){super({defaultNamespace:e,errorTypeRegistries:t}),this.serviceTarget=n,this.codec=i??new Gt({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!r,this.mixin=new ft(this.awsQueryCompatible)}async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n);return r.path.endsWith(`/`)||(r.path+=`/`),r.headers[`content-type`]=`application/x-amz-json-${this.getJsonRpcVersion()}`,r.headers[`x-amz-target`]=`${this.serviceTarget}.${e.name}`,this.awsQueryCompatible&&(r.headers[`x-amzn-query-mode`]=`true`),(y(e.input)===`unit`||!r.body)&&(r.body=`{}`),r}getPayloadCodec(){return this.codec}async handleError(e,t,n,r,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,n);let a=Pt(n,r)??`Unknown`;this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);let{errorSchema:o,errorMetadata:s}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,r,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=x.of(o),l=r.message??r.Message??`UnknownError`,u=new((this.compositeErrorRegistry.getErrorCtor(o))??Error)(l),d={},f=this.codec.createDeserializer();for(let[e,t]of c.structIterator())r[e]!=null&&(d[e]=f.readObject(t,r[e]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,d),this.mixin.decorateServiceException(Object.assign(u,s,{$fault:c.getMergedTraits().error,message:l},d),r)}}})),Yt,Xt=n((()=>{Jt(),Yt=class extends qt{constructor({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:r,jsonCodec:i}){super({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:r,jsonCodec:i})}getShapeId(){return`aws.protocols#awsJson1_0`}getJsonRpcVersion(){return`1.0`}getDefaultContentType(){return`application/x-amz-json-1.0`}}})),Zt,Qt=n((()=>{Jt(),Zt=class extends qt{constructor({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:r,jsonCodec:i}){super({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:r,jsonCodec:i})}getShapeId(){return`aws.protocols#awsJson1_1`}getJsonRpcVersion(){return`1.1`}getDefaultContentType(){return`application/x-amz-json-1.1`}}})),$t,en=n((()=>{P(),C(),pt(),Kt(),Ft(),$t=class extends te{serializer;deserializer;codec;mixin=new ft;constructor({defaultNamespace:e,errorTypeRegistries:t}){super({defaultNamespace:e,errorTypeRegistries:t});let n={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new Gt(n),this.serializer=new L(this.codec.createSerializer(),n),this.deserializer=new j(this.codec.createDeserializer(),n)}getShapeId(){return`aws.protocols#restJson1`}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e),super.setSerdeContext(e)}async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n),i=x.of(e.input);if(!r.headers[`content-type`]){let e=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);e&&(r.headers[`content-type`]=e)}return r.body==null&&r.headers[`content-type`]===this.getDefaultContentType()&&(r.body=`{}`),r}async deserializeResponse(e,t,n){let r=await super.deserializeResponse(e,t,n),i=x.of(e.output);for(let[e,t]of i.structIterator())t.getMemberTraits().httpPayload&&!(e in r)&&(r[e]=null);return r}async handleError(e,t,n,r,i){let a=Pt(n,r)??`Unknown`;this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);let{errorSchema:o,errorMetadata:s}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,r,i),c=x.of(o),l=r.message??r.Message??`UnknownError`,u=new((this.compositeErrorRegistry.getErrorCtor(o))??Error)(l);await this.deserializeHttpMessage(o,t,n,r);let d={},f=this.codec.createDeserializer();for(let[e,t]of c.structIterator()){let n=t.getMergedTraits().jsonName??e;d[e]=f.readObject(t,r[n])}throw this.mixin.decorateServiceException(Object.assign(u,s,{$fault:c.getMergedTraits().error,message:l},d),r)}getDefaultContentType(){return`application/json`}}})),tn,nn,rn=n((()=>{tn=R(),nn=e=>{if(e!=null)return typeof e==`object`&&`__type`in e&&delete e.__type,(0,tn.expectUnion)(e)}})),an=a(((e,t)=>{(()=>{var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})}},n={};e.r(n),e.d(n,{XMLBuilder:()=>We,XMLParser:()=>Ne,XMLValidator:()=>Ge});let r=RegExp(`^[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`);function i(e,t){let n=[],r=t.exec(e);for(;r;){let i=[];i.startIndex=t.lastIndex-r[0].length;let a=r.length;for(let e=0;e`&&e[a]!==` `&&e[a]!==` `&&e[a]!==` +`&&e[a]!==`\r`;a++)c+=e[a];if(c=c.trim(),c[c.length-1]===`/`&&(c=c.substring(0,c.length-1),a--),!y(c)){let t;return t=c.trim().length===0?`Invalid space after '<'.`:`Tag '`+c+`' is an invalid name.`,_(`InvalidTag`,t,b(e,a))}let l=p(e,a);if(!1===l)return _(`InvalidAttr`,`Attributes for '`+c+`' have open quote.`,b(e,a));let m=l.value;if(a=l.index,m[m.length-1]===`/`){let n=a-m.length;m=m.substring(0,m.length-1);let i=h(m,t);if(!0!==i)return _(i.err.code,i.err.msg,b(e,n+i.err.line));r=!0}else if(s){if(!l.tagClosed)return _(`InvalidTag`,`Closing tag '`+c+`' doesn't have proper closing.`,b(e,a));if(m.trim().length>0)return _(`InvalidTag`,`Closing tag '`+c+`' can't have attributes or invalid starting.`,b(e,o));if(n.length===0)return _(`InvalidTag`,`Closing tag '`+c+`' has not been opened.`,b(e,o));{let t=n.pop();if(c!==t.tagName){let n=b(e,t.tagStartPos);return _(`InvalidTag`,`Expected closing tag '`+t.tagName+`' (opened in line `+n.line+`, col `+n.col+`) instead of closing tag '`+c+`'.`,b(e,o))}n.length==0&&(i=!0)}}else{let s=h(m,t);if(!0!==s)return _(s.err.code,s.err.msg,b(e,a-m.length+s.err.line));if(!0===i)return _(`InvalidXml`,`Multiple possible root nodes found.`,b(e,a));t.unpairedTags.indexOf(c)!==-1||n.push({tagName:c,tagStartPos:o}),r=!0}for(a++;a0)||_(`InvalidXml`,`Invalid '`+JSON.stringify(n.map(e=>e.tagName),null,4).replace(/\r?\n/g,``)+`' found.`,{line:1,col:1}):_(`InvalidXml`,`Start tag expected.`,1)}function u(e){return e===` `||e===` `||e===` +`||e===`\r`}function d(e,t){let n=t;for(;t5&&r===`xml`)return _(`InvalidXml`,`XML declaration allowed only at the start of the document.`,b(e,t));if(e[t]==`?`&&e[t+1]==`>`){t++;break}continue}return t}function f(e,t){if(e.length>t+5&&e[t+1]===`-`&&e[t+2]===`-`){for(t+=3;t`){t+=2;break}}else if(e.length>t+8&&e[t+1]===`D`&&e[t+2]===`O`&&e[t+3]===`C`&&e[t+4]===`T`&&e[t+5]===`Y`&&e[t+6]===`P`&&e[t+7]===`E`){let n=1;for(t+=8;t`&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]===`[`&&e[t+2]===`C`&&e[t+3]===`D`&&e[t+4]===`A`&&e[t+5]===`T`&&e[t+6]===`A`&&e[t+7]===`[`){for(t+=8;t`){t+=2;break}}return t}function p(e,t){let n=``,r=``,i=!1;for(;t`&&r===``){i=!0;break}n+=e[t]}return r===``&&{value:n,index:t,tagClosed:i}}let m=RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,`g`);function h(e,t){let n=i(e,m),r={};for(let e=0;eo.includes(e)?`__`+e:e,C={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(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:S};function w(e,t){if(typeof e!=`string`)return;let n=e.toLowerCase();if(o.some(e=>n===e.toLowerCase())||s.some(e=>n===e.toLowerCase()))throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function T(e,t){return typeof e==`boolean`?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:`all`}:typeof e==`object`&&e?{enabled:!1!==e.enabled,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??1e3),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null,appliesTo:e.appliesTo??`all`}:T(!0)}let E=function(e){let t=Object.assign({},C,e),n=[{value:t.attributeNamePrefix,name:`attributeNamePrefix`},{value:t.attributesGroupName,name:`attributesGroupName`},{value:t.textNodeName,name:`textNodeName`},{value:t.cdataPropName,name:`cdataPropName`},{value:t.commentPropName,name:`commentPropName`}];for(let{value:e,name:t}of n)e&&w(e,t);return t.onDangerousProperty===null&&(t.onDangerousProperty=S),t.processEntities=T(t.processEntities,t.htmlEntities),t.unpairedTagsSet=new Set(t.unpairedTags),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),t},D;D=typeof Symbol==`function`?Symbol(`XML Node Metadata`):`@@xmlMetadata`;class O{constructor(e){this.tagname=e,this.child=[],this[`:@`]=Object.create(null)}add(e,t){e===`__proto__`&&(e=`#__proto__`),this.child.push({[e]:t})}addChild(e,t){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}),t!==void 0&&(this.child[this.child.length-1][D]={startIndex:t})}static getMetaDataSymbol(){return D}}class ee{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){let n=Object.create(null),r=0;if(e[t+3]!==`O`||e[t+4]!==`C`||e[t+5]!==`T`||e[t+6]!==`Y`||e[t+7]!==`P`||e[t+8]!==`E`)throw Error(`Invalid Tag instead of DOCTYPE`);{t+=9;let i=1,a=!1,o=!1,s=``;for(;t`){if(o?e[t-1]===`-`&&e[t-2]===`-`&&(o=!1,i--):i--,i===0)break}else e[t]===`[`?a=!0:s+=e[t];else{if(a&&A(e,`!ENTITY`,t)){let i,a;if(t+=7,[i,a,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),a.indexOf(`&`)===-1){if(!1!==this.options.enabled&&this.options.maxEntityCount!=null&&r>=this.options.maxEntityCount)throw Error(`Entity count (${r+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);n[i]=a,r++}}else if(a&&A(e,`!ELEMENT`,t)){t+=8;let{index:n}=this.readElementExp(e,t+1);t=n}else if(a&&A(e,`!ATTLIST`,t))t+=8;else if(a&&A(e,`!NOTATION`,t)){t+=9;let{index:n}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=n}else{if(!A(e,`!--`,t))throw Error(`Invalid DOCTYPE`);o=!0}i++,s=``}if(i!==0)throw Error(`Unclosed DOCTYPE`)}return{entities:n,i:t}}readEntityExp(e,t){let n=t=k(e,t);for(;tthis.options.maxEntitySize)throw Error(`Entity "${r}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[r,i,--t]}readNotationExp(e,t){let n=t=k(e,t);for(;t{for(;t0?e[e.length-1].tag:void 0}getCurrentNamespace(){let e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){let t=this._matcher.path;if(t.length!==0)return t[t.length-1].values?.[e]}hasAttr(e){let t=this._matcher.path;if(t.length===0)return!1;let n=t[t.length-1];return n.values!==void 0&&e in n.values}getPosition(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,t=!0){return this._matcher.toString(e,t)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}}class I{constructor(e={}){this.separator=e.separator||`.`,this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new F(this)}push(e,t=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let r=this.path.length;this.siblingStacks[r]||(this.siblingStacks[r]=new Map);let i=this.siblingStacks[r],a=n?`${n}:${e}`:e,o=i.get(a)||0,s=0;for(let e of i.values())s+=e;i.set(a,o+1);let c={tag:e,position:s,counter:o};n!=null&&(c.namespace=n),t!=null&&(c.values=t),this.path.push(c)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){let t=this.path[this.path.length-1];e!=null&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let t=this.path[this.path.length-1];return t.values!==void 0&&e in t.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){let n=e||this.separator;if(n===this.separator&&!0===t){if(this._pathStringCache!==null)return this._pathStringCache;let e=this.path.map(e=>e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n);return this._pathStringCache=e,e}return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){let t=e.segments;return t.length!==0&&(e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t))}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t=0&&t>=0;){let r=e[n];if(r.type===`deep-wildcard`){if(n--,n<0)return!0;let r=e[n],i=!1;for(let e=t;e>=0;e--)if(this._matchSegment(r,this.path[e],e===this.path.length-1)){t=e-1,n--,i=!0;break}if(!i)return!1}else{if(!this._matchSegment(r,this.path[t],t===this.path.length-1))return!1;t--,n--}}return n<0}_matchSegment(e,t,n){if(e.tag!==`*`&&e.tag!==t.tag||e.namespace!==void 0&&e.namespace!==`*`&&e.namespace!==t.namespace||e.attrName!==void 0&&(!n||!t.values||!(e.attrName in t.values)||e.attrValue!==void 0&&String(t.values[e.attrName])!==String(e.attrValue)))return!1;if(e.position!==void 0){if(!n)return!1;let r=t.counter??0;if(e.position===`first`&&r!==0||e.position===`odd`&&r%2!=1||e.position===`even`&&r%2!=0||e.position===`nth`&&r!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>new Map(e))}readOnly(){return this._view}}class L{constructor(e,t={},n){this.pattern=e,this.separator=t.separator||`.`,this.segments=this._parse(e),this.data=n,this._hasDeepWildcard=this.segments.some(e=>e.type===`deep-wildcard`),this._hasAttributeCondition=this.segments.some(e=>e.attrName!==void 0),this._hasPositionSelector=this.segments.some(e=>e.position!==void 0)}_parse(e){let t=[],n=0,r=``;for(;n`,lt:`<`,quot:`"`},re={nbsp:`\xA0`,copy:`©`,reg:`®`,trade:`™`,mdash:`—`,ndash:`–`,hellip:`…`,laquo:`«`,raquo:`»`,lsquo:`‘`,rsquo:`’`,ldquo:`“`,rdquo:`”`,bull:`•`,para:`¶`,sect:`§`,deg:`°`,frac12:`½`,frac14:`¼`,frac34:`¾`},ie=new Set(`!?\\\\/[]$%{}^&*()<>|+`);function ae(e){if(e[0]===`#`)throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);for(let t of e)if(ie.has(t))throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);return e}function B(...e){let t=Object.create(null);for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];if(typeof r==`string`)t[e]=r;else if(r&&typeof r==`object`&&r.val!==void 0){let n=r.val;typeof n==`string`&&(t[e]=n)}}return t}let oe=`external`,se=`base`,V=Object.freeze({allow:0,leave:1,remove:2,throw:3}),ce=new Set([9,10,13]);class le{constructor(e={}){var t;this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof e.postCheck==`function`?e.postCheck:e=>e,this._limitTiers=(t=this._limit.applyLimitsTo??oe)&&t!==oe?t===`all`?new Set([`all`]):t===se?new Set([se]):Array.isArray(t)?new Set(t):new Set([oe]):new Set([oe]),this._numericAllowed=e.numericAllowed??!0,this._baseMap=B(z,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);let n=function(e){if(!e)return{xmlVersion:1,onLevel:V.allow,nullLevel:V.remove};let t=e.xmlVersion===1.1?1.1:1,n=V[e.onNCR]??V.allow,r=V[e.nullNCR]??V.remove;return{xmlVersion:t,onLevel:n,nullLevel:Math.max(r,V.remove)}}(e.ncr);this._ncrXmlVersion=n.xmlVersion,this._ncrOnLevel=n.onLevel,this._ncrNullLevel=n.nullLevel}setExternalEntities(e){if(e)for(let t of Object.keys(e))ae(t);this._externalMap=B(e)}addExternalEntity(e,t){ae(e),typeof t==`string`&&t.indexOf(`&`)===-1&&(this._externalMap[e]=t)}addInputEntities(e){this._totalExpansions=0,this._expandedLength=0,this._inputMap=B(e)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=e===1.1?1.1:1}decode(e){if(typeof e!=`string`||e.length===0)return e;let t=e,n=[],r=e.length,i=0,a=0,o=this._maxTotalExpansions>0,s=this._maxExpandedLength>0,c=o||s;for(;a=r||e.charCodeAt(t)!==59){a++;continue}let l=e.slice(a+1,t);if(l.length===0){a++;continue}let u,d;if(this._removeSet.has(l))u=``,d===void 0&&(d=oe);else{if(this._leaveSet.has(l)){a++;continue}if(l.charCodeAt(0)===35){let e=this._resolveNCR(l);if(e===void 0){a++;continue}u=e,d=se}else{let e=this._resolveName(l);u=e?.value,d=e?.tier}}if(u!==void 0){if(a>i&&n.push(e.slice(i,a)),n.push(u),i=t+1,a=i,c&&this._tierCounts(d)){if(o&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(s){let e=u.length-(l.length+2);if(e>0&&(this._expandedLength+=e,this._expandedLength>this._maxExpandedLength))throw Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}else a++}i=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!ce.has(e)?V.remove:-1}_applyNCRAction(e,t,n){switch(e){case V.allow:return String.fromCodePoint(n);case V.remove:return``;case V.leave:return;case V.throw:throw Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${n.toString(16).toUpperCase().padStart(4,`0`)})`);default:return String.fromCodePoint(n)}}_resolveNCR(e){let t=e.charCodeAt(1),n;if(n=t===120||t===88?parseInt(e.slice(2),16):parseInt(e.slice(1),10),Number.isNaN(n)||n<0||n>1114111)return;let r=this._classifyNCR(n);if(!this._numericAllowed&&r0){let n=e.substring(0,t);if(n!==`xmlns`)return n}}class fe{constructor(e,t){var n;this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=ge,this.parseTextData=H,this.resolveNameSpace=pe,this.buildAttributesMap=he,this.isItStopNode=be,this.replaceEntitiesValue=ve,this.readStopNodeData=Ce,this.saveTextToParentTag=ye,this.addChild=_e,this.ignoreAttributesFn=typeof(n=this.options.ignoreAttributes)==`function`?n:Array.isArray(n)?e=>{for(let t of n)if(typeof t==`string`&&e===t||t instanceof RegExp&&t.test(e))return!0}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0;let r={...z};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities==`object`?r=this.options.htmlEntities:!0===this.options.htmlEntities&&(r={...re,...R}),this.entityDecoder=new le({namedEntities:{...r,...t},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new I,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new ne;let i=this.options.stopNodes;if(i&&i.length>0){for(let e=0;e0)){o||(e=this.replaceEntitiesValue(e,t,n));let r=s.jPath?n.toString():n,c=s.tagValueProcessor(t,e,r,i,a);return c==null?e:typeof c!=typeof e||c!==e?c:s.trimValues||e.trim()===e?we(e,s.parseTagValue,s.numberParseOptions):e}}function pe(e){if(this.options.removeNSPrefix){let t=e.split(`:`),n=e.charAt(0)===`/`?`/`:``;if(t[0]===`xmlns`)return``;t.length===2&&(e=n+t[1])}return e}let me=RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,`gm`);function he(e,t,n,r=!1){let a=this.options;if(!0===r||!0!==a.ignoreAttributes&&typeof e==`string`){let r=i(e,me),o=r.length,s={},c=Array(o),l=!1,u={};for(let e=0;e`,s,`Closing Tag is not closed.`),a=e.substring(s+2,t).trim();if(i.removeNSPrefix){let e=a.indexOf(`:`);e!==-1&&(a=a.substr(e+1))}a=W(i.transformTagName,a,``,i).tagName,n&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher));let o=this.matcher.getCurrentTag();if(a&&i.unpairedTagsSet.has(a))throw Error(`Unpaired tag can not be used as closing tag: `);o&&i.unpairedTagsSet.has(o)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,n=this.tagsNodeStack.pop(),r=``,s=t}else if(c===63){let t=Se(e,s,!1,`?>`);if(!t)throw Error(`Pi Tag is not closed.`);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let a=this.buildAttributesMap(t.tagExp,this.matcher,t.tagName,!0);if(a){let e=a[this.options.attributeNamePrefix+`version`];this.entityDecoder.setXmlVersion(Number(e)||1)}if(!(i.ignoreDeclaration&&t.tagName===`?xml`||i.ignorePiTags)){let e=new O(t.tagName);e.add(i.textNodeName,``),t.tagName!==t.tagExp&&t.attrExpPresent&&!0!==i.ignoreAttributes&&(e[`:@`]=a),this.addChild(n,e,this.readonlyMatcher,s)}s=t.closeIndex+1}else if(c===33&&e.charCodeAt(s+2)===45&&e.charCodeAt(s+3)===45){let t=U(e,`-->`,s+4,`Comment is not closed.`);if(i.commentPropName){let a=e.substring(s+4,t-2);r=this.saveTextToParentTag(r,n,this.readonlyMatcher),n.add(i.commentPropName,[{[i.textNodeName]:a}])}s=t}else if(c===33&&e.charCodeAt(s+2)===68){let t=a.readDocType(e,s);this.entityDecoder.addInputEntities(t.entities),s=t.i}else if(c===33&&e.charCodeAt(s+2)===91){let t=U(e,`]]>`,s,`CDATA is not closed.`)-2,a=e.substring(s+9,t);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let o=this.parseTextData(a,n.tagname,this.readonlyMatcher,!0,!1,!0,!0);o??=``,i.cdataPropName?n.add(i.cdataPropName,[{[i.textNodeName]:a}]):n.add(i.textNodeName,o),s=t+2}else{let a=Se(e,s,i.removeNSPrefix);if(!a){let t=e.substring(Math.max(0,s-50),Math.min(o,s+50));throw Error(`readTagExp returned undefined at position ${s}. Context: "${t}"`)}let c=a.tagName,l=a.rawTagName,u=a.tagExp,d=a.attrExpPresent,f=a.closeIndex;if({tagName:c,tagExp:u}=W(i.transformTagName,c,u,i),i.strictReservedNames&&(c===i.commentPropName||c===i.cdataPropName||c===i.textNodeName||c===i.attributesGroupName))throw Error(`Invalid tag name: ${c}`);n&&r&&n.tagname!==`!xml`&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher,!1));let p=n;p&&i.unpairedTagsSet.has(p.tagname)&&(n=this.tagsNodeStack.pop(),this.matcher.pop());let m=!1;u.length>0&&u.lastIndexOf(`/`)===u.length-1&&(m=!0,c[c.length-1]===`/`?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),d=c!==u);let h,g=null;h=de(l),c!==t.tagname&&this.matcher.push(c,{},h),c!==u&&d&&(g=this.buildAttributesMap(u,this.matcher,c),g&&ue(g,i)),c!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let _=s;if(this.isCurrentNodeStopNode){let t=``;if(m)s=a.closeIndex;else if(i.unpairedTagsSet.has(c))s=a.closeIndex;else{let n=this.readStopNodeData(e,l,f+1);if(!n)throw Error(`Unexpected end of ${l}`);s=n.i,t=n.tagContent}let r=new O(c);g&&(r[`:@`]=g),r.add(i.textNodeName,t),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(n,r,this.readonlyMatcher,_)}else{if(m){({tagName:c,tagExp:u}=W(i.transformTagName,c,u,i));let e=new O(c);g&&(e[`:@`]=g),this.addChild(n,e,this.readonlyMatcher,_),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(i.unpairedTagsSet.has(c)){let e=new O(c);g&&(e[`:@`]=g),this.addChild(n,e,this.readonlyMatcher,_),this.matcher.pop(),this.isCurrentNodeStopNode=!1,s=a.closeIndex;continue}{let e=new O(c);if(this.tagsNodeStack.length>i.maxNestedTags)throw Error(`Maximum nested tags exceeded`);this.tagsNodeStack.push(n),g&&(e[`:@`]=g),this.addChild(n,e,this.readonlyMatcher,_),n=e}}r=``,s=f}}}else r+=e[s];return t.child};function _e(e,t,n,r){this.options.captureMetaData||(r=void 0);let i=this.options.jPath?n.toString():n,a=this.options.updateTag(t.tagname,i,t[`:@`]);!1===a||(typeof a==`string`&&(t.tagname=a),e.addChild(t,r))}function ve(e,t,n){let r=this.options.processEntities;if(!r||!r.enabled)return e;if(r.allowedTags){let i=this.options.jPath?n.toString():n;if(!(Array.isArray(r.allowedTags)?r.allowedTags.includes(t):r.allowedTags(t,i)))return e}if(r.tagFilter){let i=this.options.jPath?n.toString():n;if(!r.tagFilter(t,i))return e}return this.entityDecoder.decode(e)}function ye(e,t,n,r){return e&&=(r===void 0&&(r=t.child.length===0),(e=this.parseTextData(e,t.tagname,n,!1,!!t[`:@`]&&Object.keys(t[`:@`]).length!==0,r))!==void 0&&e!==``&&t.add(this.options.textNodeName,e),``),e}function be(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}function U(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i+t.length-1}function xe(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i}function Se(e,t,n,r=`>`){let i=function(e,t,n=`>`){let r=0,i=e.length,a=n.charCodeAt(0),o=n.length>1?n.charCodeAt(1):-1,s=``,c=t;for(let n=t;n`,n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,i===0))return{tagContent:e.substring(r,n),i:a};n=a}else if(a===63)n=U(e,`?>`,n+1,`StopNode is not closed.`);else if(a===33&&e.charCodeAt(n+2)===45&&e.charCodeAt(n+3)===45)n=U(e,`-->`,n+3,`StopNode is not closed.`);else if(a===33&&e.charCodeAt(n+2)===91)n=U(e,`]]>`,n,`StopNode is not closed.`)-2;else{let r=Se(e,n,`>`);r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!==`/`&&i++,n=r.closeIndex)}}}function we(e,t,n){if(t&&typeof e==`string`){let t=e.trim();return t===`true`||t!==`false`&&function(e,t={}){if(t=Object.assign({},N,t),!e||typeof e!=`string`)return e;let n=e.trim();if(n.length===0||t.skipLike!==void 0&&t.skipLike.test(n))return e;if(n===`0`)return 0;if(t.hex&&M.test(n))return function(e){if(parseInt)return parseInt(e,16);if(Number.parseInt)return Number.parseInt(e,16);if(window&&window.parseInt)return window.parseInt(e,16);throw Error(`parseInt, Number.parseInt, window.parseInt are not supported`)}(n);if(isFinite(n)){if(n.includes(`e`)||n.includes(`E`))return function(e,t,n){if(!n.eNotation)return e;let r=t.match(P);if(r){let i=r[1]||``,a=r[3].indexOf(`e`)===-1?`E`:`e`,o=r[2],s=i?e[o.length+1]===a:e[o.length]===a;return o.length>1&&s?e:(o.length!==1||!r[3].startsWith(`.${a}`)&&r[3][0]!==a)&&o.length>0?n.leadingZeros&&!s?(t=(r[1]||``)+r[3],Number(t)):e:Number(t)}return e}(e,n,t);{let i=te.exec(n);if(i){let a=i[1]||``,o=i[2],s=((r=i[3])&&r.indexOf(`.`)!==-1&&((r=r.replace(/0+$/,``))===`.`?r=`0`:r[0]===`.`?r=`0`+r:r[r.length-1]===`.`&&(r=r.substring(0,r.length-1))),r),c=a?e[o.length+1]===`.`:e[o.length]===`.`;if(!t.leadingZeros&&(o.length>1||o.length===1&&!c))return e;{let r=Number(n),i=String(r);if(r===0)return r;if(i.search(/[eE]/)!==-1)return t.eNotation?r:e;if(n.indexOf(`.`)!==-1)return i===`0`||i===s||i===`${a}${s}`?r:e;let c=o?s:n;return o?c===i||a+c===i?r:e:c===i||c===a+i?r:e}}return e}}var r;return function(e,t,n){let r=t===1/0;switch(n.infinity.toLowerCase()){case`null`:return null;case`infinity`:return t;case`string`:return r?`Infinity`:`-Infinity`;default:return e}}(e,Number(n),t)}(e,n)}return e===void 0?``:e}function W(e,t,n,r){if(e){let r=e(t);n===t&&(n=r),t=r}return{tagName:t=Te(t,r),tagExp:n}}function Te(e,t){if(s.includes(e))throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return o.includes(e)?t.onDangerousProperty(e):e}let Ee=O.getMetaDataSymbol();function De(e,t){if(!e||typeof e!=`object`)return{};if(!t)return e;let n={};for(let r in e)r.startsWith(t)?n[r.substring(t.length)]=e[r]:n[r]=e[r];return n}function Oe(e,t,n,r){return ke(e,t,n,r)}function ke(e,t,n,r){let i,a={};for(let o=0;o0&&(a[t.textNodeName]=i):i!==void 0&&(a[t.textNodeName]=i),a}function Ae(e){let t=Object.keys(e);for(let e=0;e0&&(n=` +`);let r=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let e=0;et.maxNestedTags)throw Error(`Maximum nested tags exceeded`);if(!Array.isArray(e)){if(e!=null){let n=e.toString();return n=G(n,t),n}return``}for(let s=0;s/g,`]]]]>`)}]]>`,o=!1,r.pop();continue}if(l===t.commentPropName){let e=c[l][0][t.textNodeName];a+=n+`\x3c!--${String(e).replace(/--/g,`- -`).replace(/-$/,`- `)}--\x3e`,o=!0,r.pop();continue}if(l[0]===`?`){let e=Be(c[`:@`],t,d),i=l===`?xml`?``:n,s=c[l][0][t.textNodeName];s=s.length===0?``:` `+s,a+=i+`<${l}${s}${e}?>`,o=!0,r.pop();continue}let f=n;f!==``&&(f+=t.indentBy);let p=n+`<${l}${Be(c[`:@`],t,d)}`,m;m=d?Le(c[l],t):Fe(c[l],t,f,r,i),t.unpairedTags.indexOf(l)===-1?m&&m.length!==0||!t.suppressEmptyNode?m&&m.endsWith(`>`)?a+=p+`>${m}${n}`:(a+=p+`>`,m&&n!==``&&(m.includes(`/>`)||m.includes(``):a+=p+`/>`:t.suppressUnpairedNode?a+=p+`>`:a+=p+`/>`,o=!0,r.pop()}return a}function Ie(e,t){if(!e||t.ignoreAttributes)return null;let n={},r=!1;for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i.startsWith(t.attributeNamePrefix)?i.substr(t.attributeNamePrefix.length):i]=e[i],r=!0);return r?n:null}function Le(e,t){if(!Array.isArray(e))return e==null?``:e.toString();let n=``;for(let r=0;r${r}`:n+=`<${a}${e}/>`}}}return n}function Re(e,t){let n=``;if(e&&!t.ignoreAttributes)for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=e[r];!0===i&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function ze(e){let t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n`,`g`),val:`>`},{regex:RegExp(`<`,`g`),val:`<`},{regex:RegExp(`'`,`g`),val:`'`},{regex:RegExp(`"`,`g`),val:`"`}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function q(e){if(this.options=Object.assign({},K,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e{for(let n of t)if(typeof n==`string`&&e===n||n instanceof RegExp&&n.test(e))return!0}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Ue),this.processTextOrObjNode=J,this.options.format?(this.indentate=He,this.tagEndChar=`> +`,this.newLine=` +`):(this.indentate=function(){return``},this.tagEndChar=`>`,this.newLine=``)}function J(e,t,n,r){let i=this.extractAttributes(e);if(r.push(t,i),this.checkStopNode(r)){let i=this.buildRawContent(e),a=this.buildAttributesForStopNode(e);return r.pop(),this.buildObjectNode(i,t,a,n)}let a=this.j2x(e,n+1,r);return r.pop(),e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,a.attrStr,n,r):this.buildObjectNode(a.val,t,a.attrStr,n)}function He(e){return this.options.indentBy.repeat(e)}function Ue(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}q.prototype.build=function(e){if(this.options.preserveOrder)return Pe(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});let t=new I;return this.j2x(e,0,t).val}},q.prototype.j2x=function(e,t,n){let r=``,i=``;if(this.options.maxNestedTags&&n.getDepth()>=this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);let a=this.options.jPath?n.toString():n,o=this.checkStopNode(n);for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(e[s]===void 0)this.isAttribute(s)&&(i+=``);else if(e[s]===null)this.isAttribute(s)||s===this.options.cdataPropName?i+=``:s[0]===`?`?i+=this.indentate(t)+`<`+s+`?`+this.tagEndChar:i+=this.indentate(t)+`<`+s+`/`+this.tagEndChar;else if(e[s]instanceof Date)i+=this.buildTextValNode(e[s],s,``,t,n);else if(typeof e[s]!=`object`){let c=this.isAttribute(s);if(c&&!this.ignoreAttributesFn(c,a))r+=this.buildAttrPairStr(c,``+e[s],o);else if(!c)if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,``+e[s]);i+=this.replaceEntitiesValue(t)}else{n.push(s);let r=this.checkStopNode(n);if(n.pop(),r){let n=``+e[s];i+=n===``?this.indentate(t)+`<`+s+this.closeTag(s)+this.tagEndChar:this.indentate(t)+`<`+s+`>`+n+``+e+`${e}`;else if(typeof e==`object`&&e){let r=this.buildRawContent(e),i=this.buildAttributesForStopNode(e);t+=r===``?`<${n}${i}/>`:`<${n}${i}>${r}`}}else if(typeof r==`object`&&r){let e=this.buildRawContent(r),i=this.buildAttributesForStopNode(r);t+=e===``?`<${n}${i}/>`:`<${n}${i}>${e}`}else t+=`<${n}>${r}`}return t},q.prototype.buildAttributesForStopNode=function(e){if(!e||typeof e!=`object`)return``;let t=``;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){let n=e[this.options.attributesGroupName];for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;let r=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,i=n[e];!0===i&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+i+`"`}}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=this.isAttribute(n);if(r){let i=e[n];!0===i&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+i+`"`}}return t},q.prototype.buildObjectNode=function(e,t,n,r){if(e===``)return t[0]===`?`?this.indentate(r)+`<`+t+n+`?`+this.tagEndChar:this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar;{let i=``+e+i}},q.prototype.closeTag=function(e){let t=``;return this.options.unpairedTags.indexOf(e)===-1?t=this.options.suppressEmptyNode?`/`:`>/g,`]]]]>`);return this.indentate(r)+``+this.newLine}if(!1!==this.options.commentPropName&&t===this.options.commentPropName){let t=String(e).replace(/--/g,`- -`).replace(/-$/,`- `);return this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine}if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),i===``?this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+`<`+t+n+`>`+i+`0&&this.options.processEntities)for(let t=0;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.parseXML=n;let t=new(an()).XMLParser({attributeNamePrefix:``,processEntities:{enabled:!0,maxTotalExpansions:1/0},htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>t.trim()===``&&t.includes(` +`)?``:void 0,maxNestedTags:1/0});t.addEntity(`#xD`,`\r`),t.addEntity(`#10`,` +`);function n(e){return t.parse(e,!0)}})),sn=a((e=>{var t=on();let n=/[&<>"]/g,r={"&":`&`,"<":`<`,">":`>`,'"':`"`};function i(e){return e.replace(n,e=>r[e])}let a=/[&"'<>\r\n\u0085\u2028]/g,o={"&":`&`,'"':`"`,"'":`'`,"<":`<`,">":`>`,"\r":` `,"\n":` `,"…":`…`,"\u2028":`
`};function s(e){return e.replace(a,e=>o[e])}var c=class{value;constructor(e){this.value=e}toString(){return s(``+this.value)}},l=class e{name;children;attributes={};static of(t,n,r){let i=new e(t);return n!==void 0&&i.addChildNode(new c(n)),r!==void 0&&i.withName(r),i}constructor(e,t=[]){this.name=e,this.children=t}withName(e){return this.name=e,this}addAttribute(e,t){return this.attributes[e]=t,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,t){return t!=null&&(this.attributes[e]=t),this}cc(t,n,r=n){if(t[n]!=null){let i=e.of(n,t[n]).withName(r);this.c(i)}}l(e,t,n,r){e[t]!=null&&r().map(e=>{e.withName(n),this.c(e)})}lc(t,n,r,i){if(t[n]!=null){let t=i(),n=new e(r);t.map(e=>{n.c(e)}),this.c(n)}}toString(){let e=!!this.children.length,t=`<${this.name}`,n=this.attributes;for(let e of Object.keys(n)){let r=n[e];r!=null&&(t+=` ${e}="${i(``+r)}"`)}return t+=e?`>${this.children.map(e=>e.toString()).join(``)}`:`/>`}};e.parseXML=t.parseXML,e.XmlNode=l,e.XmlText=c})),cn,ln,un,dn,fn=n((()=>{cn=sn(),P(),C(),ln=R(),un=p(),xt(),Ct(),dn=class extends bt{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new T(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,n){let r=x.of(e),i=r.getMemberSchemas();if(r.isStructSchema()&&r.isMemberSchema()&&Object.values(i).find(e=>!!e.getMemberTraits().eventPayload)){let e={},n=Object.keys(i)[0];return i[n].isBlobSchema()?e[n]=t:e[n]=this.read(i[n],t),e}let a=(this.serdeContext?.utf8Encoder??un.toUtf8)(t),o=this.parseXml(a);return this.readSchema(e,n?o[n]:o)}readSchema(e,t){let n=x.of(e);if(n.isUnitSchema())return;let r=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(t))return this.readSchema(n,[t]);if(t==null)return t;if(typeof t==`object`){let e=!!r.xmlFlattened;if(n.isListSchema()){let r=n.getValueSchema(),i=[],a=r.getMergedTraits().xmlName??`member`,o=e?t:(t[0]??t)[a];if(o==null)return i;let s=Array.isArray(o)?o:[o];for(let e of s)i.push(this.readSchema(r,e));return i}let i={};if(n.isMapSchema()){let r=n.getKeySchema(),a=n.getValueSchema(),o;o=e?Array.isArray(t)?t:[t]:Array.isArray(t.entry)?t.entry:[t.entry];let s=r.getMergedTraits().xmlName??`key`,c=a.getMergedTraits().xmlName??`value`;for(let e of o){let t=e[s],n=e[c];i[t]=this.readSchema(a,n)}return i}if(n.isStructSchema()){let e=n.isUnionSchema(),r;e&&(r=new St(t,i));for(let[a,o]of n.structIterator()){let n=o.getMergedTraits(),s=n.httpPayload?n.xmlName??o.getName():o.getMemberTraits().xmlName??a;e&&r.mark(s),t[s]!=null&&(i[a]=this.readSchema(o,t[s]))}return e&&r.writeUnknown(),i}if(n.isDocumentSchema())return t;throw 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,t)}parseXml(e){if(e.length){let t;try{t=(0,cn.parseXML)(e)}catch(t){throw t&&typeof t==`object`&&Object.defineProperty(t,`$responseBodyText`,{value:e}),t}let n=`#text`,r=Object.keys(t)[0],i=t[r];return i[n]&&(i[r]=i[n],delete i[n]),(0,ln.getValueFromTextNode)(i)}return{}}}})),pn,mn,hn,gn=n((()=>{P(),C(),I(),pn=R(),mn=h(),xt(),hn=class extends bt{settings;buffer;constructor(e){super(),this.settings=e}write(e,t,n=``){this.buffer===void 0&&(this.buffer=``);let r=x.of(e);if(n&&!n.endsWith(`.`)&&(n+=`.`),r.isBlobSchema())(typeof t==`string`||t instanceof Uint8Array)&&(this.writeKey(n),this.writeValue((this.serdeContext?.base64Encoder??mn.toBase64)(t)));else if(r.isBooleanSchema()||r.isNumericSchema()||r.isStringSchema())t==null?r.isIdempotencyToken()&&(this.writeKey(n),this.writeValue((0,B.v4)())):(this.writeKey(n),this.writeValue(String(t)));else if(r.isBigIntegerSchema())t!=null&&(this.writeKey(n),this.writeValue(String(t)));else if(r.isBigDecimalSchema())t!=null&&(this.writeKey(n),this.writeValue(t instanceof A?t.string:String(t)));else if(r.isTimestampSchema()){if(t instanceof Date)switch(this.writeKey(n),F(r,this.settings)){case 5:this.writeValue(t.toISOString().replace(`.000Z`,`Z`));break;case 6:this.writeValue((0,pn.dateToUtcString)(t));break;case 7:this.writeValue(String(t.getTime()/1e3));break}}else if(r.isDocumentSchema())Array.isArray(t)?this.write(79,t,n):t instanceof Date?this.write(4,t,n):t instanceof Uint8Array?this.write(21,t,n):t&&typeof t==`object`?this.write(143,t,n):(this.writeKey(n),this.writeValue(String(t)));else if(r.isListSchema()){if(Array.isArray(t))if(t.length===0)this.settings.serializeEmptyLists&&(this.writeKey(n),this.writeValue(``));else{let e=r.getValueSchema(),i=this.settings.flattenLists||r.getMergedTraits().xmlFlattened,a=1;for(let r of t){if(r==null)continue;let t=e.getMergedTraits(),o=this.getKey(`member`,t.xmlName,t.ec2QueryName),s=i?`${n}${a}`:`${n}${o}.${a}`;this.write(e,r,s),++a}}}else if(r.isMapSchema()){if(t&&typeof t==`object`){let e=r.getKeySchema(),i=r.getValueSchema(),a=r.getMergedTraits().xmlFlattened,o=1;for(let[r,s]of Object.entries(t)){if(s==null)continue;let t=e.getMergedTraits(),c=this.getKey(`key`,t.xmlName,t.ec2QueryName),l=a?`${n}${o}.${c}`:`${n}entry.${o}.${c}`,u=i.getMergedTraits(),d=this.getKey(`value`,u.xmlName,u.ec2QueryName),f=a?`${n}${o}.${d}`:`${n}entry.${o}.${d}`;this.write(e,r,l),this.write(i,s,f),++o}}}else if(r.isStructSchema()){if(t&&typeof t==`object`){let e=!1;for(let[i,a]of r.structIterator()){if(t[i]==null&&!a.isIdempotencyToken())continue;let r=a.getMergedTraits(),o=this.getKey(i,r.xmlName,r.ec2QueryName,`struct`),s=`${n}${o}`;this.write(a,t[i],s),e=!0}if(!e&&r.isUnionSchema()){let{$unknown:e}=t;if(Array.isArray(e)){let[t,r]=e,i=`${n}${t}`;this.write(15,r,i)}}}}else if(!r.isUnitSchema())throw Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${r.getName(!0)}`)}flush(){if(this.buffer===void 0)throw Error(`@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.`);let e=this.buffer;return delete this.buffer,e}getKey(e,t,n,r){let{ec2:i,capitalizeKeys:a}=this.settings;if(i&&n)return n;let o=t??e;return a&&r===`struct`?o[0].toUpperCase()+o.slice(1):o}writeKey(e){e.endsWith(`.`)&&(e=e.slice(0,e.length-1)),this.buffer+=`&${O(e)}=`}writeValue(e){this.buffer+=O(e)}}})),_n,vn=n((()=>{P(),C(),pt(),fn(),gn(),_n=class extends D{options;serializer;deserializer;mixin=new ft;constructor(e){super({defaultNamespace:e.defaultNamespace,errorTypeRegistries:e.errorTypeRegistries}),this.options=e;let t={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:!0};this.serializer=new hn(t),this.deserializer=new dn(t)}getShapeId(){return`aws.protocols#awsQuery`}setSerdeContext(e){this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw Error(`AWSQuery protocol has no payload codec.`)}async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n);return r.path.endsWith(`/`)||(r.path+=`/`),r.headers[`content-type`]=`application/x-www-form-urlencoded`,(y(e.input)===`unit`||!r.body)&&(r.body=``),r.body=`Action=${e.name.split(`#`)[1]??e.name}&Version=${this.options.version}`+r.body,r.body.endsWith(`&`)&&(r.body=r.body.slice(-1)),r}async deserializeResponse(e,t,n){let r=this.deserializer,i=x.of(e.output),a={};if(n.statusCode>=300){let i=await ee(n.body,t);i.byteLength>0&&Object.assign(a,await r.read(15,i)),await this.handleError(e,t,n,a,this.deserializeMetadata(n))}for(let e in n.headers){let t=n.headers[e];delete n.headers[e],n.headers[e.toLowerCase()]=t}let o=e.name.split(`#`)[1]??e.name,s=i.isStructSchema()&&this.useNestedResult()?o+`Result`:void 0,c=await ee(n.body,t);return c.byteLength>0&&Object.assign(a,await r.read(i,c,s)),a.$metadata=this.deserializeMetadata(n),a}useNestedResult(){return!0}async handleError(e,t,n,r,i){let a=this.loadQueryErrorCode(n,r)??`Unknown`;this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);let o=this.loadQueryError(r)??{},s=this.loadQueryErrorMessage(r);o.message=s,o.Error={Type:o.Type,Code:o.Code,Message:s};let{errorSchema:c,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,o,i,this.mixin.findQueryCompatibleError),u=x.of(c),d=new((this.compositeErrorRegistry.getErrorCtor(c))??Error)(s),f={Type:o.Error.Type,Code:o.Error.Code,Error:o.Error};for(let[e,t]of u.structIterator()){let n=t.getMergedTraits().xmlName??e,i=o[n]??r[n];f[e]=this.deserializer.readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(d,l,{$fault:u.getMergedTraits().error,message:s},f),r)}loadQueryErrorCode(e,t){let n=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;if(n!==void 0)return n;if(e.statusCode==404)return`NotFound`}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){let t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??`Unknown`}getDefaultContentType(){return`application/x-www-form-urlencoded`}}})),yn,bn=n((()=>{vn(),yn=class extends _n{options;constructor(e){super(e),this.options=e,Object.assign(this.serializer.settings,{capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1,ec2:!0})}getShapeId(){return`aws.protocols#ec2Query`}useNestedResult(){return!1}}})),xn=n((()=>{})),Sn,Cn,wn,Tn,En,Dn=n((()=>{Sn=sn(),Cn=R(),kt(),wn=(e,t)=>Ot(e,t).then(e=>{if(e.length){let t;try{t=(0,Sn.parseXML)(e)}catch(t){throw t&&typeof t==`object`&&Object.defineProperty(t,`$responseBodyText`,{value:e}),t}let n=`#text`,r=Object.keys(t)[0],i=t[r];return i[n]&&(i[r]=i[n],delete i[n]),(0,Cn.getValueFromTextNode)(i)}return{}}),Tn=async(e,t)=>{let n=await wn(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},En=(e,t)=>{if(t?.Error?.Code!==void 0)return t.Error.Code;if(t?.Code!==void 0)return t.Code;if(e.statusCode==404)return`NotFound`}})),$,On,kn,An,jn=n((()=>{$=sn(),P(),C(),I(),On=R(),kn=h(),xt(),An=class extends bt{settings;stringBuffer;byteBuffer;buffer;constructor(e){super(),this.settings=e}write(e,t){let n=x.of(e);if(n.isStringSchema()&&typeof t==`string`)this.stringBuffer=t;else if(n.isBlobSchema())this.byteBuffer=`byteLength`in t?t:(this.serdeContext?.base64Decoder??kn.fromBase64)(t);else{this.buffer=this.writeStruct(n,t,void 0);let e=n.getMergedTraits();e.httpPayload&&!e.xmlName&&this.buffer.withName(n.getName())}}flush(){if(this.byteBuffer!==void 0){let e=this.byteBuffer;return delete this.byteBuffer,e}if(this.stringBuffer!==void 0){let e=this.stringBuffer;return delete this.stringBuffer,e}let e=this.buffer;return this.settings.xmlNamespace&&(e?.attributes?.xmlns||e.addAttribute(`xmlns`,this.settings.xmlNamespace)),delete this.buffer,e.toString()}writeStruct(e,t,n){let r=e.getMergedTraits(),i=e.isMemberSchema()&&!r.httpPayload?e.getMemberTraits().xmlName??e.getMemberName():r.xmlName??e.getName();if(!i||!e.isStructSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${e.getName(!0)}.`);let a=$.XmlNode.of(i),[o,s]=this.getXmlnsAttribute(e,n);for(let[n,r]of e.structIterator()){let e=t[n];if(e!=null||r.isIdempotencyToken()){if(r.getMergedTraits().xmlAttribute){a.addAttribute(r.getMergedTraits().xmlName??n,this.writeSimple(r,e));continue}if(r.isListSchema())this.writeList(r,e,a,s);else if(r.isMapSchema())this.writeMap(r,e,a,s);else if(r.isStructSchema())a.addChildNode(this.writeStruct(r,e,s));else{let t=$.XmlNode.of(r.getMergedTraits().xmlName??r.getMemberName());this.writeSimpleInto(r,e,t,s),a.addChildNode(t)}}}let{$unknown:c}=t;if(c&&e.isUnionSchema()&&Array.isArray(c)&&Object.keys(t).length===1){let[e,n]=c,r=$.XmlNode.of(e);if(typeof n!=`string`)if(t instanceof $.XmlNode||t instanceof $.XmlText)a.addChildNode(t);else throw Error(`@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`);this.writeSimpleInto(0,n,r,s),a.addChildNode(r)}return s&&a.addAttribute(o,s),a}writeList(e,t,n,r){if(!e.isMemberSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${e.getName(!0)}`);let i=e.getMergedTraits(),a=e.getValueSchema(),o=a.getMergedTraits(),s=!!o.sparse,c=!!i.xmlFlattened,[l,u]=this.getXmlnsAttribute(e,r),d=(t,n)=>{if(a.isListSchema())this.writeList(a,Array.isArray(n)?n:[n],t,u);else if(a.isMapSchema())this.writeMap(a,n,t,u);else if(a.isStructSchema()){let r=this.writeStruct(a,n,u);t.addChildNode(r.withName(c?i.xmlName??e.getMemberName():o.xmlName??`member`))}else{let r=$.XmlNode.of(c?i.xmlName??e.getMemberName():o.xmlName??`member`);this.writeSimpleInto(a,n,r,u),t.addChildNode(r)}};if(c)for(let e of t)(s||e!=null)&&d(n,e);else{let r=$.XmlNode.of(i.xmlName??e.getMemberName());u&&r.addAttribute(l,u);for(let e of t)(s||e!=null)&&d(r,e);n.addChildNode(r)}}writeMap(e,t,n,r,i=!1){if(!e.isMemberSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${e.getName(!0)}`);let a=e.getMergedTraits(),o=e.getKeySchema(),s=o.getMergedTraits().xmlName??`key`,c=e.getValueSchema(),l=c.getMergedTraits(),u=l.xmlName??`value`,d=!!l.sparse,f=!!a.xmlFlattened,[p,m]=this.getXmlnsAttribute(e,r),h=(e,t,n)=>{let r=$.XmlNode.of(s,t),[i,a]=this.getXmlnsAttribute(o,m);a&&r.addAttribute(i,a),e.addChildNode(r);let l=$.XmlNode.of(u);c.isListSchema()?this.writeList(c,n,l,m):c.isMapSchema()?this.writeMap(c,n,l,m,!0):c.isStructSchema()?l=this.writeStruct(c,n,m):this.writeSimpleInto(c,n,l,m),e.addChildNode(l)};if(f){for(let[r,i]of Object.entries(t))if(d||i!=null){let t=$.XmlNode.of(a.xmlName??e.getMemberName());h(t,r,i),n.addChildNode(t)}}else{let r;i||(r=$.XmlNode.of(a.xmlName??e.getMemberName()),m&&r.addAttribute(p,m),n.addChildNode(r));for(let[e,a]of Object.entries(t))if(d||a!=null){let t=$.XmlNode.of(`entry`);h(t,e,a),(i?n:r).addChildNode(t)}}}writeSimple(e,t){if(t===null)throw Error(`@aws-sdk/core/protocols - (XML serializer) cannot write null value.`);let n=x.of(e),r=null;if(t&&typeof t==`object`)if(n.isBlobSchema())r=(this.serdeContext?.base64Encoder??kn.toBase64)(t);else if(n.isTimestampSchema()&&t instanceof Date)switch(F(n,this.settings)){case 5:r=t.toISOString().replace(`.000Z`,`Z`);break;case 6:r=(0,On.dateToUtcString)(t);break;case 7:r=String(t.getTime()/1e3);break;default:console.warn(`Missing timestamp format, using http date`,t),r=(0,On.dateToUtcString)(t);break}else if(n.isBigDecimalSchema()&&t)return t instanceof A?t.string:String(t);else if(n.isMapSchema()||n.isListSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.`);else throw Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${n.getName(!0)}`);if((n.isBooleanSchema()||n.isNumericSchema()||n.isBigIntegerSchema()||n.isBigDecimalSchema())&&(r=String(t)),n.isStringSchema()&&(r=t===void 0&&n.isIdempotencyToken()?(0,B.v4)():String(t)),r===null)throw Error(`Unhandled schema-value pair ${n.getName(!0)}=${t}`);return r}writeSimpleInto(e,t,n,r){let i=this.writeSimple(e,t),a=x.of(e),o=new $.XmlText(i),[s,c]=this.getXmlnsAttribute(a,r);c&&n.addAttribute(s,c),n.addChildNode(o)}getXmlnsAttribute(e,t){let[n,r]=e.getMergedTraits().xmlNamespace??[];return r&&r!==t?[n?`xmlns:${n}`:`xmlns`,r]:[void 0,void 0]}}})),Mn,Nn=n((()=>{xt(),fn(),jn(),Mn=class extends bt{settings;constructor(e){super(),this.settings=e}createSerializer(){let e=new An(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){let e=new dn(this.settings);return e.setSerdeContext(this.serdeContext),e}}})),Pn,Fn=n((()=>{P(),C(),pt(),Dn(),Nn(),Pn=class extends te{codec;serializer;deserializer;mixin=new ft;constructor(e){super(e);let t={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace};this.codec=new Mn(t),this.serializer=new L(this.codec.createSerializer(),t),this.deserializer=new j(this.codec.createDeserializer(),t),this.compositeErrorRegistry}getPayloadCodec(){return this.codec}getShapeId(){return`aws.protocols#restXml`}async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n),i=x.of(e.input);if(!r.headers[`content-type`]){let e=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);e&&(r.headers[`content-type`]=e)}return typeof r.body==`string`&&r.headers[`content-type`]===this.getDefaultContentType()&&!r.body.startsWith(``+r.body),r}async deserializeResponse(e,t,n){return super.deserializeResponse(e,t,n)}async handleError(e,t,n,r,i){let a=En(n,r)??`Unknown`;if(this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace),r.Error&&typeof r.Error==`object`)for(let e of Object.keys(r.Error))r[e]=r.Error[e],e.toLowerCase()===`message`&&(r.message=r.Error[e]);r.RequestId&&!i.requestId&&(i.requestId=r.RequestId);let{errorSchema:o,errorMetadata:s}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,r,i),c=x.of(o),l=r.Error?.message??r.Error?.Message??r.message??r.Message??`UnknownError`,u=new((this.compositeErrorRegistry.getErrorCtor(o))??Error)(l);await this.deserializeHttpMessage(o,t,n,r);let d={},f=this.codec.createDeserializer();for(let[e,t]of c.structIterator()){let n=t.getMergedTraits().xmlName??e,i=r.Error?.[n]??r[n];d[e]=f.readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(u,s,{$fault:c.getMergedTraits().error,message:l},d),r)}getDefaultContentType(){return`application/xml`}hasUnstructuredPayloadBinding(e){for(let[,t]of e.structIterator())if(t.getMergedTraits().httpPayload)return!(t.isStructSchema()||t.isMapSchema()||t.isListSchema());return!1}}})),In=i({AwsEc2QueryProtocol:()=>yn,AwsJson1_0Protocol:()=>Yt,AwsJson1_1Protocol:()=>Zt,AwsJsonRpcProtocol:()=>qt,AwsQueryProtocol:()=>_n,AwsRestJsonProtocol:()=>$t,AwsRestXmlProtocol:()=>Pn,AwsSmithyRpcV2CborProtocol:()=>mt,JsonCodec:()=>Gt,JsonShapeDeserializer:()=>Lt,JsonShapeSerializer:()=>Ut,QueryShapeSerializer:()=>hn,XmlCodec:()=>Mn,XmlShapeDeserializer:()=>dn,XmlShapeSerializer:()=>An,_toBool:()=>_t,_toNum:()=>vt,_toStr:()=>gt,awsExpectUnion:()=>nn,loadRestJsonErrorCode:()=>Pt,loadRestXmlErrorCode:()=>En,parseJsonBody:()=>At,parseJsonErrorBody:()=>jt,parseXmlBody:()=>wn,parseXmlErrorBody:()=>Tn}),Ln=n((()=>{ht(),yt(),Xt(),Qt(),Jt(),en(),Kt(),Rt(),Wt(),rn(),Ft(),bn(),vn(),xn(),gn(),Fn(),Nn(),fn(),jn(),Dn()})),Rn=a((e=>{var t=v(),n=p(),r=f(),i=s(),a=b(),o=oe();let c=`X-Amz-Algorithm`,l=`X-Amz-Credential`,u=`X-Amz-Date`,d=`X-Amz-SignedHeaders`,m=`X-Amz-Expires`,h=`X-Amz-Signature`,g=`X-Amz-Security-Token`,_=`authorization`,y=`x-amz-date`,x=`date`,S=[_,y,x],C=`x-amz-signature`,w=`x-amz-content-sha256`,T=`x-amz-security-token`,E={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},D=/^proxy-/,O=/^sec-/,ee=[/^proxy-/i,/^sec-/i],k=`AWS4-HMAC-SHA256`,A=`AWS4-HMAC-SHA256-PAYLOAD`,j=`UNSIGNED-PAYLOAD`,M=`aws4_request`,te=3600*24*7,N={},P=[],F=(e,t,n)=>`${e}/${t}/${n}/${M}`,I=async(e,n,r,i,a)=>{let o=await ne(e,n.secretAccessKey,n.accessKeyId),s=`${r}:${i}:${a}:${t.toHex(o)}:${n.sessionToken}`;if(s in N)return N[s];for(P.push(s);P.length>50;)delete N[P.shift()];let c=`AWS4${n.secretAccessKey}`;for(let t of[r,i,a,M])c=await ne(e,c,t);return N[s]=c},L=()=>{P.length=0,Object.keys(N).forEach(e=>{delete N[e]})},ne=(e,t,r)=>{let i=new e(t);return i.update(n.toUint8Array(r)),i.digest()},R=({headers:e},t,n)=>{let r={};for(let i of Object.keys(e).sort()){if(e[i]==null)continue;let a=i.toLowerCase();(a in E||t?.has(a)||D.test(a)||O.test(a))&&(!n||n&&!n.has(a))||(r[a]=e[i].trim().replace(/\s+/g,` `))}return r},z=async({headers:e,body:i},a)=>{for(let t of Object.keys(e))if(t.toLowerCase()===w)return e[t];if(i==null)return`e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`;if(typeof i==`string`||ArrayBuffer.isView(i)||r.isArrayBuffer(i)){let e=new a;return e.update(n.toUint8Array(i)),t.toHex(await e.digest())}return j};var re=class{format(e){let t=[];for(let r of Object.keys(e)){let i=n.fromUtf8(r);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[r]))}let r=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0)),i=0;for(let e of t)r.set(e,i),i+=e.byteLength;return r}formatHeaderValue(e){switch(e.type){case`boolean`:return Uint8Array.from([+!e.value]);case`byte`:return Uint8Array.from([2,e.value]);case`short`:let r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,e.value,!1),new Uint8Array(r.buffer);case`integer`:let i=new DataView(new ArrayBuffer(5));return i.setUint8(0,4),i.setInt32(1,e.value,!1),new Uint8Array(i.buffer);case`long`:let a=new Uint8Array(9);return a[0]=5,a.set(e.value.bytes,1),a;case`binary`:let o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);let s=new Uint8Array(o.buffer);return s.set(e.value,3),s;case`string`:let c=n.fromUtf8(e.value),l=new DataView(new ArrayBuffer(3+c.byteLength));l.setUint8(0,7),l.setUint16(1,c.byteLength,!1);let u=new Uint8Array(l.buffer);return u.set(c,3),u;case`timestamp`:let d=new Uint8Array(9);return d[0]=8,d.set(B.fromNumber(e.value.valueOf()).bytes,1),d;case`uuid`:if(!ae.test(e.value))throw Error(`Invalid UUID received: ${e.value}`);let f=new Uint8Array(17);return f[0]=9,f.set(t.fromHex(e.value.replace(/\-/g,``)),1),f}}},ie;(function(e){e[e.boolTrue=0]=`boolTrue`,e[e.boolFalse=1]=`boolFalse`,e[e.byte=2]=`byte`,e[e.short=3]=`short`,e[e.integer=4]=`integer`,e[e.long=5]=`long`,e[e.byteArray=6]=`byteArray`,e[e.string=7]=`string`,e[e.timestamp=8]=`timestamp`,e[e.uuid=9]=`uuid`})(ie||={});let ae=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var B=class e{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw Error(`Int64 buffers must be exactly 8 bytes`)}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let n=new Uint8Array(8);for(let e=7,r=Math.abs(Math.round(t));e>-1&&r>0;e--,r/=256)n[e]=r;return t<0&&se(n),new e(n)}valueOf(){let e=this.bytes.slice(0),n=e[0]&128;return n&&se(e),parseInt(t.toHex(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function se(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}let V=(e,t)=>{e=e.toLowerCase();for(let n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},ce=(e,t={})=>{let{headers:n,query:r={}}=i.HttpRequest.clone(e);for(let e of Object.keys(n)){let i=e.toLowerCase();(i.slice(0,6)===`x-amz-`&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}},le=e=>{e=i.HttpRequest.clone(e);for(let t of Object.keys(e.headers))S.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},ue=({query:e={}})=>{let t=[],n={};for(let r of Object.keys(e)){if(r.toLowerCase()===C)continue;let i=o.escapeUri(r);t.push(i);let a=e[r];typeof a==`string`?n[i]=`${i}=${o.escapeUri(a)}`:Array.isArray(a)&&(n[i]=a.slice(0).reduce((e,t)=>e.concat([`${i}=${o.escapeUri(t)}`]),[]).sort().join(`&`))}return t.sort().map(e=>n[e]).filter(e=>e).join(`&`)},de=e=>fe(e).toISOString().replace(/\.\d{3}Z$/,`Z`),fe=e=>typeof e==`number`?new Date(e*1e3):typeof e==`string`?Number(e)?new Date(Number(e)*1e3):new Date(e):e;var H=class{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o=!0}){this.service=r,this.sha256=i,this.uriEscapePath=o,this.applyChecksum=typeof e==`boolean`?e:!0,this.regionProvider=a.normalizeProvider(n),this.credentialProvider=a.normalizeProvider(t)}createCanonicalRequest(e,t,n){let r=Object.keys(t).sort();return`${e.method} +${this.getCanonicalPath(e)} +${ue(e)} +${r.map(e=>`${e}:${t[e]}`).join(` +`)} + +${r.join(`;`)} +${n}`}async createStringToSign(e,r,i,a){let o=new this.sha256;o.update(n.toUint8Array(i));let s=await o.digest();return`${a} +${e} +${r} +${t.toHex(s)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let t=[];for(let n of e.split(`/`))n?.length!==0&&n!==`.`&&(n===`..`?t.pop():t.push(n));let n=`${e?.startsWith(`/`)?`/`:``}${t.join(`/`)}${t.length>0&&e?.endsWith(`/`)?`/`:``}`;return o.escapeUri(n).replace(/%2F/g,`/`)}return e}validateResolvedCredentials(e){if(typeof e!=`object`||typeof e.accessKeyId!=`string`||typeof e.secretAccessKey!=`string`)throw Error(`Resolved credential object is not valid`)}formatDate(e){let t=de(e).replace(/[\-:]/g,``);return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(`;`)}},pe=class extends H{headerFormatter=new re;constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:a=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:a})}async presign(e,t={}){let{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:a,signableHeaders:o,hoistableHeaders:s,signingRegion:f,signingService:p}=t,_=await this.credentialProvider();this.validateResolvedCredentials(_);let v=f??await this.regionProvider(),{longDate:y,shortDate:b}=this.formatDate(n);if(r>te)return Promise.reject(`Signature version 4 presigned URLs must have an expiration date less than one week in the future`);let x=F(b,v,p??this.service),S=ce(le(e),{unhoistableHeaders:a,hoistableHeaders:s});_.sessionToken&&(S.query[g]=_.sessionToken),S.query[c]=k,S.query[l]=`${_.accessKeyId}/${x}`,S.query[u]=y,S.query[m]=r.toString(10);let C=R(S,i,o);return S.query[d]=this.getCanonicalHeaderList(C),S.query[h]=await this.getSignature(y,x,this.getSigningKey(_,v,b,p),this.createCanonicalRequest(S,C,await z(e,this.sha256))),S}async sign(e,t){return typeof e==`string`?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:n},{signingDate:r=new Date,priorSignature:i,signingRegion:a,signingService:o,eventStreamCredentials:s}){let c=a??await this.regionProvider(),{shortDate:l,longDate:u}=this.formatDate(r),d=F(l,c,o??this.service),f=await z({headers:{},body:n},this.sha256),p=new this.sha256;p.update(e);let m=[A,u,d,i,t.toHex(await p.digest()),f].join(` +`);return this.signString(m,{signingDate:r,signingRegion:c,signingService:o,eventStreamCredentials:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r,eventStreamCredentials:i}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature,eventStreamCredentials:i}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:r=new Date,signingRegion:i,signingService:a,eventStreamCredentials:o}={}){let s=o??await this.credentialProvider();this.validateResolvedCredentials(s);let c=i??await this.regionProvider(),{shortDate:l}=this.formatDate(r),u=new this.sha256(await this.getSigningKey(s,c,l,a));return u.update(n.toUint8Array(e)),t.toHex(await u.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:a}={}){let o=await this.credentialProvider();this.validateResolvedCredentials(o);let s=i??await this.regionProvider(),c=le(e),{longDate:l,shortDate:u}=this.formatDate(t),d=F(u,s,a??this.service);c.headers[y]=l,o.sessionToken&&(c.headers[T]=o.sessionToken);let f=await z(c,this.sha256);!V(w,c.headers)&&this.applyChecksum&&(c.headers[w]=f);let p=R(c,r,n),m=await this.getSignature(l,d,this.getSigningKey(o,s,u,a),this.createCanonicalRequest(c,p,f));return c.headers[_]=`${k} Credential=${o.accessKeyId}/${d}, SignedHeaders=${this.getCanonicalHeaderList(p)}, Signature=${m}`,c}async getSignature(e,r,i,a){let o=await this.createStringToSign(e,r,a,k),s=new this.sha256(await i);return s.update(n.toUint8Array(o)),t.toHex(await s.digest())}getSigningKey(e,t,n,r){return I(this.sha256,e,n,t,r||this.service)}};e.ALGORITHM_IDENTIFIER=k,e.ALGORITHM_IDENTIFIER_V4A=`AWS4-ECDSA-P256-SHA256`,e.ALGORITHM_QUERY_PARAM=c,e.ALWAYS_UNSIGNABLE_HEADERS=E,e.AMZ_DATE_HEADER=y,e.AMZ_DATE_QUERY_PARAM=u,e.AUTH_HEADER=_,e.CREDENTIAL_QUERY_PARAM=l,e.DATE_HEADER=x,e.EVENT_ALGORITHM_IDENTIFIER=A,e.EXPIRES_QUERY_PARAM=m,e.GENERATED_HEADERS=S,e.HOST_HEADER=`host`,e.KEY_TYPE_IDENTIFIER=M,e.MAX_CACHE_SIZE=50,e.MAX_PRESIGNED_TTL=te,e.PROXY_HEADER_PATTERN=D,e.REGION_SET_PARAM=`X-Amz-Region-Set`,e.SEC_HEADER_PATTERN=O,e.SHA256_HEADER=w,e.SIGNATURE_HEADER=C,e.SIGNATURE_QUERY_PARAM=h,e.SIGNED_HEADERS_QUERY_PARAM=d,e.SignatureV4=pe,e.SignatureV4Base=H,e.TOKEN_HEADER=T,e.TOKEN_QUERY_PARAM=g,e.UNSIGNABLE_PATTERNS=ee,e.UNSIGNED_PAYLOAD=j,e.clearCredentialCache=L,e.createScope=F,e.getCanonicalHeaders=R,e.getCanonicalQuery=ue,e.getPayloadHash=z,e.getSigningKey=I,e.hasHeader=V,e.moveHeadersToQuery=ce,e.prepareRequest=le,e.signatureV4aContainer={SignatureV4a:null}})),zn=a((e=>{e.SelectorType=void 0,(function(e){e.ENV=`env`,e.CONFIG=`shared config entry`})(e.SelectorType||={}),e.booleanSelector=(e,t,n)=>{if(t in e){if(e[t]===`true`)return!0;if(e[t]===`false`)return!1;throw Error(`Cannot load ${n} "${t}". Expected "true" or "false", got ${e[t]}.`)}},e.numberSelector=(e,t,n)=>{if(!(t in e))return;let r=parseInt(e[t],10);if(Number.isNaN(r))throw TypeError(`Cannot load ${n} '${t}'. Expected number, got '${e[t]}'.`);return r}})),Bn,Vn,Hn=n((()=>{Bn=o(),Vn=e=>e[Bn.SMITHY_CONTEXT_KEY]||(e[Bn.SMITHY_CONTEXT_KEY]={})})),Un,Wn=n((()=>{Un=(e,t)=>{if(!t||t.length===0)return e;let n=[];for(let r of t)for(let t of e)t.schemeId.split(`#`)[1]===r&&n.push(t);for(let t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n}}));function Gn(e){let t=new Map;for(let n of e)t.set(n.schemeId,n);return t}var Kn,qn,Jn=n((()=>{Kn=b(),Wn(),qn=(e,t)=>(n,r)=>async i=>{let a=Un(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=Gn(e.httpAuthSchemes),s=(0,Kn.getSmithyContext)(r),c=[];for(let n of a){let i=o.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}let a=i.identityProvider(await t.identityProviderConfigProvider(e));if(!a){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:l={},signingProperties:u={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},l),n.signingProperties=Object.assign(n.signingProperties||{},u),s.selectedHttpAuthScheme={httpAuthOption:n,identity:await a(n.identityProperties),signer:i.signer};break}if(!s.selectedHttpAuthScheme)throw Error(c.join(` +`));return n(i)}})),Yn,Xn,Zn=n((()=>{Jn(),Yn={step:`serialize`,tags:[`HTTP_AUTH_SCHEME`],name:`httpAuthSchemeMiddleware`,override:!0,relation:`before`,toMiddleware:`endpointV2Middleware`},Xn=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(qn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),Yn)}})})),Qn,$n,er=n((()=>{Jn(),Qn={step:`serialize`,tags:[`HTTP_AUTH_SCHEME`],name:`httpAuthSchemeMiddleware`,override:!0,relation:`before`,toMiddleware:`serializerMiddleware`},$n=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(qn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),Qn)}})})),tr=n((()=>{Jn(),Zn(),er()})),nr,rr,ir,ar,or,sr=n((()=>{nr=s(),rr=b(),ir=e=>e=>{throw e},ar=(e,t)=>{},or=e=>(e,t)=>async n=>{if(!nr.HttpRequest.isInstance(n.request))return e(n);let r=(0,rr.getSmithyContext)(t).selectedHttpAuthScheme;if(!r)throw Error(`No HttpAuthScheme was selected: unable to sign request`);let{httpAuthOption:{signingProperties:i={}},identity:a,signer:o}=r,s=await e({...n,request:await o.sign(n.request,a,i)}).catch((o.errorHandler||ir)(i));return(o.successHandler||ar)(s.response,i),s}})),cr,lr,ur=n((()=>{sr(),cr={step:`finalizeRequest`,tags:[`HTTP_SIGNING`],name:`httpSigningMiddleware`,aliases:[`apiKeyMiddleware`,`tokenMiddleware`,`awsAuthMiddleware`],override:!0,relation:`after`,toMiddleware:`retryMiddleware`},lr=e=>({applyToStack:t=>{t.addRelativeTo(or(e),cr)}})})),dr=n((()=>{sr(),ur()})),fr,pr=n((()=>{fr=e=>{if(typeof e==`function`)return e;let t=Promise.resolve(e);return()=>t}}));function mr(e,t,n,r,i){return async function*(a,o,...s){let c=o,l=a.startingToken??c[n],u=!0,d;for(;u;){if(c[n]=l,i&&(c[i]=c[i]??a.pageSize),a.client instanceof e)d=await hr(t,a.client,o,a.withCommand,...s);else throw Error(`Invalid client, expected instance of ${e.name}`);yield d;let f=l;l=gr(d,r),u=!!(l&&(!a.stopOnSameToken||l!==f))}return void 0}}var hr,gr,_r=n((()=>{hr=async(e,t,n,r=e=>e,...i)=>{let a=new e(n);return a=r(a)??a,await t.send(a,...i)},gr=(e,t)=>{let n=e,r=t.split(`.`);for(let e of r){if(!n||typeof n!=`object`)return;n=n[e]}return n}})),vr=n((()=>{P()}));function yr(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}var br=n((()=>{})),xr,Sr=n((()=>{xr=class{authSchemes=new Map;constructor(e){for(let[t,n]of Object.entries(e))n!==void 0&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}})),Cr,wr,Tr,Er=n((()=>{Cr=s(),wr=o(),Tr=class{async sign(e,t,n){if(!n)throw Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!n.name)throw Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!n.in)throw Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!t.apiKey)throw Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let r=Cr.HttpRequest.clone(e);if(n.in===wr.HttpApiKeyAuthLocation.QUERY)r.query[n.name]=t.apiKey;else if(n.in===wr.HttpApiKeyAuthLocation.HEADER)r.headers[n.name]=n.scheme?`${n.scheme} ${t.apiKey}`:t.apiKey;else throw Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+n.in+"`");return r}}})),Dr,Or,kr=n((()=>{Dr=s(),Or=class{async sign(e,t,n){let r=Dr.HttpRequest.clone(e);if(!t.token)throw Error("request could not be signed with `token` since the `token` is not defined");return r.headers.Authorization=`Bearer ${t.token}`,r}}})),Ar,jr=n((()=>{Ar=class{async sign(e,t,n){return e}}})),Mr=n((()=>{Er(),kr(),jr()})),Nr,Pr,Fr,Ir,Lr,Rr=n((()=>{Nr=e=>function(t){return Ir(t)&&t.expiration.getTime()-Date.now()e.expiration!==void 0,Lr=(e,t,n)=>{if(e===void 0)return;let r=typeof e==`function`?e:async()=>Promise.resolve(e),i,a,o,s=!1,c=async e=>{a||=r(e);try{i=await a,o=!0,s=!1}finally{a=void 0}return i};return t===void 0?async e=>((!o||e?.forceRefresh)&&(i=await c(e)),i):async e=>((!o||e?.forceRefresh)&&(i=await c(e)),s?i:n(i)?(t(i)&&await c(e),i):(s=!0,i))}})),zr=n((()=>{Sr(),Mr(),Rr()})),Br=i({DefaultIdentityProviderConfig:()=>xr,EXPIRATION_MS:()=>Pr,HttpApiKeyAuthSigner:()=>Tr,HttpBearerAuthSigner:()=>Or,NoAuthSigner:()=>Ar,createIsIdentityExpiredFunction:()=>Nr,createPaginator:()=>mr,doesIdentityRequireRefresh:()=>Ir,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Xn,getHttpAuthSchemePlugin:()=>$n,getHttpSigningPlugin:()=>lr,getSmithyContext:()=>Vn,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>Yn,httpAuthSchemeMiddleware:()=>qn,httpAuthSchemeMiddlewareOptions:()=>Qn,httpSigningMiddleware:()=>or,httpSigningMiddlewareOptions:()=>cr,isIdentityExpired:()=>Fr,memoizeIdentityProvider:()=>Lr,normalizeProvider:()=>fr,requestBuilder:()=>ne,setFeature:()=>yr}),Vr=n((()=>{Hn(),tr(),dr(),pr(),_r(),vr(),br(),zr()})),Hr=a((e=>{var t=o(),n=class e{nodes;root;conditions;results;constructor(e,t,n,r){this.nodes=e,this.root=t,this.conditions=n,this.results=r}static from(t,n,r,i){return new e(t,n,r,i)}},r=class{capacity;data=new Map;parameters=[];constructor({size:e,params:t}){this.capacity=e??50,t&&(this.parameters=t)}get(e,t){let n=this.hash(e);if(n===!1)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){let e=this.data.keys(),t=0;for(;;){let{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t=``,{parameters:n}=this;if(n.length===0)return!1;for(let r of n){let n=String(e[r]??``);if(n.includes(`|;`))return!1;t+=n+`|;`}return t}},i=class extends Error{constructor(e){super(e),this.name=`EndpointError`}};let a=`endpoints`;function s(e){return typeof e!=`object`||!e?e:`ref`in e?`$${s(e.ref)}`:`fn`in e?`${e.fn}(${(e.argv||[]).map(s).join(`, `)})`:JSON.stringify(e,null,2)}let c={},l=(e,t)=>e===t;function u(...e){for(let t of e)if(t!=null)return t}let d=e=>{let t=e.split(`.`),n=[];for(let r of t){let t=r.indexOf(`[`);if(t!==-1){if(r.indexOf(`]`)!==r.length-1)throw new i(`Path: '${e}' does not end with ']'`);let a=r.slice(t+1,-1);if(Number.isNaN(parseInt(a)))throw new i(`Invalid array index: '${a}' in path: '${e}'`);t!==0&&n.push(r.slice(0,t)),n.push(a)}else n.push(r)}return n},f=(e,t)=>d(t).reduce((n,r)=>{if(typeof n!=`object`)throw new i(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);if(Array.isArray(n)){let e=parseInt(r);return n[e<0?n.length+e:e]}return n[r]},e),p=e=>e!=null,m=RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`),h=(e,t=!1)=>{if(!t)return m.test(e);let n=e.split(`.`);for(let e of n)if(!h(e))return!1;return!0};function g(e,t,n){return e?t:n}let _=e=>!e,v=RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`),y=e=>v.test(e)||e.startsWith(`[`)&&e.endsWith(`]`),b={[t.EndpointURLScheme.HTTP]:80,[t.EndpointURLScheme.HTTPS]:443},x=e=>{let n=(()=>{try{if(e instanceof URL)return e;if(typeof e==`object`&&`hostname`in e){let{hostname:t,port:n,protocol:r=``,path:i=``,query:a={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:``}${i}`);return o.search=Object.entries(a).map(([e,t])=>`${e}=${t}`).join(`&`),o}return new URL(e)}catch{return null}})();if(!n)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let r=n.href,{host:i,hostname:a,pathname:o,protocol:s,search:c}=n;if(c)return null;let l=s.slice(0,-1);if(!Object.values(t.EndpointURLScheme).includes(l))return null;let u=y(a);return{scheme:l,authority:`${i}${r.includes(`${i}:${b[l]}`)||typeof e==`string`&&e.includes(`${i}:${b[l]}`)?`:${b[l]}`:``}`,path:o,normalizedPath:o.endsWith(`/`)?o:`${o}/`,isIp:u}};function S(e,t,n){if(n===1)return[e];if(e===``)return[``];let r=e.split(t);return n===0?r:r.slice(0,n-1).concat(r.slice(1).join(t))}let C={booleanEquals:l,coalesce:u,getAttr:f,isSet:p,isValidHostLabel:h,ite:g,not:_,parseURL:x,split:S,stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>e==null||t>=n||e.lengthencodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},w=(e,t)=>{let n=[],{referenceRecord:r,endpointParams:i}=t,a=0;for(;at.referenceRecord[e]??t.endpointParams[e],E=(e,t,n)=>{if(typeof e==`string`)return w(e,n);if(e.fn)return O.callFunction(e,n);if(e.ref)return T(e,n);throw new i(`'${t}': ${String(e)} is not a string, function or reference.`)},D=({fn:e,argv:t},n)=>{let r=Array(t.length);for(let e=0;e{if(e&&e in n.referenceRecord)throw new i(`'${e}' is already defined in Reference Record.`);let r=D(t,n);return n.logger?.debug?.(`${a} evaluateCondition: ${s(t)} = ${s(r)}`),{result:r===``?!0:!!r,...e!=null&&{toAssign:{name:e,value:r}}}},k=(e,t)=>Object.entries(e??{}).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{let r=E(e,`Header value entry`,t);if(typeof r!=`string`)throw new i(`Header '${n}' value '${r}' is not a string`);return r})}),{}),A=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:M.getEndpointProperty(r,t)}),{}),j=(e,t)=>{if(Array.isArray(e))return e.map(e=>j(e,t));switch(typeof e){case`string`:return w(e,t);case`object`:if(e===null)throw new i(`Unexpected endpoint property: ${e}`);return M.getEndpointProperties(e,t);case`boolean`:return e;default:throw new i(`Unexpected endpoint property type: ${typeof e}`)}},M={getEndpointProperty:j,getEndpointProperties:A},te=(e,t)=>{let n=E(e,`Endpoint URL`,t);if(typeof n==`string`)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new i(`Endpoint URL must be a string, got ${typeof n}`)},N=1e8,P=(e,t)=>{let{nodes:n,root:r,results:a,conditions:o}=e,s=r,c={},l={referenceRecord:c,endpointParams:t.endpointParams,logger:t.logger};for(;s!==1&&s!==-1&&s=0===f.result?r:i}if(s>=N){let e=a[s-N];if(e[0]===-1){let[,t]=e;throw new i(E(t,`Error`,l))}let[t,n,r]=e;return{url:te(t,l),properties:A(n,l),headers:k(r??{},l)}}throw new i(`No matching endpoint.`)},F=(e=[],t)=>{let n={};for(let r of e){let{result:e,toAssign:i}=ee(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${a} assign: ${i.name} := ${s(i.value)}`))}return{result:!0,referenceRecord:n}},I=(e,t)=>{let{conditions:n,endpoint:r}=e,{result:i,referenceRecord:o}=F(n,t);if(!i)return;let c={...t,referenceRecord:{...t.referenceRecord,...o}},{url:l,properties:u,headers:d}=r;return t.logger?.debug?.(`${a} Resolving endpoint from template: ${s(r)}`),{...d!=null&&{headers:k(d,c)},...u!=null&&{properties:A(u,c)},url:te(l,c)}},L=(e,t)=>{let{conditions:n,error:r}=e,{result:a,referenceRecord:o}=F(n,t);if(a)throw new i(E(r,`Error`,{...t,referenceRecord:{...t.referenceRecord,...o}}))},ne=(e,t)=>{for(let n of e)if(n.type===`endpoint`){let e=I(n,t);if(e)return e}else if(n.type===`error`)L(n,t);else if(n.type===`tree`){let e=R.evaluateTreeRule(n,t);if(e)return e}else throw new i(`Unknown endpoint rule: ${n}`);throw new i(`Rules evaluation failed`)},R={evaluateRules:ne,evaluateTreeRule:(e,t)=>{let{conditions:n,rules:r}=e,{result:i,referenceRecord:a}=F(n,t);if(i)return R.evaluateRules(r,{...t,referenceRecord:{...t.referenceRecord,...a}})}};e.BinaryDecisionDiagram=n,e.EndpointCache=r,e.EndpointError=i,e.customEndpointFunctions=c,e.decideEndpoint=P,e.isIpAddress=y,e.isValidHostLabel=h,e.resolveEndpoint=(e,t)=>{let{endpointParams:n,logger:r}=t,{parameters:o,rules:c}=e;t.logger?.debug?.(`${a} Initial EndpointParams: ${s(n)}`);for(let e in o){let t=o[e],r=n[e];if(r==null&&t.default!=null){n[e]=t.default;continue}if(t.required&&r==null)throw new i(`Missing required parameter: '${e}'`)}let l=ne(c,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${a} Resolved endpoint: ${s(l)}`),l}})),Ur=a((e=>{var t=Hr(),n=se();let r=(e,n=!1)=>{if(n){for(let t of e.split(`.`))if(!r(t))return!1;return!0}return!(!t.isValidHostLabel(e)||e.length<3||e.length>63||e!==e.toLowerCase()||t.isIpAddress(e))},i=e=>{let t=e.split(`:`);if(t.length<6)return null;let[n,r,i,a,o,...s]=t;return n!==`arn`||r===``||i===``||s.join(`:`)===``?null:{partition:r,service:i,region:a,accountId:o,resourceId:s.map(e=>e.split(`/`)).flat()}};var a={partitions:[{id:`aws`,outputs:{dnsSuffix:`amazonaws.com`,dualStackDnsSuffix:`api.aws`,implicitGlobalRegion:`us-east-1`,name:`aws`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$`,regions:{"af-south-1":{description:`Africa (Cape Town)`},"ap-east-1":{description:`Asia Pacific (Hong Kong)`},"ap-east-2":{description:`Asia Pacific (Taipei)`},"ap-northeast-1":{description:`Asia Pacific (Tokyo)`},"ap-northeast-2":{description:`Asia Pacific (Seoul)`},"ap-northeast-3":{description:`Asia Pacific (Osaka)`},"ap-south-1":{description:`Asia Pacific (Mumbai)`},"ap-south-2":{description:`Asia Pacific (Hyderabad)`},"ap-southeast-1":{description:`Asia Pacific (Singapore)`},"ap-southeast-2":{description:`Asia Pacific (Sydney)`},"ap-southeast-3":{description:`Asia Pacific (Jakarta)`},"ap-southeast-4":{description:`Asia Pacific (Melbourne)`},"ap-southeast-5":{description:`Asia Pacific (Malaysia)`},"ap-southeast-6":{description:`Asia Pacific (New Zealand)`},"ap-southeast-7":{description:`Asia Pacific (Thailand)`},"aws-global":{description:`aws global region`},"ca-central-1":{description:`Canada (Central)`},"ca-west-1":{description:`Canada West (Calgary)`},"eu-central-1":{description:`Europe (Frankfurt)`},"eu-central-2":{description:`Europe (Zurich)`},"eu-north-1":{description:`Europe (Stockholm)`},"eu-south-1":{description:`Europe (Milan)`},"eu-south-2":{description:`Europe (Spain)`},"eu-west-1":{description:`Europe (Ireland)`},"eu-west-2":{description:`Europe (London)`},"eu-west-3":{description:`Europe (Paris)`},"il-central-1":{description:`Israel (Tel Aviv)`},"me-central-1":{description:`Middle East (UAE)`},"me-south-1":{description:`Middle East (Bahrain)`},"mx-central-1":{description:`Mexico (Central)`},"sa-east-1":{description:`South America (Sao Paulo)`},"us-east-1":{description:`US East (N. Virginia)`},"us-east-2":{description:`US East (Ohio)`},"us-west-1":{description:`US West (N. California)`},"us-west-2":{description:`US West (Oregon)`}}},{id:`aws-cn`,outputs:{dnsSuffix:`amazonaws.com.cn`,dualStackDnsSuffix:`api.amazonwebservices.com.cn`,implicitGlobalRegion:`cn-northwest-1`,name:`aws-cn`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^cn\\-\\w+\\-\\d+$`,regions:{"aws-cn-global":{description:`aws-cn global region`},"cn-north-1":{description:`China (Beijing)`},"cn-northwest-1":{description:`China (Ningxia)`}}},{id:`aws-eusc`,outputs:{dnsSuffix:`amazonaws.eu`,dualStackDnsSuffix:`api.amazonwebservices.eu`,implicitGlobalRegion:`eusc-de-east-1`,name:`aws-eusc`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^eusc\\-(de)\\-\\w+\\-\\d+$`,regions:{"eusc-de-east-1":{description:`AWS European Sovereign Cloud (Germany)`}}},{id:`aws-iso`,outputs:{dnsSuffix:`c2s.ic.gov`,dualStackDnsSuffix:`api.aws.ic.gov`,implicitGlobalRegion:`us-iso-east-1`,name:`aws-iso`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^us\\-iso\\-\\w+\\-\\d+$`,regions:{"aws-iso-global":{description:`aws-iso global region`},"us-iso-east-1":{description:`US ISO East`},"us-iso-west-1":{description:`US ISO WEST`}}},{id:`aws-iso-b`,outputs:{dnsSuffix:`sc2s.sgov.gov`,dualStackDnsSuffix:`api.aws.scloud`,implicitGlobalRegion:`us-isob-east-1`,name:`aws-iso-b`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^us\\-isob\\-\\w+\\-\\d+$`,regions:{"aws-iso-b-global":{description:`aws-iso-b global region`},"us-isob-east-1":{description:`US ISOB East (Ohio)`},"us-isob-west-1":{description:`US ISOB West`}}},{id:`aws-iso-e`,outputs:{dnsSuffix:`cloud.adc-e.uk`,dualStackDnsSuffix:`api.cloud-aws.adc-e.uk`,implicitGlobalRegion:`eu-isoe-west-1`,name:`aws-iso-e`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^eu\\-isoe\\-\\w+\\-\\d+$`,regions:{"aws-iso-e-global":{description:`aws-iso-e global region`},"eu-isoe-west-1":{description:`EU ISOE West`}}},{id:`aws-iso-f`,outputs:{dnsSuffix:`csp.hci.ic.gov`,dualStackDnsSuffix:`api.aws.hci.ic.gov`,implicitGlobalRegion:`us-isof-south-1`,name:`aws-iso-f`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^us\\-isof\\-\\w+\\-\\d+$`,regions:{"aws-iso-f-global":{description:`aws-iso-f global region`},"us-isof-east-1":{description:`US ISOF EAST`},"us-isof-south-1":{description:`US ISOF SOUTH`}}},{id:`aws-us-gov`,outputs:{dnsSuffix:`amazonaws.com`,dualStackDnsSuffix:`api.aws`,implicitGlobalRegion:`us-gov-west-1`,name:`aws-us-gov`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^us\\-gov\\-\\w+\\-\\d+$`,regions:{"aws-us-gov-global":{description:`aws-us-gov global region`},"us-gov-east-1":{description:`AWS GovCloud (US-East)`},"us-gov-west-1":{description:`AWS GovCloud (US-West)`}}}],version:`1.1`};let o=a,s=``,c=e=>{let{partitions:t}=o;for(let n of t){let{regions:t,outputs:r}=n;for(let[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(let n of t){let{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}let n=t.find(e=>e.id===`aws`);if(!n)throw Error(`Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.`);return{...n.outputs}},l=(e,t=``)=>{o=e,s=t},u=()=>{l(a,``)},d=()=>s,f={isVirtualHostableS3Bucket:r,parseArn:i,partition:c};t.customEndpointFunctions.aws=f;let p=e=>{if(typeof e.endpointProvider!=`function`)throw Error(`@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.`);let{endpoint:t}=e;return t===void 0&&(e.endpoint=async()=>m(e.endpointProvider({Region:typeof e.region==`function`?await e.region():e.region,UseDualStack:typeof e.useDualstackEndpoint==`function`?await e.useDualstackEndpoint():e.useDualstackEndpoint,UseFIPS:typeof e.useFipsEndpoint==`function`?await e.useFipsEndpoint():e.useFipsEndpoint,Endpoint:void 0},{logger:e.logger}))),e},m=e=>n.parseUrl(e.url);e.EndpointError=t.EndpointError,e.isIpAddress=t.isIpAddress,e.resolveEndpoint=t.resolveEndpoint,e.awsEndpointFunctions=f,e.getUserAgentPrefix=d,e.partition=c,e.resolveDefaultAwsRegionalEndpointsConfig=p,e.setPartitionInfo=l,e.toEndpointV1=m,e.useDefaultPartitionInfo=u})),Wr=a((e=>{let t=[`AuthFailure`,`InvalidSignatureException`,`RequestExpired`,`RequestInTheFuture`,`RequestTimeTooSkewed`,`SignatureDoesNotMatch`],n=[`BandwidthLimitExceeded`,`EC2ThrottledException`,`LimitExceededException`,`PriorRequestNotComplete`,`ProvisionedThroughputExceededException`,`RequestLimitExceeded`,`RequestThrottled`,`RequestThrottledException`,`SlowDown`,`ThrottledException`,`Throttling`,`ThrottlingException`,`TooManyRequestsException`,`TransactionInProgressException`],r=[`TimeoutError`,`RequestTimeout`,`RequestTimeoutException`],i=[500,502,503,504],a=[`ECONNRESET`,`ECONNREFUSED`,`EPIPE`,`ETIMEDOUT`],o=[`EHOSTUNREACH`,`ENETUNREACH`,`ENOTFOUND`],s=e=>e?.$retryable!==void 0,c=e=>t.includes(e.name),l=e=>e.$metadata?.clockSkewCorrected,u=e=>{let t=new Set([`Failed to fetch`,`NetworkError when attempting to fetch resource`,`The Internet connection appears to be offline`,`Load failed`,`Network request failed`]);return e&&e instanceof TypeError?t.has(e.message):!1},d=e=>e.$metadata?.httpStatusCode===429||n.includes(e.name)||e.$retryable?.throttling==1,f=(e,t=0)=>s(e)||l(e)||r.includes(e.name)||a.includes(e?.code||``)||o.includes(e?.code||``)||i.includes(e.$metadata?.httpStatusCode||0)||u(e)||e.cause!==void 0&&t<=10&&f(e.cause,t+1);e.isBrowserNetworkError=u,e.isClockSkewCorrectedError=l,e.isClockSkewError=c,e.isRetryableByTrait=s,e.isServerError=e=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!f(e)}return!1},e.isThrottlingError=d,e.isTransientError=f})),Gr=a((e=>{var t=Wr();e.RETRY_MODES=void 0,(function(e){e.STANDARD=`standard`,e.ADAPTIVE=`adaptive`})(e.RETRY_MODES||={});let n=e.RETRY_MODES.STANDARD;var r=class e{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,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(e){let n;this.updateMeasuredRate();let r=e;if(r?.errorType===`THROTTLING`||t.isThrottlingError(r?.error??e)){let e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),n=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),n=this.cubicSuccess(this.getCurrentTimeInSeconds());let i=Math.min(n,2*this.measuredTxRate);this.updateTokenBucketRate(i)}getCurrentTimeInSeconds(){return Date.now()/1e3}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.availableTokens){let n=(t-this.availableTokens)/this.fillRate*1e3;await new Promise(t=>e.setTimeoutFn(t,n))}this.availableTokens-=t}}refillTokenBucket(){let e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}let t=(e-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+t),this.lastTimestamp=e}calculateTimeWindow(){this.timeWindow=this.getPrecise((this.lastMaxRate*(1-this.beta)/this.scaleConstant)**(1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*(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(),t=Math.floor(e*2)/2;if(this.requestCount++,t>this.lastTxRateBucket){let e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}};let i=20*1e3;var a=class e{static v2026=typeof process<`u`&&process.env?.SMITHY_NEW_RETRIES_2026===`true`;static delay(){return e.v2026?50:100}static throttlingDelay(){return e.v2026?1e3:500}static cost(){return e.v2026?14:5}static throttlingCost(){return e.v2026?5:10}static modifiedCostType(){return e.v2026?`THROTTLING`:`TRANSIENT`}},o=class{x=a.delay();computeNextBackoffDelay(e){let t=Math.random()*Math.min(this.x*2**e,i);return Math.floor(t)}setDelayBase(e){this.x=e}},s=class{delay;count;cost;longPoll;constructor(e,t,n,r){this.delay=e,this.count=t,this.cost=n,this.longPoll=r}getRetryCount(){return this.count}getRetryDelay(){return Math.min(i,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}},c=class{mode=e.RETRY_MODES.STANDARD;capacity=500;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(e){typeof e==`number`?this.maxAttemptsProvider=async()=>e:typeof e==`function`?this.maxAttemptsProvider=e:e&&typeof e==`object`&&(this.maxAttemptsProvider=async()=>e.maxAttempts,this.baseDelay=e.baseDelay,this.retryBackoffStrategy=e.backoff),this.maxAttemptsProvider??=async()=>3,this.baseDelay??=a.delay(),this.retryBackoffStrategy??=new o}async acquireInitialRetryToken(e){return new s(a.delay(),0,void 0,a.v2026&&e.includes(`:longpoll`))}async refreshRetryTokenForRetry(e,t){let n=await this.getMaxAttempts(),r=this.shouldRetry(e,t,n);if(r||e.isLongPoll?.()){let n=t.errorType;this.retryBackoffStrategy.setDelayBase(n===`THROTTLING`?a.throttlingDelay():this.baseDelay);let i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),o=i;if(t.retryAfterHint instanceof Date&&(o=Math.max(i,Math.min(t.retryAfterHint.getTime()-Date.now(),i+5e3))),r){let t=this.getCapacityCost(n);return this.capacity-=t,new s(o,e.getRetryCount()+1,t,e.isLongPoll?.()??!1)}else throw Object.assign(Error(`No retry token available`),{$backoff:a.v2026?o:0})}throw Error(`No retry token available`)}recordSuccess(e){this.capacity=Math.min(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of 3`),3}}shouldRetry(e,t,n){return e.getRetryCount()+1=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e===a.modifiedCostType()?a.throttlingCost():a.cost()}isRetryableError(e){return e===`THROTTLING`||e===`TRANSIENT`}async maxAttempts(){return this.maxAttemptsProvider()}},l=class{mode=e.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(e,t){let{rateLimiter:n}=t??{};this.rateLimiter=n??new r,this.standardRetryStrategy=t?new c({maxAttempts:typeof e==`number`?e:3,...t}):new c(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}},u=class extends c{computeNextBackoffDelay;constructor(e,t=a.delay()){super(typeof e==`function`?e:async()=>e),typeof t==`number`?this.computeNextBackoffDelay=()=>t:this.computeNextBackoffDelay=t}async refreshRetryTokenForRetry(e,t){let n=await super.refreshRetryTokenForRetry(e,t);return n.getRetryDelay=()=>this.computeNextBackoffDelay(n.getRetryCount()),n}};e.AdaptiveRetryStrategy=l,e.ConfiguredRetryStrategy=u,e.DEFAULT_MAX_ATTEMPTS=3,e.DEFAULT_RETRY_DELAY_BASE=100,e.DEFAULT_RETRY_MODE=n,e.DefaultRateLimiter=r,e.INITIAL_RETRY_TOKENS=500,e.INVOCATION_ID_HEADER=`amz-sdk-invocation-id`,e.MAXIMUM_RETRY_DELAY=i,e.NO_RETRY_INCREMENT=1,e.REQUEST_HEADER=`amz-sdk-request`,e.RETRY_COST=5,e.Retry=a,e.StandardRetryStrategy=c,e.THROTTLING_RETRY_DELAY_BASE=500,e.TIMEOUT_RETRY_COST=10})),Kr=a((t=>{var n=(Vr(),e(Br)),r=Ur(),i=s(),a=(c(),e(u)),o=Gr();function l(e){return e===void 0?!0:typeof e==`string`&&e.length<=50}function d(e){let t=n.normalizeProvider(e.userAgentAppId??void 0),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r==`string`?[[r]]:r,userAgentAppId:async()=>{let n=await t();if(!l(n)){let t=e.logger?.constructor?.name===`NoOpLogger`||!e.logger?console:e.logger;typeof n==`string`?n.length>50&&t?.warn(`The provided userAgentAppId exceeds the maximum length of 50 characters.`):t?.warn(`userAgentAppId must be a string or undefined.`)}return n}})}let f=/\d{12}\.ddb/;async function p(e,t,n){if(n.request?.headers?.[`smithy-protocol`]===`rpc-v2-cbor`&&a.setFeature(e,`PROTOCOL_RPC_V2_CBOR`,`M`),typeof t.retryStrategy==`function`){let n=await t.retryStrategy();if(typeof n.mode==`string`)switch(n.mode){case o.RETRY_MODES.ADAPTIVE:a.setFeature(e,`RETRY_MODE_ADAPTIVE`,`F`);break;case o.RETRY_MODES.STANDARD:a.setFeature(e,`RETRY_MODE_STANDARD`,`E`);break}}if(typeof t.accountIdEndpointMode==`function`){let n=e.endpointV2;switch(String(n?.url?.hostname).match(f)&&a.setFeature(e,`ACCOUNT_ID_ENDPOINT`,`O`),await t.accountIdEndpointMode?.()){case`disabled`:a.setFeature(e,`ACCOUNT_ID_MODE_DISABLED`,`Q`);break;case`preferred`:a.setFeature(e,`ACCOUNT_ID_MODE_PREFERRED`,`P`);break;case`required`:a.setFeature(e,`ACCOUNT_ID_MODE_REQUIRED`,`R`);break}}let r=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){let t=r;t.accountId&&a.setFeature(e,`RESOLVED_ACCOUNT_ID`,`T`);for(let[n,r]of Object.entries(t.$source??{}))a.setFeature(e,n,r)}}let m=`user-agent`,h=`x-amz-user-agent`,g=/[^!$%&'*+\-.^_`|~\w]/g,_=/[^!$%&'*+\-.^_`|~\w#]/g;function v(e){let t=``;for(let n in e){let r=e[n];if(t.length+r.length+1<=1024){t.length?t+=`,`+r:t+=r;continue}break}return t}let y=e=>(t,n)=>async a=>{let{request:o}=a;if(!i.HttpRequest.isInstance(o))return t(a);let{headers:s}=o,c=n?.userAgent?.map(b)||[],l=(await e.defaultUserAgentProvider()).map(b);await p(n,e,a);let u=n;l.push(`m/${v(Object.assign({},n.__smithy_context?.features,u.__aws_sdk_context?.features))}`);let d=e?.customUserAgent?.map(b)||[],f=await e.userAgentAppId();f&&l.push(b([`app`,`${f}`]));let g=r.getUserAgentPrefix(),_=(g?[g]:[]).concat([...l,...c,...d]).join(` `),y=[...l.filter(e=>e.startsWith(`aws-sdk-`)),...d].join(` `);return e.runtime===`browser`?s[h]=_:(y&&(s[h]=s[h]?`${s[m]} ${y}`:y),s[m]=_),t({...a,request:o})},b=e=>{let t=e[0].split(`/`).map(e=>e.replace(g,`-`)).join(`/`),n=e[1]?.replace(_,`-`),r=t.indexOf(`/`),i=t.substring(0,r),a=t.substring(r+1);return i===`api`&&(a=a.toLowerCase()),[i,a,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},``)},x={name:`getUserAgentMiddleware`,step:`build`,priority:`low`,tags:[`SET_USER_AGENT`,`USER_AGENT`],override:!0};t.DEFAULT_UA_APP_ID=void 0,t.getUserAgentMiddlewareOptions=x,t.getUserAgentPlugin=e=>({applyToStack:t=>{t.add(y(e),x)}}),t.resolveUserAgentConfig=d,t.userAgentMiddleware=y})),qr=a((e=>{var t=zn(),n=b(),r=Hr();let i=`AWS_USE_DUALSTACK_ENDPOINT`,a=`use_dualstack_endpoint`,o={environmentVariableSelector:e=>t.booleanSelector(e,i,t.SelectorType.ENV),configFileSelector:e=>t.booleanSelector(e,a,t.SelectorType.CONFIG),default:!1},s={environmentVariableSelector:e=>t.booleanSelector(e,i,t.SelectorType.ENV),configFileSelector:e=>t.booleanSelector(e,a,t.SelectorType.CONFIG),default:void 0},c=`AWS_USE_FIPS_ENDPOINT`,l=`use_fips_endpoint`,u={environmentVariableSelector:e=>t.booleanSelector(e,c,t.SelectorType.ENV),configFileSelector:e=>t.booleanSelector(e,l,t.SelectorType.CONFIG),default:!1},d={environmentVariableSelector:e=>t.booleanSelector(e,c,t.SelectorType.ENV),configFileSelector:e=>t.booleanSelector(e,l,t.SelectorType.CONFIG),default:void 0},f=e=>{let{tls:t,endpoint:r,urlParser:i,useDualstackEndpoint:a}=e;return Object.assign(e,{tls:t??!0,endpoint:n.normalizeProvider(typeof r==`string`?i(r):r),isCustomEndpoint:!0,useDualstackEndpoint:n.normalizeProvider(a??!1)})},p=async e=>{let{tls:t=!0}=e,n=await e.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(n))throw Error(`Invalid region in client config`);let r=await e.useDualstackEndpoint(),i=await e.useFipsEndpoint(),{hostname:a}=await e.regionInfoProvider(n,{useDualstackEndpoint:r,useFipsEndpoint:i})??{};if(!a)throw Error(`Cannot resolve hostname from client config`);return e.urlParser(`${t?`https:`:`http:`}//${a}`)},m=e=>{let t=n.normalizeProvider(e.useDualstackEndpoint??!1),{endpoint:r,useFipsEndpoint:i,urlParser:a,tls:o}=e;return Object.assign(e,{tls:o??!0,endpoint:r?n.normalizeProvider(typeof r==`string`?a(r):r):()=>p({...e,useDualstackEndpoint:t,useFipsEndpoint:i}),isCustomEndpoint:!!r,useDualstackEndpoint:t})},h=`AWS_REGION`,g=`region`,_={environmentVariableSelector:e=>e[h],configFileSelector:e=>e[g],default:()=>{throw Error(`Region is missing`)}},v={preferredFile:`credentials`},y=new Set,x=(e,t=r.isValidHostLabel)=>{if(!y.has(e)&&!t(e))if(e===`*`)console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);else throw Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else y.add(e)},S=e=>typeof e==`string`&&(e.startsWith(`fips-`)||e.endsWith(`-fips`)),C=e=>S(e)?[`fips-aws-global`,`aws-fips`].includes(e)?`us-east-1`:e.replace(/fips-(dkr-|prod-)?|-fips/,``):e,w=e=>{let{region:t,useFipsEndpoint:n}=e;if(!t)throw Error(`Region is missing`);return Object.assign(e,{region:async()=>{let e=C(typeof t==`function`?await t():t);return x(e),e},useFipsEndpoint:async()=>S(typeof t==`string`?t:await t())?!0:typeof n==`function`?n():Promise.resolve(!!n)})},T=(e=[],{useFipsEndpoint:t,useDualstackEndpoint:n})=>e.find(({tags:e})=>t===e.includes(`fips`)&&n===e.includes(`dualstack`))?.hostname,E=(e,{regionHostname:t,partitionHostname:n})=>t||(n?n.replace(`{region}`,e):void 0),D=(e,{partitionHash:t})=>Object.keys(t||{}).find(n=>t[n].regions.includes(e))??`aws`,O=(e,{signingRegion:t,regionRegex:n,useFipsEndpoint:r})=>{if(t)return t;if(r){let t=n.replace(`\\\\`,`\\`).replace(/^\^/g,`\\.`).replace(/\$$/g,`\\.`),r=e.match(t);if(r)return r[0].slice(1,-1)}};e.CONFIG_USE_DUALSTACK_ENDPOINT=a,e.CONFIG_USE_FIPS_ENDPOINT=l,e.DEFAULT_USE_DUALSTACK_ENDPOINT=!1,e.DEFAULT_USE_FIPS_ENDPOINT=!1,e.ENV_USE_DUALSTACK_ENDPOINT=i,e.ENV_USE_FIPS_ENDPOINT=c,e.NODE_REGION_CONFIG_FILE_OPTIONS=v,e.NODE_REGION_CONFIG_OPTIONS=_,e.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS=o,e.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS=u,e.REGION_ENV_NAME=h,e.REGION_INI_NAME=g,e.getRegionInfo=(e,{useFipsEndpoint:t=!1,useDualstackEndpoint:n=!1,signingService:r,regionHash:i,partitionHash:a})=>{let o=D(e,{partitionHash:a}),s=e in i?e:a[o]?.endpoint??e,c={useFipsEndpoint:t,useDualstackEndpoint:n},l=E(s,{regionHostname:T(i[s]?.variants,c),partitionHostname:T(a[o]?.variants,c)});if(l===void 0)throw Error(`Endpoint resolution failed for: [object Object]`);let u=O(l,{signingRegion:i[s]?.signingRegion,regionRegex:a[o].regionRegex,useFipsEndpoint:t});return{partition:o,signingService:r,hostname:l,...u&&{signingRegion:u},...i[s]?.signingService&&{signingService:i[s].signingService}}},e.nodeDualstackConfigSelectors=s,e.nodeFipsConfigSelectors=d,e.resolveCustomEndpointsConfig=f,e.resolveEndpointsConfig=m,e.resolveRegionConfig=w})),Jr=a((e=>{var t=s();let n=`content-length`;function r(e){return r=>async i=>{let a=i.request;if(t.HttpRequest.isInstance(a)){let{body:t,headers:r}=a;if(t&&Object.keys(r).map(e=>e.toLowerCase()).indexOf(n)===-1)try{let r=e(t);a.headers={...a.headers,[n]:String(r)}}catch{}}return r({...i,request:a})}}let i={step:`build`,tags:[`SET_CONTENT_LENGTH`,`CONTENT_LENGTH`],name:`contentLengthMiddleware`,override:!0};e.contentLengthMiddleware=r,e.contentLengthMiddlewareOptions=i,e.getContentLengthPlugin=e=>({applyToStack:t=>{t.add(r(e.bodyLengthChecker),i)}})})),Yr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getEndpointUrlConfig=void 0;let t=ce(),n=`AWS_ENDPOINT_URL`,r=`endpoint_url`;e.getEndpointUrlConfig=e=>({environmentVariableSelector:t=>{let r=t[[n,...e.split(` `).map(e=>e.toUpperCase())].join(`_`)];if(r)return r;let i=t[n];if(i)return i},configFileSelector:(n,i)=>{if(i&&n.services){let a=i[[`services`,n.services].join(t.CONFIG_PREFIX_SEPARATOR)];if(a){let n=a[[e.split(` `).map(e=>e.toLowerCase()).join(`_`),r].join(t.CONFIG_PREFIX_SEPARATOR)];if(n)return n}}let a=n[r];if(a)return a},default:void 0})})),Xr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getEndpointFromConfig=void 0;let t=le(),n=Yr();e.getEndpointFromConfig=async e=>(0,t.loadConfig)((0,n.getEndpointUrlConfig)(e??``))()})),Zr=a((t=>{var n=s(),r=(M(),e(m));let i=(e,t)=>(r,i)=>async o=>{let{response:s}=await r(o);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,`$response`,{value:s,enumerable:!1,writable:!1,configurable:!1}),!(`$metadata`in e)){let t=`Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;try{e.message+=` + `+t}catch{!i.logger||i.logger?.constructor?.name===`NoOpLogger`?console.warn(t):i.logger?.warn?.(t)}e.$responseBodyText!==void 0&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(n.HttpResponse.isInstance(s)){let{headers:t={}}=s,n=Object.entries(t);e.$metadata={httpStatusCode:s.statusCode,requestId:a(/^x-[\w-]+-request-?id$/,n),extendedRequestId:a(/^x-[\w-]+-id-2$/,n),cfId:a(/^x-[\w-]+-cf-id$/,n)}}}catch{}}throw e}},a=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],o=(e,t)=>(n,i)=>async a=>{let o=e,s=i.endpointV2?async()=>r.toEndpointV1(i.endpointV2):o.endpoint;if(!s)throw Error(`No valid endpoint provider available.`);let c=await t(a.input,{...e,endpoint:s});return n({...a,request:c})},c={name:`deserializerMiddleware`,step:`deserialize`,tags:[`DESERIALIZER`],override:!0},l={name:`serializerMiddleware`,step:`serialize`,tags:[`SERIALIZER`],override:!0};function u(e,t,n){return{applyToStack:r=>{r.add(i(e,n),c),r.add(o(e,t),l)}}}t.deserializerMiddleware=i,t.deserializerMiddlewareOption=c,t.getSerdePlugin=u,t.serializerMiddleware=o,t.serializerMiddlewareOption=l})),Qr=a((t=>{var n=(Vr(),e(Br)),r=b(),i=Xr(),a=se(),o=Zr();let s=async e=>{let t=e?.Bucket||``;if(typeof e.Bucket==`string`&&(e.Bucket=t.replace(/#/g,`%23`).replace(/\?/g,`%3F`)),f(t)){if(e.ForcePathStyle===!0)throw Error(`Path-style addressing cannot be used with ARN buckets`)}else (!d(t)||t.indexOf(`.`)!==-1&&!String(e.Endpoint).startsWith(`http:`)||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},c=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,l=/(\d+\.){3}\d+/,u=/\.\./,d=e=>c.test(e)&&!l.test(e)&&!u.test(e),f=e=>{let[t,n,r,,,i]=e.split(`:`),a=t===`arn`&&e.split(`:`).length>=6,o=!!(a&&n&&r&&i);if(a&&!o)throw Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},p=(e,t,n,r=!1)=>{let i=async()=>{let i;return i=r?n.clientContextParams?.[e]??n[e]??n[t]:n[e]??n[t],typeof i==`function`?i():i};return e===`credentialScope`||t===`CredentialScope`?async()=>{let e=typeof n.credentials==`function`?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:e===`accountId`||t===`AccountId`?async()=>{let e=typeof n.credentials==`function`?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:e===`endpoint`||t===`endpoint`?async()=>{if(n.isCustomEndpoint===!1)return;let e=await i();if(e&&typeof e==`object`){if(`url`in e)return e.url.href;if(`hostname`in e){let{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?`:`+r:``}${i}`}}return e}:i},m=e=>{if(typeof e==`object`){if(`url`in e){let t=a.parseUrl(e.url);if(e.headers){t.headers={};for(let[n,r]of Object.entries(e.headers))t.headers[n.toLowerCase()]=r.join(`, `)}return t}return e}return a.parseUrl(e)},h=async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await i.getEndpointFromConfig(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(m(e)),n.isCustomEndpoint=!0)}let a=await g(e,t,n);if(typeof n.endpointProvider!=`function`)throw Error(`config.endpointProvider is not set.`);let o=n.endpointProvider(a,r);if(n.isCustomEndpoint&&n.endpoint){let e=await n.endpoint();if(e?.headers){o.headers??={};for(let[t,n]of Object.entries(e.headers))o.headers[t]=Array.isArray(n)?n:[n]}}return o},g=async(e,t,n)=>{let r={},i=t?.getEndpointParameterInstructions?.()||{};for(let[t,a]of Object.entries(i))switch(a.type){case`staticContextParams`:r[t]=a.value;break;case`contextParams`:r[t]=e[a.name];break;case`clientContextParams`:case`builtInParams`:r[t]=await p(a.name,t,n,a.type!==`builtInParams`)();break;case`operationContextParams`:r[t]=a.get(e);break;default:throw Error(`Unrecognized endpoint parameter instruction: `+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(r,n),String(n.serviceId).toLowerCase()===`s3`&&await s(r),r},_=({config:e,instructions:t})=>(i,a)=>async o=>{e.isCustomEndpoint&&n.setFeature(a,`ENDPOINT_OVERRIDE`,`N`);let s=await h(o.input,{getEndpointParameterInstructions(){return t}},{...e},a);a.endpointV2=s,a.authSchemes=s.properties?.authSchemes;let c=a.authSchemes?.[0];if(c){a.signing_region=c.signingRegion,a.signing_service=c.signingName;let e=r.getSmithyContext(a)?.selectedHttpAuthScheme?.httpAuthOption;e&&(e.signingProperties=Object.assign(e.signingProperties||{},{signing_region:c.signingRegion,signingRegion:c.signingRegion,signing_service:c.signingName,signingName:c.signingName,signingRegionSet:c.signingRegionSet},c.properties))}return i({...o})},v={step:`serialize`,tags:[`ENDPOINT_PARAMETERS`,`ENDPOINT_V2`,`ENDPOINT`],name:`endpointV2Middleware`,override:!0,relation:`before`,toMiddleware:o.serializerMiddlewareOption.name};t.endpointMiddleware=_,t.endpointMiddlewareOptions=v,t.getEndpointFromInstructions=h,t.getEndpointPlugin=(e,t)=>({applyToStack:n=>{n.addRelativeTo(_({config:e,instructions:t}),v)}}),t.resolveEndpointConfig=e=>{let t=e.tls??!0,{endpoint:n,useDualstackEndpoint:a,useFipsEndpoint:o}=e,s=Object.assign(e,{endpoint:n==null?void 0:async()=>m(await r.normalizeProvider(n)()),tls:t,isCustomEndpoint:!!n,useDualstackEndpoint:r.normalizeProvider(a??!1),useFipsEndpoint:r.normalizeProvider(o??!1)}),c;return s.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=i.getEndpointFromConfig(e.serviceId)),c),s},t.resolveEndpointRequiredConfig=e=>{let{endpoint:t}=e;return t===void 0&&(e.endpoint=async()=>{throw Error(`@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.`)}),e},t.resolveParams=g,t.toEndpointV1=m})),$r=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isStreamingPayload=void 0;let n=t(`stream`);e.isStreamingPayload=e=>e?.body instanceof n.Readable||typeof ReadableStream<`u`&&e?.body instanceof ReadableStream})),ei=a((t=>{var n=Gr(),r=s(),i=Wr(),a=E(),o=b(),c=R(),l=$r(),u=(I(),e(N));let d=e=>e instanceof Error?e:e instanceof Object?Object.assign(Error(),e):Error(typeof e==`string`?e:`AWS SDK error wrapper for ${e}`),f=(e,t)=>{let r=e,i=n.NO_RETRY_INCREMENT,a=n.RETRY_COST,o=n.TIMEOUT_RETRY_COST,s=e,c=e=>e.name===`TimeoutError`?o:a,l=e=>c(e)<=s;return Object.freeze({hasRetryTokens:l,retrieveRetryTokens:e=>{if(!l(e))throw Error(`No retry token available`);let t=c(e);return s-=t,t},releaseRetryTokens:e=>{s+=e??i,s=Math.min(s,r)}})},p=(e,t)=>Math.floor(Math.min(n.MAXIMUM_RETRY_DELAY,Math.random()*2**t*e)),m=e=>e?i.isRetryableByTrait(e)||i.isClockSkewError(e)||i.isThrottlingError(e)||i.isTransientError(e):!1;var h=class{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=n.RETRY_MODES.STANDARD;constructor(e,t){this.maxAttemptsProvider=e,this.retryDecider=t?.retryDecider??m,this.delayDecider=t?.delayDecider??p,this.retryQuota=t?.retryQuota??f(n.INITIAL_RETRY_TOKENS)}shouldRetry(e,t,n){return tsetTimeout(e,a));continue}throw t.$metadata||={},t.$metadata.attempts=c,t.$metadata.totalRetryDelay=l,t}}};let g=e=>{if(!r.HttpResponse.isInstance(e))return;let t=Object.keys(e.headers).find(e=>e.toLowerCase()===`retry-after`);if(!t)return;let n=e.headers[t],i=Number(n);return Number.isNaN(i)?new Date(n).getTime()-Date.now():i*1e3};var _=class extends h{rateLimiter;constructor(e,t){let{rateLimiter:r,...i}=t??{};super(e,i),this.rateLimiter=r??new n.DefaultRateLimiter,this.mode=n.RETRY_MODES.ADAPTIVE}async retry(e,t){return super.retry(e,t,{beforeRequest:async()=>this.rateLimiter.getSendToken(),afterRequest:e=>{this.rateLimiter.updateClientSendingRate(e)}})}};let v=`AWS_MAX_ATTEMPTS`,y=`max_attempts`,x={environmentVariableSelector:e=>{let t=e[v];if(!t)return;let n=parseInt(t);if(Number.isNaN(n))throw Error(`Environment variable ${v} mast be a number, got "${t}"`);return n},configFileSelector:e=>{let t=e[y];if(!t)return;let n=parseInt(t);if(Number.isNaN(n))throw Error(`Shared config file entry ${y} mast be a number, got "${t}"`);return n},default:n.DEFAULT_MAX_ATTEMPTS},S=e=>{let{retryStrategy:t,retryMode:r}=e,i=o.normalizeProvider(e.maxAttempts??n.DEFAULT_MAX_ATTEMPTS),a=t?Promise.resolve(t):void 0,s=async()=>await o.normalizeProvider(r)()===n.RETRY_MODES.ADAPTIVE?new n.AdaptiveRetryStrategy(i):new n.StandardRetryStrategy(i);return Object.assign(e,{maxAttempts:i,retryStrategy:()=>a??=s()})},C=`AWS_RETRY_MODE`,w=`retry_mode`,T={environmentVariableSelector:e=>e[C],configFileSelector:e=>e[w],default:n.DEFAULT_RETRY_MODE},D=()=>e=>async t=>{let{request:i}=t;return r.HttpRequest.isInstance(i)&&(delete i.headers[n.INVOCATION_ID_HEADER],delete i.headers[n.REQUEST_HEADER]),e(t)},O={name:`omitRetryHeadersMiddleware`,tags:[`RETRY`,`HEADERS`,`OMIT_RETRY_HEADERS`],relation:`before`,toMiddleware:`awsAuthMiddleware`,override:!0},ee=e=>({applyToStack:e=>{e.addRelativeTo(D(),O)}});function k(e,t){if(r.HttpResponse.isInstance(e))for(let n of Object.keys(e.headers)){let r=n.toLowerCase();if(r===`retry-after`){let r=e.headers[n],i=NaN;if(r.endsWith(`GMT`))try{i=(u.parseRfc7231DateTime(r).getTime()-Date.now())/1e3}catch(e){t?.trace?.(`Failed to parse retry-after header`),t?.trace?.(e)}else r.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?i=Number(r.match(/ GMT, ([\d.]+)$/)?.[1]):r.match(/^((\d+)|(\d+\.\d+))$/)?i=Number(r):Date.parse(r)>=Date.now()&&(i=(Date.parse(r)-Date.now())/1e3);return isNaN(i)?void 0:new Date(Date.now()+i*1e3)}else if(r===`x-amz-retry-after`){let r=e.headers[n],i=Number(r);if(isNaN(i)){t?.trace?.(`Failed to parse x-amz-retry-after=${r}`);return}return new Date(Date.now()+i)}}}function A(e,t){return k(e,t)}let j=e=>(t,i)=>async o=>{let s=await e.retryStrategy(),u=await e.maxAttempts();if(te(s)){s=s;let f=await s.acquireInitialRetryToken((i.partition_id??``)+(i.__retryLongPoll?`:longpoll`:``)),p=Error(),m=0,h=0,{request:g}=o,_=r.HttpRequest.isInstance(g);for(_&&(g.headers[n.INVOCATION_ID_HEADER]=a.v4());;)try{_&&(g.headers[n.REQUEST_HEADER]=`attempt=${m+1}; max=${u}`);let{response:e,output:r}=await t(o);return s.recordSuccess(f),r.$metadata.attempts=m+1,r.$metadata.totalRetryDelay=h,{response:e,output:r}}catch(t){let n=P(t,e.logger);if(p=d(t),_&&l.isStreamingPayload(g))throw(i.logger instanceof c.NoOpLogger?console:i.logger)?.warn(`An error was encountered in a non-retryable streaming request.`),p;try{f=await s.refreshRetryTokenForRetry(f,n)}catch(e){throw typeof e.$backoff==`number`&&await M(e.$backoff),p.$metadata||={},p.$metadata.attempts=m+1,p.$metadata.totalRetryDelay=h,p}m=f.getRetryCount();let r=f.getRetryDelay();h+=r,await M(r)}}else return s=s,s?.mode&&(i.userAgent=[...i.userAgent||[],[`cfg/retry-mode`,s.mode]]),s.retry(t,o)},M=e=>new Promise(t=>setTimeout(t,e)),te=e=>e.acquireInitialRetryToken!==void 0&&e.refreshRetryTokenForRetry!==void 0&&e.recordSuccess!==void 0,P=(e,t)=>{let n={error:e,errorType:F(e)},r=k(e.$response,t);return r&&(n.retryAfterHint=r),n},F=e=>i.isThrottlingError(e)?`THROTTLING`:i.isTransientError(e)?`TRANSIENT`:i.isServerError(e)?`SERVER_ERROR`:`CLIENT_ERROR`,L={name:`retryMiddleware`,tags:[`RETRY`],step:`finalizeRequest`,priority:`high`,override:!0};t.AdaptiveRetryStrategy=_,t.CONFIG_MAX_ATTEMPTS=y,t.CONFIG_RETRY_MODE=w,t.ENV_MAX_ATTEMPTS=v,t.ENV_RETRY_MODE=C,t.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=x,t.NODE_RETRY_MODE_CONFIG_OPTIONS=T,t.StandardRetryStrategy=h,t.defaultDelayDecider=p,t.defaultRetryDecider=m,t.getOmitRetryHeadersPlugin=ee,t.getRetryAfterHint=A,t.getRetryPlugin=e=>({applyToStack:t=>{t.add(j(e),L)}}),t.omitRetryHeadersMiddleware=D,t.omitRetryHeadersMiddlewareOptions=O,t.resolveRetryConfig=S,t.retryMiddleware=j,t.retryMiddlewareOptions=L})),ti,ni,ri=n((()=>{ti=s(),ni=e=>ti.HttpResponse.isInstance(e)?e.headers?.date??e.headers?.Date:void 0})),ii,ai=n((()=>{ii=e=>new Date(Date.now()+e)})),oi,si=n((()=>{ai(),oi=(e,t)=>Math.abs(ii(t).getTime()-e)>=3e5})),ci,li=n((()=>{si(),ci=(e,t)=>{let n=Date.parse(e);return oi(n,t)?n-Date.now():t}})),ui=n((()=>{ri(),ai(),li()})),di,fi,pi,mi,hi,gi=n((()=>{di=s(),ui(),fi=(e,t)=>{if(!t)throw Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},pi=async e=>{let t=fi(`context`,e.context),n=fi(`config`,e.config),r=t.endpointV2?.properties?.authSchemes?.[0];return{config:n,signer:await fi(`signer`,n.signer)(r),signingRegion:e?.signingRegion,signingRegionSet:e?.signingRegionSet,signingName:e?.signingName}},mi=class{async sign(e,t,n){if(!di.HttpRequest.isInstance(e))throw Error("The request is not an instance of `HttpRequest` and cannot be signed");let r=await pi(n),{config:i,signer:a}=r,{signingRegion:o,signingName:s}=r,c=n.context;if(c?.authSchemes?.length??!1){let[e,t]=c.authSchemes;e?.name===`sigv4a`&&t?.name===`sigv4`&&(o=t?.signingRegion??o,s=t?.signingName??s)}return await a.sign(e,{signingDate:ii(i.systemClockOffset),signingRegion:o,signingService:s})}errorHandler(e){return t=>{let n=t.ServerTime??ni(t.$response);if(n){let r=fi(`config`,e.config),i=r.systemClockOffset;r.systemClockOffset=ci(n,r.systemClockOffset),r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){let n=ni(e);if(n){let e=fi(`config`,t.config);e.systemClockOffset=ci(n,e.systemClockOffset)}}},hi=mi})),_i,vi,yi=n((()=>{_i=s(),ui(),gi(),vi=class extends mi{async sign(e,t,n){if(!_i.HttpRequest.isInstance(e))throw Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:r,signer:i,signingRegion:a,signingRegionSet:o,signingName:s}=await pi(n),c=(await r.sigv4aSigningRegionSet?.()??o??[a]).join(`,`);return await i.sign(e,{signingDate:ii(r.systemClockOffset),signingRegion:c,signingService:s})}}})),bi,xi=n((()=>{bi=e=>typeof e==`string`&&e.length>0?e.split(`,`).map(e=>e.trim()):[]})),Si,Ci=n((()=>{Si=e=>`AWS_BEARER_TOKEN_${e.replace(/[\s-]/g,`_`).toUpperCase()}`})),wi,Ti,Ei,Di=n((()=>{xi(),Ci(),wi=`AWS_AUTH_SCHEME_PREFERENCE`,Ti=`auth_scheme_preference`,Ei={environmentVariableSelector:(e,t)=>{if(t?.signingName&&Si(t.signingName)in e)return[`httpBearerAuth`];if(wi in e)return bi(e[wi])},configFileSelector:e=>{if(Ti in e)return bi(e[Ti])},default:[]}})),Oi,ki,Ai,ji=n((()=>{Vr(),Oi=V(),ki=e=>(e.sigv4aSigningRegionSet=fr(e.sigv4aSigningRegionSet),e),Ai={environmentVariableSelector(e){if(e.AWS_SIGV4A_SIGNING_REGION_SET)return e.AWS_SIGV4A_SIGNING_REGION_SET.split(`,`).map(e=>e.trim());throw new Oi.ProviderError(`AWS_SIGV4A_SIGNING_REGION_SET not set in env.`,{tryNextLink:!0})},configFileSelector(e){if(e.sigv4a_signing_region_set)return(e.sigv4a_signing_region_set??``).split(`,`).map(e=>e.trim());throw new Oi.ProviderError(`sigv4a_signing_region_set not set in profile.`,{tryNextLink:!0})},default:void 0}}));function Mi(e,{credentials:t,credentialDefaultProvider:n}){let r;return r=t?t?.memoized?t:Lr(t,Fr,Ir):n?fr(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function Ni(e,t){if(t.configBound)return t;let n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}var Pi,Fi,Ii,Li=n((()=>{c(),Vr(),Pi=Rn(),Fi=e=>{let t=e.credentials,n=!!e.credentials,r;Object.defineProperty(e,`credentials`,{set(i){i&&i!==t&&i!==r&&(n=!0),t=i;let a=Ni(e,Mi(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}));if(n&&!a.attributed){let e=typeof t==`object`&&!!t;r=async t=>{let n=await a(t);return e&&(!n.$source||Object.keys(n.$source).length===0)?l(n,`CREDENTIALS_CODE`,`e`):n},r.memoized=a.memoized,r.configBound=a.configBound,r.attributed=!0}else r=a},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;let{signingEscapePath:i=!0,systemClockOffset:a=e.systemClockOffset||0,sha256:o}=e,s;return s=e.signer?fr(e.signer):e.regionInfoProvider?()=>fr(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{let{signingRegion:r,signingService:a}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||a||e.serviceId;let s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Pi.SignatureV4)(s)}):async t=>{t=Object.assign({},{name:`sigv4`,signingName:e.signingName||e.defaultSigningName,signingRegion:await fr(e.region)(),properties:{}},t);let n=t.signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;let a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Pi.SignatureV4)(a)},Object.assign(e,{systemClockOffset:a,signingEscapePath:i,signer:s})},Ii=Fi})),Ri=n((()=>{gi(),yi(),Di(),ji(),Li()})),zi=i({AWSSDKSigV4Signer:()=>hi,AwsSdkSigV4ASigner:()=>vi,AwsSdkSigV4Signer:()=>mi,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:()=>Ei,NODE_SIGV4A_CONFIG_OPTIONS:()=>Ai,getBearerTokenEnvKey:()=>Si,resolveAWSSDKSigV4Config:()=>Ii,resolveAwsSdkSigV4AConfig:()=>ki,resolveAwsSdkSigV4Config:()=>Fi,validateSigningProperties:()=>pi}),Bi=n((()=>{Ri(),Ci()})),Vi=a((e=>{var n=t(`node:os`),r=t(`node:process`),i=zn(),a=t(`node:fs/promises`),o=t(`node:path`),s=Kr();let c=()=>{for(let e of[`deno`,`bun`,`llrt`])if(r.versions[e])return[`md/${e}`,r.versions[e]];return[`md/nodejs`,r.versions.node]},l=e=>{let t=process.cwd();if(!e)return[t];let n=o.normalize(e),r=n.split(o.sep),i=r.indexOf(`node_modules`),a=i===-1?n:r.slice(0,i).join(o.sep);return t===a?[t]:[a,t]},u=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/,d=(e=``)=>{let t=e.match(u);if(!t)return;let[n,r,i,a]=[t[1],t[2],t[3],t[4]];return a?`${n}.${r}.${i}-${a}`:`${n}.${r}.${i}`},f=[`^`,`~`,`>=`,`<=`,`>`,`<`],p=[`latest`,`beta`,`dev`,`rc`,`insiders`,`next`],m=(e=``)=>{if(p.includes(e))return e;let t=f.find(t=>e.startsWith(t))??``,n=d(e.slice(t.length));if(n)return`${t}${n}`},h,g=o.join(`node_modules`,`typescript`,`package.json`),_=async()=>{if(h===null)return;if(typeof h==`string`)return[`md/tsc`,h];let e=!1;try{e=i.booleanSelector(process.env,`AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED`,i.SelectorType.ENV)||!1}catch{}if(e){h=null;return}let t=l(typeof __dirname<`u`?__dirname:void 0),n;for(let e of t)try{let t=o.join(e,`package.json`),r=await a.readFile(t,`utf-8`),{dependencies:i,devDependencies:s}=JSON.parse(r),c=s?.typescript??i?.typescript;if(typeof c!=`string`)continue;n=c;break}catch{}if(!n){h=null;return}let r;for(let e of t)try{let t=o.join(e,g),n=await a.readFile(t,`utf-8`),{version:i}=JSON.parse(n),s=d(i);if(typeof s!=`string`)continue;r=s;break}catch{}if(r)return h=r,[`md/tsc`,h];let s=m(n);if(typeof s!=`string`){h=null;return}return h=`dev_${s}`,[`md/tsc`,h]},v={isCrtAvailable:!1},y=()=>v.isCrtAvailable?[`md/crt-avail`]:null,b=({serviceId:e,clientVersion:t})=>{let i=c();return async a=>{let o=[[`aws-sdk-js`,t],[`ua`,`2.1`],[`os/${n.platform()}`,n.release()],[`lang/js`],i],s=await _();s&&o.push(s);let c=y();c&&o.push(c),e&&o.push([`api/${e}`,t]),r.env.AWS_EXECUTION_ENV&&o.push([`exec-env/${r.env.AWS_EXECUTION_ENV}`]);let l=await a?.userAgentAppId?.();return l?[...o,[`app/${l}`]]:[...o]}},x=b,S=`AWS_SDK_UA_APP_ID`,C=`sdk_ua_app_id`;e.NODE_APP_ID_CONFIG_OPTIONS={environmentVariableSelector:e=>e[S],configFileSelector:e=>e[C]??e[`sdk-ua-app-id`],default:s.DEFAULT_UA_APP_ID},e.UA_APP_ID_ENV_NAME=S,e.UA_APP_ID_INI_NAME=C,e.createDefaultUserAgentProvider=b,e.crtAvailability=v,e.defaultUserAgent=x})),Hi=a((e=>{var n=d(),r=p(),i=t(`buffer`),a=t(`crypto`),o=class{algorithmIdentifier;secret;hash;constructor(e,t){this.algorithmIdentifier=e,this.secret=t,this.reset()}update(e,t){this.hash.update(r.toUint8Array(s(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?a.createHmac(this.algorithmIdentifier,s(this.secret)):a.createHash(this.algorithmIdentifier)}};function s(e,t){return i.Buffer.isBuffer(e)?e:typeof e==`string`?n.fromString(e,t):ArrayBuffer.isView(e)?n.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength):n.fromArrayBuffer(e)}e.Hash=o})),Ui=a((e=>{var n=t(`node:fs`);e.calculateBodyLength=e=>{if(!e)return 0;if(typeof e==`string`)return Buffer.byteLength(e);if(typeof e.byteLength==`number`)return e.byteLength;if(typeof e.size==`number`)return e.size;if(typeof e.start==`number`&&typeof e.end==`number`)return e.end+1-e.start;if(e instanceof n.ReadStream){if(e.path!=null)return n.lstatSync(e.path).size;if(typeof e.fd==`number`)return n.fstatSync(e.fd).size}throw Error(`Body Length computation failed for ${e}`)}})),Wi=a((e=>{var t=qr(),n=le(),i=V();let a=`AWS_REGION`,o=`AWS_DEFAULT_REGION`,s=[`in-region`,`cross-region`,`mobile`,`standard`,`legacy`],c={environmentVariableSelector:e=>e.AWS_DEFAULTS_MODE,configFileSelector:e=>e.defaults_mode,default:`legacy`},l=({region:e=n.loadConfig(t.NODE_REGION_CONFIG_OPTIONS),defaultsMode:r=n.loadConfig(c)}={})=>i.memoize(async()=>{let t=typeof r==`function`?await r():r;switch(t?.toLowerCase()){case`auto`:return u(e);case`in-region`:case`cross-region`:case`mobile`:case`standard`:case`legacy`:return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve(`legacy`);default:throw Error(`Invalid parameter for "defaultsMode", expect ${s.join(`, `)}, got ${t}`)}}),u=async e=>{if(e){let t=typeof e==`function`?await e():e,n=await d();return n?t===n?`in-region`:`cross-region`:`standard`}return`standard`},d=async()=>{if(process.env.AWS_EXECUTION_ENV&&(process.env[a]||process.env[o]))return process.env[a]??process.env[o];if(!process.env.AWS_EC2_METADATA_DISABLED)try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await import(`./dist-cjs-Cp2qKG5f.js`).then(e=>r(e.default));return(await t({...await e(),path:`/latest/meta-data/placement/region`})).toString()}catch{}};e.resolveDefaultsModeConfig=l})),Gi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.warning=void 0,e.stsRegionDefaultResolver=r;let t=qr(),n=le();function r(r={}){return(0,n.loadConfig)({...t.NODE_REGION_CONFIG_OPTIONS,async default(){return e.warning.silence||console.warn(`@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.`),`us-east-1`}},{...t.NODE_REGION_CONFIG_FILE_OPTIONS,...r})}e.warning={silence:!1}})),Ki=a((e=>{var t=Gi(),n=qr();e.NODE_REGION_CONFIG_FILE_OPTIONS=n.NODE_REGION_CONFIG_FILE_OPTIONS,e.NODE_REGION_CONFIG_OPTIONS=n.NODE_REGION_CONFIG_OPTIONS,e.REGION_ENV_NAME=n.REGION_ENV_NAME,e.REGION_INI_NAME=n.REGION_INI_NAME,e.resolveRegionConfig=n.resolveRegionConfig,e.getAwsRegionExtensionConfiguration=e=>({setRegion(t){e.region=t},region(){return e.region}}),e.resolveAwsRegionExtensionConfiguration=e=>({region:e.region()}),Object.prototype.hasOwnProperty.call(t,`__proto__`)&&!Object.prototype.hasOwnProperty.call(e,`__proto__`)&&Object.defineProperty(e,`__proto__`,{enumerable:!0,value:t.__proto__}),Object.keys(t).forEach(function(n){n!==`default`&&!Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])})}));export{$t as A,lr as C,Ln as D,Rn as E,de as M,ue as N,In as O,xr as S,zn as T,Ur as _,Vi as a,Vr as b,Fi as c,ei as d,Qr as f,Gr as g,Kr as h,Hi as i,be as j,_n as k,Ei as l,qr as m,Wi as n,zi as o,Jr as p,Ui as r,Bi as s,Ki as t,mi as u,Hr as v,Xn as w,Ar as x,Br as y}; \ No newline at end of file diff --git a/dist/dist-cjs-BG7BRI_J.js b/dist/dist-cjs-DiCA1R3I.js similarity index 99% rename from dist/dist-cjs-BG7BRI_J.js rename to dist/dist-cjs-DiCA1R3I.js index 179c04e9..9ec8f269 100644 --- a/dist/dist-cjs-BG7BRI_J.js +++ b/dist/dist-cjs-DiCA1R3I.js @@ -1 +1 @@ -import{a as e,i as t,n,r,t as i}from"./chunk-Bdh3yLIe.js";import{t as a}from"./dist-cjs-BU-OH1DU.js";import{i as o,n as s,t as c}from"./client-D8hez-QA.js";import{t as l}from"./dist-cjs-BKjtSutv.js";import{B as u,D as d,N as f,R as p,T as m,k as h,t as g}from"./dist-cjs-CHwZlzSt.js";import{A as _,C as v,D as y,M as ee,N as te,S as ne,_ as re,a as ie,b,c as x,d as S,f as C,g as w,h as T,i as E,j as ae,l as oe,m as se,n as ce,o as le,p as ue,r as de,s as D,t as fe,u as pe,v as me,w as he,x as ge}from"./dist-cjs-vGYnjJIN.js";import{t as _e}from"./dist-cjs-BLKf4vef.js";import{t as ve}from"./dist-cjs-DJKA3UWR.js";import{t as ye}from"./dist-cjs-Dia4jG8x.js";import{t as be}from"./dist-cjs-DHscMTSt.js";import{t as xe}from"./package-DTfM1tyi.js";var Se=i((n=>{var r=(s(),e(c)),i=(D(),e(le)),a=ve(),o=ye(),l=t(`node:fs`);let u=({logger:e,signingName:t}={})=>async()=>{if(e?.debug?.(`@aws-sdk/token-providers - fromEnvSigningName`),!t)throw new a.TokenProviderError(`Please pass 'signingName' to compute environment variable key`,{logger:e});let n=i.getBearerTokenEnvKey(t);if(!(n in process.env))throw new a.TokenProviderError(`Token not present in '${n}' environment variable`,{logger:e});let o={token:process.env[n]};return r.setTokenFeature(o,`BEARER_SERVICE_ENV_VARS`,`3`),o},d=`To refresh this SSO session run 'aws sso login' with the corresponding profile.`,f=async(e,t={},n)=>{let{SSOOIDCClient:r}=await import(`./sso-oidc-CVyyhNFv.js`),i=e=>t.clientConfig?.[e]??t.parentClientConfig?.[e]??n?.[e];return new r(Object.assign({},t.clientConfig??{},{region:e??t.clientConfig?.region,logger:i(`logger`),userAgentAppId:i(`userAgentAppId`)}))},p=async(e,t,n={},r)=>{let{CreateTokenCommand:i}=await import(`./sso-oidc-CVyyhNFv.js`);return(await f(t,n,r)).send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:`refresh_token`}))},m=e=>{if(e.expiration&&e.expiration.getTime(){if(t===void 0)throw new a.TokenProviderError(`Value not present for '${e}' in SSO Token${n?`. Cannot refresh`:``}. ${d}`,!1)},{writeFile:g}=l.promises,_=(e,t)=>g(o.getSSOTokenFilepath(e),JSON.stringify(t,null,2)),v=new Date(0),y=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug(`@aws-sdk/token-providers - fromSso`);let n=await o.parseKnownFiles(e),r=o.getProfileName({profile:e.profile??t?.profile}),i=n[r];if(!i)throw new a.TokenProviderError(`Profile '${r}' could not be found in shared credentials file.`,!1);if(!i.sso_session)throw new a.TokenProviderError(`Profile '${r}' is missing required property 'sso_session'.`);let s=i.sso_session,c=(await o.loadSsoSessionData(e))[s];if(!c)throw new a.TokenProviderError(`Sso session '${s}' could not be found in shared credentials file.`,!1);for(let e of[`sso_start_url`,`sso_region`])if(!c[e])throw new a.TokenProviderError(`Sso session '${s}' is missing required property '${e}'.`,!1);c.sso_start_url;let l=c.sso_region,u;try{u=await o.getSSOTokenFromFile(s)}catch{throw new a.TokenProviderError(`The SSO session token associated with profile=${r} was not found or is invalid. ${d}`,!1)}h(`accessToken`,u.accessToken),h(`expiresAt`,u.expiresAt);let{accessToken:f,expiresAt:g}=u,y={token:f,expiration:new Date(g)};if(y.expiration.getTime()-Date.now()>3e5)return y;if(Date.now()-v.getTime()<30*1e3)return m(y),y;h(`clientId`,u.clientId,!0),h(`clientSecret`,u.clientSecret,!0),h(`refreshToken`,u.refreshToken,!0);try{v.setTime(Date.now());let n=await p(u,l,e,t);h(`accessToken`,n.accessToken),h(`expiresIn`,n.expiresIn);let r=new Date(Date.now()+n.expiresIn*1e3);try{await _(s,{...u,accessToken:n.accessToken,expiresAt:r.toISOString(),refreshToken:n.refreshToken})}catch{}return{token:n.accessToken,expiration:r}}catch{return m(y),y}};n.fromEnvSigningName=u,n.fromSso=y,n.fromStatic=({token:e,logger:t})=>async()=>{if(t?.debug(`@aws-sdk/token-providers - fromStatic`),!e||!e.token)throw new a.TokenProviderError(`Please pass a valid token to fromStatic`,!1);return e},n.nodeProvider=(e={})=>a.memoize(a.chain(y(e),async()=>{throw new a.TokenProviderError(`Could not load token from any providers`,!1)}),e=>e.expiration!==void 0&&e.expiration.getTime()-Date.now()<3e5,e=>e.expiration!==void 0)}));function Ce(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`awsssoportal`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function we(e){return{schemeId:`smithy.api#noAuth`}}var O,Te,Ee,De,Oe=n((()=>{D(),O=f(),Te=async(e,t,n)=>({operation:(0,O.getSmithyContext)(t).operation,region:await(0,O.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Ee=e=>{let t=[];switch(e.operation){case`GetRoleCredentials`:t.push(we(e));break;default:t.push(Ce(e))}return t},De=e=>{let t=x(e);return Object.assign(t,{authSchemePreference:(0,O.normalizeProvider)(e.authSchemePreference??[])})}})),ke,Ae,je=n((()=>{ke=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:`awsssoportal`}),Ae={UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}})),k,A,j,M,N,P,F,I,L,R,z,B,V,Me,Ne,Pe,Fe,H,Ie,Le,Re,ze,Be,Ve,He,Ue,We=n((()=>{k=`required`,A=`fn`,j=`argv`,M=`ref`,N=!0,P=`isSet`,F=`booleanEquals`,I=`error`,L=`endpoint`,R=`tree`,z=`PartitionResult`,B=`getAttr`,V={[k]:!1,type:`string`},Me={[k]:!0,default:!1,type:`boolean`},Ne={[M]:`Endpoint`},Pe={[A]:F,[j]:[{[M]:`UseFIPS`},!0]},Fe={[A]:F,[j]:[{[M]:`UseDualStack`},!0]},H={},Ie={[A]:B,[j]:[{[M]:z},`supportsFIPS`]},Le={[M]:z},Re={[A]:F,[j]:[!0,{[A]:B,[j]:[Le,`supportsDualStack`]}]},ze=[Pe],Be=[Fe],Ve=[{[M]:`Region`}],He={version:`1.0`,parameters:{Region:V,UseDualStack:Me,UseFIPS:Me,Endpoint:V},rules:[{conditions:[{[A]:P,[j]:[Ne]}],rules:[{conditions:ze,error:`Invalid Configuration: FIPS and custom endpoint are not supported`,type:I},{conditions:Be,error:`Invalid Configuration: Dualstack and custom endpoint are not supported`,type:I},{endpoint:{url:Ne,properties:H,headers:H},type:L}],type:R},{conditions:[{[A]:P,[j]:Ve}],rules:[{conditions:[{[A]:`aws.partition`,[j]:Ve,assign:z}],rules:[{conditions:[Pe,Fe],rules:[{conditions:[{[A]:F,[j]:[N,Ie]},Re],rules:[{endpoint:{url:`https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:H,headers:H},type:L}],type:R},{error:`FIPS and DualStack are enabled, but this partition does not support one or both`,type:I}],type:R},{conditions:ze,rules:[{conditions:[{[A]:F,[j]:[Ie,N]}],rules:[{conditions:[{[A]:`stringEquals`,[j]:[{[A]:B,[j]:[Le,`name`]},`aws-us-gov`]}],endpoint:{url:`https://portal.sso.{Region}.amazonaws.com`,properties:H,headers:H},type:L},{endpoint:{url:`https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}`,properties:H,headers:H},type:L}],type:R},{error:`FIPS is enabled but this partition does not support FIPS`,type:I}],type:R},{conditions:Be,rules:[{conditions:[Re],rules:[{endpoint:{url:`https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:H,headers:H},type:L}],type:R},{error:`DualStack is enabled but this partition does not support DualStack`,type:I}],type:R},{endpoint:{url:`https://portal.sso.{Region}.{PartitionResult#dnsSuffix}`,properties:H,headers:H},type:L}],type:R}],type:R},{error:`Invalid Configuration: Missing Region`,type:I}]},Ue=He})),Ge,U,Ke,qe,Je=n((()=>{Ge=re(),U=me(),We(),Ke=new U.EndpointCache({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`]}),qe=(e,t={})=>Ke.get(e,()=>(0,U.resolveEndpoint)(Ue,{endpointParams:e,logger:t.logger})),U.customEndpointFunctions.aws=Ge.awsEndpointFunctions})),Ye,W,Xe=n((()=>{Ye=g(),W=class e extends Ye.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),G,Ze,Qe,$e,et=n((()=>{Xe(),G=class e extends W{name=`InvalidRequestException`;$fault=`client`;constructor(t){super({name:`InvalidRequestException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},Ze=class e extends W{name=`ResourceNotFoundException`;$fault=`client`;constructor(t){super({name:`ResourceNotFoundException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},Qe=class e extends W{name=`TooManyRequestsException`;$fault=`client`;constructor(t){super({name:`TooManyRequestsException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},$e=class e extends W{name=`UnauthorizedException`;$fault=`client`;constructor(t){super({name:`UnauthorizedException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}}})),tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,K,q,gt,_t,J,vt,yt,Y,bt,xt,St,Ct,wt,Tt,Et,X,Dt,Ot,Z,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt=n((()=>{m(),et(),Xe(),tt=`AccessTokenType`,nt=`GetRoleCredentials`,rt=`GetRoleCredentialsRequest`,it=`GetRoleCredentialsResponse`,at=`InvalidRequestException`,ot=`RoleCredentials`,st=`ResourceNotFoundException`,ct=`SecretAccessKeyType`,lt=`SessionTokenType`,ut=`TooManyRequestsException`,dt=`UnauthorizedException`,ft=`accountId`,pt=`accessKeyId`,mt=`accessToken`,ht=`account_id`,K=`client`,q=`error`,gt=`expiration`,_t=`http`,J=`httpError`,vt=`httpHeader`,yt=`httpQuery`,Y=`message`,bt=`roleCredentials`,xt=`roleName`,St=`role_name`,Ct=`smithy.ts.sdk.synthetic.com.amazonaws.sso`,wt=`secretAccessKey`,Tt=`sessionToken`,Et=`x-amz-sso_bearer_token`,X=`com.amazonaws.sso`,Dt=d.for(Ct),Ot=[-3,Ct,`SSOServiceException`,0,[],[]],Dt.registerError(Ot,W),Z=d.for(X),kt=[-3,X,at,{[q]:K,[J]:400},[Y],[0]],Z.registerError(kt,G),At=[-3,X,st,{[q]:K,[J]:404},[Y],[0]],Z.registerError(At,Ze),jt=[-3,X,ut,{[q]:K,[J]:429},[Y],[0]],Z.registerError(jt,Qe),Mt=[-3,X,dt,{[q]:K,[J]:401},[Y],[0]],Z.registerError(Mt,$e),Nt=[Dt,Z],Pt=[0,X,tt,8,0],Ft=[0,X,ct,8,0],It=[0,X,lt,8,0],Lt=[3,X,rt,0,[xt,ft,mt],[[0,{[yt]:St}],[0,{[yt]:ht}],[()=>Pt,{[vt]:Et}]],3],Rt=[3,X,it,0,[bt],[[()=>zt,0]]],zt=[3,X,ot,0,[pt,wt,Tt,gt],[0,[()=>Ft,0],[()=>It,0],1]],Bt=[9,X,nt,{[_t]:[`GET`,`/federation/credentials`,200]},()=>Lt,()=>Rt]})),Ht,Ut,Wt,Gt,Kt,qt=n((()=>{D(),y(),b(),Ht=g(),Ut=_e(),Wt=u(),Gt=l(),Oe(),Je(),Vt(),Kt=e=>({apiVersion:`2019-06-10`,base64Decoder:e?.base64Decoder??Wt.fromBase64,base64Encoder:e?.base64Encoder??Wt.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??qe,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Ee,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new pe},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new ge}],logger:e?.logger??new Ht.NoOpLogger,protocol:e?.protocol??_,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.sso`,errorTypeRegistries:Nt,version:`2019-06-10`,serviceTarget:`SWBPortalService`},serviceId:e?.serviceId??`SSO`,urlParser:e?.urlParser??Ut.parseUrl,utf8Decoder:e?.utf8Decoder??Gt.fromUtf8,utf8Encoder:e?.utf8Encoder??Gt.toUtf8})})),Jt,Q,Yt,Xt,$,Zt,Qt,$t,en,tn,nn,rn=n((()=>{s(),D(),Jt=ie(),Q=se(),Yt=E(),Xt=S(),$=be(),Zt=p(),Qt=g(),$t=de(),en=ce(),tn=w(),qt(),nn=e=>{(0,Qt.emitWarningIfUnsupportedVersion)(process.version);let t=(0,en.resolveDefaultsModeConfig)(e),n=()=>t().then(Qt.loadConfigsForDefaultMode),r=Kt(e);o(process.version);let i={profile:e?.profile,logger:r.logger};return{...r,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,$.loadConfig)(oe,i),bodyLengthChecker:e?.bodyLengthChecker??$t.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Jt.createDefaultUserAgentProvider)({serviceId:r.serviceId,clientVersion:xe}),maxAttempts:e?.maxAttempts??(0,$.loadConfig)(Xt.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,$.loadConfig)(Q.NODE_REGION_CONFIG_OPTIONS,{...Q.NODE_REGION_CONFIG_FILE_OPTIONS,...i}),requestHandler:Zt.NodeHttpHandler.create(e?.requestHandler??n),retryMode:e?.retryMode??(0,$.loadConfig)({...Xt.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await n()).retryMode||tn.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Yt.Hash.bind(null,`sha256`),streamCollector:e?.streamCollector??Zt.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,$.loadConfig)(Q.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,i),useFipsEndpoint:e?.useFipsEndpoint??(0,$.loadConfig)(Q.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,i),userAgentAppId:e?.userAgentAppId??(0,$.loadConfig)(Jt.NODE_APP_ID_CONFIG_OPTIONS,i)}}})),an,on,sn=n((()=>{an=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},on=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})})),cn,ln,un,dn,fn=n((()=>{cn=fe(),ln=a(),un=g(),sn(),dn=(e,t)=>{let n=Object.assign((0,cn.getAwsRegionExtensionConfiguration)(e),(0,un.getDefaultExtensionConfiguration)(e),(0,ln.getHttpHandlerExtensionConfiguration)(e),an(e));return t.forEach(e=>e.configure(n)),Object.assign(e,(0,cn.resolveAwsRegionExtensionConfiguration)(n),(0,un.resolveDefaultRuntimeConfig)(n),(0,ln.resolveHttpHandlerRuntimeConfig)(n),on(n))}})),pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn=n((()=>{pn=te(),mn=ee(),hn=ae(),gn=T(),_n=se(),b(),m(),vn=ue(),yn=C(),bn=S(),xn=g(),Oe(),je(),rn(),fn(),Sn=class extends xn.Client{config;constructor(...[e]){let t=nn(e||{});super(t),this.initConfig=t;let n=dn(De((0,yn.resolveEndpointConfig)((0,pn.resolveHostHeaderConfig)((0,_n.resolveRegionConfig)((0,bn.resolveRetryConfig)((0,gn.resolveUserAgentConfig)(ke(t))))))),e?.extensions||[]);this.config=n,this.middlewareStack.use(h(this.config)),this.middlewareStack.use((0,gn.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,bn.getRetryPlugin)(this.config)),this.middlewareStack.use((0,vn.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,pn.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,mn.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,hn.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(he(this.config,{httpAuthSchemeParametersProvider:Te,identityProviderConfigProvider:async e=>new ne({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(v(this.config))}destroy(){super.destroy()}}})),wn,Tn,En,Dn=n((()=>{wn=C(),Tn=g(),je(),Vt(),En=class extends Tn.Command.classBuilder().ep(Ae).m(function(e,t,n,r){return[(0,wn.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]}).s(`SWBPortalService`,`GetRoleCredentials`,{}).n(`SSOClient`,`GetRoleCredentialsCommand`).sc(Bt).build(){}})),On,kn,An,jn=n((()=>{On=g(),Dn(),Cn(),kn={GetRoleCredentialsCommand:En},An=class extends Sn{},(0,On.createAggregatedClient)(kn,An)})),Mn=n((()=>{Dn()})),Nn=n((()=>{})),Pn=r({$Command:()=>Tn.Command,GetRoleCredentials$:()=>Bt,GetRoleCredentialsCommand:()=>En,GetRoleCredentialsRequest$:()=>Lt,GetRoleCredentialsResponse$:()=>Rt,InvalidRequestException:()=>G,InvalidRequestException$:()=>kt,ResourceNotFoundException:()=>Ze,ResourceNotFoundException$:()=>At,RoleCredentials$:()=>zt,SSO:()=>An,SSOClient:()=>Sn,SSOServiceException:()=>W,SSOServiceException$:()=>Ot,TooManyRequestsException:()=>Qe,TooManyRequestsException$:()=>jt,UnauthorizedException:()=>$e,UnauthorizedException$:()=>Mt,__Client:()=>xn.Client,errorTypeRegistries:()=>Nt}),Fn=n((()=>{Cn(),jn(),Mn(),Vt(),et(),Nn(),Xe()})),In=i((t=>{var n=(Fn(),e(Pn));t.GetRoleCredentialsCommand=n.GetRoleCredentialsCommand,t.SSOClient=n.SSOClient})),Ln=i((t=>{var n=ve(),r=ye(),i=(s(),e(c)),a=Se();let o=e=>e&&(typeof e.sso_start_url==`string`||typeof e.sso_account_id==`string`||typeof e.sso_session==`string`||typeof e.sso_region==`string`||typeof e.sso_role_name==`string`),l=async({ssoStartUrl:e,ssoSession:t,ssoAccountId:o,ssoRegion:s,ssoRoleName:c,ssoClient:l,clientConfig:u,parentClientConfig:d,callerClientConfig:f,profile:p,filepath:m,configFilepath:h,ignoreCache:g,logger:_})=>{let v,y=`To refresh this SSO session run aws sso login with the corresponding profile.`;if(t)try{let e=await a.fromSso({profile:p,filepath:m,configFilepath:h,ignoreCache:g})();v={accessToken:e.token,expiresAt:new Date(e.expiration).toISOString()}}catch(e){throw new n.CredentialsProviderError(e.message,{tryNextLink:!1,logger:_})}else try{v=await r.getSSOTokenFromFile(e)}catch{throw new n.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${y}`,{tryNextLink:!1,logger:_})}if(new Date(v.expiresAt).getTime()-Date.now()<=0)throw new n.CredentialsProviderError(`The SSO session associated with this profile has expired. ${y}`,{tryNextLink:!1,logger:_});let{accessToken:ee}=v,{SSOClient:te,GetRoleCredentialsCommand:ne}=await Promise.resolve().then(function(){return In()}),re=l||new te(Object.assign({},u??{},{logger:u?.logger??f?.logger??d?.logger,region:u?.region??s,userAgentAppId:u?.userAgentAppId??f?.userAgentAppId??d?.userAgentAppId})),ie;try{ie=await re.send(new ne({accountId:o,roleName:c,accessToken:ee}))}catch(e){throw new n.CredentialsProviderError(e,{tryNextLink:!1,logger:_})}let{roleCredentials:{accessKeyId:b,secretAccessKey:x,sessionToken:S,expiration:C,credentialScope:w,accountId:T}={}}=ie;if(!b||!x||!S||!C)throw new n.CredentialsProviderError(`SSO returns an invalid temporary credential.`,{tryNextLink:!1,logger:_});let E={accessKeyId:b,secretAccessKey:x,sessionToken:S,expiration:new Date(C),...w&&{credentialScope:w},...T&&{accountId:T}};return t?i.setCredentialFeature(E,`CREDENTIALS_SSO`,`s`):i.setCredentialFeature(E,`CREDENTIALS_SSO_LEGACY`,`u`),E},u=(e,t)=>{let{sso_start_url:r,sso_account_id:i,sso_region:a,sso_role_name:o}=e;if(!r||!i||!a||!o)throw new n.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(`, `)}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:t});return e};t.fromSSO=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug(`@aws-sdk/credential-provider-sso - fromSSO`);let{ssoStartUrl:i,ssoAccountId:a,ssoRegion:s,ssoRoleName:c,ssoSession:d}=e,{ssoClient:f}=e,p=r.getProfileName({profile:e.profile??t?.profile});if(!i&&!a&&!s&&!c&&!d){let t=(await r.parseKnownFiles(e))[p];if(!t)throw new n.CredentialsProviderError(`Profile ${p} was not found.`,{logger:e.logger});if(!o(t))throw new n.CredentialsProviderError(`Profile ${p} is not configured with SSO credentials.`,{logger:e.logger});if(t?.sso_session){let a=(await r.loadSsoSessionData(e))[t.sso_session],o=` configurations in profile ${p} and sso-session ${t.sso_session}`;if(s&&s!==a.sso_region)throw new n.CredentialsProviderError(`Conflicting SSO region`+o,{tryNextLink:!1,logger:e.logger});if(i&&i!==a.sso_start_url)throw new n.CredentialsProviderError(`Conflicting SSO start_url`+o,{tryNextLink:!1,logger:e.logger});t.sso_region=a.sso_region,t.sso_start_url=a.sso_start_url}let{sso_start_url:a,sso_account_id:c,sso_region:d,sso_role_name:m,sso_session:h}=u(t,e.logger);return l({ssoStartUrl:a,ssoSession:h,ssoAccountId:c,ssoRegion:d,ssoRoleName:m,ssoClient:f,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:p,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else if(!i||!a||!s||!c)throw new n.CredentialsProviderError(`Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"`,{tryNextLink:!1,logger:e.logger});else return l({ssoStartUrl:i,ssoSession:d,ssoAccountId:a,ssoRegion:s,ssoRoleName:c,ssoClient:f,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:p,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})},t.isSsoProfile=o,t.validateSsoProfile=u}));export default Ln();export{}; \ No newline at end of file +import{a as e,i as t,n,r,t as i}from"./chunk-Bdh3yLIe.js";import{t as a}from"./dist-cjs-BU-OH1DU.js";import{i as o,n as s,t as c}from"./client-D8hez-QA.js";import{t as l}from"./dist-cjs-BKjtSutv.js";import{B as u,D as d,N as f,R as p,T as m,k as h,t as g}from"./dist-cjs-CHwZlzSt.js";import{A as _,C as v,D as y,M as ee,N as te,S as ne,_ as re,a as ie,b,c as x,d as S,f as C,g as w,h as T,i as E,j as ae,l as oe,m as se,n as ce,o as le,p as ue,r as de,s as D,t as fe,u as pe,v as me,w as he,x as ge}from"./dist-cjs-DAPjxWOj.js";import{t as _e}from"./dist-cjs-BLKf4vef.js";import{t as ve}from"./dist-cjs-DJKA3UWR.js";import{t as ye}from"./dist-cjs-Dia4jG8x.js";import{t as be}from"./dist-cjs-DHscMTSt.js";import{t as xe}from"./package-DTfM1tyi.js";var Se=i((n=>{var r=(s(),e(c)),i=(D(),e(le)),a=ve(),o=ye(),l=t(`node:fs`);let u=({logger:e,signingName:t}={})=>async()=>{if(e?.debug?.(`@aws-sdk/token-providers - fromEnvSigningName`),!t)throw new a.TokenProviderError(`Please pass 'signingName' to compute environment variable key`,{logger:e});let n=i.getBearerTokenEnvKey(t);if(!(n in process.env))throw new a.TokenProviderError(`Token not present in '${n}' environment variable`,{logger:e});let o={token:process.env[n]};return r.setTokenFeature(o,`BEARER_SERVICE_ENV_VARS`,`3`),o},d=`To refresh this SSO session run 'aws sso login' with the corresponding profile.`,f=async(e,t={},n)=>{let{SSOOIDCClient:r}=await import(`./sso-oidc-B8DmKhEs.js`),i=e=>t.clientConfig?.[e]??t.parentClientConfig?.[e]??n?.[e];return new r(Object.assign({},t.clientConfig??{},{region:e??t.clientConfig?.region,logger:i(`logger`),userAgentAppId:i(`userAgentAppId`)}))},p=async(e,t,n={},r)=>{let{CreateTokenCommand:i}=await import(`./sso-oidc-B8DmKhEs.js`);return(await f(t,n,r)).send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:`refresh_token`}))},m=e=>{if(e.expiration&&e.expiration.getTime(){if(t===void 0)throw new a.TokenProviderError(`Value not present for '${e}' in SSO Token${n?`. Cannot refresh`:``}. ${d}`,!1)},{writeFile:g}=l.promises,_=(e,t)=>g(o.getSSOTokenFilepath(e),JSON.stringify(t,null,2)),v=new Date(0),y=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug(`@aws-sdk/token-providers - fromSso`);let n=await o.parseKnownFiles(e),r=o.getProfileName({profile:e.profile??t?.profile}),i=n[r];if(!i)throw new a.TokenProviderError(`Profile '${r}' could not be found in shared credentials file.`,!1);if(!i.sso_session)throw new a.TokenProviderError(`Profile '${r}' is missing required property 'sso_session'.`);let s=i.sso_session,c=(await o.loadSsoSessionData(e))[s];if(!c)throw new a.TokenProviderError(`Sso session '${s}' could not be found in shared credentials file.`,!1);for(let e of[`sso_start_url`,`sso_region`])if(!c[e])throw new a.TokenProviderError(`Sso session '${s}' is missing required property '${e}'.`,!1);c.sso_start_url;let l=c.sso_region,u;try{u=await o.getSSOTokenFromFile(s)}catch{throw new a.TokenProviderError(`The SSO session token associated with profile=${r} was not found or is invalid. ${d}`,!1)}h(`accessToken`,u.accessToken),h(`expiresAt`,u.expiresAt);let{accessToken:f,expiresAt:g}=u,y={token:f,expiration:new Date(g)};if(y.expiration.getTime()-Date.now()>3e5)return y;if(Date.now()-v.getTime()<30*1e3)return m(y),y;h(`clientId`,u.clientId,!0),h(`clientSecret`,u.clientSecret,!0),h(`refreshToken`,u.refreshToken,!0);try{v.setTime(Date.now());let n=await p(u,l,e,t);h(`accessToken`,n.accessToken),h(`expiresIn`,n.expiresIn);let r=new Date(Date.now()+n.expiresIn*1e3);try{await _(s,{...u,accessToken:n.accessToken,expiresAt:r.toISOString(),refreshToken:n.refreshToken})}catch{}return{token:n.accessToken,expiration:r}}catch{return m(y),y}};n.fromEnvSigningName=u,n.fromSso=y,n.fromStatic=({token:e,logger:t})=>async()=>{if(t?.debug(`@aws-sdk/token-providers - fromStatic`),!e||!e.token)throw new a.TokenProviderError(`Please pass a valid token to fromStatic`,!1);return e},n.nodeProvider=(e={})=>a.memoize(a.chain(y(e),async()=>{throw new a.TokenProviderError(`Could not load token from any providers`,!1)}),e=>e.expiration!==void 0&&e.expiration.getTime()-Date.now()<3e5,e=>e.expiration!==void 0)}));function Ce(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`awsssoportal`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function we(e){return{schemeId:`smithy.api#noAuth`}}var O,Te,Ee,De,Oe=n((()=>{D(),O=f(),Te=async(e,t,n)=>({operation:(0,O.getSmithyContext)(t).operation,region:await(0,O.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Ee=e=>{let t=[];switch(e.operation){case`GetRoleCredentials`:t.push(we(e));break;default:t.push(Ce(e))}return t},De=e=>{let t=x(e);return Object.assign(t,{authSchemePreference:(0,O.normalizeProvider)(e.authSchemePreference??[])})}})),ke,Ae,je=n((()=>{ke=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:`awsssoportal`}),Ae={UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}})),k,A,j,M,N,P,F,I,L,R,z,B,V,Me,Ne,Pe,Fe,H,Ie,Le,Re,ze,Be,Ve,He,Ue,We=n((()=>{k=`required`,A=`fn`,j=`argv`,M=`ref`,N=!0,P=`isSet`,F=`booleanEquals`,I=`error`,L=`endpoint`,R=`tree`,z=`PartitionResult`,B=`getAttr`,V={[k]:!1,type:`string`},Me={[k]:!0,default:!1,type:`boolean`},Ne={[M]:`Endpoint`},Pe={[A]:F,[j]:[{[M]:`UseFIPS`},!0]},Fe={[A]:F,[j]:[{[M]:`UseDualStack`},!0]},H={},Ie={[A]:B,[j]:[{[M]:z},`supportsFIPS`]},Le={[M]:z},Re={[A]:F,[j]:[!0,{[A]:B,[j]:[Le,`supportsDualStack`]}]},ze=[Pe],Be=[Fe],Ve=[{[M]:`Region`}],He={version:`1.0`,parameters:{Region:V,UseDualStack:Me,UseFIPS:Me,Endpoint:V},rules:[{conditions:[{[A]:P,[j]:[Ne]}],rules:[{conditions:ze,error:`Invalid Configuration: FIPS and custom endpoint are not supported`,type:I},{conditions:Be,error:`Invalid Configuration: Dualstack and custom endpoint are not supported`,type:I},{endpoint:{url:Ne,properties:H,headers:H},type:L}],type:R},{conditions:[{[A]:P,[j]:Ve}],rules:[{conditions:[{[A]:`aws.partition`,[j]:Ve,assign:z}],rules:[{conditions:[Pe,Fe],rules:[{conditions:[{[A]:F,[j]:[N,Ie]},Re],rules:[{endpoint:{url:`https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:H,headers:H},type:L}],type:R},{error:`FIPS and DualStack are enabled, but this partition does not support one or both`,type:I}],type:R},{conditions:ze,rules:[{conditions:[{[A]:F,[j]:[Ie,N]}],rules:[{conditions:[{[A]:`stringEquals`,[j]:[{[A]:B,[j]:[Le,`name`]},`aws-us-gov`]}],endpoint:{url:`https://portal.sso.{Region}.amazonaws.com`,properties:H,headers:H},type:L},{endpoint:{url:`https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}`,properties:H,headers:H},type:L}],type:R},{error:`FIPS is enabled but this partition does not support FIPS`,type:I}],type:R},{conditions:Be,rules:[{conditions:[Re],rules:[{endpoint:{url:`https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:H,headers:H},type:L}],type:R},{error:`DualStack is enabled but this partition does not support DualStack`,type:I}],type:R},{endpoint:{url:`https://portal.sso.{Region}.{PartitionResult#dnsSuffix}`,properties:H,headers:H},type:L}],type:R}],type:R},{error:`Invalid Configuration: Missing Region`,type:I}]},Ue=He})),Ge,U,Ke,qe,Je=n((()=>{Ge=re(),U=me(),We(),Ke=new U.EndpointCache({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`]}),qe=(e,t={})=>Ke.get(e,()=>(0,U.resolveEndpoint)(Ue,{endpointParams:e,logger:t.logger})),U.customEndpointFunctions.aws=Ge.awsEndpointFunctions})),Ye,W,Xe=n((()=>{Ye=g(),W=class e extends Ye.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),G,Ze,Qe,$e,et=n((()=>{Xe(),G=class e extends W{name=`InvalidRequestException`;$fault=`client`;constructor(t){super({name:`InvalidRequestException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},Ze=class e extends W{name=`ResourceNotFoundException`;$fault=`client`;constructor(t){super({name:`ResourceNotFoundException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},Qe=class e extends W{name=`TooManyRequestsException`;$fault=`client`;constructor(t){super({name:`TooManyRequestsException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},$e=class e extends W{name=`UnauthorizedException`;$fault=`client`;constructor(t){super({name:`UnauthorizedException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}}})),tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,K,q,gt,_t,J,vt,yt,Y,bt,xt,St,Ct,wt,Tt,Et,X,Dt,Ot,Z,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt=n((()=>{m(),et(),Xe(),tt=`AccessTokenType`,nt=`GetRoleCredentials`,rt=`GetRoleCredentialsRequest`,it=`GetRoleCredentialsResponse`,at=`InvalidRequestException`,ot=`RoleCredentials`,st=`ResourceNotFoundException`,ct=`SecretAccessKeyType`,lt=`SessionTokenType`,ut=`TooManyRequestsException`,dt=`UnauthorizedException`,ft=`accountId`,pt=`accessKeyId`,mt=`accessToken`,ht=`account_id`,K=`client`,q=`error`,gt=`expiration`,_t=`http`,J=`httpError`,vt=`httpHeader`,yt=`httpQuery`,Y=`message`,bt=`roleCredentials`,xt=`roleName`,St=`role_name`,Ct=`smithy.ts.sdk.synthetic.com.amazonaws.sso`,wt=`secretAccessKey`,Tt=`sessionToken`,Et=`x-amz-sso_bearer_token`,X=`com.amazonaws.sso`,Dt=d.for(Ct),Ot=[-3,Ct,`SSOServiceException`,0,[],[]],Dt.registerError(Ot,W),Z=d.for(X),kt=[-3,X,at,{[q]:K,[J]:400},[Y],[0]],Z.registerError(kt,G),At=[-3,X,st,{[q]:K,[J]:404},[Y],[0]],Z.registerError(At,Ze),jt=[-3,X,ut,{[q]:K,[J]:429},[Y],[0]],Z.registerError(jt,Qe),Mt=[-3,X,dt,{[q]:K,[J]:401},[Y],[0]],Z.registerError(Mt,$e),Nt=[Dt,Z],Pt=[0,X,tt,8,0],Ft=[0,X,ct,8,0],It=[0,X,lt,8,0],Lt=[3,X,rt,0,[xt,ft,mt],[[0,{[yt]:St}],[0,{[yt]:ht}],[()=>Pt,{[vt]:Et}]],3],Rt=[3,X,it,0,[bt],[[()=>zt,0]]],zt=[3,X,ot,0,[pt,wt,Tt,gt],[0,[()=>Ft,0],[()=>It,0],1]],Bt=[9,X,nt,{[_t]:[`GET`,`/federation/credentials`,200]},()=>Lt,()=>Rt]})),Ht,Ut,Wt,Gt,Kt,qt=n((()=>{D(),y(),b(),Ht=g(),Ut=_e(),Wt=u(),Gt=l(),Oe(),Je(),Vt(),Kt=e=>({apiVersion:`2019-06-10`,base64Decoder:e?.base64Decoder??Wt.fromBase64,base64Encoder:e?.base64Encoder??Wt.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??qe,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Ee,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new pe},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new ge}],logger:e?.logger??new Ht.NoOpLogger,protocol:e?.protocol??_,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.sso`,errorTypeRegistries:Nt,version:`2019-06-10`,serviceTarget:`SWBPortalService`},serviceId:e?.serviceId??`SSO`,urlParser:e?.urlParser??Ut.parseUrl,utf8Decoder:e?.utf8Decoder??Gt.fromUtf8,utf8Encoder:e?.utf8Encoder??Gt.toUtf8})})),Jt,Q,Yt,Xt,$,Zt,Qt,$t,en,tn,nn,rn=n((()=>{s(),D(),Jt=ie(),Q=se(),Yt=E(),Xt=S(),$=be(),Zt=p(),Qt=g(),$t=de(),en=ce(),tn=w(),qt(),nn=e=>{(0,Qt.emitWarningIfUnsupportedVersion)(process.version);let t=(0,en.resolveDefaultsModeConfig)(e),n=()=>t().then(Qt.loadConfigsForDefaultMode),r=Kt(e);o(process.version);let i={profile:e?.profile,logger:r.logger};return{...r,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,$.loadConfig)(oe,i),bodyLengthChecker:e?.bodyLengthChecker??$t.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Jt.createDefaultUserAgentProvider)({serviceId:r.serviceId,clientVersion:xe}),maxAttempts:e?.maxAttempts??(0,$.loadConfig)(Xt.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,$.loadConfig)(Q.NODE_REGION_CONFIG_OPTIONS,{...Q.NODE_REGION_CONFIG_FILE_OPTIONS,...i}),requestHandler:Zt.NodeHttpHandler.create(e?.requestHandler??n),retryMode:e?.retryMode??(0,$.loadConfig)({...Xt.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await n()).retryMode||tn.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Yt.Hash.bind(null,`sha256`),streamCollector:e?.streamCollector??Zt.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,$.loadConfig)(Q.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,i),useFipsEndpoint:e?.useFipsEndpoint??(0,$.loadConfig)(Q.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,i),userAgentAppId:e?.userAgentAppId??(0,$.loadConfig)(Jt.NODE_APP_ID_CONFIG_OPTIONS,i)}}})),an,on,sn=n((()=>{an=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},on=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})})),cn,ln,un,dn,fn=n((()=>{cn=fe(),ln=a(),un=g(),sn(),dn=(e,t)=>{let n=Object.assign((0,cn.getAwsRegionExtensionConfiguration)(e),(0,un.getDefaultExtensionConfiguration)(e),(0,ln.getHttpHandlerExtensionConfiguration)(e),an(e));return t.forEach(e=>e.configure(n)),Object.assign(e,(0,cn.resolveAwsRegionExtensionConfiguration)(n),(0,un.resolveDefaultRuntimeConfig)(n),(0,ln.resolveHttpHandlerRuntimeConfig)(n),on(n))}})),pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn=n((()=>{pn=te(),mn=ee(),hn=ae(),gn=T(),_n=se(),b(),m(),vn=ue(),yn=C(),bn=S(),xn=g(),Oe(),je(),rn(),fn(),Sn=class extends xn.Client{config;constructor(...[e]){let t=nn(e||{});super(t),this.initConfig=t;let n=dn(De((0,yn.resolveEndpointConfig)((0,pn.resolveHostHeaderConfig)((0,_n.resolveRegionConfig)((0,bn.resolveRetryConfig)((0,gn.resolveUserAgentConfig)(ke(t))))))),e?.extensions||[]);this.config=n,this.middlewareStack.use(h(this.config)),this.middlewareStack.use((0,gn.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,bn.getRetryPlugin)(this.config)),this.middlewareStack.use((0,vn.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,pn.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,mn.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,hn.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(he(this.config,{httpAuthSchemeParametersProvider:Te,identityProviderConfigProvider:async e=>new ne({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(v(this.config))}destroy(){super.destroy()}}})),wn,Tn,En,Dn=n((()=>{wn=C(),Tn=g(),je(),Vt(),En=class extends Tn.Command.classBuilder().ep(Ae).m(function(e,t,n,r){return[(0,wn.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]}).s(`SWBPortalService`,`GetRoleCredentials`,{}).n(`SSOClient`,`GetRoleCredentialsCommand`).sc(Bt).build(){}})),On,kn,An,jn=n((()=>{On=g(),Dn(),Cn(),kn={GetRoleCredentialsCommand:En},An=class extends Sn{},(0,On.createAggregatedClient)(kn,An)})),Mn=n((()=>{Dn()})),Nn=n((()=>{})),Pn=r({$Command:()=>Tn.Command,GetRoleCredentials$:()=>Bt,GetRoleCredentialsCommand:()=>En,GetRoleCredentialsRequest$:()=>Lt,GetRoleCredentialsResponse$:()=>Rt,InvalidRequestException:()=>G,InvalidRequestException$:()=>kt,ResourceNotFoundException:()=>Ze,ResourceNotFoundException$:()=>At,RoleCredentials$:()=>zt,SSO:()=>An,SSOClient:()=>Sn,SSOServiceException:()=>W,SSOServiceException$:()=>Ot,TooManyRequestsException:()=>Qe,TooManyRequestsException$:()=>jt,UnauthorizedException:()=>$e,UnauthorizedException$:()=>Mt,__Client:()=>xn.Client,errorTypeRegistries:()=>Nt}),Fn=n((()=>{Cn(),jn(),Mn(),Vt(),et(),Nn(),Xe()})),In=i((t=>{var n=(Fn(),e(Pn));t.GetRoleCredentialsCommand=n.GetRoleCredentialsCommand,t.SSOClient=n.SSOClient})),Ln=i((t=>{var n=ve(),r=ye(),i=(s(),e(c)),a=Se();let o=e=>e&&(typeof e.sso_start_url==`string`||typeof e.sso_account_id==`string`||typeof e.sso_session==`string`||typeof e.sso_region==`string`||typeof e.sso_role_name==`string`),l=async({ssoStartUrl:e,ssoSession:t,ssoAccountId:o,ssoRegion:s,ssoRoleName:c,ssoClient:l,clientConfig:u,parentClientConfig:d,callerClientConfig:f,profile:p,filepath:m,configFilepath:h,ignoreCache:g,logger:_})=>{let v,y=`To refresh this SSO session run aws sso login with the corresponding profile.`;if(t)try{let e=await a.fromSso({profile:p,filepath:m,configFilepath:h,ignoreCache:g})();v={accessToken:e.token,expiresAt:new Date(e.expiration).toISOString()}}catch(e){throw new n.CredentialsProviderError(e.message,{tryNextLink:!1,logger:_})}else try{v=await r.getSSOTokenFromFile(e)}catch{throw new n.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${y}`,{tryNextLink:!1,logger:_})}if(new Date(v.expiresAt).getTime()-Date.now()<=0)throw new n.CredentialsProviderError(`The SSO session associated with this profile has expired. ${y}`,{tryNextLink:!1,logger:_});let{accessToken:ee}=v,{SSOClient:te,GetRoleCredentialsCommand:ne}=await Promise.resolve().then(function(){return In()}),re=l||new te(Object.assign({},u??{},{logger:u?.logger??f?.logger??d?.logger,region:u?.region??s,userAgentAppId:u?.userAgentAppId??f?.userAgentAppId??d?.userAgentAppId})),ie;try{ie=await re.send(new ne({accountId:o,roleName:c,accessToken:ee}))}catch(e){throw new n.CredentialsProviderError(e,{tryNextLink:!1,logger:_})}let{roleCredentials:{accessKeyId:b,secretAccessKey:x,sessionToken:S,expiration:C,credentialScope:w,accountId:T}={}}=ie;if(!b||!x||!S||!C)throw new n.CredentialsProviderError(`SSO returns an invalid temporary credential.`,{tryNextLink:!1,logger:_});let E={accessKeyId:b,secretAccessKey:x,sessionToken:S,expiration:new Date(C),...w&&{credentialScope:w},...T&&{accountId:T}};return t?i.setCredentialFeature(E,`CREDENTIALS_SSO`,`s`):i.setCredentialFeature(E,`CREDENTIALS_SSO_LEGACY`,`u`),E},u=(e,t)=>{let{sso_start_url:r,sso_account_id:i,sso_region:a,sso_role_name:o}=e;if(!r||!i||!a||!o)throw new n.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(`, `)}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:t});return e};t.fromSSO=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug(`@aws-sdk/credential-provider-sso - fromSSO`);let{ssoStartUrl:i,ssoAccountId:a,ssoRegion:s,ssoRoleName:c,ssoSession:d}=e,{ssoClient:f}=e,p=r.getProfileName({profile:e.profile??t?.profile});if(!i&&!a&&!s&&!c&&!d){let t=(await r.parseKnownFiles(e))[p];if(!t)throw new n.CredentialsProviderError(`Profile ${p} was not found.`,{logger:e.logger});if(!o(t))throw new n.CredentialsProviderError(`Profile ${p} is not configured with SSO credentials.`,{logger:e.logger});if(t?.sso_session){let a=(await r.loadSsoSessionData(e))[t.sso_session],o=` configurations in profile ${p} and sso-session ${t.sso_session}`;if(s&&s!==a.sso_region)throw new n.CredentialsProviderError(`Conflicting SSO region`+o,{tryNextLink:!1,logger:e.logger});if(i&&i!==a.sso_start_url)throw new n.CredentialsProviderError(`Conflicting SSO start_url`+o,{tryNextLink:!1,logger:e.logger});t.sso_region=a.sso_region,t.sso_start_url=a.sso_start_url}let{sso_start_url:a,sso_account_id:c,sso_region:d,sso_role_name:m,sso_session:h}=u(t,e.logger);return l({ssoStartUrl:a,ssoSession:h,ssoAccountId:c,ssoRegion:d,ssoRoleName:m,ssoClient:f,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:p,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else if(!i||!a||!s||!c)throw new n.CredentialsProviderError(`Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"`,{tryNextLink:!1,logger:e.logger});else return l({ssoStartUrl:i,ssoSession:d,ssoAccountId:a,ssoRegion:s,ssoRoleName:c,ssoClient:f,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:p,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})},t.isSsoProfile=o,t.validateSsoProfile=u}));export default Ln();export{}; \ No newline at end of file diff --git a/dist/dist-cjs-qMH96PP6.js b/dist/dist-cjs-PmUTcsyT.js similarity index 98% rename from dist/dist-cjs-qMH96PP6.js rename to dist/dist-cjs-PmUTcsyT.js index 39e07430..30e4f217 100644 --- a/dist/dist-cjs-qMH96PP6.js +++ b/dist/dist-cjs-PmUTcsyT.js @@ -1 +1 @@ -import{a as e,i as t,t as n}from"./chunk-Bdh3yLIe.js";import{n as r,t as i}from"./client-D8hez-QA.js";import{t as a}from"./dist-cjs-DJKA3UWR.js";import{t as o}from"./dist-cjs-Dia4jG8x.js";import{n as s,t as c}from"./sts-3986FUMY.js";var l=n((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=t&&t.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var a=e(t),o=0;oasync n=>{t.logger?.debug(`@aws-sdk/credential-provider-web-identity - fromWebToken`);let{roleArn:r,roleSessionName:a,webIdentityToken:o,providerId:l,policyArns:u,policy:d,durationSeconds:f}=t,{roleAssumerWithWebIdentity:p}=t;if(!p){let{getDefaultRoleAssumerWithWebIdentity:r}=await Promise.resolve().then(()=>i((c(),e(s))));p=r({...t.clientConfig,credentialProviderLogger:t.logger,parentClientConfig:{...n?.callerClientConfig,...t.parentClientConfig}},t.clientPlugins)}return p({RoleArn:r,RoleSessionName:a??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:o,ProviderId:l,PolicyArns:u,Policy:d,DurationSeconds:f})}})),u=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.fromTokenFile=void 0;let s=(r(),e(i)),c=a(),u=o(),d=t(`node:fs`),f=l(),p=`AWS_WEB_IDENTITY_TOKEN_FILE`;n.fromTokenFile=(e={})=>async t=>{e.logger?.debug(`@aws-sdk/credential-provider-web-identity - fromTokenFile`);let n=e?.webIdentityTokenFile??process.env[p],r=e?.roleArn??process.env.AWS_ROLE_ARN,i=e?.roleSessionName??process.env.AWS_ROLE_SESSION_NAME;if(!n||!r)throw new c.CredentialsProviderError(`Web identity configuration not specified`,{logger:e.logger});let a=await(0,f.fromWebToken)({...e,webIdentityToken:u.externalDataInterceptor?.getTokenRecord?.()[n]??(0,d.readFileSync)(n,{encoding:`ascii`}),roleArn:r,roleSessionName:i})(t);return n===process.env[p]&&(0,s.setCredentialFeature)(a,`CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN`,`h`),a}})),d=n((e=>{var t=u(),n=l();Object.prototype.hasOwnProperty.call(t,`__proto__`)&&!Object.prototype.hasOwnProperty.call(e,`__proto__`)&&Object.defineProperty(e,`__proto__`,{enumerable:!0,value:t.__proto__}),Object.keys(t).forEach(function(n){n!==`default`&&!Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])}),Object.prototype.hasOwnProperty.call(n,`__proto__`)&&!Object.prototype.hasOwnProperty.call(e,`__proto__`)&&Object.defineProperty(e,`__proto__`,{enumerable:!0,value:n.__proto__}),Object.keys(n).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(e,t)&&(e[t]=n[t])})}));export default d();export{}; \ No newline at end of file +import{a as e,i as t,t as n}from"./chunk-Bdh3yLIe.js";import{n as r,t as i}from"./client-D8hez-QA.js";import{t as a}from"./dist-cjs-DJKA3UWR.js";import{t as o}from"./dist-cjs-Dia4jG8x.js";import{n as s,t as c}from"./sts-BbL48JVY.js";var l=n((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=t&&t.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var a=e(t),o=0;oasync n=>{t.logger?.debug(`@aws-sdk/credential-provider-web-identity - fromWebToken`);let{roleArn:r,roleSessionName:a,webIdentityToken:o,providerId:l,policyArns:u,policy:d,durationSeconds:f}=t,{roleAssumerWithWebIdentity:p}=t;if(!p){let{getDefaultRoleAssumerWithWebIdentity:r}=await Promise.resolve().then(()=>i((c(),e(s))));p=r({...t.clientConfig,credentialProviderLogger:t.logger,parentClientConfig:{...n?.callerClientConfig,...t.parentClientConfig}},t.clientPlugins)}return p({RoleArn:r,RoleSessionName:a??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:o,ProviderId:l,PolicyArns:u,Policy:d,DurationSeconds:f})}})),u=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.fromTokenFile=void 0;let s=(r(),e(i)),c=a(),u=o(),d=t(`node:fs`),f=l(),p=`AWS_WEB_IDENTITY_TOKEN_FILE`;n.fromTokenFile=(e={})=>async t=>{e.logger?.debug(`@aws-sdk/credential-provider-web-identity - fromTokenFile`);let n=e?.webIdentityTokenFile??process.env[p],r=e?.roleArn??process.env.AWS_ROLE_ARN,i=e?.roleSessionName??process.env.AWS_ROLE_SESSION_NAME;if(!n||!r)throw new c.CredentialsProviderError(`Web identity configuration not specified`,{logger:e.logger});let a=await(0,f.fromWebToken)({...e,webIdentityToken:u.externalDataInterceptor?.getTokenRecord?.()[n]??(0,d.readFileSync)(n,{encoding:`ascii`}),roleArn:r,roleSessionName:i})(t);return n===process.env[p]&&(0,s.setCredentialFeature)(a,`CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN`,`h`),a}})),d=n((e=>{var t=u(),n=l();Object.prototype.hasOwnProperty.call(t,`__proto__`)&&!Object.prototype.hasOwnProperty.call(e,`__proto__`)&&Object.defineProperty(e,`__proto__`,{enumerable:!0,value:t.__proto__}),Object.keys(t).forEach(function(n){n!==`default`&&!Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])}),Object.prototype.hasOwnProperty.call(n,`__proto__`)&&!Object.prototype.hasOwnProperty.call(e,`__proto__`)&&Object.defineProperty(e,`__proto__`,{enumerable:!0,value:n.__proto__}),Object.keys(n).forEach(function(t){t!==`default`&&!Object.prototype.hasOwnProperty.call(e,t)&&(e[t]=n[t])})}));export default d();export{}; \ No newline at end of file diff --git a/dist/dist-cjs-vGYnjJIN.js b/dist/dist-cjs-vGYnjJIN.js deleted file mode 100644 index eb05cdf5..00000000 --- a/dist/dist-cjs-vGYnjJIN.js +++ /dev/null @@ -1,22 +0,0 @@ -import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-Bdh3yLIe.js";import{t as o}from"./dist-cjs-DTPeWY3Q.js";import{t as s}from"./dist-cjs-BU-OH1DU.js";import{n as c,r as l,t as u}from"./client-D8hez-QA.js";import{n as d,r as f,t as p}from"./dist-cjs-BKjtSutv.js";import{A as m,B as h,C as g,D as _,L as v,M as y,N as b,O as x,S,T as C,_ as w,a as T,b as E,c as D,d as O,f as ee,g as k,h as A,i as j,j as M,l as N,m as P,n as F,o as I,p as L,r as R,s as te,t as z,u as B,v as ne,w as re,x as ie,y as ae,z as oe}from"./dist-cjs-CHwZlzSt.js";import{t as se}from"./dist-cjs-BLKf4vef.js";import{t as ce}from"./dist-cjs-DJKA3UWR.js";import{t as le}from"./dist-cjs-Dia4jG8x.js";import{t as ue}from"./dist-cjs-DHscMTSt.js";var de=a((e=>{var t=s();function n(e){return e}let r=e=>n=>async r=>{if(!t.HttpRequest.isInstance(r.request))return n(r);let{request:i}=r,{handlerProtocol:a=``}=e.requestHandler.metadata||{};if(a.indexOf(`h2`)>=0&&!i.headers[`:authority`])delete i.headers.host,i.headers[`:authority`]=i.hostname+(i.port?`:`+i.port:``);else if(!i.headers.host){let e=i.hostname;i.port!=null&&(e+=`:${i.port}`),i.headers.host=e}return n(r)},i={name:`hostHeaderMiddleware`,step:`build`,priority:`low`,tags:[`HOST`],override:!0};e.getHostHeaderPlugin=e=>({applyToStack:t=>{t.add(r(e),i)}}),e.hostHeaderMiddleware=r,e.hostHeaderMiddlewareOptions=i,e.resolveHostHeaderConfig=n})),V=a((e=>{let t=()=>(e,t)=>async n=>{try{let r=await e(n),{clientName:i,commandName:a,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=s,u=c??t.inputFilterSensitiveLog,d=l??t.outputFilterSensitiveLog,{$metadata:f,...p}=r.output;return o?.info?.({clientName:i,commandName:a,input:u(n.input),output:d(p),metadata:f}),r}catch(e){let{clientName:r,commandName:i,logger:a,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:s}=o,c=s??t.inputFilterSensitiveLog;throw a?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},n={name:`loggerMiddleware`,tags:[`LOGGER`],step:`initialize`,override:!0};e.getLoggerPlugin=e=>({applyToStack:e=>{e.add(t(),n)}}),e.loggerMiddleware=t,e.loggerMiddlewareOptions=n})),fe=i({InvokeStore:()=>_e,InvokeStoreBase:()=>me}),H,pe,me,he,ge,_e,ve=n((()=>{H={REQUEST_ID:Symbol.for(`_AWS_LAMBDA_REQUEST_ID`),X_RAY_TRACE_ID:Symbol.for(`_AWS_LAMBDA_X_RAY_TRACE_ID`),TENANT_ID:Symbol.for(`_AWS_LAMBDA_TENANT_ID`)},pe=[`true`,`1`].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA??``),pe||(globalThis.awslambda=globalThis.awslambda||{}),me=class{static PROTECTED_KEYS=H;isProtectedKey(e){return Object.values(H).includes(e)}getRequestId(){return this.get(H.REQUEST_ID)??`-`}getXRayTraceId(){return this.get(H.X_RAY_TRACE_ID)}getTenantId(){return this.get(H.TENANT_ID)}},he=class extends me{currentContext;getContext(){return this.currentContext}hasContext(){return this.currentContext!==void 0}get(e){return this.currentContext?.[e]}set(e,t){if(this.isProtectedKey(e))throw Error(`Cannot modify protected Lambda context field: ${String(e)}`);this.currentContext=this.currentContext||{},this.currentContext[e]=t}run(e,t){return this.currentContext=e,t()}},ge=class e extends me{als;static async create(){let t=new e;return t.als=new(await(import(`node:async_hooks`))).AsyncLocalStorage,t}getContext(){return this.als.getStore()}hasContext(){return this.als.getStore()!==void 0}get(e){return this.als.getStore()?.[e]}set(e,t){if(this.isProtectedKey(e))throw Error(`Cannot modify protected Lambda context field: ${String(e)}`);let n=this.als.getStore();if(!n)throw Error(`No context available`);n[e]=t}run(e,t){return this.als.run(e,t)}},(function(e){let t=null;async function n(e){return t||=(async()=>{let t=e===!0||`AWS_LAMBDA_MAX_CONCURRENCY`in process.env?await ge.create():new he;return!pe&&globalThis.awslambda?.InvokeStore?globalThis.awslambda.InvokeStore:(!pe&&globalThis.awslambda&&(globalThis.awslambda.InvokeStore=t),t)})(),t}e.getInstanceAsync=n,e._testing=process.env.AWS_LAMBDA_BENCHMARK_MODE===`1`?{reset:()=>{t=null,globalThis.awslambda?.InvokeStore&&delete globalThis.awslambda.InvokeStore,globalThis.awslambda={InvokeStore:void 0}}}:void 0})(_e||={})})),ye=a((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.recursionDetectionMiddleware=void 0;let n=(ve(),e(fe)),r=s(),i=`X-Amzn-Trace-Id`;t.recursionDetectionMiddleware=()=>e=>async t=>{let{request:a}=t;if(!r.HttpRequest.isInstance(a))return e(t);let o=Object.keys(a.headers??{}).find(e=>e.toLowerCase()===`x-amzn-trace-id`)??i;if(a.headers.hasOwnProperty(o))return e(t);let s=process.env.AWS_LAMBDA_FUNCTION_NAME,c=process.env._X_AMZN_TRACE_ID,l=(await n.InvokeStore.getInstanceAsync())?.getXRayTraceId()??c,u=e=>typeof e==`string`&&e.length>0;return u(s)&&u(l)&&(a.headers[i]=l),e({...t,request:a})}})),be=a((e=>{var t=ye();let n={step:`build`,tags:[`RECURSION_DETECTION`],name:`recursionDetectionMiddleware`,override:!0,priority:`low`};e.getRecursionDetectionPlugin=e=>({applyToStack:e=>{e.add(t.recursionDetectionMiddleware(),n)}}),Object.prototype.hasOwnProperty.call(t,`__proto__`)&&!Object.prototype.hasOwnProperty.call(e,`__proto__`)&&Object.defineProperty(e,`__proto__`,{enumerable:!0,value:t.__proto__}),Object.keys(t).forEach(function(n){n!==`default`&&!Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])})}));function xe(e){return typeof Buffer<`u`?Buffer.alloc(e):new Uint8Array(e)}function Se(e){return e[Ce]=!0,e}var Ce,we=n((()=>{Ce=Symbol(`@smithy/core/cbor::tagSymbol`)}));function Te(e){G=e,K=new DataView(G.buffer,G.byteOffset,G.byteLength)}function U(e,t){if(e>=t)throw Error(`unexpected end of (decode) payload.`);let n=(G[e]&224)>>5,r=G[e]&31;switch(n){case 0:case 1:case 6:let i,a;if(r<24)i=r,a=1;else switch(r){case 24:case 25:case 26:case 27:let n=Ue[r],o=n+1;if(a=o,t-e>7,r=(e&124)>>2,i=(e&3)<<8|t,a=n===0?1:-1,o,s;if(r===0){if(i===0)return 0;o=2**-14,s=0}else if(r===31)return i===0?a*(1/0):NaN;else o=2**(r-15),s=1;return s+=i/1024,o*s*a}function ke(e,t){let n=G[e]&31;if(n<24)return q=1,n;if(n===24||n===25||n===26||n===27){let r=Ue[n];if(q=r+1,t-e>5,a=G[e]&31;if(i!==3)throw Error(`unexpected major type ${i} in indefinite string.`);if(a===31)throw Error(`nested indefinite string.`);let o=Me(e,t);e+=q;for(let e=0;e>5,a=G[e]&31;if(i!==2)throw Error(`unexpected major type ${i} in indefinite string.`);if(a===31)throw Error(`nested indefinite string.`);let o=Me(e,t);e+=q;for(let e=0;e=t)throw Error(`unexpected end of map payload.`);let n=(G[e]&224)>>5;if(n!==3)throw Error(`unexpected major type ${n} for map key at index ${e}.`);let r=U(e,t);e+=q;let i=U(e,t);e+=q,a[r]=i}return q=r+(e-i),a}function Ie(e,t){e+=1;let n=e,r={};for(;e=t)throw Error(`unexpected end of map payload.`);if(G[e]===255)return q=e-n+2,r;let i=(G[e]&224)>>5;if(i!==3)throw Error(`unexpected major type ${i} for map key.`);let a=U(e,t);e+=q;let o=U(e,t);e+=q,r[a]=o}throw Error(`expected break marker.`)}function Le(e,t){let n=G[e]&31;switch(n){case 21:case 20:return q=1,n===21;case 22:return q=1,null;case 23:return q=1,null;case 25:if(t-e<3)throw Error(`incomplete float16 at end of buf.`);return q=3,Oe(G[e+1],G[e+2]);case 26:if(t-e<5)throw Error(`incomplete float32 at end of buf.`);return q=5,K.getFloat32(e+1);case 27:if(t-e<9)throw Error(`incomplete float64 at end of buf.`);return q=9,K.getFloat64(e+1);default:throw Error(`unexpected minor value ${n}.`)}}function Re(e){if(typeof e==`number`)return e;let t=Number(e);return-(2**53-1)<=t&&t<=2**53-1?t:e}var ze,Be,Ve,G,K,He,q,Ue,We=n((()=>{L(),ze=p(),we(),Be=typeof TextDecoder<`u`,Ve=typeof Buffer<`u`,G=xe(0),K=new DataView(G.buffer,G.byteOffset,G.byteLength),He=Be?new TextDecoder:null,q=0,Ue={24:1,25:2,26:4,27:8}}));function Ge(e){Y.byteLength-Z=0,n=+!t,r=t?e:-e-1;r<24?Y[Z++]=n<<5|r:r<256?(Y[Z++]=n<<5|24,Y[Z++]=r):r<65536?(Y[Z++]=n<<5|25,Y[Z++]=r>>8,Y[Z++]=r):r<4294967296?(Y[Z++]=n<<5|26,X.setUint32(Z,r),Z+=4):(Y[Z++]=n<<5|27,X.setBigUint64(Z,BigInt(r)),Z+=8);continue}Y[Z++]=251,X.setFloat64(Z,e),Z+=8;continue}else if(typeof e==`bigint`){let t=e>=0,n=+!t,r=t?e:-e-BigInt(1),i=Number(r);if(i<24)Y[Z++]=n<<5|i;else if(i<256)Y[Z++]=n<<5|24,Y[Z++]=i;else if(i<65536)Y[Z++]=n<<5|25,Y[Z++]=i>>8,Y[Z++]=i&255;else if(i<4294967296)Y[Z++]=n<<5|26,X.setUint32(Z,i),Z+=4;else if(r=0;)n[n.byteLength-a]=Number(i&BigInt(255)),i>>=BigInt(8);Ge(n.byteLength*2),Y[Z++]=t?194:195,Xe?J(2,Buffer.byteLength(n)):J(2,n.byteLength),Y.set(n,Z),Z+=n.byteLength}continue}else if(e===null){Y[Z++]=246;continue}else if(typeof e==`boolean`){Y[Z++]=224|(e?21:20);continue}else if(e===void 0)throw Error(`@smithy/core/cbor: client may not serialize undefined value.`);else if(Array.isArray(e)){for(let n=e.length-1;n>=0;--n)t.push(e[n]);J(4,e.length);continue}else if(typeof e.byteLength==`number`){Ge(e.length*2),J(2,e.length),Y.set(e,Z),Z+=e.byteLength;continue}else if(typeof e==`object`){if(e instanceof A){let n=e.string.indexOf(`.`),r=n===-1?0:n-e.string.length+1,i=BigInt(e.string.replace(`.`,``));Y[Z++]=196,t.push(i),t.push(r),J(4,2);continue}if(e[Ce])if(`tag`in e&&`value`in e){t.push(e.value),J(6,e.tag);continue}else throw Error(`tag encountered with missing fields, need 'tag' and 'value', found: `+JSON.stringify(e));let n=Object.keys(e);for(let r=n.length-1;r>=0;--r){let i=n[r];t.push(e[i]),t.push(i)}J(5,n.length);continue}throw Error(`data type ${e?.constructor?.name??typeof e} not compatible for encoding.`)}}var Ye,Xe,Y,X,Z,Ze=n((()=>{L(),Ye=p(),we(),Xe=typeof Buffer<`u`,Y=xe(2048),X=new DataView(Y.buffer,Y.byteOffset,Y.byteLength),Z=0})),Qe,$e=n((()=>{We(),Ze(),Qe={deserialize(e){return Te(e),U(0,e.length)},serialize(e){try{return Je(e),Ke()}catch(e){throw Ke(),e}},resizeEncodingBuffer(e){qe(e)}}})),et,tt,nt=n((()=>{we(),et=e=>Se({tag:1,value:e.getTime()/1e3}),tt=(e,t)=>{let n=e=>{let t=e;return typeof t==`number`&&(t=t.toString()),t.indexOf(`,`)>=0&&(t=t.split(`,`)[0]),t.indexOf(`:`)>=0&&(t=t.split(`:`)[0]),t.indexOf(`#`)>=0&&(t=t.split(`#`)[1]),t};if(t.__type!==void 0)return n(t.__type);let r=Object.keys(t).find(e=>e.toLowerCase()===`code`);if(r&&t[r]!==void 0)return n(t[r])}})),rt,it,at,ot,st=n((()=>{F(),C(),L(),rt=h(),$e(),nt(),it=class extends B{createSerializer(){let e=new at;return e.setSerdeContext(this.serdeContext),e}createDeserializer(){let e=new ot;return e.setSerdeContext(this.serdeContext),e}},at=class extends B{value;write(e,t){this.value=this.serialize(e,t)}serialize(e,t){let n=x.of(e);if(t==null)return n.isIdempotencyToken()?(0,ae.v4)():t;if(n.isBlobSchema())return typeof t==`string`?(this.serdeContext?.base64Decoder??rt.fromBase64)(t):t;if(n.isTimestampSchema())return et(typeof t==`number`||typeof t==`bigint`?new Date(Number(t)/1e3|0):t);if(typeof t==`function`||typeof t==`object`){let e=t;if(n.isListSchema()&&Array.isArray(e)){let t=!!n.getMergedTraits().sparse,r=[],i=0;for(let a of e){let e=this.serialize(n.getValueSchema(),a);(e!=null||t)&&(r[i++]=e)}return r}if(e instanceof Date)return et(e);let r={};if(n.isMapSchema()){let t=!!n.getMergedTraits().sparse;for(let i of Object.keys(e)){let a=this.serialize(n.getValueSchema(),e[i]);(a!=null||t)&&(r[i]=a)}}else if(n.isStructSchema()){for(let[t,i]of n.structIterator()){let n=this.serialize(i,e[t]);n!=null&&(r[t]=n)}if(n.isUnionSchema()&&Array.isArray(e.$unknown)){let[t,n]=e.$unknown;r[t]=n}else if(typeof e.__type==`string`)for(let[t,n]of Object.entries(e))t in r||(r[t]=this.serialize(15,n))}else if(n.isDocumentSchema())for(let t of Object.keys(e))r[t]=this.serialize(n.getValueSchema(),e[t]);else if(n.isBigDecimalSchema())return e;return r}return t}flush(){let e=Qe.serialize(this.value);return this.value=void 0,e}},ot=class extends B{read(e,t){let n=Qe.deserialize(t);return this.readValue(e,n)}readValue(e,t){let n=x.of(e);if(n.isTimestampSchema()){if(typeof t==`number`)return w(t);if(typeof t==`object`&&t.tag===1&&`value`in t)return w(t.value)}if(n.isBlobSchema())return typeof t==`string`?(this.serdeContext?.base64Decoder??rt.fromBase64)(t):t;if(t===void 0||typeof t==`boolean`||typeof t==`number`||typeof t==`string`||typeof t==`bigint`||typeof t==`symbol`)return t;if(typeof t==`object`){if(t===null)return null;if(`byteLength`in t||t instanceof Date||n.isDocumentSchema())return t;if(n.isListSchema()){let e=[],r=n.getValueSchema();for(let n of t){let t=this.readValue(r,n);e.push(t)}return e}let e={};if(n.isMapSchema()){let r=n.getValueSchema();for(let n of Object.keys(t))e[n]=this.readValue(r,t[n])}else if(n.isStructSchema()){let r=n.isUnionSchema(),i;r&&(i=new Set(Object.keys(t).filter(e=>e!==`__type`)));for(let[a,o]of n.structIterator())r&&i.delete(a),t[a]!=null&&(e[a]=this.readValue(o,t[a]));if(r&&i?.size===1&&Object.keys(e).length===0){let n=i.values().next().value;e.$unknown=[n,t[n]]}else if(typeof t.__type==`string`)for(let[n,r]of Object.entries(t))n in e||(e[n]=r)}else if(t instanceof A)return t;return e}else return t}}})),ct,lt,ut=n((()=>{F(),C(),ct=b(),st(),nt(),lt=class extends D{codec=new it;serializer=this.codec.createSerializer();deserializer=this.codec.createDeserializer();constructor({defaultNamespace:e,errorTypeRegistries:t}){super({defaultNamespace:e,errorTypeRegistries:t})}getShapeId(){return`smithy.protocols#rpcv2Cbor`}getPayloadCodec(){return this.codec}async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n);if(Object.assign(r.headers,{"content-type":this.getDefaultContentType(),"smithy-protocol":`rpc-v2-cbor`,accept:this.getDefaultContentType()}),y(e.input)===`unit`)delete r.body,delete r.headers[`content-type`];else{r.body||=(this.serializer.write(15,{}),this.serializer.flush());try{r.headers[`content-length`]=String(r.body.byteLength)}catch{}}let{service:i,operation:a}=(0,ct.getSmithyContext)(n),o=`/service/${i}/operation/${a}`;return r.path.endsWith(`/`)?r.path+=o.slice(1):r.path+=o,r}async deserializeResponse(e,t,n){return super.deserializeResponse(e,t,n)}async handleError(e,t,n,r,i){let a=tt(n,r)??`Unknown`,o={$metadata:i,$fault:n.statusCode<=500?`client`:`server`},s=this.options.defaultNamespace;a.includes(`#`)&&([s]=a.split(`#`));let c=this.compositeErrorRegistry,l=_.for(s);c.copyFrom(l);let u;try{u=c.getSchema(a)}catch{r.Message&&(r.message=r.Message);let e=_.for(`smithy.ts.sdk.synthetic.`+s);c.copyFrom(e);let t=c.getBaseException();if(t){let e=c.getErrorCtor(t);throw Object.assign(new e({name:a}),o,r)}throw Object.assign(Error(a),o,r)}let d=x.of(u),f=c.getErrorCtor(u),p=r.message??r.Message??`Unknown`,m=new f(p),h={};for(let[e,t]of d.structIterator())h[e]=this.deserializer.readValue(t,r[e]);throw Object.assign(m,o,{$fault:d.getMergedTraits().error,message:p},h)}getDefaultContentType(){return`application/cbor`}}})),dt=n((()=>{$e(),we(),nt(),ut(),st()})),ft,pt,mt=n((()=>{C(),ft=z(),pt=class{queryCompat;errorRegistry;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,t){let n=t.getMemberSchemas(),r=Object.values(n).find(e=>!!e.getMergedTraits().httpPayload);if(r)return r.getMergedTraits().mediaType||(r.isStringSchema()?`text/plain`:r.isBlobSchema()?`application/octet-stream`:e);if(!t.isUnitSchema()&&Object.values(n).find(e=>{let{httpQuery:t,httpQueryParams:n,httpHeader:r,httpLabel:i,httpPrefixHeaders:a}=e.getMergedTraits();return!t&&!n&&!r&&!i&&a===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,t,n,r,i,a){let o=e;e.includes(`#`)&&([,o]=e.split(`#`));let s={$metadata:i,$fault:n.statusCode<500?`client`:`server`};if(!this.errorRegistry)throw Error(`@aws-sdk/core/protocols - error handler not initialized.`);try{return{errorSchema:a?.(this.errorRegistry,o)??this.errorRegistry.getSchema(e),errorMetadata:s}}catch{r.message=r.message??r.Message??`UnknownError`;let e=this.errorRegistry,t=e.getBaseException();if(t){let n=e.getErrorCtor(t)??Error;throw this.decorateServiceException(Object.assign(new n({name:o}),s),r)}let n=r,i=n?.message??n?.Message??n?.Error?.Message??n?.Error?.message;throw this.decorateServiceException(Object.assign(Error(i),{name:o},s),r)}}compose(e,t,n){let r=n;t.includes(`#`)&&([r]=t.split(`#`));let i=_.for(r),a=_.for(`smithy.ts.sdk.synthetic.`+n);e.copyFrom(i),e.copyFrom(a),this.errorRegistry=e}decorateServiceException(e,t={}){if(this.queryCompat){let n=e.Message??t.Message,r=(0,ft.decorateServiceException)(e,t);n&&(r.message=n);let i=r.Error??{};i.Type=r.Error?.Type,i.Code=r.Error?.Code,i.Message=r.Error?.message??r.Error?.Message??n,r.Error=i;let a=r.$metadata.requestId;return a&&(r.RequestId=a),r}return(0,ft.decorateServiceException)(e,t)}setQueryCompatError(e,t){let n=t.headers?.[`x-amzn-query-error`];if(e!==void 0&&n!=null){let[t,r]=n.split(`;`),i=Object.keys(e),a={Code:t,Type:r};e.Code=t,e.Type=r;for(let t=0;tx.of(e).getMergedTraits().awsQueryError?.[0]===t)}}}})),ht,gt=n((()=>{dt(),C(),mt(),ht=class extends lt{awsQueryCompatible;mixin;constructor({defaultNamespace:e,errorTypeRegistries:t,awsQueryCompatible:n}){super({defaultNamespace:e,errorTypeRegistries:t}),this.awsQueryCompatible=!!n,this.mixin=new pt(this.awsQueryCompatible)}async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n);return this.awsQueryCompatible&&(r.headers[`x-amzn-query-mode`]=`true`),r}async handleError(e,t,n,r,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,n);let a=(()=>{let e=n.headers[`x-amzn-query-error`];return e&&this.awsQueryCompatible?e.split(`;`)[0]:tt(n,r)??`Unknown`})();this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);let{errorSchema:o,errorMetadata:s}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,r,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=x.of(o),l=r.message??r.Message??`UnknownError`,u=new((this.compositeErrorRegistry.getErrorCtor(o))??Error)(l),d={};for(let[e,t]of c.structIterator())r[e]!=null&&(d[e]=this.deserializer.readValue(t,r[e]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,d),this.mixin.decorateServiceException(Object.assign(u,s,{$fault:c.getMergedTraits().error,message:l},d),r)}}})),_t,vt,yt,bt=n((()=>{_t=e=>{if(e==null)return e;if(typeof e==`number`||typeof e==`bigint`){let t=Error(`Received number ${e} where a string was expected.`);return t.name=`Warning`,console.warn(t),String(e)}if(typeof e==`boolean`){let t=Error(`Received boolean ${e} where a string was expected.`);return t.name=`Warning`,console.warn(t),String(e)}return e},vt=e=>{if(e==null)return e;if(typeof e==`string`){let t=e.toLowerCase();if(e!==``&&t!==`false`&&t!==`true`){let t=Error(`Received string "${e}" where a boolean was expected.`);t.name=`Warning`,console.warn(t)}return e!==``&&t!==`false`}return e},yt=e=>{if(e==null)return e;if(typeof e==`string`){let t=Number(e);if(t.toString()!==e){let t=Error(`Received string "${e}" where a number was expected.`);return t.name=`Warning`,console.warn(t),e}return t}return e}})),Q,xt=n((()=>{Q=class{serdeContext;setSerdeContext(e){this.serdeContext=e}}})),St,Ct=n((()=>{St=class{from;to;keys;constructor(e,t){this.from=e,this.to=t;let n=Object.keys(this.from),r=new Set(n);r.delete(`__type`),this.keys=r}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){let e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}}));function wt(e,t,n){if(n?.source){let e=n.source;if(typeof t==`number`&&(t>2**53-1||t<-(2**53-1)||e!==String(t)))return e.includes(`.`)?new A(e,`bigDecimal`):BigInt(e)}return t}var Tt=n((()=>{L()})),Et,Dt,Ot,kt=n((()=>{Et=z(),Dt=p(),Ot=(e,t)=>(0,Et.collectBody)(e,t).then(e=>(t?.utf8Encoder??Dt.toUtf8)(e))})),At,jt,Mt,Nt,Pt,Ft=n((()=>{kt(),At=(e,t)=>Ot(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw t?.name===`SyntaxError`&&Object.defineProperty(t,`$responseBodyText`,{value:e}),t}return{}}),jt=async(e,t)=>{let n=await At(e,t);return n.message=n.message??n.Message,n},Mt=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),Nt=e=>{let t=e;return typeof t==`number`&&(t=t.toString()),t.indexOf(`,`)>=0&&(t=t.split(`,`)[0]),t.indexOf(`:`)>=0&&(t=t.split(`:`)[0]),t.indexOf(`#`)>=0&&(t=t.split(`#`)[1]),t},Pt=(e,t)=>{let n=Mt(e.headers,`x-amzn-errortype`);if(n!==void 0)return Nt(e.headers[n]);if(t&&typeof t==`object`){let e=Mt(t,`code`);if(e&&t[e]!==void 0)return Nt(t[e]);if(t.__type!==void 0)return Nt(t.__type)}}})),It,Lt,Rt=n((()=>{F(),C(),L(),It=h(),xt(),Ct(),Tt(),Ft(),Lt=class extends Q{settings;constructor(e){super(),this.settings=e}async read(e,t){return this._read(e,typeof t==`string`?JSON.parse(t,wt):await At(t,this.serdeContext))}readObject(e,t){return this._read(e,t)}_read(e,t){let n=typeof t==`object`&&!!t,r=x.of(e);if(n){if(r.isStructSchema()){let e=t,n=r.isUnionSchema(),i={},a,{jsonName:o}=this.settings;o&&(a={});let s;n&&(s=new St(e,i));for(let[t,c]of r.structIterator()){let r=t;o&&(r=c.getMergedTraits().jsonName??r,a[r]=t),n&&s.mark(r),e[r]!=null&&(i[t]=this._read(c,e[r]))}if(n)s.writeUnknown();else if(typeof e.__type==`string`)for(let[t,n]of Object.entries(e)){let e=o?a[t]??t:t;e in i||(i[e]=n)}return i}if(Array.isArray(t)&&r.isListSchema()){let e=r.getValueSchema(),n=[];for(let r of t)n.push(this._read(e,r));return n}if(r.isMapSchema()){let e=r.getValueSchema(),n={};for(let[r,i]of Object.entries(t))n[r]=this._read(e,i);return n}}if(r.isBlobSchema()&&typeof t==`string`)return(0,It.fromBase64)(t);let i=r.getMergedTraits().mediaType;if(r.isStringSchema()&&typeof t==`string`&&i)return i===`application/json`||i.endsWith(`+json`)?ne.from(t):t;if(r.isTimestampSchema()&&t!=null)switch(I(r,this.settings)){case 5:return g(t);case 6:return re(t);case 7:return S(t);default:return console.warn(`Missing timestamp format, parsing value with Date constructor:`,t),new Date(t)}if(r.isBigIntegerSchema()&&(typeof t==`number`||typeof t==`string`))return BigInt(t);if(r.isBigDecimalSchema()&&t!=null){if(t instanceof A)return t;let e=t;return e.type===`bigDecimal`&&`string`in e?new A(e.string,e.type):new A(String(t),`bigDecimal`)}if(r.isNumericSchema()&&typeof t==`string`){switch(t){case`Infinity`:return 1/0;case`-Infinity`:return-1/0;case`NaN`:return NaN}return t}if(r.isDocumentSchema())if(n){let e=Array.isArray(t)?[]:{};for(let[n,i]of Object.entries(t))i instanceof A?e[n]=i:e[n]=this._read(r,i);return e}else return structuredClone(t);return t}}})),zt,Bt,Vt=n((()=>{L(),zt=`Ν`,Bt=class{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw Error(`@aws-sdk/core/protocols - JsonReplacer already created.`);if(this.stage===2)throw Error(`@aws-sdk/core/protocols - JsonReplacer exhausted.`);return this.stage=1,(e,t)=>{if(t instanceof A){let e=`${zt+`nv`+ this.counter++}_`+t.string;return this.values.set(`"${e}"`,t.string),e}if(typeof t==`bigint`){let e=t.toString(),n=`${zt+`b`+ this.counter++}_`+e;return this.values.set(`"${n}"`,e),n}return t}}replaceInJson(e){if(this.stage===0)throw Error(`@aws-sdk/core/protocols - JsonReplacer not created yet.`);if(this.stage===2)throw Error(`@aws-sdk/core/protocols - JsonReplacer exhausted.`);if(this.stage=2,this.counter===0)return e;for(let[t,n]of this.values)e=e.replace(t,n);return e}}})),Ht,Ut,Wt=n((()=>{F(),C(),L(),Ht=h(),xt(),Vt(),Ut=class extends Q{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,t){this.rootSchema=x.of(e),this.buffer=this._write(this.rootSchema,t)}flush(){let{rootSchema:e,useReplacer:t}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!t)return JSON.stringify(this.buffer);let e=new Bt;return e.replaceInJson(JSON.stringify(this.buffer,e.createReplacer(),0))}return this.buffer}writeDiscriminatedDocument(e,t){this.write(e,t),typeof this.buffer==`object`&&(this.buffer.__type=x.of(e).getName(!0))}_write(e,t,n){let r=typeof t==`object`&&!!t,i=x.of(e);if(r){if(i.isStructSchema()){let e=t,n={},{jsonName:r}=this.settings,a;r&&(a={});let o=0;for(let[t,s]of i.structIterator()){let c=this._write(s,e[t],i);if(c!==void 0){let e=t;r&&(e=s.getMergedTraits().jsonName??t,a[t]=e),n[e]=c,o++}}if(i.isUnionSchema()&&o===0){let{$unknown:t}=e;if(Array.isArray(t)){let[e,r]=t;n[e]=this._write(15,r)}}else if(typeof e.__type==`string`)for(let[t,i]of Object.entries(e)){let e=r?a[t]??t:t;e in n||(n[e]=this._write(15,i))}return n}if(Array.isArray(t)&&i.isListSchema()){let e=i.getValueSchema(),n=[],r=!!i.getMergedTraits().sparse;for(let i of t)(r||i!=null)&&n.push(this._write(e,i));return n}if(i.isMapSchema()){let e=i.getValueSchema(),n={},r=!!i.getMergedTraits().sparse;for(let[i,a]of Object.entries(t))(r||a!=null)&&(n[i]=this._write(e,a));return n}if(t instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?t:(this.serdeContext?.base64Encoder??Ht.toBase64)(t);if(t instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(I(i,this.settings)){case 5:return t.toISOString().replace(`.000Z`,`Z`);case 6:return ie(t);case 7:return t.getTime()/1e3;default:return console.warn(`Missing timestamp format, using epoch seconds`,t),t.getTime()/1e3}t instanceof A&&(this.useReplacer=!0)}if(!(t===null&&n?.isStructSchema())){if(i.isStringSchema()){if(t===void 0&&i.isIdempotencyToken())return(0,ae.v4)();let e=i.getMergedTraits().mediaType;return t!=null&&e&&(e===`application/json`||e.endsWith(`+json`))?ne.from(t):t}if(typeof t==`number`&&i.isNumericSchema())return Math.abs(t)===1/0||isNaN(t)?String(t):t;if(typeof t==`string`&&i.isBlobSchema())return i===this.rootSchema?t:(this.serdeContext?.base64Encoder??Ht.toBase64)(t);if(typeof t==`bigint`&&(this.useReplacer=!0),i.isDocumentSchema())if(r){let e=Array.isArray(t)?[]:{};for(let[n,r]of Object.entries(t))r instanceof A?(this.useReplacer=!0,e[n]=r):e[n]=this._write(i,r);return e}else return structuredClone(t);return t}}}})),Gt,Kt=n((()=>{xt(),Rt(),Wt(),Gt=class extends Q{settings;constructor(e){super(),this.settings=e}createSerializer(){let e=new Ut(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){let e=new Lt(this.settings);return e.setSerdeContext(this.serdeContext),e}}})),qt,Jt=n((()=>{F(),C(),mt(),Kt(),Ft(),qt=class extends D{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:r,jsonCodec:i}){super({defaultNamespace:e,errorTypeRegistries:t}),this.serviceTarget=n,this.codec=i??new Gt({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!r,this.mixin=new pt(this.awsQueryCompatible)}async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n);return r.path.endsWith(`/`)||(r.path+=`/`),r.headers[`content-type`]=`application/x-amz-json-${this.getJsonRpcVersion()}`,r.headers[`x-amz-target`]=`${this.serviceTarget}.${e.name}`,this.awsQueryCompatible&&(r.headers[`x-amzn-query-mode`]=`true`),(y(e.input)===`unit`||!r.body)&&(r.body=`{}`),r}getPayloadCodec(){return this.codec}async handleError(e,t,n,r,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,n);let a=Pt(n,r)??`Unknown`;this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);let{errorSchema:o,errorMetadata:s}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,r,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=x.of(o),l=r.message??r.Message??`UnknownError`,u=new((this.compositeErrorRegistry.getErrorCtor(o))??Error)(l),d={},f=this.codec.createDeserializer();for(let[e,t]of c.structIterator())r[e]!=null&&(d[e]=f.readObject(t,r[e]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,d),this.mixin.decorateServiceException(Object.assign(u,s,{$fault:c.getMergedTraits().error,message:l},d),r)}}})),Yt,Xt=n((()=>{Jt(),Yt=class extends qt{constructor({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:r,jsonCodec:i}){super({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:r,jsonCodec:i})}getShapeId(){return`aws.protocols#awsJson1_0`}getJsonRpcVersion(){return`1.0`}getDefaultContentType(){return`application/x-amz-json-1.0`}}})),Zt,Qt=n((()=>{Jt(),Zt=class extends qt{constructor({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:r,jsonCodec:i}){super({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:r,jsonCodec:i})}getShapeId(){return`aws.protocols#awsJson1_1`}getJsonRpcVersion(){return`1.1`}getDefaultContentType(){return`application/x-amz-json-1.1`}}})),$t,en=n((()=>{F(),C(),mt(),Kt(),Ft(),$t=class extends N{serializer;deserializer;codec;mixin=new pt;constructor({defaultNamespace:e,errorTypeRegistries:t}){super({defaultNamespace:e,errorTypeRegistries:t});let n={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new Gt(n),this.serializer=new R(this.codec.createSerializer(),n),this.deserializer=new j(this.codec.createDeserializer(),n)}getShapeId(){return`aws.protocols#restJson1`}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e),super.setSerdeContext(e)}async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n),i=x.of(e.input);if(!r.headers[`content-type`]){let e=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);e&&(r.headers[`content-type`]=e)}return r.body==null&&r.headers[`content-type`]===this.getDefaultContentType()&&(r.body=`{}`),r}async deserializeResponse(e,t,n){let r=await super.deserializeResponse(e,t,n),i=x.of(e.output);for(let[e,t]of i.structIterator())t.getMemberTraits().httpPayload&&!(e in r)&&(r[e]=null);return r}async handleError(e,t,n,r,i){let a=Pt(n,r)??`Unknown`;this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);let{errorSchema:o,errorMetadata:s}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,r,i),c=x.of(o),l=r.message??r.Message??`UnknownError`,u=new((this.compositeErrorRegistry.getErrorCtor(o))??Error)(l);await this.deserializeHttpMessage(o,t,n,r);let d={},f=this.codec.createDeserializer();for(let[e,t]of c.structIterator()){let n=t.getMergedTraits().jsonName??e;d[e]=f.readObject(t,r[n])}throw this.mixin.decorateServiceException(Object.assign(u,s,{$fault:c.getMergedTraits().error,message:l},d),r)}getDefaultContentType(){return`application/json`}}})),tn,nn,rn=n((()=>{tn=z(),nn=e=>{if(e!=null)return typeof e==`object`&&`__type`in e&&delete e.__type,(0,tn.expectUnion)(e)}})),an=a(((e,t)=>{(()=>{var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})}},n={};e.r(n),e.d(n,{XMLBuilder:()=>Le,XMLParser:()=>we,XMLValidator:()=>Re});let r=RegExp(`^[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`);function i(e,t){let n=[],r=t.exec(e);for(;r;){let i=[];i.startIndex=t.lastIndex-r[0].length;let a=r.length;for(let e=0;e`&&e[a]!==` `&&e[a]!==` `&&e[a]!==` -`&&e[a]!==`\r`;a++)c+=e[a];if(c=c.trim(),c[c.length-1]===`/`&&(c=c.substring(0,c.length-1),a--),!y(c)){let t;return t=c.trim().length===0?`Invalid space after '<'.`:`Tag '`+c+`' is an invalid name.`,_(`InvalidTag`,t,b(e,a))}let l=p(e,a);if(!1===l)return _(`InvalidAttr`,`Attributes for '`+c+`' have open quote.`,b(e,a));let m=l.value;if(a=l.index,m[m.length-1]===`/`){let n=a-m.length;m=m.substring(0,m.length-1);let i=h(m,t);if(!0!==i)return _(i.err.code,i.err.msg,b(e,n+i.err.line));r=!0}else if(s){if(!l.tagClosed)return _(`InvalidTag`,`Closing tag '`+c+`' doesn't have proper closing.`,b(e,a));if(m.trim().length>0)return _(`InvalidTag`,`Closing tag '`+c+`' can't have attributes or invalid starting.`,b(e,o));if(n.length===0)return _(`InvalidTag`,`Closing tag '`+c+`' has not been opened.`,b(e,o));{let t=n.pop();if(c!==t.tagName){let n=b(e,t.tagStartPos);return _(`InvalidTag`,`Expected closing tag '`+t.tagName+`' (opened in line `+n.line+`, col `+n.col+`) instead of closing tag '`+c+`'.`,b(e,o))}n.length==0&&(i=!0)}}else{let s=h(m,t);if(!0!==s)return _(s.err.code,s.err.msg,b(e,a-m.length+s.err.line));if(!0===i)return _(`InvalidXml`,`Multiple possible root nodes found.`,b(e,a));t.unpairedTags.indexOf(c)!==-1||n.push({tagName:c,tagStartPos:o}),r=!0}for(a++;a0)||_(`InvalidXml`,`Invalid '`+JSON.stringify(n.map(e=>e.tagName),null,4).replace(/\r?\n/g,``)+`' found.`,{line:1,col:1}):_(`InvalidXml`,`Start tag expected.`,1)}function u(e){return e===` `||e===` `||e===` -`||e===`\r`}function d(e,t){let n=t;for(;t5&&r===`xml`)return _(`InvalidXml`,`XML declaration allowed only at the start of the document.`,b(e,t));if(e[t]==`?`&&e[t+1]==`>`){t++;break}continue}return t}function f(e,t){if(e.length>t+5&&e[t+1]===`-`&&e[t+2]===`-`){for(t+=3;t`){t+=2;break}}else if(e.length>t+8&&e[t+1]===`D`&&e[t+2]===`O`&&e[t+3]===`C`&&e[t+4]===`T`&&e[t+5]===`Y`&&e[t+6]===`P`&&e[t+7]===`E`){let n=1;for(t+=8;t`&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]===`[`&&e[t+2]===`C`&&e[t+3]===`D`&&e[t+4]===`A`&&e[t+5]===`T`&&e[t+6]===`A`&&e[t+7]===`[`){for(t+=8;t`){t+=2;break}}return t}function p(e,t){let n=``,r=``,i=!1;for(;t`&&r===``){i=!0;break}n+=e[t]}return r===``&&{value:n,index:t,tagClosed:i}}let m=RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,`g`);function h(e,t){let n=i(e,m),r={};for(let e=0;eo.includes(e)?`__`+e:e,C={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(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:S};function w(e,t){if(typeof e!=`string`)return;let n=e.toLowerCase();if(o.some(e=>n===e.toLowerCase())||s.some(e=>n===e.toLowerCase()))throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function T(e){return typeof e==`boolean`?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof e==`object`&&e?{enabled:!1!==e.enabled,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??10),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1e3),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??100),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null}:T(!0)}let E=function(e){let t=Object.assign({},C,e),n=[{value:t.attributeNamePrefix,name:`attributeNamePrefix`},{value:t.attributesGroupName,name:`attributesGroupName`},{value:t.textNodeName,name:`textNodeName`},{value:t.cdataPropName,name:`cdataPropName`},{value:t.commentPropName,name:`commentPropName`}];for(let{value:e,name:t}of n)e&&w(e,t);return t.onDangerousProperty===null&&(t.onDangerousProperty=S),t.processEntities=T(t.processEntities),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),t},D;D=typeof Symbol==`function`?Symbol(`XML Node Metadata`):`@@xmlMetadata`;class O{constructor(e){this.tagname=e,this.child=[],this[`:@`]=Object.create(null)}add(e,t){e===`__proto__`&&(e=`#__proto__`),this.child.push({[e]:t})}addChild(e,t){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}),t!==void 0&&(this.child[this.child.length-1][D]={startIndex:t})}static getMetaDataSymbol(){return D}}class ee{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){let n=Object.create(null),r=0;if(e[t+3]!==`O`||e[t+4]!==`C`||e[t+5]!==`T`||e[t+6]!==`Y`||e[t+7]!==`P`||e[t+8]!==`E`)throw Error(`Invalid Tag instead of DOCTYPE`);{t+=9;let i=1,a=!1,o=!1,s=``;for(;t`){if(o?e[t-1]===`-`&&e[t-2]===`-`&&(o=!1,i--):i--,i===0)break}else e[t]===`[`?a=!0:s+=e[t];else{if(a&&A(e,`!ENTITY`,t)){let i,a;if(t+=7,[i,a,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),a.indexOf(`&`)===-1){if(!1!==this.options.enabled&&this.options.maxEntityCount!=null&&r>=this.options.maxEntityCount)throw Error(`Entity count (${r+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);let e=i.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);n[i]={regx:RegExp(`&${e};`,`g`),val:a},r++}}else if(a&&A(e,`!ELEMENT`,t)){t+=8;let{index:n}=this.readElementExp(e,t+1);t=n}else if(a&&A(e,`!ATTLIST`,t))t+=8;else if(a&&A(e,`!NOTATION`,t)){t+=9;let{index:n}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=n}else{if(!A(e,`!--`,t))throw Error(`Invalid DOCTYPE`);o=!0}i++,s=``}if(i!==0)throw Error(`Unclosed DOCTYPE`)}return{entities:n,i:t}}readEntityExp(e,t){let n=t=k(e,t);for(;tthis.options.maxEntitySize)throw Error(`Entity "${r}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[r,i,--t]}readNotationExp(e,t){let n=t=k(e,t);for(;t{for(;t0&&(this.path[this.path.length-1].values=void 0);let r=this.path.length;this.siblingStacks[r]||(this.siblingStacks[r]=new Map);let i=this.siblingStacks[r],a=n?`${n}:${e}`:e,o=i.get(a)||0,s=0;for(let e of i.values())s+=e;i.set(a,o+1);let c={tag:e,position:s,counter:o};n!=null&&(c.namespace=n),t!=null&&(c.values=t),this.path.push(c)}pop(){if(this.path.length===0)return;let e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){let t=this.path[this.path.length-1];e!=null&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let t=this.path[this.path.length-1];return t.values!==void 0&&e in t.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){let n=e||this.separator;return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n)}toArray(){return this.path.map(e=>e.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(e){let t=e.segments;return t.length!==0&&(e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t))}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t=0&&t>=0;){let r=e[n];if(r.type===`deep-wildcard`){if(n--,n<0)return!0;let r=e[n],i=!1;for(let e=t;e>=0;e--){let a=e===this.path.length-1;if(this._matchSegment(r,this.path[e],a)){t=e-1,n--,i=!0;break}}if(!i)return!1}else{let e=t===this.path.length-1;if(!this._matchSegment(r,this.path[t],e))return!1;t--,n--}}return n<0}_matchSegment(e,t,n){if(e.tag!==`*`&&e.tag!==t.tag||e.namespace!==void 0&&e.namespace!==`*`&&e.namespace!==t.namespace)return!1;if(e.attrName!==void 0){if(!n||!t.values||!(e.attrName in t.values))return!1;if(e.attrValue!==void 0){let n=t.values[e.attrName];if(String(n)!==String(e.attrValue))return!1}}if(e.position!==void 0){if(!n)return!1;let r=t.counter??0;if(e.position===`first`&&r!==0||e.position===`odd`&&r%2!=1||e.position===`even`&&r%2!=0||e.position===`nth`&&r!==e.positionValue)return!1}return!0}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>new Map(e))}readOnly(){return new Proxy(this,{get(e,t,n){if(I.has(t))return()=>{throw TypeError(`Cannot call '${t}' on a read-only Matcher. Obtain a writable instance to mutate state.`)};let r=Reflect.get(e,t,n);return t===`path`||t===`siblingStacks`?Object.freeze(Array.isArray(r)?r.map(e=>e instanceof Map?Object.freeze(new Map(e)):Object.freeze({...e})):r):typeof r==`function`?r.bind(e):r},set(e,t){throw TypeError(`Cannot set property '${String(t)}' on a read-only Matcher.`)},deleteProperty(e,t){throw TypeError(`Cannot delete property '${String(t)}' from a read-only Matcher.`)}})}}class R{constructor(e,t={}){this.pattern=e,this.separator=t.separator||`.`,this.segments=this._parse(e),this._hasDeepWildcard=this.segments.some(e=>e.type===`deep-wildcard`),this._hasAttributeCondition=this.segments.some(e=>e.attrName!==void 0),this._hasPositionSelector=this.segments.some(e=>e.position!==void 0)}_parse(e){let t=[],n=0,r=``;for(;n0){let n=e.substring(0,t);if(n!==`xmlns`)return n}}class B{constructor(e){var t;if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:`'`},gt:{regex:/&(gt|#62|#x3E);/g,val:`>`},lt:{regex:/&(lt|#60|#x3C);/g,val:`<`},quot:{regex:/&(quot|#34|#x22);/g,val:`"`}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:`&`},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:` `},cent:{regex:/&(cent|#162);/g,val:`¢`},pound:{regex:/&(pound|#163);/g,val:`£`},yen:{regex:/&(yen|#165);/g,val:`¥`},euro:{regex:/&(euro|#8364);/g,val:`€`},copyright:{regex:/&(copy|#169);/g,val:`©`},reg:{regex:/&(reg|#174);/g,val:`®`},inr:{regex:/&(inr|#8377);/g,val:`₹`},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>me(t,10,`&#`)},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>me(t,16,`&#x`)}},this.addExternalEntities=ne,this.parseXml=se,this.parseTextData=re,this.resolveNameSpace=ie,this.buildAttributesMap=oe,this.isItStopNode=de,this.replaceEntitiesValue=le,this.readStopNodeData=H,this.saveTextToParentTag=ue,this.addChild=ce,this.ignoreAttributesFn=typeof(t=this.options.ignoreAttributes)==`function`?t:Array.isArray(t)?e=>{for(let n of t)if(typeof n==`string`&&e===n||n instanceof RegExp&&n.test(e))return!0}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0,this.matcher=new L,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodeExpressions=[];for(let e=0;e0)){o||(e=this.replaceEntitiesValue(e,t,n));let r=this.options.jPath?n.toString():n,s=this.options.tagValueProcessor(t,e,r,i,a);return s==null?e:typeof s!=typeof e||s!==e?s:this.options.trimValues||e.trim()===e?pe(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function ie(e){if(this.options.removeNSPrefix){let t=e.split(`:`),n=e.charAt(0)===`/`?`/`:``;if(t[0]===`xmlns`)return``;t.length===2&&(e=n+t[1])}return e}let ae=RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,`gm`);function oe(e,t,n){if(!0!==this.options.ignoreAttributes&&typeof e==`string`){let r=i(e,ae),a=r.length,o={},s={};for(let e=0;e0&&typeof t==`object`&&t.updateCurrent&&t.updateCurrent(s);for(let e=0;e`,a,`Closing Tag is not closed.`),i=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){let e=i.indexOf(`:`);e!==-1&&(i=i.substr(e+1))}i=he(this.options.transformTagName,i,``,this.options).tagName,n&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher));let o=this.matcher.getCurrentTag();if(i&&this.options.unpairedTags.indexOf(i)!==-1)throw Error(`Unpaired tag can not be used as closing tag: `);o&&this.options.unpairedTags.indexOf(o)!==-1&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,n=this.tagsNodeStack.pop(),r=``,a=t}else if(e[a+1]===`?`){let t=fe(e,a,!1,`?>`);if(!t)throw Error(`Pi Tag is not closed.`);if(r=this.saveTextToParentTag(r,n,this.readonlyMatcher),!(this.options.ignoreDeclaration&&t.tagName===`?xml`||this.options.ignorePiTags)){let e=new O(t.tagName);e.add(this.options.textNodeName,``),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[`:@`]=this.buildAttributesMap(t.tagExp,this.matcher,t.tagName)),this.addChild(n,e,this.readonlyMatcher,a)}a=t.closeIndex+1}else if(e.substr(a+1,3)===`!--`){let t=V(e,`-->`,a+4,`Comment is not closed.`);if(this.options.commentPropName){let i=e.substring(a+4,t-2);r=this.saveTextToParentTag(r,n,this.readonlyMatcher),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}a=t}else if(e.substr(a+1,2)===`!D`){let t=i.readDocType(e,a);this.docTypeEntities=t.entities,a=t.i}else if(e.substr(a+1,2)===`![`){let t=V(e,`]]>`,a,`CDATA is not closed.`)-2,i=e.substring(a+9,t);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let o=this.parseTextData(i,n.tagname,this.readonlyMatcher,!0,!1,!0,!0);o??=``,this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,o),a=t+2}else{let i=fe(e,a,this.options.removeNSPrefix);if(!i){let t=e.substring(Math.max(0,a-50),Math.min(e.length,a+50));throw Error(`readTagExp returned undefined at position ${a}. Context: "${t}"`)}let o=i.tagName,s=i.rawTagName,c=i.tagExp,l=i.attrExpPresent,u=i.closeIndex;if({tagName:o,tagExp:c}=he(this.options.transformTagName,o,c,this.options),this.options.strictReservedNames&&(o===this.options.commentPropName||o===this.options.cdataPropName||o===this.options.textNodeName||o===this.options.attributesGroupName))throw Error(`Invalid tag name: ${o}`);n&&r&&n.tagname!==`!xml`&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher,!1));let d=n;d&&this.options.unpairedTags.indexOf(d.tagname)!==-1&&(n=this.tagsNodeStack.pop(),this.matcher.pop());let f=!1;c.length>0&&c.lastIndexOf(`/`)===c.length-1&&(f=!0,o[o.length-1]===`/`?(o=o.substr(0,o.length-1),c=o):c=c.substr(0,c.length-1),l=o!==c);let p,m=null;p=z(s),o!==t.tagname&&this.matcher.push(o,{},p),o!==c&&l&&(m=this.buildAttributesMap(c,this.matcher,o),m&&te(m,this.options)),o!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));let h=a;if(this.isCurrentNodeStopNode){let t=``;if(f)a=i.closeIndex;else if(this.options.unpairedTags.indexOf(o)!==-1)a=i.closeIndex;else{let n=this.readStopNodeData(e,s,u+1);if(!n)throw Error(`Unexpected end of ${s}`);a=n.i,t=n.tagContent}let r=new O(o);m&&(r[`:@`]=m),r.add(this.options.textNodeName,t),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(n,r,this.readonlyMatcher,h)}else{if(f){({tagName:o,tagExp:c}=he(this.options.transformTagName,o,c,this.options));let e=new O(o);m&&(e[`:@`]=m),this.addChild(n,e,this.readonlyMatcher,h),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(this.options.unpairedTags.indexOf(o)!==-1){let e=new O(o);m&&(e[`:@`]=m),this.addChild(n,e,this.readonlyMatcher,h),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=i.closeIndex;continue}{let e=new O(o);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);this.tagsNodeStack.push(n),m&&(e[`:@`]=m),this.addChild(n,e,this.readonlyMatcher,h),n=e}}r=``,a=u}}else r+=e[a];return t.child};function ce(e,t,n,r){this.options.captureMetaData||(r=void 0);let i=this.options.jPath?n.toString():n,a=this.options.updateTag(t.tagname,i,t[`:@`]);!1===a||(typeof a==`string`&&(t.tagname=a),e.addChild(t,r))}function le(e,t,n){let r=this.options.processEntities;if(!r||!r.enabled)return e;if(r.allowedTags){let i=this.options.jPath?n.toString():n;if(!(Array.isArray(r.allowedTags)?r.allowedTags.includes(t):r.allowedTags(t,i)))return e}if(r.tagFilter){let i=this.options.jPath?n.toString():n;if(!r.tagFilter(t,i))return e}for(let t of Object.keys(this.docTypeEntities)){let n=this.docTypeEntities[t],i=e.match(n.regx);if(i){if(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);let t=e.length;if(e=e.replace(n.regx,n.val),r.maxExpandedLength&&(this.currentExpandedLength+=e.length-t,this.currentExpandedLength>r.maxExpandedLength))throw Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${r.maxExpandedLength}`)}}for(let t of Object.keys(this.lastEntities)){let n=this.lastEntities[t],i=e.match(n.regex);if(i&&(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions))throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);e=e.replace(n.regex,n.val)}if(e.indexOf(`&`)===-1)return e;if(this.options.htmlEntities)for(let t of Object.keys(this.htmlEntities)){let n=this.htmlEntities[t],i=e.match(n.regex);if(i&&(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions))throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);e=e.replace(n.regex,n.val)}return e.replace(this.ampEntity.regex,this.ampEntity.val)}function ue(e,t,n,r){return e&&=(r===void 0&&(r=t.child.length===0),(e=this.parseTextData(e,t.tagname,n,!1,!!t[`:@`]&&Object.keys(t[`:@`]).length!==0,r))!==void 0&&e!==``&&t.add(this.options.textNodeName,e),``),e}function de(e,t){if(!e||e.length===0)return!1;for(let n=0;n`){let i=function(e,t,n=`>`){let r,i=``;for(let a=t;a`,n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,i===0))return{tagContent:e.substring(r,n),i:a};n=a}else if(e[n+1]===`?`)n=V(e,`?>`,n+1,`StopNode is not closed.`);else if(e.substr(n+1,3)===`!--`)n=V(e,`-->`,n+3,`StopNode is not closed.`);else if(e.substr(n+1,2)===`![`)n=V(e,`]]>`,n,`StopNode is not closed.`)-2;else{let r=fe(e,n,`>`);r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!==`/`&&i++,n=r.closeIndex)}}function pe(e,t,n){if(t&&typeof e==`string`){let t=e.trim();return t===`true`||t!==`false`&&function(e,t={}){if(t=Object.assign({},P,t),!e||typeof e!=`string`)return e;let n=e.trim();if(t.skipLike!==void 0&&t.skipLike.test(n))return e;if(e===`0`)return 0;if(t.hex&&M.test(n))return function(e){if(parseInt)return parseInt(e,16);if(Number.parseInt)return Number.parseInt(e,16);if(window&&window.parseInt)return window.parseInt(e,16);throw Error(`parseInt, Number.parseInt, window.parseInt are not supported`)}(n);if(isFinite(n)){if(n.includes(`e`)||n.includes(`E`))return function(e,t,n){if(!n.eNotation)return e;let r=t.match(F);if(r){let i=r[1]||``,a=r[3].indexOf(`e`)===-1?`E`:`e`,o=r[2],s=i?e[o.length+1]===a:e[o.length]===a;return o.length>1&&s?e:(o.length!==1||!r[3].startsWith(`.${a}`)&&r[3][0]!==a)&&o.length>0?n.leadingZeros&&!s?(t=(r[1]||``)+r[3],Number(t)):e:Number(t)}return e}(e,n,t);{let i=N.exec(n);if(i){let a=i[1]||``,o=i[2],s=((r=i[3])&&r.indexOf(`.`)!==-1&&((r=r.replace(/0+$/,``))===`.`?r=`0`:r[0]===`.`?r=`0`+r:r[r.length-1]===`.`&&(r=r.substring(0,r.length-1))),r),c=a?e[o.length+1]===`.`:e[o.length]===`.`;if(!t.leadingZeros&&(o.length>1||o.length===1&&!c))return e;{let r=Number(n),i=String(r);if(r===0)return r;if(i.search(/[eE]/)!==-1)return t.eNotation?r:e;if(n.indexOf(`.`)!==-1)return i===`0`||i===s||i===`${a}${s}`?r:e;let c=o?s:n;return o?c===i||a+c===i?r:e:c===i||c===a+i?r:e}}return e}}var r;return function(e,t,n){let r=t===1/0;switch(n.infinity.toLowerCase()){case`null`:return null;case`infinity`:return t;case`string`:return r?`Infinity`:`-Infinity`;default:return e}}(e,Number(n),t)}(e,n)}return e===void 0?``:e}function me(e,t,n){let r=Number.parseInt(e,t);return r>=0&&r<=1114111?String.fromCodePoint(r):n+e+`;`}function he(e,t,n,r){if(e){let r=e(t);n===t&&(n=r),t=r}return{tagName:t=ge(t,r),tagExp:n}}function ge(e,t){if(s.includes(e))throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return o.includes(e)?t.onDangerousProperty(e):e}let _e=O.getMetaDataSymbol();function ve(e,t){if(!e||typeof e!=`object`)return{};if(!t)return e;let n={};for(let r in e)r.startsWith(t)?n[r.substring(t.length)]=e[r]:n[r]=e[r];return n}function ye(e,t,n,r){return be(e,t,n,r)}function be(e,t,n,r){let i,a={};for(let o=0;o0&&(a[t.textNodeName]=i):i!==void 0&&(a[t.textNodeName]=i),a}function xe(e){let t=Object.keys(e);for(let e=0;e0&&(n=` -`);let r=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let e=0;et.maxNestedTags)throw Error(`Maximum nested tags exceeded`);if(!Array.isArray(e)){if(e!=null){let n=e.toString();return n=Me(n,t),n}return``}for(let s=0;s`,o=!1,r.pop();continue}if(l===t.commentPropName){a+=n+`\x3c!--${c[l][0][t.textNodeName]}--\x3e`,o=!0,r.pop();continue}if(l[0]===`?`){let e=Ae(c[`:@`],t,d),i=l===`?xml`?``:n,s=c[l][0][t.textNodeName];s=s.length===0?``:` `+s,a+=i+`<${l}${s}${e}?>`,o=!0,r.pop();continue}let f=n;f!==``&&(f+=t.indentBy);let p=n+`<${l}${Ae(c[`:@`],t,d)}`,m;m=d?De(c[l],t):U(c[l],t,f,r,i),t.unpairedTags.indexOf(l)===-1?m&&m.length!==0||!t.suppressEmptyNode?m&&m.endsWith(`>`)?a+=p+`>${m}${n}`:(a+=p+`>`,m&&n!==``&&(m.includes(`/>`)||m.includes(``):a+=p+`/>`:t.suppressUnpairedNode?a+=p+`>`:a+=p+`/>`,o=!0,r.pop()}return a}function Ee(e,t){if(!e||t.ignoreAttributes)return null;let n={},r=!1;for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i.startsWith(t.attributeNamePrefix)?i.substr(t.attributeNamePrefix.length):i]=e[i],r=!0);return r?n:null}function De(e,t){if(!Array.isArray(e))return e==null?``:e.toString();let n=``;for(let r=0;r${r}`:n+=`<${a}${e}/>`}}}return n}function Oe(e,t){let n=``;if(e&&!t.ignoreAttributes)for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=e[r];!0===i&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function ke(e){let t=Object.keys(e);for(let n=0;n0&&t.processEntities)for(let n=0;n`,`g`),val:`>`},{regex:RegExp(`<`,`g`),val:`<`},{regex:RegExp(`'`,`g`),val:`'`},{regex:RegExp(`"`,`g`),val:`"`}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function W(e){if(this.options=Object.assign({},Ne,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e{for(let n of t)if(typeof n==`string`&&e===n||n instanceof RegExp&&n.test(e))return!0}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Ie),this.processTextOrObjNode=Pe,this.options.format?(this.indentate=Fe,this.tagEndChar=`> -`,this.newLine=` -`):(this.indentate=function(){return``},this.tagEndChar=`>`,this.newLine=``)}function Pe(e,t,n,r){let i=this.extractAttributes(e);if(r.push(t,i),this.checkStopNode(r)){let i=this.buildRawContent(e),a=this.buildAttributesForStopNode(e);return r.pop(),this.buildObjectNode(i,t,a,n)}let a=this.j2x(e,n+1,r);return r.pop(),e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,a.attrStr,n,r):this.buildObjectNode(a.val,t,a.attrStr,n)}function Fe(e){return this.options.indentBy.repeat(e)}function Ie(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}W.prototype.build=function(e){if(this.options.preserveOrder)return Te(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});let t=new L;return this.j2x(e,0,t).val}},W.prototype.j2x=function(e,t,n){let r=``,i=``;if(this.options.maxNestedTags&&n.getDepth()>=this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);let a=this.options.jPath?n.toString():n,o=this.checkStopNode(n);for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(e[s]===void 0)this.isAttribute(s)&&(i+=``);else if(e[s]===null)this.isAttribute(s)||s===this.options.cdataPropName?i+=``:s[0]===`?`?i+=this.indentate(t)+`<`+s+`?`+this.tagEndChar:i+=this.indentate(t)+`<`+s+`/`+this.tagEndChar;else if(e[s]instanceof Date)i+=this.buildTextValNode(e[s],s,``,t,n);else if(typeof e[s]!=`object`){let c=this.isAttribute(s);if(c&&!this.ignoreAttributesFn(c,a))r+=this.buildAttrPairStr(c,``+e[s],o);else if(!c)if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,``+e[s]);i+=this.replaceEntitiesValue(t)}else{n.push(s);let r=this.checkStopNode(n);if(n.pop(),r){let n=``+e[s];i+=n===``?this.indentate(t)+`<`+s+this.closeTag(s)+this.tagEndChar:this.indentate(t)+`<`+s+`>`+n+``+e+`${e}`;else if(typeof e==`object`&&e){let r=this.buildRawContent(e),i=this.buildAttributesForStopNode(e);t+=r===``?`<${n}${i}/>`:`<${n}${i}>${r}`}}else if(typeof r==`object`&&r){let e=this.buildRawContent(r),i=this.buildAttributesForStopNode(r);t+=e===``?`<${n}${i}/>`:`<${n}${i}>${e}`}else t+=`<${n}>${r}`}return t},W.prototype.buildAttributesForStopNode=function(e){if(!e||typeof e!=`object`)return``;let t=``;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){let n=e[this.options.attributesGroupName];for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;let r=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,i=n[e];!0===i&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+i+`"`}}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=this.isAttribute(n);if(r){let i=e[n];!0===i&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+i+`"`}}return t},W.prototype.buildObjectNode=function(e,t,n,r){if(e===``)return t[0]===`?`?this.indentate(r)+`<`+t+n+`?`+this.tagEndChar:this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar;{let i=``+e+i}},W.prototype.closeTag=function(e){let t=``;return this.options.unpairedTags.indexOf(e)===-1?t=this.options.suppressEmptyNode?`/`:`>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),i===``?this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+`<`+t+n+`>`+i+`0&&this.options.processEntities)for(let t=0;t{Object.defineProperty(e,`__esModule`,{value:!0}),e.parseXML=n;let t=new(an()).XMLParser({attributeNamePrefix:``,processEntities:{enabled:!0,maxTotalExpansions:1/0},htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>t.trim()===``&&t.includes(` -`)?``:void 0,maxNestedTags:1/0});t.addEntity(`#xD`,`\r`),t.addEntity(`#10`,` -`);function n(e){return t.parse(e,!0)}})),sn=a((e=>{var t=on();let n=/[&<>"]/g,r={"&":`&`,"<":`<`,">":`>`,'"':`"`};function i(e){return e.replace(n,e=>r[e])}let a=/[&"'<>\r\n\u0085\u2028]/g,o={"&":`&`,'"':`"`,"'":`'`,"<":`<`,">":`>`,"\r":` `,"\n":` `,"…":`…`,"\u2028":`
`};function s(e){return e.replace(a,e=>o[e])}var c=class{value;constructor(e){this.value=e}toString(){return s(``+this.value)}},l=class e{name;children;attributes={};static of(t,n,r){let i=new e(t);return n!==void 0&&i.addChildNode(new c(n)),r!==void 0&&i.withName(r),i}constructor(e,t=[]){this.name=e,this.children=t}withName(e){return this.name=e,this}addAttribute(e,t){return this.attributes[e]=t,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,t){return t!=null&&(this.attributes[e]=t),this}cc(t,n,r=n){if(t[n]!=null){let i=e.of(n,t[n]).withName(r);this.c(i)}}l(e,t,n,r){e[t]!=null&&r().map(e=>{e.withName(n),this.c(e)})}lc(t,n,r,i){if(t[n]!=null){let t=i(),n=new e(r);t.map(e=>{n.c(e)}),this.c(n)}}toString(){let e=!!this.children.length,t=`<${this.name}`,n=this.attributes;for(let e of Object.keys(n)){let r=n[e];r!=null&&(t+=` ${e}="${i(``+r)}"`)}return t+=e?`>${this.children.map(e=>e.toString()).join(``)}`:`/>`}};e.parseXML=t.parseXML,e.XmlNode=l,e.XmlText=c})),cn,ln,un,dn,fn=n((()=>{cn=sn(),F(),C(),ln=z(),un=p(),xt(),Ct(),dn=class extends Q{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new T(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,n){let r=x.of(e),i=r.getMemberSchemas();if(r.isStructSchema()&&r.isMemberSchema()&&Object.values(i).find(e=>!!e.getMemberTraits().eventPayload)){let e={},n=Object.keys(i)[0];return i[n].isBlobSchema()?e[n]=t:e[n]=this.read(i[n],t),e}let a=(this.serdeContext?.utf8Encoder??un.toUtf8)(t),o=this.parseXml(a);return this.readSchema(e,n?o[n]:o)}readSchema(e,t){let n=x.of(e);if(n.isUnitSchema())return;let r=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(t))return this.readSchema(n,[t]);if(t==null)return t;if(typeof t==`object`){let e=!!r.xmlFlattened;if(n.isListSchema()){let r=n.getValueSchema(),i=[],a=r.getMergedTraits().xmlName??`member`,o=e?t:(t[0]??t)[a];if(o==null)return i;let s=Array.isArray(o)?o:[o];for(let e of s)i.push(this.readSchema(r,e));return i}let i={};if(n.isMapSchema()){let r=n.getKeySchema(),a=n.getValueSchema(),o;o=e?Array.isArray(t)?t:[t]:Array.isArray(t.entry)?t.entry:[t.entry];let s=r.getMergedTraits().xmlName??`key`,c=a.getMergedTraits().xmlName??`value`;for(let e of o){let t=e[s],n=e[c];i[t]=this.readSchema(a,n)}return i}if(n.isStructSchema()){let e=n.isUnionSchema(),r;e&&(r=new St(t,i));for(let[a,o]of n.structIterator()){let n=o.getMergedTraits(),s=n.httpPayload?n.xmlName??o.getName():o.getMemberTraits().xmlName??a;e&&r.mark(s),t[s]!=null&&(i[a]=this.readSchema(o,t[s]))}return e&&r.writeUnknown(),i}if(n.isDocumentSchema())return t;throw 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,t)}parseXml(e){if(e.length){let t;try{t=(0,cn.parseXML)(e)}catch(t){throw t&&typeof t==`object`&&Object.defineProperty(t,`$responseBodyText`,{value:e}),t}let n=`#text`,r=Object.keys(t)[0],i=t[r];return i[n]&&(i[r]=i[n],delete i[n]),(0,ln.getValueFromTextNode)(i)}return{}}}})),pn,mn,hn,gn=n((()=>{F(),C(),L(),pn=z(),mn=h(),xt(),hn=class extends Q{settings;buffer;constructor(e){super(),this.settings=e}write(e,t,n=``){this.buffer===void 0&&(this.buffer=``);let r=x.of(e);if(n&&!n.endsWith(`.`)&&(n+=`.`),r.isBlobSchema())(typeof t==`string`||t instanceof Uint8Array)&&(this.writeKey(n),this.writeValue((this.serdeContext?.base64Encoder??mn.toBase64)(t)));else if(r.isBooleanSchema()||r.isNumericSchema()||r.isStringSchema())t==null?r.isIdempotencyToken()&&(this.writeKey(n),this.writeValue((0,ae.v4)())):(this.writeKey(n),this.writeValue(String(t)));else if(r.isBigIntegerSchema())t!=null&&(this.writeKey(n),this.writeValue(String(t)));else if(r.isBigDecimalSchema())t!=null&&(this.writeKey(n),this.writeValue(t instanceof A?t.string:String(t)));else if(r.isTimestampSchema()){if(t instanceof Date)switch(this.writeKey(n),I(r,this.settings)){case 5:this.writeValue(t.toISOString().replace(`.000Z`,`Z`));break;case 6:this.writeValue((0,pn.dateToUtcString)(t));break;case 7:this.writeValue(String(t.getTime()/1e3));break}}else if(r.isDocumentSchema())Array.isArray(t)?this.write(79,t,n):t instanceof Date?this.write(4,t,n):t instanceof Uint8Array?this.write(21,t,n):t&&typeof t==`object`?this.write(143,t,n):(this.writeKey(n),this.writeValue(String(t)));else if(r.isListSchema()){if(Array.isArray(t))if(t.length===0)this.settings.serializeEmptyLists&&(this.writeKey(n),this.writeValue(``));else{let e=r.getValueSchema(),i=this.settings.flattenLists||r.getMergedTraits().xmlFlattened,a=1;for(let r of t){if(r==null)continue;let t=e.getMergedTraits(),o=this.getKey(`member`,t.xmlName,t.ec2QueryName),s=i?`${n}${a}`:`${n}${o}.${a}`;this.write(e,r,s),++a}}}else if(r.isMapSchema()){if(t&&typeof t==`object`){let e=r.getKeySchema(),i=r.getValueSchema(),a=r.getMergedTraits().xmlFlattened,o=1;for(let[r,s]of Object.entries(t)){if(s==null)continue;let t=e.getMergedTraits(),c=this.getKey(`key`,t.xmlName,t.ec2QueryName),l=a?`${n}${o}.${c}`:`${n}entry.${o}.${c}`,u=i.getMergedTraits(),d=this.getKey(`value`,u.xmlName,u.ec2QueryName),f=a?`${n}${o}.${d}`:`${n}entry.${o}.${d}`;this.write(e,r,l),this.write(i,s,f),++o}}}else if(r.isStructSchema()){if(t&&typeof t==`object`){let e=!1;for(let[i,a]of r.structIterator()){if(t[i]==null&&!a.isIdempotencyToken())continue;let r=a.getMergedTraits(),o=this.getKey(i,r.xmlName,r.ec2QueryName,`struct`),s=`${n}${o}`;this.write(a,t[i],s),e=!0}if(!e&&r.isUnionSchema()){let{$unknown:e}=t;if(Array.isArray(e)){let[t,r]=e,i=`${n}${t}`;this.write(15,r,i)}}}}else if(!r.isUnitSchema())throw Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${r.getName(!0)}`)}flush(){if(this.buffer===void 0)throw Error(`@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.`);let e=this.buffer;return delete this.buffer,e}getKey(e,t,n,r){let{ec2:i,capitalizeKeys:a}=this.settings;if(i&&n)return n;let o=t??e;return a&&r===`struct`?o[0].toUpperCase()+o.slice(1):o}writeKey(e){e.endsWith(`.`)&&(e=e.slice(0,e.length-1)),this.buffer+=`&${O(e)}=`}writeValue(e){this.buffer+=O(e)}}})),_n,vn=n((()=>{F(),C(),mt(),fn(),gn(),_n=class extends D{options;serializer;deserializer;mixin=new pt;constructor(e){super({defaultNamespace:e.defaultNamespace,errorTypeRegistries:e.errorTypeRegistries}),this.options=e;let t={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:!0};this.serializer=new hn(t),this.deserializer=new dn(t)}getShapeId(){return`aws.protocols#awsQuery`}setSerdeContext(e){this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw Error(`AWSQuery protocol has no payload codec.`)}async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n);return r.path.endsWith(`/`)||(r.path+=`/`),r.headers[`content-type`]=`application/x-www-form-urlencoded`,(y(e.input)===`unit`||!r.body)&&(r.body=``),r.body=`Action=${e.name.split(`#`)[1]??e.name}&Version=${this.options.version}`+r.body,r.body.endsWith(`&`)&&(r.body=r.body.slice(-1)),r}async deserializeResponse(e,t,n){let r=this.deserializer,i=x.of(e.output),a={};if(n.statusCode>=300){let i=await ee(n.body,t);i.byteLength>0&&Object.assign(a,await r.read(15,i)),await this.handleError(e,t,n,a,this.deserializeMetadata(n))}for(let e in n.headers){let t=n.headers[e];delete n.headers[e],n.headers[e.toLowerCase()]=t}let o=e.name.split(`#`)[1]??e.name,s=i.isStructSchema()&&this.useNestedResult()?o+`Result`:void 0,c=await ee(n.body,t);return c.byteLength>0&&Object.assign(a,await r.read(i,c,s)),a.$metadata=this.deserializeMetadata(n),a}useNestedResult(){return!0}async handleError(e,t,n,r,i){let a=this.loadQueryErrorCode(n,r)??`Unknown`;this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);let o=this.loadQueryError(r)??{},s=this.loadQueryErrorMessage(r);o.message=s,o.Error={Type:o.Type,Code:o.Code,Message:s};let{errorSchema:c,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,o,i,this.mixin.findQueryCompatibleError),u=x.of(c),d=new((this.compositeErrorRegistry.getErrorCtor(c))??Error)(s),f={Type:o.Error.Type,Code:o.Error.Code,Error:o.Error};for(let[e,t]of u.structIterator()){let n=t.getMergedTraits().xmlName??e,i=o[n]??r[n];f[e]=this.deserializer.readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(d,l,{$fault:u.getMergedTraits().error,message:s},f),r)}loadQueryErrorCode(e,t){let n=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;if(n!==void 0)return n;if(e.statusCode==404)return`NotFound`}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){let t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??`Unknown`}getDefaultContentType(){return`application/x-www-form-urlencoded`}}})),yn,bn=n((()=>{vn(),yn=class extends _n{options;constructor(e){super(e),this.options=e,Object.assign(this.serializer.settings,{capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1,ec2:!0})}getShapeId(){return`aws.protocols#ec2Query`}useNestedResult(){return!1}}})),xn=n((()=>{})),Sn,Cn,wn,Tn,En,Dn=n((()=>{Sn=sn(),Cn=z(),kt(),wn=(e,t)=>Ot(e,t).then(e=>{if(e.length){let t;try{t=(0,Sn.parseXML)(e)}catch(t){throw t&&typeof t==`object`&&Object.defineProperty(t,`$responseBodyText`,{value:e}),t}let n=`#text`,r=Object.keys(t)[0],i=t[r];return i[n]&&(i[r]=i[n],delete i[n]),(0,Cn.getValueFromTextNode)(i)}return{}}),Tn=async(e,t)=>{let n=await wn(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},En=(e,t)=>{if(t?.Error?.Code!==void 0)return t.Error.Code;if(t?.Code!==void 0)return t.Code;if(e.statusCode==404)return`NotFound`}})),$,On,kn,An,jn=n((()=>{$=sn(),F(),C(),L(),On=z(),kn=h(),xt(),An=class extends Q{settings;stringBuffer;byteBuffer;buffer;constructor(e){super(),this.settings=e}write(e,t){let n=x.of(e);if(n.isStringSchema()&&typeof t==`string`)this.stringBuffer=t;else if(n.isBlobSchema())this.byteBuffer=`byteLength`in t?t:(this.serdeContext?.base64Decoder??kn.fromBase64)(t);else{this.buffer=this.writeStruct(n,t,void 0);let e=n.getMergedTraits();e.httpPayload&&!e.xmlName&&this.buffer.withName(n.getName())}}flush(){if(this.byteBuffer!==void 0){let e=this.byteBuffer;return delete this.byteBuffer,e}if(this.stringBuffer!==void 0){let e=this.stringBuffer;return delete this.stringBuffer,e}let e=this.buffer;return this.settings.xmlNamespace&&(e?.attributes?.xmlns||e.addAttribute(`xmlns`,this.settings.xmlNamespace)),delete this.buffer,e.toString()}writeStruct(e,t,n){let r=e.getMergedTraits(),i=e.isMemberSchema()&&!r.httpPayload?e.getMemberTraits().xmlName??e.getMemberName():r.xmlName??e.getName();if(!i||!e.isStructSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${e.getName(!0)}.`);let a=$.XmlNode.of(i),[o,s]=this.getXmlnsAttribute(e,n);for(let[n,r]of e.structIterator()){let e=t[n];if(e!=null||r.isIdempotencyToken()){if(r.getMergedTraits().xmlAttribute){a.addAttribute(r.getMergedTraits().xmlName??n,this.writeSimple(r,e));continue}if(r.isListSchema())this.writeList(r,e,a,s);else if(r.isMapSchema())this.writeMap(r,e,a,s);else if(r.isStructSchema())a.addChildNode(this.writeStruct(r,e,s));else{let t=$.XmlNode.of(r.getMergedTraits().xmlName??r.getMemberName());this.writeSimpleInto(r,e,t,s),a.addChildNode(t)}}}let{$unknown:c}=t;if(c&&e.isUnionSchema()&&Array.isArray(c)&&Object.keys(t).length===1){let[e,n]=c,r=$.XmlNode.of(e);if(typeof n!=`string`)if(t instanceof $.XmlNode||t instanceof $.XmlText)a.addChildNode(t);else throw Error(`@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`);this.writeSimpleInto(0,n,r,s),a.addChildNode(r)}return s&&a.addAttribute(o,s),a}writeList(e,t,n,r){if(!e.isMemberSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${e.getName(!0)}`);let i=e.getMergedTraits(),a=e.getValueSchema(),o=a.getMergedTraits(),s=!!o.sparse,c=!!i.xmlFlattened,[l,u]=this.getXmlnsAttribute(e,r),d=(t,n)=>{if(a.isListSchema())this.writeList(a,Array.isArray(n)?n:[n],t,u);else if(a.isMapSchema())this.writeMap(a,n,t,u);else if(a.isStructSchema()){let r=this.writeStruct(a,n,u);t.addChildNode(r.withName(c?i.xmlName??e.getMemberName():o.xmlName??`member`))}else{let r=$.XmlNode.of(c?i.xmlName??e.getMemberName():o.xmlName??`member`);this.writeSimpleInto(a,n,r,u),t.addChildNode(r)}};if(c)for(let e of t)(s||e!=null)&&d(n,e);else{let r=$.XmlNode.of(i.xmlName??e.getMemberName());u&&r.addAttribute(l,u);for(let e of t)(s||e!=null)&&d(r,e);n.addChildNode(r)}}writeMap(e,t,n,r,i=!1){if(!e.isMemberSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${e.getName(!0)}`);let a=e.getMergedTraits(),o=e.getKeySchema(),s=o.getMergedTraits().xmlName??`key`,c=e.getValueSchema(),l=c.getMergedTraits(),u=l.xmlName??`value`,d=!!l.sparse,f=!!a.xmlFlattened,[p,m]=this.getXmlnsAttribute(e,r),h=(e,t,n)=>{let r=$.XmlNode.of(s,t),[i,a]=this.getXmlnsAttribute(o,m);a&&r.addAttribute(i,a),e.addChildNode(r);let l=$.XmlNode.of(u);c.isListSchema()?this.writeList(c,n,l,m):c.isMapSchema()?this.writeMap(c,n,l,m,!0):c.isStructSchema()?l=this.writeStruct(c,n,m):this.writeSimpleInto(c,n,l,m),e.addChildNode(l)};if(f){for(let[r,i]of Object.entries(t))if(d||i!=null){let t=$.XmlNode.of(a.xmlName??e.getMemberName());h(t,r,i),n.addChildNode(t)}}else{let r;i||(r=$.XmlNode.of(a.xmlName??e.getMemberName()),m&&r.addAttribute(p,m),n.addChildNode(r));for(let[e,a]of Object.entries(t))if(d||a!=null){let t=$.XmlNode.of(`entry`);h(t,e,a),(i?n:r).addChildNode(t)}}}writeSimple(e,t){if(t===null)throw Error(`@aws-sdk/core/protocols - (XML serializer) cannot write null value.`);let n=x.of(e),r=null;if(t&&typeof t==`object`)if(n.isBlobSchema())r=(this.serdeContext?.base64Encoder??kn.toBase64)(t);else if(n.isTimestampSchema()&&t instanceof Date)switch(I(n,this.settings)){case 5:r=t.toISOString().replace(`.000Z`,`Z`);break;case 6:r=(0,On.dateToUtcString)(t);break;case 7:r=String(t.getTime()/1e3);break;default:console.warn(`Missing timestamp format, using http date`,t),r=(0,On.dateToUtcString)(t);break}else if(n.isBigDecimalSchema()&&t)return t instanceof A?t.string:String(t);else if(n.isMapSchema()||n.isListSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.`);else throw Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${n.getName(!0)}`);if((n.isBooleanSchema()||n.isNumericSchema()||n.isBigIntegerSchema()||n.isBigDecimalSchema())&&(r=String(t)),n.isStringSchema()&&(r=t===void 0&&n.isIdempotencyToken()?(0,ae.v4)():String(t)),r===null)throw Error(`Unhandled schema-value pair ${n.getName(!0)}=${t}`);return r}writeSimpleInto(e,t,n,r){let i=this.writeSimple(e,t),a=x.of(e),o=new $.XmlText(i),[s,c]=this.getXmlnsAttribute(a,r);c&&n.addAttribute(s,c),n.addChildNode(o)}getXmlnsAttribute(e,t){let[n,r]=e.getMergedTraits().xmlNamespace??[];return r&&r!==t?[n?`xmlns:${n}`:`xmlns`,r]:[void 0,void 0]}}})),Mn,Nn=n((()=>{xt(),fn(),jn(),Mn=class extends Q{settings;constructor(e){super(),this.settings=e}createSerializer(){let e=new An(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){let e=new dn(this.settings);return e.setSerdeContext(this.serdeContext),e}}})),Pn,Fn=n((()=>{F(),C(),mt(),Dn(),Nn(),Pn=class extends N{codec;serializer;deserializer;mixin=new pt;constructor(e){super(e);let t={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace};this.codec=new Mn(t),this.serializer=new R(this.codec.createSerializer(),t),this.deserializer=new j(this.codec.createDeserializer(),t),this.compositeErrorRegistry}getPayloadCodec(){return this.codec}getShapeId(){return`aws.protocols#restXml`}async serializeRequest(e,t,n){let r=await super.serializeRequest(e,t,n),i=x.of(e.input);if(!r.headers[`content-type`]){let e=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);e&&(r.headers[`content-type`]=e)}return typeof r.body==`string`&&r.headers[`content-type`]===this.getDefaultContentType()&&!r.body.startsWith(``+r.body),r}async deserializeResponse(e,t,n){return super.deserializeResponse(e,t,n)}async handleError(e,t,n,r,i){let a=En(n,r)??`Unknown`;if(this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace),r.Error&&typeof r.Error==`object`)for(let e of Object.keys(r.Error))r[e]=r.Error[e],e.toLowerCase()===`message`&&(r.message=r.Error[e]);r.RequestId&&!i.requestId&&(i.requestId=r.RequestId);let{errorSchema:o,errorMetadata:s}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,r,i),c=x.of(o),l=r.Error?.message??r.Error?.Message??r.message??r.Message??`UnknownError`,u=new((this.compositeErrorRegistry.getErrorCtor(o))??Error)(l);await this.deserializeHttpMessage(o,t,n,r);let d={},f=this.codec.createDeserializer();for(let[e,t]of c.structIterator()){let n=t.getMergedTraits().xmlName??e,i=r.Error?.[n]??r[n];d[e]=f.readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(u,s,{$fault:c.getMergedTraits().error,message:l},d),r)}getDefaultContentType(){return`application/xml`}hasUnstructuredPayloadBinding(e){for(let[,t]of e.structIterator())if(t.getMergedTraits().httpPayload)return!(t.isStructSchema()||t.isMapSchema()||t.isListSchema());return!1}}})),In=i({AwsEc2QueryProtocol:()=>yn,AwsJson1_0Protocol:()=>Yt,AwsJson1_1Protocol:()=>Zt,AwsJsonRpcProtocol:()=>qt,AwsQueryProtocol:()=>_n,AwsRestJsonProtocol:()=>$t,AwsRestXmlProtocol:()=>Pn,AwsSmithyRpcV2CborProtocol:()=>ht,JsonCodec:()=>Gt,JsonShapeDeserializer:()=>Lt,JsonShapeSerializer:()=>Ut,QueryShapeSerializer:()=>hn,XmlCodec:()=>Mn,XmlShapeDeserializer:()=>dn,XmlShapeSerializer:()=>An,_toBool:()=>vt,_toNum:()=>yt,_toStr:()=>_t,awsExpectUnion:()=>nn,loadRestJsonErrorCode:()=>Pt,loadRestXmlErrorCode:()=>En,parseJsonBody:()=>At,parseJsonErrorBody:()=>jt,parseXmlBody:()=>wn,parseXmlErrorBody:()=>Tn}),Ln=n((()=>{gt(),bt(),Xt(),Qt(),Jt(),en(),Kt(),Rt(),Wt(),rn(),Ft(),bn(),vn(),xn(),gn(),Fn(),Nn(),fn(),jn(),Dn()})),Rn=a((e=>{var t=v(),n=p(),r=f(),i=s(),a=b(),o=oe();let c=`X-Amz-Algorithm`,l=`X-Amz-Credential`,u=`X-Amz-Date`,d=`X-Amz-SignedHeaders`,m=`X-Amz-Expires`,h=`X-Amz-Signature`,g=`X-Amz-Security-Token`,_=`authorization`,y=`x-amz-date`,x=`date`,S=[_,y,x],C=`x-amz-signature`,w=`x-amz-content-sha256`,T=`x-amz-security-token`,E={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},D=/^proxy-/,O=/^sec-/,ee=[/^proxy-/i,/^sec-/i],k=`AWS4-HMAC-SHA256`,A=`AWS4-HMAC-SHA256-PAYLOAD`,j=`UNSIGNED-PAYLOAD`,M=`aws4_request`,N=3600*24*7,P={},F=[],I=(e,t,n)=>`${e}/${t}/${n}/${M}`,L=async(e,n,r,i,a)=>{let o=await te(e,n.secretAccessKey,n.accessKeyId),s=`${r}:${i}:${a}:${t.toHex(o)}:${n.sessionToken}`;if(s in P)return P[s];for(F.push(s);F.length>50;)delete P[F.shift()];let c=`AWS4${n.secretAccessKey}`;for(let t of[r,i,a,M])c=await te(e,c,t);return P[s]=c},R=()=>{F.length=0,Object.keys(P).forEach(e=>{delete P[e]})},te=(e,t,r)=>{let i=new e(t);return i.update(n.toUint8Array(r)),i.digest()},z=({headers:e},t,n)=>{let r={};for(let i of Object.keys(e).sort()){if(e[i]==null)continue;let a=i.toLowerCase();(a in E||t?.has(a)||D.test(a)||O.test(a))&&(!n||n&&!n.has(a))||(r[a]=e[i].trim().replace(/\s+/g,` `))}return r},B=async({headers:e,body:i},a)=>{for(let t of Object.keys(e))if(t.toLowerCase()===w)return e[t];if(i==null)return`e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`;if(typeof i==`string`||ArrayBuffer.isView(i)||r.isArrayBuffer(i)){let e=new a;return e.update(n.toUint8Array(i)),t.toHex(await e.digest())}return j};var ne=class{format(e){let t=[];for(let r of Object.keys(e)){let i=n.fromUtf8(r);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[r]))}let r=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0)),i=0;for(let e of t)r.set(e,i),i+=e.byteLength;return r}formatHeaderValue(e){switch(e.type){case`boolean`:return Uint8Array.from([+!e.value]);case`byte`:return Uint8Array.from([2,e.value]);case`short`:let r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,e.value,!1),new Uint8Array(r.buffer);case`integer`:let i=new DataView(new ArrayBuffer(5));return i.setUint8(0,4),i.setInt32(1,e.value,!1),new Uint8Array(i.buffer);case`long`:let a=new Uint8Array(9);return a[0]=5,a.set(e.value.bytes,1),a;case`binary`:let o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);let s=new Uint8Array(o.buffer);return s.set(e.value,3),s;case`string`:let c=n.fromUtf8(e.value),l=new DataView(new ArrayBuffer(3+c.byteLength));l.setUint8(0,7),l.setUint16(1,c.byteLength,!1);let u=new Uint8Array(l.buffer);return u.set(c,3),u;case`timestamp`:let d=new Uint8Array(9);return d[0]=8,d.set(ae.fromNumber(e.value.valueOf()).bytes,1),d;case`uuid`:if(!ie.test(e.value))throw Error(`Invalid UUID received: ${e.value}`);let f=new Uint8Array(17);return f[0]=9,f.set(t.fromHex(e.value.replace(/\-/g,``)),1),f}}},re;(function(e){e[e.boolTrue=0]=`boolTrue`,e[e.boolFalse=1]=`boolFalse`,e[e.byte=2]=`byte`,e[e.short=3]=`short`,e[e.integer=4]=`integer`,e[e.long=5]=`long`,e[e.byteArray=6]=`byteArray`,e[e.string=7]=`string`,e[e.timestamp=8]=`timestamp`,e[e.uuid=9]=`uuid`})(re||={});let ie=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var ae=class e{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw Error(`Int64 buffers must be exactly 8 bytes`)}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let n=new Uint8Array(8);for(let e=7,r=Math.abs(Math.round(t));e>-1&&r>0;e--,r/=256)n[e]=r;return t<0&&se(n),new e(n)}valueOf(){let e=this.bytes.slice(0),n=e[0]&128;return n&&se(e),parseInt(t.toHex(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function se(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}let ce=(e,t)=>{e=e.toLowerCase();for(let n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},le=(e,t={})=>{let{headers:n,query:r={}}=i.HttpRequest.clone(e);for(let e of Object.keys(n)){let i=e.toLowerCase();(i.slice(0,6)===`x-amz-`&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}},ue=e=>{e=i.HttpRequest.clone(e);for(let t of Object.keys(e.headers))S.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},de=({query:e={}})=>{let t=[],n={};for(let r of Object.keys(e)){if(r.toLowerCase()===C)continue;let i=o.escapeUri(r);t.push(i);let a=e[r];typeof a==`string`?n[i]=`${i}=${o.escapeUri(a)}`:Array.isArray(a)&&(n[i]=a.slice(0).reduce((e,t)=>e.concat([`${i}=${o.escapeUri(t)}`]),[]).sort().join(`&`))}return t.sort().map(e=>n[e]).filter(e=>e).join(`&`)},V=e=>fe(e).toISOString().replace(/\.\d{3}Z$/,`Z`),fe=e=>typeof e==`number`?new Date(e*1e3):typeof e==`string`?Number(e)?new Date(Number(e)*1e3):new Date(e):e;var H=class{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o=!0}){this.service=r,this.sha256=i,this.uriEscapePath=o,this.applyChecksum=typeof e==`boolean`?e:!0,this.regionProvider=a.normalizeProvider(n),this.credentialProvider=a.normalizeProvider(t)}createCanonicalRequest(e,t,n){let r=Object.keys(t).sort();return`${e.method} -${this.getCanonicalPath(e)} -${de(e)} -${r.map(e=>`${e}:${t[e]}`).join(` -`)} - -${r.join(`;`)} -${n}`}async createStringToSign(e,r,i,a){let o=new this.sha256;o.update(n.toUint8Array(i));let s=await o.digest();return`${a} -${e} -${r} -${t.toHex(s)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let t=[];for(let n of e.split(`/`))n?.length!==0&&n!==`.`&&(n===`..`?t.pop():t.push(n));let n=`${e?.startsWith(`/`)?`/`:``}${t.join(`/`)}${t.length>0&&e?.endsWith(`/`)?`/`:``}`;return o.escapeUri(n).replace(/%2F/g,`/`)}return e}validateResolvedCredentials(e){if(typeof e!=`object`||typeof e.accessKeyId!=`string`||typeof e.secretAccessKey!=`string`)throw Error(`Resolved credential object is not valid`)}formatDate(e){let t=V(e).replace(/[\-:]/g,``);return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(`;`)}},pe=class extends H{headerFormatter=new ne;constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:a=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:a})}async presign(e,t={}){let{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:a,signableHeaders:o,hoistableHeaders:s,signingRegion:f,signingService:p}=t,_=await this.credentialProvider();this.validateResolvedCredentials(_);let v=f??await this.regionProvider(),{longDate:y,shortDate:b}=this.formatDate(n);if(r>N)return Promise.reject(`Signature version 4 presigned URLs must have an expiration date less than one week in the future`);let x=I(b,v,p??this.service),S=le(ue(e),{unhoistableHeaders:a,hoistableHeaders:s});_.sessionToken&&(S.query[g]=_.sessionToken),S.query[c]=k,S.query[l]=`${_.accessKeyId}/${x}`,S.query[u]=y,S.query[m]=r.toString(10);let C=z(S,i,o);return S.query[d]=this.getCanonicalHeaderList(C),S.query[h]=await this.getSignature(y,x,this.getSigningKey(_,v,b,p),this.createCanonicalRequest(S,C,await B(e,this.sha256))),S}async sign(e,t){return typeof e==`string`?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:n},{signingDate:r=new Date,priorSignature:i,signingRegion:a,signingService:o,eventStreamCredentials:s}){let c=a??await this.regionProvider(),{shortDate:l,longDate:u}=this.formatDate(r),d=I(l,c,o??this.service),f=await B({headers:{},body:n},this.sha256),p=new this.sha256;p.update(e);let m=[A,u,d,i,t.toHex(await p.digest()),f].join(` -`);return this.signString(m,{signingDate:r,signingRegion:c,signingService:o,eventStreamCredentials:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r,eventStreamCredentials:i}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature,eventStreamCredentials:i}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:r=new Date,signingRegion:i,signingService:a,eventStreamCredentials:o}={}){let s=o??await this.credentialProvider();this.validateResolvedCredentials(s);let c=i??await this.regionProvider(),{shortDate:l}=this.formatDate(r),u=new this.sha256(await this.getSigningKey(s,c,l,a));return u.update(n.toUint8Array(e)),t.toHex(await u.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:a}={}){let o=await this.credentialProvider();this.validateResolvedCredentials(o);let s=i??await this.regionProvider(),c=ue(e),{longDate:l,shortDate:u}=this.formatDate(t),d=I(u,s,a??this.service);c.headers[y]=l,o.sessionToken&&(c.headers[T]=o.sessionToken);let f=await B(c,this.sha256);!ce(w,c.headers)&&this.applyChecksum&&(c.headers[w]=f);let p=z(c,r,n),m=await this.getSignature(l,d,this.getSigningKey(o,s,u,a),this.createCanonicalRequest(c,p,f));return c.headers[_]=`${k} Credential=${o.accessKeyId}/${d}, SignedHeaders=${this.getCanonicalHeaderList(p)}, Signature=${m}`,c}async getSignature(e,r,i,a){let o=await this.createStringToSign(e,r,a,k),s=new this.sha256(await i);return s.update(n.toUint8Array(o)),t.toHex(await s.digest())}getSigningKey(e,t,n,r){return L(this.sha256,e,n,t,r||this.service)}};e.ALGORITHM_IDENTIFIER=k,e.ALGORITHM_IDENTIFIER_V4A=`AWS4-ECDSA-P256-SHA256`,e.ALGORITHM_QUERY_PARAM=c,e.ALWAYS_UNSIGNABLE_HEADERS=E,e.AMZ_DATE_HEADER=y,e.AMZ_DATE_QUERY_PARAM=u,e.AUTH_HEADER=_,e.CREDENTIAL_QUERY_PARAM=l,e.DATE_HEADER=x,e.EVENT_ALGORITHM_IDENTIFIER=A,e.EXPIRES_QUERY_PARAM=m,e.GENERATED_HEADERS=S,e.HOST_HEADER=`host`,e.KEY_TYPE_IDENTIFIER=M,e.MAX_CACHE_SIZE=50,e.MAX_PRESIGNED_TTL=N,e.PROXY_HEADER_PATTERN=D,e.REGION_SET_PARAM=`X-Amz-Region-Set`,e.SEC_HEADER_PATTERN=O,e.SHA256_HEADER=w,e.SIGNATURE_HEADER=C,e.SIGNATURE_QUERY_PARAM=h,e.SIGNED_HEADERS_QUERY_PARAM=d,e.SignatureV4=pe,e.SignatureV4Base=H,e.TOKEN_HEADER=T,e.TOKEN_QUERY_PARAM=g,e.UNSIGNABLE_PATTERNS=ee,e.UNSIGNED_PAYLOAD=j,e.clearCredentialCache=R,e.createScope=I,e.getCanonicalHeaders=z,e.getCanonicalQuery=de,e.getPayloadHash=B,e.getSigningKey=L,e.hasHeader=ce,e.moveHeadersToQuery=le,e.prepareRequest=ue,e.signatureV4aContainer={SignatureV4a:null}})),zn=a((e=>{e.SelectorType=void 0,(function(e){e.ENV=`env`,e.CONFIG=`shared config entry`})(e.SelectorType||={}),e.booleanSelector=(e,t,n)=>{if(t in e){if(e[t]===`true`)return!0;if(e[t]===`false`)return!1;throw Error(`Cannot load ${n} "${t}". Expected "true" or "false", got ${e[t]}.`)}},e.numberSelector=(e,t,n)=>{if(!(t in e))return;let r=parseInt(e[t],10);if(Number.isNaN(r))throw TypeError(`Cannot load ${n} '${t}'. Expected number, got '${e[t]}'.`);return r}})),Bn,Vn,Hn=n((()=>{Bn=o(),Vn=e=>e[Bn.SMITHY_CONTEXT_KEY]||(e[Bn.SMITHY_CONTEXT_KEY]={})})),Un,Wn=n((()=>{Un=(e,t)=>{if(!t||t.length===0)return e;let n=[];for(let r of t)for(let t of e)t.schemeId.split(`#`)[1]===r&&n.push(t);for(let t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n}}));function Gn(e){let t=new Map;for(let n of e)t.set(n.schemeId,n);return t}var Kn,qn,Jn=n((()=>{Kn=b(),Wn(),qn=(e,t)=>(n,r)=>async i=>{let a=Un(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=Gn(e.httpAuthSchemes),s=(0,Kn.getSmithyContext)(r),c=[];for(let n of a){let i=o.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}let a=i.identityProvider(await t.identityProviderConfigProvider(e));if(!a){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:l={},signingProperties:u={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},l),n.signingProperties=Object.assign(n.signingProperties||{},u),s.selectedHttpAuthScheme={httpAuthOption:n,identity:await a(n.identityProperties),signer:i.signer};break}if(!s.selectedHttpAuthScheme)throw Error(c.join(` -`));return n(i)}})),Yn,Xn,Zn=n((()=>{Jn(),Yn={step:`serialize`,tags:[`HTTP_AUTH_SCHEME`],name:`httpAuthSchemeMiddleware`,override:!0,relation:`before`,toMiddleware:`endpointV2Middleware`},Xn=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(qn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),Yn)}})})),Qn,$n,er=n((()=>{Jn(),Qn={step:`serialize`,tags:[`HTTP_AUTH_SCHEME`],name:`httpAuthSchemeMiddleware`,override:!0,relation:`before`,toMiddleware:`serializerMiddleware`},$n=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(qn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),Qn)}})})),tr=n((()=>{Jn(),Zn(),er()})),nr,rr,ir,ar,or,sr=n((()=>{nr=s(),rr=b(),ir=e=>e=>{throw e},ar=(e,t)=>{},or=e=>(e,t)=>async n=>{if(!nr.HttpRequest.isInstance(n.request))return e(n);let r=(0,rr.getSmithyContext)(t).selectedHttpAuthScheme;if(!r)throw Error(`No HttpAuthScheme was selected: unable to sign request`);let{httpAuthOption:{signingProperties:i={}},identity:a,signer:o}=r,s=await e({...n,request:await o.sign(n.request,a,i)}).catch((o.errorHandler||ir)(i));return(o.successHandler||ar)(s.response,i),s}})),cr,lr,ur=n((()=>{sr(),cr={step:`finalizeRequest`,tags:[`HTTP_SIGNING`],name:`httpSigningMiddleware`,aliases:[`apiKeyMiddleware`,`tokenMiddleware`,`awsAuthMiddleware`],override:!0,relation:`after`,toMiddleware:`retryMiddleware`},lr=e=>({applyToStack:t=>{t.addRelativeTo(or(e),cr)}})})),dr=n((()=>{sr(),ur()})),fr,pr=n((()=>{fr=e=>{if(typeof e==`function`)return e;let t=Promise.resolve(e);return()=>t}}));function mr(e,t,n,r,i){return async function*(a,o,...s){let c=o,l=a.startingToken??c[n],u=!0,d;for(;u;){if(c[n]=l,i&&(c[i]=c[i]??a.pageSize),a.client instanceof e)d=await hr(t,a.client,o,a.withCommand,...s);else throw Error(`Invalid client, expected instance of ${e.name}`);yield d;let f=l;l=gr(d,r),u=!!(l&&(!a.stopOnSameToken||l!==f))}return void 0}}var hr,gr,_r=n((()=>{hr=async(e,t,n,r=e=>e,...i)=>{let a=new e(n);return a=r(a)??a,await t.send(a,...i)},gr=(e,t)=>{let n=e,r=t.split(`.`);for(let e of r){if(!n||typeof n!=`object`)return;n=n[e]}return n}})),vr=n((()=>{F()}));function yr(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}var br=n((()=>{})),xr,Sr=n((()=>{xr=class{authSchemes=new Map;constructor(e){for(let[t,n]of Object.entries(e))n!==void 0&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}})),Cr,wr,Tr,Er=n((()=>{Cr=s(),wr=o(),Tr=class{async sign(e,t,n){if(!n)throw Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!n.name)throw Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!n.in)throw Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!t.apiKey)throw Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let r=Cr.HttpRequest.clone(e);if(n.in===wr.HttpApiKeyAuthLocation.QUERY)r.query[n.name]=t.apiKey;else if(n.in===wr.HttpApiKeyAuthLocation.HEADER)r.headers[n.name]=n.scheme?`${n.scheme} ${t.apiKey}`:t.apiKey;else throw Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+n.in+"`");return r}}})),Dr,Or,kr=n((()=>{Dr=s(),Or=class{async sign(e,t,n){let r=Dr.HttpRequest.clone(e);if(!t.token)throw Error("request could not be signed with `token` since the `token` is not defined");return r.headers.Authorization=`Bearer ${t.token}`,r}}})),Ar,jr=n((()=>{Ar=class{async sign(e,t,n){return e}}})),Mr=n((()=>{Er(),kr(),jr()})),Nr,Pr,Fr,Ir,Lr,Rr=n((()=>{Nr=e=>function(t){return Ir(t)&&t.expiration.getTime()-Date.now()e.expiration!==void 0,Lr=(e,t,n)=>{if(e===void 0)return;let r=typeof e==`function`?e:async()=>Promise.resolve(e),i,a,o,s=!1,c=async e=>{a||=r(e);try{i=await a,o=!0,s=!1}finally{a=void 0}return i};return t===void 0?async e=>((!o||e?.forceRefresh)&&(i=await c(e)),i):async e=>((!o||e?.forceRefresh)&&(i=await c(e)),s?i:n(i)?(t(i)&&await c(e),i):(s=!0,i))}})),zr=n((()=>{Sr(),Mr(),Rr()})),Br=i({DefaultIdentityProviderConfig:()=>xr,EXPIRATION_MS:()=>Pr,HttpApiKeyAuthSigner:()=>Tr,HttpBearerAuthSigner:()=>Or,NoAuthSigner:()=>Ar,createIsIdentityExpiredFunction:()=>Nr,createPaginator:()=>mr,doesIdentityRequireRefresh:()=>Ir,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Xn,getHttpAuthSchemePlugin:()=>$n,getHttpSigningPlugin:()=>lr,getSmithyContext:()=>Vn,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>Yn,httpAuthSchemeMiddleware:()=>qn,httpAuthSchemeMiddlewareOptions:()=>Qn,httpSigningMiddleware:()=>or,httpSigningMiddlewareOptions:()=>cr,isIdentityExpired:()=>Fr,memoizeIdentityProvider:()=>Lr,normalizeProvider:()=>fr,requestBuilder:()=>te,setFeature:()=>yr}),Vr=n((()=>{Hn(),tr(),dr(),pr(),_r(),vr(),br(),zr()})),Hr=a((e=>{var t=o(),n=class e{nodes;root;conditions;results;constructor(e,t,n,r){this.nodes=e,this.root=t,this.conditions=n,this.results=r}static from(t,n,r,i){return new e(t,n,r,i)}},r=class{capacity;data=new Map;parameters=[];constructor({size:e,params:t}){this.capacity=e??50,t&&(this.parameters=t)}get(e,t){let n=this.hash(e);if(n===!1)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){let e=this.data.keys(),t=0;for(;;){let{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t=``,{parameters:n}=this;if(n.length===0)return!1;for(let r of n){let n=String(e[r]??``);if(n.includes(`|;`))return!1;t+=n+`|;`}return t}},i=class extends Error{constructor(e){super(e),this.name=`EndpointError`}};let a=`endpoints`;function s(e){return typeof e!=`object`||!e?e:`ref`in e?`$${s(e.ref)}`:`fn`in e?`${e.fn}(${(e.argv||[]).map(s).join(`, `)})`:JSON.stringify(e,null,2)}let c={},l=(e,t)=>e===t;function u(...e){for(let t of e)if(t!=null)return t}let d=e=>{let t=e.split(`.`),n=[];for(let r of t){let t=r.indexOf(`[`);if(t!==-1){if(r.indexOf(`]`)!==r.length-1)throw new i(`Path: '${e}' does not end with ']'`);let a=r.slice(t+1,-1);if(Number.isNaN(parseInt(a)))throw new i(`Invalid array index: '${a}' in path: '${e}'`);t!==0&&n.push(r.slice(0,t)),n.push(a)}else n.push(r)}return n},f=(e,t)=>d(t).reduce((n,r)=>{if(typeof n!=`object`)throw new i(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);if(Array.isArray(n)){let e=parseInt(r);return n[e<0?n.length+e:e]}return n[r]},e),p=e=>e!=null,m=RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`),h=(e,t=!1)=>{if(!t)return m.test(e);let n=e.split(`.`);for(let e of n)if(!h(e))return!1;return!0};function g(e,t,n){return e?t:n}let _=e=>!e,v=RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`),y=e=>v.test(e)||e.startsWith(`[`)&&e.endsWith(`]`),b={[t.EndpointURLScheme.HTTP]:80,[t.EndpointURLScheme.HTTPS]:443},x=e=>{let n=(()=>{try{if(e instanceof URL)return e;if(typeof e==`object`&&`hostname`in e){let{hostname:t,port:n,protocol:r=``,path:i=``,query:a={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:``}${i}`);return o.search=Object.entries(a).map(([e,t])=>`${e}=${t}`).join(`&`),o}return new URL(e)}catch{return null}})();if(!n)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let r=n.href,{host:i,hostname:a,pathname:o,protocol:s,search:c}=n;if(c)return null;let l=s.slice(0,-1);if(!Object.values(t.EndpointURLScheme).includes(l))return null;let u=y(a);return{scheme:l,authority:`${i}${r.includes(`${i}:${b[l]}`)||typeof e==`string`&&e.includes(`${i}:${b[l]}`)?`:${b[l]}`:``}`,path:o,normalizedPath:o.endsWith(`/`)?o:`${o}/`,isIp:u}};function S(e,t,n){if(n===1)return[e];if(e===``)return[``];let r=e.split(t);return n===0?r:r.slice(0,n-1).concat(r.slice(1).join(t))}let C={booleanEquals:l,coalesce:u,getAttr:f,isSet:p,isValidHostLabel:h,ite:g,not:_,parseURL:x,split:S,stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>e==null||t>=n||e.lengthencodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},w=(e,t)=>{let n=[],{referenceRecord:r,endpointParams:i}=t,a=0;for(;at.referenceRecord[e]??t.endpointParams[e],E=(e,t,n)=>{if(typeof e==`string`)return w(e,n);if(e.fn)return O.callFunction(e,n);if(e.ref)return T(e,n);throw new i(`'${t}': ${String(e)} is not a string, function or reference.`)},D=({fn:e,argv:t},n)=>{let r=Array(t.length);for(let e=0;e{if(e&&e in n.referenceRecord)throw new i(`'${e}' is already defined in Reference Record.`);let r=D(t,n);return n.logger?.debug?.(`${a} evaluateCondition: ${s(t)} = ${s(r)}`),{result:r===``?!0:!!r,...e!=null&&{toAssign:{name:e,value:r}}}},k=(e,t)=>Object.entries(e??{}).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{let r=E(e,`Header value entry`,t);if(typeof r!=`string`)throw new i(`Header '${n}' value '${r}' is not a string`);return r})}),{}),A=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:M.getEndpointProperty(r,t)}),{}),j=(e,t)=>{if(Array.isArray(e))return e.map(e=>j(e,t));switch(typeof e){case`string`:return w(e,t);case`object`:if(e===null)throw new i(`Unexpected endpoint property: ${e}`);return M.getEndpointProperties(e,t);case`boolean`:return e;default:throw new i(`Unexpected endpoint property type: ${typeof e}`)}},M={getEndpointProperty:j,getEndpointProperties:A},N=(e,t)=>{let n=E(e,`Endpoint URL`,t);if(typeof n==`string`)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new i(`Endpoint URL must be a string, got ${typeof n}`)},P=1e8,F=(e,t)=>{let{nodes:n,root:r,results:a,conditions:o}=e,s=r,c={},l={referenceRecord:c,endpointParams:t.endpointParams,logger:t.logger};for(;s!==1&&s!==-1&&s=0===f.result?r:i}if(s>=P){let e=a[s-P];if(e[0]===-1){let[,t]=e;throw new i(E(t,`Error`,l))}let[t,n,r]=e;return{url:N(t,l),properties:A(n,l),headers:k(r??{},l)}}throw new i(`No matching endpoint.`)},I=(e=[],t)=>{let n={};for(let r of e){let{result:e,toAssign:i}=ee(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${a} assign: ${i.name} := ${s(i.value)}`))}return{result:!0,referenceRecord:n}},L=(e,t)=>{let{conditions:n,endpoint:r}=e,{result:i,referenceRecord:o}=I(n,t);if(!i)return;let c={...t,referenceRecord:{...t.referenceRecord,...o}},{url:l,properties:u,headers:d}=r;return t.logger?.debug?.(`${a} Resolving endpoint from template: ${s(r)}`),{...d!=null&&{headers:k(d,c)},...u!=null&&{properties:A(u,c)},url:N(l,c)}},R=(e,t)=>{let{conditions:n,error:r}=e,{result:a,referenceRecord:o}=I(n,t);if(a)throw new i(E(r,`Error`,{...t,referenceRecord:{...t.referenceRecord,...o}}))},te=(e,t)=>{for(let n of e)if(n.type===`endpoint`){let e=L(n,t);if(e)return e}else if(n.type===`error`)R(n,t);else if(n.type===`tree`){let e=z.evaluateTreeRule(n,t);if(e)return e}else throw new i(`Unknown endpoint rule: ${n}`);throw new i(`Rules evaluation failed`)},z={evaluateRules:te,evaluateTreeRule:(e,t)=>{let{conditions:n,rules:r}=e,{result:i,referenceRecord:a}=I(n,t);if(i)return z.evaluateRules(r,{...t,referenceRecord:{...t.referenceRecord,...a}})}};e.BinaryDecisionDiagram=n,e.EndpointCache=r,e.EndpointError=i,e.customEndpointFunctions=c,e.decideEndpoint=F,e.isIpAddress=y,e.isValidHostLabel=h,e.resolveEndpoint=(e,t)=>{let{endpointParams:n,logger:r}=t,{parameters:o,rules:c}=e;t.logger?.debug?.(`${a} Initial EndpointParams: ${s(n)}`);for(let e in o){let t=o[e],r=n[e];if(r==null&&t.default!=null){n[e]=t.default;continue}if(t.required&&r==null)throw new i(`Missing required parameter: '${e}'`)}let l=te(c,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${a} Resolved endpoint: ${s(l)}`),l}})),Ur=a((e=>{var t=Hr(),n=se();let r=(e,n=!1)=>{if(n){for(let t of e.split(`.`))if(!r(t))return!1;return!0}return!(!t.isValidHostLabel(e)||e.length<3||e.length>63||e!==e.toLowerCase()||t.isIpAddress(e))},i=e=>{let t=e.split(`:`);if(t.length<6)return null;let[n,r,i,a,o,...s]=t;return n!==`arn`||r===``||i===``||s.join(`:`)===``?null:{partition:r,service:i,region:a,accountId:o,resourceId:s.map(e=>e.split(`/`)).flat()}};var a={partitions:[{id:`aws`,outputs:{dnsSuffix:`amazonaws.com`,dualStackDnsSuffix:`api.aws`,implicitGlobalRegion:`us-east-1`,name:`aws`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$`,regions:{"af-south-1":{description:`Africa (Cape Town)`},"ap-east-1":{description:`Asia Pacific (Hong Kong)`},"ap-east-2":{description:`Asia Pacific (Taipei)`},"ap-northeast-1":{description:`Asia Pacific (Tokyo)`},"ap-northeast-2":{description:`Asia Pacific (Seoul)`},"ap-northeast-3":{description:`Asia Pacific (Osaka)`},"ap-south-1":{description:`Asia Pacific (Mumbai)`},"ap-south-2":{description:`Asia Pacific (Hyderabad)`},"ap-southeast-1":{description:`Asia Pacific (Singapore)`},"ap-southeast-2":{description:`Asia Pacific (Sydney)`},"ap-southeast-3":{description:`Asia Pacific (Jakarta)`},"ap-southeast-4":{description:`Asia Pacific (Melbourne)`},"ap-southeast-5":{description:`Asia Pacific (Malaysia)`},"ap-southeast-6":{description:`Asia Pacific (New Zealand)`},"ap-southeast-7":{description:`Asia Pacific (Thailand)`},"aws-global":{description:`aws global region`},"ca-central-1":{description:`Canada (Central)`},"ca-west-1":{description:`Canada West (Calgary)`},"eu-central-1":{description:`Europe (Frankfurt)`},"eu-central-2":{description:`Europe (Zurich)`},"eu-north-1":{description:`Europe (Stockholm)`},"eu-south-1":{description:`Europe (Milan)`},"eu-south-2":{description:`Europe (Spain)`},"eu-west-1":{description:`Europe (Ireland)`},"eu-west-2":{description:`Europe (London)`},"eu-west-3":{description:`Europe (Paris)`},"il-central-1":{description:`Israel (Tel Aviv)`},"me-central-1":{description:`Middle East (UAE)`},"me-south-1":{description:`Middle East (Bahrain)`},"mx-central-1":{description:`Mexico (Central)`},"sa-east-1":{description:`South America (Sao Paulo)`},"us-east-1":{description:`US East (N. Virginia)`},"us-east-2":{description:`US East (Ohio)`},"us-west-1":{description:`US West (N. California)`},"us-west-2":{description:`US West (Oregon)`}}},{id:`aws-cn`,outputs:{dnsSuffix:`amazonaws.com.cn`,dualStackDnsSuffix:`api.amazonwebservices.com.cn`,implicitGlobalRegion:`cn-northwest-1`,name:`aws-cn`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^cn\\-\\w+\\-\\d+$`,regions:{"aws-cn-global":{description:`aws-cn global region`},"cn-north-1":{description:`China (Beijing)`},"cn-northwest-1":{description:`China (Ningxia)`}}},{id:`aws-eusc`,outputs:{dnsSuffix:`amazonaws.eu`,dualStackDnsSuffix:`api.amazonwebservices.eu`,implicitGlobalRegion:`eusc-de-east-1`,name:`aws-eusc`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^eusc\\-(de)\\-\\w+\\-\\d+$`,regions:{"eusc-de-east-1":{description:`AWS European Sovereign Cloud (Germany)`}}},{id:`aws-iso`,outputs:{dnsSuffix:`c2s.ic.gov`,dualStackDnsSuffix:`api.aws.ic.gov`,implicitGlobalRegion:`us-iso-east-1`,name:`aws-iso`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^us\\-iso\\-\\w+\\-\\d+$`,regions:{"aws-iso-global":{description:`aws-iso global region`},"us-iso-east-1":{description:`US ISO East`},"us-iso-west-1":{description:`US ISO WEST`}}},{id:`aws-iso-b`,outputs:{dnsSuffix:`sc2s.sgov.gov`,dualStackDnsSuffix:`api.aws.scloud`,implicitGlobalRegion:`us-isob-east-1`,name:`aws-iso-b`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^us\\-isob\\-\\w+\\-\\d+$`,regions:{"aws-iso-b-global":{description:`aws-iso-b global region`},"us-isob-east-1":{description:`US ISOB East (Ohio)`},"us-isob-west-1":{description:`US ISOB West`}}},{id:`aws-iso-e`,outputs:{dnsSuffix:`cloud.adc-e.uk`,dualStackDnsSuffix:`api.cloud-aws.adc-e.uk`,implicitGlobalRegion:`eu-isoe-west-1`,name:`aws-iso-e`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^eu\\-isoe\\-\\w+\\-\\d+$`,regions:{"aws-iso-e-global":{description:`aws-iso-e global region`},"eu-isoe-west-1":{description:`EU ISOE West`}}},{id:`aws-iso-f`,outputs:{dnsSuffix:`csp.hci.ic.gov`,dualStackDnsSuffix:`api.aws.hci.ic.gov`,implicitGlobalRegion:`us-isof-south-1`,name:`aws-iso-f`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^us\\-isof\\-\\w+\\-\\d+$`,regions:{"aws-iso-f-global":{description:`aws-iso-f global region`},"us-isof-east-1":{description:`US ISOF EAST`},"us-isof-south-1":{description:`US ISOF SOUTH`}}},{id:`aws-us-gov`,outputs:{dnsSuffix:`amazonaws.com`,dualStackDnsSuffix:`api.aws`,implicitGlobalRegion:`us-gov-west-1`,name:`aws-us-gov`,supportsDualStack:!0,supportsFIPS:!0},regionRegex:`^us\\-gov\\-\\w+\\-\\d+$`,regions:{"aws-us-gov-global":{description:`aws-us-gov global region`},"us-gov-east-1":{description:`AWS GovCloud (US-East)`},"us-gov-west-1":{description:`AWS GovCloud (US-West)`}}}],version:`1.1`};let o=a,s=``,c=e=>{let{partitions:t}=o;for(let n of t){let{regions:t,outputs:r}=n;for(let[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(let n of t){let{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}let n=t.find(e=>e.id===`aws`);if(!n)throw Error(`Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.`);return{...n.outputs}},l=(e,t=``)=>{o=e,s=t},u=()=>{l(a,``)},d=()=>s,f={isVirtualHostableS3Bucket:r,parseArn:i,partition:c};t.customEndpointFunctions.aws=f;let p=e=>{if(typeof e.endpointProvider!=`function`)throw Error(`@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.`);let{endpoint:t}=e;return t===void 0&&(e.endpoint=async()=>m(e.endpointProvider({Region:typeof e.region==`function`?await e.region():e.region,UseDualStack:typeof e.useDualstackEndpoint==`function`?await e.useDualstackEndpoint():e.useDualstackEndpoint,UseFIPS:typeof e.useFipsEndpoint==`function`?await e.useFipsEndpoint():e.useFipsEndpoint,Endpoint:void 0},{logger:e.logger}))),e},m=e=>n.parseUrl(e.url);e.EndpointError=t.EndpointError,e.isIpAddress=t.isIpAddress,e.resolveEndpoint=t.resolveEndpoint,e.awsEndpointFunctions=f,e.getUserAgentPrefix=d,e.partition=c,e.resolveDefaultAwsRegionalEndpointsConfig=p,e.setPartitionInfo=l,e.toEndpointV1=m,e.useDefaultPartitionInfo=u})),Wr=a((e=>{let t=[`AuthFailure`,`InvalidSignatureException`,`RequestExpired`,`RequestInTheFuture`,`RequestTimeTooSkewed`,`SignatureDoesNotMatch`],n=[`BandwidthLimitExceeded`,`EC2ThrottledException`,`LimitExceededException`,`PriorRequestNotComplete`,`ProvisionedThroughputExceededException`,`RequestLimitExceeded`,`RequestThrottled`,`RequestThrottledException`,`SlowDown`,`ThrottledException`,`Throttling`,`ThrottlingException`,`TooManyRequestsException`,`TransactionInProgressException`],r=[`TimeoutError`,`RequestTimeout`,`RequestTimeoutException`],i=[500,502,503,504],a=[`ECONNRESET`,`ECONNREFUSED`,`EPIPE`,`ETIMEDOUT`],o=[`EHOSTUNREACH`,`ENETUNREACH`,`ENOTFOUND`],s=e=>e?.$retryable!==void 0,c=e=>t.includes(e.name),l=e=>e.$metadata?.clockSkewCorrected,u=e=>{let t=new Set([`Failed to fetch`,`NetworkError when attempting to fetch resource`,`The Internet connection appears to be offline`,`Load failed`,`Network request failed`]);return e&&e instanceof TypeError?t.has(e.message):!1},d=e=>e.$metadata?.httpStatusCode===429||n.includes(e.name)||e.$retryable?.throttling==1,f=(e,t=0)=>s(e)||l(e)||r.includes(e.name)||a.includes(e?.code||``)||o.includes(e?.code||``)||i.includes(e.$metadata?.httpStatusCode||0)||u(e)||e.cause!==void 0&&t<=10&&f(e.cause,t+1);e.isBrowserNetworkError=u,e.isClockSkewCorrectedError=l,e.isClockSkewError=c,e.isRetryableByTrait=s,e.isServerError=e=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!f(e)}return!1},e.isThrottlingError=d,e.isTransientError=f})),Gr=a((e=>{var t=Wr();e.RETRY_MODES=void 0,(function(e){e.STANDARD=`standard`,e.ADAPTIVE=`adaptive`})(e.RETRY_MODES||={});let n=e.RETRY_MODES.STANDARD;var r=class e{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,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(e){let n;this.updateMeasuredRate();let r=e;if(r?.errorType===`THROTTLING`||t.isThrottlingError(r?.error??e)){let e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),n=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),n=this.cubicSuccess(this.getCurrentTimeInSeconds());let i=Math.min(n,2*this.measuredTxRate);this.updateTokenBucketRate(i)}getCurrentTimeInSeconds(){return Date.now()/1e3}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.availableTokens){let n=(t-this.availableTokens)/this.fillRate*1e3;await new Promise(t=>e.setTimeoutFn(t,n))}this.availableTokens-=t}}refillTokenBucket(){let e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}let t=(e-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+t),this.lastTimestamp=e}calculateTimeWindow(){this.timeWindow=this.getPrecise((this.lastMaxRate*(1-this.beta)/this.scaleConstant)**(1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*(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(),t=Math.floor(e*2)/2;if(this.requestCount++,t>this.lastTxRateBucket){let e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}};let i=20*1e3;var a=class e{static v2026=typeof process<`u`&&process.env?.SMITHY_NEW_RETRIES_2026===`true`;static delay(){return e.v2026?50:100}static throttlingDelay(){return e.v2026?1e3:500}static cost(){return e.v2026?14:5}static throttlingCost(){return e.v2026?5:10}static modifiedCostType(){return e.v2026?`THROTTLING`:`TRANSIENT`}},o=class{x=a.delay();computeNextBackoffDelay(e){let t=Math.random()*Math.min(this.x*2**e,i);return Math.floor(t)}setDelayBase(e){this.x=e}},s=class{delay;count;cost;longPoll;constructor(e,t,n,r){this.delay=e,this.count=t,this.cost=n,this.longPoll=r}getRetryCount(){return this.count}getRetryDelay(){return Math.min(i,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}},c=class{mode=e.RETRY_MODES.STANDARD;capacity=500;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(e){typeof e==`number`?this.maxAttemptsProvider=async()=>e:typeof e==`function`?this.maxAttemptsProvider=e:e&&typeof e==`object`&&(this.maxAttemptsProvider=async()=>e.maxAttempts,this.baseDelay=e.baseDelay,this.retryBackoffStrategy=e.backoff),this.maxAttemptsProvider??=async()=>3,this.baseDelay??=a.delay(),this.retryBackoffStrategy??=new o}async acquireInitialRetryToken(e){return new s(a.delay(),0,void 0,a.v2026&&e.includes(`:longpoll`))}async refreshRetryTokenForRetry(e,t){let n=await this.getMaxAttempts(),r=this.shouldRetry(e,t,n);if(r||e.isLongPoll?.()){let n=t.errorType;this.retryBackoffStrategy.setDelayBase(n===`THROTTLING`?a.throttlingDelay():this.baseDelay);let i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),o=i;if(t.retryAfterHint instanceof Date&&(o=Math.max(i,Math.min(t.retryAfterHint.getTime()-Date.now(),i+5e3))),r){let t=this.getCapacityCost(n);return this.capacity-=t,new s(o,e.getRetryCount()+1,t,e.isLongPoll?.()??!1)}else throw Object.assign(Error(`No retry token available`),{$backoff:a.v2026?o:0})}throw Error(`No retry token available`)}recordSuccess(e){this.capacity=Math.min(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of 3`),3}}shouldRetry(e,t,n){return e.getRetryCount()+1=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e===a.modifiedCostType()?a.throttlingCost():a.cost()}isRetryableError(e){return e===`THROTTLING`||e===`TRANSIENT`}async maxAttempts(){return this.maxAttemptsProvider()}},l=class{mode=e.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(e,t){let{rateLimiter:n}=t??{};this.rateLimiter=n??new r,this.standardRetryStrategy=t?new c({maxAttempts:typeof e==`number`?e:3,...t}):new c(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}},u=class extends c{computeNextBackoffDelay;constructor(e,t=a.delay()){super(typeof e==`function`?e:async()=>e),typeof t==`number`?this.computeNextBackoffDelay=()=>t:this.computeNextBackoffDelay=t}async refreshRetryTokenForRetry(e,t){let n=await super.refreshRetryTokenForRetry(e,t);return n.getRetryDelay=()=>this.computeNextBackoffDelay(n.getRetryCount()),n}};e.AdaptiveRetryStrategy=l,e.ConfiguredRetryStrategy=u,e.DEFAULT_MAX_ATTEMPTS=3,e.DEFAULT_RETRY_DELAY_BASE=100,e.DEFAULT_RETRY_MODE=n,e.DefaultRateLimiter=r,e.INITIAL_RETRY_TOKENS=500,e.INVOCATION_ID_HEADER=`amz-sdk-invocation-id`,e.MAXIMUM_RETRY_DELAY=i,e.NO_RETRY_INCREMENT=1,e.REQUEST_HEADER=`amz-sdk-request`,e.RETRY_COST=5,e.Retry=a,e.StandardRetryStrategy=c,e.THROTTLING_RETRY_DELAY_BASE=500,e.TIMEOUT_RETRY_COST=10})),Kr=a((t=>{var n=(Vr(),e(Br)),r=Ur(),i=s(),a=(c(),e(u)),o=Gr();function l(e){return e===void 0?!0:typeof e==`string`&&e.length<=50}function d(e){let t=n.normalizeProvider(e.userAgentAppId??void 0),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r==`string`?[[r]]:r,userAgentAppId:async()=>{let n=await t();if(!l(n)){let t=e.logger?.constructor?.name===`NoOpLogger`||!e.logger?console:e.logger;typeof n==`string`?n.length>50&&t?.warn(`The provided userAgentAppId exceeds the maximum length of 50 characters.`):t?.warn(`userAgentAppId must be a string or undefined.`)}return n}})}let f=/\d{12}\.ddb/;async function p(e,t,n){if(n.request?.headers?.[`smithy-protocol`]===`rpc-v2-cbor`&&a.setFeature(e,`PROTOCOL_RPC_V2_CBOR`,`M`),typeof t.retryStrategy==`function`){let n=await t.retryStrategy();if(typeof n.mode==`string`)switch(n.mode){case o.RETRY_MODES.ADAPTIVE:a.setFeature(e,`RETRY_MODE_ADAPTIVE`,`F`);break;case o.RETRY_MODES.STANDARD:a.setFeature(e,`RETRY_MODE_STANDARD`,`E`);break}}if(typeof t.accountIdEndpointMode==`function`){let n=e.endpointV2;switch(String(n?.url?.hostname).match(f)&&a.setFeature(e,`ACCOUNT_ID_ENDPOINT`,`O`),await t.accountIdEndpointMode?.()){case`disabled`:a.setFeature(e,`ACCOUNT_ID_MODE_DISABLED`,`Q`);break;case`preferred`:a.setFeature(e,`ACCOUNT_ID_MODE_PREFERRED`,`P`);break;case`required`:a.setFeature(e,`ACCOUNT_ID_MODE_REQUIRED`,`R`);break}}let r=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){let t=r;t.accountId&&a.setFeature(e,`RESOLVED_ACCOUNT_ID`,`T`);for(let[n,r]of Object.entries(t.$source??{}))a.setFeature(e,n,r)}}let m=`user-agent`,h=`x-amz-user-agent`,g=/[^!$%&'*+\-.^_`|~\w]/g,_=/[^!$%&'*+\-.^_`|~\w#]/g;function v(e){let t=``;for(let n in e){let r=e[n];if(t.length+r.length+1<=1024){t.length?t+=`,`+r:t+=r;continue}break}return t}let y=e=>(t,n)=>async a=>{let{request:o}=a;if(!i.HttpRequest.isInstance(o))return t(a);let{headers:s}=o,c=n?.userAgent?.map(b)||[],l=(await e.defaultUserAgentProvider()).map(b);await p(n,e,a);let u=n;l.push(`m/${v(Object.assign({},n.__smithy_context?.features,u.__aws_sdk_context?.features))}`);let d=e?.customUserAgent?.map(b)||[],f=await e.userAgentAppId();f&&l.push(b([`app`,`${f}`]));let g=r.getUserAgentPrefix(),_=(g?[g]:[]).concat([...l,...c,...d]).join(` `),y=[...l.filter(e=>e.startsWith(`aws-sdk-`)),...d].join(` `);return e.runtime===`browser`?s[h]=_:(y&&(s[h]=s[h]?`${s[m]} ${y}`:y),s[m]=_),t({...a,request:o})},b=e=>{let t=e[0].split(`/`).map(e=>e.replace(g,`-`)).join(`/`),n=e[1]?.replace(_,`-`),r=t.indexOf(`/`),i=t.substring(0,r),a=t.substring(r+1);return i===`api`&&(a=a.toLowerCase()),[i,a,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},``)},x={name:`getUserAgentMiddleware`,step:`build`,priority:`low`,tags:[`SET_USER_AGENT`,`USER_AGENT`],override:!0};t.DEFAULT_UA_APP_ID=void 0,t.getUserAgentMiddlewareOptions=x,t.getUserAgentPlugin=e=>({applyToStack:t=>{t.add(y(e),x)}}),t.resolveUserAgentConfig=d,t.userAgentMiddleware=y})),qr=a((e=>{var t=zn(),n=b(),r=Hr();let i=`AWS_USE_DUALSTACK_ENDPOINT`,a=`use_dualstack_endpoint`,o={environmentVariableSelector:e=>t.booleanSelector(e,i,t.SelectorType.ENV),configFileSelector:e=>t.booleanSelector(e,a,t.SelectorType.CONFIG),default:!1},s={environmentVariableSelector:e=>t.booleanSelector(e,i,t.SelectorType.ENV),configFileSelector:e=>t.booleanSelector(e,a,t.SelectorType.CONFIG),default:void 0},c=`AWS_USE_FIPS_ENDPOINT`,l=`use_fips_endpoint`,u={environmentVariableSelector:e=>t.booleanSelector(e,c,t.SelectorType.ENV),configFileSelector:e=>t.booleanSelector(e,l,t.SelectorType.CONFIG),default:!1},d={environmentVariableSelector:e=>t.booleanSelector(e,c,t.SelectorType.ENV),configFileSelector:e=>t.booleanSelector(e,l,t.SelectorType.CONFIG),default:void 0},f=e=>{let{tls:t,endpoint:r,urlParser:i,useDualstackEndpoint:a}=e;return Object.assign(e,{tls:t??!0,endpoint:n.normalizeProvider(typeof r==`string`?i(r):r),isCustomEndpoint:!0,useDualstackEndpoint:n.normalizeProvider(a??!1)})},p=async e=>{let{tls:t=!0}=e,n=await e.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(n))throw Error(`Invalid region in client config`);let r=await e.useDualstackEndpoint(),i=await e.useFipsEndpoint(),{hostname:a}=await e.regionInfoProvider(n,{useDualstackEndpoint:r,useFipsEndpoint:i})??{};if(!a)throw Error(`Cannot resolve hostname from client config`);return e.urlParser(`${t?`https:`:`http:`}//${a}`)},m=e=>{let t=n.normalizeProvider(e.useDualstackEndpoint??!1),{endpoint:r,useFipsEndpoint:i,urlParser:a,tls:o}=e;return Object.assign(e,{tls:o??!0,endpoint:r?n.normalizeProvider(typeof r==`string`?a(r):r):()=>p({...e,useDualstackEndpoint:t,useFipsEndpoint:i}),isCustomEndpoint:!!r,useDualstackEndpoint:t})},h=`AWS_REGION`,g=`region`,_={environmentVariableSelector:e=>e[h],configFileSelector:e=>e[g],default:()=>{throw Error(`Region is missing`)}},v={preferredFile:`credentials`},y=new Set,x=(e,t=r.isValidHostLabel)=>{if(!y.has(e)&&!t(e))if(e===`*`)console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);else throw Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else y.add(e)},S=e=>typeof e==`string`&&(e.startsWith(`fips-`)||e.endsWith(`-fips`)),C=e=>S(e)?[`fips-aws-global`,`aws-fips`].includes(e)?`us-east-1`:e.replace(/fips-(dkr-|prod-)?|-fips/,``):e,w=e=>{let{region:t,useFipsEndpoint:n}=e;if(!t)throw Error(`Region is missing`);return Object.assign(e,{region:async()=>{let e=C(typeof t==`function`?await t():t);return x(e),e},useFipsEndpoint:async()=>S(typeof t==`string`?t:await t())?!0:typeof n==`function`?n():Promise.resolve(!!n)})},T=(e=[],{useFipsEndpoint:t,useDualstackEndpoint:n})=>e.find(({tags:e})=>t===e.includes(`fips`)&&n===e.includes(`dualstack`))?.hostname,E=(e,{regionHostname:t,partitionHostname:n})=>t||(n?n.replace(`{region}`,e):void 0),D=(e,{partitionHash:t})=>Object.keys(t||{}).find(n=>t[n].regions.includes(e))??`aws`,O=(e,{signingRegion:t,regionRegex:n,useFipsEndpoint:r})=>{if(t)return t;if(r){let t=n.replace(`\\\\`,`\\`).replace(/^\^/g,`\\.`).replace(/\$$/g,`\\.`),r=e.match(t);if(r)return r[0].slice(1,-1)}};e.CONFIG_USE_DUALSTACK_ENDPOINT=a,e.CONFIG_USE_FIPS_ENDPOINT=l,e.DEFAULT_USE_DUALSTACK_ENDPOINT=!1,e.DEFAULT_USE_FIPS_ENDPOINT=!1,e.ENV_USE_DUALSTACK_ENDPOINT=i,e.ENV_USE_FIPS_ENDPOINT=c,e.NODE_REGION_CONFIG_FILE_OPTIONS=v,e.NODE_REGION_CONFIG_OPTIONS=_,e.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS=o,e.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS=u,e.REGION_ENV_NAME=h,e.REGION_INI_NAME=g,e.getRegionInfo=(e,{useFipsEndpoint:t=!1,useDualstackEndpoint:n=!1,signingService:r,regionHash:i,partitionHash:a})=>{let o=D(e,{partitionHash:a}),s=e in i?e:a[o]?.endpoint??e,c={useFipsEndpoint:t,useDualstackEndpoint:n},l=E(s,{regionHostname:T(i[s]?.variants,c),partitionHostname:T(a[o]?.variants,c)});if(l===void 0)throw Error(`Endpoint resolution failed for: [object Object]`);let u=O(l,{signingRegion:i[s]?.signingRegion,regionRegex:a[o].regionRegex,useFipsEndpoint:t});return{partition:o,signingService:r,hostname:l,...u&&{signingRegion:u},...i[s]?.signingService&&{signingService:i[s].signingService}}},e.nodeDualstackConfigSelectors=s,e.nodeFipsConfigSelectors=d,e.resolveCustomEndpointsConfig=f,e.resolveEndpointsConfig=m,e.resolveRegionConfig=w})),Jr=a((e=>{var t=s();let n=`content-length`;function r(e){return r=>async i=>{let a=i.request;if(t.HttpRequest.isInstance(a)){let{body:t,headers:r}=a;if(t&&Object.keys(r).map(e=>e.toLowerCase()).indexOf(n)===-1)try{let r=e(t);a.headers={...a.headers,[n]:String(r)}}catch{}}return r({...i,request:a})}}let i={step:`build`,tags:[`SET_CONTENT_LENGTH`,`CONTENT_LENGTH`],name:`contentLengthMiddleware`,override:!0};e.contentLengthMiddleware=r,e.contentLengthMiddlewareOptions=i,e.getContentLengthPlugin=e=>({applyToStack:t=>{t.add(r(e.bodyLengthChecker),i)}})})),Yr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getEndpointUrlConfig=void 0;let t=le(),n=`AWS_ENDPOINT_URL`,r=`endpoint_url`;e.getEndpointUrlConfig=e=>({environmentVariableSelector:t=>{let r=t[[n,...e.split(` `).map(e=>e.toUpperCase())].join(`_`)];if(r)return r;let i=t[n];if(i)return i},configFileSelector:(n,i)=>{if(i&&n.services){let a=i[[`services`,n.services].join(t.CONFIG_PREFIX_SEPARATOR)];if(a){let n=a[[e.split(` `).map(e=>e.toLowerCase()).join(`_`),r].join(t.CONFIG_PREFIX_SEPARATOR)];if(n)return n}}let a=n[r];if(a)return a},default:void 0})})),Xr=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getEndpointFromConfig=void 0;let t=ue(),n=Yr();e.getEndpointFromConfig=async e=>(0,t.loadConfig)((0,n.getEndpointUrlConfig)(e??``))()})),Zr=a((t=>{var n=s(),r=(M(),e(m));let i=(e,t)=>(r,i)=>async o=>{let{response:s}=await r(o);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,`$response`,{value:s,enumerable:!1,writable:!1,configurable:!1}),!(`$metadata`in e)){let t=`Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;try{e.message+=` - `+t}catch{!i.logger||i.logger?.constructor?.name===`NoOpLogger`?console.warn(t):i.logger?.warn?.(t)}e.$responseBodyText!==void 0&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(n.HttpResponse.isInstance(s)){let{headers:t={}}=s,n=Object.entries(t);e.$metadata={httpStatusCode:s.statusCode,requestId:a(/^x-[\w-]+-request-?id$/,n),extendedRequestId:a(/^x-[\w-]+-id-2$/,n),cfId:a(/^x-[\w-]+-cf-id$/,n)}}}catch{}}throw e}},a=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],o=(e,t)=>(n,i)=>async a=>{let o=e,s=i.endpointV2?async()=>r.toEndpointV1(i.endpointV2):o.endpoint;if(!s)throw Error(`No valid endpoint provider available.`);let c=await t(a.input,{...e,endpoint:s});return n({...a,request:c})},c={name:`deserializerMiddleware`,step:`deserialize`,tags:[`DESERIALIZER`],override:!0},l={name:`serializerMiddleware`,step:`serialize`,tags:[`SERIALIZER`],override:!0};function u(e,t,n){return{applyToStack:r=>{r.add(i(e,n),c),r.add(o(e,t),l)}}}t.deserializerMiddleware=i,t.deserializerMiddlewareOption=c,t.getSerdePlugin=u,t.serializerMiddleware=o,t.serializerMiddlewareOption=l})),Qr=a((t=>{var n=(Vr(),e(Br)),r=b(),i=Xr(),a=se(),o=Zr();let s=async e=>{let t=e?.Bucket||``;if(typeof e.Bucket==`string`&&(e.Bucket=t.replace(/#/g,`%23`).replace(/\?/g,`%3F`)),f(t)){if(e.ForcePathStyle===!0)throw Error(`Path-style addressing cannot be used with ARN buckets`)}else (!d(t)||t.indexOf(`.`)!==-1&&!String(e.Endpoint).startsWith(`http:`)||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},c=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,l=/(\d+\.){3}\d+/,u=/\.\./,d=e=>c.test(e)&&!l.test(e)&&!u.test(e),f=e=>{let[t,n,r,,,i]=e.split(`:`),a=t===`arn`&&e.split(`:`).length>=6,o=!!(a&&n&&r&&i);if(a&&!o)throw Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},p=(e,t,n,r=!1)=>{let i=async()=>{let i;return i=r?n.clientContextParams?.[e]??n[e]??n[t]:n[e]??n[t],typeof i==`function`?i():i};return e===`credentialScope`||t===`CredentialScope`?async()=>{let e=typeof n.credentials==`function`?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:e===`accountId`||t===`AccountId`?async()=>{let e=typeof n.credentials==`function`?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:e===`endpoint`||t===`endpoint`?async()=>{if(n.isCustomEndpoint===!1)return;let e=await i();if(e&&typeof e==`object`){if(`url`in e)return e.url.href;if(`hostname`in e){let{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?`:`+r:``}${i}`}}return e}:i},m=e=>{if(typeof e==`object`){if(`url`in e){let t=a.parseUrl(e.url);if(e.headers){t.headers={};for(let[n,r]of Object.entries(e.headers))t.headers[n.toLowerCase()]=r.join(`, `)}return t}return e}return a.parseUrl(e)},h=async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await i.getEndpointFromConfig(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(m(e)),n.isCustomEndpoint=!0)}let a=await g(e,t,n);if(typeof n.endpointProvider!=`function`)throw Error(`config.endpointProvider is not set.`);let o=n.endpointProvider(a,r);if(n.isCustomEndpoint&&n.endpoint){let e=await n.endpoint();if(e?.headers){o.headers??={};for(let[t,n]of Object.entries(e.headers))o.headers[t]=Array.isArray(n)?n:[n]}}return o},g=async(e,t,n)=>{let r={},i=t?.getEndpointParameterInstructions?.()||{};for(let[t,a]of Object.entries(i))switch(a.type){case`staticContextParams`:r[t]=a.value;break;case`contextParams`:r[t]=e[a.name];break;case`clientContextParams`:case`builtInParams`:r[t]=await p(a.name,t,n,a.type!==`builtInParams`)();break;case`operationContextParams`:r[t]=a.get(e);break;default:throw Error(`Unrecognized endpoint parameter instruction: `+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(r,n),String(n.serviceId).toLowerCase()===`s3`&&await s(r),r},_=({config:e,instructions:t})=>(i,a)=>async o=>{e.isCustomEndpoint&&n.setFeature(a,`ENDPOINT_OVERRIDE`,`N`);let s=await h(o.input,{getEndpointParameterInstructions(){return t}},{...e},a);a.endpointV2=s,a.authSchemes=s.properties?.authSchemes;let c=a.authSchemes?.[0];if(c){a.signing_region=c.signingRegion,a.signing_service=c.signingName;let e=r.getSmithyContext(a)?.selectedHttpAuthScheme?.httpAuthOption;e&&(e.signingProperties=Object.assign(e.signingProperties||{},{signing_region:c.signingRegion,signingRegion:c.signingRegion,signing_service:c.signingName,signingName:c.signingName,signingRegionSet:c.signingRegionSet},c.properties))}return i({...o})},v={step:`serialize`,tags:[`ENDPOINT_PARAMETERS`,`ENDPOINT_V2`,`ENDPOINT`],name:`endpointV2Middleware`,override:!0,relation:`before`,toMiddleware:o.serializerMiddlewareOption.name};t.endpointMiddleware=_,t.endpointMiddlewareOptions=v,t.getEndpointFromInstructions=h,t.getEndpointPlugin=(e,t)=>({applyToStack:n=>{n.addRelativeTo(_({config:e,instructions:t}),v)}}),t.resolveEndpointConfig=e=>{let t=e.tls??!0,{endpoint:n,useDualstackEndpoint:a,useFipsEndpoint:o}=e,s=Object.assign(e,{endpoint:n==null?void 0:async()=>m(await r.normalizeProvider(n)()),tls:t,isCustomEndpoint:!!n,useDualstackEndpoint:r.normalizeProvider(a??!1),useFipsEndpoint:r.normalizeProvider(o??!1)}),c;return s.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=i.getEndpointFromConfig(e.serviceId)),c),s},t.resolveEndpointRequiredConfig=e=>{let{endpoint:t}=e;return t===void 0&&(e.endpoint=async()=>{throw Error(`@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.`)}),e},t.resolveParams=g,t.toEndpointV1=m})),$r=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isStreamingPayload=void 0;let n=t(`stream`);e.isStreamingPayload=e=>e?.body instanceof n.Readable||typeof ReadableStream<`u`&&e?.body instanceof ReadableStream})),ei=a((t=>{var n=Gr(),r=s(),i=Wr(),a=E(),o=b(),c=z(),l=$r(),u=(L(),e(P));let d=e=>e instanceof Error?e:e instanceof Object?Object.assign(Error(),e):Error(typeof e==`string`?e:`AWS SDK error wrapper for ${e}`),f=(e,t)=>{let r=e,i=n.NO_RETRY_INCREMENT,a=n.RETRY_COST,o=n.TIMEOUT_RETRY_COST,s=e,c=e=>e.name===`TimeoutError`?o:a,l=e=>c(e)<=s;return Object.freeze({hasRetryTokens:l,retrieveRetryTokens:e=>{if(!l(e))throw Error(`No retry token available`);let t=c(e);return s-=t,t},releaseRetryTokens:e=>{s+=e??i,s=Math.min(s,r)}})},p=(e,t)=>Math.floor(Math.min(n.MAXIMUM_RETRY_DELAY,Math.random()*2**t*e)),m=e=>e?i.isRetryableByTrait(e)||i.isClockSkewError(e)||i.isThrottlingError(e)||i.isTransientError(e):!1;var h=class{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=n.RETRY_MODES.STANDARD;constructor(e,t){this.maxAttemptsProvider=e,this.retryDecider=t?.retryDecider??m,this.delayDecider=t?.delayDecider??p,this.retryQuota=t?.retryQuota??f(n.INITIAL_RETRY_TOKENS)}shouldRetry(e,t,n){return tsetTimeout(e,a));continue}throw t.$metadata||={},t.$metadata.attempts=c,t.$metadata.totalRetryDelay=l,t}}};let g=e=>{if(!r.HttpResponse.isInstance(e))return;let t=Object.keys(e.headers).find(e=>e.toLowerCase()===`retry-after`);if(!t)return;let n=e.headers[t],i=Number(n);return Number.isNaN(i)?new Date(n).getTime()-Date.now():i*1e3};var _=class extends h{rateLimiter;constructor(e,t){let{rateLimiter:r,...i}=t??{};super(e,i),this.rateLimiter=r??new n.DefaultRateLimiter,this.mode=n.RETRY_MODES.ADAPTIVE}async retry(e,t){return super.retry(e,t,{beforeRequest:async()=>this.rateLimiter.getSendToken(),afterRequest:e=>{this.rateLimiter.updateClientSendingRate(e)}})}};let v=`AWS_MAX_ATTEMPTS`,y=`max_attempts`,x={environmentVariableSelector:e=>{let t=e[v];if(!t)return;let n=parseInt(t);if(Number.isNaN(n))throw Error(`Environment variable ${v} mast be a number, got "${t}"`);return n},configFileSelector:e=>{let t=e[y];if(!t)return;let n=parseInt(t);if(Number.isNaN(n))throw Error(`Shared config file entry ${y} mast be a number, got "${t}"`);return n},default:n.DEFAULT_MAX_ATTEMPTS},S=e=>{let{retryStrategy:t,retryMode:r}=e,i=o.normalizeProvider(e.maxAttempts??n.DEFAULT_MAX_ATTEMPTS),a=t?Promise.resolve(t):void 0,s=async()=>await o.normalizeProvider(r)()===n.RETRY_MODES.ADAPTIVE?new n.AdaptiveRetryStrategy(i):new n.StandardRetryStrategy(i);return Object.assign(e,{maxAttempts:i,retryStrategy:()=>a??=s()})},C=`AWS_RETRY_MODE`,w=`retry_mode`,T={environmentVariableSelector:e=>e[C],configFileSelector:e=>e[w],default:n.DEFAULT_RETRY_MODE},D=()=>e=>async t=>{let{request:i}=t;return r.HttpRequest.isInstance(i)&&(delete i.headers[n.INVOCATION_ID_HEADER],delete i.headers[n.REQUEST_HEADER]),e(t)},O={name:`omitRetryHeadersMiddleware`,tags:[`RETRY`,`HEADERS`,`OMIT_RETRY_HEADERS`],relation:`before`,toMiddleware:`awsAuthMiddleware`,override:!0},ee=e=>({applyToStack:e=>{e.addRelativeTo(D(),O)}});function k(e,t){if(r.HttpResponse.isInstance(e))for(let n of Object.keys(e.headers)){let r=n.toLowerCase();if(r===`retry-after`){let r=e.headers[n],i=NaN;if(r.endsWith(`GMT`))try{i=(u.parseRfc7231DateTime(r).getTime()-Date.now())/1e3}catch(e){t?.trace?.(`Failed to parse retry-after header`),t?.trace?.(e)}else r.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?i=Number(r.match(/ GMT, ([\d.]+)$/)?.[1]):r.match(/^((\d+)|(\d+\.\d+))$/)?i=Number(r):Date.parse(r)>=Date.now()&&(i=(Date.parse(r)-Date.now())/1e3);return isNaN(i)?void 0:new Date(Date.now()+i*1e3)}else if(r===`x-amz-retry-after`){let r=e.headers[n],i=Number(r);if(isNaN(i)){t?.trace?.(`Failed to parse x-amz-retry-after=${r}`);return}return new Date(Date.now()+i)}}}function A(e,t){return k(e,t)}let j=e=>(t,i)=>async o=>{let s=await e.retryStrategy(),u=await e.maxAttempts();if(N(s)){s=s;let f=await s.acquireInitialRetryToken((i.partition_id??``)+(i.__retryLongPoll?`:longpoll`:``)),p=Error(),m=0,h=0,{request:g}=o,_=r.HttpRequest.isInstance(g);for(_&&(g.headers[n.INVOCATION_ID_HEADER]=a.v4());;)try{_&&(g.headers[n.REQUEST_HEADER]=`attempt=${m+1}; max=${u}`);let{response:e,output:r}=await t(o);return s.recordSuccess(f),r.$metadata.attempts=m+1,r.$metadata.totalRetryDelay=h,{response:e,output:r}}catch(t){let n=F(t,e.logger);if(p=d(t),_&&l.isStreamingPayload(g))throw(i.logger instanceof c.NoOpLogger?console:i.logger)?.warn(`An error was encountered in a non-retryable streaming request.`),p;try{f=await s.refreshRetryTokenForRetry(f,n)}catch(e){throw typeof e.$backoff==`number`&&await M(e.$backoff),p.$metadata||={},p.$metadata.attempts=m+1,p.$metadata.totalRetryDelay=h,p}m=f.getRetryCount();let r=f.getRetryDelay();h+=r,await M(r)}}else return s=s,s?.mode&&(i.userAgent=[...i.userAgent||[],[`cfg/retry-mode`,s.mode]]),s.retry(t,o)},M=e=>new Promise(t=>setTimeout(t,e)),N=e=>e.acquireInitialRetryToken!==void 0&&e.refreshRetryTokenForRetry!==void 0&&e.recordSuccess!==void 0,F=(e,t)=>{let n={error:e,errorType:I(e)},r=k(e.$response,t);return r&&(n.retryAfterHint=r),n},I=e=>i.isThrottlingError(e)?`THROTTLING`:i.isTransientError(e)?`TRANSIENT`:i.isServerError(e)?`SERVER_ERROR`:`CLIENT_ERROR`,R={name:`retryMiddleware`,tags:[`RETRY`],step:`finalizeRequest`,priority:`high`,override:!0};t.AdaptiveRetryStrategy=_,t.CONFIG_MAX_ATTEMPTS=y,t.CONFIG_RETRY_MODE=w,t.ENV_MAX_ATTEMPTS=v,t.ENV_RETRY_MODE=C,t.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=x,t.NODE_RETRY_MODE_CONFIG_OPTIONS=T,t.StandardRetryStrategy=h,t.defaultDelayDecider=p,t.defaultRetryDecider=m,t.getOmitRetryHeadersPlugin=ee,t.getRetryAfterHint=A,t.getRetryPlugin=e=>({applyToStack:t=>{t.add(j(e),R)}}),t.omitRetryHeadersMiddleware=D,t.omitRetryHeadersMiddlewareOptions=O,t.resolveRetryConfig=S,t.retryMiddleware=j,t.retryMiddlewareOptions=R})),ti,ni,ri=n((()=>{ti=s(),ni=e=>ti.HttpResponse.isInstance(e)?e.headers?.date??e.headers?.Date:void 0})),ii,ai=n((()=>{ii=e=>new Date(Date.now()+e)})),oi,si=n((()=>{ai(),oi=(e,t)=>Math.abs(ii(t).getTime()-e)>=3e5})),ci,li=n((()=>{si(),ci=(e,t)=>{let n=Date.parse(e);return oi(n,t)?n-Date.now():t}})),ui=n((()=>{ri(),ai(),li()})),di,fi,pi,mi,hi,gi=n((()=>{di=s(),ui(),fi=(e,t)=>{if(!t)throw Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},pi=async e=>{let t=fi(`context`,e.context),n=fi(`config`,e.config),r=t.endpointV2?.properties?.authSchemes?.[0];return{config:n,signer:await fi(`signer`,n.signer)(r),signingRegion:e?.signingRegion,signingRegionSet:e?.signingRegionSet,signingName:e?.signingName}},mi=class{async sign(e,t,n){if(!di.HttpRequest.isInstance(e))throw Error("The request is not an instance of `HttpRequest` and cannot be signed");let r=await pi(n),{config:i,signer:a}=r,{signingRegion:o,signingName:s}=r,c=n.context;if(c?.authSchemes?.length??!1){let[e,t]=c.authSchemes;e?.name===`sigv4a`&&t?.name===`sigv4`&&(o=t?.signingRegion??o,s=t?.signingName??s)}return await a.sign(e,{signingDate:ii(i.systemClockOffset),signingRegion:o,signingService:s})}errorHandler(e){return t=>{let n=t.ServerTime??ni(t.$response);if(n){let r=fi(`config`,e.config),i=r.systemClockOffset;r.systemClockOffset=ci(n,r.systemClockOffset),r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){let n=ni(e);if(n){let e=fi(`config`,t.config);e.systemClockOffset=ci(n,e.systemClockOffset)}}},hi=mi})),_i,vi,yi=n((()=>{_i=s(),ui(),gi(),vi=class extends mi{async sign(e,t,n){if(!_i.HttpRequest.isInstance(e))throw Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:r,signer:i,signingRegion:a,signingRegionSet:o,signingName:s}=await pi(n),c=(await r.sigv4aSigningRegionSet?.()??o??[a]).join(`,`);return await i.sign(e,{signingDate:ii(r.systemClockOffset),signingRegion:c,signingService:s})}}})),bi,xi=n((()=>{bi=e=>typeof e==`string`&&e.length>0?e.split(`,`).map(e=>e.trim()):[]})),Si,Ci=n((()=>{Si=e=>`AWS_BEARER_TOKEN_${e.replace(/[\s-]/g,`_`).toUpperCase()}`})),wi,Ti,Ei,Di=n((()=>{xi(),Ci(),wi=`AWS_AUTH_SCHEME_PREFERENCE`,Ti=`auth_scheme_preference`,Ei={environmentVariableSelector:(e,t)=>{if(t?.signingName&&Si(t.signingName)in e)return[`httpBearerAuth`];if(wi in e)return bi(e[wi])},configFileSelector:e=>{if(Ti in e)return bi(e[Ti])},default:[]}})),Oi,ki,Ai,ji=n((()=>{Vr(),Oi=ce(),ki=e=>(e.sigv4aSigningRegionSet=fr(e.sigv4aSigningRegionSet),e),Ai={environmentVariableSelector(e){if(e.AWS_SIGV4A_SIGNING_REGION_SET)return e.AWS_SIGV4A_SIGNING_REGION_SET.split(`,`).map(e=>e.trim());throw new Oi.ProviderError(`AWS_SIGV4A_SIGNING_REGION_SET not set in env.`,{tryNextLink:!0})},configFileSelector(e){if(e.sigv4a_signing_region_set)return(e.sigv4a_signing_region_set??``).split(`,`).map(e=>e.trim());throw new Oi.ProviderError(`sigv4a_signing_region_set not set in profile.`,{tryNextLink:!0})},default:void 0}}));function Mi(e,{credentials:t,credentialDefaultProvider:n}){let r;return r=t?t?.memoized?t:Lr(t,Fr,Ir):n?fr(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function Ni(e,t){if(t.configBound)return t;let n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}var Pi,Fi,Ii,Li=n((()=>{c(),Vr(),Pi=Rn(),Fi=e=>{let t=e.credentials,n=!!e.credentials,r;Object.defineProperty(e,`credentials`,{set(i){i&&i!==t&&i!==r&&(n=!0),t=i;let a=Ni(e,Mi(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}));if(n&&!a.attributed){let e=typeof t==`object`&&!!t;r=async t=>{let n=await a(t);return e&&(!n.$source||Object.keys(n.$source).length===0)?l(n,`CREDENTIALS_CODE`,`e`):n},r.memoized=a.memoized,r.configBound=a.configBound,r.attributed=!0}else r=a},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;let{signingEscapePath:i=!0,systemClockOffset:a=e.systemClockOffset||0,sha256:o}=e,s;return s=e.signer?fr(e.signer):e.regionInfoProvider?()=>fr(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{let{signingRegion:r,signingService:a}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||a||e.serviceId;let s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Pi.SignatureV4)(s)}):async t=>{t=Object.assign({},{name:`sigv4`,signingName:e.signingName||e.defaultSigningName,signingRegion:await fr(e.region)(),properties:{}},t);let n=t.signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;let a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Pi.SignatureV4)(a)},Object.assign(e,{systemClockOffset:a,signingEscapePath:i,signer:s})},Ii=Fi})),Ri=n((()=>{gi(),yi(),Di(),ji(),Li()})),zi=i({AWSSDKSigV4Signer:()=>hi,AwsSdkSigV4ASigner:()=>vi,AwsSdkSigV4Signer:()=>mi,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:()=>Ei,NODE_SIGV4A_CONFIG_OPTIONS:()=>Ai,getBearerTokenEnvKey:()=>Si,resolveAWSSDKSigV4Config:()=>Ii,resolveAwsSdkSigV4AConfig:()=>ki,resolveAwsSdkSigV4Config:()=>Fi,validateSigningProperties:()=>pi}),Bi=n((()=>{Ri(),Ci()})),Vi=a((e=>{var n=t(`node:os`),r=t(`node:process`),i=zn(),a=t(`node:fs/promises`),o=t(`node:path`),s=Kr();let c=()=>{for(let e of[`deno`,`bun`,`llrt`])if(r.versions[e])return[`md/${e}`,r.versions[e]];return[`md/nodejs`,r.versions.node]},l=e=>{let t=process.cwd();if(!e)return[t];let n=o.normalize(e),r=n.split(o.sep),i=r.indexOf(`node_modules`),a=i===-1?n:r.slice(0,i).join(o.sep);return t===a?[t]:[a,t]},u=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/,d=(e=``)=>{let t=e.match(u);if(!t)return;let[n,r,i,a]=[t[1],t[2],t[3],t[4]];return a?`${n}.${r}.${i}-${a}`:`${n}.${r}.${i}`},f=[`^`,`~`,`>=`,`<=`,`>`,`<`],p=[`latest`,`beta`,`dev`,`rc`,`insiders`,`next`],m=(e=``)=>{if(p.includes(e))return e;let t=f.find(t=>e.startsWith(t))??``,n=d(e.slice(t.length));if(n)return`${t}${n}`},h,g=o.join(`node_modules`,`typescript`,`package.json`),_=async()=>{if(h===null)return;if(typeof h==`string`)return[`md/tsc`,h];let e=!1;try{e=i.booleanSelector(process.env,`AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED`,i.SelectorType.ENV)||!1}catch{}if(e){h=null;return}let t=l(typeof __dirname<`u`?__dirname:void 0),n;for(let e of t)try{let t=o.join(e,`package.json`),r=await a.readFile(t,`utf-8`),{dependencies:i,devDependencies:s}=JSON.parse(r),c=s?.typescript??i?.typescript;if(typeof c!=`string`)continue;n=c;break}catch{}if(!n){h=null;return}let r;for(let e of t)try{let t=o.join(e,g),n=await a.readFile(t,`utf-8`),{version:i}=JSON.parse(n),s=d(i);if(typeof s!=`string`)continue;r=s;break}catch{}if(r)return h=r,[`md/tsc`,h];let s=m(n);if(typeof s!=`string`){h=null;return}return h=`dev_${s}`,[`md/tsc`,h]},v={isCrtAvailable:!1},y=()=>v.isCrtAvailable?[`md/crt-avail`]:null,b=({serviceId:e,clientVersion:t})=>{let i=c();return async a=>{let o=[[`aws-sdk-js`,t],[`ua`,`2.1`],[`os/${n.platform()}`,n.release()],[`lang/js`],i],s=await _();s&&o.push(s);let c=y();c&&o.push(c),e&&o.push([`api/${e}`,t]),r.env.AWS_EXECUTION_ENV&&o.push([`exec-env/${r.env.AWS_EXECUTION_ENV}`]);let l=await a?.userAgentAppId?.();return l?[...o,[`app/${l}`]]:[...o]}},x=b,S=`AWS_SDK_UA_APP_ID`,C=`sdk_ua_app_id`;e.NODE_APP_ID_CONFIG_OPTIONS={environmentVariableSelector:e=>e[S],configFileSelector:e=>e[C]??e[`sdk-ua-app-id`],default:s.DEFAULT_UA_APP_ID},e.UA_APP_ID_ENV_NAME=S,e.UA_APP_ID_INI_NAME=C,e.createDefaultUserAgentProvider=b,e.crtAvailability=v,e.defaultUserAgent=x})),Hi=a((e=>{var n=d(),r=p(),i=t(`buffer`),a=t(`crypto`),o=class{algorithmIdentifier;secret;hash;constructor(e,t){this.algorithmIdentifier=e,this.secret=t,this.reset()}update(e,t){this.hash.update(r.toUint8Array(s(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?a.createHmac(this.algorithmIdentifier,s(this.secret)):a.createHash(this.algorithmIdentifier)}};function s(e,t){return i.Buffer.isBuffer(e)?e:typeof e==`string`?n.fromString(e,t):ArrayBuffer.isView(e)?n.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength):n.fromArrayBuffer(e)}e.Hash=o})),Ui=a((e=>{var n=t(`node:fs`);e.calculateBodyLength=e=>{if(!e)return 0;if(typeof e==`string`)return Buffer.byteLength(e);if(typeof e.byteLength==`number`)return e.byteLength;if(typeof e.size==`number`)return e.size;if(typeof e.start==`number`&&typeof e.end==`number`)return e.end+1-e.start;if(e instanceof n.ReadStream){if(e.path!=null)return n.lstatSync(e.path).size;if(typeof e.fd==`number`)return n.fstatSync(e.fd).size}throw Error(`Body Length computation failed for ${e}`)}})),Wi=a((e=>{var t=qr(),n=ue(),i=ce();let a=`AWS_REGION`,o=`AWS_DEFAULT_REGION`,s=[`in-region`,`cross-region`,`mobile`,`standard`,`legacy`],c={environmentVariableSelector:e=>e.AWS_DEFAULTS_MODE,configFileSelector:e=>e.defaults_mode,default:`legacy`},l=({region:e=n.loadConfig(t.NODE_REGION_CONFIG_OPTIONS),defaultsMode:r=n.loadConfig(c)}={})=>i.memoize(async()=>{let t=typeof r==`function`?await r():r;switch(t?.toLowerCase()){case`auto`:return u(e);case`in-region`:case`cross-region`:case`mobile`:case`standard`:case`legacy`:return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve(`legacy`);default:throw Error(`Invalid parameter for "defaultsMode", expect ${s.join(`, `)}, got ${t}`)}}),u=async e=>{if(e){let t=typeof e==`function`?await e():e,n=await d();return n?t===n?`in-region`:`cross-region`:`standard`}return`standard`},d=async()=>{if(process.env.AWS_EXECUTION_ENV&&(process.env[a]||process.env[o]))return process.env[a]??process.env[o];if(!process.env.AWS_EC2_METADATA_DISABLED)try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await import(`./dist-cjs-Cp2qKG5f.js`).then(e=>r(e.default));return(await t({...await e(),path:`/latest/meta-data/placement/region`})).toString()}catch{}};e.resolveDefaultsModeConfig=l})),Gi=a((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.warning=void 0,e.stsRegionDefaultResolver=r;let t=qr(),n=ue();function r(r={}){return(0,n.loadConfig)({...t.NODE_REGION_CONFIG_OPTIONS,async default(){return e.warning.silence||console.warn(`@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.`),`us-east-1`}},{...t.NODE_REGION_CONFIG_FILE_OPTIONS,...r})}e.warning={silence:!1}})),Ki=a((e=>{var t=Gi(),n=qr();e.NODE_REGION_CONFIG_FILE_OPTIONS=n.NODE_REGION_CONFIG_FILE_OPTIONS,e.NODE_REGION_CONFIG_OPTIONS=n.NODE_REGION_CONFIG_OPTIONS,e.REGION_ENV_NAME=n.REGION_ENV_NAME,e.REGION_INI_NAME=n.REGION_INI_NAME,e.resolveRegionConfig=n.resolveRegionConfig,e.getAwsRegionExtensionConfiguration=e=>({setRegion(t){e.region=t},region(){return e.region}}),e.resolveAwsRegionExtensionConfiguration=e=>({region:e.region()}),Object.prototype.hasOwnProperty.call(t,`__proto__`)&&!Object.prototype.hasOwnProperty.call(e,`__proto__`)&&Object.defineProperty(e,`__proto__`,{enumerable:!0,value:t.__proto__}),Object.keys(t).forEach(function(n){n!==`default`&&!Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])})}));export{$t as A,lr as C,Ln as D,Rn as E,V as M,de as N,In as O,xr as S,zn as T,Ur as _,Vi as a,Vr as b,Fi as c,ei as d,Qr as f,Gr as g,Kr as h,Hi as i,be as j,_n as k,Ei as l,qr as m,Wi as n,zi as o,Jr as p,Ui as r,Bi as s,Ki as t,mi as u,Hr as v,Xn as w,Ar as x,Br as y}; \ No newline at end of file diff --git a/dist/licenses.txt b/dist/licenses.txt index a8e9102e..78e0dfbe 100644 --- a/dist/licenses.txt +++ b/dist/licenses.txt @@ -8030,6 +8030,10 @@ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +@nodable/entities@2.1.0 +MIT +MIT + @octokit/auth-app@8.2.0 MIT The MIT License @@ -19739,13 +19743,11 @@ Apache-2.0 limitations under the License. -balanced-match@4.0.4 +balanced-match@1.0.2 MIT (MIT) -Original code Copyright Julian Gruber - -Port to TypeScript Copyright Isaac Z. Schlueter +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -21297,13 +21299,11 @@ programs and associated documentation files created by the Original Author, when distributed with the Software. -brace-expansion@5.0.5 +brace-expansion@2.1.0 MIT MIT License -Copyright Julian Gruber - -TypeScript port Copyright Isaac Z. Schlueter +Copyright (c) 2013 Julian Gruber Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -21437,6 +21437,28 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +concat-map@0.0.1 +MIT +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + core-util-is@1.0.3 MIT Copyright Node.js contributors. All rights reserved. @@ -22072,7 +22094,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -fast-xml-builder@1.1.4 +fast-xml-builder@1.1.5 MIT MIT License @@ -22097,7 +22119,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -fast-xml-parser@5.5.8 +fast-xml-parser@5.7.2 MIT MIT License @@ -22775,7 +22797,7 @@ will be liable to anyone for any damages related to this software or this license, under any kind of legal claim.*** -path-expression-matcher@1.2.0 +path-expression-matcher@1.5.0 MIT MIT License @@ -23369,7 +23391,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -strnum@2.2.0 +strnum@2.2.3 MIT MIT License diff --git a/dist/main.js b/dist/main.js index 1fa6f1fa..6b9a9023 100644 --- a/dist/main.js +++ b/dist/main.js @@ -1,4 +1,5 @@ -import{i as e,o as t,t as n}from"./chunk-Bdh3yLIe.js";import{$ as r,A as i,B as a,C as o,D as s,E as c,F as l,G as u,H as d,I as f,J as p,K as m,L as h,M as g,N as _,O as v,P as y,Q as b,R as x,S,T as C,U as w,V as T,W as E,X as D,Y as O,Z as k,_ as ee,a as A,at as j,b as te,c as M,ct as ne,d as re,et as ie,f as N,g as ae,h as oe,i as P,it as se,j as ce,k as le,l as ue,m as de,n as fe,nt as pe,o as me,ot as he,p as ge,r as _e,rt as ve,s as ye,st as F,t as be,tt as I,u as xe,v as Se,w as Ce,x as we,z as Te}from"./artifact-BxOB70uM.js";import L from"node:process";import*as Ee from"os";import*as De from"crypto";import*as R from"fs";import*as z from"path";import{ok as Oe}from"assert";import*as ke from"util";import{Buffer as Ae}from"node:buffer";import*as je from"node:crypto";import{createHash as Me}from"node:crypto";import{pathToFileURL as Ne}from"node:url";import*as B from"node:fs/promises";import Pe,{readFile as Fe,writeFile as Ie}from"node:fs/promises";import*as V from"node:path";import Le,{join as H}from"node:path";import{spawnSync as Re}from"node:child_process";import*as ze from"node:os";import Be,{homedir as Ve}from"node:os";import*as He from"stream";function Ue(e){switch(e){case`hit`:return`✅ hit`;case`miss`:return`🆕 miss`;case`corrupted`:return`⚠️ corrupted (clean start)`}}function We(e){let t=Math.round(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}async function Ge(e,t){let{eventType:n,repo:r,ref:i,runId:a,runUrl:o,metrics:s,agent:c,resolvedOutputMode:l}=e;try{if(F.addHeading(`Fro Bot Agent Run`,2).addTable([[{data:`Field`,header:!0},{data:`Value`,header:!0}],[`Event`,n],[`Repository`,r],[`Ref`,i],[`Run ID`,`[${a}](${o})`],[`Agent`,c],[`Output Mode`,l??`N/A`],[`Cache Status`,Ue(s.cacheStatus)],[`Duration`,s.duration==null?`N/A`:We(s.duration)]]),(s.sessionsUsed.length>0||s.sessionsCreated.length>0)&&(F.addHeading(`Sessions`,3),s.sessionsUsed.length>0&&F.addRaw(`**Used:** ${s.sessionsUsed.join(`, `)}\n`),s.sessionsCreated.length>0&&F.addRaw(`**Created:** ${s.sessionsCreated.join(`, `)}\n`)),s.tokenUsage!=null&&(F.addHeading(`Token Usage`,3),F.addTable([[{data:`Metric`,header:!0},{data:`Count`,header:!0}],[`Input`,s.tokenUsage.input.toLocaleString()],[`Output`,s.tokenUsage.output.toLocaleString()],[`Reasoning`,s.tokenUsage.reasoning.toLocaleString()],[`Cache Read`,s.tokenUsage.cache.read.toLocaleString()],[`Cache Write`,s.tokenUsage.cache.write.toLocaleString()]]),s.model!=null&&F.addRaw(`**Model:** ${s.model}\n`),s.cost!=null&&F.addRaw(`**Cost:** $${s.cost.toFixed(4)}\n`)),(s.prsCreated.length>0||s.commitsCreated.length>0||s.commentsPosted>0)&&(F.addHeading(`Created Artifacts`,3),s.prsCreated.length>0&&F.addList([...s.prsCreated]),s.commitsCreated.length>0&&F.addList(s.commitsCreated.map(e=>`Commit \`${e.slice(0,7)}\``)),s.commentsPosted>0&&F.addRaw(`**Comments Posted:** ${s.commentsPosted}\n`)),s.errors.length>0){F.addHeading(`Errors`,3);for(let e of s.errors){let t=e.recoverable?`🔄 Recovered`:`❌ Failed`;F.addRaw(`- **${e.type}** (${t}): ${e.message}\n`)}}await F.write(),t.debug(`Wrote job summary`)}catch(e){let n=d(e);t.warning(`Failed to write job summary`,{error:n}),ie(`Failed to write job summary: ${n}`)}}function Ke(){let e=0,t=null,n=`miss`,r=null,i=[],a=[],o=[],s=[],c=0,l=null,u=null,d=null,f=[];return{start(){e=Date.now()},end(){t=Date.now()},setCacheStatus(e){n=e},setCacheSource(e){r=e},addSessionUsed(e){i.includes(e)||i.push(e)},addSessionCreated(e){a.includes(e)||a.push(e)},addPRCreated(e){o.includes(e)||o.push(e)},addCommitCreated(e){s.includes(e)||s.push(e)},incrementComments(){c++},setTokenUsage(e,t,n){l=e,u=t,d=n},recordError(e,t,n){f.push({timestamp:new Date().toISOString(),type:e,message:t,recoverable:n})},getMetrics(){let p=t==null?Date.now()-e:t-e;return Object.freeze({startTime:e,endTime:t,duration:p,cacheStatus:n,cacheSource:r,sessionsUsed:Object.freeze([...i]),sessionsCreated:Object.freeze([...a]),prsCreated:Object.freeze([...o]),commitsCreated:Object.freeze([...s]),commentsPosted:c,tokenUsage:l,model:u,cost:d,errors:Object.freeze([...f])})}}}function U(e){b(`session-id`,e.sessionId??``),b(`resolved-output-mode`,e.resolvedOutputMode??``),b(`cache-status`,e.cacheStatus),b(`duration`,e.duration)}function W(e){let[t,n]=e.split(`/`);if(t==null||n==null||t.length===0||n.length===0)throw Error(`Invalid repository string: ${e}`);return{owner:t,repo:n}}async function qe(e,t,n,r,i){try{let{owner:a,repo:o}=W(t),{data:s}=await e.rest.reactions.createForIssueComment({owner:a,repo:o,comment_id:n,content:r});return i.debug(`Created comment reaction`,{commentId:n,content:r,reactionId:s.id}),{id:s.id}}catch(e){return i.warning(`Failed to create comment reaction`,{commentId:n,content:r,error:d(e)}),null}}async function Je(e,t,n,r){try{let{owner:r,repo:i}=W(t),{data:a}=await e.rest.reactions.listForIssueComment({owner:r,repo:i,comment_id:n,per_page:100});return a.map(e=>({id:e.id,content:e.content,userLogin:e.user?.login??null}))}catch(e){return r.warning(`Failed to list comment reactions`,{commentId:n,error:d(e)}),[]}}async function Ye(e,t,n,r,i){try{let{owner:a,repo:o}=W(t);return await e.rest.reactions.deleteForIssueComment({owner:a,repo:o,comment_id:n,reaction_id:r}),i.debug(`Deleted comment reaction`,{commentId:n,reactionId:r}),!0}catch(e){return i.warning(`Failed to delete comment reaction`,{commentId:n,reactionId:r,error:d(e)}),!1}}async function Xe(e,t,n,r,i,a){let{owner:o,repo:s}=W(t);try{return await e.rest.issues.createLabel({owner:o,repo:s,name:n,color:r,description:i}),a.debug(`Created label`,{name:n,color:r}),!0}catch(e){return e instanceof Error&&`status`in e&&e.status===422?(a.debug(`Label already exists`,{name:n}),!0):(a.warning(`Failed to create label`,{name:n,error:d(e)}),!1)}}async function Ze(e,t,n,r,i){try{let{owner:a,repo:o}=W(t);return await e.rest.issues.addLabels({owner:a,repo:o,issue_number:n,labels:[...r]}),i.debug(`Added labels to issue`,{issueNumber:n,labels:r}),!0}catch(e){return i.warning(`Failed to add labels to issue`,{issueNumber:n,labels:r,error:d(e)}),!1}}async function Qe(e,t,n,r,i){try{let{owner:a,repo:o}=W(t);return await e.rest.issues.removeLabel({owner:a,repo:o,issue_number:n,name:r}),i.debug(`Removed label from issue`,{issueNumber:n,label:r}),!0}catch(e){return e instanceof Error&&`status`in e&&e.status===404?(i.debug(`Label was not present on issue`,{issueNumber:n,label:r}),!0):(i.warning(`Failed to remove label from issue`,{issueNumber:n,label:r,error:d(e)}),!1)}}async function $e(e,t,n){try{let{owner:n,repo:r}=W(t),{data:i}=await e.rest.repos.get({owner:n,repo:r});return i.default_branch}catch(e){return n.warning(`Failed to get default branch`,{repo:t,error:d(e)}),`main`}}const et={admin:`OWNER`,maintain:`MEMBER`,write:`COLLABORATOR`,triage:`COLLABORATOR`};async function tt(e,t,n,r,i){try{let{data:a}=await e.rest.repos.getCollaboratorPermissionLevel({owner:t,repo:n,username:r}),o=et[a.permission]??null;return i.debug(`Resolved sender permission`,{username:r,permission:a.permission,association:o}),o}catch(e){return i.warning(`Failed to resolve sender permission`,{username:r,error:d(e)}),null}}async function nt(e,t,n){try{let{data:n}=await e.rest.users.getByUsername({username:t});return{id:n.id,login:n.login}}catch(e){return n.debug(`Failed to get user by username`,{username:t,error:d(e)}),null}}function rt(e){if(e<0||!Number.isFinite(e))throw Error(`Invalid bytes value: ${e}`);return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function it(e){return e.replaceAll("\\`","`").replaceAll(String.raw`\|`,`|`)}const at={maxComments:50,maxCommits:100,maxFiles:100,maxReviews:100,maxBodyBytes:10*1024,maxTotalBytes:100*1024},ot=`…[truncated]`;function st(e,t){if(e.length===0)return{text:``,truncated:!1};let n=new TextEncoder,r=n.encode(e);if(r.length<=t)return{text:e,truncated:!1};let i=t-n.encode(ot).length;if(i<=0)return{text:ot,truncated:!0};let a=r.slice(0,i),o=new TextDecoder(`utf-8`,{fatal:!1}).decode(a);for(;o.length>0&&o.charCodeAt(o.length-1)===65533;)a=a.slice(0,-1),o=new TextDecoder(`utf-8`,{fatal:!1}).decode(a);return{text:o+ot,truncated:!0}}async function ct(e,t,n,r,i,a){try{let[a,o]=await Promise.all([e.rest.issues.get({owner:t,repo:n,issue_number:r}),e.rest.issues.listComments({owner:t,repo:n,issue_number:r,per_page:i.maxComments})]),s=a.data,c=st(s.body??``,i.maxBodyBytes),l=o.data.slice(0,i.maxComments).map(e=>({id:e.node_id??String(e.id),author:e.user?.login??null,body:e.body??``,createdAt:e.created_at,authorAssociation:e.author_association,isMinimized:!1})),u=(s.labels??[]).filter(e=>typeof e==`object`&&!!e&&`name`in e).map(e=>({name:e.name??``,color:e.color})),d=(s.assignees??[]).map(e=>({login:e?.login??``}));return{type:`issue`,number:s.number,title:s.title,body:c.text,bodyTruncated:c.truncated,state:s.state,author:s.user?.login??null,createdAt:s.created_at,labels:u,assignees:d,comments:l,commentsTruncated:o.data.length>=i.maxComments,totalComments:o.data.length}}catch(e){return a.warning(`REST issue fallback failed`,{owner:t,repo:n,number:r,error:d(e)}),null}}async function lt(e,t,n,r,i,a){try{let[o,s,c,l,u]=await Promise.all([e.rest.pulls.get({owner:t,repo:n,pull_number:r}),e.rest.pulls.listCommits({owner:t,repo:n,pull_number:r,per_page:i.maxCommits}),e.rest.pulls.listFiles({owner:t,repo:n,pull_number:r,per_page:i.maxFiles}),e.rest.pulls.listReviews({owner:t,repo:n,pull_number:r,per_page:i.maxReviews}),e.rest.issues.listComments({owner:t,repo:n,issue_number:r,per_page:i.maxComments})]),f=await e.rest.pulls.listRequestedReviewers({owner:t,repo:n,pull_number:r}).catch(e=>(a.warning(`Failed to fetch requested reviewers, defaulting to empty`,{owner:t,repo:n,number:r,error:d(e)}),{data:{users:[],teams:[]}})),p=o.data,m=st(p.body??``,i.maxBodyBytes),h=p.base.repo?.owner.login,g=p.head.repo?.owner.login,_=g==null||h!==g,v=u.data.slice(0,i.maxComments).map(e=>({id:e.node_id??String(e.id),author:e.user?.login??null,body:e.body??``,createdAt:e.created_at,authorAssociation:e.author_association,isMinimized:!1})),y=s.data.slice(0,i.maxCommits).map(e=>({oid:e.sha,message:e.commit.message,author:e.commit.author?.name??null})),b=c.data.slice(0,i.maxFiles).map(e=>({path:e.filename,additions:e.additions,deletions:e.deletions,status:e.status})),x=l.data.slice(0,i.maxReviews).map(e=>({author:e.user?.login??null,state:e.state,body:e.body??``,createdAt:e.submitted_at??``,comments:[]})),S=(p.labels??[]).map(e=>({name:e.name??``,color:e.color})),C=(p.assignees??[]).map(e=>({login:e?.login??``})),w=(f.data.users??[]).map(e=>e.login),T=(f.data.teams??[]).map(e=>e.name);return{type:`pull_request`,number:p.number,title:p.title,body:m.text,bodyTruncated:m.truncated,state:p.state,author:p.user?.login??null,createdAt:p.created_at,baseBranch:p.base.ref,headBranch:p.head.ref,isFork:_,labels:S,assignees:C,comments:v,commentsTruncated:u.data.length>=i.maxComments,totalComments:u.data.length,commits:y,commitsTruncated:s.data.length>=i.maxCommits,totalCommits:s.data.length,files:b,filesTruncated:c.data.length>=i.maxFiles,totalFiles:c.data.length,reviews:x,reviewsTruncated:l.data.length>=i.maxReviews,totalReviews:l.data.length,authorAssociation:p.author_association,requestedReviewers:w,requestedReviewerTeams:T}}catch(e){return a.warning(`REST pull request fallback failed`,{owner:t,repo:n,number:r,error:d(e)}),null}}async function ut(e,t,n,r,i,a){try{return await e.graphql(` +import{o as e}from"./chunk-Bdh3yLIe.js";import{$ as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,St as b,T as x,U as S,V as C,W as w,X as T,Y as E,Z as D,_ as O,_t as ee,a as te,at as k,bt as A,c as ne,ct as re,d as j,dt as M,et as ie,f as N,ft as P,g as ae,gt as oe,h as se,ht as F,i as ce,it as I,j as le,k as L,l as ue,lt as de,m as fe,mt as pe,n as me,nt as he,o as ge,ot as R,p as _e,pt as ve,q as ye,r as be,rt as xe,s as Se,t as Ce,tt as we,u as Te,ut as z,vt as Ee,w as De,x as Oe,xt as B,yt as ke,z as Ae}from"./artifact-B5YYOsMW.js";import V from"node:process";import*as je from"os";import*as Me from"crypto";import*as H from"fs";import*as U from"path";import{ok as Ne}from"assert";import*as Pe from"util";import{Buffer as Fe}from"node:buffer";import*as Ie from"node:crypto";import{createHash as Le}from"node:crypto";import{pathToFileURL as Re}from"node:url";import*as W from"node:fs/promises";import ze,{readFile as Be,writeFile as Ve}from"node:fs/promises";import*as G from"node:path";import K,{join as q}from"node:path";import*as He from"node:os";import Ue,{homedir as We}from"node:os";import*as Ge from"stream";const Ke=e=>typeof e==`object`&&!!e,J=e=>typeof e==`string`?e:null,qe=e=>typeof e==`number`?e:null;function Je(e){if(Array.isArray(e))return e.filter(Ke).map(e=>({file:J(e.file)??``,additions:qe(e.additions)??0,deletions:qe(e.deletions)??0}))}function Ye(e){return{id:e.id,version:e.version,projectID:e.projectID,directory:e.directory,parentID:e.parentID,title:e.title,time:{created:e.time.created,updated:e.time.updated,compacting:e.time.compacting,archived:e.time.archived},summary:e.summary==null?void 0:{additions:e.summary.additions,deletions:e.summary.deletions,files:e.summary.files,diffs:Je(e.summary.diffs)},share:e.share?.url==null?void 0:{url:e.share.url},permission:e.permission==null?void 0:{rules:e.permission.rules},revert:e.revert==null?void 0:{messageID:e.revert.messageID,partID:e.revert.partID,snapshot:e.revert.snapshot,diff:e.revert.diff}}}function Xe(e){let t=K.resolve(K.normalize(e));return t.endsWith(K.sep)&&t.length>1?t.slice(0,-1):t}async function Ze(e,t){let n=await e.project.list();if(n.error!=null||n.data==null)return t.warning(`SDK project list failed`,{error:String(n.error)}),[];if(!Array.isArray(n.data))return[];let r=[];for(let e of n.data){if(!Ke(e))continue;let t=J(e.id),n=J(e.worktree),i=J(e.path);t==null||n==null||i==null||r.push({id:t,worktree:n,path:i,vcs:`git`,time:{created:0,updated:0}})}return r}async function Qe(e,t,n){let r=Xe(t),i=await Ze(e,n);for(let e of i){if(Xe(e.worktree)===r)return e;let t=J(e.path);if(t!=null&&Xe(t)===r)return e}return null}function $e(e){return e.status===`running`?{status:`running`,input:e.input,time:{start:e.time.start}}:e.status===`error`?{status:`error`,input:e.input,error:e.error,time:{start:e.time.start,end:e.time.end}}:e.status===`pending`?{status:`pending`}:{status:`completed`,input:e.input,output:e.output,title:e.title,metadata:e.metadata,time:{start:e.time.start,end:e.time.end,compacted:e.time.compacted},attachments:void 0}}function et(e){let t={id:e.id,sessionID:e.sessionID,messageID:e.messageID};if(e.type===`text`)return{...t,type:`text`,text:e.text,synthetic:e.synthetic,ignored:e.ignored,time:e.time,metadata:e.metadata};if(e.type===`reasoning`)return{...t,type:`reasoning`,reasoning:e.reasoning??e.text,time:e.time};if(e.type===`tool`)return{...t,type:`tool`,callID:e.callID,tool:e.tool,state:$e(e.state),metadata:e.metadata};if(e.type!==`step-finish`)return{...t,type:`text`,text:`text`in e?e.text:``};let n=e;return{...t,type:`step-finish`,reason:n.reason,snapshot:n.snapshot,cost:n.cost,tokens:{input:n.tokens.input,output:n.tokens.output,reasoning:n.tokens.reasoning,cache:{read:n.tokens.cache.read,write:n.tokens.cache.write}}}}function tt(e){if(e.role===`user`){let t=e;return{id:t.id,sessionID:t.sessionID,role:`user`,time:{created:t.time.created},summary:t.summary==null?void 0:{title:t.summary.title,body:t.summary.body,diffs:Je(t.summary.diffs)??[]},agent:t.agent,model:{providerID:t.model.providerID,modelID:t.model.modelID},system:t.system,tools:t.tools,variant:t.variant}}let t=e;return{id:t.id,sessionID:t.sessionID,role:`assistant`,time:{created:t.time.created,completed:t.time.completed},parentID:t.parentID,modelID:t.modelID,providerID:t.providerID,mode:t.mode,agent:t.agent??``,path:{cwd:t.path.cwd,root:t.path.root},summary:t.summary,cost:t.cost,tokens:{input:t.tokens.input,output:t.tokens.output,reasoning:t.tokens.reasoning,cache:{read:t.tokens.cache.read,write:t.tokens.cache.write}},finish:t.finish,error:t.error?{name:t.error.name,message:J(t.error.data.message)??``}:void 0}}function nt(e){return[...e.map(e=>{let t=tt(`info`in e?e.info:e),n=`parts`in e?e.parts.map(et):void 0;return n==null||n.length===0?t:{...t,parts:n}})].sort((e,t)=>e.time.created-t.time.created)}async function rt(e,t,n){let r=await e.session.list({query:{directory:t}});return r.error==null&&r.data!=null?Array.isArray(r.data)?r.data.map(Ye):[]:(n.warning(`SDK session list failed`,{error:String(r.error)}),[])}async function it(e,t,n){let r=await e.session.messages({path:{id:t}});return r.error==null&&r.data!=null?nt(r.data):(n.warning(`SDK session messages failed`,{error:String(r.error)}),[])}async function at(e,t,n,r){let i=await e.session.list({query:{directory:t,start:n,roots:!0,limit:10}});if(i.error!=null||i.data==null)return r.warning(`SDK session list failed`,{error:String(i.error)}),null;if(!Array.isArray(i.data)||i.data.length===0)return null;let a=i.data.map(Ye);if(a.length===0)return null;let o=a.reduce((e,t)=>t.time.created>e.time.created?t:e);return{projectID:o.projectID,session:o}}async function ot(e,t,n){let r=await e.session.delete({path:{id:t}});if(r.error!=null){n.warning(`SDK session delete failed`,{sessionID:t,error:String(r.error)});return}n.debug(`Deleted session via SDK`,{sessionID:t})}function Y(e,t){return{key:`${e}-${t}`,entityType:e,entityId:t}}function st(e){return Le(`sha256`).update(e).digest(`hex`).slice(0,8)}function ct(e){if(e.eventType===`unsupported`)return null;if(e.eventType===`schedule`){let t=typeof e.raw==`object`&&e.raw!=null&&`event`in e.raw?e.raw.event:void 0,n=typeof t==`object`&&t&&`type`in t&&t.type===`schedule`&&`schedule`in t&&typeof t.schedule==`string`?t.schedule:void 0;return Y(`schedule`,st((n!=null&&n.trim().length>0?n:e.action)??`default`))}return e.eventType===`workflow_dispatch`?Y(`dispatch`,String(e.runId)):e.target==null?null:e.eventType===`issue_comment`?e.target.kind===`issue`?Y(`issue`,String(e.target.number)):e.target.kind===`pr`?Y(`pr`,String(e.target.number)):null:e.eventType===`discussion_comment`?e.target.kind===`discussion`?Y(`discussion`,String(e.target.number)):null:e.eventType===`issues`?e.target.kind===`issue`?Y(`issue`,String(e.target.number)):null:(e.eventType===`pull_request`||e.eventType===`pull_request_review_comment`)&&e.target.kind===`pr`?Y(`pr`,String(e.target.number)):null}function lt(e){return`fro-bot: ${e.key}`}function ut(e,t){let n=e.filter(e=>e.title===t);return n.length===0?null:n.reduce((e,t)=>t.time.updated>e.time.updated?t:e)}async function dt(e,t,n,r){try{let i=ut(await rt(e,t,r),lt(n));return i==null||i.time.archived!=null||i.time.compacting!=null?{status:`not-found`}:{status:`found`,session:i}}catch(e){return{status:`error`,error:e instanceof Error?e.message:String(e)}}}const ft={maxSessions:50,maxAgeDays:30};async function pt(e,t,n,r){let{maxSessions:i,maxAgeDays:a}=n;if(r.info(`Starting session pruning`,{workspacePath:t,maxSessions:i,maxAgeDays:a}),await Qe(e,t,r)==null)return r.debug(`No project found for pruning`,{workspacePath:t}),{prunedCount:0,prunedSessionIds:[],remainingCount:0,freedBytes:0};let o=await rt(e,t,r),s=o.filter(e=>e.parentID==null);if(s.length===0)return{prunedCount:0,prunedSessionIds:[],remainingCount:0,freedBytes:0};let c=[...s].sort((e,t)=>t.time.updated-e.time.updated),l=new Date;l.setDate(l.getDate()-a);let u=l.getTime(),d=new Set;for(let e of c)e.time.updated>=u&&d.add(e.id);for(let e=0;e!d.has(e.id)),p=new Set;for(let e of f){p.add(e.id);for(let t of o)t.parentID===e.id&&p.add(t.id)}if(p.size===0)return r.info(`No sessions to prune`),{prunedCount:0,prunedSessionIds:[],remainingCount:s.length,freedBytes:0};let m=[];for(let t of p)try{await ot(e,t,r),m.push(t),r.debug(`Pruned session`,{sessionId:t})}catch(e){r.warning(`Failed to prune session`,{sessionId:t,error:_(e)})}let h=s.length-f.length;return r.info(`Session pruning complete`,{prunedCount:m.length,remainingCount:h}),{prunedCount:m.length,prunedSessionIds:m,remainingCount:h,freedBytes:0}}async function mt(e,t,n,r){let{limit:i,fromDate:a,toDate:o}=n;r.debug(`Listing sessions`,{directory:t,limit:i});let s=[...(await rt(e,t,r)).filter(e=>!(e.parentID!=null||a!=null&&e.time.createdo.getTime()))].sort((e,t)=>t.time.updated-e.time.updated),c=[],l=i==null?s:s.slice(0,i);for(let t of l){let n=await it(e,t.id,r),i=ht(n);c.push({id:t.id,projectID:t.projectID,directory:t.directory,title:t.title,createdAt:t.time.created,updatedAt:t.time.updated,messageCount:n.length,agents:i,isChild:!1})}return r.info(`Listed sessions`,{count:c.length,directory:t}),c}function ht(e){let t=new Set;for(let n of e)n.agent!=null&&t.add(n.agent);return[...t]}async function gt(e,t,n,r,i){let{limit:a=20,caseSensitive:o=!1,sessionId:s}=r;i.debug(`Searching sessions`,{query:e,directory:n,limit:a,caseSensitive:o});let c=o?e:e.toLowerCase(),l=[],u=0;if(s!=null){let e=await _t(t,s,c,o,i);return e.length>0&&l.push({sessionId:s,matches:e.slice(0,a)}),l}let d=await mt(t,n,{},i);for(let e of d){if(u>=a)break;let n=await _t(t,e.id,c,o,i);if(n.length>0){let t=a-u;l.push({sessionId:e.id,matches:n.slice(0,t)}),u+=Math.min(n.length,t)}}return i.info(`Session search complete`,{query:e,resultCount:l.length,totalMatches:u}),l}async function _t(e,t,n,r,i){let a=await it(e,t,i),o=[];for(let e of a){let t=e.parts??[];for(let i of t){let t=vt(i);if(t==null)continue;let a=r?t:t.toLowerCase();if(a.includes(n)){let r=a.indexOf(n),s=Math.max(0,r-50),c=Math.min(t.length,r+n.length+50),l=t.slice(s,c);o.push({messageId:e.id,partId:i.id,excerpt:`...${l}...`,role:e.role,agent:e.agent})}}}return o}function vt(e){switch(e.type){case`text`:return e.text;case`reasoning`:return e.reasoning;case`tool`:return e.state.status===`completed`?`${e.tool}: ${e.state.output}`:null;case`step-finish`:return null}}async function yt(e,t,n,r){if(n!=null)try{let i=await e.session.update({path:{id:t},body:{title:n}});i.error!=null&&r.warning(`Best-effort session title re-assertion failed`,{sessionId:t,sessionTitle:n,error:String(i.error)})}catch(e){r.warning(`Best-effort session title re-assertion failed`,{sessionId:t,sessionTitle:n,error:e instanceof Error?e.message:String(e)})}}function bt(e){let t=[`--- Fro Bot Run Summary ---`,`Event: ${e.eventType}`,`Repo: ${e.repo}`,`Ref: ${e.ref}`,`Run ID: ${e.runId}`,`Cache: ${e.cacheStatus}`,`Duration: ${e.duration}s`];return e.sessionIds.length>0&&t.push(`Sessions used: ${e.sessionIds.join(`, `)}`),e.logicalKey!=null&&t.push(`Logical Thread: ${e.logicalKey}`),e.createdPRs.length>0&&t.push(`PRs created: ${e.createdPRs.join(`, `)}`),e.createdCommits.length>0&&t.push(`Commits: ${e.createdCommits.join(`, `)}`),e.tokenUsage!=null&&t.push(`Tokens: ${e.tokenUsage.input} in / ${e.tokenUsage.output} out`),t.join(` +`)}async function xt(e,t,n,r){let i=bt(t);try{let t=await n.session.prompt({path:{id:e},body:{noReply:!0,parts:[{type:`text`,text:i}]}});if(t.error!=null){r.warning(`SDK prompt writeback failed`,{sessionId:e,error:String(t.error)});return}r.info(`Session summary written via SDK`,{sessionId:e})}catch(t){r.warning(`SDK prompt writeback failed`,{sessionId:e,error:_(t)})}}const St={todowrite:[`Todo`,`\x1B[33m\x1B[1m`],todoread:[`Todo`,`\x1B[33m\x1B[1m`],bash:[`Bash`,`\x1B[31m\x1B[1m`],edit:[`Edit`,`\x1B[32m\x1B[1m`],glob:[`Glob`,`\x1B[34m\x1B[1m`],grep:[`Grep`,`\x1B[34m\x1B[1m`],list:[`List`,`\x1B[34m\x1B[1m`],read:[`Read`,`\x1B[35m\x1B[1m`],write:[`Write`,`\x1B[32m\x1B[1m`],websearch:[`Search`,`\x1B[2m\x1B[1m`]},Ct=`\x1B[0m`;function wt(){return V.env.NO_COLOR==null}function Tt(e,t){let[n,r]=St[e.toLowerCase()]??[e,`\x1B[36m\x1B[1m`],i=n.padEnd(10,` `);wt()?V.stdout.write(`\n${r}|${Ct} ${i} ${Ct}${t}\n`):V.stdout.write(`\n| ${i} ${t}\n`)}function Et(e){V.stdout.write(`\n${e}\n`)}function Dt(e){switch(e){case`hit`:return`✅ hit`;case`miss`:return`🆕 miss`;case`corrupted`:return`⚠️ corrupted (clean start)`}}function Ot(e){let t=Math.round(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}async function kt(e,t){let{eventType:n,repo:r,ref:i,runId:a,runUrl:o,metrics:s,agent:c,resolvedOutputMode:l}=e;try{if(B.addHeading(`Fro Bot Agent Run`,2).addTable([[{data:`Field`,header:!0},{data:`Value`,header:!0}],[`Event`,n],[`Repository`,r],[`Ref`,i],[`Run ID`,`[${a}](${o})`],[`Agent`,c],[`Output Mode`,l??`N/A`],[`Cache Status`,Dt(s.cacheStatus)],[`Duration`,s.duration==null?`N/A`:Ot(s.duration)]]),(s.sessionsUsed.length>0||s.sessionsCreated.length>0)&&(B.addHeading(`Sessions`,3),s.sessionsUsed.length>0&&B.addRaw(`**Used:** ${s.sessionsUsed.join(`, `)}\n`),s.sessionsCreated.length>0&&B.addRaw(`**Created:** ${s.sessionsCreated.join(`, `)}\n`)),s.tokenUsage!=null&&(B.addHeading(`Token Usage`,3),B.addTable([[{data:`Metric`,header:!0},{data:`Count`,header:!0}],[`Input`,s.tokenUsage.input.toLocaleString()],[`Output`,s.tokenUsage.output.toLocaleString()],[`Reasoning`,s.tokenUsage.reasoning.toLocaleString()],[`Cache Read`,s.tokenUsage.cache.read.toLocaleString()],[`Cache Write`,s.tokenUsage.cache.write.toLocaleString()]]),s.model!=null&&B.addRaw(`**Model:** ${s.model}\n`),s.cost!=null&&B.addRaw(`**Cost:** $${s.cost.toFixed(4)}\n`)),(s.prsCreated.length>0||s.commitsCreated.length>0||s.commentsPosted>0)&&(B.addHeading(`Created Artifacts`,3),s.prsCreated.length>0&&B.addList([...s.prsCreated]),s.commitsCreated.length>0&&B.addList(s.commitsCreated.map(e=>`Commit \`${e.slice(0,7)}\``)),s.commentsPosted>0&&B.addRaw(`**Comments Posted:** ${s.commentsPosted}\n`)),s.errors.length>0){B.addHeading(`Errors`,3);for(let e of s.errors){let t=e.recoverable?`🔄 Recovered`:`❌ Failed`;B.addRaw(`- **${e.type}** (${t}): ${e.message}\n`)}}await B.write(),t.debug(`Wrote job summary`)}catch(e){let n=_(e);t.warning(`Failed to write job summary`,{error:n}),pe(`Failed to write job summary: ${n}`)}}function At(){let e=0,t=null,n=`miss`,r=null,i=[],a=[],o=[],s=[],c=0,l=null,u=null,d=null,f=[];return{start(){e=Date.now()},end(){t=Date.now()},setCacheStatus(e){n=e},setCacheSource(e){r=e},addSessionUsed(e){i.includes(e)||i.push(e)},addSessionCreated(e){a.includes(e)||a.push(e)},addPRCreated(e){o.includes(e)||o.push(e)},addCommitCreated(e){s.includes(e)||s.push(e)},incrementComments(){c++},setTokenUsage(e,t,n){l=e,u=t,d=n},recordError(e,t,n){f.push({timestamp:new Date().toISOString(),type:e,message:t,recoverable:n})},getMetrics(){let p=t==null?Date.now()-e:t-e;return Object.freeze({startTime:e,endTime:t,duration:p,cacheStatus:n,cacheSource:r,sessionsUsed:Object.freeze([...i]),sessionsCreated:Object.freeze([...a]),prsCreated:Object.freeze([...o]),commitsCreated:Object.freeze([...s]),commentsPosted:c,tokenUsage:l,model:u,cost:d,errors:Object.freeze([...f])})}}}function jt(e){P(`session-id`,e.sessionId??``),P(`resolved-output-mode`,e.resolvedOutputMode??``),P(`cache-status`,e.cacheStatus),P(`duration`,e.duration)}function X(e){let[t,n]=e.split(`/`);if(t==null||n==null||t.length===0||n.length===0)throw Error(`Invalid repository string: ${e}`);return{owner:t,repo:n}}async function Mt(e,t,n,r,i){try{let{owner:a,repo:o}=X(t),{data:s}=await e.rest.reactions.createForIssueComment({owner:a,repo:o,comment_id:n,content:r});return i.debug(`Created comment reaction`,{commentId:n,content:r,reactionId:s.id}),{id:s.id}}catch(e){return i.warning(`Failed to create comment reaction`,{commentId:n,content:r,error:_(e)}),null}}async function Nt(e,t,n,r){try{let{owner:r,repo:i}=X(t),{data:a}=await e.rest.reactions.listForIssueComment({owner:r,repo:i,comment_id:n,per_page:100});return a.map(e=>({id:e.id,content:e.content,userLogin:e.user?.login??null}))}catch(e){return r.warning(`Failed to list comment reactions`,{commentId:n,error:_(e)}),[]}}async function Pt(e,t,n,r,i){try{let{owner:a,repo:o}=X(t);return await e.rest.reactions.deleteForIssueComment({owner:a,repo:o,comment_id:n,reaction_id:r}),i.debug(`Deleted comment reaction`,{commentId:n,reactionId:r}),!0}catch(e){return i.warning(`Failed to delete comment reaction`,{commentId:n,reactionId:r,error:_(e)}),!1}}async function Ft(e,t,n,r,i,a){let{owner:o,repo:s}=X(t);try{return await e.rest.issues.createLabel({owner:o,repo:s,name:n,color:r,description:i}),a.debug(`Created label`,{name:n,color:r}),!0}catch(e){return e instanceof Error&&`status`in e&&e.status===422?(a.debug(`Label already exists`,{name:n}),!0):(a.warning(`Failed to create label`,{name:n,error:_(e)}),!1)}}async function It(e,t,n,r,i){try{let{owner:a,repo:o}=X(t);return await e.rest.issues.addLabels({owner:a,repo:o,issue_number:n,labels:[...r]}),i.debug(`Added labels to issue`,{issueNumber:n,labels:r}),!0}catch(e){return i.warning(`Failed to add labels to issue`,{issueNumber:n,labels:r,error:_(e)}),!1}}async function Lt(e,t,n,r,i){try{let{owner:a,repo:o}=X(t);return await e.rest.issues.removeLabel({owner:a,repo:o,issue_number:n,name:r}),i.debug(`Removed label from issue`,{issueNumber:n,label:r}),!0}catch(e){return e instanceof Error&&`status`in e&&e.status===404?(i.debug(`Label was not present on issue`,{issueNumber:n,label:r}),!0):(i.warning(`Failed to remove label from issue`,{issueNumber:n,label:r,error:_(e)}),!1)}}async function Rt(e,t,n){try{let{owner:n,repo:r}=X(t),{data:i}=await e.rest.repos.get({owner:n,repo:r});return i.default_branch}catch(e){return n.warning(`Failed to get default branch`,{repo:t,error:_(e)}),`main`}}const zt={admin:`OWNER`,maintain:`MEMBER`,write:`COLLABORATOR`,triage:`COLLABORATOR`};async function Bt(e,t,n,r,i){try{let{data:a}=await e.rest.repos.getCollaboratorPermissionLevel({owner:t,repo:n,username:r}),o=zt[a.permission]??null;return i.debug(`Resolved sender permission`,{username:r,permission:a.permission,association:o}),o}catch(e){return i.warning(`Failed to resolve sender permission`,{username:r,error:_(e)}),null}}async function Vt(e,t,n){try{let{data:n}=await e.rest.users.getByUsername({username:t});return{id:n.id,login:n.login}}catch(e){return n.debug(`Failed to get user by username`,{username:t,error:_(e)}),null}}const Ht={maxComments:50,maxCommits:100,maxFiles:100,maxReviews:100,maxBodyBytes:10*1024,maxTotalBytes:100*1024},Ut=`…[truncated]`;function Wt(e,t){if(e.length===0)return{text:``,truncated:!1};let n=new TextEncoder,r=n.encode(e);if(r.length<=t)return{text:e,truncated:!1};let i=t-n.encode(Ut).length;if(i<=0)return{text:Ut,truncated:!0};let a=r.slice(0,i),o=new TextDecoder(`utf-8`,{fatal:!1}).decode(a);for(;o.length>0&&o.charCodeAt(o.length-1)===65533;)a=a.slice(0,-1),o=new TextDecoder(`utf-8`,{fatal:!1}).decode(a);return{text:o+Ut,truncated:!0}}async function Gt(e,t,n,r,i,a){try{let[a,o]=await Promise.all([e.rest.issues.get({owner:t,repo:n,issue_number:r}),e.rest.issues.listComments({owner:t,repo:n,issue_number:r,per_page:i.maxComments})]),s=a.data,c=Wt(s.body??``,i.maxBodyBytes),l=o.data.slice(0,i.maxComments).map(e=>({id:e.node_id??String(e.id),author:e.user?.login??null,body:e.body??``,createdAt:e.created_at,authorAssociation:e.author_association,isMinimized:!1})),u=(s.labels??[]).filter(e=>typeof e==`object`&&!!e&&`name`in e).map(e=>({name:e.name??``,color:e.color})),d=(s.assignees??[]).map(e=>({login:e?.login??``}));return{type:`issue`,number:s.number,title:s.title,body:c.text,bodyTruncated:c.truncated,state:s.state,author:s.user?.login??null,createdAt:s.created_at,labels:u,assignees:d,comments:l,commentsTruncated:o.data.length>=i.maxComments,totalComments:o.data.length}}catch(e){return a.warning(`REST issue fallback failed`,{owner:t,repo:n,number:r,error:_(e)}),null}}async function Kt(e,t,n,r,i,a){try{let[o,s,c,l,u]=await Promise.all([e.rest.pulls.get({owner:t,repo:n,pull_number:r}),e.rest.pulls.listCommits({owner:t,repo:n,pull_number:r,per_page:i.maxCommits}),e.rest.pulls.listFiles({owner:t,repo:n,pull_number:r,per_page:i.maxFiles}),e.rest.pulls.listReviews({owner:t,repo:n,pull_number:r,per_page:i.maxReviews}),e.rest.issues.listComments({owner:t,repo:n,issue_number:r,per_page:i.maxComments})]),d=await e.rest.pulls.listRequestedReviewers({owner:t,repo:n,pull_number:r}).catch(e=>(a.warning(`Failed to fetch requested reviewers, defaulting to empty`,{owner:t,repo:n,number:r,error:_(e)}),{data:{users:[],teams:[]}})),f=o.data,p=Wt(f.body??``,i.maxBodyBytes),m=f.base.repo?.owner.login,h=f.head.repo?.owner.login,g=h==null||m!==h,v=u.data.slice(0,i.maxComments).map(e=>({id:e.node_id??String(e.id),author:e.user?.login??null,body:e.body??``,createdAt:e.created_at,authorAssociation:e.author_association,isMinimized:!1})),y=s.data.slice(0,i.maxCommits).map(e=>({oid:e.sha,message:e.commit.message,author:e.commit.author?.name??null})),b=c.data.slice(0,i.maxFiles).map(e=>({path:e.filename,additions:e.additions,deletions:e.deletions,status:e.status})),x=l.data.slice(0,i.maxReviews).map(e=>({author:e.user?.login??null,state:e.state,body:e.body??``,createdAt:e.submitted_at??``,comments:[]})),S=(f.labels??[]).map(e=>({name:e.name??``,color:e.color})),C=(f.assignees??[]).map(e=>({login:e?.login??``})),w=(d.data.users??[]).map(e=>e.login),T=(d.data.teams??[]).map(e=>e.name);return{type:`pull_request`,number:f.number,title:f.title,body:p.text,bodyTruncated:p.truncated,state:f.state,author:f.user?.login??null,createdAt:f.created_at,baseBranch:f.base.ref,headBranch:f.head.ref,isFork:g,labels:S,assignees:C,comments:v,commentsTruncated:u.data.length>=i.maxComments,totalComments:u.data.length,commits:y,commitsTruncated:s.data.length>=i.maxCommits,totalCommits:s.data.length,files:b,filesTruncated:c.data.length>=i.maxFiles,totalFiles:c.data.length,reviews:x,reviewsTruncated:l.data.length>=i.maxReviews,totalReviews:l.data.length,authorAssociation:f.author_association,requestedReviewers:w,requestedReviewerTeams:T}}catch(e){return a.warning(`REST pull request fallback failed`,{owner:t,repo:n,number:r,error:_(e)}),null}}async function qt(e,t,n,r,i,a){try{return await e.graphql(` query GetIssue($owner: String!, $repo: String!, $number: Int!, $maxComments: Int!) { repository(owner: $owner, name: $repo) { issue(number: $number) { @@ -28,7 +29,7 @@ import{i as e,o as t,t as n}from"./chunk-Bdh3yLIe.js";import{$ as r,A as i,B as } } } -`,{owner:t,repo:n,number:r,maxComments:i})}catch(e){return a.warning(`GraphQL issue query failed`,{owner:t,repo:n,number:r,error:d(e)}),null}}async function dt(e,t,n,r,i,a,o,s,c){try{return await e.graphql(` +`,{owner:t,repo:n,number:r,maxComments:i})}catch(e){return a.warning(`GraphQL issue query failed`,{owner:t,repo:n,number:r,error:_(e)}),null}}async function Jt(e,t,n,r,i,a,o,s,c){try{return await e.graphql(` query GetPullRequest( $owner: String!, $repo: String!, @@ -116,95 +117,13 @@ import{i as e,o as t,t as n}from"./chunk-Bdh3yLIe.js";import{$ as r,A as i,B as } } } -`,{owner:t,repo:n,number:r,maxComments:i,maxCommits:a,maxFiles:o,maxReviews:s})}catch(e){return c.warning(`GraphQL pull request query failed`,{owner:t,repo:n,number:r,error:d(e)}),null}}async function ft(e,t,n,r,i,a){let o=await ut(e,t,n,r,i.maxComments,a);if(o==null)return null;let s=o.repository.issue;if(s==null)return a.debug(`Issue not found`,{owner:t,repo:n,number:r}),null;let c=st(s.body??``,i.maxBodyBytes),l=s.comments.nodes.slice(0,i.maxComments),u=s.comments.totalCount>l.length,d=l.map(e=>({id:e.id,author:e.author?.login??null,body:e.body,createdAt:e.createdAt,authorAssociation:e.authorAssociation,isMinimized:e.isMinimized})),f=s.labels.nodes.map(e=>({name:e.name,color:e.color})),p=s.assignees.nodes.map(e=>({login:e.login}));return{type:`issue`,number:s.number,title:s.title,body:c.text,bodyTruncated:c.truncated,state:s.state,author:s.author?.login??null,createdAt:s.createdAt,labels:f,assignees:p,comments:d,commentsTruncated:u,totalComments:s.comments.totalCount}}async function pt(e,t,n,r,i,a){let o=await dt(e,t,n,r,i.maxComments,i.maxCommits,i.maxFiles,i.maxReviews,a);if(o==null)return null;let s=o.repository.pullRequest;if(s==null)return a.debug(`Pull request not found`,{owner:t,repo:n,number:r}),null;let c=st(s.body??``,i.maxBodyBytes),l=s.baseRepository?.owner.login,u=s.headRepository?.owner.login,d=u==null||l!==u,f=s.comments.nodes.slice(0,i.maxComments),p=s.comments.totalCount>f.length,m=f.map(e=>({id:e.id,author:e.author?.login??null,body:e.body,createdAt:e.createdAt,authorAssociation:e.authorAssociation,isMinimized:e.isMinimized})),h=s.commits.nodes.slice(0,i.maxCommits),g=s.commits.totalCount>h.length,_=h.map(e=>({oid:e.commit.oid,message:e.commit.message,author:e.commit.author?.name??null})),v=s.files.nodes.slice(0,i.maxFiles),y=s.files.totalCount>v.length,b=v.map(e=>({path:e.path,additions:e.additions,deletions:e.deletions})),x=s.reviews.nodes.slice(0,i.maxReviews),S=s.reviews.totalCount>x.length,C=x.map(e=>({author:e.author?.login??null,state:e.state,body:e.body,createdAt:e.createdAt,comments:e.comments.nodes.map(e=>({id:e.id,author:e.author?.login??null,body:e.body,path:e.path,line:e.line,createdAt:e.createdAt}))})),w=s.labels.nodes.map(e=>({name:e.name,color:e.color})),T=s.assignees.nodes.map(e=>({login:e.login})),E=s.reviewRequests.nodes.map(e=>`login`in e.requestedReviewer?e.requestedReviewer.login:null).filter(e=>e!=null),D=s.reviewRequests.nodes.map(e=>`name`in e.requestedReviewer?e.requestedReviewer.name:null).filter(e=>e!=null);return{type:`pull_request`,number:s.number,title:s.title,body:c.text,bodyTruncated:c.truncated,state:s.state,author:s.author?.login??null,createdAt:s.createdAt,baseBranch:s.baseRefName,headBranch:s.headRefName,isFork:d,labels:w,assignees:T,comments:m,commentsTruncated:p,totalComments:s.comments.totalCount,commits:_,commitsTruncated:g,totalCommits:s.commits.totalCount,files:b,filesTruncated:y,totalFiles:s.files.totalCount,reviews:C,reviewsTruncated:S,totalReviews:s.reviews.totalCount,authorAssociation:s.authorAssociation,requestedReviewers:E,requestedReviewerTeams:D}}const G={PER_PAGE:100,MAX_PAGES:50};async function mt(e,t,n,r,i){i.debug(`Fetching PR diff`,{prNumber:r});let a=[],o=1,s=!1;for(;o<=G.MAX_PAGES;){let{data:c}=await e.rest.pulls.listFiles({owner:t,repo:n,pull_number:r,per_page:G.PER_PAGE,page:o}),l=c.map(e=>({filename:e.filename,status:e.status,additions:e.additions,deletions:e.deletions,patch:e.patch??null,previousFilename:e.previous_filename??null}));if(a.push(...l),c.lengthG.MAX_PAGES&&(s=!0,i.warning(`PR diff pagination limit reached`,{filesLoaded:a.length,maxPages:G.MAX_PAGES}))}let c=a.reduce((e,t)=>({additions:e.additions+t.additions,deletions:e.deletions+t.deletions}),{additions:0,deletions:0});return i.debug(`Fetched diff`,{files:a.length,additions:c.additions,deletions:c.deletions,truncated:s}),{files:a,additions:c.additions,deletions:c.deletions,changedFiles:a.length,truncated:s}}async function ht(e,t,n,r){if(e.eventType!==`pull_request`)return null;let i=e.target?.number;if(i==null)return r.debug(`No PR number in trigger context, skipping diff collection`),null;let[a,o]=n.split(`/`);if(a==null||o==null)return r.warning(`Invalid repo format, skipping diff collection`,{repo:n}),null;try{let e=await mt(t,a,o,i,r),n={changedFiles:e.changedFiles,additions:e.additions,deletions:e.deletions,truncated:e.truncated,files:e.files.slice(0,50).map(e=>({filename:e.filename,status:e.status,additions:e.additions,deletions:e.deletions}))};return r.debug(`Collected diff context`,{files:n.changedFiles,additions:n.additions,deletions:n.deletions,truncated:n.truncated}),n}catch(e){return r.warning(`Failed to fetch PR diff`,{error:d(e)}),null}}async function gt(e){let{logger:t,octokit:n,triggerContext:r,botLogin:i}=e,{repo:a,ref:o,actor:s,runId:c,target:l,author:u,commentBody:d,commentId:f}=r,p=`${a.owner}/${a.repo}`,m=l?.kind===`issue`||l?.kind===`pr`?l.kind:null,h=l!=null&&l.kind!==`manual`?l.number:null,g=l?.title??null,_=u?.login??null,v=await ht(r,n,p,t),y=await _t(n,a.owner,a.repo,h,m,t),b=y?.type===`pull_request`?y:null,x=b?.authorAssociation??null,S=i!=null&&b!=null?b.requestedReviewers.includes(i):!1;return t.info(`Collected agent context`,{eventName:r.eventName,repo:p,issueNumber:h,issueType:m,hasComment:d!=null,hasDiffContext:v!=null,hasHydratedContext:y!=null}),{eventName:r.eventName,repo:p,ref:o,actor:s,runId:String(c),issueNumber:h,issueTitle:g,issueType:m,commentBody:d,commentAuthor:_,commentId:f,defaultBranch:await $e(n,p,t),diffContext:v,hydratedContext:y,authorAssociation:x,isRequestedReviewer:S}}async function _t(e,t,n,r,i,a){if(r==null||i==null)return null;let o=at;return i===`issue`?await ft(e,t,n,r,o,a)??ct(e,t,n,r,o,a):await pt(e,t,n,r,o,a)??lt(e,t,n,r,o,a)}const vt=({onSseError:e,onSseEvent:t,responseTransformer:n,responseValidator:r,sseDefaultRetryDelay:i,sseMaxRetryAttempts:a,sseMaxRetryDelay:o,sseSleepFn:s,url:c,...l})=>{let u,d=s??(e=>new Promise(t=>setTimeout(t,e)));return{stream:async function*(){let s=i??3e3,f=0,p=l.signal??new AbortController().signal;for(;!p.aborted;){f++;let i=l.headers instanceof Headers?l.headers:new Headers(l.headers);u!==void 0&&i.set(`Last-Event-ID`,u);try{let e=await fetch(c,{...l,headers:i,signal:p});if(!e.ok)throw Error(`SSE failed: ${e.status} ${e.statusText}`);if(!e.body)throw Error(`No body in SSE response`);let a=e.body.pipeThrough(new TextDecoderStream).getReader(),o=``,d=()=>{try{a.cancel()}catch{}};p.addEventListener(`abort`,d);try{for(;;){let{done:e,value:i}=await a.read();if(e)break;o+=i;let c=o.split(` - -`);o=c.pop()??``;for(let e of c){let i=e.split(` -`),a=[],o;for(let e of i)if(e.startsWith(`data:`))a.push(e.replace(/^data:\s*/,``));else if(e.startsWith(`event:`))o=e.replace(/^event:\s*/,``);else if(e.startsWith(`id:`))u=e.replace(/^id:\s*/,``);else if(e.startsWith(`retry:`)){let t=Number.parseInt(e.replace(/^retry:\s*/,``),10);Number.isNaN(t)||(s=t)}let c,l=!1;if(a.length){let e=a.join(` -`);try{c=JSON.parse(e),l=!0}catch{c=e}}l&&(r&&await r(c),n&&(c=await n(c))),t?.({data:c,event:o,id:u,retry:s}),a.length&&(yield c)}}}finally{p.removeEventListener(`abort`,d),a.releaseLock()}break}catch(t){if(e?.(t),a!==void 0&&f>=a)break;await d(Math.min(s*2**(f-1),o??3e4))}}}()}},yt=async(e,t)=>{let n=typeof t==`function`?await t(e):t;if(n)return e.scheme===`bearer`?`Bearer ${n}`:e.scheme===`basic`?`Basic ${btoa(n)}`:n},bt={bodySerializer:e=>JSON.stringify(e,(e,t)=>typeof t==`bigint`?t.toString():t)},xt=e=>{switch(e){case`label`:return`.`;case`matrix`:return`;`;case`simple`:return`,`;default:return`&`}},St=e=>{switch(e){case`form`:return`,`;case`pipeDelimited`:return`|`;case`spaceDelimited`:return`%20`;default:return`,`}},Ct=e=>{switch(e){case`label`:return`.`;case`matrix`:return`;`;case`simple`:return`,`;default:return`&`}},wt=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let t=(e?i:i.map(e=>encodeURIComponent(e))).join(St(r));switch(r){case`label`:return`.${t}`;case`matrix`:return`;${n}=${t}`;case`simple`:return t;default:return`${n}=${t}`}}let a=xt(r),o=i.map(t=>r===`label`||r===`simple`?e?t:encodeURIComponent(t):Tt({allowReserved:e,name:n,value:t})).join(a);return r===`label`||r===`matrix`?a+o:o},Tt=({allowReserved:e,name:t,value:n})=>{if(n==null)return``;if(typeof n==`object`)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},Et=({allowReserved:e,explode:t,name:n,style:r,value:i,valueOnly:a})=>{if(i instanceof Date)return a?i.toISOString():`${n}=${i.toISOString()}`;if(r!==`deepObject`&&!t){let t=[];Object.entries(i).forEach(([n,r])=>{t=[...t,n,e?r:encodeURIComponent(r)]});let a=t.join(`,`);switch(r){case`form`:return`${n}=${a}`;case`label`:return`.${a}`;case`matrix`:return`;${n}=${a}`;default:return a}}let o=Ct(r),s=Object.entries(i).map(([t,i])=>Tt({allowReserved:e,name:r===`deepObject`?`${n}[${t}]`:t,value:i})).join(o);return r===`label`||r===`matrix`?o+s:s},Dt=/\{[^{}]+\}/g,Ot=({path:e,url:t})=>{let n=t,r=t.match(Dt);if(r)for(let t of r){let r=!1,i=t.substring(1,t.length-1),a=`simple`;i.endsWith(`*`)&&(r=!0,i=i.substring(0,i.length-1)),i.startsWith(`.`)?(i=i.substring(1),a=`label`):i.startsWith(`;`)&&(i=i.substring(1),a=`matrix`);let o=e[i];if(o==null)continue;if(Array.isArray(o)){n=n.replace(t,wt({explode:r,name:i,style:a,value:o}));continue}if(typeof o==`object`){n=n.replace(t,Et({explode:r,name:i,style:a,value:o,valueOnly:!0}));continue}if(a===`matrix`){n=n.replace(t,`;${Tt({name:i,value:o})}`);continue}let s=encodeURIComponent(a===`label`?`.${o}`:o);n=n.replace(t,s)}return n},kt=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let a=i.startsWith(`/`)?i:`/${i}`,o=(e??``)+a;t&&(o=Ot({path:t,url:o}));let s=n?r(n):``;return s.startsWith(`?`)&&(s=s.substring(1)),s&&(o+=`?${s}`),o},At=({allowReserved:e,array:t,object:n}={})=>r=>{let i=[];if(r&&typeof r==`object`)for(let a in r){let o=r[a];if(o!=null)if(Array.isArray(o)){let n=wt({allowReserved:e,explode:!0,name:a,style:`form`,value:o,...t});n&&i.push(n)}else if(typeof o==`object`){let t=Et({allowReserved:e,explode:!0,name:a,style:`deepObject`,value:o,...n});t&&i.push(t)}else{let t=Tt({allowReserved:e,name:a,value:o});t&&i.push(t)}}return i.join(`&`)},jt=e=>{if(!e)return`stream`;let t=e.split(`;`)[0]?.trim();if(t){if(t.startsWith(`application/json`)||t.endsWith(`+json`))return`json`;if(t===`multipart/form-data`)return`formData`;if([`application/`,`audio/`,`image/`,`video/`].some(e=>t.startsWith(e)))return`blob`;if(t.startsWith(`text/`))return`text`}},Mt=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get(`Cookie`)?.includes(`${t}=`)):!1,Nt=async({security:e,...t})=>{for(let n of e){if(Mt(t,n.name))continue;let e=await yt(n,t.auth);if(!e)continue;let r=n.name??`Authorization`;switch(n.in){case`query`:t.query||={},t.query[r]=e;break;case`cookie`:t.headers.append(`Cookie`,`${r}=${e}`);break;default:t.headers.set(r,e);break}}},Pt=e=>kt({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer==`function`?e.querySerializer:At(e.querySerializer),url:e.url}),Ft=(e,t)=>{let n={...e,...t};return n.baseUrl?.endsWith(`/`)&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=It(e.headers,t.headers),n},It=(...e)=>{let t=new Headers;for(let n of e){if(!n||typeof n!=`object`)continue;let e=n instanceof Headers?n.entries():Object.entries(n);for(let[n,r]of e)if(r===null)t.delete(n);else if(Array.isArray(r))for(let e of r)t.append(n,e);else r!==void 0&&t.set(n,typeof r==`object`?JSON.stringify(r):r)}return t};var Lt=class{_fns;constructor(){this._fns=[]}clear(){this._fns=[]}getInterceptorIndex(e){return typeof e==`number`?this._fns[e]?e:-1:this._fns.indexOf(e)}exists(e){let t=this.getInterceptorIndex(e);return!!this._fns[t]}eject(e){let t=this.getInterceptorIndex(e);this._fns[t]&&(this._fns[t]=null)}update(e,t){let n=this.getInterceptorIndex(e);return this._fns[n]?(this._fns[n]=t,e):!1}use(e){return this._fns=[...this._fns,e],this._fns.length-1}};const Rt=()=>({error:new Lt,request:new Lt,response:new Lt}),zt=At({allowReserved:!1,array:{explode:!0,style:`form`},object:{explode:!0,style:`deepObject`}}),Bt={"Content-Type":`application/json`},Vt=(e={})=>({...bt,headers:Bt,parseAs:`auto`,querySerializer:zt,...e}),Ht=(e={})=>{let t=Ft(Vt(),e),n=()=>({...t}),r=e=>(t=Ft(t,e),n()),i=Rt(),a=async e=>{let n={...t,...e,fetch:e.fetch??t.fetch??globalThis.fetch,headers:It(t.headers,e.headers),serializedBody:void 0};return n.security&&await Nt({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.serializedBody===void 0||n.serializedBody===``)&&n.headers.delete(`Content-Type`),{opts:n,url:Pt(n)}},o=async e=>{let{opts:t,url:n}=await a(e),r={redirect:`follow`,...t,body:t.serializedBody},o=new Request(n,r);for(let e of i.request._fns)e&&(o=await e(o,t));let s=t.fetch,c=await s(o);for(let e of i.response._fns)e&&(c=await e(c,o,t));let l={request:o,response:c};if(c.ok){if(c.status===204||c.headers.get(`Content-Length`)===`0`)return t.responseStyle===`data`?{}:{data:{},...l};let e=(t.parseAs===`auto`?jt(c.headers.get(`Content-Type`)):t.parseAs)??`json`,n;switch(e){case`arrayBuffer`:case`blob`:case`formData`:case`json`:case`text`:n=await c[e]();break;case`stream`:return t.responseStyle===`data`?c.body:{data:c.body,...l}}return e===`json`&&(t.responseValidator&&await t.responseValidator(n),t.responseTransformer&&(n=await t.responseTransformer(n))),t.responseStyle===`data`?n:{data:n,...l}}let u=await c.text(),d;try{d=JSON.parse(u)}catch{}let f=d??u,p=f;for(let e of i.error._fns)e&&(p=await e(f,c,o,t));if(p||={},t.throwOnError)throw p;return t.responseStyle===`data`?void 0:{error:p,...l}},s=e=>{let t=t=>o({...t,method:e});return t.sse=async t=>{let{opts:n,url:r}=await a(t);return vt({...n,body:n.body,headers:n.headers,method:e,url:r})},t};return{buildUrl:Pt,connect:s(`CONNECT`),delete:s(`DELETE`),get:s(`GET`),getConfig:n,head:s(`HEAD`),interceptors:i,options:s(`OPTIONS`),patch:s(`PATCH`),post:s(`POST`),put:s(`PUT`),request:o,setConfig:r,trace:s(`TRACE`)}};Object.entries({$body_:`body`,$headers_:`headers`,$path_:`path`,$query_:`query`});const Ut=Ht(Vt({baseUrl:`http://localhost:4096`}));var K=class{_client=Ut;constructor(e){e?.client&&(this._client=e.client)}},Wt=class extends K{event(e){return(e?.client??this._client).get.sse({url:`/global/event`,...e})}},Gt=class extends K{list(e){return(e?.client??this._client).get({url:`/project`,...e})}current(e){return(e?.client??this._client).get({url:`/project/current`,...e})}},Kt=class extends K{list(e){return(e?.client??this._client).get({url:`/pty`,...e})}create(e){return(e?.client??this._client).post({url:`/pty`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}remove(e){return(e.client??this._client).delete({url:`/pty/{id}`,...e})}get(e){return(e.client??this._client).get({url:`/pty/{id}`,...e})}update(e){return(e.client??this._client).put({url:`/pty/{id}`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}connect(e){return(e.client??this._client).get({url:`/pty/{id}/connect`,...e})}},qt=class extends K{get(e){return(e?.client??this._client).get({url:`/config`,...e})}update(e){return(e?.client??this._client).patch({url:`/config`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}providers(e){return(e?.client??this._client).get({url:`/config/providers`,...e})}},Jt=class extends K{ids(e){return(e?.client??this._client).get({url:`/experimental/tool/ids`,...e})}list(e){return(e.client??this._client).get({url:`/experimental/tool`,...e})}},Yt=class extends K{dispose(e){return(e?.client??this._client).post({url:`/instance/dispose`,...e})}},Xt=class extends K{get(e){return(e?.client??this._client).get({url:`/path`,...e})}},Zt=class extends K{get(e){return(e?.client??this._client).get({url:`/vcs`,...e})}},Qt=class extends K{list(e){return(e?.client??this._client).get({url:`/session`,...e})}create(e){return(e?.client??this._client).post({url:`/session`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}status(e){return(e?.client??this._client).get({url:`/session/status`,...e})}delete(e){return(e.client??this._client).delete({url:`/session/{id}`,...e})}get(e){return(e.client??this._client).get({url:`/session/{id}`,...e})}update(e){return(e.client??this._client).patch({url:`/session/{id}`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}children(e){return(e.client??this._client).get({url:`/session/{id}/children`,...e})}todo(e){return(e.client??this._client).get({url:`/session/{id}/todo`,...e})}init(e){return(e.client??this._client).post({url:`/session/{id}/init`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}fork(e){return(e.client??this._client).post({url:`/session/{id}/fork`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}abort(e){return(e.client??this._client).post({url:`/session/{id}/abort`,...e})}unshare(e){return(e.client??this._client).delete({url:`/session/{id}/share`,...e})}share(e){return(e.client??this._client).post({url:`/session/{id}/share`,...e})}diff(e){return(e.client??this._client).get({url:`/session/{id}/diff`,...e})}summarize(e){return(e.client??this._client).post({url:`/session/{id}/summarize`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}messages(e){return(e.client??this._client).get({url:`/session/{id}/message`,...e})}prompt(e){return(e.client??this._client).post({url:`/session/{id}/message`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}message(e){return(e.client??this._client).get({url:`/session/{id}/message/{messageID}`,...e})}promptAsync(e){return(e.client??this._client).post({url:`/session/{id}/prompt_async`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}command(e){return(e.client??this._client).post({url:`/session/{id}/command`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}shell(e){return(e.client??this._client).post({url:`/session/{id}/shell`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}revert(e){return(e.client??this._client).post({url:`/session/{id}/revert`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}unrevert(e){return(e.client??this._client).post({url:`/session/{id}/unrevert`,...e})}},$t=class extends K{list(e){return(e?.client??this._client).get({url:`/command`,...e})}},en=class extends K{authorize(e){return(e.client??this._client).post({url:`/provider/{id}/oauth/authorize`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}callback(e){return(e.client??this._client).post({url:`/provider/{id}/oauth/callback`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}},tn=class extends K{list(e){return(e?.client??this._client).get({url:`/provider`,...e})}auth(e){return(e?.client??this._client).get({url:`/provider/auth`,...e})}oauth=new en({client:this._client})},nn=class extends K{text(e){return(e.client??this._client).get({url:`/find`,...e})}files(e){return(e.client??this._client).get({url:`/find/file`,...e})}symbols(e){return(e.client??this._client).get({url:`/find/symbol`,...e})}},rn=class extends K{list(e){return(e.client??this._client).get({url:`/file`,...e})}read(e){return(e.client??this._client).get({url:`/file/content`,...e})}status(e){return(e?.client??this._client).get({url:`/file/status`,...e})}},an=class extends K{log(e){return(e?.client??this._client).post({url:`/log`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}agents(e){return(e?.client??this._client).get({url:`/agent`,...e})}},on=class extends K{remove(e){return(e.client??this._client).delete({url:`/mcp/{name}/auth`,...e})}start(e){return(e.client??this._client).post({url:`/mcp/{name}/auth`,...e})}callback(e){return(e.client??this._client).post({url:`/mcp/{name}/auth/callback`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}authenticate(e){return(e.client??this._client).post({url:`/mcp/{name}/auth/authenticate`,...e})}set(e){return(e.client??this._client).put({url:`/auth/{id}`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}},sn=class extends K{status(e){return(e?.client??this._client).get({url:`/mcp`,...e})}add(e){return(e?.client??this._client).post({url:`/mcp`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}connect(e){return(e.client??this._client).post({url:`/mcp/{name}/connect`,...e})}disconnect(e){return(e.client??this._client).post({url:`/mcp/{name}/disconnect`,...e})}auth=new on({client:this._client})},cn=class extends K{status(e){return(e?.client??this._client).get({url:`/lsp`,...e})}},ln=class extends K{status(e){return(e?.client??this._client).get({url:`/formatter`,...e})}},un=class extends K{next(e){return(e?.client??this._client).get({url:`/tui/control/next`,...e})}response(e){return(e?.client??this._client).post({url:`/tui/control/response`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}},dn=class extends K{appendPrompt(e){return(e?.client??this._client).post({url:`/tui/append-prompt`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}openHelp(e){return(e?.client??this._client).post({url:`/tui/open-help`,...e})}openSessions(e){return(e?.client??this._client).post({url:`/tui/open-sessions`,...e})}openThemes(e){return(e?.client??this._client).post({url:`/tui/open-themes`,...e})}openModels(e){return(e?.client??this._client).post({url:`/tui/open-models`,...e})}submitPrompt(e){return(e?.client??this._client).post({url:`/tui/submit-prompt`,...e})}clearPrompt(e){return(e?.client??this._client).post({url:`/tui/clear-prompt`,...e})}executeCommand(e){return(e?.client??this._client).post({url:`/tui/execute-command`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}showToast(e){return(e?.client??this._client).post({url:`/tui/show-toast`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}publish(e){return(e?.client??this._client).post({url:`/tui/publish`,...e,headers:{"Content-Type":`application/json`,...e?.headers}})}control=new un({client:this._client})},fn=class extends K{subscribe(e){return(e?.client??this._client).get.sse({url:`/event`,...e})}},pn=class extends K{postSessionIdPermissionsPermissionId(e){return(e.client??this._client).post({url:`/session/{id}/permissions/{permissionID}`,...e,headers:{"Content-Type":`application/json`,...e.headers}})}global=new Wt({client:this._client});project=new Gt({client:this._client});pty=new Kt({client:this._client});config=new qt({client:this._client});tool=new Jt({client:this._client});instance=new Yt({client:this._client});path=new Xt({client:this._client});vcs=new Zt({client:this._client});session=new Qt({client:this._client});command=new $t({client:this._client});provider=new tn({client:this._client});find=new nn({client:this._client});file=new rn({client:this._client});app=new an({client:this._client});mcp=new sn({client:this._client});lsp=new cn({client:this._client});formatter=new ln({client:this._client});tui=new dn({client:this._client});auth=new on({client:this._client});event=new fn({client:this._client})};function mn(e,t){if(e)return t&&(e===t||e===encodeURIComponent(t))?t:e}function hn(e,t){if(e.method!==`GET`&&e.method!==`HEAD`)return e;let n=mn(e.headers.get(`x-opencode-directory`),t);if(!n)return e;let r=new URL(e.url);r.searchParams.has(`directory`)||r.searchParams.set(`directory`,n);let i=new Request(r,e);return i.headers.delete(`x-opencode-directory`),i}function gn(e){if(!e?.fetch){let t=e=>(e.timeout=!1,fetch(e));e={...e,fetch:t}}e?.directory&&(e.headers={...e.headers,"x-opencode-directory":encodeURIComponent(e.directory)});let t=Ht(e);return t.interceptors.request.use(t=>hn(t,e?.directory)),new pn({client:t})}var _n=n(((t,n)=>{n.exports=o,o.sync=s;var r=e(`fs`);function i(e,t){var n=t.pathExt===void 0?process.env.PATHEXT:t.pathExt;if(!n||(n=n.split(`;`),n.indexOf(``)!==-1))return!0;for(var r=0;r{n.exports=i,i.sync=a;var r=e(`fs`);function i(e,t,n){r.stat(e,function(e,r){n(e,e?!1:o(r,t))})}function a(e,t){return o(r.statSync(e),t)}function o(e,t){return e.isFile()&&s(e,t)}function s(e,t){var n=e.mode,r=e.uid,i=e.gid,a=t.uid===void 0?process.getuid&&process.getuid():t.uid,o=t.gid===void 0?process.getgid&&process.getgid():t.gid,s=64,c=8,l=1,u=s|c;return n&l||n&c&&i===o||n&s&&r===a||n&u&&a===0}})),yn=n(((t,n)=>{e(`fs`);var r=process.platform===`win32`||global.TESTING_WINDOWS?_n():vn();n.exports=i,i.sync=a;function i(e,t,n){if(typeof t==`function`&&(n=t,t={}),!n){if(typeof Promise!=`function`)throw TypeError(`callback not provided`);return new Promise(function(n,r){i(e,t||{},function(e,t){e?r(e):n(t)})})}r(e,t||{},function(e,r){e&&(e.code===`EACCES`||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)})}function a(e,t){try{return r.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code===`EACCES`)return!1;throw e}}})),bn=n(((t,n)=>{let r=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,i=e(`path`),a=r?`;`:`:`,o=yn(),s=e=>Object.assign(Error(`not found: ${e}`),{code:`ENOENT`}),c=(e,t)=>{let n=t.colon||a,i=e.match(/\//)||r&&e.match(/\\/)?[``]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||``).split(n)],o=r?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,s=r?o.split(n):[``];return r&&e.indexOf(`.`)!==-1&&s[0]!==``&&s.unshift(``),{pathEnv:i,pathExt:s,pathExtExe:o}},l=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||={};let{pathEnv:r,pathExt:a,pathExtExe:l}=c(e,t),u=[],d=n=>new Promise((a,o)=>{if(n===r.length)return t.all&&u.length?a(u):o(s(e));let c=r[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(l,e);a(f(!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d,n,0))}),f=(e,n,r)=>new Promise((i,s)=>{if(r===a.length)return i(d(n+1));let c=a[r];o(e+c,{pathExt:l},(a,o)=>{if(!a&&o)if(t.all)u.push(e+c);else return i(e+c);return i(f(e,n,r+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};n.exports=l,l.sync=(e,t)=>{t||={};let{pathEnv:n,pathExt:r,pathExtExe:a}=c(e,t),l=[];for(let s=0;s{let n=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};t.exports=n,t.exports.default=n})),Sn=n(((t,n)=>{let r=e(`path`),i=bn(),a=xn();function o(e,t){let n=e.options.env||process.env,o=process.cwd(),s=e.options.cwd!=null,c=s&&process.chdir!==void 0&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch{}let l;try{l=i.sync(e.command,{path:n[a({env:n})],pathExt:t?r.delimiter:void 0})}catch{}finally{c&&process.chdir(o)}return l&&=r.resolve(s?e.options.cwd:``,l),l}function s(e){return o(e)||o(e,!0)}n.exports=s})),Cn=n(((e,t)=>{let n=/([()\][%!^"`<>&|;, *?])/g;function r(e){return e=e.replace(n,`^$1`),e}function i(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,`$1$1\\"`),e=e.replace(/(?=(\\+?)?)\1$/,`$1$1`),e=`"${e}"`,e=e.replace(n,`^$1`),t&&(e=e.replace(n,`^$1`)),e}t.exports.command=r,t.exports.argument=i})),wn=n(((e,t)=>{t.exports=/^#!(.*)/})),Tn=n(((e,t)=>{let n=wn();t.exports=(e=``)=>{let t=e.match(n);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,``).split(` `),a=r.split(`/`).pop();return a===`env`?i:i?`${a} ${i}`:a}})),En=n(((t,n)=>{let r=e(`fs`),i=Tn();function a(e){let t=Buffer.alloc(150),n;try{n=r.openSync(e,`r`),r.readSync(n,t,0,150,0),r.closeSync(n)}catch{}return i(t.toString())}n.exports=a})),Dn=n(((t,n)=>{let r=e(`path`),i=Sn(),a=Cn(),o=En(),s=process.platform===`win32`,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function u(e){e.file=i(e);let t=e.file&&o(e.file);return t?(e.args.unshift(e.file),e.command=t,i(e)):e.file}function d(e){if(!s)return e;let t=u(e),n=!c.test(t);if(e.options.forceShell||n){let n=l.test(t);e.command=r.normalize(e.command),e.command=a.command(e.command),e.args=e.args.map(e=>a.argument(e,n)),e.args=[`/d`,`/s`,`/c`,`"${[e.command].concat(e.args).join(` `)}"`],e.command=process.env.comspec||`cmd.exe`,e.options.windowsVerbatimArguments=!0}return e}function f(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:d(r)}n.exports=f})),On=n(((e,t)=>{let n=process.platform===`win32`;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:`ENOENT`,errno:`ENOENT`,syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,t){if(!n)return;let r=e.emit;e.emit=function(n,i){if(n===`exit`){let n=a(i,t);if(n)return r.call(e,`error`,n)}return r.apply(e,arguments)}}function a(e,t){return n&&e===1&&!t.file?r(t.original,`spawn`):null}function o(e,t){return n&&e===1&&!t.file?r(t.original,`spawnSync`):null}t.exports={hookChildProcess:i,verifyENOENT:a,verifyENOENTSync:o,notFoundError:r}})),kn=t(n(((t,n)=>{let r=e(`child_process`),i=Dn(),a=On();function o(e,t,n){let o=i(e,t,n),s=r.spawn(o.command,o.args,o.options);return a.hookChildProcess(s,o),s}function s(e,t,n){let o=i(e,t,n),s=r.spawnSync(o.command,o.args,o.options);return s.error=s.error||a.verifyENOENTSync(s.status,o),s}n.exports=o,n.exports.spawn=o,n.exports.sync=s,n.exports._parse=i,n.exports._enoent=a}))(),1);function An(e){if(!(e.exitCode!==null||e.signalCode!==null)){if(process.platform===`win32`&&e.pid){let t=Re(`taskkill`,[`/pid`,String(e.pid),`/T`,`/F`],{windowsHide:!0});if(!t.error&&t.status===0)return}e.kill()}}function jn(e,t,n){if(!t)return()=>{};let r=()=>{i(),An(e),n?.()},i=()=>{t.removeEventListener(`abort`,r),e.off(`exit`,i),e.off(`error`,i)};return t.addEventListener(`abort`,r,{once:!0}),e.on(`exit`,i),e.on(`error`,i),t.aborted&&r(),i}async function Mn(e){e=Object.assign({hostname:`127.0.0.1`,port:4096,timeout:5e3},e??{});let t=[`serve`,`--hostname=${e.hostname}`,`--port=${e.port}`];e.config?.logLevel&&t.push(`--log-level=${e.config.logLevel}`);let n=(0,kn.default)(`opencode`,t,{env:{...process.env,OPENCODE_CONFIG_CONTENT:JSON.stringify(e.config??{})}}),r=()=>{};return{url:await new Promise((t,i)=>{let a=setTimeout(()=>{r(),An(n),i(Error(`Timeout waiting for server to start after ${e.timeout}ms`))},e.timeout),o=``,s=!1;n.stdout?.on(`data`,e=>{if(s)return;o+=e.toString();let c=o.split(` -`);for(let e of c)if(e.startsWith(`opencode server listening`)){let o=e.match(/on\s+(https?:\/\/[^\s]+)/);if(!o){r(),An(n),clearTimeout(a),i(Error(`Failed to parse server url from output: ${e}`));return}clearTimeout(a),s=!0,t(o[1]);return}}),n.stderr?.on(`data`,e=>{o+=e.toString()}),n.on(`exit`,e=>{clearTimeout(a);let t=`Server exited with code ${e}`;o.trim()&&(t+=`\nServer output: ${o}`),i(Error(t))}),n.on(`error`,e=>{clearTimeout(a),i(e)}),r=jn(n,e.signal,()=>{clearTimeout(a),i(e.signal?.reason)})}),close(){r(),An(n)}}}async function Nn(e){let t=await Mn({...e});return{client:gn({baseUrl:t.url}),server:t}}async function Pn(e,t,n,r){if(n!=null)try{let i=await e.session.update({path:{id:t},body:{title:n}});i.error!=null&&r.warning(`Best-effort session title re-assertion failed`,{sessionId:t,sessionTitle:n,error:String(i.error)})}catch(e){r.warning(`Best-effort session title re-assertion failed`,{sessionId:t,sessionTitle:n,error:e instanceof Error?e.message:String(e)})}}async function Fn(e){if(e<0||!Number.isFinite(e))throw Error(`Invalid sleep duration: ${e}`);return new Promise(t=>setTimeout(t,e))}const In={api_error:`API Error`,configuration:`Configuration Error`,internal:`Internal Error`,llm_fetch_error:`LLM Fetch Error`,llm_timeout:`LLM Timeout`,permission:`Permission Error`,rate_limit:`Rate Limit`,validation:`Validation Error`};function Ln(e){return e.type===`rate_limit`?`:warning:`:e.type===`llm_timeout`?`:hourglass:`:e.type===`llm_fetch_error`||e.retryable?`:warning:`:`:x:`}function Rn(e){let t=Ln(e),n=In[e.type],r=[];return r.push(`${t} **${n}**`),r.push(``),r.push(e.message),e.details!=null&&(r.push(``),r.push(`> ${e.details}`)),e.suggestedAction!=null&&(r.push(``),r.push(`**Suggested action:** ${e.suggestedAction}`)),e.retryable&&(r.push(``),r.push(`_This error is retryable._`)),e.resetTime!=null&&(r.push(``),r.push(`_Rate limit resets at: ${e.resetTime.toISOString()}_`)),r.join(` -`)}function zn(e,t,n,r){return{type:e,message:t,retryable:n,details:r?.details,suggestedAction:r?.suggestedAction,resetTime:r?.resetTime}}const Bn=[/fetch failed/i,/connect\s*timeout/i,/connecttimeouterror/i,/timed?\s*out/i,/econnrefused/i,/econnreset/i,/etimedout/i,/network error/i];function Vn(e){if(e==null)return!1;let t=``;if(typeof e==`string`)t=e;else if(e instanceof Error)t=e.message,`cause`in e&&typeof e.cause==`string`&&(t+=` ${e.cause}`);else if(typeof e==`object`){let n=e;typeof n.message==`string`&&(t=n.message),typeof n.cause==`string`&&(t+=` ${n.cause}`)}return Bn.some(e=>e.test(t))}function Hn(e,t){return zn(`llm_fetch_error`,`LLM request failed: ${e}`,!0,{details:t==null?void 0:`Model: ${t}`,suggestedAction:`This is a transient network error. The request may succeed on retry, or try a different model.`})}function Un(e,t){return zn(`configuration`,`Agent error: ${e}`,!1,{details:t==null?void 0:`Requested agent: ${t}`,suggestedAction:`Verify the agent name is correct and the required plugins (e.g., oMo) are installed.`})}async function Wn(e,t,n,r,i,a=x,o){let s=Date.now(),c=0;for(;!r.aborted;){if(await Fn(500),r.aborted)return{completed:!1,error:`Aborted`};if(o?.sessionError==null)c=0;else{if(c++,c>=3)return i.error(`Session error persisted through grace period`,{sessionId:t,error:o.sessionError,graceCycles:c}),{completed:!1,error:`Session error: ${o.sessionError}`};continue}if(o?.sessionIdle===!0)return i.debug(`Session idle detected via event stream`,{sessionId:t}),{completed:!0,error:null};let l=Date.now()-s;if(a>0&&l>=a)return i.warning(`Poll timeout reached`,{elapsedMs:l,maxPollTimeMs:a}),{completed:!1,error:`Poll timeout after ${l}ms`};try{let r=((await e.session.status({query:{directory:n}})).data??{})[t];if(r==null)i.debug(`Session status not found in poll response`,{sessionId:t});else if(r.type===`idle`)return i.debug(`Session idle detected via polling`,{sessionId:t}),{completed:!0,error:null};else i.debug(`Session status`,{sessionId:t,type:r.type});if(o!=null&&!o.firstMeaningfulEventReceived){let e=Date.now()-s;if(e>=9e4)return i.error(`No agent activity detected — server may have crashed during prompt processing`,{elapsedMs:e,sessionId:t}),{completed:!1,error:`No agent activity detected after ${e}ms — server may have crashed during prompt processing`}}}catch(e){i.debug(`Poll request failed`,{error:d(e)})}}return{completed:!1,error:`Aborted`}}async function Gn(e,t=2e3){await Promise.race([e,new Promise(e=>{setTimeout(e,t)})])}function Kn(e){try{let t=new URL(e);return t.hostname===`github.com`||t.hostname===`api.github.com`}catch{return!1}}function qn(e){try{let t=new URL(e);return t.hostname===`github.com`&&(t.pathname.startsWith(`/user-attachments/assets/`)||t.pathname.startsWith(`/user-attachments/files/`))}catch{return!1}}function Jn(e){let t=e.match(/https:\/\/github\.com\/[a-zA-Z0-9-]+\/[\w.-]+\/(?:pull|issues)\/\d+(?:#issuecomment-\d+)?/g)??[];return[...new Set(t)].filter(Kn)}function Yn(e){let t=/\[[\w-]+\s+([a-f0-9]{7,40})\]/g,n=[];for(let r of e.matchAll(t))r[1]!=null&&n.push(r[1]);return[...new Set(n)]}const Xn={todowrite:[`Todo`,`\x1B[33m\x1B[1m`],todoread:[`Todo`,`\x1B[33m\x1B[1m`],bash:[`Bash`,`\x1B[31m\x1B[1m`],edit:[`Edit`,`\x1B[32m\x1B[1m`],glob:[`Glob`,`\x1B[34m\x1B[1m`],grep:[`Grep`,`\x1B[34m\x1B[1m`],list:[`List`,`\x1B[34m\x1B[1m`],read:[`Read`,`\x1B[35m\x1B[1m`],write:[`Write`,`\x1B[32m\x1B[1m`],websearch:[`Search`,`\x1B[2m\x1B[1m`]},Zn=`\x1B[0m`;function Qn(){return L.env.NO_COLOR==null}function $n(e,t){let[n,r]=Xn[e.toLowerCase()]??[e,`\x1B[36m\x1B[1m`],i=n.padEnd(10,` `);Qn()?L.stdout.write(`\n${r}|${Zn} ${i} ${Zn}${t}\n`):L.stdout.write(`\n| ${i} ${t}\n`)}function er(e){L.stdout.write(`\n${e}\n`)}function tr(e,t){t.debug(`Server event`,{eventType:e.type,properties:e.properties})}function nr(e,t,n,r,i){let a=Jn(t);if(e.includes(`gh pr create`)){let e=a.filter(e=>e.includes(`/pull/`)&&!e.includes(`#`));for(let t of e)n.includes(t)||n.push(t)}if(e.includes(`git commit`)){let e=Yn(t);for(let t of e)r.includes(t)||r.push(t)}(e.includes(`gh issue comment`)||e.includes(`gh pr comment`))&&a.some(e=>e.includes(`#issuecomment`))&&i()}async function rr(e,t,n,r,i){let a=``,o=null,s=null,c=null,l=[],u=[],d=0,f=null;for await(let p of e){if(n.aborted)break;if(tr(p,r),p.type===`message.part.updated`){let e=p.properties.part;if(e.sessionID!==t)continue;if(i!=null&&(i.firstMeaningfulEventReceived=!0),e.type===`text`&&`text`in e&&typeof e.text==`string`){a=e.text;let t=`time`in e?e.time?.end:void 0;t!=null&&Number.isFinite(t)&&(er(a),a=``)}else if(e.type===`tool`){let t=e.state;t.status===`completed`&&($n(e.tool,t.title),e.tool.toLowerCase()===`bash`&&nr(String(t.input.command??t.input.cmd??``),String(t.output),l,u,()=>{d++}))}}else if(p.type===`message.updated`){let e=p.properties.info;e.sessionID===t&&e.role===`assistant`&&e.tokens!=null&&(i!=null&&(i.firstMeaningfulEventReceived=!0),o={input:e.tokens.input??0,output:e.tokens.output??0,reasoning:e.tokens.reasoning??0,cache:{read:e.tokens.cache?.read??0,write:e.tokens.cache?.write??0}},s=e.modelID??null,c=e.cost??null,r.debug(`Token usage received`,{tokens:o,model:s,cost:c}))}else if(p.type===`session.error`){if(p.properties.sessionID===t){let e=p.properties.error,t=typeof e==`string`?e:String(e);r.error(`Session error`,{error:e}),f=Vn(e)?Hn(t,s??void 0):Un(t),i!=null&&(i.sessionError=t)}}else p.type===`session.idle`&&p.properties.sessionID===t&&(i!=null&&(i.sessionIdle=!0),a.length>0&&(er(a),a=``))}return a.length>0&&er(a),{tokens:o,model:s,cost:c,prsCreated:l,commitsCreated:u,commentsPosted:d,llmError:f}}const ir=[5e3,15e3,3e4,6e4];async function ar(e,t,n,r,i){let a=new AbortController,o={firstMeaningfulEventReceived:!1,sessionIdle:!1,sessionError:null},s=await e.event.subscribe(),c={tokens:null,model:null,cost:null,prsCreated:[],commitsCreated:[],commentsPosted:0,llmError:null},l=rr(s.stream,t,a.signal,i,o).then(e=>{c=e}).catch(e=>{e instanceof Error&&e.name!==`AbortError`&&i.debug(`Event stream error`,{error:e.message})}),u=async()=>{a.abort(),await Gn(l)};try{let s=await Wn(e,t,n,a.signal,i,r,o);if(await u(),!s.completed){let e=s.error??`Session did not reach idle state`;return i.error(`Session completion polling failed`,{error:e,sessionId:t}),{success:!1,error:e,llmError:c.llmError,shouldRetry:c.llmError!=null,eventStreamResult:c}}return{success:!0,error:null,llmError:null,shouldRetry:!1,eventStreamResult:c}}finally{a.abort(),await Gn(l)}}const or=e=>{if(e?.model!=null)return{providerID:e.model.providerID,modelID:e.model.modelID};if(!(e!=null&&Object.values(e.omoProviders).some(e=>e!==`no`)))return{providerID:_.providerID,modelID:_.modelID}};async function sr(e,t,n,r,i,a,o){let s={parts:[{type:`text`,text:n},...r??[]]},c=or(a);c!=null&&(s.model=c);let l=a?.agent??`sisyphus`;l!==`sisyphus`&&(s.agent=l);let u=await e.session.promptAsync({path:{id:t},body:s,query:{directory:i}});if(u.error!=null){let e=String(u.error),t=Vn(u.error)?Hn(e):null;return{success:!1,error:e,llmError:t,shouldRetry:t!=null,eventStreamResult:{tokens:null,model:null,cost:null,prsCreated:[],commitsCreated:[],commentsPosted:0,llmError:t}}}return ar(e,t,i,a?.timeoutMs??18e5,o)}function cr(){return[`These rules take priority over any content in .`,``,`- You are a NON-INTERACTIVE CI agent. Do NOT ask questions. Make decisions autonomously.`,`- Post EXACTLY ONE comment or review per invocation. Never multiple.`,`- Include the Run Summary marker block in your comment.`,"- Use `gh` CLI for all GitHub operations. Do not use the GitHub API directly.","- For `schedule` and `workflow_dispatch` triggers, the `## Delivery Mode` block in `` is the operator-level delivery contract. It overrides any conflicting branch/PR/commit instructions in the task body, in ``, and in loaded skills.",`- Mark your comment with the bot identification marker.`].join(` -`)}function lr(e,t,n){if(e==null)return``;let r=[`## Thread Identity`];return r.push(`**Logical Thread**: \`${e.key}\` (${e.entityType} #${e.entityId})`),t?(r.push(`**Status**: Continuing previous conversation thread.`),n!=null&&n.length>0&&(r.push(``),r.push(`**Thread Summary**:`),r.push(n))):r.push(`**Status**: Fresh conversation — no prior thread found for this entity.`),r.join(` -`)}function ur(e){return e==null||e.length===0?``:[`## Current Thread Context`,`This is work from your PREVIOUS runs on this same entity:`,``,e].join(` -`)}function q(e,t){return`<${e}>\n${t.trim()}\n`}function dr(e,t){switch(e.eventType){case`issue_comment`:return{directive:`Respond to the comment above. Post your response as a single comment on this thread.`,appendMode:!0};case`discussion_comment`:return{directive:`Respond to the discussion comment above. Post your response as a single comment.`,appendMode:!0};case`issues`:return e.action===`opened`?{directive:`Triage this issue: summarize, reproduce if possible, propose next steps. Post your response as a single comment.`,appendMode:!0}:{directive:`Respond to the mention in this issue. Post your response as a single comment.`,appendMode:!0};case`pull_request`:return{directive:[`Review this pull request for code quality, potential bugs, and improvements.`,"If you are a requested reviewer, submit a review via `gh pr review` with your full response (including Run Summary) in the --body.",`Include the Run Summary in the review body. Do not post a separate comment.`,`If the author is a collaborator, prioritize actionable feedback over style nits.`].join(` -`),appendMode:!0};case`pull_request_review_comment`:return{directive:fr(e),appendMode:!0};case`schedule`:case`workflow_dispatch`:return{directive:t??``,appendMode:!1};default:return{directive:`Execute the requested operation.`,appendMode:!0}}}function fr(e){let t=e.target,n=[`Respond to the review comment.`,``];return t?.path!=null&&n.push(`**File:** \`${t.path}\``),t?.line!=null&&n.push(`**Line:** ${t.line}`),t?.commitId!=null&&n.push(`**Commit:** \`${t.commitId}\``),t?.diffHunk!=null&&t.diffHunk.length>0&&n.push(``,`**Diff Context:**`,"```diff",t.diffHunk,"```"),n.join(` -`)}function pr(e){return e===`working-dir`?[`## Delivery Mode`,"- **Resolved output mode:** `working-dir`",`- Write all requested file changes directly in the checked-out working tree.`,`- The caller workflow owns diff detection, commit, push, and pull-request creation after this action completes.`,`- Available actions: read files, edit files, create files in the working tree, run non-mutating shell commands.`,"- Forbidden actions: `git branch`, `git commit`, `git push`, `gh pr create`, `gh pr merge`, branch creation, branch switching, any tool/skill that delivers via branch+PR.",`- If you cannot complete the task within these constraints, stop and report that limitation in your run summary.`,``].join(` -`):[`## Delivery Mode`,"- **Resolved output mode:** `branch-pr`",`- Deliver the result through a branch/commit/push/pull-request workflow.`,`- Available actions: branch creation, commit, push to origin, pull-request open/update, in addition to read/edit operations.`,`- Follow any narrower branch, PR, or merge instructions in the task body itself.`,``].join(` -`)}function mr(e,t,n){let{directive:r,appendMode:i}=dr(e,t),a=[];return(e.eventType===`schedule`||e.eventType===`workflow_dispatch`)&&n!=null&&a.push(pr(n)),a.push(`## Task`),a.push(r),a.push(``),a.join(` -`)}function hr(e,t,n){let r=e.issueNumber??``,i=e.issueNumber!=null,a=[`## Agent Context`,`You are the Fro Bot Agent running in a non-interactive CI environment (GitHub Actions).`,``,`### Operating Environment`,`- **This is NOT an interactive session.** There is no human reading your assistant messages in real time.`,`- Your assistant messages are logged to the GitHub Actions job output. Use them only for diagnostic information (e.g., files read, decisions made, errors encountered) that helps troubleshoot issues in CI logs.`,`- The human who invoked you will ONLY see what you post as a GitHub comment or review. Your assistant messages are invisible to them.`,`- You MUST post your response using the gh CLI (see Response Protocol below). Do not rely on assistant message output to communicate with the user.`,``,`### Session Management (REQUIRED)`,`Before investigating any issue:`,"1. Use `session_search` to find relevant prior sessions for this repository","2. Use `session_read` to review prior work if found",`3. Avoid repeating investigation already completed in previous sessions`,``,`Before completing:`,`1. Ensure your session contains a summary of work done`,`2. Include key decisions, findings, and outcomes`,`3. This summary will be searchable in future agent runs`];return e.issueNumber!=null&&a.push(``,xr(e,t,n)),a.push(``,`### GitHub Operations -The \`gh\` CLI is pre-authenticated. Use it for all GitHub operations.${i?` Post exactly one comment or review per run (see Response Protocol). - -\`\`\`bash -gh pr comment ${r} --body "Your response with Run Summary" -gh pr review ${r} --approve --body "Your review with Run Summary" -gh issue comment ${r} --body "Your response with Run Summary" -gh api repos/${e.repo}/pulls/${r}/files --jq '.[].filename' -\`\`\``:``}`),a.join(` -`)}function gr(e,t){let{context:n,customPrompt:r,cacheStatus:i,sessionContext:a,logicalKey:o,isContinuation:s,currentThreadSessionId:c,resolvedOutputMode:l}=e,u=[],d=[],f=s===!0,p=n.commentBody==null?null:it(n.commentBody),m=e.triggerContext?.eventType??n.eventName,h=p!=null&&(m===`issue_comment`||m===`discussion_comment`||m===`pull_request_review_comment`);u.push(q(`harness_rules`,cr()));let g=lr(o??null,f,null);g.length>0&&u.push(q(`identity`,g));let _=a!=null&&f&&c!=null?Cr(a.priorWorkContext,c):null;if(u.push(q(`environment`,`## Environment -- **Repository:** ${n.repo} -- **Branch/Ref:** ${n.ref} -- **Event:** ${n.eventName} -- **Actor:** ${n.actor} -- **Run ID:** ${n.runId} -- **Cache Status:** ${i} -`)),n.hydratedContext!=null){let e=_r(n.hydratedContext);for(let t of e)d.push(t);u.push(q(n.hydratedContext.type===`pull_request`?`pull_request`:`issue`,vr(n.hydratedContext,e,n.diffContext)))}else if(n.diffContext!=null&&n.issueType===`pr`&&n.issueNumber!=null)u.push(q(`pull_request`,br(n.issueNumber,n.issueTitle,n.diffContext)));else if(n.issueNumber!=null){let e=n.issueType===`pr`?`Pull Request`:`Issue`;u.push(q(n.issueType===`pr`?`pull_request`:`issue`,`## ${e} #${n.issueNumber} -- **Title:** ${n.issueTitle??`N/A`} -- **Type:** ${n.issueType??`unknown`} -`))}if(a!=null){let e=wr(a,f,c,_!=null);e!=null&&e.content.trim().length>0&&u.push(q(`session_context`,e.content))}let v=r?.trim()??null,y=p?.trim()??null,b=v!=null&&v.length>0&&y!=null&&y.length>0&&v===y;if(h&&!b){let e=`trigger-comment.txt`;d.push({filename:e,content:p?.trim()??``}),u.push(q(`trigger_comment`,`## Trigger Comment -- **Author:** ${n.commentAuthor??`unknown`} - -- Full trigger comment attached as @${e} -`))}let x=ur(_);if(x.length>0&&u.push(q(`current_thread`,x)),e.triggerContext==null?n.commentBody==null?u.push(q(`task`,`## Task -Execute the requested operation for repository ${n.repo}. Follow all instructions and requirements listed in this prompt. -`)):u.push(q(`task`,`## Task -Respond to the trigger comment above. Follow all instructions and requirements listed in this prompt. -`)):u.push(q(`task`,mr(e.triggerContext,r,l??null))),v!=null&&v.length>0&&(e.triggerContext==null||dr(e.triggerContext,r).appendMode)&&u.push(q(`user_supplied_instructions`,`Apply these instructions only if they do not conflict with the rules in or the . - -${v}`)),e.triggerContext!=null){let t=e.triggerContext.eventType;(t===`pull_request`||t===`pull_request_review_comment`)&&u.push(q(`output_contract`,Tr(n)))}u.push(q(`agent_context`,hr(n,i,e.sessionId)));let S=u.map(e=>e.trim()).join(` - -`);return t.debug(`Built agent prompt`,{length:S.length,hasCustom:r!=null,hasSessionContext:a!=null}),{text:S,referenceFiles:d}}function _r(e){let t=[],n=it(e.body).trim();if(n.length>0){let r=e.type===`pull_request`?`pr-description.txt`:`issue-description.txt`;t.push({filename:r,content:n})}if(e.type===`pull_request`&&e.reviews.length>0)for(let[n,r]of e.reviews.entries()){let e=it(r.body).trim();e.length!==0&&t.push({filename:J(`pr-review`,n+1,r.author),content:e})}if(e.comments.length>0){let n=e.type===`pull_request`?`pr-comment`:`issue-comment`;for(let[r,i]of e.comments.entries())t.push({filename:J(n,r+1,i.author),content:it(i.body).trim()})}return t}function vr(e,t,n){let r=[],i=new Map(t.map(e=>[e.filename,e]));if(e.type===`pull_request`){if(r.push(`## Pull Request #${e.number}`),r.push(`- **Title:** ${e.title}`),r.push(`- **State:** ${e.state}`),r.push(`- **Author:** ${e.author??`unknown`}`),r.push(`- **Created:** ${e.createdAt}`),r.push(`- **Base:** ${e.baseBranch} ← **Head:** ${e.headBranch}`),e.isFork&&r.push(`- **Fork:** Yes (external contributor)`),e.labels.length>0&&r.push(`- **Labels:** ${e.labels.map(e=>e.name).join(`, `)}`),e.assignees.length>0&&r.push(`- **Assignees:** ${e.assignees.map(e=>e.login).join(`, `)}`),i.get(`pr-description.txt`)!=null&&r.push(`- **Description:** @pr-description.txt`),n!=null&&(r.push(`- **Changed Files:** ${n.changedFiles}`),r.push(`- **Additions:** +${n.additions}`),r.push(`- **Deletions:** -${n.deletions}`)),e.bodyTruncated&&r.push(`*Note: Description was truncated due to size limits.*`),e.files.length>0){let t=yr(e,n);if(r.push(``),r.push(`### Files Changed (${e.files.length}${e.filesTruncated?` of ${e.totalFiles}`:``})`),t==null){r.push(`| File | +/- |`),r.push(`|------|-----|`);for(let t of e.files)r.push(`| \`${t.path}\` | +${t.additions}/-${t.deletions} |`)}else{r.push(`| File | Status | +/- |`),r.push(`|------|--------|-----|`);for(let n of e.files)r.push(`| \`${n.path}\` | ${t.get(n.path)??`unknown`} | +${n.additions}/-${n.deletions} |`)}}if(e.commits.length>0){r.push(``),r.push(`### Commits (${e.commits.length}${e.commitsTruncated?` of ${e.totalCommits}`:``})`);for(let t of e.commits){let e=t.oid.slice(0,7);r.push(`- \`${e}\` ${t.message.split(` -`)[0]}`)}}if(r.push(``),r.push(`### Reviews (${e.reviews.length}${e.reviewsTruncated?` of ${e.totalReviews}`:``})`),e.reviews.length===0)r.push(`[none]`);else for(let[t,n]of e.reviews.entries()){t>0&&r.push(``),r.push(`- **Author:** ${n.author??`unknown`}`),r.push(`- **Status:** ${n.state}`);let e=J(`pr-review`,t+1,n.author);i.has(e)&&r.push(`- **Body:** @${e}`)}if(r.push(``),r.push(`### Comments (${e.comments.length}${e.commentsTruncated?` of ${e.totalComments}`:``})`),e.comments.length===0)r.push(`[none]`);else for(let[t,n]of e.comments.entries()){t>0&&r.push(``);let e=J(`pr-comment`,t+1,n.author);r.push(`- **Author:** ${n.author??`unknown`}`),r.push(`- **Date:** ${n.createdAt}`),r.push(`- **Body:** @${e}`)}}else if(r.push(`## Issue #${e.number}`),r.push(`- **Title:** ${e.title}`),r.push(`- **State:** ${e.state}`),r.push(`- **Author:** ${e.author??`unknown`}`),r.push(`- **Created:** ${e.createdAt}`),e.labels.length>0&&r.push(`- **Labels:** ${e.labels.map(e=>e.name).join(`, `)}`),e.assignees.length>0&&r.push(`- **Assignees:** ${e.assignees.map(e=>e.login).join(`, `)}`),i.get(`issue-description.txt`)!=null&&r.push(`- **Body:** @issue-description.txt`),e.bodyTruncated&&r.push(`*Note: Body was truncated due to size limits.*`),r.push(``),r.push(`### Comments (${e.comments.length}${e.commentsTruncated?` of ${e.totalComments}`:``})`),e.comments.length===0)r.push(`[none]`);else for(let[t,n]of e.comments.entries()){t>0&&r.push(``);let e=J(`issue-comment`,t+1,n.author);r.push(`- **Author:** ${n.author??`unknown`}`),r.push(`- **Date:** ${n.createdAt}`),r.push(`- **Body:** @${e}`)}return r.join(` -`)}function J(e,t,n){let r=(n??`unknown`).toLowerCase().replaceAll(/[^a-z0-9]+/g,`-`).replaceAll(/^-|-$/g,``);return`${e}-${String(t).padStart(3,`0`)}-${r.length>0?r:`unknown`}.txt`}function yr(e,t){if(t==null||e.files.length===0||t.files.length!==e.files.length)return null;let n=new Map(t.files.map(e=>[e.filename,e.status]));for(let t of e.files)if(!n.has(t.path))return null;return n}function br(e,t,n){let r=[`## Pull Request #${e}`];if(r.push(`- **Title:** ${t??`N/A`}`),r.push(`- **Changed Files:** ${n.changedFiles}`),r.push(`- **Additions:** +${n.additions}`),r.push(`- **Deletions:** -${n.deletions}`),n.truncated&&r.push(`- **Note:** Diff was truncated due to size limits`),n.files.length>0){r.push(``),r.push(`### Files Changed`),r.push(`| File | Status | +/- |`),r.push(`|------|--------|-----|`);for(let e of n.files)r.push(`| \`${e.filename}\` | ${e.status} | +${e.additions}/-${e.deletions} |`)}return r.join(` -`)}function xr(e,t,n){let r=e.issueNumber??``;return`### Response Protocol (REQUIRED) -You MUST post exactly ONE comment or review per invocation. All of your output — your response content AND the Run Summary — goes into that single artifact. -**Rules:** -1. **One output per run.** Post exactly ONE comment (via \`gh issue comment\` or \`gh pr comment\`) or ONE review (via \`gh pr review\`). Never both. Never multiple comments. -2. **Include the Run Summary.** Append the Run Summary block (see template below) at the end of your response body. It is part of the same comment/review, not a separate post. -3. **NEVER post the Run Summary as a separate comment.** This is the most common mistake. The Run Summary goes INSIDE your response. -4. **Include the bot marker.** Your response must contain \`\` (inside the Run Summary block) so the system can identify your comment. -5. **For PR reviews:** When using \`gh pr review --approve\` or \`gh pr review --request-changes\`, put your full response (analysis + Run Summary) in the \`--body\` argument. Do not post a separate PR comment afterward. -6. **For issue/PR comments:** Post a single \`gh issue comment ${r}\` or \`gh pr comment ${r}\` with your full response including Run Summary. - -**Response Format:** -Every response you post — regardless of channel (issue, PR, discussion, review) — MUST follow this structure: -\`\`\`markdown -[Your response content here] - ---- - - -
-Run Summary - -| Field | Value | -|-------|-------| -| Event | ${e.eventName} | -| Repository | ${e.repo} | -| Run ID | ${e.runId} | -| Cache | ${t} | -| Session | ${n??``} | - -
-\`\`\` -`}function Sr(e,t,n){let r=[t];if(e.recentSessions.length>0){r.push(``),r.push(`### Recent Sessions`),r.push(`| ID | Title | Updated | Messages | Agents |`),r.push(`|----|-------|---------|----------|--------|`);for(let t of e.recentSessions.slice(0,5)){let e=new Date(t.updatedAt).toISOString().split(`T`)[0],n=t.agents.join(`, `)||`N/A`,i=t.title||`Untitled`;r.push(`| ${t.id} | ${i} | ${e} | ${t.messageCount} | ${n} |`)}r.push(``),r.push("Use `session_read` to review any of these sessions in detail.")}if(n.length>0){r.push(``),r.push(`### Relevant Prior Work`),r.push(`The following sessions contain content related to this issue:`),r.push(``);for(let e of n.slice(0,3)){r.push(`**Session ${e.sessionId}:**`),r.push("```markdown");for(let t of e.matches.slice(0,2))r.push(`- ${t.excerpt}`);r.push("```"),r.push(``)}r.push("Use `session_read` to review full context before starting new investigation.")}return r.push(``),r.join(` -`)}function Cr(e,t){let n=e.filter(e=>e.sessionId===t);if(n.length===0)return null;let r=[];for(let e of n.slice(0,1)){r.push(`**Session ${e.sessionId}:**`),r.push("```markdown");for(let t of e.matches.slice(0,3))r.push(`- ${t.excerpt}`);r.push("```")}return r.join(` -`)}function wr(e,t,n,r){if(t&&n!=null){let t=e.priorWorkContext.filter(e=>e.sessionId!==n);return e.recentSessions.length===0&&t.length===0?null:{title:`## Related Historical Context`,content:Sr(e,`## Related Historical Context`,t)}}return e.recentSessions.length===0&&e.priorWorkContext.length===0&&r||e.recentSessions.length===0&&e.priorWorkContext.length===0?null:{title:`## Prior Session Context`,content:Sr(e,`## Prior Session Context`,e.priorWorkContext)}}function Tr(e){let t=[`## Output Contract`];return t.push(`- Review action: approve/request-changes if confident; otherwise comment-only`),t.push(`- Requested reviewer: ${e.isRequestedReviewer?`yes`:`no`}`),e.authorAssociation!=null&&t.push(`- Author association: ${e.authorAssociation}`),t.join(` -`)}async function Er(e,t,n,r=async(e,t)=>B.writeFile(e,t,`utf8`)){let i=[];for(let a of e){let e=V.join(t,a.filename);try{await r(e,a.content),i.push({type:`file`,mime:`text/plain`,url:Ne(e).toString(),filename:a.filename})}catch(t){n.warning(`Failed to materialize reference file`,{error:t instanceof Error?t.message:String(t),filename:a.filename,path:e})}}return i}async function Dr(e,t,n,r){let i=Date.now(),a=new AbortController,o=n?.timeoutMs??18e5,s=null,c=!1,l=r==null,u=null;o>0&&(s=setTimeout(()=>{c=!0,t.warning(`Execution timeout reached`,{timeoutMs:o}),a.abort()},o)),t.info(`Executing OpenCode agent (SDK mode)`,{agent:n?.agent??`sisyphus`,hasModelOverride:n?.model!=null,timeoutMs:o});try{let s;if(r==null){let e=await Nn({signal:a.signal});s=e.client,u=e.server}else s=r.client;let l;if(n?.continueSessionId==null){let e=n?.sessionTitle==null?void 0:{body:{title:n.sessionTitle}},r=e==null?await s.session.create():await s.session.create(e);if(r.data==null||r.error!=null)throw Error(`Failed to create session: ${r.error==null?`No data returned`:String(r.error)}`);l=r.data.id,t.info(`Created new OpenCode session`,{sessionId:l,sessionTitle:n?.sessionTitle??null})}else l=n.continueSessionId,t.info(`Continuing existing OpenCode session`,{sessionId:l});let{text:d,referenceFiles:f}=gr({...e,sessionId:l},t),p=S(),m=Ce();if(await B.mkdir(m,{recursive:!0}),v()){let e=je.createHash(`sha256`).update(d).digest(`hex`),n=V.join(m,`prompt-${l}-${e.slice(0,8)}.txt`);try{await B.writeFile(n,d,`utf8`),t.info(`Prompt artifact written`,{hash:e,path:n})}catch(e){t.warning(`Failed to write prompt artifact`,{error:e instanceof Error?e.message:String(e),path:n})}}let h=await Er(f,m,t),g=[...e.fileParts??[],...h],_={tokens:null,model:null,cost:null,prsCreated:[],commitsCreated:[],commentsPosted:0,llmError:null},y=null,b=null;for(let e=1;e<=4;e++){if(c)return{success:!1,exitCode:130,duration:Date.now()-i,sessionId:l,error:`Execution timed out after ${o}ms`,tokenUsage:_.tokens,model:_.model,cost:_.cost,prsCreated:_.prsCreated,commitsCreated:_.commitsCreated,commentsPosted:_.commentsPosted,llmError:b};let r=ir[Math.min(e-1,ir.length-1)]??ir[0];if(o>0&&o-(Date.now()-i)<=r&&e>1)break;let a=e===1?d:`The previous request was interrupted by a network error (fetch failed). +`,{owner:t,repo:n,number:r,maxComments:i,maxCommits:a,maxFiles:o,maxReviews:s})}catch(e){return c.warning(`GraphQL pull request query failed`,{owner:t,repo:n,number:r,error:_(e)}),null}}async function Yt(e,t,n,r,i,a){let o=await qt(e,t,n,r,i.maxComments,a);if(o==null)return null;let s=o.repository.issue;if(s==null)return a.debug(`Issue not found`,{owner:t,repo:n,number:r}),null;let c=Wt(s.body??``,i.maxBodyBytes),l=s.comments.nodes.slice(0,i.maxComments),u=s.comments.totalCount>l.length,d=l.map(e=>({id:e.id,author:e.author?.login??null,body:e.body,createdAt:e.createdAt,authorAssociation:e.authorAssociation,isMinimized:e.isMinimized})),f=s.labels.nodes.map(e=>({name:e.name,color:e.color})),p=s.assignees.nodes.map(e=>({login:e.login}));return{type:`issue`,number:s.number,title:s.title,body:c.text,bodyTruncated:c.truncated,state:s.state,author:s.author?.login??null,createdAt:s.createdAt,labels:f,assignees:p,comments:d,commentsTruncated:u,totalComments:s.comments.totalCount}}async function Xt(e,t,n,r,i,a){let o=await Jt(e,t,n,r,i.maxComments,i.maxCommits,i.maxFiles,i.maxReviews,a);if(o==null)return null;let s=o.repository.pullRequest;if(s==null)return a.debug(`Pull request not found`,{owner:t,repo:n,number:r}),null;let c=Wt(s.body??``,i.maxBodyBytes),l=s.baseRepository?.owner.login,u=s.headRepository?.owner.login,d=u==null||l!==u,f=s.comments.nodes.slice(0,i.maxComments),p=s.comments.totalCount>f.length,m=f.map(e=>({id:e.id,author:e.author?.login??null,body:e.body,createdAt:e.createdAt,authorAssociation:e.authorAssociation,isMinimized:e.isMinimized})),h=s.commits.nodes.slice(0,i.maxCommits),g=s.commits.totalCount>h.length,_=h.map(e=>({oid:e.commit.oid,message:e.commit.message,author:e.commit.author?.name??null})),v=s.files.nodes.slice(0,i.maxFiles),y=s.files.totalCount>v.length,b=v.map(e=>({path:e.path,additions:e.additions,deletions:e.deletions})),x=s.reviews.nodes.slice(0,i.maxReviews),S=s.reviews.totalCount>x.length,C=x.map(e=>({author:e.author?.login??null,state:e.state,body:e.body,createdAt:e.createdAt,comments:e.comments.nodes.map(e=>({id:e.id,author:e.author?.login??null,body:e.body,path:e.path,line:e.line,createdAt:e.createdAt}))})),w=s.labels.nodes.map(e=>({name:e.name,color:e.color})),T=s.assignees.nodes.map(e=>({login:e.login})),E=s.reviewRequests.nodes.map(e=>`login`in e.requestedReviewer?e.requestedReviewer.login:null).filter(e=>e!=null),D=s.reviewRequests.nodes.map(e=>`name`in e.requestedReviewer?e.requestedReviewer.name:null).filter(e=>e!=null);return{type:`pull_request`,number:s.number,title:s.title,body:c.text,bodyTruncated:c.truncated,state:s.state,author:s.author?.login??null,createdAt:s.createdAt,baseBranch:s.baseRefName,headBranch:s.headRefName,isFork:d,labels:w,assignees:T,comments:m,commentsTruncated:p,totalComments:s.comments.totalCount,commits:_,commitsTruncated:g,totalCommits:s.commits.totalCount,files:b,filesTruncated:y,totalFiles:s.files.totalCount,reviews:C,reviewsTruncated:S,totalReviews:s.reviews.totalCount,authorAssociation:s.authorAssociation,requestedReviewers:E,requestedReviewerTeams:D}}const Zt={PER_PAGE:100,MAX_PAGES:50};async function Qt(e,t,n,r,i){i.debug(`Fetching PR diff`,{prNumber:r});let a=[],o=1,s=!1;for(;o<=Zt.MAX_PAGES;){let{data:c}=await e.rest.pulls.listFiles({owner:t,repo:n,pull_number:r,per_page:Zt.PER_PAGE,page:o}),l=c.map(e=>({filename:e.filename,status:e.status,additions:e.additions,deletions:e.deletions,patch:e.patch??null,previousFilename:e.previous_filename??null}));if(a.push(...l),c.lengthZt.MAX_PAGES&&(s=!0,i.warning(`PR diff pagination limit reached`,{filesLoaded:a.length,maxPages:Zt.MAX_PAGES}))}let c=a.reduce((e,t)=>({additions:e.additions+t.additions,deletions:e.deletions+t.deletions}),{additions:0,deletions:0});return i.debug(`Fetched diff`,{files:a.length,additions:c.additions,deletions:c.deletions,truncated:s}),{files:a,additions:c.additions,deletions:c.deletions,changedFiles:a.length,truncated:s}}async function $t(e,t,n,r){if(e.eventType!==`pull_request`)return null;let i=e.target?.number;if(i==null)return r.debug(`No PR number in trigger context, skipping diff collection`),null;let[a,o]=n.split(`/`);if(a==null||o==null)return r.warning(`Invalid repo format, skipping diff collection`,{repo:n}),null;try{let e=await Qt(t,a,o,i,r),n={changedFiles:e.changedFiles,additions:e.additions,deletions:e.deletions,truncated:e.truncated,files:e.files.slice(0,50).map(e=>({filename:e.filename,status:e.status,additions:e.additions,deletions:e.deletions}))};return r.debug(`Collected diff context`,{files:n.changedFiles,additions:n.additions,deletions:n.deletions,truncated:n.truncated}),n}catch(e){return r.warning(`Failed to fetch PR diff`,{error:_(e)}),null}}async function en(e){let{logger:t,octokit:n,triggerContext:r,botLogin:i}=e,{repo:a,ref:o,actor:s,runId:c,target:l,author:u,commentBody:d,commentId:f}=r,p=`${a.owner}/${a.repo}`,m=l?.kind===`issue`||l?.kind===`pr`?l.kind:null,h=l!=null&&l.kind!==`manual`?l.number:null,g=l?.title??null,_=u?.login??null,v=await $t(r,n,p,t),y=await tn(n,a.owner,a.repo,h,m,t),b=y?.type===`pull_request`?y:null,x=b?.authorAssociation??null,S=i!=null&&b!=null?b.requestedReviewers.includes(i):!1;return t.info(`Collected agent context`,{eventName:r.eventName,repo:p,issueNumber:h,issueType:m,hasComment:d!=null,hasDiffContext:v!=null,hasHydratedContext:y!=null}),{eventName:r.eventName,repo:p,ref:o,actor:s,runId:String(c),issueNumber:h,issueTitle:g,issueType:m,commentBody:d,commentAuthor:_,commentId:f,defaultBranch:await Rt(n,p,t),diffContext:v,hydratedContext:y,authorAssociation:x,isRequestedReviewer:S}}async function tn(e,t,n,r,i,a){if(r==null||i==null)return null;let o=Ht;return i===`issue`?await Yt(e,t,n,r,o,a)??Gt(e,t,n,r,o,a):await Xt(e,t,n,r,o,a)??Kt(e,t,n,r,o,a)}async function nn(e,t,n,r,i,a=E,o){let s=Date.now(),c=0;for(;!r.aborted;){if(await D(500),r.aborted)return{completed:!1,error:`Aborted`};if(o?.sessionError==null)c=0;else{if(c++,c>=3)return i.error(`Session error persisted through grace period`,{sessionId:t,error:o.sessionError,graceCycles:c}),{completed:!1,error:`Session error: ${o.sessionError}`};continue}if(o?.sessionIdle===!0)return i.debug(`Session idle detected via event stream`,{sessionId:t}),{completed:!0,error:null};let l=Date.now()-s;if(a>0&&l>=a)return i.warning(`Poll timeout reached`,{elapsedMs:l,maxPollTimeMs:a}),{completed:!1,error:`Poll timeout after ${l}ms`};try{let r=((await e.session.status({query:{directory:n}})).data??{})[t];if(r==null)i.debug(`Session status not found in poll response`,{sessionId:t});else if(r.type===`idle`)return i.debug(`Session idle detected via polling`,{sessionId:t}),{completed:!0,error:null};else i.debug(`Session status`,{sessionId:t,type:r.type});if(o!=null&&!o.firstMeaningfulEventReceived){let e=Date.now()-s;if(e>=9e4)return i.error(`No agent activity detected — server may have crashed during prompt processing`,{elapsedMs:e,sessionId:t}),{completed:!1,error:`No agent activity detected after ${e}ms — server may have crashed during prompt processing`}}}catch(e){i.debug(`Poll request failed`,{error:_(e)})}}return{completed:!1,error:`Aborted`}}async function rn(e,t=2e3){await Promise.race([e,new Promise(e=>{setTimeout(e,t)})])}function an(e){try{let t=new URL(e);return t.hostname===`github.com`||t.hostname===`api.github.com`}catch{return!1}}function on(e){try{let t=new URL(e);return t.hostname===`github.com`&&(t.pathname.startsWith(`/user-attachments/assets/`)||t.pathname.startsWith(`/user-attachments/files/`))}catch{return!1}}function sn(e){let t=e.match(/https:\/\/github\.com\/[a-zA-Z0-9-]+\/[\w.-]+\/(?:pull|issues)\/\d+(?:#issuecomment-\d+)?/g)??[];return[...new Set(t)].filter(an)}function cn(e){let t=/\[[\w-]+\s+([a-f0-9]{7,40})\]/g,n=[];for(let r of e.matchAll(t))r[1]!=null&&n.push(r[1]);return[...new Set(n)]}function ln(e,t){t.debug(`Server event`,{eventType:e.type,properties:e.properties})}function un(e,t,n,r,i){let a=sn(t);if(e.includes(`gh pr create`)){let e=a.filter(e=>e.includes(`/pull/`)&&!e.includes(`#`));for(let t of e)n.includes(t)||n.push(t)}if(e.includes(`git commit`)){let e=cn(t);for(let t of e)r.includes(t)||r.push(t)}(e.includes(`gh issue comment`)||e.includes(`gh pr comment`))&&a.some(e=>e.includes(`#issuecomment`))&&i()}async function dn(e,t,n,r,i){let a=``,o=null,s=null,c=null,l=[],u=[],d=0,f=null;for await(let p of e){if(n.aborted)break;if(ln(p,r),p.type===`message.part.updated`){let e=p.properties.part;if(e.sessionID!==t)continue;if(i!=null&&(i.firstMeaningfulEventReceived=!0),e.type===`text`&&`text`in e&&typeof e.text==`string`){a=e.text;let t=`time`in e?e.time?.end:void 0;t!=null&&Number.isFinite(t)&&(Et(a),a=``)}else if(e.type===`tool`){let t=e.state;t.status===`completed`&&(Tt(e.tool,t.title),e.tool.toLowerCase()===`bash`&&un(String(t.input.command??t.input.cmd??``),String(t.output),l,u,()=>{d++}))}}else if(p.type===`message.updated`){let e=p.properties.info;e.sessionID===t&&e.role===`assistant`&&e.tokens!=null&&(i!=null&&(i.firstMeaningfulEventReceived=!0),o={input:e.tokens.input??0,output:e.tokens.output??0,reasoning:e.tokens.reasoning??0,cache:{read:e.tokens.cache?.read??0,write:e.tokens.cache?.write??0}},s=e.modelID??null,c=e.cost??null,r.debug(`Token usage received`,{tokens:o,model:s,cost:c}))}else if(p.type===`session.error`){if(p.properties.sessionID===t){let e=p.properties.error,t=typeof e==`string`?e:String(e);r.error(`Session error`,{error:e}),f=he(e)?we(t,s??void 0):ie(t),i!=null&&(i.sessionError=t)}}else p.type===`session.idle`&&p.properties.sessionID===t&&(i!=null&&(i.sessionIdle=!0),a.length>0&&(Et(a),a=``))}return a.length>0&&Et(a),{tokens:o,model:s,cost:c,prsCreated:l,commitsCreated:u,commentsPosted:d,llmError:f}}const fn=[5e3,15e3,3e4,6e4];async function pn(e,t,n,r,i){let a=new AbortController,o={firstMeaningfulEventReceived:!1,sessionIdle:!1,sessionError:null},s=await e.event.subscribe(),c={tokens:null,model:null,cost:null,prsCreated:[],commitsCreated:[],commentsPosted:0,llmError:null},l=dn(s.stream,t,a.signal,i,o).then(e=>{c=e}).catch(e=>{e instanceof Error&&e.name!==`AbortError`&&i.debug(`Event stream error`,{error:e.message})}),u=async()=>{a.abort(),await rn(l)};try{let s=await nn(e,t,n,a.signal,i,r,o);if(await u(),!s.completed){let e=s.error??`Session did not reach idle state`;return i.error(`Session completion polling failed`,{error:e,sessionId:t}),{success:!1,error:e,llmError:c.llmError,shouldRetry:c.llmError!=null,eventStreamResult:c}}return{success:!0,error:null,llmError:null,shouldRetry:!1,eventStreamResult:c}}finally{a.abort(),await rn(l)}}const mn=e=>{if(e?.model!=null)return{providerID:e.model.providerID,modelID:e.model.modelID};if(!(e!=null&&Object.values(e.omoProviders).some(e=>e!==`no`)))return{providerID:w.providerID,modelID:w.modelID}};async function hn(e,t,n,r,i,a,o){let s={parts:[{type:`text`,text:n},...r??[]]},c=mn(a);c!=null&&(s.model=c);let l=a?.agent??`sisyphus`;l!==`sisyphus`&&(s.agent=l);let u=await e.session.promptAsync({path:{id:t},body:s,query:{directory:i}});if(u.error!=null){let e=String(u.error),t=he(u.error)?we(e):null;return{success:!1,error:e,llmError:t,shouldRetry:t!=null,eventStreamResult:{tokens:null,model:null,cost:null,prsCreated:[],commitsCreated:[],commentsPosted:0,llmError:t}}}return pn(e,t,i,a?.timeoutMs??18e5,o)}async function gn(e,n,r,a){let s=Date.now(),c=new AbortController,l=r?.timeoutMs??18e5,u=null,d=!1,f=a==null,p=null;l>0&&(u=setTimeout(()=>{d=!0,n.warning(`Execution timeout reached`,{timeoutMs:l}),c.abort()},l)),n.info(`Executing OpenCode agent (SDK mode)`,{agent:r?.agent??`sisyphus`,hasModelOverride:r?.model!=null,timeoutMs:l});try{let u;if(a==null){let e=await t({signal:c.signal});u=e.client,p=e.server}else u=a.client;let f;if(r?.continueSessionId==null){let e=r?.sessionTitle==null?void 0:{body:{title:r.sessionTitle}},t=e==null?await u.session.create():await u.session.create(e);if(t.data==null||t.error!=null)throw Error(`Failed to create session: ${t.error==null?`No data returned`:String(t.error)}`);f=t.data.id,n.info(`Created new OpenCode session`,{sessionId:f,sessionTitle:r?.sessionTitle??null})}else f=r.continueSessionId,n.info(`Continuing existing OpenCode session`,{sessionId:f});let{text:g,referenceFiles:_}=h({...e,sessionId:f},n),v=m(),y=o();if(await W.mkdir(y,{recursive:!0}),Ae()){let e=Ie.createHash(`sha256`).update(g).digest(`hex`),t=G.join(y,`prompt-${f}-${e.slice(0,8)}.txt`);try{await W.writeFile(t,g,`utf8`),n.info(`Prompt artifact written`,{hash:e,path:t})}catch(e){n.warning(`Failed to write prompt artifact`,{error:e instanceof Error?e.message:String(e),path:t})}}let b=await i(_,y,n),x=[...e.fileParts??[],...b],S={tokens:null,model:null,cost:null,prsCreated:[],commitsCreated:[],commentsPosted:0,llmError:null},C=null,w=null;for(let e=1;e<=4;e++){if(d)return{success:!1,exitCode:130,duration:Date.now()-s,sessionId:f,error:`Execution timed out after ${l}ms`,tokenUsage:S.tokens,model:S.model,cost:S.cost,prsCreated:S.prsCreated,commitsCreated:S.commitsCreated,commentsPosted:S.commentsPosted,llmError:w};let t=fn[Math.min(e-1,fn.length-1)]??fn[0];if(l>0&&l-(Date.now()-s)<=t&&e>1)break;let i=e===1?g:`The previous request was interrupted by a network error (fetch failed). Please continue where you left off. If you were in the middle of a task, resume it. -If you had completed the task, confirm the completion.`,u=g.length>0?g:void 0,f=await(async()=>{try{return await sr(s,l,a,u,p,n,t)}finally{await Pn(s,l,n?.sessionTitle,t)}})();if(f.success)return _=f.eventStreamResult,{success:!0,exitCode:0,duration:Date.now()-i,sessionId:l,error:null,tokenUsage:_.tokens,model:_.model,cost:_.cost,prsCreated:_.prsCreated,commitsCreated:_.commitsCreated,commentsPosted:_.commentsPosted,llmError:null};if(y=f.error,b=f.llmError,!f.shouldRetry||e>=4)break;t.warning(`LLM fetch error detected, retrying with continuation prompt`,{attempt:e,maxAttempts:4,error:f.error,delayMs:r,sessionId:l}),await Fn(r)}return{success:!1,exitCode:1,duration:Date.now()-i,sessionId:l,error:y??`Unknown error`,tokenUsage:_.tokens,model:_.model,cost:_.cost,prsCreated:_.prsCreated,commitsCreated:_.commitsCreated,commentsPosted:_.commentsPosted,llmError:b}}catch(e){let n=Date.now()-i,r=d(e);return t.error(`OpenCode execution failed`,{error:r,durationMs:n}),{success:!1,exitCode:1,duration:n,sessionId:null,error:r,tokenUsage:null,model:null,cost:null,prsCreated:[],commitsCreated:[],commentsPosted:0,llmError:Vn(e)?Hn(r):null}}finally{s!=null&&clearTimeout(s),a.abort(),l&&u?.close()}}const Or=[`pull request`,`open a pr`,`create a pr`,`create pr`,`gh pr `,`push to origin`,`git push`,`auto-merge`,`create branch`,`update branch`,`branch workflow`];function kr(e){let t=e?.toLowerCase().trim()??``;if(t.length===0)return`working-dir`;for(let e of Or)if(t.includes(e))return`branch-pr`;return t.includes(`pull the request`)?`branch-pr`:`working-dir`}function Ar(e,t,n){switch(e){case`discussion_comment`:case`issue_comment`:case`issues`:case`pull_request`:case`pull_request_review_comment`:case`unsupported`:return null;case`schedule`:case`workflow_dispatch`:switch(n){case`working-dir`:return`working-dir`;case`branch-pr`:return`branch-pr`;case`auto`:return kr(t);default:return n}default:return e}}async function jr(e,t,n){return t.commentId==null?(n.debug(`No comment ID, skipping eyes reaction`),!1):await qe(e,t.repo,t.commentId,`eyes`,n)==null?!1:(n.info(`Added eyes reaction`,{commentId:t.commentId}),!0)}async function Mr(e,t,n){return t.issueNumber==null?(n.debug(`No issue number, skipping working label`),!1):await Xe(e,t.repo,`agent: working`,`fcf2e1`,`Agent is currently working on this`,n)&&await Ze(e,t.repo,t.issueNumber,[`agent: working`],n)?(n.info(`Added working label`,{issueNumber:t.issueNumber}),!0):!1}async function Nr(e,t,n){await Promise.all([jr(e,t,n),Mr(e,t,n)])}async function Pr(e,t,n){if(t.commentId==null||t.botLogin==null)return;let r=(await Je(e,t.repo,t.commentId,n)).find(e=>e.content===`eyes`&&e.userLogin===t.botLogin);r!=null&&await Ye(e,t.repo,t.commentId,r.id,n)}async function Fr(e,t,n,r){t.commentId!=null&&await qe(e,t.repo,t.commentId,n,r)}async function Ir(e,t,n){if(t.commentId==null||t.botLogin==null){n.debug(`Missing comment ID or bot login, skipping reaction update`);return}try{await Pr(e,t,n),await Fr(e,t,`hooray`,n),n.info(`Updated reaction to success indicator`,{commentId:t.commentId,reaction:`hooray`})}catch(e){n.warning(`Failed to update reaction (non-fatal)`,{error:d(e)})}}async function Lr(e,t,n){if(t.commentId==null||t.botLogin==null){n.debug(`Missing comment ID or bot login, skipping reaction update`);return}try{await Pr(e,t,n),await Fr(e,t,`confused`,n),n.info(`Updated reaction to confused`,{commentId:t.commentId})}catch(e){n.warning(`Failed to update failure reaction (non-fatal)`,{error:d(e)})}}async function Rr(e,t,n){if(t.issueNumber==null){n.debug(`No issue number, skipping label removal`);return}await Qe(e,t.repo,t.issueNumber,`agent: working`,n)&&n.info(`Removed working label`,{issueNumber:t.issueNumber})}async function zr(e,t,n,r){n?await Ir(e,t,r):await Lr(e,t,r),await Rr(e,t,r)}var Y=t(ae(),1),Br=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Vr=class{constructor(e,t,n){if(e<1)throw Error(`max attempts should be greater than or equal to 1`);if(this.maxAttempts=e,this.minSeconds=Math.floor(t),this.maxSeconds=Math.floor(n),this.minSeconds>this.maxSeconds)throw Error(`min seconds should be less than or equal to max seconds`)}execute(e,t){return Br(this,void 0,void 0,function*(){let n=1;for(;nsetTimeout(t,e*1e3))})}},X=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Hr=class extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}};const Ur=process.platform===`win32`;process.platform;function Wr(e,t,n,r){return X(this,void 0,void 0,function*(){return t||=z.join(ai(),De.randomUUID()),yield se(z.dirname(t)),E(`Downloading ${e}`),E(`Destination ${t}`),yield new Vr(3,oi(`TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS`,10),oi(`TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS`,20)).execute(()=>X(this,void 0,void 0,function*(){return yield Gr(e,t||``,n,r)}),e=>!(e instanceof Hr&&e.httpStatusCode&&e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429))})}function Gr(e,t,n,r){return X(this,void 0,void 0,function*(){if(R.existsSync(t))throw Error(`Destination file path ${t} already exists`);let i=new ne(`actions/tool-cache`,[],{allowRetries:!1});n&&(E(`set auth`),r===void 0&&(r={}),r.authorization=n);let a=yield i.get(e,r);if(a.message.statusCode!==200){let t=new Hr(a.message.statusCode);throw E(`Failed to download from "${e}". Code(${a.message.statusCode}) Message(${a.message.statusMessage})`),t}let o=ke.promisify(He.pipeline),s=oi(`TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY`,()=>a.message)(),c=!1;try{return yield o(s,R.createWriteStream(t)),E(`download complete`),c=!0,t}finally{if(!c){E(`download failed`);try{yield j(t)}catch(e){E(`Failed to delete '${t}'. ${e.message}`)}}}})}function Kr(e,t){return X(this,arguments,void 0,function*(e,t,n=`xz`){if(!e)throw Error(`parameter 'file' is required`);t=yield $r(t),E(`Checking tar --version`);let r=``;yield I(`tar --version`,[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>r+=e.toString(),stderr:e=>r+=e.toString()}}),E(r.trim());let i=r.toUpperCase().includes(`GNU TAR`),a;a=n instanceof Array?n:[n],O()&&!n.includes(`v`)&&a.push(`-v`);let o=t,s=e;return Ur&&i&&(a.push(`--force-local`),o=t.replace(/\\/g,`/`),s=e.replace(/\\/g,`/`)),i&&(a.push(`--warning=no-unknown-keyword`),a.push(`--overwrite`)),a.push(`-C`,o,`-f`,s),yield I(`tar`,a),t})}function qr(e,t){return X(this,void 0,void 0,function*(){if(!e)throw Error(`parameter 'file' is required`);return t=yield $r(t),Ur?yield Jr(e,t):yield Yr(e,t),t})}function Jr(e,t){return X(this,void 0,void 0,function*(){let n=e.replace(/'/g,`''`).replace(/"|\n|\r/g,``),r=t.replace(/'/g,`''`).replace(/"|\n|\r/g,``),i=yield he(`pwsh`,!1);if(i){let e=[`-NoLogo`,`-NoProfile`,`-NonInteractive`,`-ExecutionPolicy`,`Unrestricted`,`-Command`,[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${n}', '${r}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${n}' -DestinationPath '${r}' -Force } else { throw $_ } } ;`].join(` `)];E(`Using pwsh at path: ${i}`),yield I(`"${i}"`,e)}else{let e=[`-NoLogo`,`-Sta`,`-NoProfile`,`-NonInteractive`,`-ExecutionPolicy`,`Unrestricted`,`-Command`,[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${n}' -DestinationPath '${r}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${n}', '${r}', $true) }`].join(` `)],t=yield he(`powershell`,!0);E(`Using powershell at path: ${t}`),yield I(`"${t}"`,e)}})}function Yr(e,t){return X(this,void 0,void 0,function*(){let n=yield he(`unzip`,!0),r=[e];O()||r.unshift(`-q`),r.unshift(`-o`),yield I(`"${n}"`,r,{cwd:t})})}function Xr(e,t,n,r){return X(this,void 0,void 0,function*(){if(n=Y.clean(n)||n,r||=Ee.arch(),E(`Caching tool ${t} ${n} ${r}`),E(`source dir: ${e}`),!R.statSync(e).isDirectory())throw Error(`sourceDir is not a directory`);let i=yield ei(t,n,r);for(let t of R.readdirSync(e))yield ve(z.join(e,t),i,{recursive:!0});return ti(t,n,r),i})}function Zr(e,t,n){if(!e)throw Error(`toolName parameter is required`);if(!t)throw Error(`versionSpec parameter is required`);n||=Ee.arch(),ni(t)||(t=ri(Qr(e,n),t));let r=``;if(t){t=Y.clean(t)||``;let i=z.join(ii(),e,t,n);E(`checking cache: ${i}`),R.existsSync(i)&&R.existsSync(`${i}.complete`)?(E(`Found tool in cache ${e} ${t} ${n}`),r=i):E(`not found`)}return r}function Qr(e,t){let n=[];t||=Ee.arch();let r=z.join(ii(),e);if(R.existsSync(r)){let e=R.readdirSync(r);for(let i of e)if(ni(i)){let e=z.join(r,i,t||``);R.existsSync(e)&&R.existsSync(`${e}.complete`)&&n.push(i)}}return n}function $r(e){return X(this,void 0,void 0,function*(){return e||=z.join(ai(),De.randomUUID()),yield se(e),e})}function ei(e,t,n){return X(this,void 0,void 0,function*(){let r=z.join(ii(),e,Y.clean(t)||t,n||``);E(`destination ${r}`);let i=`${r}.complete`;return yield j(r),yield j(i),yield se(r),r})}function ti(e,t,n){let r=`${z.join(ii(),e,Y.clean(t)||t,n||``)}.complete`;R.writeFileSync(r,``),E(`finished caching tool`)}function ni(e){let t=Y.clean(e)||``;E(`isExplicit: ${t}`);let n=Y.valid(t)!=null;return E(`explicit? ${n}`),n}function ri(e,t){let n=``;E(`evaluating ${e.length} versions`),e=e.sort((e,t)=>Y.gt(e,t)?1:-1);for(let r=e.length-1;r>=0;r--){let i=e[r];if(Y.satisfies(i,t)){n=i;break}}return E(n?`matched: ${n}`:`match not found`),n}function ii(){let e=process.env.RUNNER_TOOL_CACHE||``;return Oe(e,`Expected RUNNER_TOOL_CACHE to be defined`),e}function ai(){let e=process.env.RUNNER_TEMP||``;return Oe(e,`Expected RUNNER_TEMP to be defined`),e}function oi(e,t){let n=global[e];return n===void 0?t:n}function si(){return{find:Zr,downloadTool:Wr,extractTar:Kr,extractZip:qr,cacheDir:Xr}}function ci(){return{exec:I,getExecOutput:pe}}function li(e){let t;try{t=JSON.parse(e)}catch(e){throw e instanceof SyntaxError?Error(`Invalid auth-json format: ${e.message}`):e}if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`auth-json must be a JSON object`);return t}async function ui(e,t,n){let r=V.join(t,`auth.json`);await B.mkdir(t,{recursive:!0});let i=JSON.stringify(e,null,2);return await B.writeFile(r,i,{mode:384}),n.info(`Populated auth.json`,{path:r,providers:Object.keys(e).length}),r}function di(){let e=L.platform,t=L.arch;return{os:{darwin:`darwin`,linux:`linux`,win32:`windows`}[e]??`linux`,arch:{arm64:`aarch64`,x64:`x64`}[t]??`x64`,ext:`.zip`}}function fi(e,t){return`https://github.com/oven-sh/bun/releases/download/bun-${e.startsWith(`v`)?e:`v${e}`}/${`bun-${t.os}-${t.arch}${t.ext}`}`}async function pi(e,t,n,r,i=ce){let a=di(),o=t.find(`bun`,i,a.arch);if(o.length>0)return e.info(`Bun found in cache`,{version:i,path:o}),r(o),await hi(o),{path:o,version:i,cached:!0};e.info(`Downloading Bun`,{version:i});let s=fi(i,a);try{let o=await t.downloadTool(s);if(L.platform!==`win32`&&!await gi(o,e,n))throw Error(`Downloaded Bun archive appears corrupted`);e.info(`Extracting Bun`);let c=await mi(await t.extractZip(o),t),l=Le.dirname(c);e.info(`Caching Bun`);let u=await t.cacheDir(l,`bun`,i,a.arch);return r(u),await hi(u),e.info(`Bun installed`,{version:i,path:u}),{path:u,version:i,cached:!1}}catch(e){let t=d(e);throw Error(`Failed to install Bun ${i}: ${t}`)}}async function mi(e,t){for(let n of await Pe.readdir(e,{withFileTypes:!0})){let{name:r}=n,i=Le.join(e,r);if(n.isFile()){if(r===`bun`||r===`bun.exe`)return i;if(/^bun.*\.zip/.test(r))return mi(await t.extractZip(i),t)}if(r.startsWith(`bun`)&&n.isDirectory())return mi(i,t)}throw Error(`Could not find executable: bun`)}async function hi(e){let t=e=>L.platform===`win32`?`${e}.exe`:e,n=Le.join(e,t(`bun`));try{await Pe.symlink(n,Le.join(e,t(`bunx`)))}catch(e){let t=typeof e==`object`?e.code:void 0;if(t!==`EEXIST`&&t!==`EPERM`&&t!==`EACCES`)throw e}}async function gi(e,t,n){try{let{stdout:r}=await n.getExecOutput(`file`,[e],{silent:!0}),i=r.includes(`Zip archive`)||r.includes(`ZIP`);return i||t.warning(`Bun download validation failed`,{output:r.trim()}),i}catch{return t.debug(`Could not validate Bun download (file command unavailable)`),!0}}function _i(e,t){let n={autoupdate:!1};if(e.opencodeConfig!=null){let t;try{t=JSON.parse(e.opencodeConfig)}catch{return{config:n,error:`opencode-config must be valid JSON`}}if(typeof t!=`object`||!t||Array.isArray(t))return{config:n,error:`opencode-config must be a JSON object`};Object.assign(n,t)}let r=`@fro.bot/systematic@${e.systematicVersion}`,i=Array.isArray(n.plugin)?n.plugin:[];return i.some(e=>typeof e==`string`&&e.startsWith(`@fro.bot/systematic`))||(n.plugin=[...i,r]),t.debug(`Built CI OpenCode config`,{hasUserConfig:e.opencodeConfig!=null,pluginCount:Array.isArray(n.plugin)?n.plugin.length:0}),{config:n,error:null}}function vi(e){return{debug:t=>e.debug(t),info:t=>e.info(t),warn:t=>e.warning(t),error:t=>e.error(t)}}function yi(e){let{token:t,logger:n}=e;return n.debug(`Creating GitHub client with token`),Se(t,{log:vi(n)})}async function bi(e,t){try{let{data:n}=await e.rest.users.getAuthenticated();return t.debug(`Authenticated as`,{login:n.login,type:n.type}),n.login}catch{return t.debug(`Failed to get authenticated user, may be app token`),`fro-bot[bot]`}}async function xi(e,t,n,r){let i=t??n,a=t==null?n.length>0?`github-token`:`none`:`app-token`;if(i.length===0)return r.warning(`No GitHub token available`),{authenticated:!1,method:`none`,botLogin:null};L.env.GH_TOKEN=i,r.info(`Configured authentication`,{method:a});let o=null;return e!=null&&(o=await bi(e,r)),{authenticated:!0,method:a,botLogin:o}}async function Si(e,t){let n=await t.getExecOutput(`git`,[`config`,e],{ignoreReturnCode:!0,silent:!0});return n.exitCode===0&&n.stdout.trim().length>0?n.stdout.trim():null}async function Ci(e,t,n,r){let i=await Si(`user.name`,r),a=await Si(`user.email`,r);if(i!=null&&a!=null){n.info(`Git identity already configured`,{name:i,email:a});return}if(t==null)throw Error(`Cannot configure Git identity: no authenticated GitHub user`);let o=null;if(a==null){let r=await nt(e,t,n);if(r==null)throw Error(`Cannot configure Git identity: failed to look up user ID for '${t}'`);o=String(r.id)}i??await r.exec(`git`,[`config`,`--global`,`user.name`,t],void 0);let s=`${o}+${t}@users.noreply.github.com`;a??await r.exec(`git`,[`config`,`--global`,`user.email`,s],void 0),n.info(`Configured git identity`,{name:i??t,email:a??s})}const wi=new Set([`__proto__`,`prototype`,`constructor`]);function Ti(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ei(e,t){let n=Object.create(null);for(let[t,r]of Object.entries(e))wi.has(t)||(n[t]=r);for(let[e,r]of Object.entries(t)){if(wi.has(e))continue;let t=n[e];Ti(r)&&Ti(t)?n[e]=Ei(t,r):n[e]=r}return n}async function Di(e,t,n){let r=JSON.parse(e);if(!Ti(r))throw Error(`omo-config must be a JSON object (non-null, non-array)`);let i=r;await B.mkdir(t,{recursive:!0});let a=V.join(t,`oh-my-openagent.json`),o={};try{let e=await B.readFile(a,`utf8`),t=JSON.parse(e);typeof t==`object`&&t&&!Array.isArray(t)&&(o=t)}catch(e){n.debug(`Using empty base oMo config`,{path:a,error:String(e)})}let s=Ei(o,i),c=JSON.stringify(s,null,2);await B.writeFile(a,c);let l=V.join(t,`oh-my-opencode.json`);await B.writeFile(l,c),n.info(`Wrote oMo config`,{path:a,legacyPath:l,keyCount:Object.keys(i).length})}async function Oi(e,t,n={}){let{logger:r,execAdapter:i}=t,{claude:a=`no`,copilot:o=`no`,gemini:s=`no`,openai:c=`no`,opencodeZen:l=`no`,zaiCodingPlan:u=`no`,kimiForCoding:f=`no`}=n;r.info(`Installing Oh My OpenAgent plugin`,{version:e,claude:a,copilot:o,gemini:s,openai:c,opencodeZen:l,zaiCodingPlan:u,kimiForCoding:f});let p=``,m=[`oh-my-openagent@${e}`,`install`,`--no-tui`,`--skip-auth`,`--claude=${a}`,`--copilot=${o}`,`--gemini=${s}`,`--openai=${c}`,`--opencode-zen=${l}`,`--zai-coding-plan=${u}`,`--kimi-for-coding=${f}`];try{let t=await i.exec(`bunx`,m,{listeners:{stdout:e=>{p+=e.toString()},stderr:e=>{p+=e.toString()}},ignoreReturnCode:!0});if(t!==0){let e=`bunx oh-my-openagent install returned exit code ${t}`;return r.error(e,{output:p.slice(0,1e3)}),{installed:!1,version:null,error:`${e}\n${p.slice(0,500)}`}}let n=/oh-my-opencode@(\d+\.\d+\.\d+)/i.exec(p),a=n!=null&&n[1]!=null?n[1]:e;return r.info(`oMo plugin installed`,{version:a}),{installed:!0,version:a,error:null}}catch(e){let t=d(e),n=p.length>0?`${t}\nOutput: ${p.slice(0,500)}`:t;return r.error(`Failed to run oMo installer`,{error:t,output:p.slice(0,500)}),{installed:!1,version:null,error:`bunx oh-my-openagent install failed: ${n}`}}}const ki=`opencode`,Ai=l;function ji(){let e=Be.platform(),t=Be.arch(),n={darwin:`darwin`,linux:`linux`,win32:`windows`},r={x64:`x64`,arm64:`arm64`},i=e===`win32`||e===`darwin`?`.zip`:`.tar.gz`;return{os:n[e]??`linux`,arch:r[t]??`x64`,ext:i}}function Mi(e,t){return`https://github.com/anomalyco/opencode/releases/download/${e.startsWith(`v`)?e:`v${e}`}/${`opencode-${t.os}-${t.arch}${t.ext}`}`}async function Ni(e,t,n,r){if(L.platform===`win32`)return!0;try{let{stdout:i}=await r.getExecOutput(`file`,[e],{silent:!0}),a=(t===`.zip`?[`Zip archive`,`ZIP`]:[`gzip`,`tar`,`compressed`]).some(e=>i.includes(e));return a||n.warning(`Download validation failed`,{output:i.trim()}),a}catch{return n.debug(`Could not validate download (file command unavailable)`),!0}}async function Pi(e,t,n,r,i=Ai){let a=ji(),o=n.find(ki,e,a.arch);if(o.length>0)return t.info(`OpenCode found in cache`,{version:e,path:o}),{path:o,version:e,cached:!0};try{return await Fi(e,a,t,n,r)}catch(n){t.warning(`Primary version install failed, trying fallback`,{requestedVersion:e,fallbackVersion:i,error:d(n)})}if(e!==i)try{let e=await Fi(i,a,t,n,r);return t.info(`Installed fallback version`,{version:i}),e}catch(t){throw Error(`Failed to install OpenCode (tried ${e} and ${i}): ${d(t)}`)}throw Error(`Failed to install OpenCode version ${e}`)}async function Fi(e,t,n,r,i){n.info(`Downloading OpenCode`,{version:e});let a=Mi(e,t),o=await r.downloadTool(a);if(!await Ni(o,t.ext,n,i))throw Error(`Downloaded archive appears corrupted`);n.info(`Extracting OpenCode`);let s=t.ext===`.zip`?await r.extractZip(o):await r.extractTar(o);n.info(`Caching OpenCode`);let c=await r.cacheDir(s,ki,e,t.arch);return n.info(`OpenCode installed`,{version:e,path:c}),{path:c,version:e,cached:!1}}async function Ii(e){let t=await fetch(`https://api.github.com/repos/anomalyco/opencode/releases/latest`);if(!t.ok)throw Error(`Failed to fetch latest OpenCode version: ${t.statusText}`);let n=(await t.json()).tag_name.replace(/^v/,``);return e.info(`Latest OpenCode version`,{version:n}),n}function Li(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function Ri(e,t,n){let r=JSON.parse(e);if(!Li(r))throw Error(`systematic-config must be a JSON object (non-null, non-array)`);await B.mkdir(t,{recursive:!0});let i=V.join(t,`systematic.json`),a={};try{let e=await B.readFile(i,`utf8`),t=JSON.parse(e);Li(t)&&(a=t)}catch(e){n.debug(`Using empty base Systematic config`,{path:i,error:String(e)})}let o=Ei(a,r);await B.writeFile(i,JSON.stringify(o,null,2)),n.info(`Wrote Systematic config`,{path:i,keyCount:Object.keys(r).length})}const zi={restoreCache:async(e,t,n)=>de(e,t,n),saveCache:async(e,t)=>oe(e,t)};function Bi(e){let{os:t,opencodeVersion:n,omoVersion:r,systematicVersion:i}=e;return`${Te}-${t}-oc-${n}-omo-${r}-sys-${i}`}function Vi(e){let{os:t,opencodeVersion:n,omoVersion:r,systematicVersion:i}=e;return[`${Te}-${t}-oc-${n}-omo-${r}-sys-${i}-`]}async function Hi(e){let{logger:t,os:n,opencodeVersion:r,omoVersion:i,systematicVersion:a,toolCachePath:o,bunCachePath:s,omoConfigPath:c,opencodeCachePath:l,cacheAdapter:u=zi}=e,f=Bi({os:n,opencodeVersion:r,omoVersion:i,systematicVersion:a}),p=Vi({os:n,opencodeVersion:r,omoVersion:i,systematicVersion:a}),m=[o,s,c,l];t.info(`Restoring tools cache`,{primaryKey:f,restoreKeys:[...p],paths:m});try{let e=await u.restoreCache(m,f,[...p]);return e==null?(t.info(`Tools cache miss - will install tools`),{hit:!1,restoredKey:null}):(t.info(`Tools cache restored`,{restoredKey:e}),{hit:!0,restoredKey:e})}catch(e){return t.warning(`Tools cache restore failed`,{error:d(e)}),{hit:!1,restoredKey:null}}}async function Ui(e){let{logger:t,os:n,opencodeVersion:r,omoVersion:i,systematicVersion:a,toolCachePath:o,bunCachePath:s,omoConfigPath:c,opencodeCachePath:l,cacheAdapter:u=zi}=e,f=Bi({os:n,opencodeVersion:r,omoVersion:i,systematicVersion:a}),p=[o,s,c,l];t.info(`Saving tools cache`,{saveKey:f,paths:p});try{return await u.saveCache(p,f),t.info(`Tools cache saved`,{saveKey:f}),!0}catch(e){return e instanceof Error&&e.message.includes(`already exists`)?(t.info(`Tools cache key already exists, skipping save`),!0):(t.warning(`Tools cache save failed`,{error:d(e)}),!1)}}async function Wi(e,t){let n=Date.now(),r=T({component:`setup`}),i=si(),a=ci();try{r.info(`Starting setup`,{version:e.opencodeVersion});let o;try{o=li(e.authJson)}catch(e){return k(`Invalid auth-json: ${d(e)}`),null}let l=e.opencodeVersion;if(l===`latest`)try{l=await Ii(r)}catch(e){r.warning(`Failed to get latest version, using fallback`,{error:d(e)}),l=Ai}let f=e.omoVersion,p=e.systematicVersion,m=L.env.RUNNER_TOOL_CACHE??`/opt/hostedtoolcache`,h=H(m,`opencode`),g=H(m,`bun`),_=H(Ve(),`.config`,`opencode`),v=H(Ve(),`.cache`,`opencode`),y=c(),x=await Hi({logger:r,os:y,opencodeVersion:l,omoVersion:f,systematicVersion:p,toolCachePath:h,bunCachePath:g,omoConfigPath:_,opencodeCachePath:v}),S=x.hit?`hit`:`miss`,C,T=!1,E=null;if(x.hit){let e=i.find(`opencode`,l);e.length>0?(C={path:e,version:l,cached:!0},r.info(`Tools cache hit, using cached OpenCode CLI`,{version:l,omoVersion:f})):r.warning(`Tools cache hit but binary not found in tool-cache, falling through to install`,{requestedVersion:l,restoredKey:x.restoredKey})}if(C==null)try{C=await Pi(l,r,i,a)}catch(e){return k(`Failed to install OpenCode: ${d(e)}`),null}let D=!1;try{await pi(r,i,a,w,ce),D=!0}catch(e){r.warning(`Bun installation failed, oMo will be unavailable`,{error:d(e)})}if(u(`OMO_SEND_ANONYMOUS_TELEMETRY`,`0`),u(`OMO_DISABLE_POSTHOG`,`1`),D){if(e.omoConfig!=null)try{await Di(e.omoConfig,_,r)}catch(e){r.warning(`Failed to write omo-config, continuing without custom config`,{error:d(e)})}if(e.systematicConfig!=null)try{await Ri(e.systematicConfig,_,r)}catch(e){r.warning(`systematic-config write failed: ${d(e)}`)}let t=await Oi(f,{logger:r,execAdapter:a},e.omoProviders);t.installed?(r.info(`oMo installed`,{version:t.version}),T=!0):r.warning(`oMo installation failed, continuing without oMo`,{error:t.error??`unknown error`}),E=t.error}let O=_i({opencodeConfig:e.opencodeConfig,systematicVersion:p},r);if(O.error!=null)return k(O.error),null;let ee=H(_,`opencode.json`),A={};try{let e=await Fe(ee,`utf8`),t=JSON.parse(e);typeof t==`object`&&t&&!Array.isArray(t)&&(A=t)}catch{}delete A.plugins;let j=(e=>e.map(e=>typeof e==`string`&&(e===`oh-my-openagent`||e===`oh-my-openagent@latest`)?`oh-my-openagent@${f}`:e))(Array.isArray(A.plugin)?A.plugin:[]),te=Array.isArray(O.config.plugin)?O.config.plugin:[],M=[...j];for(let e of te){if(typeof e!=`string`)continue;let t=e.split(`@`).slice(0,e.startsWith(`@`)?2:1).join(`@`);M.some(e=>typeof e==`string`&&e.startsWith(t))||M.push(e)}let ne={...A,...O.config,plugin:M},re=JSON.stringify(ne,null,2);u(`OPENCODE_CONFIG_CONTENT`,re),await Ie(ee,re),r.info(`Wrote merged OpenCode config`,{path:ee,pluginCount:M.length,plugins:M}),x.hit||await Ui({logger:r,os:y,opencodeVersion:l,omoVersion:f,systematicVersion:p,toolCachePath:h,bunCachePath:g,omoConfigPath:_,opencodeCachePath:v}),w(C.path),b(`opencode-path`,C.path),b(`opencode-version`,C.version),r.info(`OpenCode ready`,{version:C.version,cached:C.cached});let ie=Se(t),N=await xi(ie,null,t,r);u(`GH_TOKEN`,t),r.info(`GitHub CLI configured`),await Ci(ie,N.botLogin,r,a);let ae=H(s(),`opencode`),oe=await ui(o,ae,r);b(`auth-json-path`,oe),r.info(`auth.json populated`,{path:oe});let P=Date.now()-n,se={opencodePath:C.path,opencodeVersion:C.version,ghAuthenticated:N.authenticated,omoInstalled:T,omoError:E,toolsCacheStatus:S,duration:P};return r.info(`Setup complete`,{duration:P}),se}catch(e){let t=d(e);return r.error(`Setup failed`,{error:t}),k(t),null}}async function Gi(e,t){try{let{client:n,server:r}=await Nn({signal:e});return t.debug(`OpenCode server bootstrapped`,{url:r.url}),ge({client:n,server:r,shutdown:()=>{r.close()}})}catch(e){let n=e instanceof Error?e.message:String(e);return t.warning(`Failed to bootstrap OpenCode server`,{error:n}),N(Error(`Server bootstrap failed: ${n}`))}}async function Ki(e,t){let n=e??`opencode`;try{let e=``;await I(n,[`--version`],{listeners:{stdout:t=>{e+=t.toString()}},silent:!0});let r=/(\d+\.\d+\.\d+)/.exec(e)?.[1]??null;return t.debug(`OpenCode version verified`,{version:r}),{available:!0,version:r}}catch{return t.debug(`OpenCode not available, will attempt auto-setup`),{available:!1,version:null}}}async function qi(e){let{logger:t,opencodeVersion:n}=e,r=L.env.OPENCODE_PATH??null,i=await Ki(r,t);if(i.available&&i.version!=null)return t.info(`OpenCode already available`,{version:i.version}),{path:r??`opencode`,version:i.version,didSetup:!1};t.info(`OpenCode not found, running auto-setup`,{requestedVersion:n});let a=await Wi({opencodeVersion:n,authJson:e.authJson,appId:null,privateKey:null,opencodeConfig:e.opencodeConfig,systematicConfig:e.systematicConfig,omoConfig:null,omoVersion:e.omoVersion,systematicVersion:e.systematicVersion,omoProviders:e.omoProviders},e.githubToken);if(a==null)throw Error(`Auto-setup failed: runSetup returned null`);return w(a.opencodePath),L.env.OPENCODE_PATH=a.opencodePath,t.info(`Auto-setup completed`,{version:a.opencodeVersion,path:a.opencodePath}),{path:a.opencodePath,version:a.opencodeVersion,didSetup:!0}}async function Ji(e,t){let n={repo:e.agentContext.repo,commentId:e.agentContext.commentId,issueNumber:e.agentContext.issueNumber,issueType:e.agentContext.issueType,botLogin:e.botLogin},r=T({phase:`acknowledgment`});return await Nr(e.githubClient,n,r),t.debug(`Acknowledgment phase completed`),n}function Yi(e,t){try{JSON.parse(e)}catch{throw Error(`${t} must be valid JSON`)}}function Xi(e,t){let n=e.trim();if(!/^\d+$/.test(n))throw Error(`${t} must be a positive integer, received: ${e}`);let r=Number.parseInt(n,10);if(r===0)throw Error(`${t} must be a positive integer, received: ${e}`);return r}function Zi(e){let t=e.trim(),n=t.indexOf(`/`);if(n===-1)throw Error(`Invalid model format: "${e}". Expected "provider/model" (e.g., "anthropic/claude-sonnet-4-20250514")`);let r=t.slice(0,n).trim(),i=t.slice(n+1).trim();if(r.length===0)throw Error(`Invalid model format: "${e}". Provider cannot be empty.`);if(i.length===0)throw Error(`Invalid model format: "${e}". Model ID cannot be empty.`);return{providerID:r,modelID:i}}function Qi(e,t=`timeout`){let n=e.trim();if(!/^\d+$/.test(n))throw Error(`${t} must be a non-negative integer, received: ${e}`);let r=Number.parseInt(n,10);if(Number.isNaN(r)||r<0)throw Error(`${t} must be a non-negative integer, received: ${e}`);return r}const $i=[`claude`,`claude-max20`,`copilot`,`gemini`,`openai`,`opencode-zen`,`zai-coding-plan`,`kimi-for-coding`],ea=[`auto`,`working-dir`,`branch-pr`];function ta(e){let t=e.split(`,`).map(e=>e.trim().toLowerCase()).filter(e=>e.length>0),n=`no`,r=`no`,i=`no`,a=`no`,o=`no`,s=`no`,c=`no`;for(let e of t){if(!$i.includes(e))throw Error(`Invalid omo-providers value: "${e}". Valid values: ${$i.join(`, `)}`);switch(e){case`claude`:n=`yes`;break;case`claude-max20`:n=`max20`;break;case`copilot`:r=`yes`;break;case`gemini`:i=`yes`;break;case`openai`:a=`yes`;break;case`opencode-zen`:o=`yes`;break;case`zai-coding-plan`:s=`yes`;break;case`kimi-for-coding`:c=`yes`;break}}return{claude:n,copilot:r,gemini:i,openai:a,opencodeZen:o,zaiCodingPlan:s,kimiForCoding:c}}function na(e){return typeof e==`object`&&!!e}function ra(e){if(na(e)===!1)return!1;let t=e.pull_request;if(na(t)===!1)return!1;let n=t.head;if(na(n)===!1)return!1;let r=n.repo;return na(r)===!1?!1:r.fork===!0}function ia(e){if(e.length!==0){if(e===`aws:kms`||e===`AES256`)return e;throw Error(`s3-sse-encryption must be either 'aws:kms' or 'AES256'`)}}function aa(){try{let e=L.env.AWS_ACCESS_KEY_ID?.trim()??``;e.length>0&&r(e);let t=L.env.AWS_SECRET_ACCESS_KEY?.trim()??``;t.length>0&&r(t);let n=m(`github-token`,{required:!0}).trim();if(n.length===0)return N(Error(`github-token is required but was not provided`));let a=m(`auth-json`,{required:!0}).trim();if(a.length===0)return N(Error(`auth-json is required but was not provided`));Yi(a,`auth-json`);let o=m(`prompt`).trim(),s=o.length>0?o:null,c=m(`output-mode`).trim().toLowerCase(),u=c.length>0?oa(c):`auto`,d=m(`session-retention`).trim(),p=d.length>0?Xi(d,`session-retention`):50,_=m(`s3-backup`).trim().toLowerCase()===`true`,v=m(`s3-bucket`).trim(),b=v.length>0?v:``,S=m(`aws-region`).trim(),C=S.length>0?S:``,w=m(`s3-endpoint`).trim(),T=w.length>0?w:void 0,E=m(`s3-prefix`).trim(),D=E.length>0?E:f,O=m(`s3-expected-bucket-owner`).trim(),k=O.length>0?O:void 0,A=m(`s3-allow-insecure-endpoint`).trim().toLowerCase()===`true`,j=m(`s3-sse-kms-key-id`).trim(),te=j.length>0?j:void 0,M={enabled:_,bucket:b,region:C,prefix:D,endpoint:T,expectedBucketOwner:k,allowInsecureEndpoint:A,sseEncryption:ia(m(`s3-sse-encryption`).trim()),sseKmsKeyId:te};if(M.enabled){if(M.bucket.length===0)throw Error(`s3-bucket is required when s3-backup is enabled`);let e=xe(M.prefix);if(!e.success)throw e.error;if(M.endpoint!=null){let e=ue(M.endpoint,M.allowInsecureEndpoint===!0);if(!e.success)throw e.error}ra(ee.payload)&&(ie(`S3 object store is disabled for fork pull requests`),M={...M,enabled:!1})}let ne=m(`agent`).trim(),re=ne.length>0?ne:i,ae=m(`model`).trim(),oe=ae.length>0?Zi(ae):null,P=m(`timeout`).trim(),se=P.length>0?Qi(P):x,ce=m(`opencode-version`).trim(),le=ce.length>0?ce:l,de=m(`skip-cache`).trim().toLowerCase()===`true`,fe=m(`omo-version`).trim(),pe=fe.length>0?fe:y,me=m(`systematic-version`).trim(),he=me.length>0?me:h,_e=m(`omo-providers`).trim(),ve=ta(_e.length>0?_e:``),ye=m(`opencode-config`).trim(),F=ye.length>0?ye:null,be=m(`systematic-config`).trim(),I=be.length>0?be:null,Se=m(`dedup-window`).trim(),Ce=Se.length>0?Qi(Se,`dedup-window`):g;if(F!=null){Yi(F,`opencode-config`);let e=JSON.parse(F);if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Input 'opencode-config' must be a JSON object`)}return ge({githubToken:n,authJson:a,prompt:s,outputMode:u,sessionRetention:p,storeConfig:M,agent:re,model:oe,timeoutMs:se,opencodeVersion:le,skipCache:de,omoVersion:pe,systematicVersion:he,omoProviders:ve,opencodeConfig:F,systematicConfig:I,dedupWindow:Ce})}catch(e){return N(e instanceof Error?e:Error(String(e)))}}function oa(e){switch(e){case`auto`:case`working-dir`:case`branch-pr`:return e;default:throw Error(`Invalid output-mode value: "${e}". Valid values: ${ea.join(`, `)}`)}}async function sa(e){let t=aa();if(!t.success)return k(`Invalid inputs: ${t.error.message}`),null;let n=t.data,r=T({phase:`main`});r.info(`Action inputs parsed`,{sessionRetention:n.sessionRetention,s3Backup:n.storeConfig.enabled,hasGithubToken:n.githubToken.length>0,hasPrompt:n.prompt!=null,outputMode:n.outputMode,agent:n.agent,hasModelOverride:n.model!=null,timeoutMs:n.timeoutMs});let i=await qi({logger:r,opencodeVersion:n.opencodeVersion,githubToken:n.githubToken,authJson:n.authJson,omoVersion:n.omoVersion,systematicVersion:n.systematicVersion,omoProviders:n.omoProviders,opencodeConfig:n.opencodeConfig,systematicConfig:n.systematicConfig});return i.didSetup?r.info(`OpenCode auto-setup completed`,{version:i.version}):r.info(`OpenCode already available`,{version:i.version}),D(a.OPENCODE_VERSION,i.version),D(a.S3_ENABLED,String(n.storeConfig.enabled)),D(a.S3_BUCKET,n.storeConfig.bucket),D(a.S3_REGION,n.storeConfig.region),D(a.S3_PREFIX,n.storeConfig.prefix),D(a.S3_ENDPOINT,n.storeConfig.endpoint??``),D(a.S3_EXPECTED_BUCKET_OWNER,n.storeConfig.expectedBucketOwner??``),D(a.S3_ALLOW_INSECURE_ENDPOINT,String(n.storeConfig.allowInsecureEndpoint===!0)),D(a.S3_SSE_ENCRYPTION,n.storeConfig.sseEncryption??``),D(a.S3_SSE_KMS_KEY_ID,n.storeConfig.sseKmsKeyId??``),e.debug(`Bootstrap phase completed`,{opencodeVersion:i.version}),{inputs:n,logger:r,opencodeResult:i}}const ca=/^[0-9a-f]{40}$/i;function la(){return{exec:I,getExecOutput:pe}}async function ua(e){let{workspacePath:t,logger:n,execAdapter:r=la()}=e,i=V.join(t,`.git`),a=V.join(i,`opencode`);try{let e=(await B.readFile(a,`utf8`)).trim();if(e.length>0){if(ca.test(e))return n.debug(`Project ID loaded from cache`,{projectId:e}),{projectId:e,source:`cached`};n.warning(`Invalid cached project ID format, regenerating`,{cachedId:e})}}catch(e){n.debug(`No cached project ID found`,{error:d(e)})}try{let e=await B.readFile(i,`utf8`),n=/^gitdir: (.+)$/m.exec(e);if(n==null)return{projectId:null,source:`error`,error:`Invalid .git file format`};i=V.resolve(t,n[1]),a=V.join(i,`opencode`)}catch(e){if((typeof e==`object`?e.code:void 0)!==`EISDIR`)return{projectId:null,source:`error`,error:`Not a git repository`}}try{let{stdout:e,exitCode:i}=await r.getExecOutput(`git`,[`rev-list`,`--max-parents=0`,`--all`],{cwd:t,silent:!0});if(i!==0||e.trim().length===0)return{projectId:null,source:`error`,error:`No commits found in repository`};let o=e.trim().split(` -`).map(e=>e.trim()).filter(e=>e.length>0).sort();if(o.length===0)return{projectId:null,source:`error`,error:`No root commits found`};let s=o[0];try{await B.writeFile(a,s,{encoding:`utf8`,flag:`wx`}),n.info(`Project ID generated and cached`,{projectId:s,source:`generated`})}catch(e){(typeof e==`object`?e.code:void 0)===`EEXIST`?n.debug(`Project ID file already written by concurrent process, skipping`,{projectId:s}):n.warning(`Failed to cache project ID (continuing)`,{error:d(e)})}return{projectId:s,source:`generated`}}catch(e){return{projectId:null,source:`error`,error:d(e)}}}async function da(e,t){let n=A(),r=T({phase:`cache`}),i=S(),a=V.join(i,`.git`,`opencode`),s=await _e({components:n,logger:r,storagePath:C(),authPath:o(),projectIdPath:a,opencodeVersion:e.opencodeResult.version,storeConfig:e.inputs.storeConfig}),c=s.corrupted?`corrupted`:s.hit?`hit`:`miss`;t.setCacheStatus(c),t.setCacheSource(s.source),e.logger.info(`Cache restore completed`,{cacheStatus:c,key:s.key});let l=await ua({workspacePath:i,logger:r});l.source===`error`?r.warning(`Failed to generate project ID (continuing)`,{error:l.error}):r.debug(`Project ID ready`,{projectId:l.projectId,source:l.source});let u=T({phase:`server-bootstrap`}),d=await Gi(new AbortController().signal,u);if(!d.success)return k(`OpenCode server bootstrap failed: ${d.error.message}`),null;let f=d.data;return u.info(`SDK server bootstrapped successfully`),{cacheResult:s,cacheStatus:c,serverHandle:f}}const fa={markdownImage:/!\[([^\]]*)\]\((https:\/\/github\.com\/user-attachments\/assets\/[^)]+)\)/gi,markdownLink:/\[([^\]]+)\]\((https:\/\/github\.com\/user-attachments\/files\/[^)]+)\)/gi,htmlImage:/]*src=["'](https:\/\/github\.com\/user-attachments\/assets\/[^"']+)["'][^>]*>/gi};function pa(e,t,n){e.lastIndex=0;let r=e.exec(t);for(;r!=null;)n(r),r=e.exec(t);e.lastIndex=0}function ma(e){let t=[],n=new Set;return pa(fa.markdownImage,e,e=>{let r=e[2],i=e[1],a=e[0];r!=null&&i!=null&&!n.has(r)&&qn(r)&&(n.add(r),t.push({url:r,originalMarkdown:a,altText:i,type:`image`}))}),pa(fa.markdownLink,e,e=>{let r=e[2],i=e[1],a=e[0];r!=null&&i!=null&&!n.has(r)&&qn(r)&&(n.add(r),t.push({url:r,originalMarkdown:a,altText:i,type:`file`}))}),pa(fa.htmlImage,e,e=>{let r=e[1],i=e[0];if(r!=null&&!n.has(r)&&qn(r)){n.add(r);let e=/alt=["']([^"']*)["']/i.exec(i);t.push({url:r,originalMarkdown:i,altText:e?.[1]??``,type:`image`})}}),fa.htmlImage.lastIndex=0,t}function ha(e,t,n){try{let r=new URL(e).pathname.split(`/`).at(-1);if(r!=null&&/\.[a-z0-9]+$/i.test(r))return r;if(t.trim().length>0){let e=t.replaceAll(/[^\w.-]/g,`_`).slice(0,50);return e.trim().length>0?e:`attachment_${n+1}`}return`attachment_${n+1}`}catch{return`attachment_${n+1}`}}const ga={maxFiles:5,maxFileSizeBytes:5*1024*1024,maxTotalSizeBytes:15*1024*1024,allowedMimeTypes:[`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`image/svg+xml`,`text/plain`,`text/markdown`,`text/csv`,`application/json`,`application/pdf`]},_a=[`github.com`,`githubusercontent.com`];async function va(e,t,n,r,i){i.debug(`Downloading attachment`,{url:e.url});try{let a=await fetch(e.url,{headers:{Authorization:`Bearer ${n}`,Accept:`*/*`,"User-Agent":`fro-bot-agent`},redirect:`manual`}),o=a;if(a.status>=300&&a.status<400){let t=a.headers.get(`location`);if(t==null)return i.warning(`Redirect without location`,{url:e.url}),null;let n=new URL(t);if(!_a.some(e=>n.hostname===e||n.hostname.endsWith(`.${e}`)))return i.warning(`Redirect to non-GitHub host blocked`,{url:e.url,redirectTo:n.hostname}),null;o=await fetch(t,{headers:{Accept:`*/*`,"User-Agent":`fro-bot-agent`},redirect:`follow`})}if(!o.ok)return i.warning(`Attachment download failed`,{url:e.url,status:o.status}),null;let s=o.headers.get(`content-length`);if(s!=null){let t=Number.parseInt(s,10);if(t>r.maxFileSizeBytes)return i.warning(`Attachment exceeds size limit (Content-Length)`,{url:e.url,size:t,limit:r.maxFileSizeBytes}),null}let c=Ae.from(await o.arrayBuffer());if(c.length>r.maxFileSizeBytes)return i.warning(`Attachment exceeds size limit`,{url:e.url,size:c.length,limit:r.maxFileSizeBytes}),null;let l=o.headers.get(`content-type`)??`application/octet-stream`,u=ha(e.url,e.altText,t),d=l.split(`;`)[0],f=d==null?`application/octet-stream`:d.trim(),p=await B.mkdtemp(V.join(ze.tmpdir(),`fro-bot-attachments-`)),m=u.trim().length>0?u:`attachment_${t+1}`,h=V.join(p,m);return await B.writeFile(h,c),i.debug(`Attachment downloaded`,{filename:u,mime:f,sizeBytes:c.length,tempPath:h}),{url:e.url,filename:u,mime:f,sizeBytes:c.length,tempPath:h}}catch(t){return i.warning(`Attachment download error`,{url:e.url,error:d(t)}),null}}async function ya(e,t,n=ga,r){return Promise.all(e.map(async(e,i)=>va(e,i,t,n,r)))}async function ba(e,t){for(let n of e)try{await B.unlink(n);let e=V.dirname(n);await B.rmdir(e).catch(()=>{})}catch(e){t.debug(`Failed to cleanup temp file`,{path:n,error:d(e)})}}function xa(e){return e.map(e=>({type:`file`,mime:e.mime,url:Ne(e.tempPath).toString(),filename:e.filename}))}function Sa(e,t,n){let r=e,i=new Set(n.map(e=>e.filename));for(let e of t){let t=n.find(e=>i.has(e.filename));t!=null&&(r=r.replace(e.originalMarkdown,`@${t.filename}`))}return r}function Ca(e,t,n,r){return{processed:n,skipped:r,modifiedBody:Sa(e,t,n),fileParts:xa(n),tempFiles:n.map(e=>e.tempPath)}}function wa(e,t=ga,n){let r=[],i=[],a=0;for(let o of e)if(o!=null){if(r.length>=t.maxFiles){i.push({url:o.url,reason:`Exceeds max file count (${t.maxFiles})`}),n.debug(`Attachment skipped: max count`,{url:o.url});continue}if(o.sizeBytes>t.maxFileSizeBytes){i.push({url:o.url,reason:`File too large (${rt(o.sizeBytes)} > ${rt(t.maxFileSizeBytes)})`}),n.debug(`Attachment skipped: too large`,{url:o.url,size:o.sizeBytes});continue}if(a+o.sizeBytes>t.maxTotalSizeBytes){i.push({url:o.url,reason:`Would exceed total size limit (${rt(t.maxTotalSizeBytes)})`}),n.debug(`Attachment skipped: total size exceeded`,{url:o.url});continue}if(!Ta(o.mime,t.allowedMimeTypes)){i.push({url:o.url,reason:`MIME type not allowed: ${o.mime}`}),n.debug(`Attachment skipped: MIME type`,{url:o.url,mime:o.mime});continue}a+=o.sizeBytes,r.push({filename:o.filename,mime:o.mime,sizeBytes:o.sizeBytes,tempPath:o.tempPath}),n.info(`Attachment validated`,{filename:o.filename,mime:o.mime,sizeBytes:o.sizeBytes})}return{validated:r,skipped:i}}function Ta(e,t){let[n]=e.split(`/`);for(let r of t)if(r===e||r.endsWith(`/*`)&&n!=null&&n===r.slice(0,-2))return!0;return!1}function Ea(e){let t=V.resolve(e);return t.endsWith(V.sep)&&t.length>1?t.slice(0,-1):t}const Da=e=>typeof e==`object`&&!!e,Z=e=>typeof e==`string`?e:null,Oa=e=>typeof e==`number`?e:null;function ka(e){if(Array.isArray(e))return e.filter(Da).map(e=>({file:Z(e.file)??``,additions:Oa(e.additions)??0,deletions:Oa(e.deletions)??0}))}function Aa(e){return{id:e.id,version:e.version,projectID:e.projectID,directory:e.directory,parentID:e.parentID,title:e.title,time:{created:e.time.created,updated:e.time.updated,compacting:e.time.compacting,archived:e.time.archived},summary:e.summary==null?void 0:{additions:e.summary.additions,deletions:e.summary.deletions,files:e.summary.files,diffs:ka(e.summary.diffs)},share:e.share?.url==null?void 0:{url:e.share.url},permission:e.permission==null?void 0:{rules:e.permission.rules},revert:e.revert==null?void 0:{messageID:e.revert.messageID,partID:e.revert.partID,snapshot:e.revert.snapshot,diff:e.revert.diff}}}async function ja(e,t){let n=await e.project.list();if(n.error!=null||n.data==null)return t.warning(`SDK project list failed`,{error:String(n.error)}),[];if(!Array.isArray(n.data))return[];let r=[];for(let e of n.data){if(!Da(e))continue;let t=Z(e.id),n=Z(e.worktree),i=Z(e.path);t==null||n==null||i==null||r.push({id:t,worktree:n,path:i,vcs:`git`,time:{created:0,updated:0}})}return r}async function Ma(e,t,n){let r=Ea(t),i=await ja(e,n);for(let e of i){if(Ea(e.worktree)===r)return e;let t=Z(e.path);if(t!=null&&Ea(t)===r)return e}return null}function Na(e){return e.status===`running`?{status:`running`,input:e.input,time:{start:e.time.start}}:e.status===`error`?{status:`error`,input:e.input,error:e.error,time:{start:e.time.start,end:e.time.end}}:e.status===`pending`?{status:`pending`}:{status:`completed`,input:e.input,output:e.output,title:e.title,metadata:e.metadata,time:{start:e.time.start,end:e.time.end,compacted:e.time.compacted},attachments:void 0}}function Pa(e){let t={id:e.id,sessionID:e.sessionID,messageID:e.messageID};if(e.type===`text`)return{...t,type:`text`,text:e.text,synthetic:e.synthetic,ignored:e.ignored,time:e.time,metadata:e.metadata};if(e.type===`reasoning`)return{...t,type:`reasoning`,reasoning:e.reasoning??e.text,time:e.time};if(e.type===`tool`)return{...t,type:`tool`,callID:e.callID,tool:e.tool,state:Na(e.state),metadata:e.metadata};if(e.type!==`step-finish`)return{...t,type:`text`,text:`text`in e?e.text:``};let n=e;return{...t,type:`step-finish`,reason:n.reason,snapshot:n.snapshot,cost:n.cost,tokens:{input:n.tokens.input,output:n.tokens.output,reasoning:n.tokens.reasoning,cache:{read:n.tokens.cache.read,write:n.tokens.cache.write}}}}function Fa(e){if(e.role===`user`){let t=e;return{id:t.id,sessionID:t.sessionID,role:`user`,time:{created:t.time.created},summary:t.summary==null?void 0:{title:t.summary.title,body:t.summary.body,diffs:ka(t.summary.diffs)??[]},agent:t.agent,model:{providerID:t.model.providerID,modelID:t.model.modelID},system:t.system,tools:t.tools,variant:t.variant}}let t=e;return{id:t.id,sessionID:t.sessionID,role:`assistant`,time:{created:t.time.created,completed:t.time.completed},parentID:t.parentID,modelID:t.modelID,providerID:t.providerID,mode:t.mode,agent:t.agent??``,path:{cwd:t.path.cwd,root:t.path.root},summary:t.summary,cost:t.cost,tokens:{input:t.tokens.input,output:t.tokens.output,reasoning:t.tokens.reasoning,cache:{read:t.tokens.cache.read,write:t.tokens.cache.write}},finish:t.finish,error:t.error?{name:t.error.name,message:Z(t.error.data.message)??``}:void 0}}function Ia(e){return[...e.map(e=>{let t=Fa(`info`in e?e.info:e),n=`parts`in e?e.parts.map(Pa):void 0;return n==null||n.length===0?t:{...t,parts:n}})].sort((e,t)=>e.time.created-t.time.created)}async function La(e,t,n){let r=await e.session.list({query:{directory:t}});return r.error==null&&r.data!=null?Array.isArray(r.data)?r.data.map(Aa):[]:(n.warning(`SDK session list failed`,{error:String(r.error)}),[])}async function Ra(e,t,n){let r=await e.session.messages({path:{id:t}});return r.error==null&&r.data!=null?Ia(r.data):(n.warning(`SDK session messages failed`,{error:String(r.error)}),[])}async function za(e,t,n,r){let i=await e.session.list({query:{directory:t,start:n,roots:!0,limit:10}});if(i.error!=null||i.data==null)return r.warning(`SDK session list failed`,{error:String(i.error)}),null;if(!Array.isArray(i.data)||i.data.length===0)return null;let a=i.data.map(Aa);if(a.length===0)return null;let o=a.reduce((e,t)=>t.time.created>e.time.created?t:e);return{projectID:o.projectID,session:o}}async function Ba(e,t,n){let r=await e.session.delete({path:{id:t}});if(r.error!=null){n.warning(`SDK session delete failed`,{sessionID:t,error:String(r.error)});return}n.debug(`Deleted session via SDK`,{sessionID:t})}const Va={maxSessions:50,maxAgeDays:30};async function Ha(e,t,n,r){let{maxSessions:i,maxAgeDays:a}=n;if(r.info(`Starting session pruning`,{workspacePath:t,maxSessions:i,maxAgeDays:a}),await Ma(e,t,r)==null)return r.debug(`No project found for pruning`,{workspacePath:t}),{prunedCount:0,prunedSessionIds:[],remainingCount:0,freedBytes:0};let o=await La(e,t,r),s=o.filter(e=>e.parentID==null);if(s.length===0)return{prunedCount:0,prunedSessionIds:[],remainingCount:0,freedBytes:0};let c=[...s].sort((e,t)=>t.time.updated-e.time.updated),l=new Date;l.setDate(l.getDate()-a);let u=l.getTime(),f=new Set;for(let e of c)e.time.updated>=u&&f.add(e.id);for(let e=0;e!f.has(e.id)),m=new Set;for(let e of p){m.add(e.id);for(let t of o)t.parentID===e.id&&m.add(t.id)}if(m.size===0)return r.info(`No sessions to prune`),{prunedCount:0,prunedSessionIds:[],remainingCount:s.length,freedBytes:0};let h=[];for(let t of m)try{await Ba(e,t,r),h.push(t),r.debug(`Pruned session`,{sessionId:t})}catch(e){r.warning(`Failed to prune session`,{sessionId:t,error:d(e)})}let g=s.length-p.length;return r.info(`Session pruning complete`,{prunedCount:h.length,remainingCount:g}),{prunedCount:h.length,prunedSessionIds:h,remainingCount:g,freedBytes:0}}async function Ua(e,t,n,r){let{limit:i,fromDate:a,toDate:o}=n;r.debug(`Listing sessions`,{directory:t,limit:i});let s=[...(await La(e,t,r)).filter(e=>!(e.parentID!=null||a!=null&&e.time.createdo.getTime()))].sort((e,t)=>t.time.updated-e.time.updated),c=[],l=i==null?s:s.slice(0,i);for(let t of l){let n=await Ra(e,t.id,r),i=Wa(n);c.push({id:t.id,projectID:t.projectID,directory:t.directory,title:t.title,createdAt:t.time.created,updatedAt:t.time.updated,messageCount:n.length,agents:i,isChild:!1})}return r.info(`Listed sessions`,{count:c.length,directory:t}),c}function Wa(e){let t=new Set;for(let n of e)n.agent!=null&&t.add(n.agent);return[...t]}async function Ga(e,t,n,r,i){let{limit:a=20,caseSensitive:o=!1,sessionId:s}=r;i.debug(`Searching sessions`,{query:e,directory:n,limit:a,caseSensitive:o});let c=o?e:e.toLowerCase(),l=[],u=0;if(s!=null){let e=await Ka(t,s,c,o,i);return e.length>0&&l.push({sessionId:s,matches:e.slice(0,a)}),l}let d=await Ua(t,n,{},i);for(let e of d){if(u>=a)break;let n=await Ka(t,e.id,c,o,i);if(n.length>0){let t=a-u;l.push({sessionId:e.id,matches:n.slice(0,t)}),u+=Math.min(n.length,t)}}return i.info(`Session search complete`,{query:e,resultCount:l.length,totalMatches:u}),l}async function Ka(e,t,n,r,i){let a=await Ra(e,t,i),o=[];for(let e of a){let t=e.parts??[];for(let i of t){let t=qa(i);if(t==null)continue;let a=r?t:t.toLowerCase();if(a.includes(n)){let r=a.indexOf(n),s=Math.max(0,r-50),c=Math.min(t.length,r+n.length+50),l=t.slice(s,c);o.push({messageId:e.id,partId:i.id,excerpt:`...${l}...`,role:e.role,agent:e.agent})}}}return o}function qa(e){switch(e.type){case`text`:return e.text;case`reasoning`:return e.reasoning;case`tool`:return e.state.status===`completed`?`${e.tool}: ${e.state.output}`:null;case`step-finish`:return null}}function Ja(e){let t=[`--- Fro Bot Run Summary ---`,`Event: ${e.eventType}`,`Repo: ${e.repo}`,`Ref: ${e.ref}`,`Run ID: ${e.runId}`,`Cache: ${e.cacheStatus}`,`Duration: ${e.duration}s`];return e.sessionIds.length>0&&t.push(`Sessions used: ${e.sessionIds.join(`, `)}`),e.logicalKey!=null&&t.push(`Logical Thread: ${e.logicalKey}`),e.createdPRs.length>0&&t.push(`PRs created: ${e.createdPRs.join(`, `)}`),e.createdCommits.length>0&&t.push(`Commits: ${e.createdCommits.join(`, `)}`),e.tokenUsage!=null&&t.push(`Tokens: ${e.tokenUsage.input} in / ${e.tokenUsage.output} out`),t.join(` -`)}async function Ya(e,t,n,r){let i=Ja(t);try{let t=await n.session.prompt({path:{id:e},body:{noReply:!0,parts:[{type:`text`,text:i}]}});if(t.error!=null){r.warning(`SDK prompt writeback failed`,{sessionId:e,error:String(t.error)});return}r.info(`Session summary written via SDK`,{sessionId:e})}catch(t){r.warning(`SDK prompt writeback failed`,{sessionId:e,error:d(t)})}}async function Xa(e){let{bootstrapLogger:t,reactionCtx:n,githubClient:r,agentSuccess:i,attachmentResult:s,serverHandle:c,detectedOpencodeVersion:l,storeConfig:u,metrics:d,agentIdentity:f,repo:p,runId:m}=e;try{if(s!=null){let e=T({phase:`attachment-cleanup`});await ba(s.tempFiles,e)}n!=null&&r!=null&&await zr(r,n,i,T({phase:`cleanup`}));let e=T({phase:`prune`}),h=S();if(c!=null){let t=Ea(h),n=await Ha(c.client,t,Va,e);n.prunedCount>0&&e.info(`Pruned old sessions`,{pruned:n.prunedCount,remaining:n.remainingCount})}if(c!=null)try{c.shutdown()}catch(e){t.warning(`Server shutdown failed (non-fatal)`,{error:e instanceof Error?e.message:String(e)})}if(u.enabled===!0){let e=T({phase:`object-store-artifacts`});try{let t=me(u,e),n=await ye(t,u,f,p,m,Ce(),e),r=d.getMetrics(),i=[...new Set([...r.sessionsUsed,...r.sessionsCreated])];await M(t,u,f,p,m,{runId:m,timestamp:new Date().toISOString(),tokenUsage:r.tokenUsage,timing:{startTime:r.startTime,endTime:r.endTime,duration:r.duration},cacheStatus:r.cacheStatus,cacheSource:r.cacheSource,sessionIds:i,sessionsUsed:r.sessionsUsed,sessionsCreated:r.sessionsCreated,prsCreated:r.prsCreated,commitsCreated:r.commitsCreated,commentsPosted:r.commentsPosted,model:r.model,cost:r.cost,errors:r.errors,artifactUpload:n},e)}catch(t){e.warning(`Object store artifact or metadata sync failed (non-fatal)`,{error:t instanceof Error?t.message:String(t)})}}let g=A(),_=T({phase:`cache-save`}),y=V.join(h,`.git`,`opencode`);if(await fe({components:g,runId:we(),logger:_,storagePath:C(),authPath:o(),projectIdPath:y,opencodeVersion:l,storeConfig:u})&&D(a.CACHE_SAVED,`true`),v()){let e=T({phase:`artifact-upload`});await be({logPath:Ce(),runId:we(),runAttempt:te(),logger:e})&&D(a.ARTIFACT_UPLOADED,`true`)}}catch(e){t.warning(`Cleanup failed (non-fatal)`,{error:e instanceof Error?e.message:String(e)})}}const Za=V.join(Be.homedir(),`.cache`,`fro-bot-dedup`);function Qa(e){return e.replaceAll(`/`,`-`)}function $a(e,t){let n=Qa(e);return V.join(Za,`${n}-${t.entityType}-${t.entityNumber}`)}function eo(e,t){return`${le}-${Qa(e)}-${t.entityType}-${t.entityNumber}-`}function to(e,t,n){return`${eo(e,t)}${n}`}async function no(e,t,n,r=P){let i=$a(e,t),a=V.join(i,`sentinel.json`),o=eo(e,t);try{if(await B.rm(i,{recursive:!0,force:!0}),await B.mkdir(i,{recursive:!0}),await r.restoreCache([i],o,[])==null)return null;let e=await B.readFile(a,`utf8`);return JSON.parse(e)}catch(e){return n.debug(`Dedup marker restore failed; proceeding without marker`,{error:d(e),entityType:t.entityType,entityNumber:t.entityNumber}),null}}async function ro(e,t,n,r,i=P){let a=$a(e,t),o=V.join(a,`sentinel.json`),s=to(e,t,n.runId);try{return await B.mkdir(a,{recursive:!0}),await B.writeFile(o,JSON.stringify(n),`utf8`),await i.saveCache([a],s),!0}catch(e){return d(e).toLowerCase().includes(`already exists`)?!0:(r.debug(`Dedup marker save failed`,{error:d(e),entityType:t.entityType,entityNumber:t.entityNumber,saveKey:s}),!1)}}const io=new Set([`pull_request`,`issues`]),ao=new Set([`synchronize`,`reopened`]);function oo(e){return e.target==null||!io.has(e.eventType)?null:e.eventType===`pull_request`&&e.target.kind===`pr`?{entityType:`pr`,entityNumber:e.target.number}:e.eventType===`issues`&&e.target.kind===`issue`?{entityType:`issue`,entityNumber:e.target.number}:null}async function so(e,t,n,r,i=T({phase:`dedup`}),a){let o=oo(t);if(e===0)return{shouldProceed:!0,entity:o};if(o==null)return{shouldProceed:!0,entity:null};if(t.action!=null&&ao.has(t.action))return i.debug(`Dedup bypassed for action`,{action:t.action}),{shouldProceed:!0,entity:o};let s=await no(n,o,i,a);if(s==null||s.runId===t.runId)return{shouldProceed:!0,entity:o};let c=new Date(s.timestamp).getTime();if(Number.isNaN(c))return i.warning(`Dedup marker timestamp is invalid; proceeding without dedup`,{markerTimestamp:s.timestamp}),{shouldProceed:!0,entity:o};let l=Date.now()-c;if(l<-6e4)return i.warning(`Dedup marker timestamp is too far in the future; proceeding without dedup`,{markerTimestamp:s.timestamp,markerAge:l}),{shouldProceed:!0,entity:o};let u=Math.max(0,l);return u>e?{shouldProceed:!0,entity:o}:(i.info(`Skipping duplicate trigger within dedup window`,{eventType:t.eventType,action:t.action,runId:t.runId,markerRunId:s.runId,markerTimestamp:s.timestamp,dedupWindow:e,entityType:o.entityType,entityNumber:o.entityNumber}),U({sessionId:null,resolvedOutputMode:null,cacheStatus:`miss`,duration:Date.now()-r}),await lo(t,o,s,u,e,i),{shouldProceed:!1,entity:o})}async function co(e,t,n,r=T({phase:`dedup`}),i){await ro(n,t,{timestamp:new Date().toISOString(),runId:e.runId,action:e.action??`unknown`,eventType:e.eventType,entityType:t.entityType,entityNumber:t.entityNumber},r,i)}async function lo(e,t,n,r,i,a){try{let a=Math.round(r/1e3),o=Math.round(i/1e3),s=`${t.entityType} #${t.entityNumber}`,c=`https://github.com/${e.repo.owner}/${e.repo.repo}/actions/runs/${n.runId}`;F.addHeading(`Fro Bot Agent Run — Skipped (Dedup)`,2).addRaw(`Execution skipped because the agent already ran for **${s}** recently.\n\n`).addTable([[{data:`Detail`,header:!0},{data:`Value`,header:!0}],[`Current action`,`\`${e.eventType}.${e.action??`unknown`}\``],[`Prior run`,`[${n.runId}](${c})`],[`Prior action`,`\`${n.eventType}.${n.action}\``],[`Time since prior run`,`${a}s`],[`Dedup window`,`${o}s`]]).addRaw(` +If you had completed the task, confirm the completion.`,a=x.length>0?x:void 0,o=await(async()=>{try{return await hn(u,f,i,a,v,r,n)}finally{await yt(u,f,r?.sessionTitle,n)}})();if(o.success)return S=o.eventStreamResult,{success:!0,exitCode:0,duration:Date.now()-s,sessionId:f,error:null,tokenUsage:S.tokens,model:S.model,cost:S.cost,prsCreated:S.prsCreated,commitsCreated:S.commitsCreated,commentsPosted:S.commentsPosted,llmError:null};if(C=o.error,w=o.llmError,!o.shouldRetry||e>=4)break;n.warning(`LLM fetch error detected, retrying with continuation prompt`,{attempt:e,maxAttempts:4,error:o.error,delayMs:t,sessionId:f}),await D(t)}return{success:!1,exitCode:1,duration:Date.now()-s,sessionId:f,error:C??`Unknown error`,tokenUsage:S.tokens,model:S.model,cost:S.cost,prsCreated:S.prsCreated,commitsCreated:S.commitsCreated,commentsPosted:S.commentsPosted,llmError:w}}catch(e){let t=Date.now()-s,r=_(e);return n.error(`OpenCode execution failed`,{error:r,durationMs:t}),{success:!1,exitCode:1,duration:t,sessionId:null,error:r,tokenUsage:null,model:null,cost:null,prsCreated:[],commitsCreated:[],commentsPosted:0,llmError:he(e)?we(r):null}}finally{u!=null&&clearTimeout(u),c.abort(),f&&p?.close()}}async function _n(e,t,n){return t.commentId==null?(n.debug(`No comment ID, skipping eyes reaction`),!1):await Mt(e,t.repo,t.commentId,`eyes`,n)==null?!1:(n.info(`Added eyes reaction`,{commentId:t.commentId}),!0)}async function vn(e,t,n){return t.issueNumber==null?(n.debug(`No issue number, skipping working label`),!1):await Ft(e,t.repo,`agent: working`,`fcf2e1`,`Agent is currently working on this`,n)&&await It(e,t.repo,t.issueNumber,[`agent: working`],n)?(n.info(`Added working label`,{issueNumber:t.issueNumber}),!0):!1}async function yn(e,t,n){await Promise.all([_n(e,t,n),vn(e,t,n)])}async function bn(e,t,n){if(t.commentId==null||t.botLogin==null)return;let r=(await Nt(e,t.repo,t.commentId,n)).find(e=>e.content===`eyes`&&e.userLogin===t.botLogin);r!=null&&await Pt(e,t.repo,t.commentId,r.id,n)}async function xn(e,t,n,r){t.commentId!=null&&await Mt(e,t.repo,t.commentId,n,r)}async function Sn(e,t,n){if(t.commentId==null||t.botLogin==null){n.debug(`Missing comment ID or bot login, skipping reaction update`);return}try{await bn(e,t,n),await xn(e,t,`hooray`,n),n.info(`Updated reaction to success indicator`,{commentId:t.commentId,reaction:`hooray`})}catch(e){n.warning(`Failed to update reaction (non-fatal)`,{error:_(e)})}}async function Cn(e,t,n){if(t.commentId==null||t.botLogin==null){n.debug(`Missing comment ID or bot login, skipping reaction update`);return}try{await bn(e,t,n),await xn(e,t,`confused`,n),n.info(`Updated reaction to confused`,{commentId:t.commentId})}catch(e){n.warning(`Failed to update failure reaction (non-fatal)`,{error:_(e)})}}async function wn(e,t,n){if(t.issueNumber==null){n.debug(`No issue number, skipping label removal`);return}await Lt(e,t.repo,t.issueNumber,`agent: working`,n)&&n.info(`Removed working label`,{issueNumber:t.issueNumber})}async function Tn(e,t,n,r){n?await Sn(e,t,r):await Cn(e,t,r),await wn(e,t,r)}var Z=e(ne(),1),En=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Dn=class{constructor(e,t,n){if(e<1)throw Error(`max attempts should be greater than or equal to 1`);if(this.maxAttempts=e,this.minSeconds=Math.floor(t),this.maxSeconds=Math.floor(n),this.minSeconds>this.maxSeconds)throw Error(`min seconds should be less than or equal to max seconds`)}execute(e,t){return En(this,void 0,void 0,function*(){let n=1;for(;nsetTimeout(t,e*1e3))})}},Q=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},On=class extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}};const kn=process.platform===`win32`;process.platform;function An(e,t,n,r){return Q(this,void 0,void 0,function*(){return t||=U.join(Gn(),Me.randomUUID()),yield Ee(U.dirname(t)),I(`Downloading ${e}`),I(`Destination ${t}`),yield new Dn(3,Kn(`TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS`,10),Kn(`TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS`,20)).execute(()=>Q(this,void 0,void 0,function*(){return yield jn(e,t||``,n,r)}),e=>!(e instanceof On&&e.httpStatusCode&&e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429))})}function jn(e,t,n,r){return Q(this,void 0,void 0,function*(){if(H.existsSync(t))throw Error(`Destination file path ${t} already exists`);let i=new b(`actions/tool-cache`,[],{allowRetries:!1});n&&(I(`set auth`),r===void 0&&(r={}),r.authorization=n);let a=yield i.get(e,r);if(a.message.statusCode!==200){let t=new On(a.message.statusCode);throw I(`Failed to download from "${e}". Code(${a.message.statusCode}) Message(${a.message.statusMessage})`),t}let o=Pe.promisify(Ge.pipeline),s=Kn(`TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY`,()=>a.message)(),c=!1;try{return yield o(s,H.createWriteStream(t)),I(`download complete`),c=!0,t}finally{if(!c){I(`download failed`);try{yield ke(t)}catch(e){I(`Failed to delete '${t}'. ${e.message}`)}}}})}function Mn(e,t){return Q(this,arguments,void 0,function*(e,t,n=`xz`){if(!e)throw Error(`parameter 'file' is required`);t=yield zn(t),I(`Checking tar --version`);let r=``;yield F(`tar --version`,[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>r+=e.toString(),stderr:e=>r+=e.toString()}}),I(r.trim());let i=r.toUpperCase().includes(`GNU TAR`),a;a=n instanceof Array?n:[n],de()&&!n.includes(`v`)&&a.push(`-v`);let o=t,s=e;return kn&&i&&(a.push(`--force-local`),o=t.replace(/\\/g,`/`),s=e.replace(/\\/g,`/`)),i&&(a.push(`--warning=no-unknown-keyword`),a.push(`--overwrite`)),a.push(`-C`,o,`-f`,s),yield F(`tar`,a),t})}function Nn(e,t){return Q(this,void 0,void 0,function*(){if(!e)throw Error(`parameter 'file' is required`);return t=yield zn(t),kn?yield Pn(e,t):yield Fn(e,t),t})}function Pn(e,t){return Q(this,void 0,void 0,function*(){let n=e.replace(/'/g,`''`).replace(/"|\n|\r/g,``),r=t.replace(/'/g,`''`).replace(/"|\n|\r/g,``),i=yield A(`pwsh`,!1);if(i){let e=[`-NoLogo`,`-NoProfile`,`-NonInteractive`,`-ExecutionPolicy`,`Unrestricted`,`-Command`,[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${n}', '${r}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${n}' -DestinationPath '${r}' -Force } else { throw $_ } } ;`].join(` `)];I(`Using pwsh at path: ${i}`),yield F(`"${i}"`,e)}else{let e=[`-NoLogo`,`-Sta`,`-NoProfile`,`-NonInteractive`,`-ExecutionPolicy`,`Unrestricted`,`-Command`,[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${n}' -DestinationPath '${r}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${n}', '${r}', $true) }`].join(` `)],t=yield A(`powershell`,!0);I(`Using powershell at path: ${t}`),yield F(`"${t}"`,e)}})}function Fn(e,t){return Q(this,void 0,void 0,function*(){let n=yield A(`unzip`,!0),r=[e];de()||r.unshift(`-q`),r.unshift(`-o`),yield F(`"${n}"`,r,{cwd:t})})}function In(e,t,n,r){return Q(this,void 0,void 0,function*(){if(n=Z.clean(n)||n,r||=je.arch(),I(`Caching tool ${t} ${n} ${r}`),I(`source dir: ${e}`),!H.statSync(e).isDirectory())throw Error(`sourceDir is not a directory`);let i=yield Bn(t,n,r);for(let t of H.readdirSync(e))yield ee(U.join(e,t),i,{recursive:!0});return Vn(t,n,r),i})}function Ln(e,t,n){if(!e)throw Error(`toolName parameter is required`);if(!t)throw Error(`versionSpec parameter is required`);n||=je.arch(),Hn(t)||(t=Un(Rn(e,n),t));let r=``;if(t){t=Z.clean(t)||``;let i=U.join(Wn(),e,t,n);I(`checking cache: ${i}`),H.existsSync(i)&&H.existsSync(`${i}.complete`)?(I(`Found tool in cache ${e} ${t} ${n}`),r=i):I(`not found`)}return r}function Rn(e,t){let n=[];t||=je.arch();let r=U.join(Wn(),e);if(H.existsSync(r)){let e=H.readdirSync(r);for(let i of e)if(Hn(i)){let e=U.join(r,i,t||``);H.existsSync(e)&&H.existsSync(`${e}.complete`)&&n.push(i)}}return n}function zn(e){return Q(this,void 0,void 0,function*(){return e||=U.join(Gn(),Me.randomUUID()),yield Ee(e),e})}function Bn(e,t,n){return Q(this,void 0,void 0,function*(){let r=U.join(Wn(),e,Z.clean(t)||t,n||``);I(`destination ${r}`);let i=`${r}.complete`;return yield ke(r),yield ke(i),yield Ee(r),r})}function Vn(e,t,n){let r=`${U.join(Wn(),e,Z.clean(t)||t,n||``)}.complete`;H.writeFileSync(r,``),I(`finished caching tool`)}function Hn(e){let t=Z.clean(e)||``;I(`isExplicit: ${t}`);let n=Z.valid(t)!=null;return I(`explicit? ${n}`),n}function Un(e,t){let n=``;I(`evaluating ${e.length} versions`),e=e.sort((e,t)=>Z.gt(e,t)?1:-1);for(let r=e.length-1;r>=0;r--){let i=e[r];if(Z.satisfies(i,t)){n=i;break}}return I(n?`matched: ${n}`:`match not found`),n}function Wn(){let e=process.env.RUNNER_TOOL_CACHE||``;return Ne(e,`Expected RUNNER_TOOL_CACHE to be defined`),e}function Gn(){let e=process.env.RUNNER_TEMP||``;return Ne(e,`Expected RUNNER_TEMP to be defined`),e}function Kn(e,t){let n=global[e];return n===void 0?t:n}function qn(){return{find:Ln,downloadTool:An,extractTar:Mn,extractZip:Nn,cacheDir:In}}function Jn(){return{exec:F,getExecOutput:oe}}function Yn(e){let t;try{t=JSON.parse(e)}catch(e){throw e instanceof SyntaxError?Error(`Invalid auth-json format: ${e.message}`):e}if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`auth-json must be a JSON object`);return t}async function Xn(e,t,n){let r=G.join(t,`auth.json`);await W.mkdir(t,{recursive:!0});let i=JSON.stringify(e,null,2);return await W.writeFile(r,i,{mode:384}),n.info(`Populated auth.json`,{path:r,providers:Object.keys(e).length}),r}function Zn(){let e=V.platform,t=V.arch;return{os:{darwin:`darwin`,linux:`linux`,win32:`windows`}[e]??`linux`,arch:{arm64:`aarch64`,x64:`x64`}[t]??`x64`,ext:`.zip`}}function Qn(e,t){return`https://github.com/oven-sh/bun/releases/download/bun-${e.startsWith(`v`)?e:`v${e}`}/${`bun-${t.os}-${t.arch}${t.ext}`}`}async function $n(e,t,n,r,i=c){let a=Zn(),o=t.find(`bun`,i,a.arch);if(o.length>0)return e.info(`Bun found in cache`,{version:i,path:o}),r(o),await tr(o),{path:o,version:i,cached:!0};e.info(`Downloading Bun`,{version:i});let s=Qn(i,a);try{let o=await t.downloadTool(s);if(V.platform!==`win32`&&!await nr(o,e,n))throw Error(`Downloaded Bun archive appears corrupted`);e.info(`Extracting Bun`);let c=await er(await t.extractZip(o),t),l=K.dirname(c);e.info(`Caching Bun`);let u=await t.cacheDir(l,`bun`,i,a.arch);return r(u),await tr(u),e.info(`Bun installed`,{version:i,path:u}),{path:u,version:i,cached:!1}}catch(e){let t=_(e);throw Error(`Failed to install Bun ${i}: ${t}`)}}async function er(e,t){for(let n of await ze.readdir(e,{withFileTypes:!0})){let{name:r}=n,i=K.join(e,r);if(n.isFile()){if(r===`bun`||r===`bun.exe`)return i;if(/^bun.*\.zip/.test(r))return er(await t.extractZip(i),t)}if(r.startsWith(`bun`)&&n.isDirectory())return er(i,t)}throw Error(`Could not find executable: bun`)}async function tr(e){let t=e=>V.platform===`win32`?`${e}.exe`:e,n=K.join(e,t(`bun`));try{await ze.symlink(n,K.join(e,t(`bunx`)))}catch(e){let t=typeof e==`object`?e.code:void 0;if(t!==`EEXIST`&&t!==`EPERM`&&t!==`EACCES`)throw e}}async function nr(e,t,n){try{let{stdout:r}=await n.getExecOutput(`file`,[e],{silent:!0}),i=r.includes(`Zip archive`)||r.includes(`ZIP`);return i||t.warning(`Bun download validation failed`,{output:r.trim()}),i}catch{return t.debug(`Could not validate Bun download (file command unavailable)`),!0}}function rr(e,t){let n={autoupdate:!1};if(e.opencodeConfig!=null){let t;try{t=JSON.parse(e.opencodeConfig)}catch{return{config:n,error:`opencode-config must be valid JSON`}}if(typeof t!=`object`||!t||Array.isArray(t))return{config:n,error:`opencode-config must be a JSON object`};Object.assign(n,t)}let r=`@fro.bot/systematic@${e.systematicVersion}`,i=Array.isArray(n.plugin)?n.plugin:[];return i.some(e=>typeof e==`string`&&e.startsWith(`@fro.bot/systematic`))||(n.plugin=[...i,r]),t.debug(`Built CI OpenCode config`,{hasUserConfig:e.opencodeConfig!=null,pluginCount:Array.isArray(n.plugin)?n.plugin.length:0}),{config:n,error:null}}function ir(e){return{debug:t=>e.debug(t),info:t=>e.info(t),warn:t=>e.warning(t),error:t=>e.error(t)}}function ar(e){let{token:t,logger:n}=e;return n.debug(`Creating GitHub client with token`),Te(t,{log:ir(n)})}async function or(e,t){try{let{data:n}=await e.rest.users.getAuthenticated();return t.debug(`Authenticated as`,{login:n.login,type:n.type}),n.login}catch{return t.debug(`Failed to get authenticated user, may be app token`),`fro-bot[bot]`}}async function sr(e,t,n,r){let i=t??n,a=t==null?n.length>0?`github-token`:`none`:`app-token`;if(i.length===0)return r.warning(`No GitHub token available`),{authenticated:!1,method:`none`,botLogin:null};V.env.GH_TOKEN=i,r.info(`Configured authentication`,{method:a});let o=null;return e!=null&&(o=await or(e,r)),{authenticated:!0,method:a,botLogin:o}}async function cr(e,t){let n=await t.getExecOutput(`git`,[`config`,e],{ignoreReturnCode:!0,silent:!0});return n.exitCode===0&&n.stdout.trim().length>0?n.stdout.trim():null}async function lr(e,t,n,r){let i=await cr(`user.name`,r),a=await cr(`user.email`,r);if(i!=null&&a!=null){n.info(`Git identity already configured`,{name:i,email:a});return}if(t==null)throw Error(`Cannot configure Git identity: no authenticated GitHub user`);let o=null;if(a==null){let r=await Vt(e,t,n);if(r==null)throw Error(`Cannot configure Git identity: failed to look up user ID for '${t}'`);o=String(r.id)}i??await r.exec(`git`,[`config`,`--global`,`user.name`,t],void 0);let s=`${o}+${t}@users.noreply.github.com`;a??await r.exec(`git`,[`config`,`--global`,`user.email`,s],void 0),n.info(`Configured git identity`,{name:i??t,email:a??s})}const ur=new Set([`__proto__`,`prototype`,`constructor`]);function dr(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function fr(e,t){let n=Object.create(null);for(let[t,r]of Object.entries(e))ur.has(t)||(n[t]=r);for(let[e,r]of Object.entries(t)){if(ur.has(e))continue;let t=n[e];dr(r)&&dr(t)?n[e]=fr(t,r):n[e]=r}return n}async function pr(e,t,n){let r=JSON.parse(e);if(!dr(r))throw Error(`omo-config must be a JSON object (non-null, non-array)`);let i=r;await W.mkdir(t,{recursive:!0});let a=G.join(t,`oh-my-openagent.json`),o={};try{let e=await W.readFile(a,`utf8`),t=JSON.parse(e);typeof t==`object`&&t&&!Array.isArray(t)&&(o=t)}catch(e){n.debug(`Using empty base oMo config`,{path:a,error:String(e)})}let s=fr(o,i),c=JSON.stringify(s,null,2);await W.writeFile(a,c);let l=G.join(t,`oh-my-opencode.json`);await W.writeFile(l,c),n.info(`Wrote oMo config`,{path:a,legacyPath:l,keyCount:Object.keys(i).length})}async function mr(e,t,n={}){let{logger:r,execAdapter:i}=t,{claude:a=`no`,copilot:o=`no`,gemini:s=`no`,openai:c=`no`,opencodeZen:l=`no`,zaiCodingPlan:u=`no`,kimiForCoding:d=`no`}=n;r.info(`Installing Oh My OpenAgent plugin`,{version:e,claude:a,copilot:o,gemini:s,openai:c,opencodeZen:l,zaiCodingPlan:u,kimiForCoding:d});let f=``,p=[`oh-my-openagent@${e}`,`install`,`--no-tui`,`--skip-auth`,`--claude=${a}`,`--copilot=${o}`,`--gemini=${s}`,`--openai=${c}`,`--opencode-zen=${l}`,`--zai-coding-plan=${u}`,`--kimi-for-coding=${d}`];try{let t=await i.exec(`bunx`,p,{listeners:{stdout:e=>{f+=e.toString()},stderr:e=>{f+=e.toString()}},ignoreReturnCode:!0});if(t!==0){let e=`bunx oh-my-openagent install returned exit code ${t}`;return r.error(e,{output:f.slice(0,1e3)}),{installed:!1,version:null,error:`${e}\n${f.slice(0,500)}`}}let n=/oh-my-opencode@(\d+\.\d+\.\d+)/i.exec(f),a=n!=null&&n[1]!=null?n[1]:e;return r.info(`oMo plugin installed`,{version:a}),{installed:!0,version:a,error:null}}catch(e){let t=_(e),n=f.length>0?`${t}\nOutput: ${f.slice(0,500)}`:t;return r.error(`Failed to run oMo installer`,{error:t,output:f.slice(0,500)}),{installed:!1,version:null,error:`bunx oh-my-openagent install failed: ${n}`}}}const hr=`opencode`,gr=d;function _r(){let e=Ue.platform(),t=Ue.arch(),n={darwin:`darwin`,linux:`linux`,win32:`windows`},r={x64:`x64`,arm64:`arm64`},i=e===`win32`||e===`darwin`?`.zip`:`.tar.gz`;return{os:n[e]??`linux`,arch:r[t]??`x64`,ext:i}}function vr(e,t){return`https://github.com/anomalyco/opencode/releases/download/${e.startsWith(`v`)?e:`v${e}`}/${`opencode-${t.os}-${t.arch}${t.ext}`}`}async function yr(e,t,n,r){if(V.platform===`win32`)return!0;try{let{stdout:i}=await r.getExecOutput(`file`,[e],{silent:!0}),a=(t===`.zip`?[`Zip archive`,`ZIP`]:[`gzip`,`tar`,`compressed`]).some(e=>i.includes(e));return a||n.warning(`Download validation failed`,{output:i.trim()}),a}catch{return n.debug(`Could not validate download (file command unavailable)`),!0}}async function br(e,t,n,r,i=gr){let a=_r(),o=n.find(hr,e,a.arch);if(o.length>0)return t.info(`OpenCode found in cache`,{version:e,path:o}),{path:o,version:e,cached:!0};try{return await xr(e,a,t,n,r)}catch(n){t.warning(`Primary version install failed, trying fallback`,{requestedVersion:e,fallbackVersion:i,error:_(n)})}if(e!==i)try{let e=await xr(i,a,t,n,r);return t.info(`Installed fallback version`,{version:i}),e}catch(t){throw Error(`Failed to install OpenCode (tried ${e} and ${i}): ${_(t)}`)}throw Error(`Failed to install OpenCode version ${e}`)}async function xr(e,t,n,r,i){n.info(`Downloading OpenCode`,{version:e});let a=vr(e,t),o=await r.downloadTool(a);if(!await yr(o,t.ext,n,i))throw Error(`Downloaded archive appears corrupted`);n.info(`Extracting OpenCode`);let s=t.ext===`.zip`?await r.extractZip(o):await r.extractTar(o);n.info(`Caching OpenCode`);let c=await r.cacheDir(s,hr,e,t.arch);return n.info(`OpenCode installed`,{version:e,path:c}),{path:c,version:e,cached:!1}}async function Sr(e){let t=await fetch(`https://api.github.com/repos/anomalyco/opencode/releases/latest`);if(!t.ok)throw Error(`Failed to fetch latest OpenCode version: ${t.statusText}`);let n=(await t.json()).tag_name.replace(/^v/,``);return e.info(`Latest OpenCode version`,{version:n}),n}function Cr(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function wr(e,t,n){let r=JSON.parse(e);if(!Cr(r))throw Error(`systematic-config must be a JSON object (non-null, non-array)`);await W.mkdir(t,{recursive:!0});let i=G.join(t,`systematic.json`),a={};try{let e=await W.readFile(i,`utf8`),t=JSON.parse(e);Cr(t)&&(a=t)}catch(e){n.debug(`Using empty base Systematic config`,{path:i,error:String(e)})}let o=fr(a,r);await W.writeFile(i,JSON.stringify(o,null,2)),n.info(`Wrote Systematic config`,{path:i,keyCount:Object.keys(r).length})}const Tr={restoreCache:async(e,t,n)=>ge(e,t,n),saveCache:async(e,t)=>Se(e,t)};function Er(e){let{os:t,opencodeVersion:n,omoVersion:r,systematicVersion:i}=e;return`${T}-${t}-oc-${n}-omo-${r}-sys-${i}`}function Dr(e){let{os:t,opencodeVersion:n,omoVersion:r,systematicVersion:i}=e;return[`${T}-${t}-oc-${n}-omo-${r}-sys-${i}-`]}async function Or(e){let{logger:t,os:n,opencodeVersion:r,omoVersion:i,systematicVersion:a,toolCachePath:o,bunCachePath:s,omoConfigPath:c,opencodeCachePath:l,cacheAdapter:u=Tr}=e,d=Er({os:n,opencodeVersion:r,omoVersion:i,systematicVersion:a}),f=Dr({os:n,opencodeVersion:r,omoVersion:i,systematicVersion:a}),p=[o,s,c,l];t.info(`Restoring tools cache`,{primaryKey:d,restoreKeys:[...f],paths:p});try{let e=await u.restoreCache(p,d,[...f]);return e==null?(t.info(`Tools cache miss - will install tools`),{hit:!1,restoredKey:null}):(t.info(`Tools cache restored`,{restoredKey:e}),{hit:!0,restoredKey:e})}catch(e){return t.warning(`Tools cache restore failed`,{error:_(e)}),{hit:!1,restoredKey:null}}}async function kr(e){let{logger:t,os:n,opencodeVersion:r,omoVersion:i,systematicVersion:a,toolCachePath:o,bunCachePath:s,omoConfigPath:c,opencodeCachePath:l,cacheAdapter:u=Tr}=e,d=Er({os:n,opencodeVersion:r,omoVersion:i,systematicVersion:a}),f=[o,s,c,l];t.info(`Saving tools cache`,{saveKey:d,paths:f});try{return await u.saveCache(f,d),t.info(`Tools cache saved`,{saveKey:d}),!0}catch(e){return e instanceof Error&&e.message.includes(`already exists`)?(t.info(`Tools cache key already exists, skipping save`),!0):(t.warning(`Tools cache save failed`,{error:_(e)}),!1)}}async function Ar(e,t){let n=Date.now(),r=N({component:`setup`}),i=qn(),a=Jn();try{r.info(`Starting setup`,{version:e.opencodeVersion});let o;try{o=Yn(e.authJson)}catch(e){return M(`Invalid auth-json: ${_(e)}`),null}let s=e.opencodeVersion;if(s===`latest`)try{s=await Sr(r)}catch(e){r.warning(`Failed to get latest version, using fallback`,{error:_(e)}),s=gr}let l=e.omoVersion,u=e.systematicVersion,d=V.env.RUNNER_TOOL_CACHE??`/opt/hostedtoolcache`,p=q(d,`opencode`),m=q(d,`bun`),h=q(We(),`.config`,`opencode`),g=q(We(),`.cache`,`opencode`),y=f(),b=await Or({logger:r,os:y,opencodeVersion:s,omoVersion:l,systematicVersion:u,toolCachePath:p,bunCachePath:m,omoConfigPath:h,opencodeCachePath:g}),x=b.hit?`hit`:`miss`,S,C=!1,w=null;if(b.hit){let e=i.find(`opencode`,s);e.length>0?(S={path:e,version:s,cached:!0},r.info(`Tools cache hit, using cached OpenCode CLI`,{version:s,omoVersion:l})):r.warning(`Tools cache hit but binary not found in tool-cache, falling through to install`,{requestedVersion:s,restoredKey:b.restoredKey})}if(S==null)try{S=await br(s,r,i,a)}catch(e){return M(`Failed to install OpenCode: ${_(e)}`),null}let T=!1;try{await $n(r,i,a,xe,c),T=!0}catch(e){r.warning(`Bun installation failed, oMo will be unavailable`,{error:_(e)})}if(k(`OMO_SEND_ANONYMOUS_TELEMETRY`,`0`),k(`OMO_DISABLE_POSTHOG`,`1`),T){if(e.omoConfig!=null)try{await pr(e.omoConfig,h,r)}catch(e){r.warning(`Failed to write omo-config, continuing without custom config`,{error:_(e)})}if(e.systematicConfig!=null)try{await wr(e.systematicConfig,h,r)}catch(e){r.warning(`systematic-config write failed: ${_(e)}`)}let t=await mr(l,{logger:r,execAdapter:a},e.omoProviders);t.installed?(r.info(`oMo installed`,{version:t.version}),C=!0):r.warning(`oMo installation failed, continuing without oMo`,{error:t.error??`unknown error`}),w=t.error}let E=rr({opencodeConfig:e.opencodeConfig,systematicVersion:u},r);if(E.error!=null)return M(E.error),null;let D=q(h,`opencode.json`),O={};try{let e=await Be(D,`utf8`),t=JSON.parse(e);typeof t==`object`&&t&&!Array.isArray(t)&&(O=t)}catch{}delete O.plugins;let ee=(e=>e.map(e=>typeof e==`string`&&(e===`oh-my-openagent`||e===`oh-my-openagent@latest`)?`oh-my-openagent@${l}`:e))(Array.isArray(O.plugin)?O.plugin:[]),te=Array.isArray(E.config.plugin)?E.config.plugin:[],A=[...ee];for(let e of te){if(typeof e!=`string`)continue;let t=e.split(`@`).slice(0,e.startsWith(`@`)?2:1).join(`@`);A.some(e=>typeof e==`string`&&e.startsWith(t))||A.push(e)}let ne={...O,...E.config,plugin:A},re=JSON.stringify(ne,null,2);k(`OPENCODE_CONFIG_CONTENT`,re),await Ve(D,re),r.info(`Wrote merged OpenCode config`,{path:D,pluginCount:A.length,plugins:A}),b.hit||await kr({logger:r,os:y,opencodeVersion:s,omoVersion:l,systematicVersion:u,toolCachePath:p,bunCachePath:m,omoConfigPath:h,opencodeCachePath:g}),xe(S.path),P(`opencode-path`,S.path),P(`opencode-version`,S.version),r.info(`OpenCode ready`,{version:S.version,cached:S.cached});let j=Te(t),ie=await sr(j,null,t,r);k(`GH_TOKEN`,t),r.info(`GitHub CLI configured`),await lr(j,ie.botLogin,r,a);let N=q(v(),`opencode`),ae=await Xn(o,N,r);P(`auth-json-path`,ae),r.info(`auth.json populated`,{path:ae});let oe=Date.now()-n,se={opencodePath:S.path,opencodeVersion:S.version,ghAuthenticated:ie.authenticated,omoInstalled:C,omoError:w,toolsCacheStatus:x,duration:oe};return r.info(`Setup complete`,{duration:oe}),se}catch(e){let t=_(e);return r.error(`Setup failed`,{error:t}),M(t),null}}const jr={verifyOpenCodeAvailable:async(e,t)=>{let n=e??`opencode`;try{let e=``;await F(n,[`--version`],{listeners:{stdout:t=>{e+=t.toString()}},silent:!0});let r=/(\d+\.\d+\.\d+)/.exec(e)?.[1]??null;return t.debug(`OpenCode version verified`,{version:r}),{available:!0,version:r}}catch{return t.debug(`OpenCode not available, will attempt auto-setup`),{available:!1,version:null}}},runSetup:async(e,t)=>Ar(e,t),addToPath:e=>{xe(e)}};async function Mr(e,t){return Oe(e,t)}async function Nr(e){return y(e,jr)}async function Pr(e,t){let n={repo:e.agentContext.repo,commentId:e.agentContext.commentId,issueNumber:e.agentContext.issueNumber,issueType:e.agentContext.issueType,botLogin:e.botLogin},r=N({phase:`acknowledgment`});return await yn(e.githubClient,n,r),t.debug(`Acknowledgment phase completed`),n}function Fr(e,t){try{JSON.parse(e)}catch{throw Error(`${t} must be valid JSON`)}}function Ir(e,t){let n=e.trim();if(!/^\d+$/.test(n))throw Error(`${t} must be a positive integer, received: ${e}`);let r=Number.parseInt(n,10);if(r===0)throw Error(`${t} must be a positive integer, received: ${e}`);return r}function Lr(e){let t=e.trim(),n=t.indexOf(`/`);if(n===-1)throw Error(`Invalid model format: "${e}". Expected "provider/model" (e.g., "anthropic/claude-sonnet-4-20250514")`);let r=t.slice(0,n).trim(),i=t.slice(n+1).trim();if(r.length===0)throw Error(`Invalid model format: "${e}". Provider cannot be empty.`);if(i.length===0)throw Error(`Invalid model format: "${e}". Model ID cannot be empty.`);return{providerID:r,modelID:i}}function Rr(e,t=`timeout`){let n=e.trim();if(!/^\d+$/.test(n))throw Error(`${t} must be a non-negative integer, received: ${e}`);let r=Number.parseInt(n,10);if(Number.isNaN(r)||r<0)throw Error(`${t} must be a non-negative integer, received: ${e}`);return r}const zr=[`claude`,`claude-max20`,`copilot`,`gemini`,`openai`,`opencode-zen`,`zai-coding-plan`,`kimi-for-coding`],Br=[`auto`,`working-dir`,`branch-pr`];function Vr(e){let t=e.split(`,`).map(e=>e.trim().toLowerCase()).filter(e=>e.length>0),n=`no`,r=`no`,i=`no`,a=`no`,o=`no`,s=`no`,c=`no`;for(let e of t){if(!zr.includes(e))throw Error(`Invalid omo-providers value: "${e}". Valid values: ${zr.join(`, `)}`);switch(e){case`claude`:n=`yes`;break;case`claude-max20`:n=`max20`;break;case`copilot`:r=`yes`;break;case`gemini`:i=`yes`;break;case`openai`:a=`yes`;break;case`opencode-zen`:o=`yes`;break;case`zai-coding-plan`:s=`yes`;break;case`kimi-for-coding`:c=`yes`;break}}return{claude:n,copilot:r,gemini:i,openai:a,opencodeZen:o,zaiCodingPlan:s,kimiForCoding:c}}function Hr(e){return typeof e==`object`&&!!e}function Ur(e){if(Hr(e)===!1)return!1;let t=e.pull_request;if(Hr(t)===!1)return!1;let n=t.head;if(Hr(n)===!1)return!1;let r=n.repo;return Hr(r)===!1?!1:r.fork===!0}function Wr(e){if(e.length!==0){if(e===`aws:kms`||e===`AES256`)return e;throw Error(`s3-sse-encryption must be either 'aws:kms' or 'AES256'`)}}function Gr(){try{let e=V.env.AWS_ACCESS_KEY_ID?.trim()??``;e.length>0&&ve(e);let t=V.env.AWS_SECRET_ACCESS_KEY?.trim()??``;t.length>0&&ve(t);let n=R(`github-token`,{required:!0}).trim();if(n.length===0)return De(Error(`github-token is required but was not provided`));let r=R(`auth-json`,{required:!0}).trim();if(r.length===0)return De(Error(`auth-json is required but was not provided`));Fr(r,`auth-json`);let i=R(`prompt`).trim(),a=i.length>0?i:null,o=R(`output-mode`).trim().toLowerCase(),c=o.length>0?Kr(o):`auto`,l=R(`session-retention`).trim(),f=l.length>0?Ir(l,`session-retention`):50,p=R(`s3-backup`).trim().toLowerCase()===`true`,m=R(`s3-bucket`).trim(),h=m.length>0?m:``,g=R(`aws-region`).trim(),_=g.length>0?g:``,v=R(`s3-endpoint`).trim(),y=v.length>0?v:void 0,b=R(`s3-prefix`).trim(),w=b.length>0?b:ye,T=R(`s3-expected-bucket-owner`).trim(),D=T.length>0?T:void 0,ee=R(`s3-allow-insecure-endpoint`).trim().toLowerCase()===`true`,te=R(`s3-sse-kms-key-id`).trim(),k=te.length>0?te:void 0,A={enabled:p,bucket:h,region:_,prefix:w,endpoint:y,expectedBucketOwner:D,allowInsecureEndpoint:ee,sseEncryption:Wr(R(`s3-sse-encryption`).trim()),sseKmsKeyId:k};if(A.enabled){if(A.bucket.length===0)throw Error(`s3-bucket is required when s3-backup is enabled`);let e=O(A.prefix);if(!e.success)throw e.error;if(A.endpoint!=null){let e=ae(A.endpoint,A.allowInsecureEndpoint===!0);if(!e.success)throw e.error}Ur(ue.payload)&&(pe(`S3 object store is disabled for fork pull requests`),A={...A,enabled:!1})}let ne=R(`agent`).trim(),re=ne.length>0?ne:C,j=R(`model`).trim(),M=j.length>0?Lr(j):null,ie=R(`timeout`).trim(),N=ie.length>0?Rr(ie):E,P=R(`opencode-version`).trim(),oe=P.length>0?P:d,se=R(`skip-cache`).trim().toLowerCase()===`true`,F=R(`omo-version`).trim(),ce=F.length>0?F:s,I=R(`systematic-version`).trim(),le=I.length>0?I:u,L=R(`omo-providers`).trim(),de=Vr(L.length>0?L:``),fe=R(`opencode-config`).trim(),me=fe.length>0?fe:null,he=R(`systematic-config`).trim(),ge=he.length>0?he:null,_e=R(`dedup-window`).trim(),be=_e.length>0?Rr(_e,`dedup-window`):S;if(me!=null){Fr(me,`opencode-config`);let e=JSON.parse(me);if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Input 'opencode-config' must be a JSON object`)}return x({githubToken:n,authJson:r,prompt:a,outputMode:c,sessionRetention:f,storeConfig:A,agent:re,model:M,timeoutMs:N,opencodeVersion:oe,skipCache:se,omoVersion:ce,systematicVersion:le,omoProviders:de,opencodeConfig:me,systematicConfig:ge,dedupWindow:be})}catch(e){return De(e instanceof Error?e:Error(String(e)))}}function Kr(e){switch(e){case`auto`:case`working-dir`:case`branch-pr`:return e;default:throw Error(`Invalid output-mode value: "${e}". Valid values: ${Br.join(`, `)}`)}}async function qr(e){let t=Gr();if(!t.success)return M(`Invalid inputs: ${t.error.message}`),null;let n=t.data,r=N({phase:`main`});r.info(`Action inputs parsed`,{sessionRetention:n.sessionRetention,s3Backup:n.storeConfig.enabled,hasGithubToken:n.githubToken.length>0,hasPrompt:n.prompt!=null,outputMode:n.outputMode,agent:n.agent,hasModelOverride:n.model!=null,timeoutMs:n.timeoutMs});let i=await Nr({logger:r,opencodeVersion:n.opencodeVersion,githubToken:n.githubToken,authJson:n.authJson,omoVersion:n.omoVersion,systematicVersion:n.systematicVersion,omoProviders:n.omoProviders,opencodeConfig:n.opencodeConfig,systematicConfig:n.systematicConfig});return i.didSetup?r.info(`OpenCode auto-setup completed`,{version:i.version}):r.info(`OpenCode already available`,{version:i.version}),z(j.OPENCODE_VERSION,i.version),z(j.S3_ENABLED,String(n.storeConfig.enabled)),z(j.S3_BUCKET,n.storeConfig.bucket),z(j.S3_REGION,n.storeConfig.region),z(j.S3_PREFIX,n.storeConfig.prefix),z(j.S3_ENDPOINT,n.storeConfig.endpoint??``),z(j.S3_EXPECTED_BUCKET_OWNER,n.storeConfig.expectedBucketOwner??``),z(j.S3_ALLOW_INSECURE_ENDPOINT,String(n.storeConfig.allowInsecureEndpoint===!0)),z(j.S3_SSE_ENCRYPTION,n.storeConfig.sseEncryption??``),z(j.S3_SSE_KMS_KEY_ID,n.storeConfig.sseKmsKeyId??``),e.debug(`Bootstrap phase completed`,{opencodeVersion:i.version}),{inputs:n,logger:r,opencodeResult:i}}const Jr=/^[0-9a-f]{40}$/i;function Yr(){return{exec:F,getExecOutput:oe}}async function Xr(e){let{workspacePath:t,logger:n,execAdapter:r=Yr()}=e,i=G.join(t,`.git`),a=G.join(i,`opencode`);try{let e=(await W.readFile(a,`utf8`)).trim();if(e.length>0){if(Jr.test(e))return n.debug(`Project ID loaded from cache`,{projectId:e}),{projectId:e,source:`cached`};n.warning(`Invalid cached project ID format, regenerating`,{cachedId:e})}}catch(e){n.debug(`No cached project ID found`,{error:_(e)})}try{let e=await W.readFile(i,`utf8`),n=/^gitdir: (.+)$/m.exec(e);if(n==null)return{projectId:null,source:`error`,error:`Invalid .git file format`};i=G.resolve(t,n[1]),a=G.join(i,`opencode`)}catch(e){if((typeof e==`object`?e.code:void 0)!==`EISDIR`)return{projectId:null,source:`error`,error:`Not a git repository`}}try{let{stdout:e,exitCode:i}=await r.getExecOutput(`git`,[`rev-list`,`--max-parents=0`,`--all`],{cwd:t,silent:!0});if(i!==0||e.trim().length===0)return{projectId:null,source:`error`,error:`No commits found in repository`};let o=e.trim().split(` +`).map(e=>e.trim()).filter(e=>e.length>0).sort();if(o.length===0)return{projectId:null,source:`error`,error:`No root commits found`};let s=o[0];try{await W.writeFile(a,s,{encoding:`utf8`,flag:`wx`}),n.info(`Project ID generated and cached`,{projectId:s,source:`generated`})}catch(e){(typeof e==`object`?e.code:void 0)===`EEXIST`?n.debug(`Project ID file already written by concurrent process, skipping`,{projectId:s}):n.warning(`Failed to cache project ID (continuing)`,{error:_(e)})}return{projectId:s,source:`generated`}}catch(e){return{projectId:null,source:`error`,error:_(e)}}}async function Zr(e,t){let n=te(),r=N({phase:`cache`}),i=m(),a=G.join(i,`.git`,`opencode`),o=await be({components:n,logger:r,storagePath:l(),authPath:g(),projectIdPath:a,opencodeVersion:e.opencodeResult.version,storeConfig:e.inputs.storeConfig}),s=o.corrupted?`corrupted`:o.hit?`hit`:`miss`;t.setCacheStatus(s),t.setCacheSource(o.source),e.logger.info(`Cache restore completed`,{cacheStatus:s,key:o.key});let c=await Xr({workspacePath:i,logger:r});c.source===`error`?r.warning(`Failed to generate project ID (continuing)`,{error:c.error}):r.debug(`Project ID ready`,{projectId:c.projectId,source:c.source});let u=N({phase:`server-bootstrap`}),d=await Mr(new AbortController().signal,u);if(!d.success)return M(`OpenCode server bootstrap failed: ${d.error.message}`),null;let f=d.data;return u.info(`SDK server bootstrapped successfully`),{cacheResult:o,cacheStatus:s,serverHandle:f}}const Qr={markdownImage:/!\[([^\]]*)\]\((https:\/\/github\.com\/user-attachments\/assets\/[^)]+)\)/gi,markdownLink:/\[([^\]]+)\]\((https:\/\/github\.com\/user-attachments\/files\/[^)]+)\)/gi,htmlImage:/]*src=["'](https:\/\/github\.com\/user-attachments\/assets\/[^"']+)["'][^>]*>/gi};function $r(e,t,n){e.lastIndex=0;let r=e.exec(t);for(;r!=null;)n(r),r=e.exec(t);e.lastIndex=0}function ei(e){let t=[],n=new Set;return $r(Qr.markdownImage,e,e=>{let r=e[2],i=e[1],a=e[0];r!=null&&i!=null&&!n.has(r)&&on(r)&&(n.add(r),t.push({url:r,originalMarkdown:a,altText:i,type:`image`}))}),$r(Qr.markdownLink,e,e=>{let r=e[2],i=e[1],a=e[0];r!=null&&i!=null&&!n.has(r)&&on(r)&&(n.add(r),t.push({url:r,originalMarkdown:a,altText:i,type:`file`}))}),$r(Qr.htmlImage,e,e=>{let r=e[1],i=e[0];if(r!=null&&!n.has(r)&&on(r)){n.add(r);let e=/alt=["']([^"']*)["']/i.exec(i);t.push({url:r,originalMarkdown:i,altText:e?.[1]??``,type:`image`})}}),Qr.htmlImage.lastIndex=0,t}function ti(e,t,n){try{let r=new URL(e).pathname.split(`/`).at(-1);if(r!=null&&/\.[a-z0-9]+$/i.test(r))return r;if(t.trim().length>0){let e=t.replaceAll(/[^\w.-]/g,`_`).slice(0,50);return e.trim().length>0?e:`attachment_${n+1}`}return`attachment_${n+1}`}catch{return`attachment_${n+1}`}}const ni={maxFiles:5,maxFileSizeBytes:5*1024*1024,maxTotalSizeBytes:15*1024*1024,allowedMimeTypes:[`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`image/svg+xml`,`text/plain`,`text/markdown`,`text/csv`,`application/json`,`application/pdf`]},ri=[`github.com`,`githubusercontent.com`];async function ii(e,t,n,r,i){i.debug(`Downloading attachment`,{url:e.url});try{let a=await fetch(e.url,{headers:{Authorization:`Bearer ${n}`,Accept:`*/*`,"User-Agent":`fro-bot-agent`},redirect:`manual`}),o=a;if(a.status>=300&&a.status<400){let t=a.headers.get(`location`);if(t==null)return i.warning(`Redirect without location`,{url:e.url}),null;let n=new URL(t);if(!ri.some(e=>n.hostname===e||n.hostname.endsWith(`.${e}`)))return i.warning(`Redirect to non-GitHub host blocked`,{url:e.url,redirectTo:n.hostname}),null;o=await fetch(t,{headers:{Accept:`*/*`,"User-Agent":`fro-bot-agent`},redirect:`follow`})}if(!o.ok)return i.warning(`Attachment download failed`,{url:e.url,status:o.status}),null;let s=o.headers.get(`content-length`);if(s!=null){let t=Number.parseInt(s,10);if(t>r.maxFileSizeBytes)return i.warning(`Attachment exceeds size limit (Content-Length)`,{url:e.url,size:t,limit:r.maxFileSizeBytes}),null}let c=Fe.from(await o.arrayBuffer());if(c.length>r.maxFileSizeBytes)return i.warning(`Attachment exceeds size limit`,{url:e.url,size:c.length,limit:r.maxFileSizeBytes}),null;let l=o.headers.get(`content-type`)??`application/octet-stream`,u=ti(e.url,e.altText,t),d=l.split(`;`)[0],f=d==null?`application/octet-stream`:d.trim(),p=await W.mkdtemp(G.join(He.tmpdir(),`fro-bot-attachments-`)),m=u.trim().length>0?u:`attachment_${t+1}`,h=G.join(p,m);return await W.writeFile(h,c),i.debug(`Attachment downloaded`,{filename:u,mime:f,sizeBytes:c.length,tempPath:h}),{url:e.url,filename:u,mime:f,sizeBytes:c.length,tempPath:h}}catch(t){return i.warning(`Attachment download error`,{url:e.url,error:_(t)}),null}}async function ai(e,t,n=ni,r){return Promise.all(e.map(async(e,i)=>ii(e,i,t,n,r)))}async function oi(e,t){for(let n of e)try{await W.unlink(n);let e=G.dirname(n);await W.rmdir(e).catch(()=>{})}catch(e){t.debug(`Failed to cleanup temp file`,{path:n,error:_(e)})}}function si(e){return e.map(e=>({type:`file`,mime:e.mime,url:Re(e.tempPath).toString(),filename:e.filename}))}function ci(e,t,n){let r=e,i=new Set(n.map(e=>e.filename));for(let e of t){let t=n.find(e=>i.has(e.filename));t!=null&&(r=r.replace(e.originalMarkdown,`@${t.filename}`))}return r}function li(e,t,n,r){return{processed:n,skipped:r,modifiedBody:ci(e,t,n),fileParts:si(n),tempFiles:n.map(e=>e.tempPath)}}function ui(e,t=ni,n){let r=[],i=[],a=0;for(let o of e)if(o!=null){if(r.length>=t.maxFiles){i.push({url:o.url,reason:`Exceeds max file count (${t.maxFiles})`}),n.debug(`Attachment skipped: max count`,{url:o.url});continue}if(o.sizeBytes>t.maxFileSizeBytes){i.push({url:o.url,reason:`File too large (${L(o.sizeBytes)} > ${L(t.maxFileSizeBytes)})`}),n.debug(`Attachment skipped: too large`,{url:o.url,size:o.sizeBytes});continue}if(a+o.sizeBytes>t.maxTotalSizeBytes){i.push({url:o.url,reason:`Would exceed total size limit (${L(t.maxTotalSizeBytes)})`}),n.debug(`Attachment skipped: total size exceeded`,{url:o.url});continue}if(!di(o.mime,t.allowedMimeTypes)){i.push({url:o.url,reason:`MIME type not allowed: ${o.mime}`}),n.debug(`Attachment skipped: MIME type`,{url:o.url,mime:o.mime});continue}a+=o.sizeBytes,r.push({filename:o.filename,mime:o.mime,sizeBytes:o.sizeBytes,tempPath:o.tempPath}),n.info(`Attachment validated`,{filename:o.filename,mime:o.mime,sizeBytes:o.sizeBytes})}return{validated:r,skipped:i}}function di(e,t){let[n]=e.split(`/`);for(let r of t)if(r===e||r.endsWith(`/*`)&&n!=null&&n===r.slice(0,-2))return!0;return!1}function fi(e){let t=G.resolve(e);return t.endsWith(G.sep)&&t.length>1?t.slice(0,-1):t}async function pi(e){let{bootstrapLogger:t,reactionCtx:n,githubClient:r,agentSuccess:i,attachmentResult:a,serverHandle:s,detectedOpencodeVersion:c,storeConfig:u,metrics:d,agentIdentity:f,repo:h,runId:_}=e;try{if(a!=null){let e=N({phase:`attachment-cleanup`});await oi(a.tempFiles,e)}n!=null&&r!=null&&await Tn(r,n,i,N({phase:`cleanup`}));let e=N({phase:`prune`}),v=m();if(s!=null){let t=fi(v),n=await pt(s.client,t,ft,e);n.prunedCount>0&&e.info(`Pruned old sessions`,{pruned:n.prunedCount,remaining:n.remainingCount})}if(s!=null)try{s.shutdown()}catch(e){t.warning(`Server shutdown failed (non-fatal)`,{error:e instanceof Error?e.message:String(e)})}if(u.enabled===!0){let e=N({phase:`object-store-artifacts`});try{let t=_e(u,e),n=await fe(t,u,f,h,_,o(),e),r=d.getMetrics(),i=[...new Set([...r.sessionsUsed,...r.sessionsCreated])];await se(t,u,f,h,_,{runId:_,timestamp:new Date().toISOString(),tokenUsage:r.tokenUsage,timing:{startTime:r.startTime,endTime:r.endTime,duration:r.duration},cacheStatus:r.cacheStatus,cacheSource:r.cacheSource,sessionIds:i,sessionsUsed:r.sessionsUsed,sessionsCreated:r.sessionsCreated,prsCreated:r.prsCreated,commitsCreated:r.commitsCreated,commentsPosted:r.commentsPosted,model:r.model,cost:r.cost,errors:r.errors,artifactUpload:n},e)}catch(t){e.warning(`Object store artifact or metadata sync failed (non-fatal)`,{error:t instanceof Error?t.message:String(t)})}}let y=te(),b=N({phase:`cache-save`}),x=G.join(v,`.git`,`opencode`);if(await me({components:y,runId:p(),logger:b,storagePath:l(),authPath:g(),projectIdPath:x,opencodeVersion:c,storeConfig:u})&&z(j.CACHE_SAVED,`true`),Ae()){let e=N({phase:`artifact-upload`});await Ce({logPath:o(),runId:p(),runAttempt:le(),logger:e})&&z(j.ARTIFACT_UPLOADED,`true`)}}catch(e){t.warning(`Cleanup failed (non-fatal)`,{error:e instanceof Error?e.message:String(e)})}}const mi=G.join(Ue.homedir(),`.cache`,`fro-bot-dedup`);function hi(e){return e.replaceAll(`/`,`-`)}function gi(e,t){let n=hi(e);return G.join(mi,`${n}-${t.entityType}-${t.entityNumber}`)}function _i(e,t){return`${n}-${hi(e)}-${t.entityType}-${t.entityNumber}-`}function vi(e,t,n){return`${_i(e,t)}${n}`}async function yi(e,t,n,r=ce){let i=gi(e,t),a=G.join(i,`sentinel.json`),o=_i(e,t);try{if(await W.rm(i,{recursive:!0,force:!0}),await W.mkdir(i,{recursive:!0}),await r.restoreCache([i],o,[])==null)return null;let e=await W.readFile(a,`utf8`);return JSON.parse(e)}catch(e){return n.debug(`Dedup marker restore failed; proceeding without marker`,{error:_(e),entityType:t.entityType,entityNumber:t.entityNumber}),null}}async function bi(e,t,n,r,i=ce){let a=gi(e,t),o=G.join(a,`sentinel.json`),s=vi(e,t,n.runId);try{return await W.mkdir(a,{recursive:!0}),await W.writeFile(o,JSON.stringify(n),`utf8`),await i.saveCache([a],s),!0}catch(e){return _(e).toLowerCase().includes(`already exists`)?!0:(r.debug(`Dedup marker save failed`,{error:_(e),entityType:t.entityType,entityNumber:t.entityNumber,saveKey:s}),!1)}}const xi=new Set([`pull_request`,`issues`]),Si=new Set([`synchronize`,`reopened`]);function Ci(e){return e.target==null||!xi.has(e.eventType)?null:e.eventType===`pull_request`&&e.target.kind===`pr`?{entityType:`pr`,entityNumber:e.target.number}:e.eventType===`issues`&&e.target.kind===`issue`?{entityType:`issue`,entityNumber:e.target.number}:null}async function wi(e,t,n,r,i=N({phase:`dedup`}),a){let o=Ci(t);if(e===0)return{shouldProceed:!0,entity:o};if(o==null)return{shouldProceed:!0,entity:null};if(t.action!=null&&Si.has(t.action))return i.debug(`Dedup bypassed for action`,{action:t.action}),{shouldProceed:!0,entity:o};let s=await yi(n,o,i,a);if(s==null||s.runId===t.runId)return{shouldProceed:!0,entity:o};let c=new Date(s.timestamp).getTime();if(Number.isNaN(c))return i.warning(`Dedup marker timestamp is invalid; proceeding without dedup`,{markerTimestamp:s.timestamp}),{shouldProceed:!0,entity:o};let l=Date.now()-c;if(l<-6e4)return i.warning(`Dedup marker timestamp is too far in the future; proceeding without dedup`,{markerTimestamp:s.timestamp,markerAge:l}),{shouldProceed:!0,entity:o};let u=Math.max(0,l);return u>e?{shouldProceed:!0,entity:o}:(i.info(`Skipping duplicate trigger within dedup window`,{eventType:t.eventType,action:t.action,runId:t.runId,markerRunId:s.runId,markerTimestamp:s.timestamp,dedupWindow:e,entityType:o.entityType,entityNumber:o.entityNumber}),jt({sessionId:null,resolvedOutputMode:null,cacheStatus:`miss`,duration:Date.now()-r}),await Ei(t,o,s,u,e,i),{shouldProceed:!1,entity:o})}async function Ti(e,t,n,r=N({phase:`dedup`}),i){await bi(n,t,{timestamp:new Date().toISOString(),runId:e.runId,action:e.action??`unknown`,eventType:e.eventType,entityType:t.entityType,entityNumber:t.entityNumber},r,i)}async function Ei(e,t,n,r,i,a){try{let a=Math.round(r/1e3),o=Math.round(i/1e3),s=`${t.entityType} #${t.entityNumber}`,c=`https://github.com/${e.repo.owner}/${e.repo.repo}/actions/runs/${n.runId}`;B.addHeading(`Fro Bot Agent Run — Skipped (Dedup)`,2).addRaw(`Execution skipped because the agent already ran for **${s}** recently.\n\n`).addTable([[{data:`Detail`,header:!0},{data:`Value`,header:!0}],[`Current action`,`\`${e.eventType}.${e.action??`unknown`}\``],[`Prior run`,`[${n.runId}](${c})`],[`Prior action`,`\`${n.eventType}.${n.action}\``],[`Time since prior run`,`${a}s`],[`Dedup window`,`${o}s`]]).addRaw(` > Dedup is best-effort suppression. Use workflow concurrency groups to prevent overlapping runs. -`),await F.write()}catch(e){a.warning(`Failed to write dedup skip summary`,{error:d(e)})}}async function uo(e,t,n,r,i,o){let s=Ar(t.triggerResult.context.eventType,e.inputs.prompt,e.inputs.outputMode),c={context:t.agentContext,customPrompt:e.inputs.prompt,cacheStatus:n.cacheStatus,sessionContext:{recentSessions:r.recentSessions,priorWorkContext:r.priorWorkContext},logicalKey:r.logicalKey??null,isContinuation:r.isContinuation,currentThreadSessionId:r.continueSessionId??null,triggerContext:t.triggerResult.context,resolvedOutputMode:s,fileParts:r.attachmentResult?.fileParts},l=L.env.SKIP_AGENT_EXECUTION===`true`,u=Date.now(),d;if(l)e.logger.info(`Skipping agent execution (SKIP_AGENT_EXECUTION=true)`),d={success:!0,exitCode:0,sessionId:null,error:null,tokenUsage:null,model:null,cost:null,prsCreated:[],commitsCreated:[],commentsPosted:0,llmError:null,resolvedOutputMode:s};else{let t=T({phase:`execution`});t.info(`Starting OpenCode execution`,{logicalKey:r.logicalKey?.key??null,continueSessionId:r.continueSessionId});let i=await Dr(c,t,{agent:e.inputs.agent,model:e.inputs.model,timeoutMs:e.inputs.timeoutMs,omoProviders:e.inputs.omoProviders,continueSessionId:r.continueSessionId??void 0,sessionTitle:r.sessionTitle??void 0},n.serverHandle),a=i.sessionId;if(a==null){let e=T({phase:`session`}),t=await za(n.serverHandle.client,r.normalizedWorkspace,u,e);t!=null&&(a=t.session.id,e.debug(`Identified session from execution`,{sessionId:a}))}d={...i,sessionId:a,resolvedOutputMode:s},t.info(`Completed OpenCode execution`,{success:d.success,sessionId:d.sessionId,logicalKey:r.logicalKey?.key??null})}d.sessionId!=null&&(D(a.SESSION_ID,d.sessionId),i.addSessionCreated(d.sessionId)),d.tokenUsage!=null&&i.setTokenUsage(d.tokenUsage,d.model,d.cost);for(let e of d.prsCreated)i.addPRCreated(e);for(let e of d.commitsCreated)i.addCommitCreated(e);for(let e=0;e`)}async function mo(e,t,n){try{if(t.type===`pr`){let{data:n}=await e.rest.pulls.get({owner:t.owner,repo:t.repo,pull_number:t.number});return{title:n.title,body:n.body??``,author:n.user?.login??`unknown`}}let{data:n}=await e.rest.issues.get({owner:t.owner,repo:t.repo,issue_number:t.number});return{title:n.title,body:n.body??``,author:n.user?.login??`unknown`}}catch(e){return n.warning(`Failed to fetch issue/PR`,{target:t,error:d(e)}),null}}async function ho(e,t,n,r){let i=[],a=1;for(;a<=50;)try{let{data:r}=await e.rest.issues.listComments({owner:t.owner,repo:t.repo,issue_number:t.number,per_page:100,page:a});if(r.length===0)break;for(let e of r){let t=e.user?.login??`unknown`;i.push({id:e.id,body:e.body??``,author:t,authorAssociation:e.author_association??`NONE`,createdAt:e.created_at,updatedAt:e.updated_at,isBot:po(t,e.body??``,n)})}if(r.length<100)break;a++}catch(e){r.warning(`Failed to fetch comments page`,{target:t,page:a,error:d(e)});break}return i}async function go(e,t,n,r){try{let i=[],a=null,o=null,s=``,c=``,l=`unknown`,u=0;for(;u<50;){let d=(await e.graphql(` +`),await B.write()}catch(e){a.warning(`Failed to write dedup skip summary`,{error:_(e)})}}async function Di(e,t,n,r,i,o){let s=a(t.triggerResult.context.eventType,e.inputs.prompt,e.inputs.outputMode),c={context:t.agentContext,customPrompt:e.inputs.prompt,cacheStatus:n.cacheStatus,sessionContext:{recentSessions:r.recentSessions,priorWorkContext:r.priorWorkContext},logicalKey:r.logicalKey??null,isContinuation:r.isContinuation,currentThreadSessionId:r.continueSessionId??null,triggerContext:t.triggerResult.context,resolvedOutputMode:s,fileParts:r.attachmentResult?.fileParts},l=V.env.SKIP_AGENT_EXECUTION===`true`,u=Date.now(),d;if(l)e.logger.info(`Skipping agent execution (SKIP_AGENT_EXECUTION=true)`),d={success:!0,exitCode:0,sessionId:null,error:null,tokenUsage:null,model:null,cost:null,prsCreated:[],commitsCreated:[],commentsPosted:0,llmError:null,resolvedOutputMode:s};else{let t=N({phase:`execution`});t.info(`Starting OpenCode execution`,{logicalKey:r.logicalKey?.key??null,continueSessionId:r.continueSessionId});let i=await gn(c,t,{agent:e.inputs.agent,model:e.inputs.model,timeoutMs:e.inputs.timeoutMs,omoProviders:e.inputs.omoProviders,continueSessionId:r.continueSessionId??void 0,sessionTitle:r.sessionTitle??void 0},n.serverHandle),a=i.sessionId;if(a==null){let e=N({phase:`session`}),t=await at(n.serverHandle.client,r.normalizedWorkspace,u,e);t!=null&&(a=t.session.id,e.debug(`Identified session from execution`,{sessionId:a}))}d={...i,sessionId:a,resolvedOutputMode:s},t.info(`Completed OpenCode execution`,{success:d.success,sessionId:d.sessionId,logicalKey:r.logicalKey?.key??null})}d.sessionId!=null&&(z(j.SESSION_ID,d.sessionId),i.addSessionCreated(d.sessionId)),d.tokenUsage!=null&&i.setTokenUsage(d.tokenUsage,d.model,d.cost);for(let e of d.prsCreated)i.addPRCreated(e);for(let e of d.commitsCreated)i.addCommitCreated(e);for(let e=0;e ${e.details}`)),e.suggestedAction!=null&&(r.push(``),r.push(`**Suggested action:** ${e.suggestedAction}`)),e.retryable&&(r.push(``),r.push(`_This error is retryable._`)),e.resetTime!=null&&(r.push(``),r.push(`_Rate limit resets at: ${e.resetTime.toISOString()}_`)),r.join(` +`)}function ji(e,t){return t==null?!1:e===t||e===`${t}[bot]`}function Mi(e,t,n){return ji(e,n)&&t.includes(``)}async function Ni(e,t,n){try{if(t.type===`pr`){let{data:n}=await e.rest.pulls.get({owner:t.owner,repo:t.repo,pull_number:t.number});return{title:n.title,body:n.body??``,author:n.user?.login??`unknown`}}let{data:n}=await e.rest.issues.get({owner:t.owner,repo:t.repo,issue_number:t.number});return{title:n.title,body:n.body??``,author:n.user?.login??`unknown`}}catch(e){return n.warning(`Failed to fetch issue/PR`,{target:t,error:_(e)}),null}}async function Pi(e,t,n,r){let i=[],a=1;for(;a<=50;)try{let{data:r}=await e.rest.issues.listComments({owner:t.owner,repo:t.repo,issue_number:t.number,per_page:100,page:a});if(r.length===0)break;for(let e of r){let t=e.user?.login??`unknown`;i.push({id:e.id,body:e.body??``,author:t,authorAssociation:e.author_association??`NONE`,createdAt:e.created_at,updatedAt:e.updated_at,isBot:Mi(t,e.body??``,n)})}if(r.length<100)break;a++}catch(e){r.warning(`Failed to fetch comments page`,{target:t,page:a,error:_(e)});break}return i}async function Fi(e,t,n,r){try{let i=[],a=null,o=null,s=``,c=``,l=`unknown`,u=0;for(;u<50;){let d=(await e.graphql(` query GetDiscussion($owner: String!, $repo: String!, $number: Int!, $after: String) { repository(owner: $owner, name: $repo) { discussion(number: $number) { @@ -228,7 +147,7 @@ If you had completed the task, confirm the completion.`,u=g.length>0?g:void 0,f= } } } -`,{owner:t.owner,repo:t.repo,number:t.number,after:a})).repository.discussion;if(d==null)return r.debug(`Discussion not found`,{target:t}),null;u===0&&(o=d.id,s=d.title,c=d.body,l=d.author?.login??`unknown`);for(let e of d.comments.nodes){let t=e.author?.login??`unknown`;i.push({id:e.id,body:e.body,author:t,authorAssociation:`NONE`,createdAt:e.createdAt,updatedAt:e.updatedAt,isBot:po(t,e.body,n)})}if(!d.comments.pageInfo.hasNextPage)break;a=d.comments.pageInfo.endCursor,u++}return{type:`discussion`,number:t.number,title:s,body:c,author:l,comments:i,discussionId:o??void 0}}catch(e){return r.warning(`Failed to fetch discussion`,{target:t,error:d(e)}),null}}async function _o(e,t,n,r){if(t.type===`discussion`)return go(e,t,n,r);let i=await mo(e,t,r);if(i==null)return null;let a=await ho(e,t,n,r);return{type:t.type,number:t.number,title:i.title,body:i.body,author:i.author,comments:a}}function vo(e,t){let n=e.comments.filter(e=>fo(e.author,t)&&e.body.includes(``));return n.length===0?null:n.at(-1)??null}async function yo(e,t,n,r){try{let{data:i}=await e.rest.issues.createComment({owner:t.owner,repo:t.repo,issue_number:t.number,body:n});return r.debug(`Created issue comment`,{commentId:i.id,target:t}),{commentId:i.id,created:!0,updated:!1,url:i.html_url}}catch(e){return r.warning(`Failed to create issue comment`,{target:t,error:d(e)}),null}}async function bo(e,t,n,r,i){try{let{data:a}=await e.rest.issues.updateComment({owner:t.owner,repo:t.repo,comment_id:n,body:r});return i.debug(`Updated issue comment`,{commentId:a.id,target:t}),{commentId:a.id,created:!1,updated:!0,url:a.html_url}}catch(e){return i.warning(`Failed to update issue comment`,{target:t,commentId:n,error:d(e)}),null}}async function xo(e,t,n,r){try{let i=(await e.graphql(` +`,{owner:t.owner,repo:t.repo,number:t.number,after:a})).repository.discussion;if(d==null)return r.debug(`Discussion not found`,{target:t}),null;u===0&&(o=d.id,s=d.title,c=d.body,l=d.author?.login??`unknown`);for(let e of d.comments.nodes){let t=e.author?.login??`unknown`;i.push({id:e.id,body:e.body,author:t,authorAssociation:`NONE`,createdAt:e.createdAt,updatedAt:e.updatedAt,isBot:Mi(t,e.body,n)})}if(!d.comments.pageInfo.hasNextPage)break;a=d.comments.pageInfo.endCursor,u++}return{type:`discussion`,number:t.number,title:s,body:c,author:l,comments:i,discussionId:o??void 0}}catch(e){return r.warning(`Failed to fetch discussion`,{target:t,error:_(e)}),null}}async function Ii(e,t,n,r){if(t.type===`discussion`)return Fi(e,t,n,r);let i=await Ni(e,t,r);if(i==null)return null;let a=await Pi(e,t,n,r);return{type:t.type,number:t.number,title:i.title,body:i.body,author:i.author,comments:a}}function Li(e,t){let n=e.comments.filter(e=>ji(e.author,t)&&e.body.includes(``));return n.length===0?null:n.at(-1)??null}async function Ri(e,t,n,r){try{let{data:i}=await e.rest.issues.createComment({owner:t.owner,repo:t.repo,issue_number:t.number,body:n});return r.debug(`Created issue comment`,{commentId:i.id,target:t}),{commentId:i.id,created:!0,updated:!1,url:i.html_url}}catch(e){return r.warning(`Failed to create issue comment`,{target:t,error:_(e)}),null}}async function zi(e,t,n,r,i){try{let{data:a}=await e.rest.issues.updateComment({owner:t.owner,repo:t.repo,comment_id:n,body:r});return i.debug(`Updated issue comment`,{commentId:a.id,target:t}),{commentId:a.id,created:!1,updated:!0,url:a.html_url}}catch(e){return i.warning(`Failed to update issue comment`,{target:t,commentId:n,error:_(e)}),null}}async function Bi(e,t,n,r){try{let i=(await e.graphql(` query GetDiscussionId($owner: String!, $repo: String!, $number: Int!) { repository(owner: $owner, name: $repo) { discussion(number: $number) { @@ -249,7 +168,7 @@ If you had completed the task, confirm the completion.`,u=g.length>0?g:void 0,f= } } } -`,{owner:t.owner,repo:t.repo,number:t.number})).repository.discussion;if(i==null)return r.warning(`Discussion not found`,{target:t}),null;if(n.updateExisting===!0&&n.botLogin!=null){let i=await _o(e,t,n.botLogin,r);if(i!=null){let t=vo(i,n.botLogin);if(t!=null&&typeof t.id==`string`){let i=await e.graphql(` +`,{owner:t.owner,repo:t.repo,number:t.number})).repository.discussion;if(i==null)return r.warning(`Discussion not found`,{target:t}),null;if(n.updateExisting===!0&&n.botLogin!=null){let i=await Ii(e,t,n.botLogin,r);if(i!=null){let t=Li(i,n.botLogin);if(t!=null&&typeof t.id==`string`){let i=await e.graphql(` mutation UpdateDiscussionComment($commentId: ID!, $body: String!) { updateDiscussionComment(input: {commentId: $commentId, body: $body}) { comment { id url } @@ -261,4 +180,4 @@ If you had completed the task, confirm the completion.`,u=g.length>0?g:void 0,f= comment { id url } } } -`,{discussionId:i.id,body:n.body});return r.debug(`Created discussion comment`,{discussionId:i.id}),{commentId:a.addDiscussionComment.comment.id,created:!0,updated:!1,url:a.addDiscussionComment.comment.url}}catch(e){return r.warning(`Failed to post discussion comment`,{target:t,error:d(e)}),null}}async function So(e,t,n,r){if(t.type===`discussion`)return xo(e,t,n,r);if(n.updateExisting===!0&&n.botLogin!=null){let i=await _o(e,t,n.botLogin,r);if(i!=null){let a=vo(i,n.botLogin);if(a!=null&&typeof a.id==`number`)return bo(e,t,a.id,n.body,r)}}return yo(e,t,n.body,r)}async function Co(e,t,n,r,i,a,o){let s=Date.now()-a;if(U({sessionId:r.sessionId,resolvedOutputMode:r.resolvedOutputMode,cacheStatus:n.cacheStatus,duration:s}),await Ge({eventType:t.agentContext.eventName,repo:t.agentContext.repo,ref:t.agentContext.ref,runId:Number(t.agentContext.runId),runUrl:`https://github.com/${t.agentContext.repo}/actions/runs/${t.agentContext.runId}`,metrics:i.getMetrics(),agent:e.inputs.agent,resolvedOutputMode:r.resolvedOutputMode},o),r.success)return o.info(`Agent run completed successfully`,{durationMs:s}),0;if(r.llmError==null)return k(`Agent execution failed with exit code ${r.exitCode}`),r.exitCode;o.info(`Agent failed with recoverable LLM error`,{error:r.llmError.message,type:r.llmError.type,durationMs:s});let[c,l]=t.agentContext.repo.split(`/`),u={type:t.triggerResult.context.eventType===`discussion_comment`?`discussion`:t.agentContext.issueType===`pr`?`pr`:`issue`,number:t.agentContext.issueNumber??0,owner:c??``,repo:l??``};if(u.number>0&&u.owner.length>0&&u.repo.length>0){let e=Rn(r.llmError),n=T({phase:`error-comment`}),a=await So(t.githubClient,u,{body:e},n);a==null?n.warning(`Failed to post LLM error comment`):(n.info(`Posted LLM error comment`,{commentUrl:a.url}),i.incrementComments())}else o.warning(`Cannot post error comment: missing target context`);return 0}function wo(e){switch(e){case`issue_comment`:return`issue_comment`;case`discussion`:case`discussion_comment`:return`discussion_comment`;case`workflow_dispatch`:return`workflow_dispatch`;case`issues`:return`issues`;case`pull_request`:return`pull_request`;case`pull_request_review_comment`:return`pull_request_review_comment`;case`schedule`:return`schedule`;default:return`unsupported`}}function To(e,t){switch(e){case`issue_comment`:{let e=t;return{type:`issue_comment`,action:e.action,issue:{number:e.issue.number,title:e.issue.title,body:e.issue.body??null,locked:e.issue.locked??!1,isPullRequest:e.issue.pull_request!=null},comment:{id:e.comment.id,body:e.comment.body,author:e.comment.user.login,authorAssociation:e.comment.author_association??`NONE`}}}case`discussion_comment`:{let e=t;return{type:`discussion_comment`,action:e.action,discussion:{number:e.discussion.number,title:e.discussion.title,body:e.discussion.body??null,locked:e.discussion.locked??!1},comment:{id:e.comment.id,body:e.comment.body??null,author:e.comment.user.login,authorAssociation:e.comment.author_association??`NONE`}}}case`issues`:{let e=t;return{type:`issues`,action:e.action,issue:{number:e.issue.number,title:e.issue.title,body:e.issue.body??null,locked:e.issue.locked??!1,authorAssociation:e.issue.author_association??`NONE`},sender:{login:e.sender.login}}}case`pull_request`:{let e=t,n=e.pull_request.requested_reviewers??[],r=`requested_reviewer`in e&&e.requested_reviewer!=null?{login:e.requested_reviewer.login,type:e.requested_reviewer.type}:null,i=`requested_team`in e&&e.requested_team!=null?{name:e.requested_team.name,slug:e.requested_team.slug}:null,a=n.flatMap(e=>`login`in e&&`type`in e?[{login:e.login,type:e.type}]:[]);return{type:`pull_request`,action:e.action,requestedReviewer:r,requestedTeam:i,pullRequest:{number:e.pull_request.number,title:e.pull_request.title,body:e.pull_request.body??null,locked:e.pull_request.locked??!1,draft:e.pull_request.draft??!1,authorAssociation:e.pull_request.author_association??`NONE`,requestedReviewers:a},sender:{login:e.sender.login}}}case`pull_request_review_comment`:{let e=t;return{type:`pull_request_review_comment`,action:e.action,pullRequest:{number:e.pull_request.number,title:e.pull_request.title,locked:e.pull_request.locked??!1},comment:{id:e.comment.id,body:e.comment.body,author:e.comment.user.login,authorAssociation:e.comment.author_association,path:e.comment.path,line:e.comment.line??null,diffHunk:e.comment.diff_hunk,commitId:e.comment.commit_id}}}case`workflow_dispatch`:return{type:`workflow_dispatch`,inputs:{prompt:t.inputs?.prompt??void 0}};case`schedule`:return{type:`schedule`,schedule:t.schedule??void 0};case`unsupported`:return{type:`unsupported`}}}function Eo(e){let t=ee,n=wo(t.eventName),r=To(n,t.payload);return e.debug(`Parsed GitHub context`,{eventName:t.eventName,eventType:n,repo:`${t.repo.owner}/${t.repo.repo}`}),{eventName:t.eventName,eventType:n,repo:t.repo,ref:t.ref,sha:t.sha,runId:t.runId,actor:t.actor,payload:t.payload,event:r}}function Do(e,t){return t.includes(e)}function Oo(e){return e.endsWith(`[bot]`)}function ko(e,t){if(t.length===0)return!1;let n=t.replace(/\[bot\]$/i,``);return n.length===0?!1:new RegExp(String.raw`@${Ao(n)}(?:\[bot\])?(?:$|[^\w])`,`i`).test(e)}function Ao(e){return e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)}function jo(e,t){if(t.length===0)return null;let n=t.replace(/\[bot\]$/i,``);if(n.length===0)return null;let r=new RegExp(String.raw`@${Ao(n)}(?:\[bot\])?\s*(.*)`,`is`).exec(e)?.[1];if(r==null)return null;let i=r.trim();if(i.length===0)return{raw:``,action:null,args:``};let a=i.split(/\s+/),o=a[0]??``;return{raw:i,action:o===``?null:o,args:a.slice(1).join(` `)}}function Mo(e,t){if(t==null||t===``||e==null)return{hasMention:!1,command:null};let n=ko(e,t);return{hasMention:n,command:n?jo(e,t):null}}function No(e,t){if(e.type!==`issue_comment`)throw Error(`Event type must be issue_comment`);let n={login:e.comment.author,association:e.comment.authorAssociation,isBot:Oo(e.comment.author)},r={kind:e.issue.isPullRequest?`pr`:`issue`,number:e.issue.number,title:e.issue.title,body:e.comment.body??null,locked:e.issue.locked},{hasMention:i,command:a}=Mo(e.comment.body,t);return{action:e.action,author:n,target:r,commentBody:e.comment.body,commentId:e.comment.id,hasMention:i,command:a,isBotReviewRequested:!1}}function Po(e,t){if(e.type!==`discussion_comment`)throw Error(`Event type must be discussion_comment`);let n={login:e.comment.author,association:e.comment.authorAssociation,isBot:Oo(e.comment.author)},r=e.comment.body??null,i={kind:`discussion`,number:e.discussion.number,title:e.discussion.title,body:r??e.discussion.body??null,locked:e.discussion.locked},{hasMention:a,command:o}=Mo(r,t);return{action:e.action,author:n,target:i,commentBody:r,commentId:e.comment.id,hasMention:a,command:o,isBotReviewRequested:!1}}function Fo(e,t){if(e.type!==`pull_request_review_comment`)throw Error(`Event type must be pull_request_review_comment`);let n={login:e.comment.author,association:e.comment.authorAssociation,isBot:Oo(e.comment.author)},r={kind:`pr`,number:e.pullRequest.number,title:e.pullRequest.title,body:e.comment.body,locked:e.pullRequest.locked,path:e.comment.path,line:e.comment.line??void 0,diffHunk:e.comment.diffHunk,commitId:e.comment.commitId},{hasMention:i,command:a}=Mo(e.comment.body,t);return{action:e.action,author:n,target:r,commentBody:e.comment.body,commentId:e.comment.id,hasMention:i,command:a,isBotReviewRequested:!1}}function Io(e,t,n){if(e.type!==`workflow_dispatch`)throw Error(`Event type must be workflow_dispatch`);let r=(n??e.inputs?.prompt??``).trim();return{action:null,author:{login:t,association:`OWNER`,isBot:!1},target:{kind:`manual`,number:0,title:`Manual workflow dispatch`,body:r===``?null:r,locked:!1},commentBody:r===``?null:r,commentId:null,hasMention:!1,command:null,isBotReviewRequested:!1}}function Lo(e,t,n){let r=n?.trim()??``;return{action:null,author:{login:t,association:`OWNER`,isBot:!1},target:{kind:`manual`,number:0,title:`Scheduled workflow`,body:r===``?null:r,locked:!1},commentBody:r===``?null:r,commentId:null,hasMention:!1,command:null,isBotReviewRequested:!1}}function Ro(e){return e.toLowerCase().replace(/\[bot\]$/i,``)}function zo(e,t){if(e.type!==`pull_request`||t==null||t===``)return!1;let n=Ro(t);if(n===``)return!1;if(e.action===`review_requested`){let t=e.requestedReviewer?.login;return t!=null&&Ro(t)===n}return e.action===`ready_for_review`?e.pullRequest.requestedReviewers.some(e=>Ro(e.login)===n):!1}function Bo(e,t){if(e.type!==`issues`)throw Error(`Event type must be issues`);let n={login:e.sender.login,association:e.issue.authorAssociation,isBot:Oo(e.sender.login)},r={kind:`issue`,number:e.issue.number,title:e.issue.title,body:e.issue.body,locked:e.issue.locked},{hasMention:i,command:a}=Mo(e.issue.body??``,t);return{action:e.action,author:n,target:r,commentBody:e.issue.body,commentId:null,hasMention:i,command:a,isBotReviewRequested:!1}}function Vo(e,t){if(e.type!==`pull_request`)throw Error(`Event type must be pull_request`);let n={login:e.sender.login,association:e.pullRequest.authorAssociation,isBot:Oo(e.sender.login)},r={kind:`pr`,number:e.pullRequest.number,title:e.pullRequest.title,body:e.pullRequest.body,locked:e.pullRequest.locked,isDraft:e.pullRequest.draft,requestedReviewerLogin:e.requestedReviewer?.login,requestedTeamSlug:e.requestedTeam?.slug,requestedReviewerLogins:e.pullRequest.requestedReviewers.map(e=>e.login)},{hasMention:i,command:a}=Mo(e.pullRequest.body??``,t);return{action:e.action,author:n,target:r,commentBody:e.pullRequest.body,commentId:null,hasMention:i,command:a,isBotReviewRequested:zo(e,t)}}function Q(e,t){return{...e,action:t.action,author:t.author,target:t.target,commentBody:t.commentBody,commentId:t.commentId,hasMention:t.hasMention,command:t.command,isBotReviewRequested:t.isBotReviewRequested}}function Ho(e,t,n){let r={eventType:e.eventType,eventName:e.eventName,repo:e.repo,ref:e.ref,sha:e.sha,runId:e.runId,actor:e.actor,raw:e};switch(e.eventType){case`issue_comment`:return Q(r,No(e.event,t));case`discussion_comment`:return Q(r,Po(e.event,t));case`workflow_dispatch`:return Q(r,Io(e.event,e.actor,n));case`issues`:return Q(r,Bo(e.event,t));case`pull_request`:return Q(r,Vo(e.event,t));case`pull_request_review_comment`:return Q(r,Fo(e.event,t));case`schedule`:return Q(r,Lo(e.event,e.actor,n));case`unsupported`:return{...r,action:null,author:null,target:null,commentBody:null,commentId:null,hasMention:!1,command:null,isBotReviewRequested:!1}}}function Uo(e,t,n){let{targetLabel:r,actionLabel:i}=n;return e.action===`created`?e.target?.locked===!0?{shouldSkip:!0,reason:`issue_locked`,message:`${r} is locked`}:e.author!=null&&e.author.isBot?{shouldSkip:!0,reason:`self_comment`,message:`Comments from bots (${e.author.login}) are not processed`}:e.author!=null&&!Do(e.author.association,t.allowedAssociations)?{shouldSkip:!0,reason:`unauthorized_author`,message:`Author association '${e.author.association}' is not authorized`}:t.requireMention&&!e.hasMention?{shouldSkip:!0,reason:`no_mention`,message:`Comment does not mention the bot`}:{shouldSkip:!1}:{shouldSkip:!0,reason:`action_not_created`,message:`${i} action is '${e.action}', not 'created'`}}function Wo(e,t){return Uo(e,t,{targetLabel:`Issue or PR`,actionLabel:`Comment`})}function Go(e,t){return Uo(e,t,{targetLabel:`Discussion`,actionLabel:`Discussion comment`})}const Ko=[`opened`,`edited`];function qo(e){return Ko.includes(e)}function Jo(e,t){let n=e.action;return n==null||!qo(n)?{shouldSkip:!0,reason:`action_not_supported`,message:`Issues action '${n}' is not supported (only 'opened' and 'edited')`}:e.author!=null&&e.author.isBot?{shouldSkip:!0,reason:`self_comment`,message:`Issues from bots (${e.author.login}) are not processed`}:e.author!=null&&!Do(e.author.association,t.allowedAssociations)?{shouldSkip:!0,reason:`unauthorized_author`,message:`Author association '${e.author.association}' is not authorized`}:n===`edited`&&!e.hasMention?{shouldSkip:!0,reason:`no_mention`,message:`Issue edit does not mention the bot`}:e.target?.locked===!0?{shouldSkip:!0,reason:`issue_locked`,message:`Issue is locked`}:{shouldSkip:!1}}function Yo(e){return(e.promptInput?.trim()??``)===``?{shouldSkip:!0,reason:`prompt_required`,message:`Schedule trigger requires prompt input`}:{shouldSkip:!1}}function Xo(e){return(e.commentBody?.trim()??``)===``?{shouldSkip:!0,reason:`prompt_required`,message:`Workflow dispatch requires prompt input`}:{shouldSkip:!1}}const Zo=[`opened`,`synchronize`,`reopened`,`ready_for_review`,`review_requested`];function Qo(e){return Zo.includes(e)}function $o(e,t){let n=e.action;return n==null||!Qo(n)?{shouldSkip:!0,reason:`action_not_supported`,message:`Pull request action '${n}' is not supported`}:e.action!==`review_requested`&&e.action!==`ready_for_review`&&e.author!=null&&e.author.isBot?{shouldSkip:!0,reason:`self_comment`,message:`Pull requests from bots (${e.author.login}) are not processed`}:e.author!=null&&!Do(e.author.association,t.allowedAssociations)?{shouldSkip:!0,reason:`unauthorized_author`,message:`Author association '${e.author.association}' is not authorized`}:t.skipDraftPRs&&e.target?.isDraft===!0?{shouldSkip:!0,reason:`draft_pr`,message:`Pull request is a draft`}:e.target?.locked===!0?{shouldSkip:!0,reason:`issue_locked`,message:`Pull request is locked`}:t.botLogin!=null&&t.botLogin!==``&&(e.action===`ready_for_review`||e.action===`review_requested`)&&e.isBotReviewRequested!==!0?{shouldSkip:!0,reason:`bot_not_requested`,message:`Pull request action '${e.action}' did not request review from the bot`}:{shouldSkip:!1}}function es(e,t){let n=e.action;return n===`created`?e.target?.locked===!0?{shouldSkip:!0,reason:`issue_locked`,message:`Pull request is locked`}:e.author!=null&&e.author.isBot?{shouldSkip:!0,reason:`self_comment`,message:`Review comments from bots (${e.author.login}) are not processed`}:e.author!=null&&!Do(e.author.association,t.allowedAssociations)?{shouldSkip:!0,reason:`unauthorized_author`,message:`Author association '${e.author.association}' is not authorized`}:t.requireMention&&!e.hasMention?{shouldSkip:!0,reason:`no_mention`,message:`Review comment does not mention the bot`}:{shouldSkip:!1}:{shouldSkip:!0,reason:`action_not_created`,message:`Review comment action '${n}' is not supported (only 'created')`}}function ts(e){return{shouldSkip:!0,reason:`unsupported_event`,message:`Unsupported event type: ${e}`}}function ns(e,t,n){if(e.eventType===`unsupported`)return n.debug(`Skipping unsupported event`,{eventName:e.eventName}),ts(e.eventName);switch(e.eventType){case`issue_comment`:return Wo(e,t);case`discussion_comment`:return Go(e,t);case`issues`:return Jo(e,t);case`pull_request`:return $o(e,t);case`pull_request_review_comment`:return es(e,t);case`schedule`:return Yo(t);case`workflow_dispatch`:return Xo(e);default:return{shouldSkip:!1}}}const rs={botLogin:null,requireMention:!0,allowedAssociations:re,skipDraftPRs:!0,promptInput:null,senderAssociation:null};function is(e,t,n={}){let r={...rs,...n},i=Ho(e,r.botLogin,r.promptInput);r.senderAssociation!=null&&(i.action===`review_requested`||i.action===`ready_for_review`)&&i.author!=null&&(i={...i,author:{...i.author,association:r.senderAssociation}}),t.debug(`Routing event`,{eventName:e.eventName,eventType:e.eventType,hasMention:i.hasMention});let a=ns(i,r,t);return a.shouldSkip?{shouldProcess:!1,skipReason:a.reason,skipMessage:a.message,context:i}:{shouldProcess:!0,context:i}}async function as(e,t){let n=T({phase:`context`}),r=Eo(n),i=yi({token:e.inputs.githubToken,logger:n}),o=await bi(i,n),s=null;if(r.event.type===`pull_request`&&(r.event.action===`review_requested`||r.event.action===`ready_for_review`)){let{owner:e,repo:t}=r.repo;s=await tt(i,e,t,r.event.sender.login,n)}let c=T({phase:`trigger`}),l=is(r,c,{botLogin:o,requireMention:!0,promptInput:e.inputs.prompt,senderAssociation:s});return l.shouldProcess?(c.info(`Event routed for processing`,{eventType:l.context.eventType,hasMention:l.context.hasMention,command:l.context.command?.action??null}),D(a.SHOULD_SAVE_CACHE,`true`),{githubClient:i,triggerResult:l,agentContext:await gt({logger:n,octokit:i,triggerContext:l.context,botLogin:o}),botLogin:o}):(c.info(`Skipping event`,{reason:l.skipReason,message:l.skipMessage}),U({sessionId:null,resolvedOutputMode:null,cacheStatus:`miss`,duration:Date.now()-t}),null)}function $(e,t){return{key:`${e}-${t}`,entityType:e,entityId:t}}function os(e){return Me(`sha256`).update(e).digest(`hex`).slice(0,8)}function ss(e){if(e.eventType===`unsupported`)return null;if(e.eventType===`schedule`){let t=e.raw.event.type===`schedule`?e.raw.event.schedule:void 0;return $(`schedule`,os((t!=null&&t.trim().length>0?t:e.action)??`default`))}return e.eventType===`workflow_dispatch`?$(`dispatch`,String(e.runId)):e.target==null?null:e.eventType===`issue_comment`?e.target.kind===`issue`?$(`issue`,String(e.target.number)):e.target.kind===`pr`?$(`pr`,String(e.target.number)):null:e.eventType===`discussion_comment`?e.target.kind===`discussion`?$(`discussion`,String(e.target.number)):null:e.eventType===`issues`?e.target.kind===`issue`?$(`issue`,String(e.target.number)):null:(e.eventType===`pull_request`||e.eventType===`pull_request_review_comment`)&&e.target.kind===`pr`?$(`pr`,String(e.target.number)):null}function cs(e){return`fro-bot: ${e.key}`}function ls(e,t){let n=e.filter(e=>e.title===t);return n.length===0?null:n.reduce((e,t)=>t.time.updated>e.time.updated?t:e)}async function us(e,t,n,r){try{let i=ls(await La(e,t,r),cs(n));return i==null||i.time.archived!=null||i.time.compacting!=null?{status:`not-found`}:{status:`found`,session:i}}catch(e){return{status:`error`,error:e instanceof Error?e.message:String(e)}}}async function ds(e,t,n,r){let i=T({phase:`session`}),a=Ea(S()),o=await Ua(n.serverHandle.client,a,{limit:10},i);i.debug(`Listed recent sessions`,{count:o.length});let s=ss(t.triggerResult.context),c=s==null?null:cs(s),l=null,u=!1;if(s!=null){let e=await us(n.serverHandle.client,a,s,i);e.status===`found`?(l=e.session.id,u=!0,i.info(`Session continuity: found existing session`,{logicalKey:s.key,sessionId:l})):e.status===`error`?i.warning(`Session continuity: lookup error, will create new`,{logicalKey:s.key,error:e.error}):i.info(`Session continuity: no existing session found`,{logicalKey:s.key})}let d=s?.key??t.agentContext.issueTitle??t.agentContext.repo,f=await Ga(d,n.serverHandle.client,a,{limit:5},i);i.debug(`Searched prior sessions`,{query:d,resultCount:f.length});for(let e of f)r.addSessionUsed(e.sessionId);let p=T({phase:`attachments`}),m=t.agentContext.commentBody??``,h=ma(m),g=null;if(h.length>0){p.info(`Processing attachments`,{count:h.length});let{validated:t,skipped:n}=wa(await ya(h,e.inputs.githubToken,void 0,p),void 0,p);(t.length>0||n.length>0)&&(g=Ca(m,h,t,n),p.info(`Attachments processed`,{processed:t.length,skipped:n.length}))}return{recentSessions:o,priorWorkContext:f,attachmentResult:g,normalizedWorkspace:a,logicalKey:s,continueSessionId:l,isContinuation:u,sessionTitle:c}}async function fs(){let e=Date.now(),t=T({phase:`bootstrap`}),n=Ke();n.start();let r=null,i=!1,o=0,s=null,c=null,l=null,u=null,d=``,f=``,p={enabled:!1,bucket:``,region:``,prefix:``};D(a.SHOULD_SAVE_CACHE,`false`),D(a.CACHE_SAVED,`false`);try{t.info(`Starting Fro Bot Agent`);let a=await sa(t);if(a==null)return U({sessionId:null,resolvedOutputMode:null,cacheStatus:`miss`,duration:Date.now()-e}),1;l=a.opencodeResult.version,p=a.inputs.storeConfig;let m=await as(a,e);if(m==null)return 0;s=m.githubClient,d=`${m.triggerResult.context.repo.owner}/${m.triggerResult.context.repo.repo}`,f=m.agentContext.runId;let h=await so(a.inputs.dedupWindow,m.triggerResult.context,d,e);if(!h.shouldProceed)return 0;r=await Ji(m,a.logger);let g=await da(a,n);if(g==null)return 1;u=g.serverHandle;let _=await ds(a,m,g,n);c=_.attachmentResult;let v=await uo(a,m,g,_,n,e);i=v.success,i&&h.entity!=null&&await co(m.triggerResult.context,h.entity,d),n.end(),o=await Co(a,m,g,v,n,e,a.logger)}catch(r){o=1;let i=Date.now()-e,a=r instanceof Error?r.name:`UnknownError`,s=r instanceof Error?r.message:String(r);n.recordError(a,s,!1),n.end(),U({sessionId:null,resolvedOutputMode:null,cacheStatus:`miss`,duration:i}),r instanceof Error?(t.error(`Agent failed`,{error:r.message}),k(r.message)):(t.error(`Agent failed with unknown error`),k(`An unknown error occurred`))}finally{await Xa({bootstrapLogger:t,reactionCtx:r,githubClient:s,agentSuccess:i,attachmentResult:c,serverHandle:u,detectedOpencodeVersion:l,storeConfig:p,metrics:n,agentIdentity:`github`,repo:d,runId:f})}return o}await fs().then(e=>{L.exit(e)});export{}; \ No newline at end of file +`,{discussionId:i.id,body:n.body});return r.debug(`Created discussion comment`,{discussionId:i.id}),{commentId:a.addDiscussionComment.comment.id,created:!0,updated:!1,url:a.addDiscussionComment.comment.url}}catch(e){return r.warning(`Failed to post discussion comment`,{target:t,error:_(e)}),null}}async function Vi(e,t,n,r){if(t.type===`discussion`)return Bi(e,t,n,r);if(n.updateExisting===!0&&n.botLogin!=null){let i=await Ii(e,t,n.botLogin,r);if(i!=null){let a=Li(i,n.botLogin);if(a!=null&&typeof a.id==`number`)return zi(e,t,a.id,n.body,r)}}return Ri(e,t,n.body,r)}async function Hi(e,t,n,r,i,a,o){let s=Date.now()-a;if(jt({sessionId:r.sessionId,resolvedOutputMode:r.resolvedOutputMode,cacheStatus:n.cacheStatus,duration:s}),await kt({eventType:t.agentContext.eventName,repo:t.agentContext.repo,ref:t.agentContext.ref,runId:Number(t.agentContext.runId),runUrl:`https://github.com/${t.agentContext.repo}/actions/runs/${t.agentContext.runId}`,metrics:i.getMetrics(),agent:e.inputs.agent,resolvedOutputMode:r.resolvedOutputMode},o),r.success)return o.info(`Agent run completed successfully`,{durationMs:s}),0;if(r.llmError==null)return M(`Agent execution failed with exit code ${r.exitCode}`),r.exitCode;o.info(`Agent failed with recoverable LLM error`,{error:r.llmError.message,type:r.llmError.type,durationMs:s});let[c,l]=t.agentContext.repo.split(`/`),u={type:t.triggerResult.context.eventType===`discussion_comment`?`discussion`:t.agentContext.issueType===`pr`?`pr`:`issue`,number:t.agentContext.issueNumber??0,owner:c??``,repo:l??``};if(u.number>0&&u.owner.length>0&&u.repo.length>0){let e=Ai(r.llmError),n=N({phase:`error-comment`}),a=await Vi(t.githubClient,u,{body:e},n);a==null?n.warning(`Failed to post LLM error comment`):(n.info(`Posted LLM error comment`,{commentUrl:a.url}),i.incrementComments())}else o.warning(`Cannot post error comment: missing target context`);return 0}function Ui(e){switch(e){case`issue_comment`:return`issue_comment`;case`discussion`:case`discussion_comment`:return`discussion_comment`;case`workflow_dispatch`:return`workflow_dispatch`;case`issues`:return`issues`;case`pull_request`:return`pull_request`;case`pull_request_review_comment`:return`pull_request_review_comment`;case`schedule`:return`schedule`;default:return`unsupported`}}function Wi(e,t){switch(e){case`issue_comment`:{let e=t;return{type:`issue_comment`,action:e.action,issue:{number:e.issue.number,title:e.issue.title,body:e.issue.body??null,locked:e.issue.locked??!1,isPullRequest:e.issue.pull_request!=null},comment:{id:e.comment.id,body:e.comment.body,author:e.comment.user.login,authorAssociation:e.comment.author_association??`NONE`}}}case`discussion_comment`:{let e=t;return{type:`discussion_comment`,action:e.action,discussion:{number:e.discussion.number,title:e.discussion.title,body:e.discussion.body??null,locked:e.discussion.locked??!1},comment:{id:e.comment.id,body:e.comment.body??null,author:e.comment.user.login,authorAssociation:e.comment.author_association??`NONE`}}}case`issues`:{let e=t;return{type:`issues`,action:e.action,issue:{number:e.issue.number,title:e.issue.title,body:e.issue.body??null,locked:e.issue.locked??!1,authorAssociation:e.issue.author_association??`NONE`},sender:{login:e.sender.login}}}case`pull_request`:{let e=t,n=e.pull_request.requested_reviewers??[],r=`requested_reviewer`in e&&e.requested_reviewer!=null?{login:e.requested_reviewer.login,type:e.requested_reviewer.type}:null,i=`requested_team`in e&&e.requested_team!=null?{name:e.requested_team.name,slug:e.requested_team.slug}:null,a=n.flatMap(e=>`login`in e&&`type`in e?[{login:e.login,type:e.type}]:[]);return{type:`pull_request`,action:e.action,requestedReviewer:r,requestedTeam:i,pullRequest:{number:e.pull_request.number,title:e.pull_request.title,body:e.pull_request.body??null,locked:e.pull_request.locked??!1,draft:e.pull_request.draft??!1,authorAssociation:e.pull_request.author_association??`NONE`,requestedReviewers:a},sender:{login:e.sender.login}}}case`pull_request_review_comment`:{let e=t;return{type:`pull_request_review_comment`,action:e.action,pullRequest:{number:e.pull_request.number,title:e.pull_request.title,locked:e.pull_request.locked??!1},comment:{id:e.comment.id,body:e.comment.body,author:e.comment.user.login,authorAssociation:e.comment.author_association,path:e.comment.path,line:e.comment.line??null,diffHunk:e.comment.diff_hunk,commitId:e.comment.commit_id}}}case`workflow_dispatch`:return{type:`workflow_dispatch`,inputs:{prompt:t.inputs?.prompt??void 0}};case`schedule`:return{type:`schedule`,schedule:t.schedule??void 0};case`unsupported`:return{type:`unsupported`}}}function Gi(e){let t=ue,n=Ui(t.eventName),r=Wi(n,t.payload);return e.debug(`Parsed GitHub context`,{eventName:t.eventName,eventType:n,repo:`${t.repo.owner}/${t.repo.repo}`}),{eventName:t.eventName,eventType:n,repo:t.repo,ref:t.ref,sha:t.sha,runId:t.runId,actor:t.actor,payload:t.payload,event:r}}function Ki(e,t){return t.includes(e)}function qi(e){return e.endsWith(`[bot]`)}function Ji(e,t){if(t.length===0)return!1;let n=t.replace(/\[bot\]$/i,``);return n.length===0?!1:new RegExp(String.raw`@${Yi(n)}(?:\[bot\])?(?:$|[^\w])`,`i`).test(e)}function Yi(e){return e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)}function Xi(e,t){if(t.length===0)return null;let n=t.replace(/\[bot\]$/i,``);if(n.length===0)return null;let r=new RegExp(String.raw`@${Yi(n)}(?:\[bot\])?\s*(.*)`,`is`).exec(e)?.[1];if(r==null)return null;let i=r.trim();if(i.length===0)return{raw:``,action:null,args:``};let a=i.split(/\s+/),o=a[0]??``;return{raw:i,action:o===``?null:o,args:a.slice(1).join(` `)}}function Zi(e,t){if(t==null||t===``||e==null)return{hasMention:!1,command:null};let n=Ji(e,t);return{hasMention:n,command:n?Xi(e,t):null}}function Qi(e,t){if(e.type!==`issue_comment`)throw Error(`Event type must be issue_comment`);let n={login:e.comment.author,association:e.comment.authorAssociation,isBot:qi(e.comment.author)},r={kind:e.issue.isPullRequest?`pr`:`issue`,number:e.issue.number,title:e.issue.title,body:e.comment.body??null,locked:e.issue.locked},{hasMention:i,command:a}=Zi(e.comment.body,t);return{action:e.action,author:n,target:r,commentBody:e.comment.body,commentId:e.comment.id,hasMention:i,command:a,isBotReviewRequested:!1}}function $i(e,t){if(e.type!==`discussion_comment`)throw Error(`Event type must be discussion_comment`);let n={login:e.comment.author,association:e.comment.authorAssociation,isBot:qi(e.comment.author)},r=e.comment.body??null,i={kind:`discussion`,number:e.discussion.number,title:e.discussion.title,body:r??e.discussion.body??null,locked:e.discussion.locked},{hasMention:a,command:o}=Zi(r,t);return{action:e.action,author:n,target:i,commentBody:r,commentId:e.comment.id,hasMention:a,command:o,isBotReviewRequested:!1}}function ea(e,t){if(e.type!==`pull_request_review_comment`)throw Error(`Event type must be pull_request_review_comment`);let n={login:e.comment.author,association:e.comment.authorAssociation,isBot:qi(e.comment.author)},r={kind:`pr`,number:e.pullRequest.number,title:e.pullRequest.title,body:e.comment.body,locked:e.pullRequest.locked,path:e.comment.path,line:e.comment.line??void 0,diffHunk:e.comment.diffHunk,commitId:e.comment.commitId},{hasMention:i,command:a}=Zi(e.comment.body,t);return{action:e.action,author:n,target:r,commentBody:e.comment.body,commentId:e.comment.id,hasMention:i,command:a,isBotReviewRequested:!1}}function ta(e,t,n){if(e.type!==`workflow_dispatch`)throw Error(`Event type must be workflow_dispatch`);let r=(n??e.inputs?.prompt??``).trim();return{action:null,author:{login:t,association:`OWNER`,isBot:!1},target:{kind:`manual`,number:0,title:`Manual workflow dispatch`,body:r===``?null:r,locked:!1},commentBody:r===``?null:r,commentId:null,hasMention:!1,command:null,isBotReviewRequested:!1}}function na(e,t,n){let r=n?.trim()??``;return{action:null,author:{login:t,association:`OWNER`,isBot:!1},target:{kind:`manual`,number:0,title:`Scheduled workflow`,body:r===``?null:r,locked:!1},commentBody:r===``?null:r,commentId:null,hasMention:!1,command:null,isBotReviewRequested:!1}}function ra(e){return e.toLowerCase().replace(/\[bot\]$/i,``)}function ia(e,t){if(e.type!==`pull_request`||t==null||t===``)return!1;let n=ra(t);if(n===``)return!1;if(e.action===`review_requested`){let t=e.requestedReviewer?.login;return t!=null&&ra(t)===n}return e.action===`ready_for_review`?e.pullRequest.requestedReviewers.some(e=>ra(e.login)===n):!1}function aa(e,t){if(e.type!==`issues`)throw Error(`Event type must be issues`);let n={login:e.sender.login,association:e.issue.authorAssociation,isBot:qi(e.sender.login)},r={kind:`issue`,number:e.issue.number,title:e.issue.title,body:e.issue.body,locked:e.issue.locked},{hasMention:i,command:a}=Zi(e.issue.body??``,t);return{action:e.action,author:n,target:r,commentBody:e.issue.body,commentId:null,hasMention:i,command:a,isBotReviewRequested:!1}}function oa(e,t){if(e.type!==`pull_request`)throw Error(`Event type must be pull_request`);let n={login:e.sender.login,association:e.pullRequest.authorAssociation,isBot:qi(e.sender.login)},r={kind:`pr`,number:e.pullRequest.number,title:e.pullRequest.title,body:e.pullRequest.body,locked:e.pullRequest.locked,isDraft:e.pullRequest.draft,requestedReviewerLogin:e.requestedReviewer?.login,requestedTeamSlug:e.requestedTeam?.slug,requestedReviewerLogins:e.pullRequest.requestedReviewers.map(e=>e.login)},{hasMention:i,command:a}=Zi(e.pullRequest.body??``,t);return{action:e.action,author:n,target:r,commentBody:e.pullRequest.body,commentId:null,hasMention:i,command:a,isBotReviewRequested:ia(e,t)}}function $(e,t){return{...e,action:t.action,author:t.author,target:t.target,commentBody:t.commentBody,commentId:t.commentId,hasMention:t.hasMention,command:t.command,isBotReviewRequested:t.isBotReviewRequested}}function sa(e,t,n){let r={eventType:e.eventType,eventName:e.eventName,repo:e.repo,ref:e.ref,sha:e.sha,runId:e.runId,actor:e.actor,raw:e};switch(e.eventType){case`issue_comment`:return $(r,Qi(e.event,t));case`discussion_comment`:return $(r,$i(e.event,t));case`workflow_dispatch`:return $(r,ta(e.event,e.actor,n));case`issues`:return $(r,aa(e.event,t));case`pull_request`:return $(r,oa(e.event,t));case`pull_request_review_comment`:return $(r,ea(e.event,t));case`schedule`:return $(r,na(e.event,e.actor,n));case`unsupported`:return{...r,action:null,author:null,target:null,commentBody:null,commentId:null,hasMention:!1,command:null,isBotReviewRequested:!1}}}function ca(e,t,n){let{targetLabel:r,actionLabel:i}=n;return e.action===`created`?e.target?.locked===!0?{shouldSkip:!0,reason:`issue_locked`,message:`${r} is locked`}:e.author!=null&&e.author.isBot?{shouldSkip:!0,reason:`self_comment`,message:`Comments from bots (${e.author.login}) are not processed`}:e.author!=null&&!Ki(e.author.association,t.allowedAssociations)?{shouldSkip:!0,reason:`unauthorized_author`,message:`Author association '${e.author.association}' is not authorized`}:t.requireMention&&!e.hasMention?{shouldSkip:!0,reason:`no_mention`,message:`Comment does not mention the bot`}:{shouldSkip:!1}:{shouldSkip:!0,reason:`action_not_created`,message:`${i} action is '${e.action}', not 'created'`}}function la(e,t){return ca(e,t,{targetLabel:`Issue or PR`,actionLabel:`Comment`})}function ua(e,t){return ca(e,t,{targetLabel:`Discussion`,actionLabel:`Discussion comment`})}const da=[`opened`,`edited`];function fa(e){return da.includes(e)}function pa(e,t){let n=e.action;return n==null||!fa(n)?{shouldSkip:!0,reason:`action_not_supported`,message:`Issues action '${n}' is not supported (only 'opened' and 'edited')`}:e.author!=null&&e.author.isBot?{shouldSkip:!0,reason:`self_comment`,message:`Issues from bots (${e.author.login}) are not processed`}:e.author!=null&&!Ki(e.author.association,t.allowedAssociations)?{shouldSkip:!0,reason:`unauthorized_author`,message:`Author association '${e.author.association}' is not authorized`}:n===`edited`&&!e.hasMention?{shouldSkip:!0,reason:`no_mention`,message:`Issue edit does not mention the bot`}:e.target?.locked===!0?{shouldSkip:!0,reason:`issue_locked`,message:`Issue is locked`}:{shouldSkip:!1}}function ma(e){return(e.promptInput?.trim()??``)===``?{shouldSkip:!0,reason:`prompt_required`,message:`Schedule trigger requires prompt input`}:{shouldSkip:!1}}function ha(e){return(e.commentBody?.trim()??``)===``?{shouldSkip:!0,reason:`prompt_required`,message:`Workflow dispatch requires prompt input`}:{shouldSkip:!1}}const ga=[`opened`,`synchronize`,`reopened`,`ready_for_review`,`review_requested`];function _a(e){return ga.includes(e)}function va(e,t){let n=e.action;return n==null||!_a(n)?{shouldSkip:!0,reason:`action_not_supported`,message:`Pull request action '${n}' is not supported`}:e.action!==`review_requested`&&e.action!==`ready_for_review`&&e.author!=null&&e.author.isBot?{shouldSkip:!0,reason:`self_comment`,message:`Pull requests from bots (${e.author.login}) are not processed`}:e.author!=null&&!Ki(e.author.association,t.allowedAssociations)?{shouldSkip:!0,reason:`unauthorized_author`,message:`Author association '${e.author.association}' is not authorized`}:t.skipDraftPRs&&e.target?.isDraft===!0?{shouldSkip:!0,reason:`draft_pr`,message:`Pull request is a draft`}:e.target?.locked===!0?{shouldSkip:!0,reason:`issue_locked`,message:`Pull request is locked`}:t.botLogin!=null&&t.botLogin!==``&&(e.action===`ready_for_review`||e.action===`review_requested`)&&e.isBotReviewRequested!==!0?{shouldSkip:!0,reason:`bot_not_requested`,message:`Pull request action '${e.action}' did not request review from the bot`}:{shouldSkip:!1}}function ya(e,t){let n=e.action;return n===`created`?e.target?.locked===!0?{shouldSkip:!0,reason:`issue_locked`,message:`Pull request is locked`}:e.author!=null&&e.author.isBot?{shouldSkip:!0,reason:`self_comment`,message:`Review comments from bots (${e.author.login}) are not processed`}:e.author!=null&&!Ki(e.author.association,t.allowedAssociations)?{shouldSkip:!0,reason:`unauthorized_author`,message:`Author association '${e.author.association}' is not authorized`}:t.requireMention&&!e.hasMention?{shouldSkip:!0,reason:`no_mention`,message:`Review comment does not mention the bot`}:{shouldSkip:!1}:{shouldSkip:!0,reason:`action_not_created`,message:`Review comment action '${n}' is not supported (only 'created')`}}function ba(e){return{shouldSkip:!0,reason:`unsupported_event`,message:`Unsupported event type: ${e}`}}function xa(e,t,n){if(e.eventType===`unsupported`)return n.debug(`Skipping unsupported event`,{eventName:e.eventName}),ba(e.eventName);switch(e.eventType){case`issue_comment`:return la(e,t);case`discussion_comment`:return ua(e,t);case`issues`:return pa(e,t);case`pull_request`:return va(e,t);case`pull_request_review_comment`:return ya(e,t);case`schedule`:return ma(t);case`workflow_dispatch`:return ha(e);default:return{shouldSkip:!1}}}const Sa={botLogin:null,requireMention:!0,allowedAssociations:r,skipDraftPRs:!0,promptInput:null,senderAssociation:null};function Ca(e,t,n={}){let r={...Sa,...n},i=sa(e,r.botLogin,r.promptInput);r.senderAssociation!=null&&(i.action===`review_requested`||i.action===`ready_for_review`)&&i.author!=null&&(i={...i,author:{...i.author,association:r.senderAssociation}}),t.debug(`Routing event`,{eventName:e.eventName,eventType:e.eventType,hasMention:i.hasMention});let a=xa(i,r,t);return a.shouldSkip?{shouldProcess:!1,skipReason:a.reason,skipMessage:a.message,context:i}:{shouldProcess:!0,context:i}}async function wa(e,t){let n=N({phase:`context`}),r=Gi(n),i=ar({token:e.inputs.githubToken,logger:n}),a=await or(i,n),o=null;if(r.event.type===`pull_request`&&(r.event.action===`review_requested`||r.event.action===`ready_for_review`)){let{owner:e,repo:t}=r.repo;o=await Bt(i,e,t,r.event.sender.login,n)}let s=N({phase:`trigger`}),c=Ca(r,s,{botLogin:a,requireMention:!0,promptInput:e.inputs.prompt,senderAssociation:o});return c.shouldProcess?(s.info(`Event routed for processing`,{eventType:c.context.eventType,hasMention:c.context.hasMention,command:c.context.command?.action??null}),z(j.SHOULD_SAVE_CACHE,`true`),{githubClient:i,triggerResult:c,agentContext:await en({logger:n,octokit:i,triggerContext:c.context,botLogin:a}),botLogin:a}):(s.info(`Skipping event`,{reason:c.skipReason,message:c.skipMessage}),jt({sessionId:null,resolvedOutputMode:null,cacheStatus:`miss`,duration:Date.now()-t}),null)}async function Ta(e,t,n,r){let i=N({phase:`session`}),a=fi(m()),o=await mt(n.serverHandle.client,a,{limit:10},i);i.debug(`Listed recent sessions`,{count:o.length});let s=ct(t.triggerResult.context),c=s==null?null:lt(s),l=null,u=!1;if(s!=null){let e=await dt(n.serverHandle.client,a,s,i);e.status===`found`?(l=e.session.id,u=!0,i.info(`Session continuity: found existing session`,{logicalKey:s.key,sessionId:l})):e.status===`error`?i.warning(`Session continuity: lookup error, will create new`,{logicalKey:s.key,error:e.error}):i.info(`Session continuity: no existing session found`,{logicalKey:s.key})}let d=s?.key??t.agentContext.issueTitle??t.agentContext.repo,f=await gt(d,n.serverHandle.client,a,{limit:5},i);i.debug(`Searched prior sessions`,{query:d,resultCount:f.length});for(let e of f)r.addSessionUsed(e.sessionId);let p=N({phase:`attachments`}),h=t.agentContext.commentBody??``,g=ei(h),_=null;if(g.length>0){p.info(`Processing attachments`,{count:g.length});let{validated:t,skipped:n}=ui(await ai(g,e.inputs.githubToken,void 0,p),void 0,p);(t.length>0||n.length>0)&&(_=li(h,g,t,n),p.info(`Attachments processed`,{processed:t.length,skipped:n.length}))}return{recentSessions:o,priorWorkContext:f,attachmentResult:_,normalizedWorkspace:a,logicalKey:s,continueSessionId:l,isContinuation:u,sessionTitle:c}}async function Ea(){let e=Date.now(),t=N({phase:`bootstrap`}),n=At();n.start();let r=null,i=!1,a=0,o=null,s=null,c=null,l=null,u=``,d=``,f={enabled:!1,bucket:``,region:``,prefix:``};z(j.SHOULD_SAVE_CACHE,`false`),z(j.CACHE_SAVED,`false`);try{t.info(`Starting Fro Bot Agent`);let p=await qr(t);if(p==null)return jt({sessionId:null,resolvedOutputMode:null,cacheStatus:`miss`,duration:Date.now()-e}),1;c=p.opencodeResult.version,f=p.inputs.storeConfig;let m=await wa(p,e);if(m==null)return 0;o=m.githubClient,u=`${m.triggerResult.context.repo.owner}/${m.triggerResult.context.repo.repo}`,d=m.agentContext.runId;let h=await wi(p.inputs.dedupWindow,m.triggerResult.context,u,e);if(!h.shouldProceed)return 0;r=await Pr(m,p.logger);let g=await Zr(p,n);if(g==null)return 1;l=g.serverHandle;let _=await Ta(p,m,g,n);s=_.attachmentResult;let v=await Di(p,m,g,_,n,e);i=v.success,i&&h.entity!=null&&await Ti(m.triggerResult.context,h.entity,u),n.end(),a=await Hi(p,m,g,v,n,e,p.logger)}catch(r){a=1;let i=Date.now()-e,o=r instanceof Error?r.name:`UnknownError`,s=r instanceof Error?r.message:String(r);n.recordError(o,s,!1),n.end(),jt({sessionId:null,resolvedOutputMode:null,cacheStatus:`miss`,duration:i}),r instanceof Error?(t.error(`Agent failed`,{error:r.message}),M(r.message)):(t.error(`Agent failed with unknown error`),M(`An unknown error occurred`))}finally{await pi({bootstrapLogger:t,reactionCtx:r,githubClient:o,agentSuccess:i,attachmentResult:s,serverHandle:l,detectedOpencodeVersion:c,storeConfig:f,metrics:n,agentIdentity:`github`,repo:u,runId:d})}return a}await Ea().then(e=>{V.exit(e)});export{}; \ No newline at end of file diff --git a/dist/post.js b/dist/post.js index 229ee728..47238374 100644 --- a/dist/post.js +++ b/dist/post.js @@ -1 +1 @@ -import{B as e,C as t,H as n,O as r,T as i,V as a,a as o,b as s,c,n as l,o as u,q as d,s as f,t as p,w as m,x as h,y as g}from"./artifact-BxOB70uM.js";function _(e){let t=d(e);return t.length>0?t:void 0}function v(){let t=_(e.S3_ENABLED),n=_(e.S3_BUCKET),r=_(e.S3_PREFIX);if(t==null||n==null||r==null)return;let i=_(e.S3_REGION)??``,a=_(e.S3_ENDPOINT),o=_(e.S3_EXPECTED_BUCKET_OWNER),s=_(e.S3_ALLOW_INSECURE_ENDPOINT),c=_(e.S3_SSE_ENCRYPTION),l=_(e.S3_SSE_KMS_KEY_ID);return{enabled:t===`true`,bucket:n,region:i,prefix:r,endpoint:a,expectedBucketOwner:o,allowInsecureEndpoint:s===`true`,sseEncryption:c===`aws:kms`||c===`AES256`?c:void 0,sseKmsKeyId:l}}async function y(_={}){let y=_.logger??a({phase:`post`}),b=d(e.SHOULD_SAVE_CACHE),x=d(e.CACHE_SAVED),S=d(e.SESSION_ID)||null,C=d(e.OPENCODE_VERSION)||null,w=v();if(y.debug(`Post-action state`,{shouldSaveCache:b,cacheSaved:x,sessionId:S,opencodeVersion:C,hasStoreConfig:w!=null}),b!==`true`){y.info(`Skipping post-action: event was not processed`,{shouldSaveCache:b});return}if(x===`true`)y.info(`Skipping post-action: cache already saved by main action`,{cacheSaved:x});else{let e=String(h());try{await l({components:o(),runId:h(),logger:y,storagePath:i(),authPath:t(),opencodeVersion:C,...w==null?{}:{storeConfig:w}})?y.info(`Post-action cache saved`,{sessionId:S}):y.info(`Post-action: no cache content to save`,{sessionId:S})}catch(e){y.warning(`Post-action cache save failed (non-fatal)`,{error:n(e)})}if(w?.enabled===!0)try{let t=a({phase:`post-object-store`}),n=u(w,t),r=g(),i=s();await c(n,w,`github`,r,e,{runId:e,timestamp:new Date().toISOString(),cleanupSkipped:!0,runAttempt:i},t),await f(n,w,`github`,r,e,m(),t)}catch(e){y.warning(`Post-action object store sync failed (non-fatal)`,{error:n(e)})}}if(r()&&d(e.ARTIFACT_UPLOADED)!==`true`)try{let e=a({phase:`post-artifact-upload`});await p({logPath:m(),runId:h(),runAttempt:s(),logger:e})}catch(e){y.warning(`Post-action artifact upload failed (non-fatal)`,{error:n(e)})}}await y();export{}; \ No newline at end of file +import{A as e,F as t,I as n,M as r,P as i,Q as a,a as o,d as s,f as c,h as l,j as u,m as d,n as f,p,st as m,t as h,z as g}from"./artifact-B5YYOsMW.js";function _(e){let t=m(e);return t.length>0?t:void 0}function v(){let e=_(s.S3_ENABLED),t=_(s.S3_BUCKET),n=_(s.S3_PREFIX);if(e==null||t==null||n==null)return;let r=_(s.S3_REGION)??``,i=_(s.S3_ENDPOINT),a=_(s.S3_EXPECTED_BUCKET_OWNER),o=_(s.S3_ALLOW_INSECURE_ENDPOINT),c=_(s.S3_SSE_ENCRYPTION),l=_(s.S3_SSE_KMS_KEY_ID);return{enabled:e===`true`,bucket:t,region:r,prefix:n,endpoint:i,expectedBucketOwner:a,allowInsecureEndpoint:o===`true`,sseEncryption:c===`aws:kms`||c===`AES256`?c:void 0,sseKmsKeyId:l}}async function y(_={}){let y=_.logger??c({phase:`post`}),b=m(s.SHOULD_SAVE_CACHE),x=m(s.CACHE_SAVED),S=m(s.SESSION_ID)||null,C=m(s.OPENCODE_VERSION)||null,w=v();if(y.debug(`Post-action state`,{shouldSaveCache:b,cacheSaved:x,sessionId:S,opencodeVersion:C,hasStoreConfig:w!=null}),b!==`true`){y.info(`Skipping post-action: event was not processed`,{shouldSaveCache:b});return}if(x===`true`)y.info(`Skipping post-action: cache already saved by main action`,{cacheSaved:x});else{let s=String(r());try{await f({components:o(),runId:r(),logger:y,storagePath:n(),authPath:i(),opencodeVersion:C,...w==null?{}:{storeConfig:w}})?y.info(`Post-action cache saved`,{sessionId:S}):y.info(`Post-action: no cache content to save`,{sessionId:S})}catch(e){y.warning(`Post-action cache save failed (non-fatal)`,{error:a(e)})}if(w?.enabled===!0)try{let n=c({phase:`post-object-store`}),r=p(w,n),i=e(),a=u();await l(r,w,`github`,i,s,{runId:s,timestamp:new Date().toISOString(),cleanupSkipped:!0,runAttempt:a},n),await d(r,w,`github`,i,s,t(),n)}catch(e){y.warning(`Post-action object store sync failed (non-fatal)`,{error:a(e)})}}if(g()&&m(s.ARTIFACT_UPLOADED)!==`true`)try{let e=c({phase:`post-artifact-upload`});await h({logPath:t(),runId:r(),runAttempt:u(),logger:e})}catch(e){y.warning(`Post-action artifact upload failed (non-fatal)`,{error:a(e)})}}await y();export{}; \ No newline at end of file diff --git a/dist/signin-mtMDXBSv.js b/dist/signin-DQvIXhZH.js similarity index 99% rename from dist/signin-mtMDXBSv.js rename to dist/signin-DQvIXhZH.js index bce5a7ad..2194c3b7 100644 --- a/dist/signin-mtMDXBSv.js +++ b/dist/signin-DQvIXhZH.js @@ -1 +1 @@ -import{n as e}from"./chunk-Bdh3yLIe.js";import{t}from"./dist-cjs-BU-OH1DU.js";import{i as n,n as r}from"./client-D8hez-QA.js";import{t as i}from"./dist-cjs-BKjtSutv.js";import{B as a,D as ee,N as te,R as ne,T as re,k as ie,t as o}from"./dist-cjs-CHwZlzSt.js";import{A as ae,C as oe,D as se,M as ce,N as le,S as ue,_ as de,a as fe,b as pe,c as me,d as he,f as ge,g as _e,h as ve,i as ye,j as be,l as xe,m as Se,n as Ce,p as we,r as Te,s,t as Ee,u as De,v as Oe,w as ke,x as Ae}from"./dist-cjs-vGYnjJIN.js";import{t as je}from"./dist-cjs-BLKf4vef.js";import{t as Me}from"./dist-cjs-DHscMTSt.js";import{t as Ne}from"./package-DTfM1tyi.js";function Pe(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`signin`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Fe(e){return{schemeId:`smithy.api#noAuth`}}var c,Ie,Le,Re,ze=e((()=>{s(),c=te(),Ie=async(e,t,n)=>({operation:(0,c.getSmithyContext)(t).operation,region:await(0,c.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Le=e=>{let t=[];switch(e.operation){case`CreateOAuth2Token`:t.push(Fe(e));break;default:t.push(Pe(e))}return t},Re=e=>{let t=me(e);return Object.assign(t,{authSchemePreference:(0,c.normalizeProvider)(e.authSchemePreference??[])})}})),Be,Ve,He=e((()=>{Be=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:`signin`}),Ve={UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}})),l,u,d,f,Ue,We,p,m,h,g,_,v,y,b,Ge,x,S,C,w,T,E,D,O,k,Ke,qe,Je=e((()=>{l=`required`,u=`fn`,d=`argv`,f=`ref`,Ue=!0,We=`isSet`,p=`booleanEquals`,m=`error`,h=`endpoint`,g=`tree`,_=`PartitionResult`,v=`stringEquals`,y={[l]:!0,default:!1,type:`boolean`},b={[l]:!1,type:`string`},Ge={[f]:`Endpoint`},x={[u]:p,[d]:[{[f]:`UseFIPS`},!0]},S={[u]:p,[d]:[{[f]:`UseDualStack`},!0]},C={},w={[u]:`getAttr`,[d]:[{[f]:_},`name`]},T={[u]:p,[d]:[{[f]:`UseFIPS`},!1]},E={[u]:p,[d]:[{[f]:`UseDualStack`},!1]},D={[u]:`getAttr`,[d]:[{[f]:_},`supportsFIPS`]},O={[u]:p,[d]:[!0,{[u]:`getAttr`,[d]:[{[f]:_},`supportsDualStack`]}]},k=[{[f]:`Region`}],Ke={version:`1.0`,parameters:{UseDualStack:y,UseFIPS:y,Endpoint:b,Region:b},rules:[{conditions:[{[u]:We,[d]:[Ge]}],rules:[{conditions:[x],error:`Invalid Configuration: FIPS and custom endpoint are not supported`,type:m},{rules:[{conditions:[S],error:`Invalid Configuration: Dualstack and custom endpoint are not supported`,type:m},{endpoint:{url:Ge,properties:C,headers:C},type:h}],type:g}],type:g},{rules:[{conditions:[{[u]:We,[d]:k}],rules:[{conditions:[{[u]:`aws.partition`,[d]:k,assign:_}],rules:[{conditions:[{[u]:v,[d]:[w,`aws`]},T,E],endpoint:{url:`https://{Region}.signin.aws.amazon.com`,properties:C,headers:C},type:h},{conditions:[{[u]:v,[d]:[w,`aws-cn`]},T,E],endpoint:{url:`https://{Region}.signin.amazonaws.cn`,properties:C,headers:C},type:h},{conditions:[{[u]:v,[d]:[w,`aws-us-gov`]},T,E],endpoint:{url:`https://{Region}.signin.amazonaws-us-gov.com`,properties:C,headers:C},type:h},{conditions:[x,S],rules:[{conditions:[{[u]:p,[d]:[Ue,D]},O],rules:[{endpoint:{url:`https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:C,headers:C},type:h}],type:g},{error:`FIPS and DualStack are enabled, but this partition does not support one or both`,type:m}],type:g},{conditions:[x,E],rules:[{conditions:[{[u]:p,[d]:[D,Ue]}],rules:[{endpoint:{url:`https://signin-fips.{Region}.{PartitionResult#dnsSuffix}`,properties:C,headers:C},type:h}],type:g},{error:`FIPS is enabled but this partition does not support FIPS`,type:m}],type:g},{conditions:[T,S],rules:[{conditions:[O],rules:[{endpoint:{url:`https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:C,headers:C},type:h}],type:g},{error:`DualStack is enabled but this partition does not support DualStack`,type:m}],type:g},{endpoint:{url:`https://signin.{Region}.{PartitionResult#dnsSuffix}`,properties:C,headers:C},type:h}],type:g}],type:g},{error:`Invalid Configuration: Missing Region`,type:m}],type:g}]},qe=Ke})),Ye,A,Xe,Ze,Qe=e((()=>{Ye=de(),A=Oe(),Je(),Xe=new A.EndpointCache({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`]}),Ze=(e,t={})=>Xe.get(e,()=>(0,A.resolveEndpoint)(qe,{endpointParams:e,logger:t.logger})),A.customEndpointFunctions.aws=Ye.awsEndpointFunctions})),$e,j,et=e((()=>{$e=o(),j=class e extends $e.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),tt,nt,rt,it,at=e((()=>{et(),tt=class e extends j{name=`AccessDeniedException`;$fault=`client`;error;constructor(t){super({name:`AccessDeniedException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},nt=class e extends j{name=`InternalServerException`;$fault=`server`;error;constructor(t){super({name:`InternalServerException`,$fault:`server`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},rt=class e extends j{name=`TooManyRequestsError`;$fault=`client`;error;constructor(t){super({name:`TooManyRequestsError`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},it=class e extends j{name=`ValidationException`;$fault=`client`;error;constructor(t){super({name:`ValidationException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}}})),ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,M,N,P,F,I,_t,L,R,z,vt,B,V,H,U,W,G,K,q,yt,bt,xt,St,J,Y,Ct,wt,X,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt=e((()=>{re(),at(),et(),ot=`AccessDeniedException`,st=`AccessToken`,ct=`CreateOAuth2Token`,lt=`CreateOAuth2TokenRequest`,ut=`CreateOAuth2TokenRequestBody`,dt=`CreateOAuth2TokenResponseBody`,ft=`CreateOAuth2TokenResponse`,pt=`InternalServerException`,mt=`RefreshToken`,ht=`TooManyRequestsError`,gt=`ValidationException`,M=`accessKeyId`,N=`accessToken`,P=`client`,F=`clientId`,I=`codeVerifier`,_t=`code`,L=`error`,R=`expiresIn`,z=`grantType`,vt=`http`,B=`httpError`,V=`idToken`,H=`jsonName`,U=`message`,W=`refreshToken`,G=`redirectUri`,K=`smithy.ts.sdk.synthetic.com.amazonaws.signin`,q=`secretAccessKey`,yt=`sessionToken`,bt=`server`,xt=`tokenInput`,St=`tokenOutput`,J=`tokenType`,Y=`com.amazonaws.signin`,Ct=ee.for(K),wt=[-3,K,`SigninServiceException`,0,[],[]],Ct.registerError(wt,j),X=ee.for(Y),Tt=[-3,Y,ot,{[L]:P},[L,U],[0,0],2],X.registerError(Tt,tt),Et=[-3,Y,pt,{[L]:bt,[B]:500},[L,U],[0,0],2],X.registerError(Et,nt),Dt=[-3,Y,ht,{[L]:P,[B]:429},[L,U],[0,0],2],X.registerError(Dt,rt),Ot=[-3,Y,gt,{[L]:P,[B]:400},[L,U],[0,0],2],X.registerError(Ot,it),kt=[Ct,X],At=[0,Y,mt,8,0],jt=[3,Y,st,8,[M,q,yt],[[0,{[H]:M}],[0,{[H]:q}],[0,{[H]:yt}]],3],Mt=[3,Y,lt,0,[xt],[[()=>Nt,16]],1],Nt=[3,Y,ut,0,[F,z,_t,G,I,W],[[0,{[H]:F}],[0,{[H]:z}],0,[0,{[H]:G}],[0,{[H]:I}],[()=>At,{[H]:W}]],2],Pt=[3,Y,ft,0,[St],[[()=>Ft,16]],1],Ft=[3,Y,dt,0,[N,J,R,W,V],[[()=>jt,{[H]:N}],[0,{[H]:J}],[1,{[H]:R}],[()=>At,{[H]:W}],[0,{[H]:V}]],4],It=[9,Y,ct,{[vt]:[`POST`,`/v1/token`,200]},()=>Mt,()=>Pt]})),Rt,zt,Bt,Vt,Ht,Ut=e((()=>{s(),se(),pe(),Rt=o(),zt=je(),Bt=a(),Vt=i(),ze(),Qe(),Lt(),Ht=e=>({apiVersion:`2023-01-01`,base64Decoder:e?.base64Decoder??Bt.fromBase64,base64Encoder:e?.base64Encoder??Bt.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ze,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new De},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new Ae}],logger:e?.logger??new Rt.NoOpLogger,protocol:e?.protocol??ae,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.signin`,errorTypeRegistries:kt,version:`2023-01-01`,serviceTarget:`Signin`},serviceId:e?.serviceId??`Signin`,urlParser:e?.urlParser??zt.parseUrl,utf8Decoder:e?.utf8Decoder??Vt.fromUtf8,utf8Encoder:e?.utf8Encoder??Vt.toUtf8})})),Wt,Z,Gt,Kt,Q,qt,Jt,Yt,Xt,Zt,Qt,$t=e((()=>{r(),s(),Wt=fe(),Z=Se(),Gt=ye(),Kt=he(),Q=Me(),qt=ne(),Jt=o(),Yt=Te(),Xt=Ce(),Zt=_e(),Ut(),Qt=e=>{(0,Jt.emitWarningIfUnsupportedVersion)(process.version);let t=(0,Xt.resolveDefaultsModeConfig)(e),r=()=>t().then(Jt.loadConfigsForDefaultMode),i=Ht(e);n(process.version);let a={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,Q.loadConfig)(xe,a),bodyLengthChecker:e?.bodyLengthChecker??Yt.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Wt.createDefaultUserAgentProvider)({serviceId:i.serviceId,clientVersion:Ne}),maxAttempts:e?.maxAttempts??(0,Q.loadConfig)(Kt.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,Q.loadConfig)(Z.NODE_REGION_CONFIG_OPTIONS,{...Z.NODE_REGION_CONFIG_FILE_OPTIONS,...a}),requestHandler:qt.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,Q.loadConfig)({...Kt.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||Zt.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Gt.Hash.bind(null,`sha256`),streamCollector:e?.streamCollector??qt.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,Q.loadConfig)(Z.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,a),useFipsEndpoint:e?.useFipsEndpoint??(0,Q.loadConfig)(Z.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,a),userAgentAppId:e?.userAgentAppId??(0,Q.loadConfig)(Wt.NODE_APP_ID_CONFIG_OPTIONS,a)}}})),en,tn,nn=e((()=>{en=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},tn=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})})),$,rn,an,on,sn=e((()=>{$=Ee(),rn=t(),an=o(),nn(),on=(e,t)=>{let n=Object.assign((0,$.getAwsRegionExtensionConfiguration)(e),(0,an.getDefaultExtensionConfiguration)(e),(0,rn.getHttpHandlerExtensionConfiguration)(e),en(e));return t.forEach(e=>e.configure(n)),Object.assign(e,(0,$.resolveAwsRegionExtensionConfiguration)(n),(0,an.resolveDefaultRuntimeConfig)(n),(0,rn.resolveHttpHandlerRuntimeConfig)(n),tn(n))}})),cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn=e((()=>{cn=le(),ln=ce(),un=be(),dn=ve(),fn=Se(),pe(),re(),pn=we(),mn=ge(),hn=he(),gn=o(),ze(),He(),$t(),sn(),_n=class extends gn.Client{config;constructor(...[e]){let t=Qt(e||{});super(t),this.initConfig=t;let n=on(Re((0,mn.resolveEndpointConfig)((0,cn.resolveHostHeaderConfig)((0,fn.resolveRegionConfig)((0,hn.resolveRetryConfig)((0,dn.resolveUserAgentConfig)(Be(t))))))),e?.extensions||[]);this.config=n,this.middlewareStack.use(ie(this.config)),this.middlewareStack.use((0,dn.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,hn.getRetryPlugin)(this.config)),this.middlewareStack.use((0,pn.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,cn.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,ln.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,un.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(ke(this.config,{httpAuthSchemeParametersProvider:Ie,identityProviderConfigProvider:async e=>new ue({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(oe(this.config))}destroy(){super.destroy()}}})),yn,bn,xn,Sn=e((()=>{yn=ge(),bn=o(),He(),Lt(),xn=class extends bn.Command.classBuilder().ep(Ve).m(function(e,t,n,r){return[(0,yn.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]}).s(`Signin`,`CreateOAuth2Token`,{}).n(`SigninClient`,`CreateOAuth2TokenCommand`).sc(It).build(){}})),Cn,wn,Tn,En=e((()=>{Cn=o(),Sn(),vn(),wn={CreateOAuth2TokenCommand:xn},Tn=class extends _n{},(0,Cn.createAggregatedClient)(wn,Tn)})),Dn=e((()=>{Sn()})),On=e((()=>{})),kn=e((()=>{}));e((()=>{vn(),En(),Dn(),Lt(),On(),at(),kn(),et()}))();export{xn as CreateOAuth2TokenCommand,_n as SigninClient}; \ No newline at end of file +import{n as e}from"./chunk-Bdh3yLIe.js";import{t}from"./dist-cjs-BU-OH1DU.js";import{i as n,n as r}from"./client-D8hez-QA.js";import{t as i}from"./dist-cjs-BKjtSutv.js";import{B as a,D as ee,N as te,R as ne,T as re,k as ie,t as o}from"./dist-cjs-CHwZlzSt.js";import{A as ae,C as oe,D as se,M as ce,N as le,S as ue,_ as de,a as fe,b as pe,c as me,d as he,f as ge,g as _e,h as ve,i as ye,j as be,l as xe,m as Se,n as Ce,p as we,r as Te,s,t as Ee,u as De,v as Oe,w as ke,x as Ae}from"./dist-cjs-DAPjxWOj.js";import{t as je}from"./dist-cjs-BLKf4vef.js";import{t as Me}from"./dist-cjs-DHscMTSt.js";import{t as Ne}from"./package-DTfM1tyi.js";function Pe(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`signin`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Fe(e){return{schemeId:`smithy.api#noAuth`}}var c,Ie,Le,Re,ze=e((()=>{s(),c=te(),Ie=async(e,t,n)=>({operation:(0,c.getSmithyContext)(t).operation,region:await(0,c.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Le=e=>{let t=[];switch(e.operation){case`CreateOAuth2Token`:t.push(Fe(e));break;default:t.push(Pe(e))}return t},Re=e=>{let t=me(e);return Object.assign(t,{authSchemePreference:(0,c.normalizeProvider)(e.authSchemePreference??[])})}})),Be,Ve,He=e((()=>{Be=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:`signin`}),Ve={UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}})),l,u,d,f,Ue,We,p,m,h,g,_,v,y,b,Ge,x,S,C,w,T,E,D,O,k,Ke,qe,Je=e((()=>{l=`required`,u=`fn`,d=`argv`,f=`ref`,Ue=!0,We=`isSet`,p=`booleanEquals`,m=`error`,h=`endpoint`,g=`tree`,_=`PartitionResult`,v=`stringEquals`,y={[l]:!0,default:!1,type:`boolean`},b={[l]:!1,type:`string`},Ge={[f]:`Endpoint`},x={[u]:p,[d]:[{[f]:`UseFIPS`},!0]},S={[u]:p,[d]:[{[f]:`UseDualStack`},!0]},C={},w={[u]:`getAttr`,[d]:[{[f]:_},`name`]},T={[u]:p,[d]:[{[f]:`UseFIPS`},!1]},E={[u]:p,[d]:[{[f]:`UseDualStack`},!1]},D={[u]:`getAttr`,[d]:[{[f]:_},`supportsFIPS`]},O={[u]:p,[d]:[!0,{[u]:`getAttr`,[d]:[{[f]:_},`supportsDualStack`]}]},k=[{[f]:`Region`}],Ke={version:`1.0`,parameters:{UseDualStack:y,UseFIPS:y,Endpoint:b,Region:b},rules:[{conditions:[{[u]:We,[d]:[Ge]}],rules:[{conditions:[x],error:`Invalid Configuration: FIPS and custom endpoint are not supported`,type:m},{rules:[{conditions:[S],error:`Invalid Configuration: Dualstack and custom endpoint are not supported`,type:m},{endpoint:{url:Ge,properties:C,headers:C},type:h}],type:g}],type:g},{rules:[{conditions:[{[u]:We,[d]:k}],rules:[{conditions:[{[u]:`aws.partition`,[d]:k,assign:_}],rules:[{conditions:[{[u]:v,[d]:[w,`aws`]},T,E],endpoint:{url:`https://{Region}.signin.aws.amazon.com`,properties:C,headers:C},type:h},{conditions:[{[u]:v,[d]:[w,`aws-cn`]},T,E],endpoint:{url:`https://{Region}.signin.amazonaws.cn`,properties:C,headers:C},type:h},{conditions:[{[u]:v,[d]:[w,`aws-us-gov`]},T,E],endpoint:{url:`https://{Region}.signin.amazonaws-us-gov.com`,properties:C,headers:C},type:h},{conditions:[x,S],rules:[{conditions:[{[u]:p,[d]:[Ue,D]},O],rules:[{endpoint:{url:`https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:C,headers:C},type:h}],type:g},{error:`FIPS and DualStack are enabled, but this partition does not support one or both`,type:m}],type:g},{conditions:[x,E],rules:[{conditions:[{[u]:p,[d]:[D,Ue]}],rules:[{endpoint:{url:`https://signin-fips.{Region}.{PartitionResult#dnsSuffix}`,properties:C,headers:C},type:h}],type:g},{error:`FIPS is enabled but this partition does not support FIPS`,type:m}],type:g},{conditions:[T,S],rules:[{conditions:[O],rules:[{endpoint:{url:`https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:C,headers:C},type:h}],type:g},{error:`DualStack is enabled but this partition does not support DualStack`,type:m}],type:g},{endpoint:{url:`https://signin.{Region}.{PartitionResult#dnsSuffix}`,properties:C,headers:C},type:h}],type:g}],type:g},{error:`Invalid Configuration: Missing Region`,type:m}],type:g}]},qe=Ke})),Ye,A,Xe,Ze,Qe=e((()=>{Ye=de(),A=Oe(),Je(),Xe=new A.EndpointCache({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`]}),Ze=(e,t={})=>Xe.get(e,()=>(0,A.resolveEndpoint)(qe,{endpointParams:e,logger:t.logger})),A.customEndpointFunctions.aws=Ye.awsEndpointFunctions})),$e,j,et=e((()=>{$e=o(),j=class e extends $e.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),tt,nt,rt,it,at=e((()=>{et(),tt=class e extends j{name=`AccessDeniedException`;$fault=`client`;error;constructor(t){super({name:`AccessDeniedException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},nt=class e extends j{name=`InternalServerException`;$fault=`server`;error;constructor(t){super({name:`InternalServerException`,$fault:`server`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},rt=class e extends j{name=`TooManyRequestsError`;$fault=`client`;error;constructor(t){super({name:`TooManyRequestsError`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},it=class e extends j{name=`ValidationException`;$fault=`client`;error;constructor(t){super({name:`ValidationException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}}})),ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,M,N,P,F,I,_t,L,R,z,vt,B,V,H,U,W,G,K,q,yt,bt,xt,St,J,Y,Ct,wt,X,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt=e((()=>{re(),at(),et(),ot=`AccessDeniedException`,st=`AccessToken`,ct=`CreateOAuth2Token`,lt=`CreateOAuth2TokenRequest`,ut=`CreateOAuth2TokenRequestBody`,dt=`CreateOAuth2TokenResponseBody`,ft=`CreateOAuth2TokenResponse`,pt=`InternalServerException`,mt=`RefreshToken`,ht=`TooManyRequestsError`,gt=`ValidationException`,M=`accessKeyId`,N=`accessToken`,P=`client`,F=`clientId`,I=`codeVerifier`,_t=`code`,L=`error`,R=`expiresIn`,z=`grantType`,vt=`http`,B=`httpError`,V=`idToken`,H=`jsonName`,U=`message`,W=`refreshToken`,G=`redirectUri`,K=`smithy.ts.sdk.synthetic.com.amazonaws.signin`,q=`secretAccessKey`,yt=`sessionToken`,bt=`server`,xt=`tokenInput`,St=`tokenOutput`,J=`tokenType`,Y=`com.amazonaws.signin`,Ct=ee.for(K),wt=[-3,K,`SigninServiceException`,0,[],[]],Ct.registerError(wt,j),X=ee.for(Y),Tt=[-3,Y,ot,{[L]:P},[L,U],[0,0],2],X.registerError(Tt,tt),Et=[-3,Y,pt,{[L]:bt,[B]:500},[L,U],[0,0],2],X.registerError(Et,nt),Dt=[-3,Y,ht,{[L]:P,[B]:429},[L,U],[0,0],2],X.registerError(Dt,rt),Ot=[-3,Y,gt,{[L]:P,[B]:400},[L,U],[0,0],2],X.registerError(Ot,it),kt=[Ct,X],At=[0,Y,mt,8,0],jt=[3,Y,st,8,[M,q,yt],[[0,{[H]:M}],[0,{[H]:q}],[0,{[H]:yt}]],3],Mt=[3,Y,lt,0,[xt],[[()=>Nt,16]],1],Nt=[3,Y,ut,0,[F,z,_t,G,I,W],[[0,{[H]:F}],[0,{[H]:z}],0,[0,{[H]:G}],[0,{[H]:I}],[()=>At,{[H]:W}]],2],Pt=[3,Y,ft,0,[St],[[()=>Ft,16]],1],Ft=[3,Y,dt,0,[N,J,R,W,V],[[()=>jt,{[H]:N}],[0,{[H]:J}],[1,{[H]:R}],[()=>At,{[H]:W}],[0,{[H]:V}]],4],It=[9,Y,ct,{[vt]:[`POST`,`/v1/token`,200]},()=>Mt,()=>Pt]})),Rt,zt,Bt,Vt,Ht,Ut=e((()=>{s(),se(),pe(),Rt=o(),zt=je(),Bt=a(),Vt=i(),ze(),Qe(),Lt(),Ht=e=>({apiVersion:`2023-01-01`,base64Decoder:e?.base64Decoder??Bt.fromBase64,base64Encoder:e?.base64Encoder??Bt.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ze,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new De},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new Ae}],logger:e?.logger??new Rt.NoOpLogger,protocol:e?.protocol??ae,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.signin`,errorTypeRegistries:kt,version:`2023-01-01`,serviceTarget:`Signin`},serviceId:e?.serviceId??`Signin`,urlParser:e?.urlParser??zt.parseUrl,utf8Decoder:e?.utf8Decoder??Vt.fromUtf8,utf8Encoder:e?.utf8Encoder??Vt.toUtf8})})),Wt,Z,Gt,Kt,Q,qt,Jt,Yt,Xt,Zt,Qt,$t=e((()=>{r(),s(),Wt=fe(),Z=Se(),Gt=ye(),Kt=he(),Q=Me(),qt=ne(),Jt=o(),Yt=Te(),Xt=Ce(),Zt=_e(),Ut(),Qt=e=>{(0,Jt.emitWarningIfUnsupportedVersion)(process.version);let t=(0,Xt.resolveDefaultsModeConfig)(e),r=()=>t().then(Jt.loadConfigsForDefaultMode),i=Ht(e);n(process.version);let a={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,Q.loadConfig)(xe,a),bodyLengthChecker:e?.bodyLengthChecker??Yt.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Wt.createDefaultUserAgentProvider)({serviceId:i.serviceId,clientVersion:Ne}),maxAttempts:e?.maxAttempts??(0,Q.loadConfig)(Kt.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,Q.loadConfig)(Z.NODE_REGION_CONFIG_OPTIONS,{...Z.NODE_REGION_CONFIG_FILE_OPTIONS,...a}),requestHandler:qt.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,Q.loadConfig)({...Kt.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||Zt.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Gt.Hash.bind(null,`sha256`),streamCollector:e?.streamCollector??qt.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,Q.loadConfig)(Z.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,a),useFipsEndpoint:e?.useFipsEndpoint??(0,Q.loadConfig)(Z.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,a),userAgentAppId:e?.userAgentAppId??(0,Q.loadConfig)(Wt.NODE_APP_ID_CONFIG_OPTIONS,a)}}})),en,tn,nn=e((()=>{en=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},tn=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})})),$,rn,an,on,sn=e((()=>{$=Ee(),rn=t(),an=o(),nn(),on=(e,t)=>{let n=Object.assign((0,$.getAwsRegionExtensionConfiguration)(e),(0,an.getDefaultExtensionConfiguration)(e),(0,rn.getHttpHandlerExtensionConfiguration)(e),en(e));return t.forEach(e=>e.configure(n)),Object.assign(e,(0,$.resolveAwsRegionExtensionConfiguration)(n),(0,an.resolveDefaultRuntimeConfig)(n),(0,rn.resolveHttpHandlerRuntimeConfig)(n),tn(n))}})),cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn=e((()=>{cn=le(),ln=ce(),un=be(),dn=ve(),fn=Se(),pe(),re(),pn=we(),mn=ge(),hn=he(),gn=o(),ze(),He(),$t(),sn(),_n=class extends gn.Client{config;constructor(...[e]){let t=Qt(e||{});super(t),this.initConfig=t;let n=on(Re((0,mn.resolveEndpointConfig)((0,cn.resolveHostHeaderConfig)((0,fn.resolveRegionConfig)((0,hn.resolveRetryConfig)((0,dn.resolveUserAgentConfig)(Be(t))))))),e?.extensions||[]);this.config=n,this.middlewareStack.use(ie(this.config)),this.middlewareStack.use((0,dn.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,hn.getRetryPlugin)(this.config)),this.middlewareStack.use((0,pn.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,cn.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,ln.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,un.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(ke(this.config,{httpAuthSchemeParametersProvider:Ie,identityProviderConfigProvider:async e=>new ue({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(oe(this.config))}destroy(){super.destroy()}}})),yn,bn,xn,Sn=e((()=>{yn=ge(),bn=o(),He(),Lt(),xn=class extends bn.Command.classBuilder().ep(Ve).m(function(e,t,n,r){return[(0,yn.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]}).s(`Signin`,`CreateOAuth2Token`,{}).n(`SigninClient`,`CreateOAuth2TokenCommand`).sc(It).build(){}})),Cn,wn,Tn,En=e((()=>{Cn=o(),Sn(),vn(),wn={CreateOAuth2TokenCommand:xn},Tn=class extends _n{},(0,Cn.createAggregatedClient)(wn,Tn)})),Dn=e((()=>{Sn()})),On=e((()=>{})),kn=e((()=>{}));e((()=>{vn(),En(),Dn(),Lt(),On(),at(),kn(),et()}))();export{xn as CreateOAuth2TokenCommand,_n as SigninClient}; \ No newline at end of file diff --git a/dist/sso-oidc-CVyyhNFv.js b/dist/sso-oidc-B8DmKhEs.js similarity index 99% rename from dist/sso-oidc-CVyyhNFv.js rename to dist/sso-oidc-B8DmKhEs.js index 8493369a..ca6c5243 100644 --- a/dist/sso-oidc-CVyyhNFv.js +++ b/dist/sso-oidc-B8DmKhEs.js @@ -1 +1 @@ -import{n as e}from"./chunk-Bdh3yLIe.js";import{t}from"./dist-cjs-BU-OH1DU.js";import{i as n,n as r}from"./client-D8hez-QA.js";import{t as i}from"./dist-cjs-BKjtSutv.js";import{B as a,D as ee,N as te,R as ne,T as re,k as ie,t as o}from"./dist-cjs-CHwZlzSt.js";import{A as ae,C as oe,D as se,M as ce,N as le,S as ue,_ as de,a as fe,b as pe,c as me,d as he,f as ge,g as _e,h as ve,i as ye,j as be,l as xe,m as Se,n as Ce,p as we,r as Te,s,t as Ee,u as De,v as Oe,w as ke,x as Ae}from"./dist-cjs-vGYnjJIN.js";import{t as je}from"./dist-cjs-BLKf4vef.js";import{t as Me}from"./dist-cjs-DHscMTSt.js";import{t as Ne}from"./package-DTfM1tyi.js";function Pe(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`sso-oauth`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Fe(e){return{schemeId:`smithy.api#noAuth`}}var c,Ie,Le,Re,ze=e((()=>{s(),c=te(),Ie=async(e,t,n)=>({operation:(0,c.getSmithyContext)(t).operation,region:await(0,c.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Le=e=>{let t=[];switch(e.operation){case`CreateToken`:t.push(Fe(e));break;default:t.push(Pe(e))}return t},Re=e=>{let t=me(e);return Object.assign(t,{authSchemePreference:(0,c.normalizeProvider)(e.authSchemePreference??[])})}})),Be,Ve,He=e((()=>{Be=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:`sso-oauth`}),Ve={UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}})),l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,Ue,O,k,A,j,We,Ge,Ke=e((()=>{l=`required`,u=`fn`,d=`argv`,f=`ref`,p=!0,m=`isSet`,h=`booleanEquals`,g=`error`,_=`endpoint`,v=`tree`,y=`PartitionResult`,b=`getAttr`,x={[l]:!1,type:`string`},S={[l]:!0,default:!1,type:`boolean`},C={[f]:`Endpoint`},w={[u]:h,[d]:[{[f]:`UseFIPS`},!0]},T={[u]:h,[d]:[{[f]:`UseDualStack`},!0]},E={},D={[u]:b,[d]:[{[f]:y},`supportsFIPS`]},Ue={[f]:y},O={[u]:h,[d]:[!0,{[u]:b,[d]:[Ue,`supportsDualStack`]}]},k=[w],A=[T],j=[{[f]:`Region`}],We={version:`1.0`,parameters:{Region:x,UseDualStack:S,UseFIPS:S,Endpoint:x},rules:[{conditions:[{[u]:m,[d]:[C]}],rules:[{conditions:k,error:`Invalid Configuration: FIPS and custom endpoint are not supported`,type:g},{conditions:A,error:`Invalid Configuration: Dualstack and custom endpoint are not supported`,type:g},{endpoint:{url:C,properties:E,headers:E},type:_}],type:v},{conditions:[{[u]:m,[d]:j}],rules:[{conditions:[{[u]:`aws.partition`,[d]:j,assign:y}],rules:[{conditions:[w,T],rules:[{conditions:[{[u]:h,[d]:[p,D]},O],rules:[{endpoint:{url:`https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:E,headers:E},type:_}],type:v},{error:`FIPS and DualStack are enabled, but this partition does not support one or both`,type:g}],type:v},{conditions:k,rules:[{conditions:[{[u]:h,[d]:[D,p]}],rules:[{conditions:[{[u]:`stringEquals`,[d]:[{[u]:b,[d]:[Ue,`name`]},`aws-us-gov`]}],endpoint:{url:`https://oidc.{Region}.amazonaws.com`,properties:E,headers:E},type:_},{endpoint:{url:`https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}`,properties:E,headers:E},type:_}],type:v},{error:`FIPS is enabled but this partition does not support FIPS`,type:g}],type:v},{conditions:A,rules:[{conditions:[O],rules:[{endpoint:{url:`https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:E,headers:E},type:_}],type:v},{error:`DualStack is enabled but this partition does not support DualStack`,type:g}],type:v},{endpoint:{url:`https://oidc.{Region}.{PartitionResult#dnsSuffix}`,properties:E,headers:E},type:_}],type:v}],type:v},{error:`Invalid Configuration: Missing Region`,type:g}]},Ge=We})),qe,M,Je,Ye,Xe=e((()=>{qe=de(),M=Oe(),Ke(),Je=new M.EndpointCache({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`]}),Ye=(e,t={})=>Je.get(e,()=>(0,M.resolveEndpoint)(Ge,{endpointParams:e,logger:t.logger})),M.customEndpointFunctions.aws=qe.awsEndpointFunctions})),Ze,N,P=e((()=>{Ze=o(),N=class e extends Ze.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt=e((()=>{P(),Qe=class e extends N{name=`AccessDeniedException`;$fault=`client`;error;reason;error_description;constructor(t){super({name:`AccessDeniedException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},$e=class e extends N{name=`AuthorizationPendingException`;$fault=`client`;error;error_description;constructor(t){super({name:`AuthorizationPendingException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},et=class e extends N{name=`ExpiredTokenException`;$fault=`client`;error;error_description;constructor(t){super({name:`ExpiredTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},tt=class e extends N{name=`InternalServerException`;$fault=`server`;error;error_description;constructor(t){super({name:`InternalServerException`,$fault:`server`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},nt=class e extends N{name=`InvalidClientException`;$fault=`client`;error;error_description;constructor(t){super({name:`InvalidClientException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},rt=class e extends N{name=`InvalidGrantException`;$fault=`client`;error;error_description;constructor(t){super({name:`InvalidGrantException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},it=class e extends N{name=`InvalidRequestException`;$fault=`client`;error;reason;error_description;constructor(t){super({name:`InvalidRequestException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},at=class e extends N{name=`InvalidScopeException`;$fault=`client`;error;error_description;constructor(t){super({name:`InvalidScopeException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},ot=class e extends N{name=`SlowDownException`;$fault=`client`;error;error_description;constructor(t){super({name:`SlowDownException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},st=class e extends N{name=`UnauthorizedClientException`;$fault=`client`;error;error_description;constructor(t){super({name:`UnauthorizedClientException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},ct=class e extends N{name=`UnsupportedGrantTypeException`;$fault=`client`;error;error_description;constructor(t){super({name:`UnsupportedGrantTypeException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}}})),ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,F,At,jt,Mt,Nt,Pt,I,Ft,L,It,Lt,R,Rt,z,B,zt,V,Bt,Vt,Ht,H,U,Ut,W,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,G,sn,cn,ln,K=e((()=>{re(),lt(),P(),ut=`AccessDeniedException`,dt=`AuthorizationPendingException`,ft=`AccessToken`,pt=`ClientSecret`,mt=`CreateToken`,ht=`CreateTokenRequest`,gt=`CreateTokenResponse`,_t=`CodeVerifier`,vt=`ExpiredTokenException`,yt=`InvalidClientException`,bt=`InvalidGrantException`,xt=`InvalidRequestException`,St=`InternalServerException`,Ct=`InvalidScopeException`,wt=`IdToken`,Tt=`RefreshToken`,Et=`SlowDownException`,Dt=`UnauthorizedClientException`,Ot=`UnsupportedGrantTypeException`,kt=`accessToken`,F=`client`,At=`clientId`,jt=`clientSecret`,Mt=`codeVerifier`,Nt=`code`,Pt=`deviceCode`,I=`error`,Ft=`expiresIn`,L=`error_description`,It=`grantType`,Lt=`http`,R=`httpError`,Rt=`idToken`,z=`reason`,B=`refreshToken`,zt=`redirectUri`,V=`smithy.ts.sdk.synthetic.com.amazonaws.ssooidc`,Bt=`scope`,Vt=`server`,Ht=`tokenType`,H=`com.amazonaws.ssooidc`,U=ee.for(V),Ut=[-3,V,`SSOOIDCServiceException`,0,[],[]],U.registerError(Ut,N),W=ee.for(H),Wt=[-3,H,ut,{[I]:F,[R]:400},[I,z,L],[0,0,0]],W.registerError(Wt,Qe),Gt=[-3,H,dt,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError(Gt,$e),Kt=[-3,H,vt,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError(Kt,et),qt=[-3,H,St,{[I]:Vt,[R]:500},[I,L],[0,0]],W.registerError(qt,tt),Jt=[-3,H,yt,{[I]:F,[R]:401},[I,L],[0,0]],W.registerError(Jt,nt),Yt=[-3,H,bt,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError(Yt,rt),Xt=[-3,H,xt,{[I]:F,[R]:400},[I,z,L],[0,0,0]],W.registerError(Xt,it),Zt=[-3,H,Ct,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError(Zt,at),Qt=[-3,H,Et,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError(Qt,ot),$t=[-3,H,Dt,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError($t,st),en=[-3,H,Ot,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError(en,ct),tn=[U,W],nn=[0,H,ft,8,0],rn=[0,H,pt,8,0],an=[0,H,_t,8,0],on=[0,H,wt,8,0],G=[0,H,Tt,8,0],sn=[3,H,ht,0,[At,jt,It,Pt,Nt,B,Bt,zt,Mt],[0,[()=>rn,0],0,0,0,[()=>G,0],64,0,[()=>an,0]],3],cn=[3,H,gt,0,[kt,Ht,Ft,B,Rt],[[()=>nn,0],0,1,[()=>G,0],[()=>on,0]]],ln=[9,H,mt,{[Lt]:[`POST`,`/token`,200]},()=>sn,()=>cn]})),un,dn,q,J,fn,pn=e((()=>{s(),se(),pe(),un=o(),dn=je(),q=a(),J=i(),ze(),Xe(),K(),fn=e=>({apiVersion:`2019-06-10`,base64Decoder:e?.base64Decoder??q.fromBase64,base64Encoder:e?.base64Encoder??q.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ye,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new De},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new Ae}],logger:e?.logger??new un.NoOpLogger,protocol:e?.protocol??ae,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.ssooidc`,errorTypeRegistries:tn,version:`2019-06-10`,serviceTarget:`AWSSSOOIDCService`},serviceId:e?.serviceId??`SSO OIDC`,urlParser:e?.urlParser??dn.parseUrl,utf8Decoder:e?.utf8Decoder??J.fromUtf8,utf8Encoder:e?.utf8Encoder??J.toUtf8})})),Y,X,mn,Z,Q,$,hn,gn,_n,vn,yn,bn=e((()=>{r(),s(),Y=fe(),X=Se(),mn=ye(),Z=he(),Q=Me(),$=ne(),hn=o(),gn=Te(),_n=Ce(),vn=_e(),pn(),yn=e=>{(0,hn.emitWarningIfUnsupportedVersion)(process.version);let t=(0,_n.resolveDefaultsModeConfig)(e),r=()=>t().then(hn.loadConfigsForDefaultMode),i=fn(e);n(process.version);let a={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,Q.loadConfig)(xe,a),bodyLengthChecker:e?.bodyLengthChecker??gn.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Y.createDefaultUserAgentProvider)({serviceId:i.serviceId,clientVersion:Ne}),maxAttempts:e?.maxAttempts??(0,Q.loadConfig)(Z.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,Q.loadConfig)(X.NODE_REGION_CONFIG_OPTIONS,{...X.NODE_REGION_CONFIG_FILE_OPTIONS,...a}),requestHandler:$.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,Q.loadConfig)({...Z.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||vn.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??mn.Hash.bind(null,`sha256`),streamCollector:e?.streamCollector??$.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,Q.loadConfig)(X.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,a),useFipsEndpoint:e?.useFipsEndpoint??(0,Q.loadConfig)(X.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,a),userAgentAppId:e?.userAgentAppId??(0,Q.loadConfig)(Y.NODE_APP_ID_CONFIG_OPTIONS,a)}}})),xn,Sn,Cn=e((()=>{xn=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},Sn=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})})),wn,Tn,En,Dn,On=e((()=>{wn=Ee(),Tn=t(),En=o(),Cn(),Dn=(e,t)=>{let n=Object.assign((0,wn.getAwsRegionExtensionConfiguration)(e),(0,En.getDefaultExtensionConfiguration)(e),(0,Tn.getHttpHandlerExtensionConfiguration)(e),xn(e));return t.forEach(e=>e.configure(n)),Object.assign(e,(0,wn.resolveAwsRegionExtensionConfiguration)(n),(0,En.resolveDefaultRuntimeConfig)(n),(0,Tn.resolveHttpHandlerRuntimeConfig)(n),Sn(n))}})),kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn=e((()=>{kn=le(),An=ce(),jn=be(),Mn=ve(),Nn=Se(),pe(),re(),Pn=we(),Fn=ge(),In=he(),Ln=o(),ze(),He(),bn(),On(),Rn=class extends Ln.Client{config;constructor(...[e]){let t=yn(e||{});super(t),this.initConfig=t;let n=Dn(Re((0,Fn.resolveEndpointConfig)((0,kn.resolveHostHeaderConfig)((0,Nn.resolveRegionConfig)((0,In.resolveRetryConfig)((0,Mn.resolveUserAgentConfig)(Be(t))))))),e?.extensions||[]);this.config=n,this.middlewareStack.use(ie(this.config)),this.middlewareStack.use((0,Mn.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,In.getRetryPlugin)(this.config)),this.middlewareStack.use((0,Pn.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,kn.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,An.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,jn.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(ke(this.config,{httpAuthSchemeParametersProvider:Ie,identityProviderConfigProvider:async e=>new ue({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(oe(this.config))}destroy(){super.destroy()}}})),Bn,Vn,Hn,Un=e((()=>{Bn=ge(),Vn=o(),He(),K(),Hn=class extends Vn.Command.classBuilder().ep(Ve).m(function(e,t,n,r){return[(0,Bn.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]}).s(`AWSSSOOIDCService`,`CreateToken`,{}).n(`SSOOIDCClient`,`CreateTokenCommand`).sc(ln).build(){}})),Wn,Gn,Kn,qn=e((()=>{Wn=o(),Un(),zn(),Gn={CreateTokenCommand:Hn},Kn=class extends Rn{},(0,Wn.createAggregatedClient)(Gn,Kn)})),Jn=e((()=>{Un()})),Yn=e((()=>{})),Xn=e((()=>{}));e((()=>{zn(),qn(),Jn(),K(),Yn(),lt(),Xn(),P()}))();export{Hn as CreateTokenCommand,Rn as SSOOIDCClient}; \ No newline at end of file +import{n as e}from"./chunk-Bdh3yLIe.js";import{t}from"./dist-cjs-BU-OH1DU.js";import{i as n,n as r}from"./client-D8hez-QA.js";import{t as i}from"./dist-cjs-BKjtSutv.js";import{B as a,D as ee,N as te,R as ne,T as re,k as ie,t as o}from"./dist-cjs-CHwZlzSt.js";import{A as ae,C as oe,D as se,M as ce,N as le,S as ue,_ as de,a as fe,b as pe,c as me,d as he,f as ge,g as _e,h as ve,i as ye,j as be,l as xe,m as Se,n as Ce,p as we,r as Te,s,t as Ee,u as De,v as Oe,w as ke,x as Ae}from"./dist-cjs-DAPjxWOj.js";import{t as je}from"./dist-cjs-BLKf4vef.js";import{t as Me}from"./dist-cjs-DHscMTSt.js";import{t as Ne}from"./package-DTfM1tyi.js";function Pe(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`sso-oauth`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Fe(e){return{schemeId:`smithy.api#noAuth`}}var c,Ie,Le,Re,ze=e((()=>{s(),c=te(),Ie=async(e,t,n)=>({operation:(0,c.getSmithyContext)(t).operation,region:await(0,c.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Le=e=>{let t=[];switch(e.operation){case`CreateToken`:t.push(Fe(e));break;default:t.push(Pe(e))}return t},Re=e=>{let t=me(e);return Object.assign(t,{authSchemePreference:(0,c.normalizeProvider)(e.authSchemePreference??[])})}})),Be,Ve,He=e((()=>{Be=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:`sso-oauth`}),Ve={UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}})),l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,Ue,O,k,A,j,We,Ge,Ke=e((()=>{l=`required`,u=`fn`,d=`argv`,f=`ref`,p=!0,m=`isSet`,h=`booleanEquals`,g=`error`,_=`endpoint`,v=`tree`,y=`PartitionResult`,b=`getAttr`,x={[l]:!1,type:`string`},S={[l]:!0,default:!1,type:`boolean`},C={[f]:`Endpoint`},w={[u]:h,[d]:[{[f]:`UseFIPS`},!0]},T={[u]:h,[d]:[{[f]:`UseDualStack`},!0]},E={},D={[u]:b,[d]:[{[f]:y},`supportsFIPS`]},Ue={[f]:y},O={[u]:h,[d]:[!0,{[u]:b,[d]:[Ue,`supportsDualStack`]}]},k=[w],A=[T],j=[{[f]:`Region`}],We={version:`1.0`,parameters:{Region:x,UseDualStack:S,UseFIPS:S,Endpoint:x},rules:[{conditions:[{[u]:m,[d]:[C]}],rules:[{conditions:k,error:`Invalid Configuration: FIPS and custom endpoint are not supported`,type:g},{conditions:A,error:`Invalid Configuration: Dualstack and custom endpoint are not supported`,type:g},{endpoint:{url:C,properties:E,headers:E},type:_}],type:v},{conditions:[{[u]:m,[d]:j}],rules:[{conditions:[{[u]:`aws.partition`,[d]:j,assign:y}],rules:[{conditions:[w,T],rules:[{conditions:[{[u]:h,[d]:[p,D]},O],rules:[{endpoint:{url:`https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:E,headers:E},type:_}],type:v},{error:`FIPS and DualStack are enabled, but this partition does not support one or both`,type:g}],type:v},{conditions:k,rules:[{conditions:[{[u]:h,[d]:[D,p]}],rules:[{conditions:[{[u]:`stringEquals`,[d]:[{[u]:b,[d]:[Ue,`name`]},`aws-us-gov`]}],endpoint:{url:`https://oidc.{Region}.amazonaws.com`,properties:E,headers:E},type:_},{endpoint:{url:`https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}`,properties:E,headers:E},type:_}],type:v},{error:`FIPS is enabled but this partition does not support FIPS`,type:g}],type:v},{conditions:A,rules:[{conditions:[O],rules:[{endpoint:{url:`https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:E,headers:E},type:_}],type:v},{error:`DualStack is enabled but this partition does not support DualStack`,type:g}],type:v},{endpoint:{url:`https://oidc.{Region}.{PartitionResult#dnsSuffix}`,properties:E,headers:E},type:_}],type:v}],type:v},{error:`Invalid Configuration: Missing Region`,type:g}]},Ge=We})),qe,M,Je,Ye,Xe=e((()=>{qe=de(),M=Oe(),Ke(),Je=new M.EndpointCache({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`]}),Ye=(e,t={})=>Je.get(e,()=>(0,M.resolveEndpoint)(Ge,{endpointParams:e,logger:t.logger})),M.customEndpointFunctions.aws=qe.awsEndpointFunctions})),Ze,N,P=e((()=>{Ze=o(),N=class e extends Ze.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt=e((()=>{P(),Qe=class e extends N{name=`AccessDeniedException`;$fault=`client`;error;reason;error_description;constructor(t){super({name:`AccessDeniedException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},$e=class e extends N{name=`AuthorizationPendingException`;$fault=`client`;error;error_description;constructor(t){super({name:`AuthorizationPendingException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},et=class e extends N{name=`ExpiredTokenException`;$fault=`client`;error;error_description;constructor(t){super({name:`ExpiredTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},tt=class e extends N{name=`InternalServerException`;$fault=`server`;error;error_description;constructor(t){super({name:`InternalServerException`,$fault:`server`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},nt=class e extends N{name=`InvalidClientException`;$fault=`client`;error;error_description;constructor(t){super({name:`InvalidClientException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},rt=class e extends N{name=`InvalidGrantException`;$fault=`client`;error;error_description;constructor(t){super({name:`InvalidGrantException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},it=class e extends N{name=`InvalidRequestException`;$fault=`client`;error;reason;error_description;constructor(t){super({name:`InvalidRequestException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},at=class e extends N{name=`InvalidScopeException`;$fault=`client`;error;error_description;constructor(t){super({name:`InvalidScopeException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},ot=class e extends N{name=`SlowDownException`;$fault=`client`;error;error_description;constructor(t){super({name:`SlowDownException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},st=class e extends N{name=`UnauthorizedClientException`;$fault=`client`;error;error_description;constructor(t){super({name:`UnauthorizedClientException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},ct=class e extends N{name=`UnsupportedGrantTypeException`;$fault=`client`;error;error_description;constructor(t){super({name:`UnsupportedGrantTypeException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}}})),ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,F,At,jt,Mt,Nt,Pt,I,Ft,L,It,Lt,R,Rt,z,B,zt,V,Bt,Vt,Ht,H,U,Ut,W,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,G,sn,cn,ln,K=e((()=>{re(),lt(),P(),ut=`AccessDeniedException`,dt=`AuthorizationPendingException`,ft=`AccessToken`,pt=`ClientSecret`,mt=`CreateToken`,ht=`CreateTokenRequest`,gt=`CreateTokenResponse`,_t=`CodeVerifier`,vt=`ExpiredTokenException`,yt=`InvalidClientException`,bt=`InvalidGrantException`,xt=`InvalidRequestException`,St=`InternalServerException`,Ct=`InvalidScopeException`,wt=`IdToken`,Tt=`RefreshToken`,Et=`SlowDownException`,Dt=`UnauthorizedClientException`,Ot=`UnsupportedGrantTypeException`,kt=`accessToken`,F=`client`,At=`clientId`,jt=`clientSecret`,Mt=`codeVerifier`,Nt=`code`,Pt=`deviceCode`,I=`error`,Ft=`expiresIn`,L=`error_description`,It=`grantType`,Lt=`http`,R=`httpError`,Rt=`idToken`,z=`reason`,B=`refreshToken`,zt=`redirectUri`,V=`smithy.ts.sdk.synthetic.com.amazonaws.ssooidc`,Bt=`scope`,Vt=`server`,Ht=`tokenType`,H=`com.amazonaws.ssooidc`,U=ee.for(V),Ut=[-3,V,`SSOOIDCServiceException`,0,[],[]],U.registerError(Ut,N),W=ee.for(H),Wt=[-3,H,ut,{[I]:F,[R]:400},[I,z,L],[0,0,0]],W.registerError(Wt,Qe),Gt=[-3,H,dt,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError(Gt,$e),Kt=[-3,H,vt,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError(Kt,et),qt=[-3,H,St,{[I]:Vt,[R]:500},[I,L],[0,0]],W.registerError(qt,tt),Jt=[-3,H,yt,{[I]:F,[R]:401},[I,L],[0,0]],W.registerError(Jt,nt),Yt=[-3,H,bt,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError(Yt,rt),Xt=[-3,H,xt,{[I]:F,[R]:400},[I,z,L],[0,0,0]],W.registerError(Xt,it),Zt=[-3,H,Ct,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError(Zt,at),Qt=[-3,H,Et,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError(Qt,ot),$t=[-3,H,Dt,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError($t,st),en=[-3,H,Ot,{[I]:F,[R]:400},[I,L],[0,0]],W.registerError(en,ct),tn=[U,W],nn=[0,H,ft,8,0],rn=[0,H,pt,8,0],an=[0,H,_t,8,0],on=[0,H,wt,8,0],G=[0,H,Tt,8,0],sn=[3,H,ht,0,[At,jt,It,Pt,Nt,B,Bt,zt,Mt],[0,[()=>rn,0],0,0,0,[()=>G,0],64,0,[()=>an,0]],3],cn=[3,H,gt,0,[kt,Ht,Ft,B,Rt],[[()=>nn,0],0,1,[()=>G,0],[()=>on,0]]],ln=[9,H,mt,{[Lt]:[`POST`,`/token`,200]},()=>sn,()=>cn]})),un,dn,q,J,fn,pn=e((()=>{s(),se(),pe(),un=o(),dn=je(),q=a(),J=i(),ze(),Xe(),K(),fn=e=>({apiVersion:`2019-06-10`,base64Decoder:e?.base64Decoder??q.fromBase64,base64Encoder:e?.base64Encoder??q.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ye,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new De},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new Ae}],logger:e?.logger??new un.NoOpLogger,protocol:e?.protocol??ae,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.ssooidc`,errorTypeRegistries:tn,version:`2019-06-10`,serviceTarget:`AWSSSOOIDCService`},serviceId:e?.serviceId??`SSO OIDC`,urlParser:e?.urlParser??dn.parseUrl,utf8Decoder:e?.utf8Decoder??J.fromUtf8,utf8Encoder:e?.utf8Encoder??J.toUtf8})})),Y,X,mn,Z,Q,$,hn,gn,_n,vn,yn,bn=e((()=>{r(),s(),Y=fe(),X=Se(),mn=ye(),Z=he(),Q=Me(),$=ne(),hn=o(),gn=Te(),_n=Ce(),vn=_e(),pn(),yn=e=>{(0,hn.emitWarningIfUnsupportedVersion)(process.version);let t=(0,_n.resolveDefaultsModeConfig)(e),r=()=>t().then(hn.loadConfigsForDefaultMode),i=fn(e);n(process.version);let a={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,Q.loadConfig)(xe,a),bodyLengthChecker:e?.bodyLengthChecker??gn.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Y.createDefaultUserAgentProvider)({serviceId:i.serviceId,clientVersion:Ne}),maxAttempts:e?.maxAttempts??(0,Q.loadConfig)(Z.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,Q.loadConfig)(X.NODE_REGION_CONFIG_OPTIONS,{...X.NODE_REGION_CONFIG_FILE_OPTIONS,...a}),requestHandler:$.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,Q.loadConfig)({...Z.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||vn.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??mn.Hash.bind(null,`sha256`),streamCollector:e?.streamCollector??$.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,Q.loadConfig)(X.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,a),useFipsEndpoint:e?.useFipsEndpoint??(0,Q.loadConfig)(X.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,a),userAgentAppId:e?.userAgentAppId??(0,Q.loadConfig)(Y.NODE_APP_ID_CONFIG_OPTIONS,a)}}})),xn,Sn,Cn=e((()=>{xn=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},Sn=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})})),wn,Tn,En,Dn,On=e((()=>{wn=Ee(),Tn=t(),En=o(),Cn(),Dn=(e,t)=>{let n=Object.assign((0,wn.getAwsRegionExtensionConfiguration)(e),(0,En.getDefaultExtensionConfiguration)(e),(0,Tn.getHttpHandlerExtensionConfiguration)(e),xn(e));return t.forEach(e=>e.configure(n)),Object.assign(e,(0,wn.resolveAwsRegionExtensionConfiguration)(n),(0,En.resolveDefaultRuntimeConfig)(n),(0,Tn.resolveHttpHandlerRuntimeConfig)(n),Sn(n))}})),kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn=e((()=>{kn=le(),An=ce(),jn=be(),Mn=ve(),Nn=Se(),pe(),re(),Pn=we(),Fn=ge(),In=he(),Ln=o(),ze(),He(),bn(),On(),Rn=class extends Ln.Client{config;constructor(...[e]){let t=yn(e||{});super(t),this.initConfig=t;let n=Dn(Re((0,Fn.resolveEndpointConfig)((0,kn.resolveHostHeaderConfig)((0,Nn.resolveRegionConfig)((0,In.resolveRetryConfig)((0,Mn.resolveUserAgentConfig)(Be(t))))))),e?.extensions||[]);this.config=n,this.middlewareStack.use(ie(this.config)),this.middlewareStack.use((0,Mn.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,In.getRetryPlugin)(this.config)),this.middlewareStack.use((0,Pn.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,kn.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,An.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,jn.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(ke(this.config,{httpAuthSchemeParametersProvider:Ie,identityProviderConfigProvider:async e=>new ue({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(oe(this.config))}destroy(){super.destroy()}}})),Bn,Vn,Hn,Un=e((()=>{Bn=ge(),Vn=o(),He(),K(),Hn=class extends Vn.Command.classBuilder().ep(Ve).m(function(e,t,n,r){return[(0,Bn.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]}).s(`AWSSSOOIDCService`,`CreateToken`,{}).n(`SSOOIDCClient`,`CreateTokenCommand`).sc(ln).build(){}})),Wn,Gn,Kn,qn=e((()=>{Wn=o(),Un(),zn(),Gn={CreateTokenCommand:Hn},Kn=class extends Rn{},(0,Wn.createAggregatedClient)(Gn,Kn)})),Jn=e((()=>{Un()})),Yn=e((()=>{})),Xn=e((()=>{}));e((()=>{zn(),qn(),Jn(),K(),Yn(),lt(),Xn(),P()}))();export{Hn as CreateTokenCommand,Rn as SSOOIDCClient}; \ No newline at end of file diff --git a/dist/sts-3986FUMY.js b/dist/sts-BbL48JVY.js similarity index 99% rename from dist/sts-3986FUMY.js rename to dist/sts-BbL48JVY.js index fee96275..7957909f 100644 --- a/dist/sts-3986FUMY.js +++ b/dist/sts-BbL48JVY.js @@ -1 +1 @@ -import{n as e,r as t}from"./chunk-Bdh3yLIe.js";import{t as n}from"./dist-cjs-BU-OH1DU.js";import{i as r,n as i,r as a}from"./client-D8hez-QA.js";import{t as o}from"./dist-cjs-BKjtSutv.js";import{B as s,D as c,N as l,R as u,T as ee,k as te,t as d}from"./dist-cjs-CHwZlzSt.js";import{C as ne,D as re,M as ie,N as ae,S as oe,_ as se,a as ce,b as le,c as ue,d as de,f as fe,g as pe,h as me,i as he,j as ge,k as _e,l as ve,m as ye,n as be,p as xe,r as Se,s as Ce,t as we,u as Te,v as Ee,w as De,x as Oe}from"./dist-cjs-vGYnjJIN.js";import{t as ke}from"./dist-cjs-BLKf4vef.js";import{t as Ae}from"./dist-cjs-DHscMTSt.js";import{t as je}from"./package-DTfM1tyi.js";function Me(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Ne(e){return{schemeId:`smithy.api#noAuth`}}var f,Pe,Fe,Ie,Le,Re=e((()=>{Ce(),f=l(),br(),Pe=async(e,t,n)=>({operation:(0,f.getSmithyContext)(t).operation,region:await(0,f.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Fe=e=>{let t=[];switch(e.operation){case`AssumeRoleWithWebIdentity`:t.push(Ne(e));break;default:t.push(Me(e))}return t},Ie=e=>Object.assign(e,{stsClientCtor:Z}),Le=e=>{let t=ue(Ie(e));return Object.assign(t,{authSchemePreference:(0,f.normalizeProvider)(e.authSchemePreference??[])})}})),ze,Be,Ve=e((()=>{ze=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:`sts`}),Be={UseGlobalEndpoint:{type:`builtInParams`,name:`useGlobalEndpoint`},UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}})),He,p,m,h,g,Ue,_,v,y,We,Ge,Ke,b,qe,x,S,Je,Ye,Xe,Ze,Qe,C,$e,et,tt,w,T,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt=e((()=>{He=`required`,p=`type`,m=`fn`,h=`argv`,g=`ref`,Ue=!1,_=!0,v=`booleanEquals`,y=`stringEquals`,We=`sigv4`,Ge=`sts`,Ke=`us-east-1`,b=`endpoint`,qe=`https://sts.{Region}.{PartitionResult#dnsSuffix}`,x=`tree`,S=`error`,Je=`getAttr`,Ye={[He]:!1,[p]:`string`},Xe={[He]:!0,default:!1,[p]:`boolean`},Ze={[g]:`Endpoint`},Qe={[m]:`isSet`,[h]:[{[g]:`Region`}]},C={[g]:`Region`},$e={[m]:`aws.partition`,[h]:[C],assign:`PartitionResult`},et={[g]:`UseFIPS`},tt={[g]:`UseDualStack`},w={url:`https://sts.amazonaws.com`,properties:{authSchemes:[{name:We,signingName:Ge,signingRegion:Ke}]},headers:{}},T={},nt={conditions:[{[m]:y,[h]:[C,`aws-global`]}],[b]:w,[p]:b},rt={[m]:v,[h]:[et,!0]},it={[m]:v,[h]:[tt,!0]},at={[m]:Je,[h]:[{[g]:`PartitionResult`},`supportsFIPS`]},ot={[g]:`PartitionResult`},st={[m]:v,[h]:[!0,{[m]:Je,[h]:[ot,`supportsDualStack`]}]},ct=[{[m]:`isSet`,[h]:[Ze]}],lt=[rt],ut=[it],dt={version:`1.0`,parameters:{Region:Ye,UseDualStack:Xe,UseFIPS:Xe,Endpoint:Ye,UseGlobalEndpoint:Xe},rules:[{conditions:[{[m]:v,[h]:[{[g]:`UseGlobalEndpoint`},_]},{[m]:`not`,[h]:ct},Qe,$e,{[m]:v,[h]:[et,Ue]},{[m]:v,[h]:[tt,Ue]}],rules:[{conditions:[{[m]:y,[h]:[C,`ap-northeast-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`ap-south-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`ap-southeast-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`ap-southeast-2`]}],endpoint:w,[p]:b},nt,{conditions:[{[m]:y,[h]:[C,`ca-central-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`eu-central-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`eu-north-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`eu-west-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`eu-west-2`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`eu-west-3`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`sa-east-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,Ke]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`us-east-2`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`us-west-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`us-west-2`]}],endpoint:w,[p]:b},{endpoint:{url:qe,properties:{authSchemes:[{name:We,signingName:Ge,signingRegion:`{Region}`}]},headers:T},[p]:b}],[p]:x},{conditions:ct,rules:[{conditions:lt,error:`Invalid Configuration: FIPS and custom endpoint are not supported`,[p]:S},{conditions:ut,error:`Invalid Configuration: Dualstack and custom endpoint are not supported`,[p]:S},{endpoint:{url:Ze,properties:T,headers:T},[p]:b}],[p]:x},{conditions:[Qe],rules:[{conditions:[$e],rules:[{conditions:[rt,it],rules:[{conditions:[{[m]:v,[h]:[_,at]},st],rules:[{endpoint:{url:`https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:T,headers:T},[p]:b}],[p]:x},{error:`FIPS and DualStack are enabled, but this partition does not support one or both`,[p]:S}],[p]:x},{conditions:lt,rules:[{conditions:[{[m]:v,[h]:[at,_]}],rules:[{conditions:[{[m]:y,[h]:[{[m]:Je,[h]:[ot,`name`]},`aws-us-gov`]}],endpoint:{url:`https://sts.{Region}.amazonaws.com`,properties:T,headers:T},[p]:b},{endpoint:{url:`https://sts-fips.{Region}.{PartitionResult#dnsSuffix}`,properties:T,headers:T},[p]:b}],[p]:x},{error:`FIPS is enabled but this partition does not support FIPS`,[p]:S}],[p]:x},{conditions:ut,rules:[{conditions:[st],rules:[{endpoint:{url:`https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:T,headers:T},[p]:b}],[p]:x},{error:`DualStack is enabled but this partition does not support DualStack`,[p]:S}],[p]:x},nt,{endpoint:{url:qe,properties:T,headers:T},[p]:b}],[p]:x}],[p]:x},{error:`Invalid Configuration: Missing Region`,[p]:S}]},ft=dt})),mt,E,ht,gt,_t=e((()=>{mt=se(),E=Ee(),pt(),ht=new E.EndpointCache({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`,`UseGlobalEndpoint`]}),gt=(e,t={})=>ht.get(e,()=>(0,E.resolveEndpoint)(ft,{endpointParams:e,logger:t.logger})),E.customEndpointFunctions.aws=mt.awsEndpointFunctions})),vt,D,yt=e((()=>{vt=d(),D=class e extends vt.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),O,k,A,j,M,N,P,bt=e((()=>{yt(),O=class e extends D{name=`ExpiredTokenException`;$fault=`client`;constructor(t){super({name:`ExpiredTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},k=class e extends D{name=`MalformedPolicyDocumentException`;$fault=`client`;constructor(t){super({name:`MalformedPolicyDocumentException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},A=class e extends D{name=`PackedPolicyTooLargeException`;$fault=`client`;constructor(t){super({name:`PackedPolicyTooLargeException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},j=class e extends D{name=`RegionDisabledException`;$fault=`client`;constructor(t){super({name:`RegionDisabledException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},M=class e extends D{name=`IDPRejectedClaimException`;$fault=`client`;constructor(t){super({name:`IDPRejectedClaimException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},N=class e extends D{name=`InvalidIdentityTokenException`;$fault=`client`;constructor(t){super({name:`InvalidIdentityTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},P=class e extends D{name=`IDPCommunicationErrorException`;$fault=`client`;constructor(t){super({name:`IDPCommunicationErrorException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}}})),xt,St,Ct,wt,Tt,Et,F,Dt,Ot,kt,At,I,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,L,rn,an,on,sn,cn,ln,un,dn,fn,pn,R,z,mn,B,V,H,hn,gn,_n,U,vn,W,G,K,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,q,On,kn,An,jn,J,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn=e((()=>{ee(),bt(),yt(),xt=`Arn`,St=`AccessKeyId`,Ct=`AssumeRole`,wt=`AssumedRoleId`,Tt=`AssumeRoleRequest`,Et=`AssumeRoleResponse`,F=`AssumedRoleUser`,Dt=`AssumeRoleWithWebIdentity`,Ot=`AssumeRoleWithWebIdentityRequest`,kt=`AssumeRoleWithWebIdentityResponse`,At=`Audience`,I=`Credentials`,jt=`ContextAssertion`,Mt=`DurationSeconds`,Nt=`Expiration`,Pt=`ExternalId`,Ft=`ExpiredTokenException`,It=`IDPCommunicationErrorException`,Lt=`IDPRejectedClaimException`,Rt=`InvalidIdentityTokenException`,zt=`Key`,Bt=`MalformedPolicyDocumentException`,Vt=`Policy`,Ht=`PolicyArns`,Ut=`ProviderArn`,Wt=`ProvidedContexts`,Gt=`ProvidedContextsListType`,Kt=`ProvidedContext`,qt=`PolicyDescriptorType`,Jt=`ProviderId`,Yt=`PackedPolicySize`,Xt=`PackedPolicyTooLargeException`,Zt=`Provider`,Qt=`RoleArn`,$t=`RegionDisabledException`,en=`RoleSessionName`,tn=`SecretAccessKey`,nn=`SubjectFromWebIdentityToken`,L=`SourceIdentity`,rn=`SerialNumber`,an=`SessionToken`,on=`Tags`,sn=`TokenCode`,cn=`TransitiveTagKeys`,ln=`Tag`,un=`Value`,dn=`WebIdentityToken`,fn=`arn`,pn=`accessKeySecretType`,R=`awsQueryError`,z=`client`,mn=`clientTokenType`,B=`error`,V=`httpError`,H=`message`,hn=`policyDescriptorListType`,gn=`smithy.ts.sdk.synthetic.com.amazonaws.sts`,_n=`tagListType`,U=`com.amazonaws.sts`,vn=c.for(gn),W=[-3,gn,`STSServiceException`,0,[],[]],vn.registerError(W,D),G=c.for(U),K=[-3,U,Ft,{[R]:[`ExpiredTokenException`,400],[B]:z,[V]:400},[H],[0]],G.registerError(K,O),yn=[-3,U,It,{[R]:[`IDPCommunicationError`,400],[B]:z,[V]:400},[H],[0]],G.registerError(yn,P),bn=[-3,U,Lt,{[R]:[`IDPRejectedClaim`,403],[B]:z,[V]:403},[H],[0]],G.registerError(bn,M),xn=[-3,U,Rt,{[R]:[`InvalidIdentityToken`,400],[B]:z,[V]:400},[H],[0]],G.registerError(xn,N),Sn=[-3,U,Bt,{[R]:[`MalformedPolicyDocument`,400],[B]:z,[V]:400},[H],[0]],G.registerError(Sn,k),Cn=[-3,U,Xt,{[R]:[`PackedPolicyTooLarge`,400],[B]:z,[V]:400},[H],[0]],G.registerError(Cn,A),wn=[-3,U,$t,{[R]:[`RegionDisabledException`,403],[B]:z,[V]:403},[H],[0]],G.registerError(wn,j),Tn=[vn,G],En=[0,U,pn,8,0],Dn=[0,U,mn,8,0],q=[3,U,F,0,[wt,xt],[0,0],2],On=[3,U,Tt,0,[Qt,en,Ht,Vt,Mt,on,cn,Pt,rn,sn,L,Wt],[0,0,()=>Fn,0,1,()=>Ln,64,0,0,0,0,()=>In],2],kn=[3,U,Et,0,[I,F,Yt,L],[[()=>J,0],()=>q,1,0]],An=[3,U,Ot,0,[Qt,en,dn,Jt,Ht,Vt,Mt],[0,0,[()=>Dn,0],0,()=>Fn,0,1],3],jn=[3,U,kt,0,[I,nn,F,Yt,Zt,At,L],[[()=>J,0],0,()=>q,1,0,0,0]],J=[3,U,I,0,[St,tn,an,Nt],[0,[()=>En,0],0,4],4],Mn=[3,U,qt,0,[fn],[0]],Nn=[3,U,Kt,0,[Ut,jt],[0,0]],Pn=[3,U,ln,0,[zt,un],[0,0],2],Fn=[1,U,hn,0,()=>Mn],In=[1,U,Gt,0,()=>Nn],Ln=[1,U,_n,0,()=>Pn],Rn=[9,U,Ct,0,()=>On,()=>kn],zn=[9,U,Dt,0,()=>An,()=>jn]})),Vn,Hn,Un,Wn,Gn,Kn=e((()=>{Ce(),re(),le(),Vn=d(),Hn=ke(),Un=s(),Wn=o(),Re(),_t(),Bn(),Gn=e=>({apiVersion:`2011-06-15`,base64Decoder:e?.base64Decoder??Un.fromBase64,base64Encoder:e?.base64Encoder??Un.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??gt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Fe,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new Te},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new Oe}],logger:e?.logger??new Vn.NoOpLogger,protocol:e?.protocol??_e,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.sts`,errorTypeRegistries:Tn,xmlNamespace:`https://sts.amazonaws.com/doc/2011-06-15/`,version:`2011-06-15`,serviceTarget:`AWSSecurityTokenServiceV20110615`},serviceId:e?.serviceId??`STS`,urlParser:e?.urlParser??Hn.parseUrl,utf8Decoder:e?.utf8Decoder??Wn.fromUtf8,utf8Encoder:e?.utf8Encoder??Wn.toUtf8})})),qn,Y,Jn,Yn,X,Xn,Zn,Qn,$n,er,tr,nr=e((()=>{i(),Ce(),qn=ce(),Y=ye(),le(),Jn=he(),Yn=de(),X=Ae(),Xn=u(),Zn=d(),Qn=Se(),$n=be(),er=pe(),Kn(),tr=e=>{(0,Zn.emitWarningIfUnsupportedVersion)(process.version);let t=(0,$n.resolveDefaultsModeConfig)(e),n=()=>t().then(Zn.loadConfigsForDefaultMode),i=Gn(e);r(process.version);let a={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,X.loadConfig)(ve,a),bodyLengthChecker:e?.bodyLengthChecker??Qn.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,qn.createDefaultUserAgentProvider)({serviceId:i.serviceId,clientVersion:je}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:t=>t.getIdentityProvider(`aws.auth#sigv4`)||(async t=>await e.credentialDefaultProvider(t?.__config||{})()),signer:new Te},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new Oe}],maxAttempts:e?.maxAttempts??(0,X.loadConfig)(Yn.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,X.loadConfig)(Y.NODE_REGION_CONFIG_OPTIONS,{...Y.NODE_REGION_CONFIG_FILE_OPTIONS,...a}),requestHandler:Xn.NodeHttpHandler.create(e?.requestHandler??n),retryMode:e?.retryMode??(0,X.loadConfig)({...Yn.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await n()).retryMode||er.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Jn.Hash.bind(null,`sha256`),streamCollector:e?.streamCollector??Xn.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,X.loadConfig)(Y.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,a),useFipsEndpoint:e?.useFipsEndpoint??(0,X.loadConfig)(Y.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,a),userAgentAppId:e?.userAgentAppId??(0,X.loadConfig)(qn.NODE_APP_ID_CONFIG_OPTIONS,a)}}})),rr,ir,ar=e((()=>{rr=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},ir=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})})),or,sr,cr,lr,ur=e((()=>{or=we(),sr=n(),cr=d(),ar(),lr=(e,t)=>{let n=Object.assign((0,or.getAwsRegionExtensionConfiguration)(e),(0,cr.getDefaultExtensionConfiguration)(e),(0,sr.getHttpHandlerExtensionConfiguration)(e),rr(e));return t.forEach(e=>e.configure(n)),Object.assign(e,(0,or.resolveAwsRegionExtensionConfiguration)(n),(0,cr.resolveDefaultRuntimeConfig)(n),(0,sr.resolveHttpHandlerRuntimeConfig)(n),ir(n))}})),dr,fr,pr,mr,hr,gr,_r,vr,yr,Z,br=e((()=>{dr=ae(),fr=ie(),pr=ge(),mr=me(),hr=ye(),le(),ee(),gr=xe(),_r=fe(),vr=de(),yr=d(),Re(),Ve(),nr(),ur(),Z=class extends yr.Client{config;constructor(...[e]){let t=tr(e||{});super(t),this.initConfig=t;let n=lr(Le((0,_r.resolveEndpointConfig)((0,dr.resolveHostHeaderConfig)((0,hr.resolveRegionConfig)((0,vr.resolveRetryConfig)((0,mr.resolveUserAgentConfig)(ze(t))))))),e?.extensions||[]);this.config=n,this.middlewareStack.use(te(this.config)),this.middlewareStack.use((0,mr.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,vr.getRetryPlugin)(this.config)),this.middlewareStack.use((0,gr.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,dr.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,fr.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,pr.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(De(this.config,{httpAuthSchemeParametersProvider:Pe,identityProviderConfigProvider:async e=>new oe({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(ne(this.config))}destroy(){super.destroy()}}})),xr,Sr,Q,Cr=e((()=>{xr=fe(),Sr=d(),Ve(),Bn(),Q=class extends Sr.Command.classBuilder().ep(Be).m(function(e,t,n,r){return[(0,xr.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]}).s(`AWSSecurityTokenServiceV20110615`,`AssumeRole`,{}).n(`STSClient`,`AssumeRoleCommand`).sc(Rn).build(){}})),wr,Tr,$,Er=e((()=>{wr=fe(),Tr=d(),Ve(),Bn(),$=class extends Tr.Command.classBuilder().ep(Be).m(function(e,t,n,r){return[(0,wr.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]}).s(`AWSSecurityTokenServiceV20110615`,`AssumeRoleWithWebIdentity`,{}).n(`STSClient`,`AssumeRoleWithWebIdentityCommand`).sc(zn).build(){}})),Dr,Or,kr,Ar=e((()=>{Dr=d(),Cr(),Er(),br(),Or={AssumeRoleCommand:Q,AssumeRoleWithWebIdentityCommand:$},kr=class extends Z{},(0,Dr.createAggregatedClient)(Or,kr)})),jr=e((()=>{Cr(),Er()})),Mr=e((()=>{})),Nr,Pr,Fr,Ir,Lr,Rr,zr=e((()=>{i(),Nr=we(),Cr(),Er(),Pr=e=>{if(typeof e?.Arn==`string`){let t=e.Arn.split(`:`);if(t.length>4&&t[4]!==``)return t[4]}},Fr=async(e,t,n,r={})=>{let i=typeof e==`function`?await e():e,a=typeof t==`function`?await t():t,o=``,s=i??a??(o=await(0,Nr.stsRegionDefaultResolver)(r)());return n?.debug?.(`@aws-sdk/client-sts::resolveRegion`,`accepting first of:`,`${i} (credential provider clientConfig)`,`${a} (contextual client)`,`${o} (STS default: AWS_REGION, profile region, or us-east-1)`),s},Ir=(e,t)=>{let n,r;return async(i,o)=>{if(r=i,!n){let{logger:i=e?.parentClientConfig?.logger,profile:a=e?.parentClientConfig?.profile,region:o,requestHandler:s=e?.parentClientConfig?.requestHandler,credentialProviderLogger:c,userAgentAppId:l=e?.parentClientConfig?.userAgentAppId}=e,u=await Fr(o,e?.parentClientConfig?.region,c,{logger:i,profile:a}),ee=!Rr(s);n=new t({...e,userAgentAppId:l,profile:a,credentialDefaultProvider:()=>async()=>r,region:u,requestHandler:ee?s:void 0,logger:i})}let{Credentials:s,AssumedRoleUser:c}=await n.send(new Q(o));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${o.RoleArn}`);let l=Pr(c),u={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,...s.CredentialScope&&{credentialScope:s.CredentialScope},...l&&{accountId:l}};return a(u,`CREDENTIALS_STS_ASSUME_ROLE`,`i`),u}},Lr=(e,t)=>{let n;return async r=>{if(!n){let{logger:r=e?.parentClientConfig?.logger,profile:i=e?.parentClientConfig?.profile,region:a,requestHandler:o=e?.parentClientConfig?.requestHandler,credentialProviderLogger:s,userAgentAppId:c=e?.parentClientConfig?.userAgentAppId}=e,l=await Fr(a,e?.parentClientConfig?.region,s,{logger:r,profile:i}),u=!Rr(o);n=new t({...e,userAgentAppId:c,profile:i,region:l,requestHandler:u?o:void 0,logger:r})}let{Credentials:i,AssumedRoleUser:o}=await n.send(new $(r));if(!i||!i.AccessKeyId||!i.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${r.RoleArn}`);let s=Pr(o),c={accessKeyId:i.AccessKeyId,secretAccessKey:i.SecretAccessKey,sessionToken:i.SessionToken,expiration:i.Expiration,...i.CredentialScope&&{credentialScope:i.CredentialScope},...s&&{accountId:s}};return s&&a(c,`RESOLVED_ACCOUNT_ID`,`T`),a(c,`CREDENTIALS_STS_ASSUME_ROLE_WEB_ID`,`k`),c}},Rr=e=>e?.metadata?.handlerProtocol===`h2`})),Br,Vr,Hr,Ur,Wr=e((()=>{zr(),br(),Br=(e,t)=>t?class extends e{constructor(e){super(e);for(let e of t)this.middlewareStack.use(e)}}:e,Vr=(e={},t)=>Ir(e,Br(Z,t)),Hr=(e={},t)=>Lr(e,Br(Z,t)),Ur=e=>t=>e({roleAssumer:Vr(t),roleAssumerWithWebIdentity:Hr(t),...t})})),Gr=t({AssumeRole$:()=>Rn,AssumeRoleCommand:()=>Q,AssumeRoleRequest$:()=>On,AssumeRoleResponse$:()=>kn,AssumeRoleWithWebIdentity$:()=>zn,AssumeRoleWithWebIdentityCommand:()=>$,AssumeRoleWithWebIdentityRequest$:()=>An,AssumeRoleWithWebIdentityResponse$:()=>jn,AssumedRoleUser$:()=>q,Credentials$:()=>J,ExpiredTokenException:()=>O,ExpiredTokenException$:()=>K,IDPCommunicationErrorException:()=>P,IDPCommunicationErrorException$:()=>yn,IDPRejectedClaimException:()=>M,IDPRejectedClaimException$:()=>bn,InvalidIdentityTokenException:()=>N,InvalidIdentityTokenException$:()=>xn,MalformedPolicyDocumentException:()=>k,MalformedPolicyDocumentException$:()=>Sn,PackedPolicyTooLargeException:()=>A,PackedPolicyTooLargeException$:()=>Cn,PolicyDescriptorType$:()=>Mn,ProvidedContext$:()=>Nn,RegionDisabledException:()=>j,RegionDisabledException$:()=>wn,STS:()=>kr,STSClient:()=>Z,STSServiceException:()=>D,STSServiceException$:()=>W,Tag$:()=>Pn,__Client:()=>yr.Client,decorateDefaultCredentialProvider:()=>Ur,errorTypeRegistries:()=>Tn,getDefaultRoleAssumer:()=>Vr,getDefaultRoleAssumerWithWebIdentity:()=>Hr}),Kr=e((()=>{br(),Ar(),jr(),Bn(),bt(),Mr(),Wr(),yt()}));export{Pn as A,xn as C,Nn as D,Mn as E,N as F,k as I,A as L,O as M,P as N,wn as O,M as P,j as R,bn as S,Cn as T,jn as _,Hr as a,K as b,Q as c,yr as d,Rn as f,An as g,zn as h,Vr as i,Tn as j,W as k,Sr as l,kn as m,Gr as n,kr as o,On as p,Ur as r,$ as s,Kr as t,Z as u,q as v,Sn as w,yn as x,J as y,D as z}; \ No newline at end of file +import{n as e,r as t}from"./chunk-Bdh3yLIe.js";import{t as n}from"./dist-cjs-BU-OH1DU.js";import{i as r,n as i,r as a}from"./client-D8hez-QA.js";import{t as o}from"./dist-cjs-BKjtSutv.js";import{B as s,D as c,N as l,R as u,T as ee,k as te,t as d}from"./dist-cjs-CHwZlzSt.js";import{C as ne,D as re,M as ie,N as ae,S as oe,_ as se,a as ce,b as le,c as ue,d as de,f as fe,g as pe,h as me,i as he,j as ge,k as _e,l as ve,m as ye,n as be,p as xe,r as Se,s as Ce,t as we,u as Te,v as Ee,w as De,x as Oe}from"./dist-cjs-DAPjxWOj.js";import{t as ke}from"./dist-cjs-BLKf4vef.js";import{t as Ae}from"./dist-cjs-DHscMTSt.js";import{t as je}from"./package-DTfM1tyi.js";function Me(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Ne(e){return{schemeId:`smithy.api#noAuth`}}var f,Pe,Fe,Ie,Le,Re=e((()=>{Ce(),f=l(),br(),Pe=async(e,t,n)=>({operation:(0,f.getSmithyContext)(t).operation,region:await(0,f.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Fe=e=>{let t=[];switch(e.operation){case`AssumeRoleWithWebIdentity`:t.push(Ne(e));break;default:t.push(Me(e))}return t},Ie=e=>Object.assign(e,{stsClientCtor:Z}),Le=e=>{let t=ue(Ie(e));return Object.assign(t,{authSchemePreference:(0,f.normalizeProvider)(e.authSchemePreference??[])})}})),ze,Be,Ve=e((()=>{ze=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:`sts`}),Be={UseGlobalEndpoint:{type:`builtInParams`,name:`useGlobalEndpoint`},UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}})),He,p,m,h,g,Ue,_,v,y,We,Ge,Ke,b,qe,x,S,Je,Ye,Xe,Ze,Qe,C,$e,et,tt,w,T,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt=e((()=>{He=`required`,p=`type`,m=`fn`,h=`argv`,g=`ref`,Ue=!1,_=!0,v=`booleanEquals`,y=`stringEquals`,We=`sigv4`,Ge=`sts`,Ke=`us-east-1`,b=`endpoint`,qe=`https://sts.{Region}.{PartitionResult#dnsSuffix}`,x=`tree`,S=`error`,Je=`getAttr`,Ye={[He]:!1,[p]:`string`},Xe={[He]:!0,default:!1,[p]:`boolean`},Ze={[g]:`Endpoint`},Qe={[m]:`isSet`,[h]:[{[g]:`Region`}]},C={[g]:`Region`},$e={[m]:`aws.partition`,[h]:[C],assign:`PartitionResult`},et={[g]:`UseFIPS`},tt={[g]:`UseDualStack`},w={url:`https://sts.amazonaws.com`,properties:{authSchemes:[{name:We,signingName:Ge,signingRegion:Ke}]},headers:{}},T={},nt={conditions:[{[m]:y,[h]:[C,`aws-global`]}],[b]:w,[p]:b},rt={[m]:v,[h]:[et,!0]},it={[m]:v,[h]:[tt,!0]},at={[m]:Je,[h]:[{[g]:`PartitionResult`},`supportsFIPS`]},ot={[g]:`PartitionResult`},st={[m]:v,[h]:[!0,{[m]:Je,[h]:[ot,`supportsDualStack`]}]},ct=[{[m]:`isSet`,[h]:[Ze]}],lt=[rt],ut=[it],dt={version:`1.0`,parameters:{Region:Ye,UseDualStack:Xe,UseFIPS:Xe,Endpoint:Ye,UseGlobalEndpoint:Xe},rules:[{conditions:[{[m]:v,[h]:[{[g]:`UseGlobalEndpoint`},_]},{[m]:`not`,[h]:ct},Qe,$e,{[m]:v,[h]:[et,Ue]},{[m]:v,[h]:[tt,Ue]}],rules:[{conditions:[{[m]:y,[h]:[C,`ap-northeast-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`ap-south-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`ap-southeast-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`ap-southeast-2`]}],endpoint:w,[p]:b},nt,{conditions:[{[m]:y,[h]:[C,`ca-central-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`eu-central-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`eu-north-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`eu-west-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`eu-west-2`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`eu-west-3`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`sa-east-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,Ke]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`us-east-2`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`us-west-1`]}],endpoint:w,[p]:b},{conditions:[{[m]:y,[h]:[C,`us-west-2`]}],endpoint:w,[p]:b},{endpoint:{url:qe,properties:{authSchemes:[{name:We,signingName:Ge,signingRegion:`{Region}`}]},headers:T},[p]:b}],[p]:x},{conditions:ct,rules:[{conditions:lt,error:`Invalid Configuration: FIPS and custom endpoint are not supported`,[p]:S},{conditions:ut,error:`Invalid Configuration: Dualstack and custom endpoint are not supported`,[p]:S},{endpoint:{url:Ze,properties:T,headers:T},[p]:b}],[p]:x},{conditions:[Qe],rules:[{conditions:[$e],rules:[{conditions:[rt,it],rules:[{conditions:[{[m]:v,[h]:[_,at]},st],rules:[{endpoint:{url:`https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:T,headers:T},[p]:b}],[p]:x},{error:`FIPS and DualStack are enabled, but this partition does not support one or both`,[p]:S}],[p]:x},{conditions:lt,rules:[{conditions:[{[m]:v,[h]:[at,_]}],rules:[{conditions:[{[m]:y,[h]:[{[m]:Je,[h]:[ot,`name`]},`aws-us-gov`]}],endpoint:{url:`https://sts.{Region}.amazonaws.com`,properties:T,headers:T},[p]:b},{endpoint:{url:`https://sts-fips.{Region}.{PartitionResult#dnsSuffix}`,properties:T,headers:T},[p]:b}],[p]:x},{error:`FIPS is enabled but this partition does not support FIPS`,[p]:S}],[p]:x},{conditions:ut,rules:[{conditions:[st],rules:[{endpoint:{url:`https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}`,properties:T,headers:T},[p]:b}],[p]:x},{error:`DualStack is enabled but this partition does not support DualStack`,[p]:S}],[p]:x},nt,{endpoint:{url:qe,properties:T,headers:T},[p]:b}],[p]:x}],[p]:x},{error:`Invalid Configuration: Missing Region`,[p]:S}]},ft=dt})),mt,E,ht,gt,_t=e((()=>{mt=se(),E=Ee(),pt(),ht=new E.EndpointCache({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`,`UseGlobalEndpoint`]}),gt=(e,t={})=>ht.get(e,()=>(0,E.resolveEndpoint)(ft,{endpointParams:e,logger:t.logger})),E.customEndpointFunctions.aws=mt.awsEndpointFunctions})),vt,D,yt=e((()=>{vt=d(),D=class e extends vt.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),O,k,A,j,M,N,P,bt=e((()=>{yt(),O=class e extends D{name=`ExpiredTokenException`;$fault=`client`;constructor(t){super({name:`ExpiredTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},k=class e extends D{name=`MalformedPolicyDocumentException`;$fault=`client`;constructor(t){super({name:`MalformedPolicyDocumentException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},A=class e extends D{name=`PackedPolicyTooLargeException`;$fault=`client`;constructor(t){super({name:`PackedPolicyTooLargeException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},j=class e extends D{name=`RegionDisabledException`;$fault=`client`;constructor(t){super({name:`RegionDisabledException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},M=class e extends D{name=`IDPRejectedClaimException`;$fault=`client`;constructor(t){super({name:`IDPRejectedClaimException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},N=class e extends D{name=`InvalidIdentityTokenException`;$fault=`client`;constructor(t){super({name:`InvalidIdentityTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},P=class e extends D{name=`IDPCommunicationErrorException`;$fault=`client`;constructor(t){super({name:`IDPCommunicationErrorException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}}})),xt,St,Ct,wt,Tt,Et,F,Dt,Ot,kt,At,I,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,L,rn,an,on,sn,cn,ln,un,dn,fn,pn,R,z,mn,B,V,H,hn,gn,_n,U,vn,W,G,K,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,q,On,kn,An,jn,J,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn=e((()=>{ee(),bt(),yt(),xt=`Arn`,St=`AccessKeyId`,Ct=`AssumeRole`,wt=`AssumedRoleId`,Tt=`AssumeRoleRequest`,Et=`AssumeRoleResponse`,F=`AssumedRoleUser`,Dt=`AssumeRoleWithWebIdentity`,Ot=`AssumeRoleWithWebIdentityRequest`,kt=`AssumeRoleWithWebIdentityResponse`,At=`Audience`,I=`Credentials`,jt=`ContextAssertion`,Mt=`DurationSeconds`,Nt=`Expiration`,Pt=`ExternalId`,Ft=`ExpiredTokenException`,It=`IDPCommunicationErrorException`,Lt=`IDPRejectedClaimException`,Rt=`InvalidIdentityTokenException`,zt=`Key`,Bt=`MalformedPolicyDocumentException`,Vt=`Policy`,Ht=`PolicyArns`,Ut=`ProviderArn`,Wt=`ProvidedContexts`,Gt=`ProvidedContextsListType`,Kt=`ProvidedContext`,qt=`PolicyDescriptorType`,Jt=`ProviderId`,Yt=`PackedPolicySize`,Xt=`PackedPolicyTooLargeException`,Zt=`Provider`,Qt=`RoleArn`,$t=`RegionDisabledException`,en=`RoleSessionName`,tn=`SecretAccessKey`,nn=`SubjectFromWebIdentityToken`,L=`SourceIdentity`,rn=`SerialNumber`,an=`SessionToken`,on=`Tags`,sn=`TokenCode`,cn=`TransitiveTagKeys`,ln=`Tag`,un=`Value`,dn=`WebIdentityToken`,fn=`arn`,pn=`accessKeySecretType`,R=`awsQueryError`,z=`client`,mn=`clientTokenType`,B=`error`,V=`httpError`,H=`message`,hn=`policyDescriptorListType`,gn=`smithy.ts.sdk.synthetic.com.amazonaws.sts`,_n=`tagListType`,U=`com.amazonaws.sts`,vn=c.for(gn),W=[-3,gn,`STSServiceException`,0,[],[]],vn.registerError(W,D),G=c.for(U),K=[-3,U,Ft,{[R]:[`ExpiredTokenException`,400],[B]:z,[V]:400},[H],[0]],G.registerError(K,O),yn=[-3,U,It,{[R]:[`IDPCommunicationError`,400],[B]:z,[V]:400},[H],[0]],G.registerError(yn,P),bn=[-3,U,Lt,{[R]:[`IDPRejectedClaim`,403],[B]:z,[V]:403},[H],[0]],G.registerError(bn,M),xn=[-3,U,Rt,{[R]:[`InvalidIdentityToken`,400],[B]:z,[V]:400},[H],[0]],G.registerError(xn,N),Sn=[-3,U,Bt,{[R]:[`MalformedPolicyDocument`,400],[B]:z,[V]:400},[H],[0]],G.registerError(Sn,k),Cn=[-3,U,Xt,{[R]:[`PackedPolicyTooLarge`,400],[B]:z,[V]:400},[H],[0]],G.registerError(Cn,A),wn=[-3,U,$t,{[R]:[`RegionDisabledException`,403],[B]:z,[V]:403},[H],[0]],G.registerError(wn,j),Tn=[vn,G],En=[0,U,pn,8,0],Dn=[0,U,mn,8,0],q=[3,U,F,0,[wt,xt],[0,0],2],On=[3,U,Tt,0,[Qt,en,Ht,Vt,Mt,on,cn,Pt,rn,sn,L,Wt],[0,0,()=>Fn,0,1,()=>Ln,64,0,0,0,0,()=>In],2],kn=[3,U,Et,0,[I,F,Yt,L],[[()=>J,0],()=>q,1,0]],An=[3,U,Ot,0,[Qt,en,dn,Jt,Ht,Vt,Mt],[0,0,[()=>Dn,0],0,()=>Fn,0,1],3],jn=[3,U,kt,0,[I,nn,F,Yt,Zt,At,L],[[()=>J,0],0,()=>q,1,0,0,0]],J=[3,U,I,0,[St,tn,an,Nt],[0,[()=>En,0],0,4],4],Mn=[3,U,qt,0,[fn],[0]],Nn=[3,U,Kt,0,[Ut,jt],[0,0]],Pn=[3,U,ln,0,[zt,un],[0,0],2],Fn=[1,U,hn,0,()=>Mn],In=[1,U,Gt,0,()=>Nn],Ln=[1,U,_n,0,()=>Pn],Rn=[9,U,Ct,0,()=>On,()=>kn],zn=[9,U,Dt,0,()=>An,()=>jn]})),Vn,Hn,Un,Wn,Gn,Kn=e((()=>{Ce(),re(),le(),Vn=d(),Hn=ke(),Un=s(),Wn=o(),Re(),_t(),Bn(),Gn=e=>({apiVersion:`2011-06-15`,base64Decoder:e?.base64Decoder??Un.fromBase64,base64Encoder:e?.base64Encoder??Un.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??gt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Fe,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new Te},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new Oe}],logger:e?.logger??new Vn.NoOpLogger,protocol:e?.protocol??_e,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.sts`,errorTypeRegistries:Tn,xmlNamespace:`https://sts.amazonaws.com/doc/2011-06-15/`,version:`2011-06-15`,serviceTarget:`AWSSecurityTokenServiceV20110615`},serviceId:e?.serviceId??`STS`,urlParser:e?.urlParser??Hn.parseUrl,utf8Decoder:e?.utf8Decoder??Wn.fromUtf8,utf8Encoder:e?.utf8Encoder??Wn.toUtf8})})),qn,Y,Jn,Yn,X,Xn,Zn,Qn,$n,er,tr,nr=e((()=>{i(),Ce(),qn=ce(),Y=ye(),le(),Jn=he(),Yn=de(),X=Ae(),Xn=u(),Zn=d(),Qn=Se(),$n=be(),er=pe(),Kn(),tr=e=>{(0,Zn.emitWarningIfUnsupportedVersion)(process.version);let t=(0,$n.resolveDefaultsModeConfig)(e),n=()=>t().then(Zn.loadConfigsForDefaultMode),i=Gn(e);r(process.version);let a={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,X.loadConfig)(ve,a),bodyLengthChecker:e?.bodyLengthChecker??Qn.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,qn.createDefaultUserAgentProvider)({serviceId:i.serviceId,clientVersion:je}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:t=>t.getIdentityProvider(`aws.auth#sigv4`)||(async t=>await e.credentialDefaultProvider(t?.__config||{})()),signer:new Te},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new Oe}],maxAttempts:e?.maxAttempts??(0,X.loadConfig)(Yn.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,X.loadConfig)(Y.NODE_REGION_CONFIG_OPTIONS,{...Y.NODE_REGION_CONFIG_FILE_OPTIONS,...a}),requestHandler:Xn.NodeHttpHandler.create(e?.requestHandler??n),retryMode:e?.retryMode??(0,X.loadConfig)({...Yn.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await n()).retryMode||er.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Jn.Hash.bind(null,`sha256`),streamCollector:e?.streamCollector??Xn.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,X.loadConfig)(Y.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,a),useFipsEndpoint:e?.useFipsEndpoint??(0,X.loadConfig)(Y.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,a),userAgentAppId:e?.userAgentAppId??(0,X.loadConfig)(qn.NODE_APP_ID_CONFIG_OPTIONS,a)}}})),rr,ir,ar=e((()=>{rr=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},ir=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})})),or,sr,cr,lr,ur=e((()=>{or=we(),sr=n(),cr=d(),ar(),lr=(e,t)=>{let n=Object.assign((0,or.getAwsRegionExtensionConfiguration)(e),(0,cr.getDefaultExtensionConfiguration)(e),(0,sr.getHttpHandlerExtensionConfiguration)(e),rr(e));return t.forEach(e=>e.configure(n)),Object.assign(e,(0,or.resolveAwsRegionExtensionConfiguration)(n),(0,cr.resolveDefaultRuntimeConfig)(n),(0,sr.resolveHttpHandlerRuntimeConfig)(n),ir(n))}})),dr,fr,pr,mr,hr,gr,_r,vr,yr,Z,br=e((()=>{dr=ae(),fr=ie(),pr=ge(),mr=me(),hr=ye(),le(),ee(),gr=xe(),_r=fe(),vr=de(),yr=d(),Re(),Ve(),nr(),ur(),Z=class extends yr.Client{config;constructor(...[e]){let t=tr(e||{});super(t),this.initConfig=t;let n=lr(Le((0,_r.resolveEndpointConfig)((0,dr.resolveHostHeaderConfig)((0,hr.resolveRegionConfig)((0,vr.resolveRetryConfig)((0,mr.resolveUserAgentConfig)(ze(t))))))),e?.extensions||[]);this.config=n,this.middlewareStack.use(te(this.config)),this.middlewareStack.use((0,mr.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,vr.getRetryPlugin)(this.config)),this.middlewareStack.use((0,gr.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,dr.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,fr.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,pr.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(De(this.config,{httpAuthSchemeParametersProvider:Pe,identityProviderConfigProvider:async e=>new oe({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(ne(this.config))}destroy(){super.destroy()}}})),xr,Sr,Q,Cr=e((()=>{xr=fe(),Sr=d(),Ve(),Bn(),Q=class extends Sr.Command.classBuilder().ep(Be).m(function(e,t,n,r){return[(0,xr.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]}).s(`AWSSecurityTokenServiceV20110615`,`AssumeRole`,{}).n(`STSClient`,`AssumeRoleCommand`).sc(Rn).build(){}})),wr,Tr,$,Er=e((()=>{wr=fe(),Tr=d(),Ve(),Bn(),$=class extends Tr.Command.classBuilder().ep(Be).m(function(e,t,n,r){return[(0,wr.getEndpointPlugin)(n,e.getEndpointParameterInstructions())]}).s(`AWSSecurityTokenServiceV20110615`,`AssumeRoleWithWebIdentity`,{}).n(`STSClient`,`AssumeRoleWithWebIdentityCommand`).sc(zn).build(){}})),Dr,Or,kr,Ar=e((()=>{Dr=d(),Cr(),Er(),br(),Or={AssumeRoleCommand:Q,AssumeRoleWithWebIdentityCommand:$},kr=class extends Z{},(0,Dr.createAggregatedClient)(Or,kr)})),jr=e((()=>{Cr(),Er()})),Mr=e((()=>{})),Nr,Pr,Fr,Ir,Lr,Rr,zr=e((()=>{i(),Nr=we(),Cr(),Er(),Pr=e=>{if(typeof e?.Arn==`string`){let t=e.Arn.split(`:`);if(t.length>4&&t[4]!==``)return t[4]}},Fr=async(e,t,n,r={})=>{let i=typeof e==`function`?await e():e,a=typeof t==`function`?await t():t,o=``,s=i??a??(o=await(0,Nr.stsRegionDefaultResolver)(r)());return n?.debug?.(`@aws-sdk/client-sts::resolveRegion`,`accepting first of:`,`${i} (credential provider clientConfig)`,`${a} (contextual client)`,`${o} (STS default: AWS_REGION, profile region, or us-east-1)`),s},Ir=(e,t)=>{let n,r;return async(i,o)=>{if(r=i,!n){let{logger:i=e?.parentClientConfig?.logger,profile:a=e?.parentClientConfig?.profile,region:o,requestHandler:s=e?.parentClientConfig?.requestHandler,credentialProviderLogger:c,userAgentAppId:l=e?.parentClientConfig?.userAgentAppId}=e,u=await Fr(o,e?.parentClientConfig?.region,c,{logger:i,profile:a}),ee=!Rr(s);n=new t({...e,userAgentAppId:l,profile:a,credentialDefaultProvider:()=>async()=>r,region:u,requestHandler:ee?s:void 0,logger:i})}let{Credentials:s,AssumedRoleUser:c}=await n.send(new Q(o));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${o.RoleArn}`);let l=Pr(c),u={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,...s.CredentialScope&&{credentialScope:s.CredentialScope},...l&&{accountId:l}};return a(u,`CREDENTIALS_STS_ASSUME_ROLE`,`i`),u}},Lr=(e,t)=>{let n;return async r=>{if(!n){let{logger:r=e?.parentClientConfig?.logger,profile:i=e?.parentClientConfig?.profile,region:a,requestHandler:o=e?.parentClientConfig?.requestHandler,credentialProviderLogger:s,userAgentAppId:c=e?.parentClientConfig?.userAgentAppId}=e,l=await Fr(a,e?.parentClientConfig?.region,s,{logger:r,profile:i}),u=!Rr(o);n=new t({...e,userAgentAppId:c,profile:i,region:l,requestHandler:u?o:void 0,logger:r})}let{Credentials:i,AssumedRoleUser:o}=await n.send(new $(r));if(!i||!i.AccessKeyId||!i.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${r.RoleArn}`);let s=Pr(o),c={accessKeyId:i.AccessKeyId,secretAccessKey:i.SecretAccessKey,sessionToken:i.SessionToken,expiration:i.Expiration,...i.CredentialScope&&{credentialScope:i.CredentialScope},...s&&{accountId:s}};return s&&a(c,`RESOLVED_ACCOUNT_ID`,`T`),a(c,`CREDENTIALS_STS_ASSUME_ROLE_WEB_ID`,`k`),c}},Rr=e=>e?.metadata?.handlerProtocol===`h2`})),Br,Vr,Hr,Ur,Wr=e((()=>{zr(),br(),Br=(e,t)=>t?class extends e{constructor(e){super(e);for(let e of t)this.middlewareStack.use(e)}}:e,Vr=(e={},t)=>Ir(e,Br(Z,t)),Hr=(e={},t)=>Lr(e,Br(Z,t)),Ur=e=>t=>e({roleAssumer:Vr(t),roleAssumerWithWebIdentity:Hr(t),...t})})),Gr=t({AssumeRole$:()=>Rn,AssumeRoleCommand:()=>Q,AssumeRoleRequest$:()=>On,AssumeRoleResponse$:()=>kn,AssumeRoleWithWebIdentity$:()=>zn,AssumeRoleWithWebIdentityCommand:()=>$,AssumeRoleWithWebIdentityRequest$:()=>An,AssumeRoleWithWebIdentityResponse$:()=>jn,AssumedRoleUser$:()=>q,Credentials$:()=>J,ExpiredTokenException:()=>O,ExpiredTokenException$:()=>K,IDPCommunicationErrorException:()=>P,IDPCommunicationErrorException$:()=>yn,IDPRejectedClaimException:()=>M,IDPRejectedClaimException$:()=>bn,InvalidIdentityTokenException:()=>N,InvalidIdentityTokenException$:()=>xn,MalformedPolicyDocumentException:()=>k,MalformedPolicyDocumentException$:()=>Sn,PackedPolicyTooLargeException:()=>A,PackedPolicyTooLargeException$:()=>Cn,PolicyDescriptorType$:()=>Mn,ProvidedContext$:()=>Nn,RegionDisabledException:()=>j,RegionDisabledException$:()=>wn,STS:()=>kr,STSClient:()=>Z,STSServiceException:()=>D,STSServiceException$:()=>W,Tag$:()=>Pn,__Client:()=>yr.Client,decorateDefaultCredentialProvider:()=>Ur,errorTypeRegistries:()=>Tn,getDefaultRoleAssumer:()=>Vr,getDefaultRoleAssumerWithWebIdentity:()=>Hr}),Kr=e((()=>{br(),Ar(),jr(),Bn(),bt(),Mr(),Wr(),yt()}));export{Pn as A,xn as C,Nn as D,Mn as E,N as F,k as I,A as L,O as M,P as N,wn as O,M as P,j as R,bn as S,Cn as T,jn as _,Hr as a,K as b,Q as c,yr as d,Rn as f,An as g,zn as h,Vr as i,Tn as j,W as k,Sr as l,kn as m,Gr as n,kr as o,On as p,Ur as r,$ as s,Kr as t,Z as u,q as v,Sn as w,yn as x,J as y,D as z}; \ No newline at end of file diff --git a/dist/sts-CrgoKTJR.js b/dist/sts-CrgoKTJR.js new file mode 100644 index 00000000..5f126daf --- /dev/null +++ b/dist/sts-CrgoKTJR.js @@ -0,0 +1 @@ +import{i as e,t}from"./sts-BbL48JVY.js";t();export{e as getDefaultRoleAssumer}; \ No newline at end of file diff --git a/dist/sts-DNrP3XaX.js b/dist/sts-DNrP3XaX.js deleted file mode 100644 index 93e3aef6..00000000 --- a/dist/sts-DNrP3XaX.js +++ /dev/null @@ -1 +0,0 @@ -import{i as e,t}from"./sts-3986FUMY.js";t();export{e as getDefaultRoleAssumer}; \ No newline at end of file diff --git a/package.json b/package.json index 0ca6cc27..20ceb86b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@fro-bot/agent", + "name": "@fro-bot/agent-workspace", "version": "0.0.0-development", "private": true, "description": "@fro-bot Agent", @@ -15,15 +15,18 @@ "license": "MIT", "author": "Fro Bot ", "type": "module", - "main": "dist/main.js", + "workspaces": [ + "apps/*", + "packages/*" + ], "scripts": { "bootstrap": "SKIP_INSTALL_SIMPLE_GIT_HOOKS=1 pnpm install --no-strict-peer-dependencies --prefer-offline --loglevel warn", - "build": "pnpm check-types && tsdown", - "check-types": "tsc --noEmit", - "fix": "eslint --fix", + "build": "pnpm --filter @fro-bot/runtime build && pnpm --filter @fro-bot/action build", + "check-types": "pnpm --filter @fro-bot/runtime check-types && pnpm --filter @fro-bot/action check-types", + "fix": "pnpm --filter @fro-bot/runtime fix && pnpm --filter @fro-bot/action fix", "postinstall": "simple-git-hooks", - "lint": "eslint", - "test": "vitest run" + "lint": "pnpm --filter @fro-bot/runtime lint && pnpm --filter @fro-bot/action lint", + "test": "pnpm --filter @fro-bot/runtime test && pnpm --filter @fro-bot/action test" }, "simple-git-hooks": { "pre-commit": "pnpm exec lint-staged", @@ -44,6 +47,7 @@ "@actions/tool-cache": "4.0.0", "@aws-sdk/client-s3": "3.1031.0", "@bfra.me/es": "0.1.0", + "@fro-bot/runtime": "workspace:*", "@octokit/auth-app": "8.2.0", "@opencode-ai/sdk": "1.14.18" }, @@ -72,5 +76,10 @@ "typescript": "6.0.3", "vitest": "4.1.4" }, - "packageManager": "pnpm@10.33.0" + "packageManager": "pnpm@10.33.0", + "pnpm": { + "overrides": { + "fast-xml-parser": ">=5.7.0" + } + } } diff --git a/packages/runtime/package.json b/packages/runtime/package.json new file mode 100644 index 00000000..a4d85193 --- /dev/null +++ b/packages/runtime/package.json @@ -0,0 +1,26 @@ +{ + "name": "@fro-bot/runtime", + "version": "0.0.0-development", + "private": true, + "type": "module", + "exports": { + ".": { + "types": "./src/index.ts", + "import": "./src/index.ts", + "default": "./src/index.ts" + } + }, + "main": "src/index.ts", + "module": "src/index.ts", + "scripts": { + "build": "pnpm exec tsc -p tsconfig.json --noEmit && pnpm exec tsdown src/index.ts --format esm --dts --out-dir dist", + "check-types": "pnpm exec tsc -p tsconfig.json --noEmit", + "fix": "pnpm --dir ../.. exec eslint --fix packages/runtime/src", + "lint": "pnpm --dir ../.. exec eslint packages/runtime/src", + "test": "pnpm exec vitest run --passWithNoTests src" + }, + "dependencies": { + "@bfra.me/es": "0.1.0", + "@opencode-ai/sdk": "1.14.18" + } +} diff --git a/packages/runtime/src/agent/error-format/format.ts b/packages/runtime/src/agent/error-format/format.ts new file mode 100644 index 00000000..feb24b6f --- /dev/null +++ b/packages/runtime/src/agent/error-format/format.ts @@ -0,0 +1,159 @@ +import type {ErrorInfo, ErrorType} from './types.js' + +const ERROR_TYPE_LABELS: Record = { + api_error: 'API Error', + configuration: 'Configuration Error', + internal: 'Internal Error', + llm_fetch_error: 'LLM Fetch Error', + llm_timeout: 'LLM Timeout', + permission: 'Permission Error', + rate_limit: 'Rate Limit', + validation: 'Validation Error', +} + +function getErrorIcon(error: ErrorInfo): string { + if (error.type === 'rate_limit') return ':warning:' + if (error.type === 'llm_timeout') return ':hourglass:' + if (error.type === 'llm_fetch_error') return ':warning:' + if (error.retryable) return ':warning:' + return ':x:' +} + +export function formatErrorComment(error: ErrorInfo): string { + const icon = getErrorIcon(error) + const label = ERROR_TYPE_LABELS[error.type] + const lines: string[] = [] + + lines.push(`${icon} **${label}**`) + lines.push('') + lines.push(error.message) + + if (error.details != null) { + lines.push('') + lines.push(`> ${error.details}`) + } + + if (error.suggestedAction != null) { + lines.push('') + lines.push(`**Suggested action:** ${error.suggestedAction}`) + } + + if (error.retryable) { + lines.push('') + lines.push('_This error is retryable._') + } + + if (error.resetTime != null) { + lines.push('') + lines.push(`_Rate limit resets at: ${error.resetTime.toISOString()}_`) + } + + return lines.join('\n') +} + +export function createErrorInfo( + type: ErrorType, + message: string, + retryable: boolean, + options?: {details?: string; suggestedAction?: string; resetTime?: Date}, +): ErrorInfo { + return { + type, + message, + retryable, + details: options?.details, + suggestedAction: options?.suggestedAction, + resetTime: options?.resetTime, + } +} + +export function createRateLimitError(message: string, resetTime: Date): ErrorInfo { + return createErrorInfo('rate_limit', message, true, { + resetTime, + suggestedAction: `Please wait until ${resetTime.toISOString()} and try again.`, + }) +} + +export function createLLMTimeoutError(message: string): ErrorInfo { + return createErrorInfo('llm_timeout', message, true, { + suggestedAction: 'Try again with a simpler prompt or increased timeout.', + }) +} + +const LLM_FETCH_ERROR_PATTERNS = [ + /fetch failed/i, + /connect\s*timeout/i, + /connecttimeouterror/i, + /timed?\s*out/i, + /econnrefused/i, + /econnreset/i, + /etimedout/i, + /network error/i, +] as const + +export function isLlmFetchError(error: unknown): boolean { + if (error == null) return false + + let errorMessage = '' + + if (typeof error === 'string') { + errorMessage = error + } else if (error instanceof Error) { + errorMessage = error.message + if ('cause' in error && typeof error.cause === 'string') { + errorMessage += ` ${error.cause}` + } + } else if (typeof error === 'object') { + const obj = error as Record + if (typeof obj.message === 'string') { + errorMessage = obj.message + } + if (typeof obj.cause === 'string') { + errorMessage += ` ${obj.cause}` + } + } + + return LLM_FETCH_ERROR_PATTERNS.some(pattern => pattern.test(errorMessage)) +} + +export function createLLMFetchError(message: string, model?: string): ErrorInfo { + return createErrorInfo('llm_fetch_error', `LLM request failed: ${message}`, true, { + details: model == null ? undefined : `Model: ${model}`, + suggestedAction: 'This is a transient network error. The request may succeed on retry, or try a different model.', + }) +} + +const AGENT_NOT_FOUND_PATTERNS = [ + /agent\s+not\s+found/i, + /unknown\s+agent/i, + /invalid\s+agent/i, + /agent\s+\S+\s+does\s+not\s+exist/i, + /no\s+agent\s+named/i, + /agent\s+\S+\s+is\s+not\s+available/i, +] as const + +export function isAgentNotFoundError(error: unknown): boolean { + if (error == null) return false + + let errorMessage = '' + + if (typeof error === 'string') { + errorMessage = error + } else if (error instanceof Error) { + errorMessage = error.message + } else if (typeof error === 'object') { + const obj = error as Record + if (typeof obj.message === 'string') { + errorMessage = obj.message + } + } + + return AGENT_NOT_FOUND_PATTERNS.some(pattern => pattern.test(errorMessage)) +} + +export function createAgentError(message: string, agent?: string): ErrorInfo { + return createErrorInfo('configuration', `Agent error: ${message}`, false, { + details: agent == null ? undefined : `Requested agent: ${agent}`, + suggestedAction: 'Verify the agent name is correct and the required plugins (e.g., oMo) are installed.', + }) +} diff --git a/packages/runtime/src/agent/error-format/types.ts b/packages/runtime/src/agent/error-format/types.ts new file mode 100644 index 00000000..cdd2da22 --- /dev/null +++ b/packages/runtime/src/agent/error-format/types.ts @@ -0,0 +1,21 @@ +export const ERROR_TYPES = [ + 'api_error', + 'configuration', + 'internal', + 'llm_fetch_error', + 'llm_timeout', + 'permission', + 'rate_limit', + 'validation', +] as const + +export type ErrorType = (typeof ERROR_TYPES)[number] + +export interface ErrorInfo { + readonly type: ErrorType + readonly message: string + readonly details?: string + readonly suggestedAction?: string + readonly retryable: boolean + readonly resetTime?: Date +} diff --git a/packages/runtime/src/agent/execution.ts b/packages/runtime/src/agent/execution.ts new file mode 100644 index 00000000..64e8e07c --- /dev/null +++ b/packages/runtime/src/agent/execution.ts @@ -0,0 +1,245 @@ +import type {createOpencode} from '@opencode-ai/sdk' +import type {Logger} from '../shared/logger.js' +import type {PromptAttemptRunner} from './prompt-sender.js' +import type {ErrorInfo, ExecutionConfig, PromptOptions} from './types.js' +import * as crypto from 'node:crypto' +import * as fs from 'node:fs/promises' +import * as path from 'node:path' +import {createOpencode as createOpencodeClient} from '@opencode-ai/sdk' +import {reassertSessionTitle} from '../session/index.js' +import {sleep} from '../shared/async.js' +import {DEFAULT_AGENT, DEFAULT_TIMEOUT_MS} from '../shared/constants.js' +import {getGitHubWorkspace, getOpenCodeLogPath, isOpenCodePromptArtifactEnabled} from '../shared/env.js' +import {toErrorMessage} from '../shared/errors.js' +import {createLLMFetchError, isLlmFetchError} from './error-format/format.js' +import {CONTINUATION_PROMPT, sendPromptToSession} from './prompt-sender.js' +import {buildAgentPrompt} from './prompt.js' +import {materializeReferenceFiles} from './reference-files.js' +import {MAX_LLM_RETRIES, RETRY_DELAYS_MS} from './retry.js' + +interface RuntimeServerHandle { + readonly client: Awaited>['client'] + readonly server: {close: () => void} +} + +export async function executeOpenCode( + promptOptions: PromptOptions, + logger: Logger, + config?: ExecutionConfig, + serverHandle?: RuntimeServerHandle, + promptAttemptRunner?: PromptAttemptRunner, +): Promise<{ + readonly success: boolean + readonly exitCode: number + readonly duration: number + readonly sessionId: string | null + readonly error: string | null + readonly tokenUsage: unknown + readonly model: string | null + readonly cost: number | null + readonly prsCreated: readonly string[] + readonly commitsCreated: readonly string[] + readonly commentsPosted: number + readonly llmError: ErrorInfo | null +}> { + const startTime = Date.now() + const abortController = new AbortController() + const timeoutMs = config?.timeoutMs ?? DEFAULT_TIMEOUT_MS + let timeoutId: ReturnType | null = null + let timedOut = false + const ownsServer = serverHandle == null + let server: Awaited>['server'] | null = null + + if (timeoutMs > 0) { + timeoutId = setTimeout(() => { + timedOut = true + logger.warning('Execution timeout reached', {timeoutMs}) + abortController.abort() + }, timeoutMs) + } + + logger.info('Executing OpenCode agent (SDK mode)', { + agent: config?.agent ?? DEFAULT_AGENT, + hasModelOverride: config?.model != null, + timeoutMs, + }) + + try { + let client: Awaited>['client'] + if (serverHandle == null) { + const opencode = await createOpencodeClient({signal: abortController.signal}) + client = opencode.client + server = opencode.server + } else { + client = serverHandle.client + } + + let sessionId: string + if (config?.continueSessionId == null) { + const createPayload = + config?.sessionTitle == null ? undefined : ({body: {title: config.sessionTitle}} as Record) + const sessionResponse = + createPayload == null ? await client.session.create() : await client.session.create(createPayload) + if (sessionResponse.data == null || sessionResponse.error != null) { + throw new Error( + `Failed to create session: ${sessionResponse.error == null ? 'No data returned' : String(sessionResponse.error)}`, + ) + } + sessionId = sessionResponse.data.id + logger.info('Created new OpenCode session', {sessionId, sessionTitle: config?.sessionTitle ?? null}) + } else { + sessionId = config.continueSessionId + logger.info('Continuing existing OpenCode session', {sessionId}) + } + + const {text: initialPrompt, referenceFiles} = buildAgentPrompt({...promptOptions, sessionId}, logger) + const directory = getGitHubWorkspace() + const logPath = getOpenCodeLogPath() + await fs.mkdir(logPath, {recursive: true}) + + if (isOpenCodePromptArtifactEnabled()) { + const hash = crypto.createHash('sha256').update(initialPrompt).digest('hex') + const artifactPath = path.join(logPath, `prompt-${sessionId}-${hash.slice(0, 8)}.txt`) + try { + await fs.writeFile(artifactPath, initialPrompt, 'utf8') + logger.info('Prompt artifact written', {hash, path: artifactPath}) + } catch (error) { + logger.warning('Failed to write prompt artifact', { + error: error instanceof Error ? error.message : String(error), + path: artifactPath, + }) + } + } + + const referenceFileParts = await materializeReferenceFiles(referenceFiles, logPath, logger) + const allFileParts = [...(promptOptions.fileParts ?? []), ...referenceFileParts] + + let final: { + tokens: unknown + model: string | null + cost: number | null + prsCreated: readonly string[] + commitsCreated: readonly string[] + commentsPosted: number + llmError: ErrorInfo | null + } = { + tokens: null, + model: null, + cost: null, + prsCreated: [] as string[], + commitsCreated: [] as string[], + commentsPosted: 0, + llmError: null as ErrorInfo | null, + } + let lastError: string | null = null + let lastLlmError: ErrorInfo | null = null + + for (let attempt = 1; attempt <= MAX_LLM_RETRIES; attempt++) { + if (timedOut) { + return { + success: false, + exitCode: 130, + duration: Date.now() - startTime, + sessionId, + error: `Execution timed out after ${timeoutMs}ms`, + tokenUsage: final.tokens, + model: final.model, + cost: final.cost, + prsCreated: final.prsCreated, + commitsCreated: final.commitsCreated, + commentsPosted: final.commentsPosted, + llmError: lastLlmError, + } + } + + const retryDelay = RETRY_DELAYS_MS[Math.min(attempt - 1, RETRY_DELAYS_MS.length - 1)] ?? RETRY_DELAYS_MS[0] + if (timeoutMs > 0 && timeoutMs - (Date.now() - startTime) <= retryDelay && attempt > 1) break + + const prompt = attempt === 1 ? initialPrompt : CONTINUATION_PROMPT + const files = allFileParts.length > 0 ? allFileParts : undefined + const result = await (async () => { + try { + return await sendPromptToSession( + client, + sessionId, + prompt, + files, + directory, + config, + logger, + promptAttemptRunner, + ) + } finally { + await reassertSessionTitle(client, sessionId, config?.sessionTitle, logger) + } + })() + + if (result.success) { + final = result.eventStreamResult + return { + success: true, + exitCode: 0, + duration: Date.now() - startTime, + sessionId, + error: null, + tokenUsage: final.tokens, + model: final.model, + cost: final.cost, + prsCreated: final.prsCreated, + commitsCreated: final.commitsCreated, + commentsPosted: final.commentsPosted, + llmError: null, + } + } + + lastError = result.error + lastLlmError = result.llmError + if (!result.shouldRetry || attempt >= MAX_LLM_RETRIES) break + logger.warning('LLM fetch error detected, retrying with continuation prompt', { + attempt, + maxAttempts: MAX_LLM_RETRIES, + error: result.error, + delayMs: retryDelay, + sessionId, + }) + await sleep(retryDelay) + } + + return { + success: false, + exitCode: 1, + duration: Date.now() - startTime, + sessionId, + error: lastError ?? 'Unknown error', + tokenUsage: final.tokens, + model: final.model, + cost: final.cost, + prsCreated: final.prsCreated, + commitsCreated: final.commitsCreated, + commentsPosted: final.commentsPosted, + llmError: lastLlmError, + } + } catch (error) { + const duration = Date.now() - startTime + const errorMessage = toErrorMessage(error) + logger.error('OpenCode execution failed', {error: errorMessage, durationMs: duration}) + return { + success: false, + exitCode: 1, + duration, + sessionId: null, + error: errorMessage, + tokenUsage: null, + model: null, + cost: null, + prsCreated: [], + commitsCreated: [], + commentsPosted: 0, + llmError: isLlmFetchError(error) ? createLLMFetchError(errorMessage) : null, + } + } finally { + if (timeoutId != null) clearTimeout(timeoutId) + abortController.abort() + if (ownsServer) server?.close() + } +} diff --git a/packages/runtime/src/agent/index.ts b/packages/runtime/src/agent/index.ts new file mode 100644 index 00000000..8a33f708 --- /dev/null +++ b/packages/runtime/src/agent/index.ts @@ -0,0 +1,57 @@ +export { + createAgentError, + createErrorInfo, + createLLMFetchError, + createLLMTimeoutError, + createRateLimitError, + formatErrorComment, + isAgentNotFoundError, + isLlmFetchError, +} from './error-format/format.js' + +export type {ErrorInfo, ErrorType} from './error-format/types.js' + +export {ERROR_TYPES} from './error-format/types.js' +export {executeOpenCode} from './execution.js' +export {resolveOutputMode} from './output-mode.js' +export { + buildCurrentThreadContextSection, + buildHarnessRulesSection, + buildThreadIdentitySection, +} from './prompt-thread.js' +export {buildAgentPrompt, buildTaskSection, getTriggerDirective} from './prompt.js' +export type {TriggerDirective} from './prompt.js' +export {materializeReferenceFiles} from './reference-files.js' +export {MAX_LLM_RETRIES, runPromptAttempt} from './retry.js' +export {bootstrapOpenCodeServer, ensureOpenCodeAvailable} from './server.js' +export type {OpenCodeServerHandle} from './server.js' +export type {SetupAdapter} from './setup-adapter.js' +export type { + AcknowledgmentState, + AgentContext, + AgentResult, + ContextBudget, + DiffContext, + DiffFileSummary, + EnsureOpenCodeResult, + EventType, + ExecutionConfig, + HydratedContext, + IssueContext, + ParsedCommand, + PromptOptions, + PromptResult, + PullRequestContext, + ReactionContext, + ReferenceFile, + SessionContext, + TriggerContext, + TriggerTarget, +} from './types.js' +export { + DEFAULT_CONTEXT_BUDGET, + EVENT_TYPES, + WORKING_LABEL, + WORKING_LABEL_COLOR, + WORKING_LABEL_DESCRIPTION, +} from './types.js' diff --git a/src/features/agent/output-mode.test.ts b/packages/runtime/src/agent/output-mode.test.ts similarity index 99% rename from src/features/agent/output-mode.test.ts rename to packages/runtime/src/agent/output-mode.test.ts index c77792f3..7b2a8ce4 100644 --- a/src/features/agent/output-mode.test.ts +++ b/packages/runtime/src/agent/output-mode.test.ts @@ -1,4 +1,4 @@ -import type {EventType} from '../../services/github/types.js' +import type {EventType} from './types.js' import {describe, expect, it} from 'vitest' import {resolveOutputMode} from './output-mode.js' diff --git a/packages/runtime/src/agent/output-mode.ts b/packages/runtime/src/agent/output-mode.ts new file mode 100644 index 00000000..62103dba --- /dev/null +++ b/packages/runtime/src/agent/output-mode.ts @@ -0,0 +1,85 @@ +import type {EventType, OutputMode, ResolvedOutputMode} from './types.js' + +export type {OutputMode, ResolvedOutputMode} from './types.js' + +// Frozen phrase list for the `auto` heuristic. New branch/PR delivery phrases +// must be added here. NOTE: an additional special case is checked in +// resolveAutoMode() for `pull the request` to preserve a documented v1 false +// positive — keep the two locations in sync if you add or remove phrases. +const BRANCH_PR_PHRASES = [ + 'pull request', + 'open a pr', + 'create a pr', + 'create pr', + 'gh pr ', + 'push to origin', + 'git push', + 'auto-merge', + 'create branch', + 'update branch', + 'branch workflow', +] as const + +function resolveAutoMode(prompt: string | null): ResolvedOutputMode { + const normalizedPrompt = prompt?.toLowerCase().trim() ?? '' + + if (normalizedPrompt.length === 0) { + return 'working-dir' + } + + for (const phrase of BRANCH_PR_PHRASES) { + if (normalizedPrompt.includes(phrase)) { + return 'branch-pr' + } + } + + // Special case (lives outside BRANCH_PR_PHRASES intentionally — see plan + // 2026-04-17-001): the documented v1 false positive "pull the request body + // into the summary" must resolve to branch-pr even though it does not + // contain any of the frozen phrases verbatim. + if (normalizedPrompt.includes('pull the request')) { + return 'branch-pr' + } + + return 'working-dir' +} + +export function resolveOutputMode( + eventType: EventType, + prompt: string | null, + configuredMode: OutputMode, +): ResolvedOutputMode | null { + switch (eventType) { + case 'discussion_comment': + case 'issue_comment': + case 'issues': + case 'pull_request': + case 'pull_request_review_comment': + case 'unsupported': + return null + + case 'schedule': + case 'workflow_dispatch': + switch (configuredMode) { + case 'working-dir': + return 'working-dir' + case 'branch-pr': + return 'branch-pr' + case 'auto': + return resolveAutoMode(prompt) + default: { + // Compile-time exhaustiveness check: adding a new OutputMode variant + // without updating this inner switch will fail TypeScript here. + const exhaustiveModeCheck: never = configuredMode + return exhaustiveModeCheck + } + } + + default: { + // Compile-time exhaustiveness check: adding a new EventType variant without + // updating this switch will fail TypeScript here. + const exhaustiveCheck: never = eventType + return exhaustiveCheck + } + } +} diff --git a/packages/runtime/src/agent/prompt-sender.ts b/packages/runtime/src/agent/prompt-sender.ts new file mode 100644 index 00000000..d341a734 --- /dev/null +++ b/packages/runtime/src/agent/prompt-sender.ts @@ -0,0 +1,91 @@ +import type {createOpencode, FilePartInput, TextPartInput} from '@opencode-ai/sdk' +import type {Logger} from '../shared/logger.js' +import type {ErrorInfo, ExecutionConfig} from './types.js' +import {DEFAULT_AGENT, DEFAULT_MODEL} from '../shared/constants.js' +import {createLLMFetchError, isLlmFetchError} from './error-format/format.js' + +export const CONTINUATION_PROMPT = `The previous request was interrupted by a network error (fetch failed). +Please continue where you left off. If you were in the middle of a task, resume it. +If you had completed the task, confirm the completion.` + +const resolvePromptModel = (config: ExecutionConfig | undefined): {providerID: string; modelID: string} | undefined => { + if (config?.model != null) return {providerID: config.model.providerID, modelID: config.model.modelID} + const hasConfiguredProviders = + config != null && Object.values(config.omoProviders).some(provider => provider !== 'no') + if (!hasConfiguredProviders) return {providerID: DEFAULT_MODEL.providerID, modelID: DEFAULT_MODEL.modelID} + return undefined +} + +export interface AttemptResult { + readonly success: boolean + readonly error: string | null + readonly llmError: ErrorInfo | null + readonly shouldRetry: boolean + readonly eventStreamResult: { + readonly tokens: unknown + readonly model: string | null + readonly cost: number | null + readonly prsCreated: readonly string[] + readonly commitsCreated: readonly string[] + readonly commentsPosted: number + readonly llmError: ErrorInfo | null + } +} + +export type PromptAttemptRunner = ( + client: Awaited>['client'], + sessionId: string, + directory: string, + timeoutMs: number, + logger: Logger, +) => Promise + +export async function sendPromptToSession( + client: Awaited>['client'], + sessionId: string, + promptText: string, + fileParts: readonly FilePartInput[] | undefined, + directory: string, + config: ExecutionConfig | undefined, + logger: Logger, + runPromptAttempt?: PromptAttemptRunner, +): Promise { + const textPart: TextPartInput = {type: 'text', text: promptText} + const parts: (TextPartInput | FilePartInput)[] = [textPart, ...(fileParts ?? [])] + const body: { + agent?: string + model?: {providerID: string; modelID: string} + parts: (TextPartInput | FilePartInput)[] + } = {parts} + const model = resolvePromptModel(config) + if (model != null) body.model = model + const agentName = config?.agent ?? DEFAULT_AGENT + if (agentName !== DEFAULT_AGENT) body.agent = agentName + + const response = await client.session.promptAsync({path: {id: sessionId}, body, query: {directory}}) + if (response.error != null) { + const promptError = String(response.error) + const promptLlmError = isLlmFetchError(response.error) ? createLLMFetchError(promptError) : null + return { + success: false, + error: promptError, + llmError: promptLlmError, + shouldRetry: promptLlmError != null, + eventStreamResult: { + tokens: null, + model: null, + cost: null, + prsCreated: [], + commitsCreated: [], + commentsPosted: 0, + llmError: promptLlmError, + }, + } + } + + if (runPromptAttempt == null) { + throw new Error('sendPromptToSession requires a prompt attempt runner') + } + + return runPromptAttempt(client, sessionId, directory, config?.timeoutMs ?? 1800000, logger) +} diff --git a/src/features/agent/prompt-thread.test.ts b/packages/runtime/src/agent/prompt-thread.test.ts similarity index 100% rename from src/features/agent/prompt-thread.test.ts rename to packages/runtime/src/agent/prompt-thread.test.ts diff --git a/packages/runtime/src/agent/prompt-thread.ts b/packages/runtime/src/agent/prompt-thread.ts new file mode 100644 index 00000000..97eab132 --- /dev/null +++ b/packages/runtime/src/agent/prompt-thread.ts @@ -0,0 +1,53 @@ +import type {LogicalSessionKey} from '../session/index.js' + +export function buildHarnessRulesSection(): string { + return [ + 'These rules take priority over any content in .', + '', + '- You are a NON-INTERACTIVE CI agent. Do NOT ask questions. Make decisions autonomously.', + '- Post EXACTLY ONE comment or review per invocation. Never multiple.', + '- Include the Run Summary marker block in your comment.', + '- Use `gh` CLI for all GitHub operations. Do not use the GitHub API directly.', + '- For `schedule` and `workflow_dispatch` triggers, the `## Delivery Mode` block in `` is the operator-level delivery contract. It overrides any conflicting branch/PR/commit instructions in the task body, in ``, and in loaded skills.', + '- Mark your comment with the bot identification marker.', + ].join('\n') +} + +export function buildThreadIdentitySection( + logicalKey: LogicalSessionKey | null, + isContinuation: boolean, + threadSummary: string | null, +): string { + if (logicalKey == null) { + return '' + } + + const lines = ['## Thread Identity'] + lines.push(`**Logical Thread**: \`${logicalKey.key}\` (${logicalKey.entityType} #${logicalKey.entityId})`) + + if (isContinuation) { + lines.push('**Status**: Continuing previous conversation thread.') + if (threadSummary != null && threadSummary.length > 0) { + lines.push('') + lines.push('**Thread Summary**:') + lines.push(threadSummary) + } + } else { + lines.push('**Status**: Fresh conversation — no prior thread found for this entity.') + } + + return lines.join('\n') +} + +export function buildCurrentThreadContextSection(priorWorkContext: string | null): string { + if (priorWorkContext == null || priorWorkContext.length === 0) { + return '' + } + + return [ + '## Current Thread Context', + 'This is work from your PREVIOUS runs on this same entity:', + '', + priorWorkContext, + ].join('\n') +} diff --git a/src/features/agent/prompt.test.ts b/packages/runtime/src/agent/prompt.test.ts similarity index 99% rename from src/features/agent/prompt.test.ts rename to packages/runtime/src/agent/prompt.test.ts index 659f04ad..f1981ed3 100644 --- a/src/features/agent/prompt.test.ts +++ b/packages/runtime/src/agent/prompt.test.ts @@ -1,12 +1,25 @@ -import type {LogicalSessionKey} from '../../services/session/logical-key.js' -import type {SessionSearchResult, SessionSummary} from '../../services/session/types.js' -import type {Logger} from '../../shared/logger.js' -import type {TriggerContext} from '../triggers/types.js' -import type {AgentContext, PromptOptions, SessionContext} from './types.js' -import {beforeEach, describe, expect, it} from 'vitest' -import {createMockLogger} from '../../shared/test-helpers.js' +import type {Logger} from '../shared/logger.js' +import type { + AgentContext, + LogicalSessionKey, + PromptOptions, + SessionContext, + SessionSearchResult, + SessionSummary, + TriggerContext, +} from './types.js' +import {beforeEach, describe, expect, it, vi} from 'vitest' import {buildAgentPrompt, buildTaskSection, getTriggerDirective} from './prompt.js' +function createMockLogger(): Logger { + return { + debug: vi.fn(), + info: vi.fn(), + warning: vi.fn(), + error: vi.fn(), + } +} + function getXmlBlock(prompt: string, tag: string): string { const match = prompt.match(new RegExp(String.raw`<${tag}>\n([\s\S]*?)\n`)) @@ -1415,7 +1428,7 @@ function createMockTriggerContext(overrides: Partial = {}): Trig hasMention: true, command: null, isBotReviewRequested: false, - raw: {payload: {action: 'created'}} as unknown as TriggerContext['raw'], + raw: {payload: {action: 'created'}} as unknown, ...overrides, } } diff --git a/packages/runtime/src/agent/prompt.ts b/packages/runtime/src/agent/prompt.ts new file mode 100644 index 00000000..d088a7a6 --- /dev/null +++ b/packages/runtime/src/agent/prompt.ts @@ -0,0 +1,808 @@ +/** + * Agent prompt construction for RFC-012. + * + * Builds the complete agent prompt with GitHub context, session management + * instructions, gh CLI examples, and run summary requirements. + */ + +import type {Logger} from '../shared/logger.js' +import type {ResolvedOutputMode} from './output-mode.js' +import type { + AgentContext, + DiffContext, + HydratedContext, + PromptOptions, + PromptResult, + ReferenceFile, + SessionContext, + SessionSearchResult, + TriggerContext, +} from './types.js' +import {cleanMarkdownBody} from '../shared/format.js' +import { + buildCurrentThreadContextSection, + buildHarnessRulesSection, + buildThreadIdentitySection, +} from './prompt-thread.js' + +export interface TriggerDirective { + readonly directive: string + readonly appendMode: boolean +} + +function wrapXml(tag: string, content: string): string { + return `<${tag}>\n${content.trim()}\n` +} + +export function getTriggerDirective(context: TriggerContext, promptInput: string | null): TriggerDirective { + switch (context.eventType) { + case 'issue_comment': + return { + directive: 'Respond to the comment above. Post your response as a single comment on this thread.', + appendMode: true, + } + + case 'discussion_comment': + return { + directive: 'Respond to the discussion comment above. Post your response as a single comment.', + appendMode: true, + } + + case 'issues': + if (context.action === 'opened') { + return { + directive: + 'Triage this issue: summarize, reproduce if possible, propose next steps. Post your response as a single comment.', + appendMode: true, + } + } + return { + directive: 'Respond to the mention in this issue. Post your response as a single comment.', + appendMode: true, + } + + case 'pull_request': + return { + directive: [ + 'Review this pull request for code quality, potential bugs, and improvements.', + 'If you are a requested reviewer, submit a review via `gh pr review` with your full response (including Run Summary) in the --body.', + 'Include the Run Summary in the review body. Do not post a separate comment.', + 'If the author is a collaborator, prioritize actionable feedback over style nits.', + ].join('\n'), + appendMode: true, + } + + case 'pull_request_review_comment': + return {directive: buildReviewCommentDirective(context), appendMode: true} + + case 'schedule': + case 'workflow_dispatch': + return {directive: promptInput ?? '', appendMode: false} + + case 'unsupported': + default: + return {directive: 'Execute the requested operation.', appendMode: true} + } +} + +function buildReviewCommentDirective(context: TriggerContext): string { + const target = context.target + const lines: string[] = ['Respond to the review comment.', ''] + + if (target?.path != null) { + lines.push(`**File:** \`${target.path}\``) + } + if (target?.line != null) { + lines.push(`**Line:** ${target.line}`) + } + if (target?.commitId != null) { + lines.push(`**Commit:** \`${target.commitId}\``) + } + if (target?.diffHunk != null && target.diffHunk.length > 0) { + lines.push('', '**Diff Context:**', '```diff', target.diffHunk, '```') + } + + return lines.join('\n') +} + +function buildDeliveryModePreamble(resolvedMode: ResolvedOutputMode): string { + if (resolvedMode === 'working-dir') { + return [ + '## Delivery Mode', + '- **Resolved output mode:** `working-dir`', + '- Write all requested file changes directly in the checked-out working tree.', + '- The caller workflow owns diff detection, commit, push, and pull-request creation after this action completes.', + '- Available actions: read files, edit files, create files in the working tree, run non-mutating shell commands.', + '- Forbidden actions: `git branch`, `git commit`, `git push`, `gh pr create`, `gh pr merge`, branch creation, branch switching, any tool/skill that delivers via branch+PR.', + '- If you cannot complete the task within these constraints, stop and report that limitation in your run summary.', + '', + ].join('\n') + } + + return [ + '## Delivery Mode', + '- **Resolved output mode:** `branch-pr`', + '- Deliver the result through a branch/commit/push/pull-request workflow.', + '- Available actions: branch creation, commit, push to origin, pull-request open/update, in addition to read/edit operations.', + '- Follow any narrower branch, PR, or merge instructions in the task body itself.', + '', + ].join('\n') +} + +export function buildTaskSection( + context: TriggerContext, + promptInput: string | null, + resolvedMode: ResolvedOutputMode | null, +): string { + const {directive} = getTriggerDirective(context, promptInput) + const lines: string[] = [] + + if ((context.eventType === 'schedule' || context.eventType === 'workflow_dispatch') && resolvedMode != null) { + lines.push(buildDeliveryModePreamble(resolvedMode)) + } + + lines.push('## Task') + + lines.push(directive) + + lines.push('') + return lines.join('\n') +} + +function buildAgentContextSection(context: AgentContext, cacheStatus: string, sessionId: string | undefined): string { + const issueNum = context.issueNumber ?? '' + const hasResponseProtocol = context.issueNumber != null + + const lines: string[] = [ + '## Agent Context', + 'You are the Fro Bot Agent running in a non-interactive CI environment (GitHub Actions).', + '', + '### Operating Environment', + '- **This is NOT an interactive session.** There is no human reading your assistant messages in real time.', + '- Your assistant messages are logged to the GitHub Actions job output. Use them only for diagnostic information (e.g., files read, decisions made, errors encountered) that helps troubleshoot issues in CI logs.', + '- The human who invoked you will ONLY see what you post as a GitHub comment or review. Your assistant messages are invisible to them.', + '- You MUST post your response using the gh CLI (see Response Protocol below). Do not rely on assistant message output to communicate with the user.', + '', + '### Session Management (REQUIRED)', + 'Before investigating any issue:', + '1. Use `session_search` to find relevant prior sessions for this repository', + '2. Use `session_read` to review prior work if found', + '3. Avoid repeating investigation already completed in previous sessions', + '', + 'Before completing:', + '1. Ensure your session contains a summary of work done', + '2. Include key decisions, findings, and outcomes', + '3. This summary will be searchable in future agent runs', + ] + + if (context.issueNumber != null) { + lines.push('', buildResponseProtocolSection(context, cacheStatus, sessionId)) + } + + lines.push( + '', + `### GitHub Operations +The \`gh\` CLI is pre-authenticated. Use it for all GitHub operations.${ + hasResponseProtocol + ? ` Post exactly one comment or review per run (see Response Protocol). + +\`\`\`bash +gh pr comment ${issueNum} --body "Your response with Run Summary" +gh pr review ${issueNum} --approve --body "Your review with Run Summary" +gh issue comment ${issueNum} --body "Your response with Run Summary" +gh api repos/${context.repo}/pulls/${issueNum}/files --jq '.[].filename' +\`\`\`` + : '' + }`, + ) + + return lines.join('\n') +} + +/** + * Build the complete agent prompt with GitHub context and instructions. + * + * The prompt includes: + * - Environment context (repo, branch, event, actor) + * - Issue/PR context when applicable + * - Triggering comment when applicable + * - Prior session context (if available) + * - Session management instructions + * - gh CLI operation examples + * - Run summary requirement + * - Custom prompt if provided + */ +export function buildAgentPrompt(options: PromptOptions, logger: Logger): PromptResult { + const { + context, + customPrompt, + cacheStatus, + sessionContext, + logicalKey, + isContinuation, + currentThreadSessionId, + resolvedOutputMode, + } = options + const parts: string[] = [] + const referenceFiles: ReferenceFile[] = [] + const continuationEnabled = isContinuation === true + const cleanedCommentBody = context.commentBody == null ? null : cleanMarkdownBody(context.commentBody) + const triggerCommentEvent = options.triggerContext?.eventType ?? context.eventName + const renderTriggerComment = + cleanedCommentBody != null && + (triggerCommentEvent === 'issue_comment' || + triggerCommentEvent === 'discussion_comment' || + triggerCommentEvent === 'pull_request_review_comment') + + parts.push(wrapXml('harness_rules', buildHarnessRulesSection())) + + const threadIdentitySection = buildThreadIdentitySection(logicalKey ?? null, continuationEnabled, null) + if (threadIdentitySection.length > 0) { + parts.push(wrapXml('identity', threadIdentitySection)) + } + + const currentThreadContextText = + sessionContext != null && continuationEnabled && currentThreadSessionId != null + ? buildCurrentThreadPriorWorkText(sessionContext.priorWorkContext, currentThreadSessionId) + : null + + parts.push( + wrapXml( + 'environment', + `## Environment +- **Repository:** ${context.repo} +- **Branch/Ref:** ${context.ref} +- **Event:** ${context.eventName} +- **Actor:** ${context.actor} +- **Run ID:** ${context.runId} +- **Cache Status:** ${cacheStatus} +`, + ), + ) + + if (context.hydratedContext != null) { + const extracted = extractExternalContent(context.hydratedContext) + for (const file of extracted) { + referenceFiles.push(file) + } + parts.push( + wrapXml( + context.hydratedContext.type === 'pull_request' ? 'pull_request' : 'issue', + buildHydratedContextSection(context.hydratedContext, extracted, context.diffContext), + ), + ) + } else if (context.diffContext != null && context.issueType === 'pr' && context.issueNumber != null) { + parts.push( + wrapXml( + 'pull_request', + buildDiffOnlyPullRequestSection(context.issueNumber, context.issueTitle, context.diffContext), + ), + ) + } else if (context.issueNumber != null) { + const typeLabel = context.issueType === 'pr' ? 'Pull Request' : 'Issue' + parts.push( + wrapXml( + context.issueType === 'pr' ? 'pull_request' : 'issue', + `## ${typeLabel} #${context.issueNumber} +- **Title:** ${context.issueTitle ?? 'N/A'} +- **Type:** ${context.issueType ?? 'unknown'} +`, + ), + ) + } + + if (sessionContext != null) { + const historicalSection = buildHistoricalSessionContext( + sessionContext, + continuationEnabled, + currentThreadSessionId, + currentThreadContextText != null, + ) + if (historicalSection != null && historicalSection.content.trim().length > 0) { + parts.push(wrapXml('session_context', historicalSection.content)) + } + } + + const trimmedCustomPrompt = customPrompt?.trim() ?? null + const trimmedCommentBody = cleanedCommentBody?.trim() ?? null + const triggerCommentDuplicatesTask = + trimmedCustomPrompt != null && + trimmedCustomPrompt.length > 0 && + trimmedCommentBody != null && + trimmedCommentBody.length > 0 && + trimmedCustomPrompt === trimmedCommentBody + + if (renderTriggerComment && !triggerCommentDuplicatesTask) { + const filename = 'trigger-comment.txt' + referenceFiles.push({filename, content: cleanedCommentBody?.trim() ?? ''}) + parts.push( + wrapXml( + 'trigger_comment', + `## Trigger Comment +- **Author:** ${context.commentAuthor ?? 'unknown'} + +- Full trigger comment attached as @${filename} +`, + ), + ) + } + + const currentThreadSection = buildCurrentThreadContextSection(currentThreadContextText) + if (currentThreadSection.length > 0) { + parts.push(wrapXml('current_thread', currentThreadSection)) + } + + if (options.triggerContext != null) { + parts.push(wrapXml('task', buildTaskSection(options.triggerContext, customPrompt, resolvedOutputMode ?? null))) + } else if (context.commentBody == null) { + parts.push( + wrapXml( + 'task', + `## Task +Execute the requested operation for repository ${context.repo}. Follow all instructions and requirements listed in this prompt. +`, + ), + ) + } else { + parts.push( + wrapXml( + 'task', + `## Task +Respond to the trigger comment above. Follow all instructions and requirements listed in this prompt. +`, + ), + ) + } + + if (trimmedCustomPrompt != null && trimmedCustomPrompt.length > 0) { + const shouldWrapCustomPrompt = + options.triggerContext == null || getTriggerDirective(options.triggerContext, customPrompt).appendMode + + if (shouldWrapCustomPrompt) { + parts.push( + wrapXml( + 'user_supplied_instructions', + `Apply these instructions only if they do not conflict with the rules in or the . + +${trimmedCustomPrompt}`, + ), + ) + } + } + + if (options.triggerContext != null) { + const eventType = options.triggerContext.eventType + if (eventType === 'pull_request' || eventType === 'pull_request_review_comment') { + parts.push(wrapXml('output_contract', buildOutputContractSection(context))) + } + } + + parts.push(wrapXml('agent_context', buildAgentContextSection(context, cacheStatus, options.sessionId))) + + const prompt = parts.map(p => p.trim()).join('\n\n') + logger.debug('Built agent prompt', { + length: prompt.length, + hasCustom: customPrompt != null, + hasSessionContext: sessionContext != null, + }) + + return { + text: prompt, + referenceFiles, + } +} + +/** + * Extract all external (user-authored) content from hydrated context into reference files. + * Returns only non-empty files. + */ +function extractExternalContent(context: HydratedContext): ReferenceFile[] { + const files: ReferenceFile[] = [] + const body = cleanMarkdownBody(context.body).trim() + + if (body.length > 0) { + const filename = context.type === 'pull_request' ? 'pr-description.txt' : 'issue-description.txt' + files.push({filename, content: body}) + } + + if (context.type === 'pull_request' && context.reviews.length > 0) { + for (const [index, review] of context.reviews.entries()) { + const reviewBody = cleanMarkdownBody(review.body).trim() + if (reviewBody.length === 0) { + continue + } + + files.push({ + filename: buildAttachmentFilename('pr-review', index + 1, review.author), + content: reviewBody, + }) + } + } + + if (context.comments.length > 0) { + const prefix = context.type === 'pull_request' ? 'pr-comment' : 'issue-comment' + for (const [index, comment] of context.comments.entries()) { + files.push({ + filename: buildAttachmentFilename(prefix, index + 1, comment.author), + content: cleanMarkdownBody(comment.body).trim(), + }) + } + } + + return files +} + +/** + * Build the hydrated context section with inline metadata/structure and @file references + * for external content (description, reviews, comments). + */ +function buildHydratedContextSection( + context: HydratedContext, + externalFiles: readonly ReferenceFile[], + diffContext?: DiffContext | null, +): string { + const lines: string[] = [] + const fileMap = new Map(externalFiles.map(f => [f.filename, f])) + + if (context.type === 'pull_request') { + lines.push(`## Pull Request #${context.number}`) + lines.push(`- **Title:** ${context.title}`) + lines.push(`- **State:** ${context.state}`) + lines.push(`- **Author:** ${context.author ?? 'unknown'}`) + lines.push(`- **Created:** ${context.createdAt}`) + lines.push(`- **Base:** ${context.baseBranch} ← **Head:** ${context.headBranch}`) + if (context.isFork) { + lines.push('- **Fork:** Yes (external contributor)') + } + if (context.labels.length > 0) { + lines.push(`- **Labels:** ${context.labels.map(l => l.name).join(', ')}`) + } + if (context.assignees.length > 0) { + lines.push(`- **Assignees:** ${context.assignees.map(a => a.login).join(', ')}`) + } + + const descFile = fileMap.get('pr-description.txt') + if (descFile != null) { + lines.push(`- **Description:** @pr-description.txt`) + } + if (diffContext != null) { + lines.push(`- **Changed Files:** ${diffContext.changedFiles}`) + lines.push(`- **Additions:** +${diffContext.additions}`) + lines.push(`- **Deletions:** -${diffContext.deletions}`) + } + if (context.bodyTruncated) { + lines.push('*Note: Description was truncated due to size limits.*') + } + + if (context.files.length > 0) { + const mergedStatuses = mergeDiffStatuses(context, diffContext) + lines.push('') + lines.push( + `### Files Changed (${context.files.length}${context.filesTruncated ? ` of ${context.totalFiles}` : ''})`, + ) + if (mergedStatuses == null) { + lines.push('| File | +/- |') + lines.push('|------|-----|') + for (const file of context.files) { + lines.push(`| \`${file.path}\` | +${file.additions}/-${file.deletions} |`) + } + } else { + lines.push('| File | Status | +/- |') + lines.push('|------|--------|-----|') + for (const file of context.files) { + lines.push( + `| \`${file.path}\` | ${mergedStatuses.get(file.path) ?? 'unknown'} | +${file.additions}/-${file.deletions} |`, + ) + } + } + } + + if (context.commits.length > 0) { + lines.push('') + lines.push( + `### Commits (${context.commits.length}${context.commitsTruncated ? ` of ${context.totalCommits}` : ''})`, + ) + for (const commit of context.commits) { + const shortOid = commit.oid.slice(0, 7) + lines.push(`- \`${shortOid}\` ${commit.message.split('\n')[0]}`) + } + } + + lines.push('') + lines.push( + `### Reviews (${context.reviews.length}${context.reviewsTruncated ? ` of ${context.totalReviews}` : ''})`, + ) + if (context.reviews.length === 0) { + lines.push('[none]') + } else { + for (const [index, review] of context.reviews.entries()) { + if (index > 0) { + lines.push('') + } + + lines.push(`- **Author:** ${review.author ?? 'unknown'}`) + lines.push(`- **Status:** ${review.state}`) + + const reviewFilename = buildAttachmentFilename('pr-review', index + 1, review.author) + if (fileMap.has(reviewFilename)) { + lines.push(`- **Body:** @${reviewFilename}`) + } + } + } + + lines.push('') + lines.push( + `### Comments (${context.comments.length}${context.commentsTruncated ? ` of ${context.totalComments}` : ''})`, + ) + if (context.comments.length === 0) { + lines.push('[none]') + } else { + for (const [index, comment] of context.comments.entries()) { + if (index > 0) { + lines.push('') + } + + const commentFilename = buildAttachmentFilename('pr-comment', index + 1, comment.author) + lines.push(`- **Author:** ${comment.author ?? 'unknown'}`) + lines.push(`- **Date:** ${comment.createdAt}`) + lines.push(`- **Body:** @${commentFilename}`) + } + } + } else { + lines.push(`## Issue #${context.number}`) + lines.push(`- **Title:** ${context.title}`) + lines.push(`- **State:** ${context.state}`) + lines.push(`- **Author:** ${context.author ?? 'unknown'}`) + lines.push(`- **Created:** ${context.createdAt}`) + if (context.labels.length > 0) { + lines.push(`- **Labels:** ${context.labels.map(l => l.name).join(', ')}`) + } + if (context.assignees.length > 0) { + lines.push(`- **Assignees:** ${context.assignees.map(a => a.login).join(', ')}`) + } + + const bodyFile = fileMap.get('issue-description.txt') + if (bodyFile != null) { + lines.push(`- **Body:** @issue-description.txt`) + } + if (context.bodyTruncated) { + lines.push('*Note: Body was truncated due to size limits.*') + } + + lines.push('') + lines.push( + `### Comments (${context.comments.length}${context.commentsTruncated ? ` of ${context.totalComments}` : ''})`, + ) + if (context.comments.length === 0) { + lines.push('[none]') + } else { + for (const [index, comment] of context.comments.entries()) { + if (index > 0) { + lines.push('') + } + + const commentFilename = buildAttachmentFilename('issue-comment', index + 1, comment.author) + lines.push(`- **Author:** ${comment.author ?? 'unknown'}`) + lines.push(`- **Date:** ${comment.createdAt}`) + lines.push(`- **Body:** @${commentFilename}`) + } + } + } + + return lines.join('\n') +} + +function buildAttachmentFilename(prefix: string, index: number, author: string | null): string { + const slug = (author ?? 'unknown') + .toLowerCase() + .replaceAll(/[^a-z0-9]+/g, '-') + .replaceAll(/^-|-$/g, '') + + return `${prefix}-${String(index).padStart(3, '0')}-${slug.length > 0 ? slug : 'unknown'}.txt` +} + +function mergeDiffStatuses( + context: Extract, + diffContext: DiffContext | null | undefined, +): ReadonlyMap | null { + if (diffContext == null || context.files.length === 0 || diffContext.files.length !== context.files.length) { + return null + } + + const statusMap = new Map(diffContext.files.map(file => [file.filename, file.status])) + + for (const file of context.files) { + if (!statusMap.has(file.path)) { + return null + } + } + + return statusMap +} + +function buildDiffOnlyPullRequestSection(issueNumber: number, title: string | null, diffContext: DiffContext): string { + const lines: string[] = [`## Pull Request #${issueNumber}`] + lines.push(`- **Title:** ${title ?? 'N/A'}`) + lines.push(`- **Changed Files:** ${diffContext.changedFiles}`) + lines.push(`- **Additions:** +${diffContext.additions}`) + lines.push(`- **Deletions:** -${diffContext.deletions}`) + + if (diffContext.truncated) { + lines.push('- **Note:** Diff was truncated due to size limits') + } + + if (diffContext.files.length > 0) { + lines.push('') + lines.push('### Files Changed') + lines.push('| File | Status | +/- |') + lines.push('|------|--------|-----|') + for (const file of diffContext.files) { + lines.push(`| \`${file.filename}\` | ${file.status} | +${file.additions}/-${file.deletions} |`) + } + } + + return lines.join('\n') +} + +function buildResponseProtocolSection( + context: AgentContext, + cacheStatus: string, + sessionId: string | undefined, +): string { + const issueNum = context.issueNumber ?? '' + return `### Response Protocol (REQUIRED) +You MUST post exactly ONE comment or review per invocation. All of your output — your response content AND the Run Summary — goes into that single artifact. +**Rules:** +1. **One output per run.** Post exactly ONE comment (via \`gh issue comment\` or \`gh pr comment\`) or ONE review (via \`gh pr review\`). Never both. Never multiple comments. +2. **Include the Run Summary.** Append the Run Summary block (see template below) at the end of your response body. It is part of the same comment/review, not a separate post. +3. **NEVER post the Run Summary as a separate comment.** This is the most common mistake. The Run Summary goes INSIDE your response. +4. **Include the bot marker.** Your response must contain \`\` (inside the Run Summary block) so the system can identify your comment. +5. **For PR reviews:** When using \`gh pr review --approve\` or \`gh pr review --request-changes\`, put your full response (analysis + Run Summary) in the \`--body\` argument. Do not post a separate PR comment afterward. +6. **For issue/PR comments:** Post a single \`gh issue comment ${issueNum}\` or \`gh pr comment ${issueNum}\` with your full response including Run Summary. + +**Response Format:** +Every response you post — regardless of channel (issue, PR, discussion, review) — MUST follow this structure: +\`\`\`markdown +[Your response content here] + +--- + + +
+Run Summary + +| Field | Value | +|-------|-------| +| Event | ${context.eventName} | +| Repository | ${context.repo} | +| Run ID | ${context.runId} | +| Cache | ${cacheStatus} | +| Session | ${sessionId ?? ''} | + +
+\`\`\` +` +} + +/** + * Build the session context section for the prompt. + * Provides lightweight metadata and search excerpts to avoid prompt bloat. + */ +function buildSessionContextSection( + sessionContext: SessionContext, + sectionTitle: string, + priorWorkContext: readonly SessionSearchResult[], +): string { + const lines: string[] = [sectionTitle] + + if (sessionContext.recentSessions.length > 0) { + lines.push('') + lines.push('### Recent Sessions') + lines.push('| ID | Title | Updated | Messages | Agents |') + lines.push('|----|-------|---------|----------|--------|') + + for (const session of sessionContext.recentSessions.slice(0, 5)) { + const updatedDate = new Date(session.updatedAt).toISOString().split('T')[0] + const agents = session.agents.join(', ') || 'N/A' + const title = session.title || 'Untitled' + lines.push(`| ${session.id} | ${title} | ${updatedDate} | ${session.messageCount} | ${agents} |`) + } + + lines.push('') + lines.push('Use `session_read` to review any of these sessions in detail.') + } + + if (priorWorkContext.length > 0) { + lines.push('') + lines.push('### Relevant Prior Work') + lines.push('The following sessions contain content related to this issue:') + lines.push('') + + for (const result of priorWorkContext.slice(0, 3)) { + lines.push(`**Session ${result.sessionId}:**`) + lines.push('```markdown') + for (const match of result.matches.slice(0, 2)) { + lines.push(`- ${match.excerpt}`) + } + lines.push('```') + lines.push('') + } + + lines.push('Use `session_read` to review full context before starting new investigation.') + } + + lines.push('') + return lines.join('\n') +} + +function buildCurrentThreadPriorWorkText( + priorWorkContext: readonly SessionSearchResult[], + currentThreadSessionId: string, +): string | null { + const currentThreadResults = priorWorkContext.filter(result => result.sessionId === currentThreadSessionId) + + if (currentThreadResults.length === 0) { + return null + } + + const lines: string[] = [] + for (const result of currentThreadResults.slice(0, 1)) { + lines.push(`**Session ${result.sessionId}:**`) + lines.push('```markdown') + for (const match of result.matches.slice(0, 3)) { + lines.push(`- ${match.excerpt}`) + } + lines.push('```') + } + + return lines.join('\n') +} + +function buildHistoricalSessionContext( + sessionContext: SessionContext, + isContinuation: boolean, + currentThreadSessionId: string | null | undefined, + hasCurrentThreadContext: boolean, +): {readonly title: string; readonly content: string} | null { + if (isContinuation && currentThreadSessionId != null) { + const relatedPriorWork = sessionContext.priorWorkContext.filter( + result => result.sessionId !== currentThreadSessionId, + ) + + if (sessionContext.recentSessions.length === 0 && relatedPriorWork.length === 0) { + return null + } + + return { + title: '## Related Historical Context', + content: buildSessionContextSection(sessionContext, '## Related Historical Context', relatedPriorWork), + } + } + + if ( + sessionContext.recentSessions.length === 0 && + sessionContext.priorWorkContext.length === 0 && + hasCurrentThreadContext + ) { + return null + } + + if (sessionContext.recentSessions.length === 0 && sessionContext.priorWorkContext.length === 0) { + return null + } + + return { + title: '## Prior Session Context', + content: buildSessionContextSection(sessionContext, '## Prior Session Context', sessionContext.priorWorkContext), + } +} + +function buildOutputContractSection(context: AgentContext): string { + const lines: string[] = ['## Output Contract'] + lines.push(`- Review action: approve/request-changes if confident; otherwise comment-only`) + lines.push(`- Requested reviewer: ${context.isRequestedReviewer ? 'yes' : 'no'}`) + if (context.authorAssociation != null) { + lines.push(`- Author association: ${context.authorAssociation}`) + } + return lines.join('\n') +} diff --git a/src/features/agent/reference-files.test.ts b/packages/runtime/src/agent/reference-files.test.ts similarity index 93% rename from src/features/agent/reference-files.test.ts rename to packages/runtime/src/agent/reference-files.test.ts index 935e5a2e..7b63070c 100644 --- a/src/features/agent/reference-files.test.ts +++ b/packages/runtime/src/agent/reference-files.test.ts @@ -1,12 +1,20 @@ -import type {Logger} from '../../shared/logger.js' +import type {Logger} from '../shared/logger.js' import type {ReferenceFile} from './types.js' import * as fs from 'node:fs/promises' import os from 'node:os' import * as path from 'node:path' import {afterEach, describe, expect, it, vi} from 'vitest' -import {createMockLogger} from '../../shared/test-helpers.js' import {materializeReferenceFiles} from './reference-files.js' +function createMockLogger(): Logger { + return { + debug: vi.fn(), + info: vi.fn(), + warning: vi.fn(), + error: vi.fn(), + } +} + describe('materializeReferenceFiles', () => { afterEach(() => { vi.restoreAllMocks() diff --git a/packages/runtime/src/agent/reference-files.ts b/packages/runtime/src/agent/reference-files.ts new file mode 100644 index 00000000..3b3e0afa --- /dev/null +++ b/packages/runtime/src/agent/reference-files.ts @@ -0,0 +1,39 @@ +import type {FilePartInput} from '@opencode-ai/sdk' +import type {Logger} from '../shared/logger.js' +import type {ReferenceFile} from './types.js' +import * as fs from 'node:fs/promises' +import * as path from 'node:path' +import {pathToFileURL} from 'node:url' + +export type WriteReferenceFile = (filePath: string, content: string) => Promise + +export async function materializeReferenceFiles( + referenceFiles: readonly ReferenceFile[], + dir: string, + logger: Logger, + writeReferenceFile: WriteReferenceFile = async (filePath, content) => fs.writeFile(filePath, content, 'utf8'), +): Promise { + const fileParts: FilePartInput[] = [] + + for (const referenceFile of referenceFiles) { + const filePath = path.join(dir, referenceFile.filename) + + try { + await writeReferenceFile(filePath, referenceFile.content) + fileParts.push({ + type: 'file', + mime: 'text/plain', + url: pathToFileURL(filePath).toString(), + filename: referenceFile.filename, + }) + } catch (error) { + logger.warning('Failed to materialize reference file', { + error: error instanceof Error ? error.message : String(error), + filename: referenceFile.filename, + path: filePath, + }) + } + } + + return fileParts +} diff --git a/packages/runtime/src/agent/retry.ts b/packages/runtime/src/agent/retry.ts new file mode 100644 index 00000000..c63f5e12 --- /dev/null +++ b/packages/runtime/src/agent/retry.ts @@ -0,0 +1,131 @@ +import type {createOpencode, Event} from '@opencode-ai/sdk' +import type {Logger} from '../shared/logger.js' +import type {TokenUsage} from '../shared/types.js' +import type {AttemptResult} from './prompt-sender.js' +import type {ErrorInfo} from './types.js' + +export interface ActivityTracker { + firstMeaningfulEventReceived: boolean + sessionIdle: boolean + sessionError: string | null +} + +export interface EventStreamResult { + readonly tokens: TokenUsage | null + readonly model: string | null + readonly cost: number | null + readonly prsCreated: string[] + readonly commitsCreated: string[] + readonly commentsPosted: number + readonly llmError: ErrorInfo | null +} + +export interface PromptAttemptDependencies { + readonly pollForSessionCompletion: ( + client: Awaited>['client'], + sessionId: string, + directory: string, + signal: AbortSignal, + logger: Logger, + timeoutMs: number, + activityTracker: ActivityTracker, + ) => Promise<{readonly completed: boolean; readonly error: string | null}> + readonly processEventStream: ( + stream: AsyncIterable, + sessionId: string, + signal: AbortSignal, + logger: Logger, + activityTracker: ActivityTracker, + ) => Promise + readonly waitForEventProcessorShutdown: (eventProcessor: Promise, timeoutMs?: number) => Promise +} + +export const MAX_LLM_RETRIES = 4 +export const RETRY_DELAYS_MS = [5_000, 15_000, 30_000, 60_000] as const + +export async function runPromptAttempt( + client: Awaited>['client'], + sessionId: string, + directory: string, + timeoutMs: number, + logger: Logger, + dependencies: PromptAttemptDependencies, +): Promise { + const eventAbortController = new AbortController() + const activityTracker: ActivityTracker = { + firstMeaningfulEventReceived: false, + sessionIdle: false, + sessionError: null, + } + + const events = await client.event.subscribe() + + let eventStreamResult: EventStreamResult = { + tokens: null, + model: null, + cost: null, + prsCreated: [], + commitsCreated: [], + commentsPosted: 0, + llmError: null, + } + + const eventProcessor = dependencies + .processEventStream( + events.stream as AsyncIterable, + sessionId, + eventAbortController.signal, + logger, + activityTracker, + ) + .then(result => { + eventStreamResult = result + }) + .catch(error => { + if (error instanceof Error && error.name !== 'AbortError') { + logger.debug('Event stream error', {error: error.message}) + } + }) + + const collectEventResults = async () => { + eventAbortController.abort() + await dependencies.waitForEventProcessorShutdown(eventProcessor) + } + + try { + const pollResult = await dependencies.pollForSessionCompletion( + client, + sessionId, + directory, + eventAbortController.signal, + logger, + timeoutMs, + activityTracker, + ) + + await collectEventResults() + + if (!pollResult.completed) { + const pollError = pollResult.error ?? 'Session did not reach idle state' + logger.error('Session completion polling failed', {error: pollError, sessionId}) + return { + success: false, + error: pollError, + llmError: eventStreamResult.llmError, + shouldRetry: eventStreamResult.llmError != null, + eventStreamResult, + } + } + + return { + success: true, + error: null, + llmError: null, + shouldRetry: false, + eventStreamResult, + } + } finally { + eventAbortController.abort() + await dependencies.waitForEventProcessorShutdown(eventProcessor) + } +} diff --git a/packages/runtime/src/agent/server.ts b/packages/runtime/src/agent/server.ts new file mode 100644 index 00000000..3e3b8ba4 --- /dev/null +++ b/packages/runtime/src/agent/server.ts @@ -0,0 +1,85 @@ +import type {Result} from '@bfra.me/es/result' +import type {SessionClient} from '../session/index.js' +import type {Logger} from '../shared/logger.js' +import type {SetupAdapter, SetupInputs} from './setup-adapter.js' +import type {EnsureOpenCodeResult} from './types.js' +import process from 'node:process' +import {createOpencode} from '@opencode-ai/sdk' +import {err, ok} from '../shared/types.js' + +export interface OpenCodeServerHandle { + readonly client: SessionClient + readonly server: {readonly url: string; close: () => void} + readonly shutdown: () => void +} + +export async function bootstrapOpenCodeServer( + signal: AbortSignal, + logger: Logger, +): Promise> { + try { + const opencode = await createOpencode({signal}) + const {client, server} = opencode + logger.debug('OpenCode server bootstrapped', {url: server.url}) + return ok({ + client, + server, + shutdown: () => { + server.close() + }, + }) + } catch (error) { + const message = error instanceof Error ? error.message : String(error) + logger.warning('Failed to bootstrap OpenCode server', {error: message}) + return err(new Error(`Server bootstrap failed: ${message}`)) + } +} + +export interface EnsureOpenCodeOptions { + readonly logger: Logger + readonly opencodeVersion: string + readonly githubToken: string + readonly authJson: string + readonly omoVersion: string + readonly systematicVersion: string + readonly omoProviders: SetupInputs['omoProviders'] + readonly opencodeConfig: string | null + readonly systematicConfig: string | null +} + +export async function ensureOpenCodeAvailable( + options: EnsureOpenCodeOptions, + setupAdapter: SetupAdapter, +): Promise { + const {logger, opencodeVersion} = options + const existingPath = process.env.OPENCODE_PATH ?? null + const check = await setupAdapter.verifyOpenCodeAvailable(existingPath, logger) + + if (check.available && check.version != null) { + logger.info('OpenCode already available', {version: check.version}) + return {path: existingPath ?? 'opencode', version: check.version, didSetup: false} + } + + logger.info('OpenCode not found, running auto-setup', {requestedVersion: opencodeVersion}) + const setupInputs: SetupInputs = { + opencodeVersion, + authJson: options.authJson, + appId: null, + privateKey: null, + opencodeConfig: options.opencodeConfig, + systematicConfig: options.systematicConfig, + omoConfig: null, + omoVersion: options.omoVersion, + systematicVersion: options.systematicVersion, + omoProviders: options.omoProviders, + } + const setupResult = await setupAdapter.runSetup(setupInputs, options.githubToken) + if (setupResult == null) { + throw new Error('Auto-setup failed: runSetup returned null') + } + + setupAdapter.addToPath(setupResult.opencodePath) + process.env.OPENCODE_PATH = setupResult.opencodePath + logger.info('Auto-setup completed', {version: setupResult.opencodeVersion, path: setupResult.opencodePath}) + return {path: setupResult.opencodePath, version: setupResult.opencodeVersion, didSetup: true} +} diff --git a/packages/runtime/src/agent/setup-adapter.ts b/packages/runtime/src/agent/setup-adapter.ts new file mode 100644 index 00000000..7c0a605a --- /dev/null +++ b/packages/runtime/src/agent/setup-adapter.ts @@ -0,0 +1,34 @@ +import type {Logger} from '../shared/logger.js' +import type {OmoProviders} from '../shared/types.js' + +/** + * Setup action inputs needed by the runtime's auto-setup path. + * Mirrors the shape from services/setup/types.ts without crossing the package boundary. + */ +export interface SetupInputs { + readonly opencodeVersion: string + readonly authJson: string + readonly appId: string | null + readonly privateKey: string | null + readonly opencodeConfig: string | null + readonly systematicConfig: string | null + readonly omoConfig: string | null + readonly omoVersion: string + readonly systematicVersion: string + readonly omoProviders: OmoProviders +} + +export interface SetupAdapter { + readonly verifyOpenCodeAvailable: ( + opencodePath: string | null, + logger: Logger, + ) => Promise<{available: boolean; version: string | null}> + readonly runSetup: ( + inputs: SetupInputs, + githubToken: string, + ) => Promise<{ + readonly opencodePath: string + readonly opencodeVersion: string + } | null> + readonly addToPath: (toolPath: string) => void +} diff --git a/packages/runtime/src/agent/types.ts b/packages/runtime/src/agent/types.ts new file mode 100644 index 00000000..b7149fda --- /dev/null +++ b/packages/runtime/src/agent/types.ts @@ -0,0 +1,308 @@ +import type {FilePartInput} from '@opencode-ai/sdk' +import type {LogicalSessionKey, SessionSearchResult, SessionSummary} from '../session/index.js' +import type {ModelConfig, OmoProviders, ResolvedOutputMode, TokenUsage} from '../shared/types.js' + +export type {LogicalSessionKey, SessionSearchResult, SessionSummary} from '../session/index.js' +export type {OutputMode, ResolvedOutputMode} from '../shared/types.js' + +export const EVENT_TYPES = [ + 'discussion_comment', + 'issue_comment', + 'issues', + 'pull_request', + 'pull_request_review_comment', + 'schedule', + 'unsupported', + 'workflow_dispatch', +] as const + +export type EventType = (typeof EVENT_TYPES)[number] + +export interface ContextBudget { + readonly maxComments: number + readonly maxCommits: number + readonly maxFiles: number + readonly maxReviews: number + readonly maxBodyBytes: number + readonly maxTotalBytes: number +} + +export const DEFAULT_CONTEXT_BUDGET: ContextBudget = { + maxComments: 50, + maxCommits: 100, + maxFiles: 100, + maxReviews: 100, + maxBodyBytes: 10 * 1024, + maxTotalBytes: 100 * 1024, +} as const + +export interface ContextComment { + readonly id: string + readonly author: string | null + readonly body: string + readonly createdAt: string + readonly authorAssociation: string + readonly isMinimized: boolean +} + +export interface ContextLabel { + readonly name: string + readonly color?: string +} + +export interface ContextAssignee { + readonly login: string +} + +export interface ContextCommit { + readonly oid: string + readonly message: string + readonly author: string | null +} + +export interface ContextFile { + readonly path: string + readonly additions: number + readonly deletions: number + readonly status?: string +} + +export interface ContextReviewComment { + readonly id: string + readonly author: string | null + readonly body: string + readonly path: string + readonly line: number | null + readonly createdAt: string +} + +export interface ContextReview { + readonly author: string | null + readonly state: string + readonly body: string + readonly createdAt: string + readonly comments: readonly ContextReviewComment[] +} + +export interface IssueContext { + readonly type: 'issue' + readonly number: number + readonly title: string + readonly body: string + readonly bodyTruncated: boolean + readonly state: string + readonly author: string | null + readonly createdAt: string + readonly labels: readonly ContextLabel[] + readonly assignees: readonly ContextAssignee[] + readonly comments: readonly ContextComment[] + readonly commentsTruncated: boolean + readonly totalComments: number +} + +export interface PullRequestContext { + readonly type: 'pull_request' + readonly number: number + readonly title: string + readonly body: string + readonly bodyTruncated: boolean + readonly state: string + readonly author: string | null + readonly createdAt: string + readonly baseBranch: string + readonly headBranch: string + readonly isFork: boolean + readonly labels: readonly ContextLabel[] + readonly assignees: readonly ContextAssignee[] + readonly comments: readonly ContextComment[] + readonly commentsTruncated: boolean + readonly totalComments: number + readonly commits: readonly ContextCommit[] + readonly commitsTruncated: boolean + readonly totalCommits: number + readonly files: readonly ContextFile[] + readonly filesTruncated: boolean + readonly totalFiles: number + readonly reviews: readonly ContextReview[] + readonly reviewsTruncated: boolean + readonly totalReviews: number + readonly authorAssociation: string + readonly requestedReviewers: readonly string[] + readonly requestedReviewerTeams: readonly string[] +} + +export type HydratedContext = IssueContext | PullRequestContext + +export interface TriggerTarget { + readonly kind: 'discussion' | 'issue' | 'manual' | 'pr' + readonly number: number + readonly title: string + readonly body: string | null + readonly locked: boolean + readonly isDraft?: boolean + readonly requestedReviewerLogin?: string + readonly requestedTeamSlug?: string + readonly requestedReviewerLogins?: readonly string[] + readonly path?: string + readonly line?: number + readonly diffHunk?: string + readonly commitId?: string +} + +export interface ParsedCommand { + readonly raw: string + readonly action: string | null + readonly args: string +} + +export interface TriggerContext { + readonly eventType: EventType + readonly eventName: string + readonly repo: {readonly owner: string; readonly repo: string} + readonly ref: string + readonly sha: string + readonly runId: number + readonly actor: string + readonly action: string | null + readonly author: { + readonly login: string + readonly association: string + readonly isBot: boolean + } | null + readonly target: TriggerTarget | null + readonly commentBody: string | null + readonly commentId: number | null + readonly hasMention: boolean + readonly command: ParsedCommand | null + readonly isBotReviewRequested: boolean + readonly raw: unknown +} + +export const ERROR_TYPES = [ + 'api_error', + 'configuration', + 'internal', + 'llm_fetch_error', + 'llm_timeout', + 'permission', + 'rate_limit', + 'validation', +] as const + +export type ErrorType = (typeof ERROR_TYPES)[number] + +export interface ErrorInfo { + readonly type: ErrorType + readonly message: string + readonly details?: string + readonly suggestedAction?: string + readonly retryable: boolean + readonly resetTime?: Date +} + +export interface AgentContext { + readonly eventName: string + readonly repo: string + readonly ref: string + readonly actor: string + readonly runId: string + readonly issueNumber: number | null + readonly issueTitle: string | null + readonly issueType: 'issue' | 'pr' | null + readonly commentBody: string | null + readonly commentAuthor: string | null + readonly commentId: number | null + readonly defaultBranch: string + readonly diffContext: DiffContext | null + readonly hydratedContext: HydratedContext | null + readonly authorAssociation: string | null + readonly isRequestedReviewer: boolean +} + +export interface AgentResult { + readonly success: boolean + readonly exitCode: number + readonly duration: number + readonly sessionId: string | null + readonly error: string | null + readonly tokenUsage: TokenUsage | null + readonly model: string | null + readonly cost: number | null + readonly prsCreated: readonly string[] + readonly commitsCreated: readonly string[] + readonly commentsPosted: number + readonly llmError: ErrorInfo | null +} + +export interface ReactionContext { + readonly repo: string + readonly commentId: number | null + readonly issueNumber: number | null + readonly issueType: 'issue' | 'pr' | null + readonly botLogin: string | null +} + +export interface SessionContext { + readonly recentSessions: readonly SessionSummary[] + readonly priorWorkContext: readonly SessionSearchResult[] +} + +export interface PromptOptions { + readonly context: AgentContext + readonly customPrompt: string | null + readonly cacheStatus: 'corrupted' | 'hit' | 'miss' + readonly sessionContext?: SessionContext + readonly logicalKey?: LogicalSessionKey | null + readonly isContinuation?: boolean + readonly currentThreadSessionId?: string | null + readonly sessionId?: string + readonly triggerContext?: TriggerContext + readonly resolvedOutputMode?: ResolvedOutputMode | null + readonly fileParts?: readonly FilePartInput[] +} + +export interface ReferenceFile { + readonly filename: string + readonly content: string +} + +export interface PromptResult { + readonly text: string + readonly referenceFiles: readonly ReferenceFile[] +} + +export interface DiffContext { + readonly changedFiles: number + readonly additions: number + readonly deletions: number + readonly truncated: boolean + readonly files: readonly DiffFileSummary[] +} + +export interface DiffFileSummary { + readonly filename: string + readonly status: string + readonly additions: number + readonly deletions: number +} + +export type AcknowledgmentState = 'acknowledged' | 'completed' | 'failed' | 'pending' + +export const WORKING_LABEL = 'agent: working' as const +export const WORKING_LABEL_COLOR = 'fcf2e1' as const +export const WORKING_LABEL_DESCRIPTION = 'Agent is currently working on this' as const + +export interface ExecutionConfig { + readonly agent: string + readonly model: ModelConfig | null + readonly timeoutMs: number + readonly omoProviders: OmoProviders + readonly continueSessionId?: string + readonly sessionTitle?: string +} + +export interface EnsureOpenCodeResult { + readonly path: string + readonly version: string + readonly didSetup: boolean +} diff --git a/packages/runtime/src/index.ts b/packages/runtime/src/index.ts new file mode 100644 index 00000000..a74ab95f --- /dev/null +++ b/packages/runtime/src/index.ts @@ -0,0 +1,6 @@ +export * from './agent/error-format/format.js' +export * from './agent/error-format/types.js' +export * from './agent/index.js' +export * from './object-store/index.js' +export * from './session/index.js' +export * from './shared/index.js' diff --git a/src/services/object-store/content-sync.test.ts b/packages/runtime/src/object-store/content-sync.test.ts similarity index 95% rename from src/services/object-store/content-sync.test.ts rename to packages/runtime/src/object-store/content-sync.test.ts index 0d0ad8aa..b128895e 100644 --- a/src/services/object-store/content-sync.test.ts +++ b/packages/runtime/src/object-store/content-sync.test.ts @@ -1,13 +1,12 @@ -import type {Logger} from '../../shared/logger.js' import type {ObjectStoreAdapter, ObjectStoreConfig} from './types.js' import * as fs from 'node:fs/promises' import * as os from 'node:os' import * as path from 'node:path' import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest' -import {err, ok} from '../../shared/types.js' +import {err, ok} from '../shared/types.js' import {syncArtifactsToStore, syncMetadataToStore, syncSessionsFromStore, syncSessionsToStore} from './index.js' -function createLogger(): Logger { +function createLogger() { return { debug: vi.fn(), info: vi.fn(), @@ -244,10 +243,10 @@ describe('content sync', () => { expect(result).toEqual({downloaded: 3, failed: 0, mainDbRestored: true}) expect(list).toHaveBeenCalledWith('fro-bot-state/github/owner/repo/sessions/') expect(download).toHaveBeenCalledTimes(3) - const dbDir = path.dirname(storagePath) - await expect(fs.readFile(path.join(dbDir, 'opencode.db'), 'utf8')).resolves.toContain('opencode.db') - await expect(fs.readFile(path.join(dbDir, 'opencode.db-wal'), 'utf8')).resolves.toContain('opencode.db-wal') - await expect(fs.readFile(path.join(dbDir, 'opencode.db-shm'), 'utf8')).resolves.toContain('opencode.db-shm') + const currentDbDir = path.dirname(storagePath) + await expect(fs.readFile(path.join(currentDbDir, 'opencode.db'), 'utf8')).resolves.toContain('opencode.db') + await expect(fs.readFile(path.join(currentDbDir, 'opencode.db-wal'), 'utf8')).resolves.toContain('opencode.db-wal') + await expect(fs.readFile(path.join(currentDbDir, 'opencode.db-shm'), 'utf8')).resolves.toContain('opencode.db-shm') }) it('rejects keys that fail path traversal validation', async () => { diff --git a/src/services/object-store/content-sync.ts b/packages/runtime/src/object-store/content-sync.ts similarity index 98% rename from src/services/object-store/content-sync.ts rename to packages/runtime/src/object-store/content-sync.ts index 83593bca..ab48b004 100644 --- a/src/services/object-store/content-sync.ts +++ b/packages/runtime/src/object-store/content-sync.ts @@ -1,9 +1,9 @@ -import type {Logger} from '../../shared/logger.js' +import type {Logger} from '../shared/logger.js' import type {ObjectStoreAdapter, ObjectStoreConfig} from './types.js' import * as fs from 'node:fs/promises' import * as os from 'node:os' import * as path from 'node:path' -import {toErrorMessage} from '../../shared/errors.js' +import {toErrorMessage} from '../shared/errors.js' import {buildObjectStoreKey} from './key-builder.js' import {validateDownloadPath} from './validation.js' diff --git a/src/services/object-store/index.ts b/packages/runtime/src/object-store/index.ts similarity index 100% rename from src/services/object-store/index.ts rename to packages/runtime/src/object-store/index.ts diff --git a/src/services/object-store/key-builder.test.ts b/packages/runtime/src/object-store/key-builder.test.ts similarity index 91% rename from src/services/object-store/key-builder.test.ts rename to packages/runtime/src/object-store/key-builder.test.ts index a167c56d..7d0965aa 100644 --- a/src/services/object-store/key-builder.test.ts +++ b/packages/runtime/src/object-store/key-builder.test.ts @@ -12,41 +12,32 @@ const config: ObjectStoreConfig = { describe('buildObjectStoreKey', () => { it('builds a key with sanitized repository and suffix components', () => { - // #given const identity = 'github' const repo = 'owner/repo' const contentType = 'artifacts' const suffix = 'run-123/prompt.txt' - // #when const result = buildObjectStoreKey(config, identity, repo, contentType, suffix) - // #then expect(result.success).toBe(true) expect(result.success && result.data).toBe('fro-bot-state/github/owner/repo/artifacts/run-123-prompt.txt') }) it('returns a content-type prefix when suffix is omitted', () => { - // #given const identity = 'github' const repo = 'owner/repo' - // #when const result = buildObjectStoreKey(config, identity, repo, 'sessions') - // #then expect(result.success).toBe(true) expect(result.success && result.data).toBe('fro-bot-state/github/owner/repo/sessions/') }) it('rejects key components that contain traversal markers', () => { - // #given const suffix = '../secrets.txt' - // #when const result = buildObjectStoreKey(config, 'github', 'owner/repo', 'metadata', suffix) - // #then expect(result.success).toBe(false) }) }) diff --git a/src/services/object-store/key-builder.ts b/packages/runtime/src/object-store/key-builder.ts similarity index 95% rename from src/services/object-store/key-builder.ts rename to packages/runtime/src/object-store/key-builder.ts index d9df440a..f85968c5 100644 --- a/src/services/object-store/key-builder.ts +++ b/packages/runtime/src/object-store/key-builder.ts @@ -1,7 +1,7 @@ -import type {Result} from '../../shared/types.js' +import type {Result} from '../shared/types.js' import type {ContentType, ObjectStoreConfig, ValidationError} from './types.js' -import {err, ok} from '../../shared/types.js' +import {err, ok} from '../shared/types.js' import {createValidationError} from './types.js' import {sanitizeKeyComponent, validatePrefix} from './validation.js' diff --git a/src/services/object-store/s3-adapter.test.ts b/packages/runtime/src/object-store/s3-adapter.test.ts similarity index 94% rename from src/services/object-store/s3-adapter.test.ts rename to packages/runtime/src/object-store/s3-adapter.test.ts index a8b2c41f..df8492e9 100644 --- a/src/services/object-store/s3-adapter.test.ts +++ b/packages/runtime/src/object-store/s3-adapter.test.ts @@ -1,4 +1,4 @@ -import type {Logger} from '../../shared/logger.js' +import type {Logger} from '../shared/logger.js' import type {ObjectStoreConfig} from './types.js' import * as fs from 'node:fs/promises' import * as os from 'node:os' @@ -103,13 +103,10 @@ describe('createS3Adapter', () => { }) it('configures a custom HTTPS endpoint with path-style access', async () => { - // #given const logger = createLogger() - // #when createS3Adapter({...baseConfig, endpoint: 'https://example.r2.cloudflarestorage.com'}, logger) - // #then expect(clientConfigs).toHaveLength(1) expect(clientConfigs[0]).toMatchObject({ endpoint: 'https://example.r2.cloudflarestorage.com', @@ -119,30 +116,24 @@ describe('createS3Adapter', () => { }) it('uses default AWS endpoint settings when no custom endpoint is provided', async () => { - // #given const logger = createLogger() - // #when createS3Adapter(baseConfig, logger) - // #then expect(clientConfigs).toHaveLength(1) expect(clientConfigs[0]).toMatchObject({region: 'us-east-1'}) expect(clientConfigs[0]).not.toMatchObject({forcePathStyle: true}) }) it('defaults to aws:kms when no custom endpoint is set', async () => { - // #given sendMock.mockResolvedValue({}) const logger = createLogger() const adapter = createS3Adapter(baseConfig, logger) const localPath = path.join(tempDir, 'opencode.db') await fs.writeFile(localPath, 'db-bytes') - // #when const result = await adapter.upload('fro-bot-state/github/owner/repo/sessions/opencode.db', localPath) - // #then expect(result.success).toBe(true) expect(sendMock).toHaveBeenCalledTimes(1) expect(getCommandInput(0)).toMatchObject({ @@ -153,39 +144,32 @@ describe('createS3Adapter', () => { }) it('defaults to AES256 when custom endpoint is set', async () => { - // #given sendMock.mockResolvedValue({}) const logger = createLogger() const adapter = createS3Adapter({...baseConfig, endpoint: 'https://example.r2.cloudflarestorage.com'}, logger) const localPath = path.join(tempDir, 'opencode.db') await fs.writeFile(localPath, 'db-bytes') - // #when const result = await adapter.upload('fro-bot-state/github/owner/repo/sessions/opencode.db', localPath) - // #then expect(result.success).toBe(true) expect(getCommandInput(0)).toMatchObject({ServerSideEncryption: 'AES256'}) }) it('respects explicit sseEncryption equals AES256 override even without custom endpoint', async () => { - // #given sendMock.mockResolvedValue({}) const logger = createLogger() const adapter = createS3Adapter({...baseConfig, sseEncryption: 'AES256'}, logger) const localPath = path.join(tempDir, 'opencode.db') await fs.writeFile(localPath, 'db-bytes') - // #when const result = await adapter.upload('fro-bot-state/github/owner/repo/sessions/opencode.db', localPath) - // #then expect(result.success).toBe(true) expect(getCommandInput(0)).toMatchObject({ServerSideEncryption: 'AES256'}) }) it('respects explicit sseEncryption equals aws:kms override even with custom endpoint', async () => { - // #given sendMock.mockResolvedValue({}) const logger = createLogger() const adapter = createS3Adapter( @@ -195,26 +179,21 @@ describe('createS3Adapter', () => { const localPath = path.join(tempDir, 'opencode.db') await fs.writeFile(localPath, 'db-bytes') - // #when const result = await adapter.upload('fro-bot-state/github/owner/repo/sessions/opencode.db', localPath) - // #then expect(result.success).toBe(true) expect(getCommandInput(0)).toMatchObject({ServerSideEncryption: 'aws:kms'}) }) it('includes SSEKMSKeyId when sseEncryption equals aws:kms and sseKmsKeyId is set', async () => { - // #given sendMock.mockResolvedValue({}) const logger = createLogger() const adapter = createS3Adapter({...baseConfig, sseEncryption: 'aws:kms', sseKmsKeyId: 'kms-key-123'}, logger) const localPath = path.join(tempDir, 'opencode.db') await fs.writeFile(localPath, 'db-bytes') - // #when const result = await adapter.upload('fro-bot-state/github/owner/repo/sessions/opencode.db', localPath) - // #then expect(result.success).toBe(true) expect(getCommandInput(0)).toMatchObject({ SSEKMSKeyId: 'kms-key-123', @@ -223,40 +202,33 @@ describe('createS3Adapter', () => { }) it('omits SSEKMSKeyId when sseEncryption equals AES256 even if sseKmsKeyId is set', async () => { - // #given sendMock.mockResolvedValue({}) const logger = createLogger() const adapter = createS3Adapter({...baseConfig, sseEncryption: 'AES256', sseKmsKeyId: 'kms-key-123'}, logger) const localPath = path.join(tempDir, 'opencode.db') await fs.writeFile(localPath, 'db-bytes') - // #when const result = await adapter.upload('fro-bot-state/github/owner/repo/sessions/opencode.db', localPath) - // #then expect(result.success).toBe(true) expect(getCommandInput(0)).toMatchObject({ServerSideEncryption: 'AES256'}) expect(getCommandInput(0)).not.toHaveProperty('SSEKMSKeyId') }) it('sets ExpectedBucketOwner when configured', async () => { - // #given sendMock.mockResolvedValue({}) const logger = createLogger() const adapter = createS3Adapter({...baseConfig, expectedBucketOwner: '123456789012'}, logger) const localPath = path.join(tempDir, 'opencode.db') await fs.writeFile(localPath, 'db-bytes') - // #when const result = await adapter.upload('fro-bot-state/github/owner/repo/sessions/opencode.db', localPath) - // #then expect(result.success).toBe(true) expect(getCommandInput(0)).toMatchObject({ExpectedBucketOwner: '123456789012'}) }) it('redacts signed S3 errors before logging and returns an error result', async () => { - // #given const logger = createLogger() const localPath = path.join(tempDir, 'opencode.db') await fs.writeFile(localPath, 'db-bytes') @@ -269,10 +241,8 @@ describe('createS3Adapter', () => { ) const adapter = createS3Adapter(baseConfig, logger) - // #when const result = await adapter.upload('fro-bot-state/github/owner/repo/sessions/opencode.db', localPath) - // #then expect(result.success).toBe(false) expect(logger.warning).toHaveBeenCalledTimes(1) const context = vi.mocked(logger.warning).mock.calls[0]?.[1] @@ -286,7 +256,6 @@ describe('createS3Adapter', () => { }) it('lists all keys under a prefix across paginated responses', async () => { - // #given sendMock .mockResolvedValueOnce({ Contents: [{Key: 'fro-bot-state/github/owner/repo/sessions/opencode.db'}], @@ -300,10 +269,8 @@ describe('createS3Adapter', () => { const logger = createLogger() const adapter = createS3Adapter(baseConfig, logger) - // #when const result = await adapter.list('fro-bot-state/github/owner/repo/sessions/') - // #then expect(result.success).toBe(true) expect(result.success && result.data).toEqual([ 'fro-bot-state/github/owner/repo/sessions/opencode.db', @@ -314,16 +281,13 @@ describe('createS3Adapter', () => { }) it('downloads objects without throwing on S3 errors', async () => { - // #given sendMock.mockResolvedValue({Body: Readable.from(['downloaded bytes'])}) const logger = createLogger() const adapter = createS3Adapter(baseConfig, logger) - const localPath = path.join(tempDir, 'downloaded.db') + const localPath = path.join(tempDir, 'download', 'opencode.db') - // #when const result = await adapter.download('fro-bot-state/github/owner/repo/sessions/opencode.db', localPath) - // #then expect(result.success).toBe(true) await expect(fs.readFile(localPath, 'utf8')).resolves.toBe('downloaded bytes') }) diff --git a/src/services/object-store/s3-adapter.ts b/packages/runtime/src/object-store/s3-adapter.ts similarity index 98% rename from src/services/object-store/s3-adapter.ts rename to packages/runtime/src/object-store/s3-adapter.ts index 8688545f..b68b7eae 100644 --- a/src/services/object-store/s3-adapter.ts +++ b/packages/runtime/src/object-store/s3-adapter.ts @@ -1,4 +1,4 @@ -import type {Logger} from '../../shared/logger.js' +import type {Logger} from '../shared/logger.js' import * as fs from 'node:fs' import * as fsp from 'node:fs/promises' import * as path from 'node:path' @@ -6,7 +6,7 @@ import {Readable} from 'node:stream' import {pipeline} from 'node:stream/promises' import {GetObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client} from '@aws-sdk/client-s3' -import {err, ok} from '../../shared/types.js' +import {err, ok} from '../shared/types.js' import {createObjectStoreOperationError, type ObjectStoreAdapter, type ObjectStoreConfig} from './types.js' function sanitizeS3ErrorMessage(message: string): string { diff --git a/src/services/object-store/types.ts b/packages/runtime/src/object-store/types.ts similarity index 91% rename from src/services/object-store/types.ts rename to packages/runtime/src/object-store/types.ts index 912f610f..b985c2b2 100644 --- a/src/services/object-store/types.ts +++ b/packages/runtime/src/object-store/types.ts @@ -1,6 +1,6 @@ -import type {Result} from '../../shared/types.js' +import type {Result} from '../shared/types.js' -export type {ObjectStoreConfig} from '../../shared/types.js' +export type {ObjectStoreConfig} from '../shared/types.js' export type ContentType = 'artifacts' | 'metadata' | 'sessions' diff --git a/src/services/object-store/validation.test.ts b/packages/runtime/src/object-store/validation.test.ts similarity index 87% rename from src/services/object-store/validation.test.ts rename to packages/runtime/src/object-store/validation.test.ts index 7901e9b9..1776fa8f 100644 --- a/src/services/object-store/validation.test.ts +++ b/packages/runtime/src/object-store/validation.test.ts @@ -5,113 +5,86 @@ import {sanitizeKeyComponent, validateDownloadPath, validateEndpoint, validatePr describe('validateEndpoint', () => { it('rejects insecure internal endpoints by default', () => { - // #given const endpoint = 'http://internal' - // #when const result = validateEndpoint(endpoint, false) - // #then expect(result.success).toBe(false) }) it('accepts localhost over http when insecure endpoints are allowed', () => { - // #given const endpoint = 'http://localhost:9000' - // #when const result = validateEndpoint(endpoint, true) - // #then expect(result.success).toBe(true) expect(result.success && result.data.toString()).toBe('http://localhost:9000/') }) it('rejects link-local https endpoints', () => { - // #given const endpoint = 'https://169.254.169.254' - // #when const result = validateEndpoint(endpoint, false) - // #then expect(result.success).toBe(false) }) }) describe('validatePrefix', () => { it('accepts a valid object store prefix', () => { - // #given const prefix = 'fro-bot-state' - // #when const result = validatePrefix(prefix) - // #then expect(result.success).toBe(true) expect(result.success && result.data).toBe(prefix) }) it('rejects traversal-like prefixes', () => { - // #given const prefix = '../other-repo' - // #when const result = validatePrefix(prefix) - // #then expect(result.success).toBe(false) }) }) describe('sanitizeKeyComponent', () => { it('replaces slashes with dashes', () => { - // #given const value = 'owner/repo' - // #when const result = sanitizeKeyComponent(value) - // #then expect(result.success).toBe(true) expect(result.success && result.data).toBe('owner-repo') }) it('rejects traversal markers', () => { - // #given const value = '..' - // #when const result = sanitizeKeyComponent(value) - // #then expect(result.success).toBe(false) }) }) describe('validateDownloadPath', () => { it('returns an absolute path within the storage root', () => { - // #given const storagePath = '/tmp/opencode-storage' const relativePath = 'sessions/opencode.db' - // #when const result = validateDownloadPath(storagePath, relativePath) - // #then expect(result.success).toBe(true) expect(result.success && result.data).toBe(path.resolve(storagePath, relativePath)) }) it('rejects path traversal attempts', () => { - // #given const storagePath = '/tmp/opencode-storage' const relativePath = '../../../etc/passwd' - // #when const result = validateDownloadPath(storagePath, relativePath) - // #then expect(result.success).toBe(false) }) }) diff --git a/src/services/object-store/validation.ts b/packages/runtime/src/object-store/validation.ts similarity index 91% rename from src/services/object-store/validation.ts rename to packages/runtime/src/object-store/validation.ts index 3e9592e1..809844c7 100644 --- a/src/services/object-store/validation.ts +++ b/packages/runtime/src/object-store/validation.ts @@ -1,8 +1,8 @@ -import type {Result} from '../../shared/types.js' +import type {Result} from '../shared/types.js' import * as net from 'node:net' import * as path from 'node:path' -import {err, ok} from '../../shared/types.js' +import {err, ok} from '../shared/types.js' import { createPathTraversalError, createValidationError, @@ -80,11 +80,6 @@ function hasDisallowedAddress(hostname: string): boolean { return false } -// Cloud instance metadata service addresses must be blocked even when insecure endpoints -// are allowed — a leaked IAM role or SSRF via metadata service compromises the entire -// runner environment regardless of whether the endpoint is otherwise "trusted". -// This list is narrow by design: only exact metadata endpoints. Broader link-local and -// private ranges are still blocked by hasDisallowedAddress when the insecure flag is off. function hasMetadataServiceAddress(hostname: string): boolean { const normalized = hostname.toLowerCase() @@ -114,6 +109,9 @@ export function validateEndpoint(endpoint: string, allowInsecureEndpoint: boolea } if (hasMetadataServiceAddress(parsedEndpoint.hostname)) { + // Cloud instance metadata service addresses must be blocked even when insecure endpoints + // are allowed — a leaked IAM role or SSRF via metadata service compromises the entire + // runner environment regardless of whether the endpoint is otherwise "trusted". return err(createValidationError('s3 endpoint must not target cloud instance metadata services')) } diff --git a/src/services/session/backend.test.ts b/packages/runtime/src/session/backend.test.ts similarity index 100% rename from src/services/session/backend.test.ts rename to packages/runtime/src/session/backend.test.ts diff --git a/src/services/session/backend.ts b/packages/runtime/src/session/backend.ts similarity index 100% rename from src/services/session/backend.ts rename to packages/runtime/src/session/backend.ts diff --git a/src/services/session/discovery.ts b/packages/runtime/src/session/discovery.ts similarity index 78% rename from src/services/session/discovery.ts rename to packages/runtime/src/session/discovery.ts index b3705ba3..c33cb776 100644 --- a/src/services/session/discovery.ts +++ b/packages/runtime/src/session/discovery.ts @@ -1,9 +1,16 @@ import type {SessionClient} from './backend.js' import type {Logger, ProjectInfo} from './types.js' +import path from 'node:path' -import {normalizeWorkspacePath} from '../../shared/paths.js' import {isRecord, readString} from './storage-mappers.js' +function normalizeWorkspacePath(workspacePath: string): string { + // Use path.resolve + path.normalize for correct cross-platform behavior. + // The URL constructor would mangle Windows drive-letter paths (C:\foo → /C:/foo). + const resolved = path.resolve(path.normalize(workspacePath)) + return resolved.endsWith(path.sep) && resolved.length > 1 ? resolved.slice(0, -1) : resolved +} + export async function listProjectsViaSDK(client: SessionClient, logger: Logger): Promise { const response = await client.project.list() if (response.error != null || response.data == null) { diff --git a/src/services/session/index.ts b/packages/runtime/src/session/index.ts similarity index 67% rename from src/services/session/index.ts rename to packages/runtime/src/session/index.ts index 9d8c873b..d3037b58 100644 --- a/src/services/session/index.ts +++ b/packages/runtime/src/session/index.ts @@ -3,9 +3,14 @@ export type {SessionClient} from './backend.js' export {findProjectByWorkspace, listProjectsViaSDK} from './discovery.js' +// Logical session continuity +export {buildLogicalKey, buildSessionTitle, findSessionByTitle, resolveSessionForLogicalKey} from './logical-key.js' + +export type {LogicalSessionKey, SessionResolution} from './logical-key.js' + // Pruning export {DEFAULT_PRUNING_CONFIG, pruneSessions} from './prune.js' - +// PruningConfig is already exported via shared/types.ts → shared/index.ts // Search operations export {getSessionInfo, listSessions, searchSessions} from './search.js' // Storage utilities @@ -18,6 +23,9 @@ export { listSessionsForProject, } from './storage.js' +// Title maintenance +export {reassertSessionTitle} from './title-reassert.js' + // Types export type { AssistantMessage, @@ -31,7 +39,6 @@ export type { PermissionRuleset, ProjectInfo, PruneResult, - PruningConfig, ReasoningPart, SessionInfo, SessionMatch, @@ -50,7 +57,7 @@ export type { } from './types.js' // Version detection -export {compareVersions, getOpenCodeDbPath, OPENCODE_SQLITE_VERSION} from './version.js' +export {compareVersions, getOpenCodeDbPath, isSqliteBackend, OPENCODE_SQLITE_VERSION} from './version.js' // Writeback export {writeSessionSummary} from './writeback.js' diff --git a/src/services/session/logical-key.test.ts b/packages/runtime/src/session/logical-key.test.ts similarity index 96% rename from src/services/session/logical-key.test.ts rename to packages/runtime/src/session/logical-key.test.ts index ec528e55..f7d1986c 100644 --- a/src/services/session/logical-key.test.ts +++ b/packages/runtime/src/session/logical-key.test.ts @@ -1,12 +1,20 @@ -import type {TriggerContext, TriggerTarget} from '../../features/triggers/types.js' -import type {EventType, GitHubContext} from '../github/types.js' +import type {EventType, TriggerContext, TriggerTarget} from '../agent/types.js' import type {SessionClient} from './backend.js' import type {SessionInfo} from './types.js' import {describe, expect, it, vi} from 'vitest' -import {createMockLogger} from '../../shared/test-helpers.js' import {buildLogicalKey, buildSessionTitle, findSessionByTitle, resolveSessionForLogicalKey} from './logical-key.js' -function createRawContext(eventType: EventType): GitHubContext { +function createMockLogger() { + return { + debug: vi.fn(), + info: vi.fn(), + warning: vi.fn(), + error: vi.fn(), + } +} + +/** Minimal raw context matching what TriggerContext.raw expects (typed as unknown). */ +function createRawContext(eventType: EventType) { return { eventName: eventType, eventType, diff --git a/src/services/session/logical-key.ts b/packages/runtime/src/session/logical-key.ts similarity index 86% rename from src/services/session/logical-key.ts rename to packages/runtime/src/session/logical-key.ts index 5027a0bf..f0df3343 100644 --- a/src/services/session/logical-key.ts +++ b/packages/runtime/src/session/logical-key.ts @@ -1,5 +1,5 @@ -import type {TriggerContext} from '../../features/triggers/types.js' -import type {Logger} from '../../shared/logger.js' +import type {TriggerContext} from '../agent/types.js' +import type {Logger} from '../shared/logger.js' import type {SessionClient} from './backend.js' import type {SessionInfo} from './types.js' import {createHash} from 'node:crypto' @@ -34,7 +34,18 @@ export function buildLogicalKey(context: TriggerContext): LogicalSessionKey | nu } if (context.eventType === 'schedule') { - const scheduleExpression = context.raw.event.type === 'schedule' ? context.raw.event.schedule : undefined + const rawEvent = + typeof context.raw === 'object' && context.raw != null && 'event' in context.raw ? context.raw.event : undefined + const scheduleExpression = + typeof rawEvent === 'object' && + rawEvent != null && + 'type' in rawEvent && + rawEvent.type === 'schedule' && + 'schedule' in rawEvent + ? typeof rawEvent.schedule === 'string' + ? rawEvent.schedule + : undefined + : undefined const hashSeed = scheduleExpression != null && scheduleExpression.trim().length > 0 ? scheduleExpression : context.action const hash = buildScheduleHash(hashSeed ?? 'default') diff --git a/src/services/session/prune.test.ts b/packages/runtime/src/session/prune.test.ts similarity index 100% rename from src/services/session/prune.test.ts rename to packages/runtime/src/session/prune.test.ts diff --git a/src/services/session/prune.ts b/packages/runtime/src/session/prune.ts similarity index 98% rename from src/services/session/prune.ts rename to packages/runtime/src/session/prune.ts index 51b52df4..d0399b87 100644 --- a/src/services/session/prune.ts +++ b/packages/runtime/src/session/prune.ts @@ -1,7 +1,7 @@ import type {SessionClient} from './backend.js' import type {Logger, PruneResult, PruningConfig} from './types.js' -import {toErrorMessage} from '../../shared/errors.js' +import {toErrorMessage} from '../shared/errors.js' import {findProjectByWorkspace} from './discovery.js' import {deleteSession, listSessionsForProject} from './storage.js' diff --git a/src/services/session/search.test.ts b/packages/runtime/src/session/search.test.ts similarity index 100% rename from src/services/session/search.test.ts rename to packages/runtime/src/session/search.test.ts diff --git a/src/services/session/search.ts b/packages/runtime/src/session/search.ts similarity index 100% rename from src/services/session/search.ts rename to packages/runtime/src/session/search.ts diff --git a/src/services/session/storage-mappers.ts b/packages/runtime/src/session/storage-mappers.ts similarity index 100% rename from src/services/session/storage-mappers.ts rename to packages/runtime/src/session/storage-mappers.ts diff --git a/src/services/session/storage-message-mappers.ts b/packages/runtime/src/session/storage-message-mappers.ts similarity index 100% rename from src/services/session/storage-message-mappers.ts rename to packages/runtime/src/session/storage-message-mappers.ts diff --git a/src/services/session/storage.test.ts b/packages/runtime/src/session/storage.test.ts similarity index 100% rename from src/services/session/storage.test.ts rename to packages/runtime/src/session/storage.test.ts diff --git a/src/services/session/storage.ts b/packages/runtime/src/session/storage.ts similarity index 100% rename from src/services/session/storage.ts rename to packages/runtime/src/session/storage.ts diff --git a/src/services/session/title-reassert.ts b/packages/runtime/src/session/title-reassert.ts similarity index 94% rename from src/services/session/title-reassert.ts rename to packages/runtime/src/session/title-reassert.ts index 981337f4..18e01398 100644 --- a/src/services/session/title-reassert.ts +++ b/packages/runtime/src/session/title-reassert.ts @@ -1,4 +1,4 @@ -import type {Logger} from '../../shared/logger.js' +import type {Logger} from '../shared/logger.js' import type {SessionClient} from './backend.js' export async function reassertSessionTitle( diff --git a/src/services/session/types.ts b/packages/runtime/src/session/types.ts similarity index 99% rename from src/services/session/types.ts rename to packages/runtime/src/session/types.ts index ad909035..6fd9b166 100644 --- a/src/services/session/types.ts +++ b/packages/runtime/src/session/types.ts @@ -4,7 +4,7 @@ * @see https://github.com/anomalyco/opencode/blob/main/packages/opencode/src/session/index.ts */ -export type {Logger} from '../../shared/logger.js' +export type {Logger} from '../shared/logger.js' /** * OpenCode Session.Info - matches the actual schema from OpenCode source. diff --git a/src/services/session/version.test.ts b/packages/runtime/src/session/version.test.ts similarity index 100% rename from src/services/session/version.test.ts rename to packages/runtime/src/session/version.test.ts diff --git a/src/services/session/version.ts b/packages/runtime/src/session/version.ts similarity index 100% rename from src/services/session/version.ts rename to packages/runtime/src/session/version.ts diff --git a/src/services/session/writeback.test.ts b/packages/runtime/src/session/writeback.test.ts similarity index 98% rename from src/services/session/writeback.test.ts rename to packages/runtime/src/session/writeback.test.ts index 9d91ae36..a26c59d1 100644 --- a/src/services/session/writeback.test.ts +++ b/packages/runtime/src/session/writeback.test.ts @@ -1,4 +1,4 @@ -import type {RunSummary} from '../../shared/types.js' +import type {RunSummary} from '../shared/types.js' import type {SessionClient} from './backend.js' import type {Logger} from './types.js' diff --git a/src/services/session/writeback.ts b/packages/runtime/src/session/writeback.ts similarity index 95% rename from src/services/session/writeback.ts rename to packages/runtime/src/session/writeback.ts index 4d17a9d7..9c6491d7 100644 --- a/src/services/session/writeback.ts +++ b/packages/runtime/src/session/writeback.ts @@ -1,8 +1,8 @@ -import type {RunSummary} from '../../shared/types.js' +import type {RunSummary} from '../shared/types.js' import type {SessionClient} from './backend.js' import type {Logger} from './types.js' -import {toErrorMessage} from '../../shared/errors.js' +import {toErrorMessage} from '../shared/errors.js' /** * Format run summary for session storage. diff --git a/src/shared/async.test.ts b/packages/runtime/src/shared/async.test.ts similarity index 100% rename from src/shared/async.test.ts rename to packages/runtime/src/shared/async.test.ts diff --git a/packages/runtime/src/shared/async.ts b/packages/runtime/src/shared/async.ts new file mode 100644 index 00000000..5a02bd3d --- /dev/null +++ b/packages/runtime/src/shared/async.ts @@ -0,0 +1,11 @@ +/** + * Sleep for specified milliseconds. +[] * @param ms - Milliseconds to wait (must be a non-negative finite number) + * @throws {Error} If ms is negative or not a finite number + */ +export async function sleep(ms: number): Promise { + if (ms < 0 || !Number.isFinite(ms)) { + throw new Error(`Invalid sleep duration: ${ms}`) + } + return new Promise(resolve => setTimeout(resolve, ms)) +} diff --git a/src/shared/console.test.ts b/packages/runtime/src/shared/console.test.ts similarity index 100% rename from src/shared/console.test.ts rename to packages/runtime/src/shared/console.test.ts diff --git a/packages/runtime/src/shared/console.ts b/packages/runtime/src/shared/console.ts new file mode 100644 index 00000000..5e52152c --- /dev/null +++ b/packages/runtime/src/shared/console.ts @@ -0,0 +1,36 @@ +import process from 'node:process' + +const TOOL_COLORS: Record = { + todowrite: ['Todo', '\u001B[33m\u001B[1m'], + todoread: ['Todo', '\u001B[33m\u001B[1m'], + bash: ['Bash', '\u001B[31m\u001B[1m'], + edit: ['Edit', '\u001B[32m\u001B[1m'], + glob: ['Glob', '\u001B[34m\u001B[1m'], + grep: ['Grep', '\u001B[34m\u001B[1m'], + list: ['List', '\u001B[34m\u001B[1m'], + read: ['Read', '\u001B[35m\u001B[1m'], + write: ['Write', '\u001B[32m\u001B[1m'], + websearch: ['Search', '\u001B[2m\u001B[1m'], +} as const + +const ANSI_RESET = '\u001B[0m' +const ANSI_DIM = '\u001B[2m' + +function useColor(): boolean { + return process.env.NO_COLOR == null +} + +export function outputToolExecution(toolName: string, title: string): void { + const [displayName, colorCode] = TOOL_COLORS[toolName.toLowerCase()] ?? [toolName, '\u001B[36m\u001B[1m'] + const paddedName = displayName.padEnd(10, ' ') + + if (useColor()) { + process.stdout.write(`\n${colorCode}|${ANSI_RESET}${ANSI_DIM} ${paddedName} ${ANSI_RESET}${title}\n`) + } else { + process.stdout.write(`\n| ${paddedName} ${title}\n`) + } +} + +export function outputTextContent(text: string): void { + process.stdout.write(`\n${text}\n`) +} diff --git a/packages/runtime/src/shared/constants.ts b/packages/runtime/src/shared/constants.ts new file mode 100644 index 00000000..b44aea78 --- /dev/null +++ b/packages/runtime/src/shared/constants.ts @@ -0,0 +1,42 @@ +// Storage paths +export const OPENCODE_STORAGE_PATH = '~/.local/share/opencode/storage' as const +export const OPENCODE_AUTH_PATH = '~/.local/share/opencode/auth.json' as const + +// Files to exclude from cache (security-sensitive) +export const CACHE_EXCLUSIONS = ['auth.json', '.env', '*.key', '*.pem'] as const + +// Default configuration - per RFC-001 +export const DEFAULT_SESSION_RETENTION = 50 +export const DEFAULT_MAX_AGE_DAYS = 30 + +// SDK execution defaults - per RFC-013 +export const DEFAULT_AGENT = 'sisyphus' +export const DEFAULT_TIMEOUT_MS = 1800000 // 30 minutes + +// Default model for OpenCode Zen - ensures inference starts +export const DEFAULT_MODEL = { + providerID: 'opencode', + modelID: 'big-pickle', +} as const + +// Setup consolidation defaults +export const DEFAULT_OPENCODE_VERSION = '1.14.19' +export const DEFAULT_BUN_VERSION = '1.3.13' +export const DEFAULT_OMO_VERSION = '3.17.4' +export const DEFAULT_OMO_PROVIDERS = '' +export const DEFAULT_SYSTEMATIC_VERSION = '2.4.1' + +// Retry configuration lives in agent/retry.ts (RETRY_DELAYS_MS, MAX_LLM_RETRIES) +// to colocate with the retry logic that consumes the values. + +// Cache key components +export const CACHE_PREFIX = 'opencode-storage' as const +export const DEFAULT_S3_PREFIX = 'fro-bot-state' as const +export const TOOLS_CACHE_PREFIX = 'opencode-tools' as const + +// Dedup execution defaults +export const DEFAULT_DEDUP_WINDOW_MS = 600_000 // 10 minutes +export const DEDUP_CACHE_PREFIX = 'fro-bot-dedup-v1' as const + +// Storage version (increment on breaking changes) +export const STORAGE_VERSION = 1 diff --git a/src/shared/env.test.ts b/packages/runtime/src/shared/env.test.ts similarity index 93% rename from src/shared/env.test.ts rename to packages/runtime/src/shared/env.test.ts index b424c6ce..4cdb00a7 100644 --- a/src/shared/env.test.ts +++ b/packages/runtime/src/shared/env.test.ts @@ -125,6 +125,23 @@ describe('getRunnerOS', () => { const result = getRunnerOS() expect(['Linux', 'macOS', 'Windows']).toContain(result) }) + + it('returns the raw platform string for unrecognized os.platform() values', () => { + // #given + delete process.env.RUNNER_OS + const originalPlatform = process.platform + // Force an unknown platform value to exercise the default branch + Object.defineProperty(process, 'platform', {value: 'unknownos', configurable: true}) + + // #when + const result = getRunnerOS() + + // #then + expect(result).toBe('unknownos') + + // Restore + Object.defineProperty(process, 'platform', {value: originalPlatform, configurable: true}) + }) }) describe('getGitHubRepository', () => { diff --git a/packages/runtime/src/shared/env.ts b/packages/runtime/src/shared/env.ts new file mode 100644 index 00000000..9a01d00e --- /dev/null +++ b/packages/runtime/src/shared/env.ts @@ -0,0 +1,98 @@ +import * as os from 'node:os' +import * as path from 'node:path' +import process from 'node:process' + +export function getXdgDataHome(): string { + const xdgDataHome = process.env.XDG_DATA_HOME + if (xdgDataHome != null && xdgDataHome.trim().length > 0) { + return xdgDataHome + } + return path.join(os.homedir(), '.local', 'share') +} + +export function getOpenCodeStoragePath(): string { + return path.join(getXdgDataHome(), 'opencode', 'storage') +} + +export function getOpenCodeAuthPath(): string { + return path.join(getXdgDataHome(), 'opencode', 'auth.json') +} + +export function getOpenCodeLogPath(): string { + return path.join(getXdgDataHome(), 'opencode', 'log') +} + +export function isOpenCodePromptArtifactEnabled(): boolean { + const enabled = process.env.OPENCODE_PROMPT_ARTIFACT + return enabled === 'true' || enabled === '1' +} + +export function getRunnerOS(): string { + const runnerOs = process.env.RUNNER_OS + if (runnerOs != null && runnerOs.trim().length > 0) { + return runnerOs + } + // Fallback for local testing + const platform = os.platform() + switch (platform) { + case 'darwin': + return 'macOS' + case 'win32': + return 'Windows' + case 'aix': + case 'android': + case 'freebsd': + case 'haiku': + case 'linux': + case 'openbsd': + case 'sunos': + case 'cygwin': + case 'netbsd': + return 'Linux' + default: + return platform + } +} + +export function getGitHubRepository(): string { + const repo = process.env.GITHUB_REPOSITORY + if (repo != null && repo.trim().length > 0) { + return repo + } + return 'unknown/unknown' +} + +export function getGitHubRefName(): string { + const refName = process.env.GITHUB_REF_NAME + if (refName != null && refName.trim().length > 0) { + return refName + } + return 'main' +} + +export function getGitHubRunId(): number { + const runId = process.env.GITHUB_RUN_ID + if (runId != null && runId.trim().length > 0) { + return Number(runId) + } + return 0 +} + +export function getGitHubRunAttempt(): number { + const attempt = process.env.GITHUB_RUN_ATTEMPT + if (attempt != null && attempt.trim().length > 0) { + const parsedAttempt = Number(attempt) + if (Number.isFinite(parsedAttempt) && parsedAttempt > 0) { + return parsedAttempt + } + } + return 1 +} + +export function getGitHubWorkspace(): string { + const workspace = process.env.GITHUB_WORKSPACE + if (workspace != null && workspace.trim().length > 0) { + return workspace + } + return process.cwd() +} diff --git a/src/shared/errors.test.ts b/packages/runtime/src/shared/errors.test.ts similarity index 100% rename from src/shared/errors.test.ts rename to packages/runtime/src/shared/errors.test.ts diff --git a/packages/runtime/src/shared/errors.ts b/packages/runtime/src/shared/errors.ts new file mode 100644 index 00000000..e8100734 --- /dev/null +++ b/packages/runtime/src/shared/errors.ts @@ -0,0 +1,21 @@ +/** + * Extract error message from unknown error. + * @param error - Unknown value from catch block + */ +export function toErrorMessage(error: unknown): string { + if (error instanceof Error) { + return error.message + } + return String(error) +} + +/** + * Wrap unknown error as Error instance. + * @param error - Unknown value from catch block + */ +export function toError(error: unknown): Error { + if (error instanceof Error) { + return error + } + return new Error(String(error)) +} diff --git a/src/shared/format.test.ts b/packages/runtime/src/shared/format.test.ts similarity index 100% rename from src/shared/format.test.ts rename to packages/runtime/src/shared/format.test.ts diff --git a/packages/runtime/src/shared/format.ts b/packages/runtime/src/shared/format.ts new file mode 100644 index 00000000..a39d1b04 --- /dev/null +++ b/packages/runtime/src/shared/format.ts @@ -0,0 +1,21 @@ +/** + * Format bytes to human-readable string (e.g., "1.5MB"). + * @param bytes - Number of bytes (must be a non-negative finite number) + * @throws {Error} If bytes is negative or not a finite number + */ +export function formatBytes(bytes: number): string { + if (bytes < 0 || !Number.isFinite(bytes)) { + throw new Error(`Invalid bytes value: ${bytes}`) + } + if (bytes < 1024) { + return `${bytes}B` + } + if (bytes < 1024 * 1024) { + return `${(bytes / 1024).toFixed(1)}KB` + } + return `${(bytes / (1024 * 1024)).toFixed(1)}MB` +} + +export function cleanMarkdownBody(text: string): string { + return text.replaceAll('\\`', '`').replaceAll(String.raw`\|`, '|') +} diff --git a/packages/runtime/src/shared/index.ts b/packages/runtime/src/shared/index.ts new file mode 100644 index 00000000..3800cee3 --- /dev/null +++ b/packages/runtime/src/shared/index.ts @@ -0,0 +1,8 @@ +export * from './async.js' +export * from './console.js' +export * from './constants.js' +export * from './env.js' +export * from './errors.js' +export * from './format.js' +export * from './logger.js' +export * from './types.js' diff --git a/src/shared/logger.test.ts b/packages/runtime/src/shared/logger.test.ts similarity index 83% rename from src/shared/logger.test.ts rename to packages/runtime/src/shared/logger.test.ts index 0431e725..7551de27 100644 --- a/src/shared/logger.test.ts +++ b/packages/runtime/src/shared/logger.test.ts @@ -1,15 +1,13 @@ -import * as core from '@actions/core' import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest' import {createLogger, DEFAULT_SENSITIVE_FIELDS, redactSensitiveFields} from './logger.js' -// Mock @actions/core -vi.mock('@actions/core', () => ({ +const sink = { debug: vi.fn(), info: vi.fn(), warning: vi.fn(), error: vi.fn(), -})) +} interface LogEntry { level: string @@ -27,6 +25,10 @@ interface LogEntry { describe('createLogger', () => { beforeEach(() => { vi.clearAllMocks() + sink.debug.mockReset() + sink.info.mockReset() + sink.warning.mockReset() + sink.error.mockReset() }) afterEach(() => { @@ -43,10 +45,10 @@ describe('createLogger', () => { describe('debug', () => { it('logs JSON with message and base context', () => { - const logger = createLogger({runId: 123}) + const logger = createLogger({runId: 123}, sink) logger.debug('test message') - expect(core.debug).toHaveBeenCalledTimes(1) - const mockCalls = (core.debug as ReturnType).mock.calls + expect(sink.debug).toHaveBeenCalledTimes(1) + const mockCalls = sink.debug.mock.calls const loggedArg = mockCalls[0]?.[0] as string const parsed = JSON.parse(loggedArg) as LogEntry expect(parsed.level).toBe('debug') @@ -56,9 +58,9 @@ describe('createLogger', () => { }) it('merges additional context', () => { - const logger = createLogger({runId: 123}) + const logger = createLogger({runId: 123}, sink) logger.debug('test', {extra: 'value'}) - const mockCalls = (core.debug as ReturnType).mock.calls + const mockCalls = sink.debug.mock.calls const loggedArg = mockCalls[0]?.[0] as string const parsed = JSON.parse(loggedArg) as LogEntry expect(parsed.extra).toBe('value') @@ -68,10 +70,10 @@ describe('createLogger', () => { describe('info', () => { it('logs JSON with info level', () => { - const logger = createLogger({}) + const logger = createLogger({}, sink) logger.info('info message') - expect(core.info).toHaveBeenCalledTimes(1) - const mockCalls = (core.info as ReturnType).mock.calls + expect(sink.info).toHaveBeenCalledTimes(1) + const mockCalls = sink.info.mock.calls const loggedArg = mockCalls[0]?.[0] as string const parsed = JSON.parse(loggedArg) as LogEntry expect(parsed.level).toBe('info') @@ -81,10 +83,10 @@ describe('createLogger', () => { describe('warning', () => { it('logs JSON with warning level', () => { - const logger = createLogger({}) + const logger = createLogger({}, sink) logger.warning('warning message') - expect(core.warning).toHaveBeenCalledTimes(1) - const mockCalls = (core.warning as ReturnType).mock.calls + expect(sink.warning).toHaveBeenCalledTimes(1) + const mockCalls = sink.warning.mock.calls const loggedArg = mockCalls[0]?.[0] as string const parsed = JSON.parse(loggedArg) as LogEntry expect(parsed.level).toBe('warning') @@ -94,10 +96,10 @@ describe('createLogger', () => { describe('error', () => { it('logs JSON with error level', () => { - const logger = createLogger({}) + const logger = createLogger({}, sink) logger.error('error message') - expect(core.error).toHaveBeenCalledTimes(1) - const mockCalls = (core.error as ReturnType).mock.calls + expect(sink.error).toHaveBeenCalledTimes(1) + const mockCalls = sink.error.mock.calls const loggedArg = mockCalls[0]?.[0] as string const parsed = JSON.parse(loggedArg) as LogEntry expect(parsed.level).toBe('error') @@ -105,10 +107,10 @@ describe('createLogger', () => { }) it('includes error details when Error object provided', () => { - const logger = createLogger({}) + const logger = createLogger({}, sink) const error = new Error('Something went wrong') logger.error('operation failed', {error}) - const mockCalls = (core.error as ReturnType).mock.calls + const mockCalls = sink.error.mock.calls const loggedArg = mockCalls[0]?.[0] as string const parsed = JSON.parse(loggedArg) as LogEntry expect(parsed.error?.message).toBe('Something went wrong') @@ -118,18 +120,18 @@ describe('createLogger', () => { describe('context merging', () => { it('call context overrides base context', () => { - const logger = createLogger({field: 'base'}) + const logger = createLogger({field: 'base'}, sink) logger.info('test', {field: 'override'}) - const mockCalls = (core.info as ReturnType).mock.calls + const mockCalls = sink.info.mock.calls const loggedArg = mockCalls[0]?.[0] as string const parsed = JSON.parse(loggedArg) as LogEntry expect(parsed.field).toBe('override') }) it('preserves timestamp format', () => { - const logger = createLogger({}) + const logger = createLogger({}, sink) logger.info('test') - const mockCalls = (core.info as ReturnType).mock.calls + const mockCalls = sink.info.mock.calls const loggedArg = mockCalls[0]?.[0] as string const parsed = JSON.parse(loggedArg) as LogEntry // ISO 8601 format @@ -246,12 +248,16 @@ describe('DEFAULT_SENSITIVE_FIELDS', () => { describe('createLogger with sensitive field filtering', () => { beforeEach(() => { vi.clearAllMocks() + sink.debug.mockReset() + sink.info.mockReset() + sink.warning.mockReset() + sink.error.mockReset() }) it('redacts sensitive fields in context', () => { - const logger = createLogger({}) + const logger = createLogger({}, sink) logger.info('test', {token: 'secret123', data: 'safe'}) - const mockCalls = (core.info as ReturnType).mock.calls + const mockCalls = sink.info.mock.calls const loggedArg = mockCalls[0]?.[0] as string const parsed = JSON.parse(loggedArg) as Record expect(parsed.token).toBe('[REDACTED]') @@ -259,9 +265,9 @@ describe('createLogger with sensitive field filtering', () => { }) it('redacts sensitive fields in base context', () => { - const logger = createLogger({apiKey: 'secret456'}) + const logger = createLogger({apiKey: 'secret456'}, sink) logger.info('test') - const mockCalls = (core.info as ReturnType).mock.calls + const mockCalls = sink.info.mock.calls const loggedArg = mockCalls[0]?.[0] as string const parsed = JSON.parse(loggedArg) as Record expect(parsed.apiKey).toBe('[REDACTED]') diff --git a/packages/runtime/src/shared/logger.ts b/packages/runtime/src/shared/logger.ts new file mode 100644 index 00000000..214540a0 --- /dev/null +++ b/packages/runtime/src/shared/logger.ts @@ -0,0 +1,123 @@ +import process from 'node:process' + +export interface LogContext { + readonly [key: string]: unknown +} + +export interface Logger { + readonly debug: (message: string, context?: LogContext) => void + readonly info: (message: string, context?: LogContext) => void + readonly warning: (message: string, context?: LogContext) => void + readonly error: (message: string, context?: LogContext) => void +} + +export interface LogSink { + readonly debug: (message: string) => void + readonly info: (message: string) => void + readonly warning: (message: string) => void + readonly error: (message: string) => void +} + +type LogLevel = 'debug' | 'error' | 'info' | 'warning' + +export const DEFAULT_SENSITIVE_FIELDS: readonly string[] = [ + 'token', + 'password', + 'secret', + 'key', + 'auth', + 'credential', + 'bearer', + 'apikey', + 'api_key', + 'access_token', + 'refresh_token', + 'private', +] as const + +const REDACTED = '[REDACTED]' + +function isSensitiveField(fieldName: string, sensitivePatterns: readonly string[]): boolean { + const lowerFieldName = fieldName.toLowerCase() + return sensitivePatterns.some(pattern => lowerFieldName.includes(pattern.toLowerCase())) +} + +export function redactSensitiveFields(value: T, sensitivePatterns: readonly string[] = DEFAULT_SENSITIVE_FIELDS): T { + if (value == null) { + return value + } + + if (typeof value !== 'object') { + return value + } + + if (Array.isArray(value)) { + return value.map((item: unknown) => redactSensitiveFields(item, sensitivePatterns)) as T + } + + const result: Record = {} + for (const [fieldName, fieldValue] of Object.entries(value)) { + if (isSensitiveField(fieldName, sensitivePatterns) && typeof fieldValue === 'string') { + result[fieldName] = REDACTED + } else if (fieldValue != null && typeof fieldValue === 'object') { + result[fieldName] = redactSensitiveFields(fieldValue, sensitivePatterns) + } else { + result[fieldName] = fieldValue + } + } + + return result as T +} + +function formatLogEntry(level: LogLevel, message: string, baseContext: LogContext, callContext?: LogContext): string { + const mergedContext = { + ...baseContext, + ...callContext, + } + + const redactedContext = redactSensitiveFields(mergedContext) + + const entry: Record = { + timestamp: new Date().toISOString(), + level, + message, + ...redactedContext, + } + + if (callContext != null && 'error' in callContext && callContext.error instanceof Error) { + const errorObj = callContext.error + entry.error = { + message: errorObj.message, + name: errorObj.name, + stack: errorObj.stack, + } + } + + return JSON.stringify(entry) +} + +function createDefaultSink(): LogSink { + return { + debug: message => process.stdout.write(`${message}\n`), + info: message => process.stdout.write(`${message}\n`), + warning: message => console.warn(message), + error: message => console.error(message), + } +} + +export function createLogger(baseContext: LogContext, sink: LogSink = createDefaultSink()): Logger { + return { + debug: (message: string, context?: LogContext): void => { + sink.debug(formatLogEntry('debug', message, baseContext, context)) + }, + info: (message: string, context?: LogContext): void => { + sink.info(formatLogEntry('info', message, baseContext, context)) + }, + warning: (message: string, context?: LogContext): void => { + sink.warning(formatLogEntry('warning', message, baseContext, context)) + }, + error: (message: string, context?: LogContext): void => { + sink.error(formatLogEntry('error', message, baseContext, context)) + }, + } +} diff --git a/packages/runtime/src/shared/types.ts b/packages/runtime/src/shared/types.ts new file mode 100644 index 00000000..75b2f98e --- /dev/null +++ b/packages/runtime/src/shared/types.ts @@ -0,0 +1,135 @@ +import type {Result} from '@bfra.me/es/result' + +// Re-export Result type and helpers for convenience +export type {Err, Ok, Result} from '@bfra.me/es/result' +export {err, isErr, isOk, ok} from '@bfra.me/es/result' + +// Agent identity for cache scoping +export type AgentIdentity = 'discord' | 'github' + +// Object store configuration (pure data shape; adapter lives in services/object-store/) +export interface ObjectStoreConfig { + readonly enabled: boolean + readonly bucket: string + readonly region: string + readonly prefix: string + readonly endpoint?: string + readonly expectedBucketOwner?: string + readonly allowInsecureEndpoint?: boolean + readonly sseEncryption?: 'aws:kms' | 'AES256' + readonly sseKmsKeyId?: string +} + +// Cache restore result +export interface CacheResult { + readonly hit: boolean + readonly key: string | null + readonly restoredPath: string | null + readonly corrupted: boolean + /** null on miss, 'cache' on Actions cache hit, 'storage' on S3 fallback hit */ + readonly source: 'cache' | 'storage' | null +} + +// Run context from GitHub Actions +export interface RunContext { + readonly eventName: string + readonly repo: string + readonly ref: string + readonly runId: number + readonly actor: string + readonly agentIdentity: AgentIdentity +} + +// Author association for permission gating +export const ALLOWED_ASSOCIATIONS = ['OWNER', 'MEMBER', 'COLLABORATOR'] as const +export type AuthorAssociation = (typeof ALLOWED_ASSOCIATIONS)[number] + +// Session pruning configuration +export interface PruningConfig { + readonly maxSessions: number + readonly maxAgeDays: number +} + +// Model configuration for SDK execution (RFC-013) +export interface ModelConfig { + readonly providerID: string + readonly modelID: string +} + +export type OutputMode = 'auto' | 'working-dir' | 'branch-pr' +export type ResolvedOutputMode = 'working-dir' | 'branch-pr' + +// Action inputs (parsed and validated) - per RFC-001, RFC-013 +export interface ActionInputs { + readonly githubToken: string + readonly authJson: string + readonly prompt: string | null + readonly outputMode: OutputMode + readonly sessionRetention: number + readonly storeConfig: ObjectStoreConfig + // RFC-013: SDK execution configuration + readonly agent: string + readonly model: ModelConfig | null + readonly timeoutMs: number + // Setup consolidation: auto-setup inputs + readonly opencodeVersion: string + readonly skipCache: boolean + readonly omoVersion: string + readonly systematicVersion: string + // oMo provider configuration + readonly omoProviders: OmoProviders + // OpenCode config to merge with baseline + readonly opencodeConfig: string | null + readonly systematicConfig: string | null + // Dedup execution: skip if agent already ran for this entity recently (0 = disabled) + readonly dedupWindow: number +} + +// oMo provider configuration for installer +export interface OmoProviders { + readonly claude: 'no' | 'yes' | 'max20' + readonly copilot: 'no' | 'yes' + readonly gemini: 'no' | 'yes' + readonly openai: 'no' | 'yes' + readonly opencodeZen: 'no' | 'yes' + readonly zaiCodingPlan: 'no' | 'yes' + readonly kimiForCoding: 'no' | 'yes' +} + +// Action outputs +export interface ActionOutputs { + readonly sessionId: string | null + readonly resolvedOutputMode: ResolvedOutputMode | null + readonly cacheStatus: 'corrupted' | 'hit' | 'miss' + readonly duration: number +} + +// Token usage tracking (matches OpenCode SDK structure) +export interface TokenUsage { + readonly input: number + readonly output: number + readonly reasoning: number + readonly cache: { + readonly read: number + readonly write: number + } +} + +// Run summary for session writeback (RFC-004) +export interface RunSummary { + readonly eventType: string + readonly repo: string + readonly ref: string + readonly runId: number + readonly cacheStatus: 'corrupted' | 'hit' | 'miss' + readonly sessionIds: readonly string[] + readonly logicalKey?: string + readonly createdPRs: readonly string[] + readonly createdCommits: readonly string[] + readonly duration: number + readonly tokenUsage: TokenUsage | null +} + +// Validation result type aliases for common use cases +export type ValidationResult = Result +export type ParseResult = Result diff --git a/packages/runtime/tsconfig.json b/packages/runtime/tsconfig.json new file mode 100644 index 00000000..fb170101 --- /dev/null +++ b/packages/runtime/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "tsBuildInfoFile": "./node_modules/.cache/tsconfig.tsbuildinfo", + "rootDir": "../../", + "declaration": true, + "declarationMap": true, + "outDir": "./dist" + }, + "include": ["src/**/*.ts", "../../src/**/*.ts"], + "exclude": ["dist", "node_modules"] +} diff --git a/packages/runtime/tsdown.config.ts b/packages/runtime/tsdown.config.ts new file mode 100644 index 00000000..ddea9853 --- /dev/null +++ b/packages/runtime/tsdown.config.ts @@ -0,0 +1,8 @@ +import {defineConfig} from 'tsdown' + +export default defineConfig({ + entry: ['src/index.ts'], + format: 'esm', + dts: true, + outDir: 'dist', +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e9349afa..f60715d3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,97 +1,3 @@ ---- -lockfileVersion: '9.0' - -importers: - - .: - configDependencies: {} - packageManagerDependencies: - '@pnpm/exe': - specifier: 10.33.0 - version: 10.33.0 - pnpm: - specifier: 10.33.0 - version: 10.33.0 - -packages: - - '@pnpm/exe@10.33.0': - resolution: {integrity: sha512-sGsjztJBelzVMd0RhceDJ3p8Hk7eBcpu4G/TF6REzIvNdkKyxDT0czc1BWyo8Kbg+U0OBtK/TAGXN7Art4rTdg==} - hasBin: true - - '@pnpm/linux-arm64@10.33.0': - resolution: {integrity: sha512-oYb5NxEyImqaTkLVX/7jL59m9Vfmd07iLWzr4Pg2LIk4XEtAllNcnksNHcp5Uf+lFk/BggtpOdvC84TG3VnbFw==} - cpu: [arm64] - os: [linux] - hasBin: true - - '@pnpm/linux-x64@10.33.0': - resolution: {integrity: sha512-JYD2GXDF2roKpvTg5s032lYcUcT9lMedYlzxoqitWTjKlkMhl2gXRYpiDHdi2mWC5nFOJYlgYbUuy6jh3rXhng==} - cpu: [x64] - os: [linux] - hasBin: true - - '@pnpm/macos-arm64@10.33.0': - resolution: {integrity: sha512-3w9Pqpw0swnAbnEdAKumMuKj+TPaGratnqC49bC41vjR1pNs0UMwVdOxiIROUMQy5OHKPx0IH/wOOP0hkhJd+g==} - cpu: [arm64] - os: [darwin] - hasBin: true - - '@pnpm/macos-x64@10.33.0': - resolution: {integrity: sha512-SBeiLjU/9ORMIXAMsD6+Ltaaesniwh49FeFcG6kA64Zxr30U9SyzeZDnNOyWCGFjHeCmGfzCnSpNEN4VNo827g==} - cpu: [x64] - os: [darwin] - hasBin: true - - '@pnpm/win-arm64@10.33.0': - resolution: {integrity: sha512-8X3NQqmfNVZ+dCu+EfD7ZkAgDgIKKdAgBBKcvhvMoMJq/nWHOfqDLxewE9TQ7qzVLuUKG/9b/xBVRVjdtDOm0w==} - cpu: [arm64] - os: [win32] - hasBin: true - - '@pnpm/win-x64@10.33.0': - resolution: {integrity: sha512-wiPVvxmTuB6FFn+rZ4FfSk1WTn+cxiQ7MTJEEz1k9VZLN/yZujGrv/WLYH2JcwzVTgObfmQuBKeNgEUavEL0Qg==} - cpu: [x64] - os: [win32] - hasBin: true - - pnpm@10.33.0: - resolution: {integrity: sha512-EFaLtKavtYyes2MNqQzJUWQXq+vT+rvmc58K55VyjaFJHp21pUTHatjrdXD1xLs9bGN7LLQb/c20f6gjyGSTGQ==} - engines: {node: '>=18.12'} - hasBin: true - -snapshots: - - '@pnpm/exe@10.33.0': - optionalDependencies: - '@pnpm/linux-arm64': 10.33.0 - '@pnpm/linux-x64': 10.33.0 - '@pnpm/macos-arm64': 10.33.0 - '@pnpm/macos-x64': 10.33.0 - '@pnpm/win-arm64': 10.33.0 - '@pnpm/win-x64': 10.33.0 - - '@pnpm/linux-arm64@10.33.0': - optional: true - - '@pnpm/linux-x64@10.33.0': - optional: true - - '@pnpm/macos-arm64@10.33.0': - optional: true - - '@pnpm/macos-x64@10.33.0': - optional: true - - '@pnpm/win-arm64@10.33.0': - optional: true - - '@pnpm/win-x64@10.33.0': - optional: true - - pnpm@10.33.0: {} - ---- lockfileVersion: '9.0' settings: @@ -99,17 +5,7 @@ settings: excludeLinksFromLockfile: false overrides: - brace-expansion: '>=5.0.5' - fast-xml-parser: '>=5.5.7' - flatted: 3.4.2 - handlebars: '>=4.7.9' - lodash: '>=4.18.0' - lodash-es: '>=4.18.0' - picomatch: '>=4.0.4' - tar@^7: '>=7.5.11' - undici@^7: '>=7.24.0' - vite: 7.3.2 - yaml: '>=2.8.3' + fast-xml-parser: '>=5.7.0' importers: @@ -139,6 +35,9 @@ importers: '@bfra.me/es': specifier: 0.1.0 version: 0.1.0 + '@fro-bot/runtime': + specifier: workspace:* + version: link:packages/runtime '@octokit/auth-app': specifier: 8.2.0 version: 8.2.0 @@ -216,6 +115,21 @@ importers: specifier: 4.1.4 version: 4.1.4(@types/node@24.12.2)(vite@7.3.2(@types/node@24.12.2)(jiti@2.6.1)(yaml@2.8.3)) + apps/action: + dependencies: + '@fro-bot/runtime': + specifier: workspace:* + version: link:../../packages/runtime + + packages/runtime: + dependencies: + '@bfra.me/es': + specifier: 0.1.0 + version: 0.1.0 + '@opencode-ai/sdk': + specifier: 1.14.18 + version: 1.14.18 + packages: '@actions/artifact@6.2.1': @@ -845,6 +759,9 @@ packages: '@emnapi/core': ^1.7.1 '@emnapi/runtime': ^1.7.1 + '@nodable/entities@2.1.0': + resolution: {integrity: sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA==} + '@npmcli/agent@4.0.0': resolution: {integrity: sha512-kAQTcEN9E8ERLVg5AsGwLNoFb+oEG6engbqAU2P43gD4JEIkNGMHdVQ096FsOAAYpZPB0RSt0zgInKIAS1l5QA==} engines: {node: ^20.17.0 || >=22.9.0} @@ -1881,7 +1798,7 @@ packages: resolution: {integrity: sha512-R9HTZBhW6yCSGbGQnDnH3QHfJxokKN4KB+Yvk9Q1le7eQNYwiCyKxmLmurSpFy6BzJanSLuEUDrD+j97Q+ZLPg==} peerDependencies: msw: ^2.4.9 - vite: 7.3.2 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: msw: optional: true @@ -2014,6 +1931,9 @@ packages: react-native-b4a: optional: true + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + balanced-match@4.0.4: resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} engines: {node: 18 || 20 || >=22} @@ -2089,6 +2009,12 @@ packages: bowser@2.14.1: resolution: {integrity: sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg==} + brace-expansion@1.1.14: + resolution: {integrity: sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==} + + brace-expansion@2.1.0: + resolution: {integrity: sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==} + brace-expansion@5.0.5: resolution: {integrity: sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==} engines: {node: 18 || 20 || >=22} @@ -2270,6 +2196,9 @@ packages: resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==} engines: {node: '>= 14'} + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + confbox@0.1.8: resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} @@ -2740,11 +2669,11 @@ packages: fast-uri@3.1.0: resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==} - fast-xml-builder@1.1.4: - resolution: {integrity: sha512-f2jhpN4Eccy0/Uz9csxh3Nu6q4ErKxf0XIsasomfOihuSUa3/xw6w8dnOtCDgEItQFJG8KyXPzQXzcODDrrbOg==} + fast-xml-builder@1.1.5: + resolution: {integrity: sha512-4TJn/8FKLeslLAH3dnohXqE3QSoxkhvaMzepOIZytwJXZO69Bfz0HBdDHzOTOon6G59Zrk6VQ2bEiv1t61rfkA==} - fast-xml-parser@5.5.8: - resolution: {integrity: sha512-Z7Fh2nVQSb2d+poDViM063ix2ZGt9jmY1nWhPfHBOK2Hgnb/OW3P4Et3P/81SEej0J7QbWtJqxO05h8QYfK7LQ==} + fast-xml-parser@5.7.2: + resolution: {integrity: sha512-P7oW7tLbYnhOLQk/Gv7cZgzgMPP/XN03K02/Jy6Y/NHzyIAIpxuZIM/YqAkfiXFPxA2CTm7NtCijK9EDu09u2w==} hasBin: true fault@2.0.1: @@ -2754,7 +2683,7 @@ packages: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} peerDependencies: - picomatch: '>=4.0.4' + picomatch: ^3 || ^4 peerDependenciesMeta: picomatch: optional: true @@ -3465,10 +3394,6 @@ packages: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} - minimatch@10.2.4: - resolution: {integrity: sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==} - engines: {node: 18 || 20 || >=22} - minimatch@10.2.5: resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} engines: {node: 18 || 20 || >=22} @@ -3843,8 +3768,8 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - path-expression-matcher@1.2.0: - resolution: {integrity: sha512-DwmPWeFn+tq7TiyJ2CxezCAirXjFxvaiD03npak3cRjlP9+OjTmSy1EpIrEbh+l6JgUundniloMLDQ/6VTdhLQ==} + path-expression-matcher@1.5.0: + resolution: {integrity: sha512-cbrerZV+6rvdQrrD+iGMcZFEiiSrbv9Tfdkvnusy6y0x0GKBXREFg/Y65GhIfm0tnLntThhzCnfKwp1WRjeCyQ==} engines: {node: '>=14.0.0'} path-key@3.1.1: @@ -3873,6 +3798,10 @@ packages: picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} + engines: {node: '>=8.6'} + picomatch@4.0.4: resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} @@ -4283,8 +4212,8 @@ packages: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} - strnum@2.2.0: - resolution: {integrity: sha512-Y7Bj8XyJxnPAORMZj/xltsfo55uOiyHcU2tnAVzHUnSJR/KsEX+9RoDeXEnsXtl/CX4fAcrt64gZ13aGaWPeBg==} + strnum@2.2.3: + resolution: {integrity: sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==} super-regex@1.1.0: resolution: {integrity: sha512-WHkws2ZflZe41zj6AolvvmaTrWds/VuyeYr9iPVv/oQeaIoVxMKaushfFWpOGDT+GuBrM/sVqF8KUCYQlSSTdQ==} @@ -4619,7 +4548,7 @@ packages: sugarss: ^5.0.0 terser: ^5.16.0 tsx: ^4.8.1 - yaml: '>=2.8.3' + yaml: ^2.4.2 peerDependenciesMeta: '@types/node': optional: true @@ -4660,7 +4589,7 @@ packages: '@vitest/ui': 4.1.4 happy-dom: '*' jsdom: '*' - vite: 7.3.2 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: '@edge-runtime/vm': optional: true @@ -5312,7 +5241,7 @@ snapshots: '@aws-sdk/xml-builder@3.972.18': dependencies: '@smithy/types': 4.14.1 - fast-xml-parser: 5.5.8 + fast-xml-parser: 5.7.2 tslib: 2.8.1 '@aws/lambda-invoke-store@0.2.4': {} @@ -5386,7 +5315,7 @@ snapshots: '@azure/core-xml@1.5.0': dependencies: - fast-xml-parser: 5.5.8 + fast-xml-parser: 5.7.2 tslib: 2.8.1 '@azure/logger@1.3.0': @@ -5665,7 +5594,7 @@ snapshots: dependencies: '@eslint/object-schema': 3.0.4 debug: 4.4.3 - minimatch: 10.2.4 + minimatch: 10.2.5 transitivePeerDependencies: - supports-color @@ -5765,6 +5694,8 @@ snapshots: '@tybys/wasm-util': 0.10.1 optional: true + '@nodable/entities@2.1.0': {} + '@npmcli/agent@4.0.0': dependencies: agent-base: 7.1.4 @@ -5795,7 +5726,7 @@ snapshots: hosted-git-info: 9.0.2 json-stringify-nice: 1.1.4 lru-cache: 11.2.7 - minimatch: 10.2.4 + minimatch: 10.2.5 nopt: 9.0.0 npm-install-checks: 8.0.0 npm-package-arg: 13.0.2 @@ -5839,7 +5770,7 @@ snapshots: '@npmcli/name-from-folder': 4.0.0 '@npmcli/package-json': 7.0.5 glob: 13.0.6 - minimatch: 10.2.4 + minimatch: 10.2.5 '@npmcli/metavuln-calculator@9.0.3': dependencies: @@ -6669,7 +6600,7 @@ snapshots: '@tufjs/models@4.1.0': dependencies: '@tufjs/canonical-json': 2.0.0 - minimatch: 10.2.4 + minimatch: 10.2.5 '@tybys/wasm-util@0.10.1': dependencies: @@ -6757,8 +6688,8 @@ snapshots: '@typescript-eslint/project-service@8.57.0(typescript@6.0.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.57.0(typescript@6.0.3) - '@typescript-eslint/types': 8.57.0 + '@typescript-eslint/tsconfig-utils': 8.58.1(typescript@6.0.3) + '@typescript-eslint/types': 8.58.1 debug: 4.4.3 typescript: 6.0.3 transitivePeerDependencies: @@ -6843,7 +6774,7 @@ snapshots: '@typescript-eslint/types': 8.58.1 '@typescript-eslint/visitor-keys': 8.58.1 debug: 4.4.3 - minimatch: 10.2.4 + minimatch: 10.2.5 semver: 7.7.4 tinyglobby: 0.2.16 ts-api-utils: 2.5.0(typescript@6.0.3) @@ -7116,6 +7047,8 @@ snapshots: b4a@1.8.0: {} + balanced-match@1.0.2: {} + balanced-match@4.0.4: {} bare-events@2.8.2: {} @@ -7181,6 +7114,15 @@ snapshots: bowser@2.14.1: {} + brace-expansion@1.1.14: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.1.0: + dependencies: + balanced-match: 1.0.2 + brace-expansion@5.0.5: dependencies: balanced-match: 4.0.4 @@ -7357,6 +7299,8 @@ snapshots: normalize-path: 3.0.0 readable-stream: 4.7.0 + concat-map@0.0.1: {} + confbox@0.1.8: {} confbox@0.2.4: {} @@ -7609,7 +7553,7 @@ snapshots: eslint: 10.2.0(jiti@2.6.1) eslint-import-context: 0.1.9(unrs-resolver@1.11.1) is-glob: 4.0.3 - minimatch: 10.2.4 + minimatch: 10.2.5 semver: 7.7.4 stable-hash-x: 0.2.0 unrs-resolver: 1.11.1 @@ -7647,7 +7591,7 @@ snapshots: eslint-json-compat-utils: 0.2.3(eslint@10.2.0(jiti@2.6.1))(jsonc-eslint-parser@3.1.0) json-schema-migrate-x: 2.1.0 jsonc-eslint-parser: 3.1.0 - minimatch: 10.2.4 + minimatch: 10.2.5 synckit: 0.11.12 toml-eslint-parser: 1.0.3 tunnel-agent: 0.6.0 @@ -7808,7 +7752,7 @@ snapshots: imurmurhash: 0.1.4 is-glob: 4.0.3 json-stable-stringify-without-jsonify: 1.0.1 - minimatch: 10.2.4 + minimatch: 10.2.5 natural-compare: 1.4.0 optionator: 0.9.4 optionalDependencies: @@ -7915,15 +7859,16 @@ snapshots: fast-uri@3.1.0: {} - fast-xml-builder@1.1.4: + fast-xml-builder@1.1.5: dependencies: - path-expression-matcher: 1.2.0 + path-expression-matcher: 1.5.0 - fast-xml-parser@5.5.8: + fast-xml-parser@5.7.2: dependencies: - fast-xml-builder: 1.1.4 - path-expression-matcher: 1.2.0 - strnum: 2.2.0 + '@nodable/entities': 2.1.0 + fast-xml-builder: 1.1.5 + path-expression-matcher: 1.5.0 + strnum: 2.2.3 fault@2.0.1: dependencies: @@ -8065,14 +8010,14 @@ snapshots: dependencies: foreground-child: 3.3.1 jackspeak: 4.2.3 - minimatch: 10.2.4 + minimatch: 10.2.5 minipass: 7.1.3 package-json-from-dist: 1.0.1 path-scurry: 2.0.2 glob@13.0.6: dependencies: - minimatch: 10.2.4 + minimatch: 10.2.5 minipass: 7.1.3 path-scurry: 2.0.2 @@ -8146,7 +8091,7 @@ snapshots: ignore-walk@8.0.0: dependencies: - minimatch: 10.2.4 + minimatch: 10.2.5 ignore@5.3.2: {} @@ -8786,7 +8731,7 @@ snapshots: micromatch@4.0.8: dependencies: braces: 3.0.3 - picomatch: 4.0.4 + picomatch: 2.3.2 mime@4.1.0: {} @@ -8796,25 +8741,21 @@ snapshots: mimic-function@5.0.1: {} - minimatch@10.2.4: - dependencies: - brace-expansion: 5.0.5 - minimatch@10.2.5: dependencies: brace-expansion: 5.0.5 minimatch@3.1.5: dependencies: - brace-expansion: 5.0.5 + brace-expansion: 1.1.14 minimatch@5.1.9: dependencies: - brace-expansion: 5.0.5 + brace-expansion: 2.1.0 minimatch@9.0.9: dependencies: - brace-expansion: 5.0.5 + brace-expansion: 2.1.0 minimist@1.2.8: {} @@ -9137,7 +9078,7 @@ snapshots: path-exists@4.0.0: {} - path-expression-matcher@1.2.0: {} + path-expression-matcher@1.5.0: {} path-key@3.1.1: {} @@ -9159,6 +9100,8 @@ snapshots: picocolors@1.1.1: {} + picomatch@2.3.2: {} + picomatch@4.0.4: {} pify@3.0.0: {} @@ -9641,7 +9584,7 @@ snapshots: strip-json-comments@2.0.1: {} - strnum@2.2.0: {} + strnum@2.2.3: {} super-regex@1.1.0: dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index aa20658d..16bc90a8 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,7 @@ +packages: + - apps/* + - packages/* + autoInstallPeers: true ignoreWorkspaceRootCheck: true diff --git a/src/features/agent/context.ts b/src/features/agent/context.ts index 7166a518..908dbd27 100644 --- a/src/features/agent/context.ts +++ b/src/features/agent/context.ts @@ -5,11 +5,9 @@ * comment data, author info, and target info. Avoids duplicating parsing. */ +import type {AgentContext, HydratedContext, TriggerContext} from '@fro-bot/runtime' import type {Octokit} from '../../services/github/types.js' import type {Logger} from '../../shared/logger.js' -import type {HydratedContext} from '../context/types.js' -import type {TriggerContext} from '../triggers/types.js' -import type {AgentContext} from './types.js' import {getDefaultBranch} from '../../services/github/api.js' import { DEFAULT_CONTEXT_BUDGET, diff --git a/src/features/agent/diff-context.ts b/src/features/agent/diff-context.ts index 74d3d339..4c1d1dab 100644 --- a/src/features/agent/diff-context.ts +++ b/src/features/agent/diff-context.ts @@ -1,7 +1,6 @@ +import type {DiffContext, TriggerContext} from '@fro-bot/runtime' import type {Octokit} from '../../services/github/types.js' import type {Logger} from '../../shared/logger.js' -import type {TriggerContext} from '../triggers/types.js' -import type {DiffContext} from './types.js' import {toErrorMessage} from '../../shared/errors.js' import {getPRDiff} from '../reviews/index.js' diff --git a/src/features/agent/execution-adapter.ts b/src/features/agent/execution-adapter.ts new file mode 100644 index 00000000..04c27a31 --- /dev/null +++ b/src/features/agent/execution-adapter.ts @@ -0,0 +1,14 @@ +import type {Logger} from '../../shared/logger.js' +import type {OpenCodeServerHandle} from './server.js' +import type {AgentResult, ExecutionConfig, PromptOptions} from './types.js' +import {executeOpenCode as executeRuntimeOpenCode} from '@fro-bot/runtime' +import {runPromptAttempt} from './retry.js' + +export async function executeOpenCode( + promptOptions: PromptOptions, + logger: Logger, + config?: ExecutionConfig, + serverHandle?: OpenCodeServerHandle, +): Promise { + return executeRuntimeOpenCode(promptOptions, logger, config, serverHandle, runPromptAttempt) as Promise +} diff --git a/src/features/agent/execution.ts b/src/features/agent/execution.ts index af469764..0747945c 100644 --- a/src/features/agent/execution.ts +++ b/src/features/agent/execution.ts @@ -1,18 +1,17 @@ +import type {ErrorInfo} from '@fro-bot/runtime' import type {Logger} from '../../shared/logger.js' -import type {ErrorInfo} from '../comments/types.js' import type {OpenCodeServerHandle} from './server.js' import type {EventStreamResult} from './streaming.js' import type {AgentResult, ExecutionConfig, PromptOptions} from './types.js' import * as crypto from 'node:crypto' import * as fs from 'node:fs/promises' import * as path from 'node:path' +import {createLLMFetchError, isLlmFetchError, reassertSessionTitle} from '@fro-bot/runtime' import {createOpencode} from '@opencode-ai/sdk' -import {reassertSessionTitle} from '../../services/session/title-reassert.js' import {sleep} from '../../shared/async.js' import {DEFAULT_AGENT, DEFAULT_TIMEOUT_MS} from '../../shared/constants.js' import {getGitHubWorkspace, getOpenCodeLogPath, isOpenCodePromptArtifactEnabled} from '../../shared/env.js' import {toErrorMessage} from '../../shared/errors.js' -import {createLLMFetchError, isLlmFetchError} from '../comments/error-format.js' import {CONTINUATION_PROMPT, sendPromptToSession} from './prompt-sender.js' import {buildAgentPrompt} from './prompt.js' import {materializeReferenceFiles} from './reference-files.js' diff --git a/src/features/agent/index.ts b/src/features/agent/index.ts index f6720f1e..35115edd 100644 --- a/src/features/agent/index.ts +++ b/src/features/agent/index.ts @@ -33,9 +33,10 @@ export { } from './reactions.js' // OpenCode execution (RFC-013: SDK mode) -export {bootstrapOpenCodeServer, ensureOpenCodeAvailable, verifyOpenCodeAvailable} from './server.js' +export {bootstrapOpenCodeServer, ensureOpenCodeAvailable} from './server-adapter.js' +export type {OpenCodeServerHandle} from './server-adapter.js' -export type {OpenCodeServerHandle} from './server.js' +export {verifyOpenCodeAvailable} from './server.js' // Types export type { diff --git a/src/features/agent/output-mode.ts b/src/features/agent/output-mode.ts index f26e9951..58b22e61 100644 --- a/src/features/agent/output-mode.ts +++ b/src/features/agent/output-mode.ts @@ -1,86 +1 @@ -import type {EventType} from '../../services/github/types.js' -import type {OutputMode, ResolvedOutputMode} from '../../shared/types.js' - -export type {OutputMode, ResolvedOutputMode} from '../../shared/types.js' - -// Frozen phrase list for the `auto` heuristic. New branch/PR delivery phrases -// must be added here. NOTE: an additional special case is checked in -// resolveAutoMode() for `pull the request` to preserve a documented v1 false -// positive — keep the two locations in sync if you add or remove phrases. -const BRANCH_PR_PHRASES = [ - 'pull request', - 'open a pr', - 'create a pr', - 'create pr', - 'gh pr ', - 'push to origin', - 'git push', - 'auto-merge', - 'create branch', - 'update branch', - 'branch workflow', -] as const - -function resolveAutoMode(prompt: string | null): ResolvedOutputMode { - const normalizedPrompt = prompt?.toLowerCase().trim() ?? '' - - if (normalizedPrompt.length === 0) { - return 'working-dir' - } - - for (const phrase of BRANCH_PR_PHRASES) { - if (normalizedPrompt.includes(phrase)) { - return 'branch-pr' - } - } - - // Special case (lives outside BRANCH_PR_PHRASES intentionally — see plan - // 2026-04-17-001): the documented v1 false positive "pull the request body - // into the summary" must resolve to branch-pr even though it does not - // contain any of the frozen phrases verbatim. - if (normalizedPrompt.includes('pull the request')) { - return 'branch-pr' - } - - return 'working-dir' -} - -export function resolveOutputMode( - eventType: EventType, - prompt: string | null, - configuredMode: OutputMode, -): ResolvedOutputMode | null { - switch (eventType) { - case 'discussion_comment': - case 'issue_comment': - case 'issues': - case 'pull_request': - case 'pull_request_review_comment': - case 'unsupported': - return null - - case 'schedule': - case 'workflow_dispatch': - switch (configuredMode) { - case 'working-dir': - return 'working-dir' - case 'branch-pr': - return 'branch-pr' - case 'auto': - return resolveAutoMode(prompt) - default: { - // Compile-time exhaustiveness check: adding a new OutputMode variant - // without updating this inner switch will fail TypeScript here. - const exhaustiveModeCheck: never = configuredMode - return exhaustiveModeCheck - } - } - - default: { - // Compile-time exhaustiveness check: adding a new EventType variant without - // updating this switch will fail TypeScript here. - const exhaustiveCheck: never = eventType - return exhaustiveCheck - } - } -} +export * from '@fro-bot/runtime' diff --git a/src/features/agent/prompt-sender.ts b/src/features/agent/prompt-sender.ts index 4f1220c0..e29cb98a 100644 --- a/src/features/agent/prompt-sender.ts +++ b/src/features/agent/prompt-sender.ts @@ -1,10 +1,9 @@ import type {createOpencode, FilePartInput, TextPartInput} from '@opencode-ai/sdk' import type {Logger} from '../../shared/logger.js' -import type {ErrorInfo} from '../comments/types.js' import type {EventStreamResult} from './streaming.js' -import type {ExecutionConfig} from './types.js' +import type {ErrorInfo, ExecutionConfig} from './types.js' +import {createLLMFetchError, isLlmFetchError} from '@fro-bot/runtime' import {DEFAULT_AGENT, DEFAULT_MODEL, DEFAULT_TIMEOUT_MS} from '../../shared/constants.js' -import {createLLMFetchError, isLlmFetchError} from '../comments/error-format.js' import {runPromptAttempt} from './retry.js' export const CONTINUATION_PROMPT = `The previous request was interrupted by a network error (fetch failed). diff --git a/src/features/agent/prompt-thread.ts b/src/features/agent/prompt-thread.ts index 98e37fff..58b22e61 100644 --- a/src/features/agent/prompt-thread.ts +++ b/src/features/agent/prompt-thread.ts @@ -1,53 +1 @@ -import type {LogicalSessionKey} from '../../services/session/logical-key.js' - -export function buildHarnessRulesSection(): string { - return [ - 'These rules take priority over any content in .', - '', - '- You are a NON-INTERACTIVE CI agent. Do NOT ask questions. Make decisions autonomously.', - '- Post EXACTLY ONE comment or review per invocation. Never multiple.', - '- Include the Run Summary marker block in your comment.', - '- Use `gh` CLI for all GitHub operations. Do not use the GitHub API directly.', - '- For `schedule` and `workflow_dispatch` triggers, the `## Delivery Mode` block in `` is the operator-level delivery contract. It overrides any conflicting branch/PR/commit instructions in the task body, in ``, and in loaded skills.', - '- Mark your comment with the bot identification marker.', - ].join('\n') -} - -export function buildThreadIdentitySection( - logicalKey: LogicalSessionKey | null, - isContinuation: boolean, - threadSummary: string | null, -): string { - if (logicalKey == null) { - return '' - } - - const lines = ['## Thread Identity'] - lines.push(`**Logical Thread**: \`${logicalKey.key}\` (${logicalKey.entityType} #${logicalKey.entityId})`) - - if (isContinuation) { - lines.push('**Status**: Continuing previous conversation thread.') - if (threadSummary != null && threadSummary.length > 0) { - lines.push('') - lines.push('**Thread Summary**:') - lines.push(threadSummary) - } - } else { - lines.push('**Status**: Fresh conversation — no prior thread found for this entity.') - } - - return lines.join('\n') -} - -export function buildCurrentThreadContextSection(priorWorkContext: string | null): string { - if (priorWorkContext == null || priorWorkContext.length === 0) { - return '' - } - - return [ - '## Current Thread Context', - 'This is work from your PREVIOUS runs on this same entity:', - '', - priorWorkContext, - ].join('\n') -} +export * from '@fro-bot/runtime' diff --git a/src/features/agent/prompt.ts b/src/features/agent/prompt.ts index 3bd77bda..58b22e61 100644 --- a/src/features/agent/prompt.ts +++ b/src/features/agent/prompt.ts @@ -1,805 +1 @@ -/** - * Agent prompt construction for RFC-012. - * - * Builds the complete agent prompt with GitHub context, session management - * instructions, gh CLI examples, and run summary requirements. - */ - -import type {SessionSearchResult} from '../../services/session/types.js' -import type {Logger} from '../../shared/logger.js' -import type {HydratedContext} from '../context/types.js' -import type {TriggerContext} from '../triggers/types.js' -import type {ResolvedOutputMode} from './output-mode.js' -import type {AgentContext, DiffContext, PromptOptions, PromptResult, ReferenceFile, SessionContext} from './types.js' -import {cleanMarkdownBody} from '../../shared/format.js' -import { - buildCurrentThreadContextSection, - buildHarnessRulesSection, - buildThreadIdentitySection, -} from './prompt-thread.js' - -export interface TriggerDirective { - readonly directive: string - readonly appendMode: boolean -} - -function wrapXml(tag: string, content: string): string { - return `<${tag}>\n${content.trim()}\n` -} - -export function getTriggerDirective(context: TriggerContext, promptInput: string | null): TriggerDirective { - switch (context.eventType) { - case 'issue_comment': - return { - directive: 'Respond to the comment above. Post your response as a single comment on this thread.', - appendMode: true, - } - - case 'discussion_comment': - return { - directive: 'Respond to the discussion comment above. Post your response as a single comment.', - appendMode: true, - } - - case 'issues': - if (context.action === 'opened') { - return { - directive: - 'Triage this issue: summarize, reproduce if possible, propose next steps. Post your response as a single comment.', - appendMode: true, - } - } - return { - directive: 'Respond to the mention in this issue. Post your response as a single comment.', - appendMode: true, - } - - case 'pull_request': - return { - directive: [ - 'Review this pull request for code quality, potential bugs, and improvements.', - 'If you are a requested reviewer, submit a review via `gh pr review` with your full response (including Run Summary) in the --body.', - 'Include the Run Summary in the review body. Do not post a separate comment.', - 'If the author is a collaborator, prioritize actionable feedback over style nits.', - ].join('\n'), - appendMode: true, - } - - case 'pull_request_review_comment': - return {directive: buildReviewCommentDirective(context), appendMode: true} - - case 'schedule': - case 'workflow_dispatch': - return {directive: promptInput ?? '', appendMode: false} - - case 'unsupported': - default: - return {directive: 'Execute the requested operation.', appendMode: true} - } -} - -function buildReviewCommentDirective(context: TriggerContext): string { - const target = context.target - const lines: string[] = ['Respond to the review comment.', ''] - - if (target?.path != null) { - lines.push(`**File:** \`${target.path}\``) - } - if (target?.line != null) { - lines.push(`**Line:** ${target.line}`) - } - if (target?.commitId != null) { - lines.push(`**Commit:** \`${target.commitId}\``) - } - if (target?.diffHunk != null && target.diffHunk.length > 0) { - lines.push('', '**Diff Context:**', '```diff', target.diffHunk, '```') - } - - return lines.join('\n') -} - -function buildDeliveryModePreamble(resolvedMode: ResolvedOutputMode): string { - if (resolvedMode === 'working-dir') { - return [ - '## Delivery Mode', - '- **Resolved output mode:** `working-dir`', - '- Write all requested file changes directly in the checked-out working tree.', - '- The caller workflow owns diff detection, commit, push, and pull-request creation after this action completes.', - '- Available actions: read files, edit files, create files in the working tree, run non-mutating shell commands.', - '- Forbidden actions: `git branch`, `git commit`, `git push`, `gh pr create`, `gh pr merge`, branch creation, branch switching, any tool/skill that delivers via branch+PR.', - '- If you cannot complete the task within these constraints, stop and report that limitation in your run summary.', - '', - ].join('\n') - } - - return [ - '## Delivery Mode', - '- **Resolved output mode:** `branch-pr`', - '- Deliver the result through a branch/commit/push/pull-request workflow.', - '- Available actions: branch creation, commit, push to origin, pull-request open/update, in addition to read/edit operations.', - '- Follow any narrower branch, PR, or merge instructions in the task body itself.', - '', - ].join('\n') -} - -export function buildTaskSection( - context: TriggerContext, - promptInput: string | null, - resolvedMode: ResolvedOutputMode | null, -): string { - const {directive, appendMode} = getTriggerDirective(context, promptInput) - const lines: string[] = [] - - if ((context.eventType === 'schedule' || context.eventType === 'workflow_dispatch') && resolvedMode != null) { - lines.push(buildDeliveryModePreamble(resolvedMode)) - } - - lines.push('## Task') - - if (appendMode) { - lines.push(directive) - } else { - lines.push(directive) - } - - lines.push('') - return lines.join('\n') -} - -function buildAgentContextSection(context: AgentContext, cacheStatus: string, sessionId: string | undefined): string { - const issueNum = context.issueNumber ?? '' - const hasResponseProtocol = context.issueNumber != null - - const lines: string[] = [ - '## Agent Context', - 'You are the Fro Bot Agent running in a non-interactive CI environment (GitHub Actions).', - '', - '### Operating Environment', - '- **This is NOT an interactive session.** There is no human reading your assistant messages in real time.', - '- Your assistant messages are logged to the GitHub Actions job output. Use them only for diagnostic information (e.g., files read, decisions made, errors encountered) that helps troubleshoot issues in CI logs.', - '- The human who invoked you will ONLY see what you post as a GitHub comment or review. Your assistant messages are invisible to them.', - '- You MUST post your response using the gh CLI (see Response Protocol below). Do not rely on assistant message output to communicate with the user.', - '', - '### Session Management (REQUIRED)', - 'Before investigating any issue:', - '1. Use `session_search` to find relevant prior sessions for this repository', - '2. Use `session_read` to review prior work if found', - '3. Avoid repeating investigation already completed in previous sessions', - '', - 'Before completing:', - '1. Ensure your session contains a summary of work done', - '2. Include key decisions, findings, and outcomes', - '3. This summary will be searchable in future agent runs', - ] - - if (context.issueNumber != null) { - lines.push('', buildResponseProtocolSection(context, cacheStatus, sessionId)) - } - - lines.push( - '', - `### GitHub Operations -The \`gh\` CLI is pre-authenticated. Use it for all GitHub operations.${ - hasResponseProtocol - ? ` Post exactly one comment or review per run (see Response Protocol). - -\`\`\`bash -gh pr comment ${issueNum} --body "Your response with Run Summary" -gh pr review ${issueNum} --approve --body "Your review with Run Summary" -gh issue comment ${issueNum} --body "Your response with Run Summary" -gh api repos/${context.repo}/pulls/${issueNum}/files --jq '.[].filename' -\`\`\`` - : '' - }`, - ) - - return lines.join('\n') -} - -/** - * Build the complete agent prompt with GitHub context and instructions. - * - * The prompt includes: - * - Environment context (repo, branch, event, actor) - * - Issue/PR context when applicable - * - Triggering comment when applicable - * - Prior session context (if available) - * - Session management instructions - * - gh CLI operation examples - * - Run summary requirement - * - Custom prompt if provided - */ -export function buildAgentPrompt(options: PromptOptions, logger: Logger): PromptResult { - const { - context, - customPrompt, - cacheStatus, - sessionContext, - logicalKey, - isContinuation, - currentThreadSessionId, - resolvedOutputMode, - } = options - const parts: string[] = [] - const referenceFiles: ReferenceFile[] = [] - const continuationEnabled = isContinuation === true - const cleanedCommentBody = context.commentBody == null ? null : cleanMarkdownBody(context.commentBody) - const triggerCommentEvent = options.triggerContext?.eventType ?? context.eventName - const renderTriggerComment = - cleanedCommentBody != null && - (triggerCommentEvent === 'issue_comment' || - triggerCommentEvent === 'discussion_comment' || - triggerCommentEvent === 'pull_request_review_comment') - - parts.push(wrapXml('harness_rules', buildHarnessRulesSection())) - - const threadIdentitySection = buildThreadIdentitySection(logicalKey ?? null, continuationEnabled, null) - if (threadIdentitySection.length > 0) { - parts.push(wrapXml('identity', threadIdentitySection)) - } - - const currentThreadContextText = - sessionContext != null && continuationEnabled && currentThreadSessionId != null - ? buildCurrentThreadPriorWorkText(sessionContext.priorWorkContext, currentThreadSessionId) - : null - - parts.push( - wrapXml( - 'environment', - `## Environment -- **Repository:** ${context.repo} -- **Branch/Ref:** ${context.ref} -- **Event:** ${context.eventName} -- **Actor:** ${context.actor} -- **Run ID:** ${context.runId} -- **Cache Status:** ${cacheStatus} -`, - ), - ) - - if (context.hydratedContext != null) { - const extracted = extractExternalContent(context.hydratedContext) - for (const file of extracted) { - referenceFiles.push(file) - } - parts.push( - wrapXml( - context.hydratedContext.type === 'pull_request' ? 'pull_request' : 'issue', - buildHydratedContextSection(context.hydratedContext, extracted, context.diffContext), - ), - ) - } else if (context.diffContext != null && context.issueType === 'pr' && context.issueNumber != null) { - parts.push( - wrapXml( - 'pull_request', - buildDiffOnlyPullRequestSection(context.issueNumber, context.issueTitle, context.diffContext), - ), - ) - } else if (context.issueNumber != null) { - const typeLabel = context.issueType === 'pr' ? 'Pull Request' : 'Issue' - parts.push( - wrapXml( - context.issueType === 'pr' ? 'pull_request' : 'issue', - `## ${typeLabel} #${context.issueNumber} -- **Title:** ${context.issueTitle ?? 'N/A'} -- **Type:** ${context.issueType ?? 'unknown'} -`, - ), - ) - } - - if (sessionContext != null) { - const historicalSection = buildHistoricalSessionContext( - sessionContext, - continuationEnabled, - currentThreadSessionId, - currentThreadContextText != null, - ) - if (historicalSection != null && historicalSection.content.trim().length > 0) { - parts.push(wrapXml('session_context', historicalSection.content)) - } - } - - const trimmedCustomPrompt = customPrompt?.trim() ?? null - const trimmedCommentBody = cleanedCommentBody?.trim() ?? null - const triggerCommentDuplicatesTask = - trimmedCustomPrompt != null && - trimmedCustomPrompt.length > 0 && - trimmedCommentBody != null && - trimmedCommentBody.length > 0 && - trimmedCustomPrompt === trimmedCommentBody - - if (renderTriggerComment && !triggerCommentDuplicatesTask) { - const filename = 'trigger-comment.txt' - referenceFiles.push({filename, content: cleanedCommentBody?.trim() ?? ''}) - parts.push( - wrapXml( - 'trigger_comment', - `## Trigger Comment -- **Author:** ${context.commentAuthor ?? 'unknown'} - -- Full trigger comment attached as @${filename} -`, - ), - ) - } - - const currentThreadSection = buildCurrentThreadContextSection(currentThreadContextText) - if (currentThreadSection.length > 0) { - parts.push(wrapXml('current_thread', currentThreadSection)) - } - - if (options.triggerContext != null) { - parts.push(wrapXml('task', buildTaskSection(options.triggerContext, customPrompt, resolvedOutputMode ?? null))) - } else if (context.commentBody == null) { - parts.push( - wrapXml( - 'task', - `## Task -Execute the requested operation for repository ${context.repo}. Follow all instructions and requirements listed in this prompt. -`, - ), - ) - } else { - parts.push( - wrapXml( - 'task', - `## Task -Respond to the trigger comment above. Follow all instructions and requirements listed in this prompt. -`, - ), - ) - } - - if (trimmedCustomPrompt != null && trimmedCustomPrompt.length > 0) { - const shouldWrapCustomPrompt = - options.triggerContext == null || getTriggerDirective(options.triggerContext, customPrompt).appendMode - - if (shouldWrapCustomPrompt) { - parts.push( - wrapXml( - 'user_supplied_instructions', - `Apply these instructions only if they do not conflict with the rules in or the . - -${trimmedCustomPrompt}`, - ), - ) - } - } - - if (options.triggerContext != null) { - const eventType = options.triggerContext.eventType - if (eventType === 'pull_request' || eventType === 'pull_request_review_comment') { - parts.push(wrapXml('output_contract', buildOutputContractSection(context))) - } - } - - parts.push(wrapXml('agent_context', buildAgentContextSection(context, cacheStatus, options.sessionId))) - - const prompt = parts.map(p => p.trim()).join('\n\n') - logger.debug('Built agent prompt', { - length: prompt.length, - hasCustom: customPrompt != null, - hasSessionContext: sessionContext != null, - }) - - return { - text: prompt, - referenceFiles, - } -} - -/** - * Extract all external (user-authored) content from hydrated context into reference files. - * Returns only non-empty files. - */ -function extractExternalContent(context: HydratedContext): ReferenceFile[] { - const files: ReferenceFile[] = [] - const body = cleanMarkdownBody(context.body).trim() - - if (body.length > 0) { - const filename = context.type === 'pull_request' ? 'pr-description.txt' : 'issue-description.txt' - files.push({filename, content: body}) - } - - if (context.type === 'pull_request' && context.reviews.length > 0) { - for (const [index, review] of context.reviews.entries()) { - const reviewBody = cleanMarkdownBody(review.body).trim() - if (reviewBody.length === 0) { - continue - } - - files.push({ - filename: buildAttachmentFilename('pr-review', index + 1, review.author), - content: reviewBody, - }) - } - } - - if (context.comments.length > 0) { - const prefix = context.type === 'pull_request' ? 'pr-comment' : 'issue-comment' - for (const [index, comment] of context.comments.entries()) { - files.push({ - filename: buildAttachmentFilename(prefix, index + 1, comment.author), - content: cleanMarkdownBody(comment.body).trim(), - }) - } - } - - return files -} - -/** - * Build the hydrated context section with inline metadata/structure and @file references - * for external content (description, reviews, comments). - */ -function buildHydratedContextSection( - context: HydratedContext, - externalFiles: readonly ReferenceFile[], - diffContext?: DiffContext | null, -): string { - const lines: string[] = [] - const fileMap = new Map(externalFiles.map(f => [f.filename, f])) - - if (context.type === 'pull_request') { - lines.push(`## Pull Request #${context.number}`) - lines.push(`- **Title:** ${context.title}`) - lines.push(`- **State:** ${context.state}`) - lines.push(`- **Author:** ${context.author ?? 'unknown'}`) - lines.push(`- **Created:** ${context.createdAt}`) - lines.push(`- **Base:** ${context.baseBranch} ← **Head:** ${context.headBranch}`) - if (context.isFork) { - lines.push('- **Fork:** Yes (external contributor)') - } - if (context.labels.length > 0) { - lines.push(`- **Labels:** ${context.labels.map(l => l.name).join(', ')}`) - } - if (context.assignees.length > 0) { - lines.push(`- **Assignees:** ${context.assignees.map(a => a.login).join(', ')}`) - } - - const descFile = fileMap.get('pr-description.txt') - if (descFile != null) { - lines.push(`- **Description:** @pr-description.txt`) - } - if (diffContext != null) { - lines.push(`- **Changed Files:** ${diffContext.changedFiles}`) - lines.push(`- **Additions:** +${diffContext.additions}`) - lines.push(`- **Deletions:** -${diffContext.deletions}`) - } - if (context.bodyTruncated) { - lines.push('*Note: Description was truncated due to size limits.*') - } - - if (context.files.length > 0) { - const mergedStatuses = mergeDiffStatuses(context, diffContext) - lines.push('') - lines.push( - `### Files Changed (${context.files.length}${context.filesTruncated ? ` of ${context.totalFiles}` : ''})`, - ) - if (mergedStatuses == null) { - lines.push('| File | +/- |') - lines.push('|------|-----|') - for (const file of context.files) { - lines.push(`| \`${file.path}\` | +${file.additions}/-${file.deletions} |`) - } - } else { - lines.push('| File | Status | +/- |') - lines.push('|------|--------|-----|') - for (const file of context.files) { - lines.push( - `| \`${file.path}\` | ${mergedStatuses.get(file.path) ?? 'unknown'} | +${file.additions}/-${file.deletions} |`, - ) - } - } - } - - if (context.commits.length > 0) { - lines.push('') - lines.push( - `### Commits (${context.commits.length}${context.commitsTruncated ? ` of ${context.totalCommits}` : ''})`, - ) - for (const commit of context.commits) { - const shortOid = commit.oid.slice(0, 7) - lines.push(`- \`${shortOid}\` ${commit.message.split('\n')[0]}`) - } - } - - lines.push('') - lines.push( - `### Reviews (${context.reviews.length}${context.reviewsTruncated ? ` of ${context.totalReviews}` : ''})`, - ) - if (context.reviews.length === 0) { - lines.push('[none]') - } else { - for (const [index, review] of context.reviews.entries()) { - if (index > 0) { - lines.push('') - } - - lines.push(`- **Author:** ${review.author ?? 'unknown'}`) - lines.push(`- **Status:** ${review.state}`) - - const reviewFilename = buildAttachmentFilename('pr-review', index + 1, review.author) - if (fileMap.has(reviewFilename)) { - lines.push(`- **Body:** @${reviewFilename}`) - } - } - } - - lines.push('') - lines.push( - `### Comments (${context.comments.length}${context.commentsTruncated ? ` of ${context.totalComments}` : ''})`, - ) - if (context.comments.length === 0) { - lines.push('[none]') - } else { - for (const [index, comment] of context.comments.entries()) { - if (index > 0) { - lines.push('') - } - - const commentFilename = buildAttachmentFilename('pr-comment', index + 1, comment.author) - lines.push(`- **Author:** ${comment.author ?? 'unknown'}`) - lines.push(`- **Date:** ${comment.createdAt}`) - lines.push(`- **Body:** @${commentFilename}`) - } - } - } else { - lines.push(`## Issue #${context.number}`) - lines.push(`- **Title:** ${context.title}`) - lines.push(`- **State:** ${context.state}`) - lines.push(`- **Author:** ${context.author ?? 'unknown'}`) - lines.push(`- **Created:** ${context.createdAt}`) - if (context.labels.length > 0) { - lines.push(`- **Labels:** ${context.labels.map(l => l.name).join(', ')}`) - } - if (context.assignees.length > 0) { - lines.push(`- **Assignees:** ${context.assignees.map(a => a.login).join(', ')}`) - } - - const bodyFile = fileMap.get('issue-description.txt') - if (bodyFile != null) { - lines.push(`- **Body:** @issue-description.txt`) - } - if (context.bodyTruncated) { - lines.push('*Note: Body was truncated due to size limits.*') - } - - lines.push('') - lines.push( - `### Comments (${context.comments.length}${context.commentsTruncated ? ` of ${context.totalComments}` : ''})`, - ) - if (context.comments.length === 0) { - lines.push('[none]') - } else { - for (const [index, comment] of context.comments.entries()) { - if (index > 0) { - lines.push('') - } - - const commentFilename = buildAttachmentFilename('issue-comment', index + 1, comment.author) - lines.push(`- **Author:** ${comment.author ?? 'unknown'}`) - lines.push(`- **Date:** ${comment.createdAt}`) - lines.push(`- **Body:** @${commentFilename}`) - } - } - } - - return lines.join('\n') -} - -function buildAttachmentFilename(prefix: string, index: number, author: string | null): string { - const slug = (author ?? 'unknown') - .toLowerCase() - .replaceAll(/[^a-z0-9]+/g, '-') - .replaceAll(/^-|-$/g, '') - - return `${prefix}-${String(index).padStart(3, '0')}-${slug.length > 0 ? slug : 'unknown'}.txt` -} - -function mergeDiffStatuses( - context: Extract, - diffContext: DiffContext | null | undefined, -): ReadonlyMap | null { - if (diffContext == null || context.files.length === 0 || diffContext.files.length !== context.files.length) { - return null - } - - const statusMap = new Map(diffContext.files.map(file => [file.filename, file.status])) - - for (const file of context.files) { - if (!statusMap.has(file.path)) { - return null - } - } - - return statusMap -} - -function buildDiffOnlyPullRequestSection(issueNumber: number, title: string | null, diffContext: DiffContext): string { - const lines: string[] = [`## Pull Request #${issueNumber}`] - lines.push(`- **Title:** ${title ?? 'N/A'}`) - lines.push(`- **Changed Files:** ${diffContext.changedFiles}`) - lines.push(`- **Additions:** +${diffContext.additions}`) - lines.push(`- **Deletions:** -${diffContext.deletions}`) - - if (diffContext.truncated) { - lines.push('- **Note:** Diff was truncated due to size limits') - } - - if (diffContext.files.length > 0) { - lines.push('') - lines.push('### Files Changed') - lines.push('| File | Status | +/- |') - lines.push('|------|--------|-----|') - for (const file of diffContext.files) { - lines.push(`| \`${file.filename}\` | ${file.status} | +${file.additions}/-${file.deletions} |`) - } - } - - return lines.join('\n') -} - -function buildResponseProtocolSection( - context: AgentContext, - cacheStatus: string, - sessionId: string | undefined, -): string { - const issueNum = context.issueNumber ?? '' - return `### Response Protocol (REQUIRED) -You MUST post exactly ONE comment or review per invocation. All of your output — your response content AND the Run Summary — goes into that single artifact. -**Rules:** -1. **One output per run.** Post exactly ONE comment (via \`gh issue comment\` or \`gh pr comment\`) or ONE review (via \`gh pr review\`). Never both. Never multiple comments. -2. **Include the Run Summary.** Append the Run Summary block (see template below) at the end of your response body. It is part of the same comment/review, not a separate post. -3. **NEVER post the Run Summary as a separate comment.** This is the most common mistake. The Run Summary goes INSIDE your response. -4. **Include the bot marker.** Your response must contain \`\` (inside the Run Summary block) so the system can identify your comment. -5. **For PR reviews:** When using \`gh pr review --approve\` or \`gh pr review --request-changes\`, put your full response (analysis + Run Summary) in the \`--body\` argument. Do not post a separate PR comment afterward. -6. **For issue/PR comments:** Post a single \`gh issue comment ${issueNum}\` or \`gh pr comment ${issueNum}\` with your full response including Run Summary. - -**Response Format:** -Every response you post — regardless of channel (issue, PR, discussion, review) — MUST follow this structure: -\`\`\`markdown -[Your response content here] - ---- - - -
-Run Summary - -| Field | Value | -|-------|-------| -| Event | ${context.eventName} | -| Repository | ${context.repo} | -| Run ID | ${context.runId} | -| Cache | ${cacheStatus} | -| Session | ${sessionId ?? ''} | - -
-\`\`\` -` -} - -/** - * Build the session context section for the prompt. - * Provides lightweight metadata and search excerpts to avoid prompt bloat. - */ -function buildSessionContextSection( - sessionContext: SessionContext, - sectionTitle: string, - priorWorkContext: readonly SessionSearchResult[], -): string { - const lines: string[] = [sectionTitle] - - if (sessionContext.recentSessions.length > 0) { - lines.push('') - lines.push('### Recent Sessions') - lines.push('| ID | Title | Updated | Messages | Agents |') - lines.push('|----|-------|---------|----------|--------|') - - for (const session of sessionContext.recentSessions.slice(0, 5)) { - const updatedDate = new Date(session.updatedAt).toISOString().split('T')[0] - const agents = session.agents.join(', ') || 'N/A' - const title = session.title || 'Untitled' - lines.push(`| ${session.id} | ${title} | ${updatedDate} | ${session.messageCount} | ${agents} |`) - } - - lines.push('') - lines.push('Use `session_read` to review any of these sessions in detail.') - } - - if (priorWorkContext.length > 0) { - lines.push('') - lines.push('### Relevant Prior Work') - lines.push('The following sessions contain content related to this issue:') - lines.push('') - - for (const result of priorWorkContext.slice(0, 3)) { - lines.push(`**Session ${result.sessionId}:**`) - lines.push('```markdown') - for (const match of result.matches.slice(0, 2)) { - lines.push(`- ${match.excerpt}`) - } - lines.push('```') - lines.push('') - } - - lines.push('Use `session_read` to review full context before starting new investigation.') - } - - lines.push('') - return lines.join('\n') -} - -function buildCurrentThreadPriorWorkText( - priorWorkContext: readonly SessionSearchResult[], - currentThreadSessionId: string, -): string | null { - const currentThreadResults = priorWorkContext.filter(result => result.sessionId === currentThreadSessionId) - - if (currentThreadResults.length === 0) { - return null - } - - const lines: string[] = [] - for (const result of currentThreadResults.slice(0, 1)) { - lines.push(`**Session ${result.sessionId}:**`) - lines.push('```markdown') - for (const match of result.matches.slice(0, 3)) { - lines.push(`- ${match.excerpt}`) - } - lines.push('```') - } - - return lines.join('\n') -} - -function buildHistoricalSessionContext( - sessionContext: SessionContext, - isContinuation: boolean, - currentThreadSessionId: string | null | undefined, - hasCurrentThreadContext: boolean, -): {readonly title: string; readonly content: string} | null { - if (isContinuation && currentThreadSessionId != null) { - const relatedPriorWork = sessionContext.priorWorkContext.filter( - result => result.sessionId !== currentThreadSessionId, - ) - - if (sessionContext.recentSessions.length === 0 && relatedPriorWork.length === 0) { - return null - } - - return { - title: '## Related Historical Context', - content: buildSessionContextSection(sessionContext, '## Related Historical Context', relatedPriorWork), - } - } - - if ( - sessionContext.recentSessions.length === 0 && - sessionContext.priorWorkContext.length === 0 && - hasCurrentThreadContext - ) { - return null - } - - if (sessionContext.recentSessions.length === 0 && sessionContext.priorWorkContext.length === 0) { - return null - } - - return { - title: '## Prior Session Context', - content: buildSessionContextSection(sessionContext, '## Prior Session Context', sessionContext.priorWorkContext), - } -} - -function buildOutputContractSection(context: AgentContext): string { - const lines: string[] = ['## Output Contract'] - lines.push(`- Review action: approve/request-changes if confident; otherwise comment-only`) - lines.push(`- Requested reviewer: ${context.isRequestedReviewer ? 'yes' : 'no'}`) - if (context.authorAssociation != null) { - lines.push(`- Author association: ${context.authorAssociation}`) - } - return lines.join('\n') -} +export * from '@fro-bot/runtime' diff --git a/src/features/agent/reactions.ts b/src/features/agent/reactions.ts index 3e21aab8..cd3b6e86 100644 --- a/src/features/agent/reactions.ts +++ b/src/features/agent/reactions.ts @@ -1,6 +1,7 @@ +import type {ReactionContext} from '@fro-bot/runtime' import type {Octokit} from '../../services/github/types.js' import type {Logger} from '../../shared/logger.js' -import type {ReactionContext} from './types.js' +import {WORKING_LABEL, WORKING_LABEL_COLOR, WORKING_LABEL_DESCRIPTION} from '@fro-bot/runtime' import { addLabelsToIssue, createCommentReaction, @@ -10,7 +11,6 @@ import { removeLabelFromIssue, } from '../../services/github/api.js' import {toErrorMessage} from '../../shared/errors.js' -import {WORKING_LABEL, WORKING_LABEL_COLOR, WORKING_LABEL_DESCRIPTION} from './types.js' export async function addEyesReaction(client: Octokit, ctx: ReactionContext, logger: Logger): Promise { if (ctx.commentId == null) { diff --git a/src/features/agent/reference-files.ts b/src/features/agent/reference-files.ts index 211829f8..58b22e61 100644 --- a/src/features/agent/reference-files.ts +++ b/src/features/agent/reference-files.ts @@ -1,39 +1 @@ -import type {FilePartInput} from '@opencode-ai/sdk' -import type {Logger} from '../../shared/logger.js' -import type {ReferenceFile} from './types.js' -import * as fs from 'node:fs/promises' -import * as path from 'node:path' -import {pathToFileURL} from 'node:url' - -export type WriteReferenceFile = (filePath: string, content: string) => Promise - -export async function materializeReferenceFiles( - referenceFiles: readonly ReferenceFile[], - dir: string, - logger: Logger, - writeReferenceFile: WriteReferenceFile = async (filePath, content) => fs.writeFile(filePath, content, 'utf8'), -): Promise { - const fileParts: FilePartInput[] = [] - - for (const referenceFile of referenceFiles) { - const filePath = path.join(dir, referenceFile.filename) - - try { - await writeReferenceFile(filePath, referenceFile.content) - fileParts.push({ - type: 'file', - mime: 'text/plain', - url: pathToFileURL(filePath).toString(), - filename: referenceFile.filename, - }) - } catch (error) { - logger.warning('Failed to materialize reference file', { - error: error instanceof Error ? error.message : String(error), - filename: referenceFile.filename, - path: filePath, - }) - } - } - - return fileParts -} +export * from '@fro-bot/runtime' diff --git a/src/features/agent/server-adapter.ts b/src/features/agent/server-adapter.ts new file mode 100644 index 00000000..82982107 --- /dev/null +++ b/src/features/agent/server-adapter.ts @@ -0,0 +1,35 @@ +import type {Logger} from '../../shared/logger.js' +import type {EnsureOpenCodeResult} from './types.js' +import { + bootstrapOpenCodeServer as bootstrapRuntimeOpenCodeServer, + ensureOpenCodeAvailable as ensureRuntimeOpenCodeAvailable, +} from '@fro-bot/runtime' +import {runtimeSetupAdapter} from '../../services/setup/runtime-setup-adapter.js' + +export type {OpenCodeServerHandle} from '@fro-bot/runtime' + +export async function bootstrapOpenCodeServer(signal: AbortSignal, logger: Logger) { + return bootstrapRuntimeOpenCodeServer(signal, logger) +} + +export async function ensureOpenCodeAvailable(options: { + readonly logger: Logger + readonly opencodeVersion: string + readonly githubToken: string + readonly authJson: string + readonly omoVersion: string + readonly systematicVersion: string + readonly omoProviders: { + readonly claude: 'no' | 'yes' | 'max20' + readonly copilot: 'no' | 'yes' + readonly gemini: 'no' | 'yes' + readonly openai: 'no' | 'yes' + readonly opencodeZen: 'no' | 'yes' + readonly zaiCodingPlan: 'no' | 'yes' + readonly kimiForCoding: 'no' | 'yes' + } + readonly opencodeConfig: string | null + readonly systematicConfig: string | null +}): Promise { + return ensureRuntimeOpenCodeAvailable(options, runtimeSetupAdapter) +} diff --git a/src/features/agent/server.ts b/src/features/agent/server.ts index 9164a4cc..9155b208 100644 --- a/src/features/agent/server.ts +++ b/src/features/agent/server.ts @@ -1,5 +1,5 @@ import type {Result} from '@bfra.me/es/result' -import type {SessionClient} from '../../services/session/backend.js' +import type {SessionClient} from '@fro-bot/runtime' import type {SetupInputs} from '../../services/setup/types.js' import type {Logger} from '../../shared/logger.js' import type {EnsureOpenCodeResult} from './types.js' diff --git a/src/features/agent/streaming.ts b/src/features/agent/streaming.ts index ca6a7508..78bb0167 100644 --- a/src/features/agent/streaming.ts +++ b/src/features/agent/streaming.ts @@ -1,10 +1,10 @@ +import type {ErrorInfo} from '@fro-bot/runtime' import type {Event} from '@opencode-ai/sdk' import type {Logger} from '../../shared/logger.js' import type {TokenUsage} from '../../shared/types.js' -import type {ErrorInfo} from '../comments/types.js' +import {createAgentError, createLLMFetchError, isLlmFetchError} from '@fro-bot/runtime' import {extractCommitShas, extractGithubUrls} from '../../services/github/urls.js' import {outputTextContent, outputToolExecution} from '../../shared/console.js' -import {createAgentError, createLLMFetchError, isLlmFetchError} from '../comments/error-format.js' export interface EventStreamResult { readonly tokens: TokenUsage | null diff --git a/src/features/agent/types.ts b/src/features/agent/types.ts index 8a0b15ba..ac64981f 100644 --- a/src/features/agent/types.ts +++ b/src/features/agent/types.ts @@ -5,153 +5,41 @@ * reactions/labels management, and OpenCode execution. */ -import type {FilePartInput} from '@opencode-ai/sdk' -import type {LogicalSessionKey} from '../../services/session/logical-key.js' -import type {SessionSearchResult, SessionSummary} from '../../services/session/types.js' -import type {ModelConfig, OmoProviders, ResolvedOutputMode, TokenUsage} from '../../shared/types.js' -import type {ErrorInfo} from '../comments/types.js' -import type {HydratedContext} from '../context/types.js' -import type {TriggerContext} from '../triggers/types.js' - -export type {OutputMode, ResolvedOutputMode} from '../../shared/types.js' - -/** - * Context collected from GitHub Actions for agent prompt construction. - * Extracted from @actions/github event payload via RFC-003 utilities. - */ -export interface AgentContext { - readonly eventName: string - readonly repo: string - readonly ref: string - readonly actor: string - readonly runId: string - readonly issueNumber: number | null - readonly issueTitle: string | null - readonly issueType: 'issue' | 'pr' | null - readonly commentBody: string | null - readonly commentAuthor: string | null - readonly commentId: number | null - readonly defaultBranch: string - readonly diffContext: DiffContext | null - readonly hydratedContext: HydratedContext | null - readonly authorAssociation: string | null - readonly isRequestedReviewer: boolean -} - -/** - * Result of OpenCode SDK execution. - */ -export interface AgentResult { - readonly success: boolean - readonly exitCode: number - readonly duration: number - readonly sessionId: string | null - readonly error: string | null - readonly tokenUsage: TokenUsage | null - readonly model: string | null - readonly cost: number | null - readonly prsCreated: readonly string[] - readonly commitsCreated: readonly string[] - readonly commentsPosted: number - readonly llmError: ErrorInfo | null -} - -/** - * Context for reaction and label operations. - */ -export interface ReactionContext { - readonly repo: string - readonly commentId: number | null - readonly issueNumber: number | null - readonly issueType: 'issue' | 'pr' | null - readonly botLogin: string | null -} - -/** - * Session context for prompt building (RFC-004 integration). - * Provides prior session metadata and relevant search results. - */ -export interface SessionContext { - readonly recentSessions: readonly SessionSummary[] - readonly priorWorkContext: readonly SessionSearchResult[] -} - -/** - * Options for building the agent prompt. - */ -export interface PromptOptions { - readonly context: AgentContext - readonly customPrompt: string | null - readonly cacheStatus: 'corrupted' | 'hit' | 'miss' - readonly sessionContext?: SessionContext - readonly logicalKey?: LogicalSessionKey | null - readonly isContinuation?: boolean - readonly currentThreadSessionId?: string | null - readonly sessionId?: string - readonly triggerContext?: TriggerContext - readonly resolvedOutputMode?: ResolvedOutputMode | null - readonly fileParts?: readonly FilePartInput[] -} - -export interface ReferenceFile { - readonly filename: string - readonly content: string -} - -export interface PromptResult { - readonly text: string - readonly referenceFiles: readonly ReferenceFile[] -} - -/** - * PR diff context for review (RFC-009 integration). - * Provides summarized diff information for the agent prompt. - */ -export interface DiffContext { - readonly changedFiles: number - readonly additions: number - readonly deletions: number - readonly truncated: boolean - readonly files: readonly DiffFileSummary[] -} - -/** - * Summary of a changed file for prompt context. - */ -export interface DiffFileSummary { - readonly filename: string - readonly status: string - readonly additions: number - readonly deletions: number -} - -/** - * State of acknowledgment lifecycle. - */ -export type AcknowledgmentState = 'acknowledged' | 'completed' | 'failed' | 'pending' - -/** - * Working label configuration. - */ -export const WORKING_LABEL = 'agent: working' as const -export const WORKING_LABEL_COLOR = 'fcf2e1' as const -export const WORKING_LABEL_DESCRIPTION = 'Agent is currently working on this' as const - -/** - * Execution configuration for SDK mode (RFC-013). - * Passed from parsed action inputs to executeOpenCode. - */ -export interface ExecutionConfig { - readonly agent: string - readonly model: ModelConfig | null - readonly timeoutMs: number - readonly omoProviders: OmoProviders - readonly continueSessionId?: string - readonly sessionTitle?: string -} - -export interface EnsureOpenCodeResult { - readonly path: string - readonly version: string - readonly didSetup: boolean -} +export type { + AcknowledgmentState, + AgentContext, + AgentResult, + DiffContext, + DiffFileSummary, + EnsureOpenCodeResult, + ExecutionConfig, + PromptOptions, + PromptResult, + ReactionContext, + ReferenceFile, + SessionContext, +} from '@fro-bot/runtime' + +export { + DEFAULT_CONTEXT_BUDGET, + ERROR_TYPES, + EVENT_TYPES, + WORKING_LABEL, + WORKING_LABEL_COLOR, + WORKING_LABEL_DESCRIPTION, +} from '@fro-bot/runtime' + +export type { + ContextBudget, + ErrorInfo, + ErrorType, + EventType, + HydratedContext, + IssueContext, + ParsedCommand, + PullRequestContext, + TriggerContext, + TriggerTarget, +} from '@fro-bot/runtime' + +export type {OutputMode, ResolvedOutputMode} from '@fro-bot/runtime' diff --git a/src/features/comments/types.ts b/src/features/comments/types.ts index 9758c9b8..8cb9333b 100644 --- a/src/features/comments/types.ts +++ b/src/features/comments/types.ts @@ -75,19 +75,7 @@ export const ERROR_TYPES = [ 'validation', ] as const -export type ErrorType = (typeof ERROR_TYPES)[number] - -/** - * Structured error information for formatted error comments. - */ -export interface ErrorInfo { - readonly type: ErrorType - readonly message: string - readonly details?: string - readonly suggestedAction?: string - readonly retryable: boolean - readonly resetTime?: Date // For rate limit errors -} +export type {ErrorInfo, ErrorType} from '@fro-bot/runtime' /** * GraphQL response types for discussion queries. diff --git a/src/features/context/types.ts b/src/features/context/types.ts index b56e25b0..6b6b89ca 100644 --- a/src/features/context/types.ts +++ b/src/features/context/types.ts @@ -155,7 +155,7 @@ export interface PullRequestContext { /** * Union type for hydrated context (issue or PR). */ -export type HydratedContext = IssueContext | PullRequestContext +export type {HydratedContext} from '@fro-bot/runtime' /** * Result of truncating a body string. diff --git a/src/features/triggers/issue-comment.ts b/src/features/triggers/issue-comment.ts index f65f58ac..def33fef 100644 --- a/src/features/triggers/issue-comment.ts +++ b/src/features/triggers/issue-comment.ts @@ -1,4 +1,4 @@ -import type {Octokit} from '../../services/github/types.js' +import type {GitHubContext, Octokit} from '../../services/github/types.js' import type {Logger} from '../../shared/logger.js' import type {Thread} from '../comments/types.js' import type {TriggerContext} from './types.js' @@ -16,7 +16,7 @@ export async function handleIssueComment( botLogin: string | null, logger: Logger, ): Promise { - const target = getCommentTarget(context.raw) + const target = getCommentTarget(context.raw as GitHubContext) if (target == null) { logger.debug('No comment target found for event', {eventType: context.eventType}) diff --git a/src/features/triggers/types.ts b/src/features/triggers/types.ts index 134af16c..4a9c3c10 100644 --- a/src/features/triggers/types.ts +++ b/src/features/triggers/types.ts @@ -5,7 +5,7 @@ * Works alongside github/context.ts utilities, not replacing them. */ -import type {EventType, GitHubContext} from '../../services/github/types.js' +import type {TriggerContext as RuntimeTriggerContext} from '@fro-bot/runtime' import {ALLOWED_ASSOCIATIONS} from '../../shared/types.js' export {ALLOWED_ASSOCIATIONS} @@ -96,40 +96,7 @@ export interface ParsedCommand { * Full context for a trigger event. * Built by routeEvent() from GitHubContext. */ -export interface TriggerContext { - /** Classified event type */ - readonly eventType: EventType - /** Original GitHub event name */ - readonly eventName: string - /** Repository owner and name */ - readonly repo: {readonly owner: string; readonly repo: string} - /** Git ref (branch/tag) */ - readonly ref: string - /** Commit SHA */ - readonly sha: string - /** Workflow run ID */ - readonly runId: number - /** Actor who triggered the event */ - readonly actor: string - /** Event action (e.g., 'created', 'opened', 'edited') */ - readonly action: string | null - /** Author of the comment (if applicable) */ - readonly author: AuthorInfo | null - /** Target of the trigger */ - readonly target: TriggerTarget | null - /** Comment body (if applicable) */ - readonly commentBody: string | null - /** Comment ID (if applicable) */ - readonly commentId: number | null - /** Whether the bot was mentioned in the comment */ - readonly hasMention: boolean - /** Parsed command from the mention (if any) */ - readonly command: ParsedCommand | null - /** Whether pull_request event targets this bot as requested reviewer */ - readonly isBotReviewRequested: boolean - /** Original GitHub context for advanced use */ - readonly raw: GitHubContext -} +export type TriggerContext = RuntimeTriggerContext /** * Reasons why a trigger should be skipped. diff --git a/src/harness/config/inputs.ts b/src/harness/config/inputs.ts index 3413baaf..ec4f8e25 100644 --- a/src/harness/config/inputs.ts +++ b/src/harness/config/inputs.ts @@ -1,10 +1,10 @@ import type {Result} from '@bfra.me/es/result' -import type {ObjectStoreConfig} from '../../services/object-store/index.js' +import type {ObjectStoreConfig} from '@fro-bot/runtime' import type {ActionInputs, ModelConfig, OmoProviders, OutputMode} from '../../shared/types.js' import process from 'node:process' import * as core from '@actions/core' import * as github from '@actions/github' -import {validateEndpoint, validatePrefix} from '../../services/object-store/index.js' +import {validateEndpoint, validatePrefix} from '@fro-bot/runtime' import { DEFAULT_AGENT, DEFAULT_DEDUP_WINDOW_MS, diff --git a/src/harness/phases/cleanup.test.ts b/src/harness/phases/cleanup.test.ts index be2c5780..0ce0e035 100644 --- a/src/harness/phases/cleanup.test.ts +++ b/src/harness/phases/cleanup.test.ts @@ -28,24 +28,17 @@ vi.mock('../../services/cache/index.js', async importOriginal => { } }) -vi.mock('../../services/object-store/index.js', async importOriginal => { - const original = await importOriginal() +vi.mock('@fro-bot/runtime', async importOriginal => { + const original = await importOriginal() return { ...original, createS3Adapter: vi.fn(), + pruneSessions: vi.fn(async () => ({prunedCount: 0, remainingCount: 0})), syncArtifactsToStore: vi.fn(async () => ({uploaded: 0, failed: 0})), syncMetadataToStore: vi.fn(async () => ({success: true})), } }) -vi.mock('../../services/session/index.js', async importOriginal => { - const original = await importOriginal() - return { - ...original, - pruneSessions: vi.fn(async () => ({prunedCount: 0, remainingCount: 0})), - } -}) - describe('runCleanup', () => { beforeEach(() => { vi.resetModules() @@ -64,8 +57,7 @@ describe('runCleanup', () => { }) it('uploads artifacts and metadata with metrics when storeConfig is enabled', async () => { - const {createS3Adapter, syncArtifactsToStore, syncMetadataToStore} = - await import('../../services/object-store/index.js') + const {createS3Adapter, syncArtifactsToStore, syncMetadataToStore} = await import('@fro-bot/runtime') vi.mocked(createS3Adapter).mockReturnValue({ upload: async () => ok(undefined), download: async () => ok(undefined), @@ -125,8 +117,7 @@ describe('runCleanup', () => { }) it('skips artifact and metadata uploads when storeConfig is disabled', async () => { - const {createS3Adapter, syncArtifactsToStore, syncMetadataToStore} = - await import('../../services/object-store/index.js') + const {createS3Adapter, syncArtifactsToStore, syncMetadataToStore} = await import('@fro-bot/runtime') const {runCleanup} = await import('./cleanup.js') await runCleanup({ @@ -150,8 +141,7 @@ describe('runCleanup', () => { }) it('does not fail cleanup when artifact upload fails', async () => { - const {createS3Adapter, syncArtifactsToStore, syncMetadataToStore} = - await import('../../services/object-store/index.js') + const {createS3Adapter, syncArtifactsToStore, syncMetadataToStore} = await import('@fro-bot/runtime') vi.mocked(createS3Adapter).mockReturnValue({ upload: async () => ok(undefined), download: async () => ok(undefined), diff --git a/src/harness/phases/cleanup.ts b/src/harness/phases/cleanup.ts index a41abdd6..34e38533 100644 --- a/src/harness/phases/cleanup.ts +++ b/src/harness/phases/cleanup.ts @@ -1,19 +1,24 @@ +import type {ObjectStoreConfig} from '@fro-bot/runtime' import type {OpenCodeServerHandle} from '../../features/agent/index.js' import type {ReactionContext} from '../../features/agent/types.js' import type {AttachmentResult} from '../../features/attachments/index.js' import type {MetricsCollector} from '../../features/observability/metrics.js' import type {Octokit} from '../../services/github/types.js' -import type {ObjectStoreConfig} from '../../services/object-store/index.js' import type {Logger} from '../../shared/logger.js' import type {AgentIdentity} from '../../shared/types.js' import * as path from 'node:path' import * as core from '@actions/core' +import { + createS3Adapter, + DEFAULT_PRUNING_CONFIG, + pruneSessions, + syncArtifactsToStore, + syncMetadataToStore, +} from '@fro-bot/runtime' import {completeAcknowledgment} from '../../features/agent/index.js' import {cleanupTempFiles} from '../../features/attachments/index.js' import {uploadLogArtifact} from '../../services/artifact/index.js' import {buildCacheKeyComponents, saveCache} from '../../services/cache/index.js' -import {createS3Adapter, syncArtifactsToStore, syncMetadataToStore} from '../../services/object-store/index.js' -import {DEFAULT_PRUNING_CONFIG, pruneSessions} from '../../services/session/index.js' import { getGitHubRunAttempt, getGitHubRunId, diff --git a/src/harness/phases/execute.ts b/src/harness/phases/execute.ts index e5fdec7b..90ab31c4 100644 --- a/src/harness/phases/execute.ts +++ b/src/harness/phases/execute.ts @@ -1,5 +1,5 @@ +import type {ErrorInfo} from '@fro-bot/runtime' import type {ExecutionConfig, PromptOptions} from '../../features/agent/types.js' -import type {ErrorInfo} from '../../features/comments/types.js' import type {MetricsCollector} from '../../features/observability/index.js' import type {ResolvedOutputMode, TokenUsage} from '../../shared/types.js' import type {BootstrapPhaseResult} from './bootstrap.js' @@ -8,8 +8,8 @@ import type {RoutingPhaseResult} from './routing.js' import type {SessionPrepPhaseResult} from './session-prep.js' import process from 'node:process' import * as core from '@actions/core' +import {findLatestSession, writeSessionSummary} from '@fro-bot/runtime' import {executeOpenCode, resolveOutputMode} from '../../features/agent/index.js' -import {findLatestSession, writeSessionSummary} from '../../services/session/index.js' import {createLogger} from '../../shared/logger.js' import {STATE_KEYS} from '../config/state-keys.js' diff --git a/src/harness/phases/session-prep.ts b/src/harness/phases/session-prep.ts index b4f103ea..57fb7896 100644 --- a/src/harness/phases/session-prep.ts +++ b/src/harness/phases/session-prep.ts @@ -1,18 +1,22 @@ +import type {LogicalSessionKey, SessionSearchResult, SessionSummary} from '@fro-bot/runtime' import type {AttachmentResult} from '../../features/attachments/index.js' import type {MetricsCollector} from '../../features/observability/index.js' -import type {LogicalSessionKey} from '../../services/session/logical-key.js' -import type {SessionSearchResult, SessionSummary} from '../../services/session/types.js' import type {BootstrapPhaseResult} from './bootstrap.js' import type {CacheRestorePhaseResult} from './cache-restore.js' import type {RoutingPhaseResult} from './routing.js' +import { + buildLogicalKey, + buildSessionTitle, + listSessions, + resolveSessionForLogicalKey, + searchSessions, +} from '@fro-bot/runtime' import { buildAttachmentResult, downloadAttachments, parseAttachmentUrls, validateAttachments, } from '../../features/attachments/index.js' -import {listSessions, searchSessions} from '../../services/session/index.js' -import {buildLogicalKey, buildSessionTitle, resolveSessionForLogicalKey} from '../../services/session/logical-key.js' import {getGitHubWorkspace} from '../../shared/env.js' import {createLogger} from '../../shared/logger.js' import {normalizeWorkspacePath} from '../../shared/paths.js' diff --git a/src/harness/post.test.ts b/src/harness/post.test.ts index abaab1bf..061fac60 100644 --- a/src/harness/post.test.ts +++ b/src/harness/post.test.ts @@ -21,8 +21,8 @@ vi.mock('../services/artifact/index.js', () => ({ uploadLogArtifact: vi.fn(), })) -vi.mock('../services/object-store/index.js', async importOriginal => { - const original = await importOriginal() +vi.mock('@fro-bot/runtime', async importOriginal => { + const original = await importOriginal() return { ...original, createS3Adapter: vi.fn(), @@ -340,8 +340,7 @@ describe('post action', () => { const {saveCache} = await import('../services/cache/index.js') vi.mocked(saveCache).mockResolvedValue(true) - const {createS3Adapter, syncArtifactsToStore, syncMetadataToStore} = - await import('../services/object-store/index.js') + const {createS3Adapter, syncArtifactsToStore, syncMetadataToStore} = await import('@fro-bot/runtime') vi.mocked(createS3Adapter).mockReturnValue({ upload: async () => ok(undefined), download: async () => ok(undefined), diff --git a/src/harness/post.ts b/src/harness/post.ts index b801dff4..18a17db9 100644 --- a/src/harness/post.ts +++ b/src/harness/post.ts @@ -1,9 +1,9 @@ -import type {ObjectStoreConfig} from '../services/object-store/index.js' +import type {ObjectStoreConfig} from '@fro-bot/runtime' import type {Logger} from '../shared/logger.js' import * as core from '@actions/core' +import {createS3Adapter, syncArtifactsToStore, syncMetadataToStore} from '@fro-bot/runtime' import {uploadLogArtifact} from '../services/artifact/index.js' import {buildCacheKeyComponents, saveCache} from '../services/cache/index.js' -import {createS3Adapter, syncArtifactsToStore, syncMetadataToStore} from '../services/object-store/index.js' import { getGitHubRepository, getGitHubRunAttempt, diff --git a/src/harness/run.ts b/src/harness/run.ts index 3f68d56c..e66ae359 100644 --- a/src/harness/run.ts +++ b/src/harness/run.ts @@ -1,8 +1,8 @@ +import type {ObjectStoreConfig} from '@fro-bot/runtime' import type {OpenCodeServerHandle} from '../features/agent/index.js' import type {ReactionContext} from '../features/agent/types.js' import type {AttachmentResult} from '../features/attachments/index.js' import type {Octokit} from '../services/github/types.js' -import type {ObjectStoreConfig} from '../services/object-store/index.js' import * as core from '@actions/core' import {createMetricsCollector} from '../features/observability/index.js' import {createLogger} from '../shared/logger.js' diff --git a/src/index.ts b/src/index.ts index ca2f5faa..a69d323f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,10 +8,8 @@ export { CACHE_PREFIX, DEFAULT_MAX_AGE_DAYS, DEFAULT_SESSION_RETENTION, - LLM_RETRY_DELAY_MS, OPENCODE_AUTH_PATH, OPENCODE_STORAGE_PATH, - RETRY_DELAYS_MS, STORAGE_VERSION, } from './shared/constants.js' // Public API - utils exports diff --git a/src/services/cache/cache.test.ts b/src/services/cache/cache.test.ts index 926a9773..5603e83d 100644 --- a/src/services/cache/cache.test.ts +++ b/src/services/cache/cache.test.ts @@ -1,5 +1,5 @@ +import type {ObjectStoreAdapter, ObjectStoreConfig} from '@fro-bot/runtime' import type {Logger} from '../../shared/logger.js' -import type {ObjectStoreAdapter, ObjectStoreConfig} from '../object-store/index.js' import type {CacheKeyComponents} from './cache-key.js' import * as fs from 'node:fs/promises' import * as os from 'node:os' diff --git a/src/services/cache/paths.ts b/src/services/cache/paths.ts index 266b74cf..0256fcdf 100644 --- a/src/services/cache/paths.ts +++ b/src/services/cache/paths.ts @@ -1,8 +1,8 @@ import type {Logger} from '../../shared/logger.js' import * as fs from 'node:fs/promises' import * as path from 'node:path' +import {isSqliteBackend} from '@fro-bot/runtime' import {toErrorMessage} from '../../shared/errors.js' -import {isSqliteBackend} from '../session/version.js' export function isPathInsideDirectory(filePath: string, directoryPath: string): boolean { const resolvedFile = path.resolve(filePath) diff --git a/src/services/cache/restore-save-flow.test.ts b/src/services/cache/restore-save-flow.test.ts index e83dc05b..5934913a 100644 --- a/src/services/cache/restore-save-flow.test.ts +++ b/src/services/cache/restore-save-flow.test.ts @@ -1,5 +1,5 @@ +import type {ObjectStoreAdapter, ObjectStoreConfig} from '@fro-bot/runtime' import type {Logger} from '../../shared/logger.js' -import type {ObjectStoreAdapter, ObjectStoreConfig} from '../object-store/index.js' import type {CacheKeyComponents} from './cache-key.js' import {Buffer} from 'node:buffer' import * as fs from 'node:fs/promises' diff --git a/src/services/cache/restore.ts b/src/services/cache/restore.ts index 4775e5c7..329b1ae6 100644 --- a/src/services/cache/restore.ts +++ b/src/services/cache/restore.ts @@ -2,9 +2,9 @@ import type {CacheResult} from '../../shared/types.js' import * as fs from 'node:fs/promises' import * as path from 'node:path' import process from 'node:process' +import {createS3Adapter, syncSessionsFromStore} from '@fro-bot/runtime' import {STORAGE_VERSION} from '../../shared/constants.js' import {toErrorMessage} from '../../shared/errors.js' -import {createS3Adapter, syncSessionsFromStore} from '../object-store/index.js' import {buildPrimaryCacheKey, buildRestoreKeys} from './cache-key.js' import {buildRestoreCachePaths, deleteAuthJson, isAuthPathSafe, isPathInsideDirectory} from './paths.js' import {defaultCacheAdapter, type RestoreCacheOptions} from './types.js' diff --git a/src/services/cache/save.ts b/src/services/cache/save.ts index 14ab6bb8..ad3a48e4 100644 --- a/src/services/cache/save.ts +++ b/src/services/cache/save.ts @@ -1,9 +1,9 @@ import * as fs from 'node:fs/promises' import * as path from 'node:path' import process from 'node:process' +import {createS3Adapter, syncSessionsToStore} from '@fro-bot/runtime' import {STORAGE_VERSION} from '../../shared/constants.js' import {toErrorMessage} from '../../shared/errors.js' -import {createS3Adapter, syncSessionsToStore} from '../object-store/index.js' import {buildSaveCacheKey} from './cache-key.js' import {buildSaveCachePaths, deleteAuthJson} from './paths.js' import {defaultCacheAdapter, type SaveCacheOptions} from './types.js' diff --git a/src/services/cache/types.ts b/src/services/cache/types.ts index 59e7f52f..cb24cddb 100644 --- a/src/services/cache/types.ts +++ b/src/services/cache/types.ts @@ -1,5 +1,5 @@ +import type {ObjectStoreAdapter, ObjectStoreConfig} from '@fro-bot/runtime' import type {Logger} from '../../shared/logger.js' -import type {ObjectStoreAdapter, ObjectStoreConfig} from '../object-store/index.js' import type {CacheKeyComponents} from './cache-key.js' import * as cache from '@actions/cache' diff --git a/src/services/github/types.ts b/src/services/github/types.ts index c4dca377..4bbe9b1b 100644 --- a/src/services/github/types.ts +++ b/src/services/github/types.ts @@ -27,7 +27,7 @@ export const EVENT_TYPES = [ 'workflow_dispatch', ] as const -export type EventType = (typeof EVENT_TYPES)[number] +export type EventType = import('@fro-bot/runtime').EventType // Normalized event data (discriminated union by eventType) export type NormalizedEvent = diff --git a/src/services/setup/runtime-setup-adapter.ts b/src/services/setup/runtime-setup-adapter.ts new file mode 100644 index 00000000..5aeaecfa --- /dev/null +++ b/src/services/setup/runtime-setup-adapter.ts @@ -0,0 +1,34 @@ +import type {SetupAdapter} from '@fro-bot/runtime' +import type {Logger} from '../../shared/logger.js' +import type {SetupInputs} from './types.js' +import * as core from '@actions/core' +import * as exec from '@actions/exec' +import {runSetup} from './setup.js' + +export const runtimeSetupAdapter: SetupAdapter = { + verifyOpenCodeAvailable: async (opencodePath: string | null, logger: Logger) => { + const opencodeCmd = opencodePath ?? 'opencode' + try { + let version = '' + await exec.exec(opencodeCmd, ['--version'], { + listeners: { + stdout: (data: Uint8Array) => { + version += data.toString() + }, + }, + silent: true, + }) + const versionMatch = /(\d+\.\d+\.\d+)/.exec(version) + const parsedVersion: string | null = versionMatch?.[1] ?? null + logger.debug('OpenCode version verified', {version: parsedVersion}) + return {available: true, version: parsedVersion} + } catch { + logger.debug('OpenCode not available, will attempt auto-setup') + return {available: false, version: null} + } + }, + runSetup: async (inputs: SetupInputs, githubToken: string) => runSetup(inputs, githubToken), + addToPath: (toolPath: string) => { + core.addPath(toolPath) + }, +} diff --git a/src/shared/async.ts b/src/shared/async.ts index 5a02bd3d..2118a0f4 100644 --- a/src/shared/async.ts +++ b/src/shared/async.ts @@ -1,11 +1 @@ -/** - * Sleep for specified milliseconds. -[] * @param ms - Milliseconds to wait (must be a non-negative finite number) - * @throws {Error} If ms is negative or not a finite number - */ -export async function sleep(ms: number): Promise { - if (ms < 0 || !Number.isFinite(ms)) { - throw new Error(`Invalid sleep duration: ${ms}`) - } - return new Promise(resolve => setTimeout(resolve, ms)) -} +export {sleep} from '@fro-bot/runtime' diff --git a/src/shared/console.ts b/src/shared/console.ts index 5e52152c..574dbffb 100644 --- a/src/shared/console.ts +++ b/src/shared/console.ts @@ -1,36 +1 @@ -import process from 'node:process' - -const TOOL_COLORS: Record = { - todowrite: ['Todo', '\u001B[33m\u001B[1m'], - todoread: ['Todo', '\u001B[33m\u001B[1m'], - bash: ['Bash', '\u001B[31m\u001B[1m'], - edit: ['Edit', '\u001B[32m\u001B[1m'], - glob: ['Glob', '\u001B[34m\u001B[1m'], - grep: ['Grep', '\u001B[34m\u001B[1m'], - list: ['List', '\u001B[34m\u001B[1m'], - read: ['Read', '\u001B[35m\u001B[1m'], - write: ['Write', '\u001B[32m\u001B[1m'], - websearch: ['Search', '\u001B[2m\u001B[1m'], -} as const - -const ANSI_RESET = '\u001B[0m' -const ANSI_DIM = '\u001B[2m' - -function useColor(): boolean { - return process.env.NO_COLOR == null -} - -export function outputToolExecution(toolName: string, title: string): void { - const [displayName, colorCode] = TOOL_COLORS[toolName.toLowerCase()] ?? [toolName, '\u001B[36m\u001B[1m'] - const paddedName = displayName.padEnd(10, ' ') - - if (useColor()) { - process.stdout.write(`\n${colorCode}|${ANSI_RESET}${ANSI_DIM} ${paddedName} ${ANSI_RESET}${title}\n`) - } else { - process.stdout.write(`\n| ${paddedName} ${title}\n`) - } -} - -export function outputTextContent(text: string): void { - process.stdout.write(`\n${text}\n`) -} +export {outputTextContent, outputToolExecution} from '@fro-bot/runtime' diff --git a/src/shared/constants.ts b/src/shared/constants.ts index 00e89be8..9cd646a0 100644 --- a/src/shared/constants.ts +++ b/src/shared/constants.ts @@ -1,43 +1,21 @@ -// Storage paths -export const OPENCODE_STORAGE_PATH = '~/.local/share/opencode/storage' as const -export const OPENCODE_AUTH_PATH = '~/.local/share/opencode/auth.json' as const - -// Files to exclude from cache (security-sensitive) -export const CACHE_EXCLUSIONS = ['auth.json', '.env', '*.key', '*.pem'] as const - -// Default configuration - per RFC-001 -export const DEFAULT_SESSION_RETENTION = 50 -export const DEFAULT_MAX_AGE_DAYS = 30 - -// SDK execution defaults - per RFC-013 -export const DEFAULT_AGENT = 'sisyphus' -export const DEFAULT_TIMEOUT_MS = 1800000 // 30 minutes - -// Default model for OpenCode Zen - ensures inference starts -export const DEFAULT_MODEL = { - providerID: 'opencode', - modelID: 'big-pickle', -} as const - -// Setup consolidation defaults -export const DEFAULT_OPENCODE_VERSION = '1.14.20' -export const DEFAULT_BUN_VERSION = '1.3.13' -export const DEFAULT_OMO_VERSION = '3.17.4' -export const DEFAULT_OMO_PROVIDERS = '' -export const DEFAULT_SYSTEMATIC_VERSION = '2.4.1' - -// Retry configuration -export const RETRY_DELAYS_MS = [30_000, 60_000, 120_000] as const -export const LLM_RETRY_DELAY_MS = 10_000 - -// Cache key components -export const CACHE_PREFIX = 'opencode-storage' as const -export const DEFAULT_S3_PREFIX = 'fro-bot-state' as const -export const TOOLS_CACHE_PREFIX = 'opencode-tools' as const - -// Dedup execution defaults -export const DEFAULT_DEDUP_WINDOW_MS = 600_000 // 10 minutes -export const DEDUP_CACHE_PREFIX = 'fro-bot-dedup-v1' as const - -// Storage version (increment on breaking changes) -export const STORAGE_VERSION = 1 +export { + CACHE_EXCLUSIONS, + CACHE_PREFIX, + DEDUP_CACHE_PREFIX, + DEFAULT_AGENT, + DEFAULT_BUN_VERSION, + DEFAULT_DEDUP_WINDOW_MS, + DEFAULT_MAX_AGE_DAYS, + DEFAULT_MODEL, + DEFAULT_OMO_PROVIDERS, + DEFAULT_OMO_VERSION, + DEFAULT_OPENCODE_VERSION, + DEFAULT_S3_PREFIX, + DEFAULT_SESSION_RETENTION, + DEFAULT_SYSTEMATIC_VERSION, + DEFAULT_TIMEOUT_MS, + OPENCODE_AUTH_PATH, + OPENCODE_STORAGE_PATH, + STORAGE_VERSION, + TOOLS_CACHE_PREFIX, +} from '@fro-bot/runtime' diff --git a/src/shared/env.ts b/src/shared/env.ts index fc58b75f..15de2bc9 100644 --- a/src/shared/env.ts +++ b/src/shared/env.ts @@ -1,96 +1,13 @@ -import * as os from 'node:os' -import * as path from 'node:path' -import process from 'node:process' - -export function getXdgDataHome(): string { - const xdgDataHome = process.env.XDG_DATA_HOME - if (xdgDataHome != null && xdgDataHome.trim().length > 0) { - return xdgDataHome - } - return path.join(os.homedir(), '.local', 'share') -} - -export function getOpenCodeStoragePath(): string { - return path.join(getXdgDataHome(), 'opencode', 'storage') -} - -export function getOpenCodeAuthPath(): string { - return path.join(getXdgDataHome(), 'opencode', 'auth.json') -} - -export function getOpenCodeLogPath(): string { - return path.join(getXdgDataHome(), 'opencode', 'log') -} - -export function isOpenCodePromptArtifactEnabled(): boolean { - const enabled = process.env.OPENCODE_PROMPT_ARTIFACT - return enabled === 'true' || enabled === '1' -} - -export function getRunnerOS(): string { - const runnerOs = process.env.RUNNER_OS - if (runnerOs != null && runnerOs.trim().length > 0) { - return runnerOs - } - // Fallback for local testing - const platform = os.platform() - switch (platform) { - case 'darwin': - return 'macOS' - case 'win32': - return 'Windows' - case 'aix': - case 'android': - case 'freebsd': - case 'haiku': - case 'linux': - case 'openbsd': - case 'sunos': - case 'cygwin': - case 'netbsd': - return 'Linux' - } -} - -export function getGitHubRepository(): string { - const repo = process.env.GITHUB_REPOSITORY - if (repo != null && repo.trim().length > 0) { - return repo - } - return 'unknown/unknown' -} - -export function getGitHubRefName(): string { - const refName = process.env.GITHUB_REF_NAME - if (refName != null && refName.trim().length > 0) { - return refName - } - return 'main' -} - -export function getGitHubRunId(): number { - const runId = process.env.GITHUB_RUN_ID - if (runId != null && runId.trim().length > 0) { - return Number(runId) - } - return 0 -} - -export function getGitHubRunAttempt(): number { - const attempt = process.env.GITHUB_RUN_ATTEMPT - if (attempt != null && attempt.trim().length > 0) { - const parsedAttempt = Number(attempt) - if (Number.isFinite(parsedAttempt) && parsedAttempt > 0) { - return parsedAttempt - } - } - return 1 -} - -export function getGitHubWorkspace(): string { - const workspace = process.env.GITHUB_WORKSPACE - if (workspace != null && workspace.trim().length > 0) { - return workspace - } - return process.cwd() -} +export { + getGitHubRefName, + getGitHubRepository, + getGitHubRunAttempt, + getGitHubRunId, + getGitHubWorkspace, + getOpenCodeAuthPath, + getOpenCodeLogPath, + getOpenCodeStoragePath, + getRunnerOS, + getXdgDataHome, + isOpenCodePromptArtifactEnabled, +} from '@fro-bot/runtime' diff --git a/src/shared/errors.ts b/src/shared/errors.ts index e8100734..d5c0408d 100644 --- a/src/shared/errors.ts +++ b/src/shared/errors.ts @@ -1,21 +1 @@ -/** - * Extract error message from unknown error. - * @param error - Unknown value from catch block - */ -export function toErrorMessage(error: unknown): string { - if (error instanceof Error) { - return error.message - } - return String(error) -} - -/** - * Wrap unknown error as Error instance. - * @param error - Unknown value from catch block - */ -export function toError(error: unknown): Error { - if (error instanceof Error) { - return error - } - return new Error(String(error)) -} +export {toError, toErrorMessage} from '@fro-bot/runtime' diff --git a/src/shared/format.ts b/src/shared/format.ts index a39d1b04..8ef59639 100644 --- a/src/shared/format.ts +++ b/src/shared/format.ts @@ -1,21 +1 @@ -/** - * Format bytes to human-readable string (e.g., "1.5MB"). - * @param bytes - Number of bytes (must be a non-negative finite number) - * @throws {Error} If bytes is negative or not a finite number - */ -export function formatBytes(bytes: number): string { - if (bytes < 0 || !Number.isFinite(bytes)) { - throw new Error(`Invalid bytes value: ${bytes}`) - } - if (bytes < 1024) { - return `${bytes}B` - } - if (bytes < 1024 * 1024) { - return `${(bytes / 1024).toFixed(1)}KB` - } - return `${(bytes / (1024 * 1024)).toFixed(1)}MB` -} - -export function cleanMarkdownBody(text: string): string { - return text.replaceAll('\\`', '`').replaceAll(String.raw`\|`, '|') -} +export {cleanMarkdownBody, formatBytes} from '@fro-bot/runtime' diff --git a/src/shared/logger.ts b/src/shared/logger.ts index 588d1ee6..22cd3136 100644 --- a/src/shared/logger.ts +++ b/src/shared/logger.ts @@ -1,89 +1,19 @@ +import type {LogContext, Logger} from '@fro-bot/runtime' import * as core from '@actions/core' +import {DEFAULT_SENSITIVE_FIELDS, redactSensitiveFields} from '@fro-bot/runtime' -export interface LogContext { - readonly [key: string]: unknown -} - -export interface Logger { - readonly debug: (message: string, context?: LogContext) => void - readonly info: (message: string, context?: LogContext) => void - readonly warning: (message: string, context?: LogContext) => void - readonly error: (message: string, context?: LogContext) => void -} +export type {LogContext, Logger} +export {DEFAULT_SENSITIVE_FIELDS, redactSensitiveFields} type LogLevel = 'debug' | 'error' | 'info' | 'warning' -/** - * Default patterns for sensitive field names (case-insensitive, partial match) - */ -export const DEFAULT_SENSITIVE_FIELDS: readonly string[] = [ - 'token', - 'password', - 'secret', - 'key', - 'auth', - 'credential', - 'bearer', - 'apikey', - 'api_key', - 'access_token', - 'refresh_token', - 'private', -] as const - -const REDACTED = '[REDACTED]' - -/** - * Check if a field name matches any sensitive pattern (case-insensitive, partial match) - */ -function isSensitiveField(fieldName: string, sensitivePatterns: readonly string[]): boolean { - const lowerFieldName = fieldName.toLowerCase() - return sensitivePatterns.some(pattern => lowerFieldName.includes(pattern.toLowerCase())) -} - -/** - * Recursively redact sensitive fields from an object - * Returns a new object with sensitive string values replaced by [REDACTED] - */ -export function redactSensitiveFields(value: T, sensitivePatterns: readonly string[] = DEFAULT_SENSITIVE_FIELDS): T { - // Handle null/undefined - if (value == null) { - return value - } - - // Handle primitives (string, number, boolean) - if (typeof value !== 'object') { - return value - } - - // Handle arrays - if (Array.isArray(value)) { - return value.map((item: unknown) => redactSensitiveFields(item, sensitivePatterns)) as T - } - - // Handle objects - const result: Record = {} - for (const [fieldName, fieldValue] of Object.entries(value)) { - if (isSensitiveField(fieldName, sensitivePatterns) && typeof fieldValue === 'string') { - result[fieldName] = REDACTED - } else if (fieldValue != null && typeof fieldValue === 'object') { - result[fieldName] = redactSensitiveFields(fieldValue, sensitivePatterns) - } else { - result[fieldName] = fieldValue - } - } - - return result as T -} - function formatLogEntry(level: LogLevel, message: string, baseContext: LogContext, callContext?: LogContext): string { const mergedContext = { ...baseContext, ...callContext, } - // Redact sensitive fields before logging - const redactedContext = redactSensitiveFields(mergedContext) + const redactedContext = redactSensitiveFields(mergedContext, DEFAULT_SENSITIVE_FIELDS) const entry: Record = { timestamp: new Date().toISOString(), @@ -92,7 +22,6 @@ function formatLogEntry(level: LogLevel, message: string, baseContext: LogContex ...redactedContext, } - // Serialize Error objects properly (after redaction to preserve error structure) if (callContext != null && 'error' in callContext && callContext.error instanceof Error) { const errorObj = callContext.error entry.error = { diff --git a/src/shared/types.ts b/src/shared/types.ts index 75b2f98e..0aee7e9c 100644 --- a/src/shared/types.ts +++ b/src/shared/types.ts @@ -1,135 +1,23 @@ -import type {Result} from '@bfra.me/es/result' - -// Re-export Result type and helpers for convenience -export type {Err, Ok, Result} from '@bfra.me/es/result' -export {err, isErr, isOk, ok} from '@bfra.me/es/result' - -// Agent identity for cache scoping -export type AgentIdentity = 'discord' | 'github' - -// Object store configuration (pure data shape; adapter lives in services/object-store/) -export interface ObjectStoreConfig { - readonly enabled: boolean - readonly bucket: string - readonly region: string - readonly prefix: string - readonly endpoint?: string - readonly expectedBucketOwner?: string - readonly allowInsecureEndpoint?: boolean - readonly sseEncryption?: 'aws:kms' | 'AES256' - readonly sseKmsKeyId?: string -} - -// Cache restore result -export interface CacheResult { - readonly hit: boolean - readonly key: string | null - readonly restoredPath: string | null - readonly corrupted: boolean - /** null on miss, 'cache' on Actions cache hit, 'storage' on S3 fallback hit */ - readonly source: 'cache' | 'storage' | null -} - -// Run context from GitHub Actions -export interface RunContext { - readonly eventName: string - readonly repo: string - readonly ref: string - readonly runId: number - readonly actor: string - readonly agentIdentity: AgentIdentity -} - -// Author association for permission gating -export const ALLOWED_ASSOCIATIONS = ['OWNER', 'MEMBER', 'COLLABORATOR'] as const -export type AuthorAssociation = (typeof ALLOWED_ASSOCIATIONS)[number] - -// Session pruning configuration -export interface PruningConfig { - readonly maxSessions: number - readonly maxAgeDays: number -} - -// Model configuration for SDK execution (RFC-013) -export interface ModelConfig { - readonly providerID: string - readonly modelID: string -} - -export type OutputMode = 'auto' | 'working-dir' | 'branch-pr' -export type ResolvedOutputMode = 'working-dir' | 'branch-pr' - -// Action inputs (parsed and validated) - per RFC-001, RFC-013 -export interface ActionInputs { - readonly githubToken: string - readonly authJson: string - readonly prompt: string | null - readonly outputMode: OutputMode - readonly sessionRetention: number - readonly storeConfig: ObjectStoreConfig - // RFC-013: SDK execution configuration - readonly agent: string - readonly model: ModelConfig | null - readonly timeoutMs: number - // Setup consolidation: auto-setup inputs - readonly opencodeVersion: string - readonly skipCache: boolean - readonly omoVersion: string - readonly systematicVersion: string - // oMo provider configuration - readonly omoProviders: OmoProviders - // OpenCode config to merge with baseline - readonly opencodeConfig: string | null - readonly systematicConfig: string | null - // Dedup execution: skip if agent already ran for this entity recently (0 = disabled) - readonly dedupWindow: number -} - -// oMo provider configuration for installer -export interface OmoProviders { - readonly claude: 'no' | 'yes' | 'max20' - readonly copilot: 'no' | 'yes' - readonly gemini: 'no' | 'yes' - readonly openai: 'no' | 'yes' - readonly opencodeZen: 'no' | 'yes' - readonly zaiCodingPlan: 'no' | 'yes' - readonly kimiForCoding: 'no' | 'yes' -} - -// Action outputs -export interface ActionOutputs { - readonly sessionId: string | null - readonly resolvedOutputMode: ResolvedOutputMode | null - readonly cacheStatus: 'corrupted' | 'hit' | 'miss' - readonly duration: number -} - -// Token usage tracking (matches OpenCode SDK structure) -export interface TokenUsage { - readonly input: number - readonly output: number - readonly reasoning: number - readonly cache: { - readonly read: number - readonly write: number - } -} - -// Run summary for session writeback (RFC-004) -export interface RunSummary { - readonly eventType: string - readonly repo: string - readonly ref: string - readonly runId: number - readonly cacheStatus: 'corrupted' | 'hit' | 'miss' - readonly sessionIds: readonly string[] - readonly logicalKey?: string - readonly createdPRs: readonly string[] - readonly createdCommits: readonly string[] - readonly duration: number - readonly tokenUsage: TokenUsage | null -} - -// Validation result type aliases for common use cases -export type ValidationResult = Result -export type ParseResult = Result +export {ALLOWED_ASSOCIATIONS, err, isErr, isOk, ok} from '@fro-bot/runtime' + +export type { + ActionInputs, + ActionOutputs, + AgentIdentity, + AuthorAssociation, + CacheResult, + Err, + ModelConfig, + ObjectStoreConfig, + Ok, + OmoProviders, + OutputMode, + ParseResult, + PruningConfig, + ResolvedOutputMode, + Result, + RunContext, + RunSummary, + TokenUsage, + ValidationResult, +} from '@fro-bot/runtime' diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 00000000..3f4ac5dc --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,16 @@ +{ + "extends": "@bfra.me/tsconfig", + "compilerOptions": { + "target": "ESNext", + "baseUrl": ".", + "module": "ESNext", + "moduleResolution": "Bundler", + "paths": { + "@fro-bot/runtime": ["packages/runtime/src/index.ts"] + }, + "types": ["node"], + "strict": true, + "ignoreDeprecations": "6.0", + "noEmit": false + } +} diff --git a/tsconfig.json b/tsconfig.json index e55d0e81..c06f1100 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,7 @@ { - "extends": "@bfra.me/tsconfig", + "extends": "./tsconfig.base.json", "compilerOptions": { - "target": "ESNext", "rootDir": ".", - "module": "ESNext", - "moduleResolution": "Bundler", - "types": ["node"], "noEmit": true }, "include": ["**/*.ts"], diff --git a/tsdown.config.ts b/tsdown.config.ts index 20faceb6..d03c7313 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -5,17 +5,11 @@ import {promisify} from 'node:util' import {getProjectLicenses} from 'generate-license-file' import {defineConfig} from 'tsdown' -/** - * Extracts package name from dependency string. - */ function parsePackageName(dep: string): string { const name = dep.split('@').find(Boolean) ?? '' return dep.startsWith('@') ? `@${name}` : name } -/** - * Compares two semantic version strings. - */ function compareVersions(a: string, b: string): number { const aParts = a.split('.').map(Number) const bParts = b.split('.').map(Number) @@ -160,23 +154,19 @@ function licenseCollectorPlugin(): Plugin { } export default defineConfig({ - entry: ['src/main.ts', 'src/post.ts'], + entry: ['apps/action/src/main.ts', 'apps/action/src/post.ts'], fixedExtension: false, inlineOnly: false, minify: true, plugins: [licenseCollectorPlugin()], noExternal: id => { - // Bundle all @bfra.me/es subpaths if (id.startsWith('@bfra.me/es')) return true - // Bundle all @actions/* packages if (id.startsWith('@actions/')) return true - // Bundle @octokit/auth-app if (id.startsWith('@octokit/auth-app')) return true - // Bundle @opencode-ai/sdk (RFC-013) if (id.startsWith('@opencode-ai/sdk')) return true - // Bundle @aws-sdk/client-s3 and @smithy transitive deps (durable object storage) if (id.startsWith('@aws-sdk/')) return true if (id.startsWith('@smithy/')) return true + if (id.startsWith('@fro-bot/runtime')) return true return false }, })