updates 14.0.0 → 14.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +7 -22
  2. package/bin/updates.js +14 -16
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,36 +1,24 @@
1
1
  # updates
2
- [![](https://img.shields.io/npm/v/updates.svg?style=flat)](https://www.npmjs.org/package/updates) [![](https://img.shields.io/npm/dm/updates.svg)](https://www.npmjs.org/package/updates) [![](https://packagephobia.com/badge?p=updates)](https://packagephobia.com/result?p=updates) [![](https://img.shields.io/badge/deno-experimental-yellow)](https://deno.land/)
2
+ [![](https://img.shields.io/npm/v/updates.svg?style=flat)](https://www.npmjs.org/package/updates) [![](https://img.shields.io/npm/dm/updates.svg)](https://www.npmjs.org/package/updates) [![](https://packagephobia.com/badge?p=updates)](https://packagephobia.com/result?p=updates)
3
3
 
4
4
  ![](./screenshot.png)
5
5
 
6
6
  `updates` is a CLI tool which checks for npm dependency updates of the current project and optionally updates `package.json`. It is highly configurable and is typically able to complete in less than a second.
7
7
 
8
- # Installation
9
-
10
- ```bash
11
- npm i -D updates
12
- ```
13
-
14
8
  # Usage
15
9
 
16
- Check for updates:
17
-
18
10
  ```bash
11
+ # check for updates
19
12
  npx updates
20
- ```
21
-
22
- Update `package.json` and install new dependencies:
23
13
 
24
- ```bash
25
- npx updates -u
26
- npm i
14
+ # update package.json and install them
15
+ npx updates -u && npm i
27
16
  ```
28
17
 
29
- ## Deno
30
-
31
- There is experimental support for deno, run via:
18
+ ## Bun and Deno
32
19
 
33
20
  ```bash
21
+ bunx updates
34
22
  deno run -A npm:updates
35
23
  ```
36
24
 
@@ -59,7 +47,6 @@ usage: updates [options]
59
47
  -f, --file <path> Use given package.json file or module directory
60
48
  -S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: 96
61
49
  -j, --json Output a JSON object
62
- -c, --color Force-enable color output
63
50
  -n, --no-color Disable color output
64
51
  -v, --version Print the version
65
52
  -V, --verbose Print verbose output to stderr
@@ -67,9 +54,7 @@ usage: updates [options]
67
54
 
68
55
  Examples:
69
56
  $ updates
70
- $ updates -u
71
- $ updates -u -m -e eslint
72
- $ updates -u -U && rm -rf node_modules && npm i
57
+ $ updates -u && npm i
73
58
  ```
74
59
 
75
60
  ## JSON Output
package/bin/updates.js CHANGED
@@ -1,25 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
  import {createRequire} from 'module';const require = createRequire(import.meta.url);
3
- var Ah=Object.create;var xi=Object.defineProperty;var Th=Object.getOwnPropertyDescriptor;var $h=Object.getOwnPropertyNames;var Ch=Object.getPrototypeOf,Oh=Object.prototype.hasOwnProperty;var be=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var gr=(r,e)=>()=>(r&&(e=r(r=0)),e);var T=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Ph=(r,e)=>{for(var t in e)xi(r,t,{get:e[t],enumerable:!0})},Ih=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of $h(e))!Oh.call(r,o)&&o!==t&&xi(r,o,{get:()=>e[o],enumerable:!(i=Th(e,o))||i.enumerable});return r};var Ce=(r,e,t)=>(t=r!=null?Ah(Ch(r)):{},Ih(e||!r||!r.__esModule?xi(t,"default",{value:r,enumerable:!0}):t,r));var Xo=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var Je=(r,e,t)=>(Xo(r,e,"read from private field"),t?t.call(r):e.get(r)),En=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)};var ne=(r,e,t)=>(Xo(r,e,"access private method"),t);var Zo=T((vb,Ko)=>{"use strict";var Di=be("https"),Bi=be("http"),{URL:Qo}=be("url"),Fi=class extends Bi.Agent{constructor(e){let{proxy:t,proxyRequestOptions:i,...o}=e;super(o),this.proxy=typeof t=="string"?new Qo(t):t,this.proxyRequestOptions=i||{}}createConnection(e,t){let i={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");i.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(i.servername=this.proxy.hostname);let o=(this.proxy.protocol==="http:"?Bi:Di).request(i);o.once("connect",(a,u,h)=>{o.removeAllListeners(),u.removeAllListeners(),a.statusCode===200?t(null,u):(u.destroy(),t(new Error(`Bad response: ${a.statusCode}`),null))}),o.once("timeout",()=>{o.destroy(new Error("Proxy timeout"))}),o.once("error",a=>{o.removeAllListeners(),t(a,null)}),o.end()}},Ni=class extends Di.Agent{constructor(e){let{proxy:t,proxyRequestOptions:i,...o}=e;super(o),this.proxy=typeof t=="string"?new Qo(t):t,this.proxyRequestOptions=i||{}}createConnection(e,t){let i={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");i.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(i.servername=this.proxy.hostname);let o=(this.proxy.protocol==="http:"?Bi:Di).request(i);o.once("connect",(a,u,h)=>{if(o.removeAllListeners(),u.removeAllListeners(),a.statusCode===200){let d=super.createConnection({...e,socket:u});t(null,d)}else u.destroy(),t(new Error(`Bad response: ${a.statusCode}`),null)}),o.once("timeout",()=>{o.destroy(new Error("Proxy timeout"))}),o.once("error",a=>{o.removeAllListeners(),t(a,null)}),o.end()}};Ko.exports={HttpProxyAgent:Fi,HttpsProxyAgent:Ni}});var ra=T(ta=>{"use strict";var Lh=be("url").parse,xh={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},qh=String.prototype.endsWith||function(r){return r.length<=this.length&&this.indexOf(r,this.length-r.length)!==-1};function Dh(r){var e=typeof r=="string"?Lh(r):r||{},t=e.protocol,i=e.host,o=e.port;if(typeof i!="string"||!i||typeof t!="string"||(t=t.split(":",1)[0],i=i.replace(/:\d*$/,""),o=parseInt(o)||xh[t]||0,!Bh(i,o)))return"";var a=Dt("npm_config_"+t+"_proxy")||Dt(t+"_proxy")||Dt("npm_config_proxy")||Dt("all_proxy");return a&&a.indexOf("://")===-1&&(a=t+"://"+a),a}function Bh(r,e){var t=(Dt("npm_config_no_proxy")||Dt("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(i){if(!i)return!0;var o=i.match(/^(.+):(\d+)$/),a=o?o[1]:i,u=o?parseInt(o[2]):0;return u&&u!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!qh.call(r,a)):r!==a}):!0}function Dt(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}ta.getProxyForUrl=Dh});var ki=T((xb,aa)=>{"use strict";function Wh(r,e){var t=r;e.slice(0,-1).forEach(function(o){t=t[o]||{}});var i=e[e.length-1];return i in t}function sa(r){return typeof r=="number"||/^0x[0-9a-f]+$/i.test(r)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(r)}function oa(r,e){return e==="constructor"&&typeof r[e]=="function"||e==="__proto__"}aa.exports=function(r,e){e||(e={});var t={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(t.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?t.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(A){t.bools[A]=!0});var i={};function o(A){return i[A].some(function(q){return t.bools[q]})}Object.keys(e.alias||{}).forEach(function(A){i[A]=[].concat(e.alias[A]),i[A].forEach(function(q){i[q]=[A].concat(i[A].filter(function(I){return q!==I}))})}),[].concat(e.string).filter(Boolean).forEach(function(A){t.strings[A]=!0,i[A]&&[].concat(i[A]).forEach(function(q){t.strings[q]=!0})});var a=e.default||{},u={_:[]};function h(A,q){return t.allBools&&/^--[^=]+$/.test(q)||t.strings[A]||t.bools[A]||i[A]}function d(A,q,I){for(var L=A,k=0;k<q.length-1;k++){var Y=q[k];if(oa(L,Y))return;L[Y]===void 0&&(L[Y]={}),(L[Y]===Object.prototype||L[Y]===Number.prototype||L[Y]===String.prototype)&&(L[Y]={}),L[Y]===Array.prototype&&(L[Y]=[]),L=L[Y]}var X=q[q.length-1];oa(L,X)||((L===Object.prototype||L===Number.prototype||L===String.prototype)&&(L={}),L===Array.prototype&&(L=[]),L[X]===void 0||t.bools[X]||typeof L[X]=="boolean"?L[X]=I:Array.isArray(L[X])?L[X].push(I):L[X]=[L[X],I])}function f(A,q,I){if(!(I&&t.unknownFn&&!h(A,I)&&t.unknownFn(I)===!1)){var L=!t.strings[A]&&sa(q)?Number(q):q;d(u,A.split("."),L),(i[A]||[]).forEach(function(k){d(u,k.split("."),L)})}}Object.keys(t.bools).forEach(function(A){f(A,a[A]===void 0?!1:a[A])});var m=[];r.indexOf("--")!==-1&&(m=r.slice(r.indexOf("--")+1),r=r.slice(0,r.indexOf("--")));for(var y=0;y<r.length;y++){var g=r[y],p,S;if(/^--.+=/.test(g)){var R=g.match(/^--([^=]+)=([\s\S]*)$/);p=R[1];var _=R[2];t.bools[p]&&(_=_!=="false"),f(p,_,g)}else if(/^--no-.+/.test(g))p=g.match(/^--no-(.+)/)[1],f(p,!1,g);else if(/^--.+/.test(g))p=g.match(/^--(.+)/)[1],S=r[y+1],S!==void 0&&!/^(-|--)[^-]/.test(S)&&!t.bools[p]&&!t.allBools&&(!i[p]||!o(p))?(f(p,S,g),y+=1):/^(true|false)$/.test(S)?(f(p,S==="true",g),y+=1):f(p,t.strings[p]?"":!0,g);else if(/^-[^-]+/.test(g)){for(var v=g.slice(1,-1).split(""),P=!1,D=0;D<v.length;D++){if(S=g.slice(D+2),S==="-"){f(v[D],S,g);continue}if(/[A-Za-z]/.test(v[D])&&S[0]==="="){f(v[D],S.slice(1),g),P=!0;break}if(/[A-Za-z]/.test(v[D])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(S)){f(v[D],S,g),P=!0;break}if(v[D+1]&&v[D+1].match(/\W/)){f(v[D],g.slice(D+2),g),P=!0;break}else f(v[D],t.strings[v[D]]?"":!0,g)}p=g.slice(-1)[0],!P&&p!=="-"&&(r[y+1]&&!/^(-|--)[^-]/.test(r[y+1])&&!t.bools[p]&&(!i[p]||!o(p))?(f(p,r[y+1],g),y+=1):r[y+1]&&/^(true|false)$/.test(r[y+1])?(f(p,r[y+1]==="true",g),y+=1):f(p,t.strings[p]?"":!0,g))}else if((!t.unknownFn||t.unknownFn(g)!==!1)&&u._.push(t.strings._||!sa(g)?g:Number(g)),e.stopEarly){u._.push.apply(u._,r.slice(y+1));break}}return Object.keys(a).forEach(function(A){Wh(u,A.split("."))||(d(u,A.split("."),a[A]),(i[A]||[]).forEach(function(q){d(u,q.split("."),a[A])}))}),e["--"]?u["--"]=m.slice():m.forEach(function(A){u._.push(A)}),u}});var ca=T((Rn,ua)=>{(function(r,e){typeof Rn=="object"&&typeof ua<"u"?e(Rn):typeof define=="function"&&define.amd?define(["exports"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.WebStreamsPolyfill={}))})(Rn,function(r){"use strict";let e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:n=>`Symbol(${n})`;function t(){}function i(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}let o=i();function a(n){return typeof n=="object"&&n!==null||typeof n=="function"}let u=t,h=Promise,d=Promise.prototype.then,f=Promise.resolve.bind(h),m=Promise.reject.bind(h);function y(n){return new h(n)}function g(n){return f(n)}function p(n){return m(n)}function S(n,s,l){return d.call(n,s,l)}function R(n,s,l){S(S(n,s,l),void 0,u)}function _(n,s){R(n,s)}function v(n,s){R(n,void 0,s)}function P(n,s,l){return S(n,s,l)}function D(n){S(n,void 0,u)}let A=(()=>{let n=o&&o.queueMicrotask;if(typeof n=="function")return n;let s=g(void 0);return l=>S(s,l)})();function q(n,s,l){if(typeof n!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(n,s,l)}function I(n,s,l){try{return g(q(n,s,l))}catch(c){return p(c)}}let L=16384;class k{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(s){let l=this._back,c=l;l._elements.length===L-1&&(c={_elements:[],_next:void 0}),l._elements.push(s),c!==l&&(this._back=c,l._next=c),++this._size}shift(){let s=this._front,l=s,c=this._cursor,b=c+1,w=s._elements,E=w[c];return b===L&&(l=s._next,b=0),--this._size,this._cursor=b,s!==l&&(this._front=l),w[c]=void 0,E}forEach(s){let l=this._cursor,c=this._front,b=c._elements;for(;(l!==b.length||c._next!==void 0)&&!(l===b.length&&(c=c._next,b=c._elements,l=0,b.length===0));)s(b[l]),++l}peek(){let s=this._front,l=this._cursor;return s._elements[l]}}function Y(n,s){n._ownerReadableStream=s,s._reader=n,s._state==="readable"?ri(n):s._state==="closed"?Jc(n):qs(n,s._storedError)}function X(n,s){let l=n._ownerReadableStream;return Te(l,s)}function oe(n){n._ownerReadableStream._state==="readable"?ni(n,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):ef(n,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),n._ownerReadableStream._reader=void 0,n._ownerReadableStream=void 0}function at(n){return new TypeError("Cannot "+n+" a stream using a released reader")}function ri(n){n._closedPromise=y((s,l)=>{n._closedPromise_resolve=s,n._closedPromise_reject=l})}function qs(n,s){ri(n),ni(n,s)}function Jc(n){ri(n),Ds(n)}function ni(n,s){n._closedPromise_reject!==void 0&&(D(n._closedPromise),n._closedPromise_reject(s),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}function ef(n,s){qs(n,s)}function Ds(n){n._closedPromise_resolve!==void 0&&(n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}let Bs=e("[[AbortSteps]]"),Fs=e("[[ErrorSteps]]"),ii=e("[[CancelSteps]]"),si=e("[[PullSteps]]"),Ns=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},tf=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};function rf(n){return typeof n=="object"||typeof n=="function"}function Be(n,s){if(n!==void 0&&!rf(n))throw new TypeError(`${s} is not an object.`)}function ve(n,s){if(typeof n!="function")throw new TypeError(`${s} is not a function.`)}function nf(n){return typeof n=="object"&&n!==null||typeof n=="function"}function zs(n,s){if(!nf(n))throw new TypeError(`${s} is not an object.`)}function Fe(n,s,l){if(n===void 0)throw new TypeError(`Parameter ${s} is required in '${l}'.`)}function oi(n,s,l){if(n===void 0)throw new TypeError(`${s} is required in '${l}'.`)}function ai(n){return Number(n)}function Ws(n){return n===0?0:n}function sf(n){return Ws(tf(n))}function ks(n,s){let c=Number.MAX_SAFE_INTEGER,b=Number(n);if(b=Ws(b),!Ns(b))throw new TypeError(`${s} is not a finite number`);if(b=sf(b),b<0||b>c)throw new TypeError(`${s} is outside the accepted range of 0 to ${c}, inclusive`);return!Ns(b)||b===0?0:b}function li(n,s){if(!Qe(n))throw new TypeError(`${s} is not a ReadableStream.`)}function vt(n){return new tr(n)}function js(n,s){n._reader._readRequests.push(s)}function ui(n,s,l){let b=n._reader._readRequests.shift();l?b._closeSteps():b._chunkSteps(s)}function Ur(n){return n._reader._readRequests.length}function Us(n){let s=n._reader;return!(s===void 0||!Ge(s))}class tr{constructor(s){if(Fe(s,1,"ReadableStreamDefaultReader"),li(s,"First parameter"),Ke(s))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Y(this,s),this._readRequests=new k}get closed(){return Ge(this)?this._closedPromise:p(Mr("closed"))}cancel(s=void 0){return Ge(this)?this._ownerReadableStream===void 0?p(at("cancel")):X(this,s):p(Mr("cancel"))}read(){if(!Ge(this))return p(Mr("read"));if(this._ownerReadableStream===void 0)return p(at("read from"));let s,l,c=y((w,E)=>{s=w,l=E});return rr(this,{_chunkSteps:w=>s({value:w,done:!1}),_closeSteps:()=>s({value:void 0,done:!0}),_errorSteps:w=>l(w)}),c}releaseLock(){if(!Ge(this))throw Mr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");oe(this)}}}Object.defineProperties(tr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(tr.prototype,e.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Ge(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readRequests")?!1:n instanceof tr}function rr(n,s){let l=n._ownerReadableStream;l._disturbed=!0,l._state==="closed"?s._closeSteps():l._state==="errored"?s._errorSteps(l._storedError):l._readableStreamController[si](s)}function Mr(n){return new TypeError(`ReadableStreamDefaultReader.prototype.${n} can only be used on a ReadableStreamDefaultReader`)}let Ms=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Hs{constructor(s,l){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=s,this._preventCancel=l}next(){let s=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,s,s):s(),this._ongoingPromise}return(s){let l=()=>this._returnSteps(s);return this._ongoingPromise?P(this._ongoingPromise,l,l):l()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let s=this._reader;if(s._ownerReadableStream===void 0)return p(at("iterate"));let l,c,b=y((E,$)=>{l=E,c=$});return rr(s,{_chunkSteps:E=>{this._ongoingPromise=void 0,A(()=>l({value:E,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,oe(s),l({value:void 0,done:!0})},_errorSteps:E=>{this._ongoingPromise=void 0,this._isFinished=!0,oe(s),c(E)}}),b}_returnSteps(s){if(this._isFinished)return Promise.resolve({value:s,done:!0});this._isFinished=!0;let l=this._reader;if(l._ownerReadableStream===void 0)return p(at("finish iterating"));if(!this._preventCancel){let c=X(l,s);return oe(l),P(c,()=>({value:s,done:!0}))}return oe(l),g({value:s,done:!0})}}let Gs={next(){return Vs(this)?this._asyncIteratorImpl.next():p(Ys("next"))},return(n){return Vs(this)?this._asyncIteratorImpl.return(n):p(Ys("return"))}};Ms!==void 0&&Object.setPrototypeOf(Gs,Ms);function of(n,s){let l=vt(n),c=new Hs(l,s),b=Object.create(Gs);return b._asyncIteratorImpl=c,b}function Vs(n){if(!a(n)||!Object.prototype.hasOwnProperty.call(n,"_asyncIteratorImpl"))return!1;try{return n._asyncIteratorImpl instanceof Hs}catch{return!1}}function Ys(n){return new TypeError(`ReadableStreamAsyncIterator.${n} can only be used on a ReadableSteamAsyncIterator`)}let Xs=Number.isNaN||function(n){return n!==n};function nr(n){return n.slice()}function Qs(n,s,l,c,b){new Uint8Array(n).set(new Uint8Array(l,c,b),s)}function wb(n){return n}function Hr(n){return!1}function Ks(n,s,l){if(n.slice)return n.slice(s,l);let c=l-s,b=new ArrayBuffer(c);return Qs(b,0,n,s,c),b}function af(n){return!(typeof n!="number"||Xs(n)||n<0)}function Zs(n){let s=Ks(n.buffer,n.byteOffset,n.byteOffset+n.byteLength);return new Uint8Array(s)}function ci(n){let s=n._queue.shift();return n._queueTotalSize-=s.size,n._queueTotalSize<0&&(n._queueTotalSize=0),s.value}function fi(n,s,l){if(!af(l)||l===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");n._queue.push({value:s,size:l}),n._queueTotalSize+=l}function lf(n){return n._queue.peek().value}function Ve(n){n._queue=new k,n._queueTotalSize=0}class ir{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!hi(this))throw gi("view");return this._view}respond(s){if(!hi(this))throw gi("respond");if(Fe(s,1,"respond"),s=ks(s,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Hr(this._view.buffer),Qr(this._associatedReadableByteStreamController,s)}respondWithNewView(s){if(!hi(this))throw gi("respondWithNewView");if(Fe(s,1,"respondWithNewView"),!ArrayBuffer.isView(s))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Hr(s.buffer),Kr(this._associatedReadableByteStreamController,s)}}Object.defineProperties(ir.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(ir.prototype,e.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class At{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!lt(this))throw or("byobRequest");return mi(this)}get desiredSize(){if(!lt(this))throw or("desiredSize");return oo(this)}close(){if(!lt(this))throw or("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let s=this._controlledReadableByteStream._state;if(s!=="readable")throw new TypeError(`The stream (in ${s} state) is not in the readable state and cannot be closed`);sr(this)}enqueue(s){if(!lt(this))throw or("enqueue");if(Fe(s,1,"enqueue"),!ArrayBuffer.isView(s))throw new TypeError("chunk must be an array buffer view");if(s.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(s.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let l=this._controlledReadableByteStream._state;if(l!=="readable")throw new TypeError(`The stream (in ${l} state) is not in the readable state and cannot be enqueued to`);Xr(this,s)}error(s=void 0){if(!lt(this))throw or("error");Ae(this,s)}[ii](s){Js(this),Ve(this);let l=this._cancelAlgorithm(s);return Yr(this),l}[si](s){let l=this._controlledReadableByteStream;if(this._queueTotalSize>0){let b=this._queue.shift();this._queueTotalSize-=b.byteLength,no(this);let w=new Uint8Array(b.buffer,b.byteOffset,b.byteLength);s._chunkSteps(w);return}let c=this._autoAllocateChunkSize;if(c!==void 0){let b;try{b=new ArrayBuffer(c)}catch(E){s._errorSteps(E);return}let w={buffer:b,bufferByteLength:c,byteOffset:0,byteLength:c,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(w)}js(l,s),ut(this)}}Object.defineProperties(At.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(At.prototype,e.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function lt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledReadableByteStream")?!1:n instanceof At}function hi(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_associatedReadableByteStreamController")?!1:n instanceof ir}function ut(n){if(!hf(n))return;if(n._pulling){n._pullAgain=!0;return}n._pulling=!0;let l=n._pullAlgorithm();R(l,()=>{n._pulling=!1,n._pullAgain&&(n._pullAgain=!1,ut(n))},c=>{Ae(n,c)})}function Js(n){pi(n),n._pendingPullIntos=new k}function di(n,s){let l=!1;n._state==="closed"&&(l=!0);let c=eo(s);s.readerType==="default"?ui(n,c,l):mf(n,c,l)}function eo(n){let s=n.bytesFilled,l=n.elementSize;return new n.viewConstructor(n.buffer,n.byteOffset,s/l)}function Gr(n,s,l,c){n._queue.push({buffer:s,byteOffset:l,byteLength:c}),n._queueTotalSize+=c}function to(n,s){let l=s.elementSize,c=s.bytesFilled-s.bytesFilled%l,b=Math.min(n._queueTotalSize,s.byteLength-s.bytesFilled),w=s.bytesFilled+b,E=w-w%l,$=b,B=!1;E>c&&($=E-s.bytesFilled,B=!0);let W=n._queue;for(;$>0;){let j=W.peek(),U=Math.min($,j.byteLength),K=s.byteOffset+s.bytesFilled;Qs(s.buffer,K,j.buffer,j.byteOffset,U),j.byteLength===U?W.shift():(j.byteOffset+=U,j.byteLength-=U),n._queueTotalSize-=U,ro(n,U,s),$-=U}return B}function ro(n,s,l){l.bytesFilled+=s}function no(n){n._queueTotalSize===0&&n._closeRequested?(Yr(n),pr(n._controlledReadableByteStream)):ut(n)}function pi(n){n._byobRequest!==null&&(n._byobRequest._associatedReadableByteStreamController=void 0,n._byobRequest._view=null,n._byobRequest=null)}function io(n){for(;n._pendingPullIntos.length>0;){if(n._queueTotalSize===0)return;let s=n._pendingPullIntos.peek();to(n,s)&&(Vr(n),di(n._controlledReadableByteStream,s))}}function uf(n,s,l){let c=n._controlledReadableByteStream,b=1;s.constructor!==DataView&&(b=s.constructor.BYTES_PER_ELEMENT);let w=s.constructor,E=s.buffer,$={buffer:E,bufferByteLength:E.byteLength,byteOffset:s.byteOffset,byteLength:s.byteLength,bytesFilled:0,elementSize:b,viewConstructor:w,readerType:"byob"};if(n._pendingPullIntos.length>0){n._pendingPullIntos.push($),uo(c,l);return}if(c._state==="closed"){let B=new w($.buffer,$.byteOffset,0);l._closeSteps(B);return}if(n._queueTotalSize>0){if(to(n,$)){let B=eo($);no(n),l._chunkSteps(B);return}if(n._closeRequested){let B=new TypeError("Insufficient bytes to fill elements in the given buffer");Ae(n,B),l._errorSteps(B);return}}n._pendingPullIntos.push($),uo(c,l),ut(n)}function cf(n,s){let l=n._controlledReadableByteStream;if(bi(l))for(;co(l)>0;){let c=Vr(n);di(l,c)}}function ff(n,s,l){if(ro(n,s,l),l.bytesFilled<l.elementSize)return;Vr(n);let c=l.bytesFilled%l.elementSize;if(c>0){let b=l.byteOffset+l.bytesFilled,w=Ks(l.buffer,b-c,b);Gr(n,w,0,w.byteLength)}l.bytesFilled-=c,di(n._controlledReadableByteStream,l),io(n)}function so(n,s){let l=n._pendingPullIntos.peek();pi(n),n._controlledReadableByteStream._state==="closed"?cf(n):ff(n,s,l),ut(n)}function Vr(n){return n._pendingPullIntos.shift()}function hf(n){let s=n._controlledReadableByteStream;return s._state!=="readable"||n._closeRequested||!n._started?!1:!!(Us(s)&&Ur(s)>0||bi(s)&&co(s)>0||oo(n)>0)}function Yr(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0}function sr(n){let s=n._controlledReadableByteStream;if(!(n._closeRequested||s._state!=="readable")){if(n._queueTotalSize>0){n._closeRequested=!0;return}if(n._pendingPullIntos.length>0&&n._pendingPullIntos.peek().bytesFilled>0){let c=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ae(n,c),c}Yr(n),pr(s)}}function Xr(n,s){let l=n._controlledReadableByteStream;if(n._closeRequested||l._state!=="readable")return;let c=s.buffer,b=s.byteOffset,w=s.byteLength,E=c;if(n._pendingPullIntos.length>0){let $=n._pendingPullIntos.peek();Hr($.buffer),$.buffer=$.buffer}if(pi(n),Us(l))if(Ur(l)===0)Gr(n,E,b,w);else{n._pendingPullIntos.length>0&&Vr(n);let $=new Uint8Array(E,b,w);ui(l,$,!1)}else bi(l)?(Gr(n,E,b,w),io(n)):Gr(n,E,b,w);ut(n)}function Ae(n,s){let l=n._controlledReadableByteStream;l._state==="readable"&&(Js(n),Ve(n),Yr(n),Do(l,s))}function mi(n){if(n._byobRequest===null&&n._pendingPullIntos.length>0){let s=n._pendingPullIntos.peek(),l=new Uint8Array(s.buffer,s.byteOffset+s.bytesFilled,s.byteLength-s.bytesFilled),c=Object.create(ir.prototype);pf(c,n,l),n._byobRequest=c}return n._byobRequest}function oo(n){let s=n._controlledReadableByteStream._state;return s==="errored"?null:s==="closed"?0:n._strategyHWM-n._queueTotalSize}function Qr(n,s){let l=n._pendingPullIntos.peek();if(n._controlledReadableByteStream._state==="closed"){if(s!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(s===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(l.bytesFilled+s>l.byteLength)throw new RangeError("bytesWritten out of range")}l.buffer=l.buffer,so(n,s)}function Kr(n,s){let l=n._pendingPullIntos.peek();if(n._controlledReadableByteStream._state==="closed"){if(s.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(s.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(l.byteOffset+l.bytesFilled!==s.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(l.bufferByteLength!==s.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(l.bytesFilled+s.byteLength>l.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let b=s.byteLength;l.buffer=s.buffer,so(n,b)}function ao(n,s,l,c,b,w,E){s._controlledReadableByteStream=n,s._pullAgain=!1,s._pulling=!1,s._byobRequest=null,s._queue=s._queueTotalSize=void 0,Ve(s),s._closeRequested=!1,s._started=!1,s._strategyHWM=w,s._pullAlgorithm=c,s._cancelAlgorithm=b,s._autoAllocateChunkSize=E,s._pendingPullIntos=new k,n._readableStreamController=s;let $=l();R(g($),()=>{s._started=!0,ut(s)},B=>{Ae(s,B)})}function df(n,s,l){let c=Object.create(At.prototype),b=()=>{},w=()=>g(void 0),E=()=>g(void 0);s.start!==void 0&&(b=()=>s.start(c)),s.pull!==void 0&&(w=()=>s.pull(c)),s.cancel!==void 0&&(E=B=>s.cancel(B));let $=s.autoAllocateChunkSize;if($===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");ao(n,c,b,w,E,l,$)}function pf(n,s,l){n._associatedReadableByteStreamController=s,n._view=l}function gi(n){return new TypeError(`ReadableStreamBYOBRequest.prototype.${n} can only be used on a ReadableStreamBYOBRequest`)}function or(n){return new TypeError(`ReadableByteStreamController.prototype.${n} can only be used on a ReadableByteStreamController`)}function lo(n){return new ar(n)}function uo(n,s){n._reader._readIntoRequests.push(s)}function mf(n,s,l){let b=n._reader._readIntoRequests.shift();l?b._closeSteps(s):b._chunkSteps(s)}function co(n){return n._reader._readIntoRequests.length}function bi(n){let s=n._reader;return!(s===void 0||!ct(s))}class ar{constructor(s){if(Fe(s,1,"ReadableStreamBYOBReader"),li(s,"First parameter"),Ke(s))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!lt(s._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Y(this,s),this._readIntoRequests=new k}get closed(){return ct(this)?this._closedPromise:p(Zr("closed"))}cancel(s=void 0){return ct(this)?this._ownerReadableStream===void 0?p(at("cancel")):X(this,s):p(Zr("cancel"))}read(s){if(!ct(this))return p(Zr("read"));if(!ArrayBuffer.isView(s))return p(new TypeError("view must be an array buffer view"));if(s.byteLength===0)return p(new TypeError("view must have non-zero byteLength"));if(s.buffer.byteLength===0)return p(new TypeError("view's buffer must have non-zero byteLength"));if(Hr(s.buffer),this._ownerReadableStream===void 0)return p(at("read from"));let l,c,b=y((E,$)=>{l=E,c=$});return fo(this,s,{_chunkSteps:E=>l({value:E,done:!1}),_closeSteps:E=>l({value:E,done:!0}),_errorSteps:E=>c(E)}),b}releaseLock(){if(!ct(this))throw Zr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");oe(this)}}}Object.defineProperties(ar.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(ar.prototype,e.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function ct(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readIntoRequests")?!1:n instanceof ar}function fo(n,s,l){let c=n._ownerReadableStream;c._disturbed=!0,c._state==="errored"?l._errorSteps(c._storedError):uf(c._readableStreamController,s,l)}function Zr(n){return new TypeError(`ReadableStreamBYOBReader.prototype.${n} can only be used on a ReadableStreamBYOBReader`)}function lr(n,s){let{highWaterMark:l}=n;if(l===void 0)return s;if(Xs(l)||l<0)throw new RangeError("Invalid highWaterMark");return l}function Jr(n){let{size:s}=n;return s||(()=>1)}function en(n,s){Be(n,s);let l=n==null?void 0:n.highWaterMark,c=n==null?void 0:n.size;return{highWaterMark:l===void 0?void 0:ai(l),size:c===void 0?void 0:gf(c,`${s} has member 'size' that`)}}function gf(n,s){return ve(n,s),l=>ai(n(l))}function bf(n,s){Be(n,s);let l=n==null?void 0:n.abort,c=n==null?void 0:n.close,b=n==null?void 0:n.start,w=n==null?void 0:n.type,E=n==null?void 0:n.write;return{abort:l===void 0?void 0:yf(l,n,`${s} has member 'abort' that`),close:c===void 0?void 0:Sf(c,n,`${s} has member 'close' that`),start:b===void 0?void 0:_f(b,n,`${s} has member 'start' that`),write:E===void 0?void 0:wf(E,n,`${s} has member 'write' that`),type:w}}function yf(n,s,l){return ve(n,l),c=>I(n,s,[c])}function Sf(n,s,l){return ve(n,l),()=>I(n,s,[])}function _f(n,s,l){return ve(n,l),c=>q(n,s,[c])}function wf(n,s,l){return ve(n,l),(c,b)=>I(n,s,[c,b])}function ho(n,s){if(!Tt(n))throw new TypeError(`${s} is not a WritableStream.`)}function Ef(n){if(typeof n!="object"||n===null)return!1;try{return typeof n.aborted=="boolean"}catch{return!1}}let Rf=typeof AbortController=="function";function vf(){if(Rf)return new AbortController}class ur{constructor(s={},l={}){s===void 0?s=null:zs(s,"First parameter");let c=en(l,"Second parameter"),b=bf(s,"First parameter");if(mo(this),b.type!==void 0)throw new RangeError("Invalid type is specified");let E=Jr(c),$=lr(c,1);Nf(this,b,$,E)}get locked(){if(!Tt(this))throw on("locked");return $t(this)}abort(s=void 0){return Tt(this)?$t(this)?p(new TypeError("Cannot abort a stream that already has a writer")):tn(this,s):p(on("abort"))}close(){return Tt(this)?$t(this)?p(new TypeError("Cannot close a stream that already has a writer")):Ie(this)?p(new TypeError("Cannot close an already-closing stream")):go(this):p(on("close"))}getWriter(){if(!Tt(this))throw on("getWriter");return po(this)}}Object.defineProperties(ur.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(ur.prototype,e.toStringTag,{value:"WritableStream",configurable:!0});function po(n){return new cr(n)}function Af(n,s,l,c,b=1,w=()=>1){let E=Object.create(ur.prototype);mo(E);let $=Object.create(Ct.prototype);return Eo(E,$,n,s,l,c,b,w),E}function mo(n){n._state="writable",n._storedError=void 0,n._writer=void 0,n._writableStreamController=void 0,n._writeRequests=new k,n._inFlightWriteRequest=void 0,n._closeRequest=void 0,n._inFlightCloseRequest=void 0,n._pendingAbortRequest=void 0,n._backpressure=!1}function Tt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_writableStreamController")?!1:n instanceof ur}function $t(n){return n._writer!==void 0}function tn(n,s){var l;if(n._state==="closed"||n._state==="errored")return g(void 0);n._writableStreamController._abortReason=s,(l=n._writableStreamController._abortController)===null||l===void 0||l.abort();let c=n._state;if(c==="closed"||c==="errored")return g(void 0);if(n._pendingAbortRequest!==void 0)return n._pendingAbortRequest._promise;let b=!1;c==="erroring"&&(b=!0,s=void 0);let w=y((E,$)=>{n._pendingAbortRequest={_promise:void 0,_resolve:E,_reject:$,_reason:s,_wasAlreadyErroring:b}});return n._pendingAbortRequest._promise=w,b||Si(n,s),w}function go(n){let s=n._state;if(s==="closed"||s==="errored")return p(new TypeError(`The stream (in ${s} state) is not in the writable state and cannot be closed`));let l=y((b,w)=>{let E={_resolve:b,_reject:w};n._closeRequest=E}),c=n._writer;return c!==void 0&&n._backpressure&&s==="writable"&&Ci(c),zf(n._writableStreamController),l}function Tf(n){return y((l,c)=>{let b={_resolve:l,_reject:c};n._writeRequests.push(b)})}function yi(n,s){if(n._state==="writable"){Si(n,s);return}_i(n)}function Si(n,s){let l=n._writableStreamController;n._state="erroring",n._storedError=s;let c=n._writer;c!==void 0&&yo(c,s),!If(n)&&l._started&&_i(n)}function _i(n){n._state="errored",n._writableStreamController[Fs]();let s=n._storedError;if(n._writeRequests.forEach(b=>{b._reject(s)}),n._writeRequests=new k,n._pendingAbortRequest===void 0){rn(n);return}let l=n._pendingAbortRequest;if(n._pendingAbortRequest=void 0,l._wasAlreadyErroring){l._reject(s),rn(n);return}let c=n._writableStreamController[Bs](l._reason);R(c,()=>{l._resolve(),rn(n)},b=>{l._reject(b),rn(n)})}function $f(n){n._inFlightWriteRequest._resolve(void 0),n._inFlightWriteRequest=void 0}function Cf(n,s){n._inFlightWriteRequest._reject(s),n._inFlightWriteRequest=void 0,yi(n,s)}function Of(n){n._inFlightCloseRequest._resolve(void 0),n._inFlightCloseRequest=void 0,n._state==="erroring"&&(n._storedError=void 0,n._pendingAbortRequest!==void 0&&(n._pendingAbortRequest._resolve(),n._pendingAbortRequest=void 0)),n._state="closed";let l=n._writer;l!==void 0&&To(l)}function Pf(n,s){n._inFlightCloseRequest._reject(s),n._inFlightCloseRequest=void 0,n._pendingAbortRequest!==void 0&&(n._pendingAbortRequest._reject(s),n._pendingAbortRequest=void 0),yi(n,s)}function Ie(n){return!(n._closeRequest===void 0&&n._inFlightCloseRequest===void 0)}function If(n){return!(n._inFlightWriteRequest===void 0&&n._inFlightCloseRequest===void 0)}function Lf(n){n._inFlightCloseRequest=n._closeRequest,n._closeRequest=void 0}function xf(n){n._inFlightWriteRequest=n._writeRequests.shift()}function rn(n){n._closeRequest!==void 0&&(n._closeRequest._reject(n._storedError),n._closeRequest=void 0);let s=n._writer;s!==void 0&&Ti(s,n._storedError)}function wi(n,s){let l=n._writer;l!==void 0&&s!==n._backpressure&&(s?Gf(l):Ci(l)),n._backpressure=s}class cr{constructor(s){if(Fe(s,1,"WritableStreamDefaultWriter"),ho(s,"First parameter"),$t(s))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=s,s._writer=this;let l=s._state;if(l==="writable")!Ie(s)&&s._backpressure?ln(this):$o(this),an(this);else if(l==="erroring")$i(this,s._storedError),an(this);else if(l==="closed")$o(this),Mf(this);else{let c=s._storedError;$i(this,c),Ao(this,c)}}get closed(){return ft(this)?this._closedPromise:p(ht("closed"))}get desiredSize(){if(!ft(this))throw ht("desiredSize");if(this._ownerWritableStream===void 0)throw fr("desiredSize");return Ff(this)}get ready(){return ft(this)?this._readyPromise:p(ht("ready"))}abort(s=void 0){return ft(this)?this._ownerWritableStream===void 0?p(fr("abort")):qf(this,s):p(ht("abort"))}close(){if(!ft(this))return p(ht("close"));let s=this._ownerWritableStream;return s===void 0?p(fr("close")):Ie(s)?p(new TypeError("Cannot close an already-closing stream")):bo(this)}releaseLock(){if(!ft(this))throw ht("releaseLock");this._ownerWritableStream!==void 0&&So(this)}write(s=void 0){return ft(this)?this._ownerWritableStream===void 0?p(fr("write to")):_o(this,s):p(ht("write"))}}Object.defineProperties(cr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(cr.prototype,e.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function ft(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_ownerWritableStream")?!1:n instanceof cr}function qf(n,s){let l=n._ownerWritableStream;return tn(l,s)}function bo(n){let s=n._ownerWritableStream;return go(s)}function Df(n){let s=n._ownerWritableStream,l=s._state;return Ie(s)||l==="closed"?g(void 0):l==="errored"?p(s._storedError):bo(n)}function Bf(n,s){n._closedPromiseState==="pending"?Ti(n,s):Hf(n,s)}function yo(n,s){n._readyPromiseState==="pending"?Co(n,s):Vf(n,s)}function Ff(n){let s=n._ownerWritableStream,l=s._state;return l==="errored"||l==="erroring"?null:l==="closed"?0:Ro(s._writableStreamController)}function So(n){let s=n._ownerWritableStream,l=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");yo(n,l),Bf(n,l),s._writer=void 0,n._ownerWritableStream=void 0}function _o(n,s){let l=n._ownerWritableStream,c=l._writableStreamController,b=Wf(c,s);if(l!==n._ownerWritableStream)return p(fr("write to"));let w=l._state;if(w==="errored")return p(l._storedError);if(Ie(l)||w==="closed")return p(new TypeError("The stream is closing or closed and cannot be written to"));if(w==="erroring")return p(l._storedError);let E=Tf(l);return kf(c,s,b),E}let wo={};class Ct{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Ei(this))throw Ai("abortReason");return this._abortReason}get signal(){if(!Ei(this))throw Ai("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(s=void 0){if(!Ei(this))throw Ai("error");this._controlledWritableStream._state==="writable"&&vo(this,s)}[Bs](s){let l=this._abortAlgorithm(s);return nn(this),l}[Fs](){Ve(this)}}Object.defineProperties(Ct.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Ct.prototype,e.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Ei(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledWritableStream")?!1:n instanceof Ct}function Eo(n,s,l,c,b,w,E,$){s._controlledWritableStream=n,n._writableStreamController=s,s._queue=void 0,s._queueTotalSize=void 0,Ve(s),s._abortReason=void 0,s._abortController=vf(),s._started=!1,s._strategySizeAlgorithm=$,s._strategyHWM=E,s._writeAlgorithm=c,s._closeAlgorithm=b,s._abortAlgorithm=w;let B=vi(s);wi(n,B);let W=l(),j=g(W);R(j,()=>{s._started=!0,sn(s)},U=>{s._started=!0,yi(n,U)})}function Nf(n,s,l,c){let b=Object.create(Ct.prototype),w=()=>{},E=()=>g(void 0),$=()=>g(void 0),B=()=>g(void 0);s.start!==void 0&&(w=()=>s.start(b)),s.write!==void 0&&(E=W=>s.write(W,b)),s.close!==void 0&&($=()=>s.close()),s.abort!==void 0&&(B=W=>s.abort(W)),Eo(n,b,w,E,$,B,l,c)}function nn(n){n._writeAlgorithm=void 0,n._closeAlgorithm=void 0,n._abortAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function zf(n){fi(n,wo,0),sn(n)}function Wf(n,s){try{return n._strategySizeAlgorithm(s)}catch(l){return Ri(n,l),1}}function Ro(n){return n._strategyHWM-n._queueTotalSize}function kf(n,s,l){try{fi(n,s,l)}catch(b){Ri(n,b);return}let c=n._controlledWritableStream;if(!Ie(c)&&c._state==="writable"){let b=vi(n);wi(c,b)}sn(n)}function sn(n){let s=n._controlledWritableStream;if(!n._started||s._inFlightWriteRequest!==void 0)return;if(s._state==="erroring"){_i(s);return}if(n._queue.length===0)return;let c=lf(n);c===wo?jf(n):Uf(n,c)}function Ri(n,s){n._controlledWritableStream._state==="writable"&&vo(n,s)}function jf(n){let s=n._controlledWritableStream;Lf(s),ci(n);let l=n._closeAlgorithm();nn(n),R(l,()=>{Of(s)},c=>{Pf(s,c)})}function Uf(n,s){let l=n._controlledWritableStream;xf(l);let c=n._writeAlgorithm(s);R(c,()=>{$f(l);let b=l._state;if(ci(n),!Ie(l)&&b==="writable"){let w=vi(n);wi(l,w)}sn(n)},b=>{l._state==="writable"&&nn(n),Cf(l,b)})}function vi(n){return Ro(n)<=0}function vo(n,s){let l=n._controlledWritableStream;nn(n),Si(l,s)}function on(n){return new TypeError(`WritableStream.prototype.${n} can only be used on a WritableStream`)}function Ai(n){return new TypeError(`WritableStreamDefaultController.prototype.${n} can only be used on a WritableStreamDefaultController`)}function ht(n){return new TypeError(`WritableStreamDefaultWriter.prototype.${n} can only be used on a WritableStreamDefaultWriter`)}function fr(n){return new TypeError("Cannot "+n+" a stream using a released writer")}function an(n){n._closedPromise=y((s,l)=>{n._closedPromise_resolve=s,n._closedPromise_reject=l,n._closedPromiseState="pending"})}function Ao(n,s){an(n),Ti(n,s)}function Mf(n){an(n),To(n)}function Ti(n,s){n._closedPromise_reject!==void 0&&(D(n._closedPromise),n._closedPromise_reject(s),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0,n._closedPromiseState="rejected")}function Hf(n,s){Ao(n,s)}function To(n){n._closedPromise_resolve!==void 0&&(n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0,n._closedPromiseState="resolved")}function ln(n){n._readyPromise=y((s,l)=>{n._readyPromise_resolve=s,n._readyPromise_reject=l}),n._readyPromiseState="pending"}function $i(n,s){ln(n),Co(n,s)}function $o(n){ln(n),Ci(n)}function Co(n,s){n._readyPromise_reject!==void 0&&(D(n._readyPromise),n._readyPromise_reject(s),n._readyPromise_resolve=void 0,n._readyPromise_reject=void 0,n._readyPromiseState="rejected")}function Gf(n){ln(n)}function Vf(n,s){$i(n,s)}function Ci(n){n._readyPromise_resolve!==void 0&&(n._readyPromise_resolve(void 0),n._readyPromise_resolve=void 0,n._readyPromise_reject=void 0,n._readyPromiseState="fulfilled")}let Oo=typeof DOMException<"u"?DOMException:void 0;function Yf(n){if(!(typeof n=="function"||typeof n=="object"))return!1;try{return new n,!0}catch{return!1}}function Xf(){let n=function(l,c){this.message=l||"",this.name=c||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return n.prototype=Object.create(Error.prototype),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,configurable:!0}),n}let Qf=Yf(Oo)?Oo:Xf();function Po(n,s,l,c,b,w){let E=vt(n),$=po(s);n._disturbed=!0;let B=!1,W=g(void 0);return y((j,U)=>{let K;if(w!==void 0){if(K=()=>{let x=new Qf("Aborted","AbortError"),z=[];c||z.push(()=>s._state==="writable"?tn(s,x):g(void 0)),b||z.push(()=>n._state==="readable"?Te(n,x):g(void 0)),he(()=>Promise.all(z.map(G=>G())),!0,x)},w.aborted){K();return}w.addEventListener("abort",K)}function $e(){return y((x,z)=>{function G(ge){ge?x():S(It(),G,z)}G(!1)})}function It(){return B?g(!0):S($._readyPromise,()=>y((x,z)=>{rr(E,{_chunkSteps:G=>{W=S(_o($,G),void 0,t),x(!1)},_closeSteps:()=>x(!0),_errorSteps:z})}))}if(Ne(n,E._closedPromise,x=>{c?Se(!0,x):he(()=>tn(s,x),!0,x)}),Ne(s,$._closedPromise,x=>{b?Se(!0,x):he(()=>Te(n,x),!0,x)}),le(n,E._closedPromise,()=>{l?Se():he(()=>Df($))}),Ie(s)||s._state==="closed"){let x=new TypeError("the destination writable stream closed before all data could be piped to it");b?Se(!0,x):he(()=>Te(n,x),!0,x)}D($e());function Ze(){let x=W;return S(W,()=>x!==W?Ze():void 0)}function Ne(x,z,G){x._state==="errored"?G(x._storedError):v(z,G)}function le(x,z,G){x._state==="closed"?G():_(z,G)}function he(x,z,G){if(B)return;B=!0,s._state==="writable"&&!Ie(s)?_(Ze(),ge):ge();function ge(){R(x(),()=>ze(z,G),Lt=>ze(!0,Lt))}}function Se(x,z){B||(B=!0,s._state==="writable"&&!Ie(s)?_(Ze(),()=>ze(x,z)):ze(x,z))}function ze(x,z){So($),oe(E),w!==void 0&&w.removeEventListener("abort",K),x?U(z):j(void 0)}})}class Ot{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!un(this))throw hn("desiredSize");return Oi(this)}close(){if(!un(this))throw hn("close");if(!Pt(this))throw new TypeError("The stream is not in a state that permits close");dr(this)}enqueue(s=void 0){if(!un(this))throw hn("enqueue");if(!Pt(this))throw new TypeError("The stream is not in a state that permits enqueue");return fn(this,s)}error(s=void 0){if(!un(this))throw hn("error");Ye(this,s)}[ii](s){Ve(this);let l=this._cancelAlgorithm(s);return cn(this),l}[si](s){let l=this._controlledReadableStream;if(this._queue.length>0){let c=ci(this);this._closeRequested&&this._queue.length===0?(cn(this),pr(l)):hr(this),s._chunkSteps(c)}else js(l,s),hr(this)}}Object.defineProperties(Ot.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Ot.prototype,e.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function un(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledReadableStream")?!1:n instanceof Ot}function hr(n){if(!Io(n))return;if(n._pulling){n._pullAgain=!0;return}n._pulling=!0;let l=n._pullAlgorithm();R(l,()=>{n._pulling=!1,n._pullAgain&&(n._pullAgain=!1,hr(n))},c=>{Ye(n,c)})}function Io(n){let s=n._controlledReadableStream;return!Pt(n)||!n._started?!1:!!(Ke(s)&&Ur(s)>0||Oi(n)>0)}function cn(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function dr(n){if(!Pt(n))return;let s=n._controlledReadableStream;n._closeRequested=!0,n._queue.length===0&&(cn(n),pr(s))}function fn(n,s){if(!Pt(n))return;let l=n._controlledReadableStream;if(Ke(l)&&Ur(l)>0)ui(l,s,!1);else{let c;try{c=n._strategySizeAlgorithm(s)}catch(b){throw Ye(n,b),b}try{fi(n,s,c)}catch(b){throw Ye(n,b),b}}hr(n)}function Ye(n,s){let l=n._controlledReadableStream;l._state==="readable"&&(Ve(n),cn(n),Do(l,s))}function Oi(n){let s=n._controlledReadableStream._state;return s==="errored"?null:s==="closed"?0:n._strategyHWM-n._queueTotalSize}function Kf(n){return!Io(n)}function Pt(n){let s=n._controlledReadableStream._state;return!n._closeRequested&&s==="readable"}function Lo(n,s,l,c,b,w,E){s._controlledReadableStream=n,s._queue=void 0,s._queueTotalSize=void 0,Ve(s),s._started=!1,s._closeRequested=!1,s._pullAgain=!1,s._pulling=!1,s._strategySizeAlgorithm=E,s._strategyHWM=w,s._pullAlgorithm=c,s._cancelAlgorithm=b,n._readableStreamController=s;let $=l();R(g($),()=>{s._started=!0,hr(s)},B=>{Ye(s,B)})}function Zf(n,s,l,c){let b=Object.create(Ot.prototype),w=()=>{},E=()=>g(void 0),$=()=>g(void 0);s.start!==void 0&&(w=()=>s.start(b)),s.pull!==void 0&&(E=()=>s.pull(b)),s.cancel!==void 0&&($=B=>s.cancel(B)),Lo(n,b,w,E,$,l,c)}function hn(n){return new TypeError(`ReadableStreamDefaultController.prototype.${n} can only be used on a ReadableStreamDefaultController`)}function Jf(n,s){return lt(n._readableStreamController)?th(n):eh(n)}function eh(n,s){let l=vt(n),c=!1,b=!1,w=!1,E=!1,$,B,W,j,U,K=y(le=>{U=le});function $e(){return c?(b=!0,g(void 0)):(c=!0,rr(l,{_chunkSteps:he=>{A(()=>{b=!1;let Se=he,ze=he;w||fn(W._readableStreamController,Se),E||fn(j._readableStreamController,ze),c=!1,b&&$e()})},_closeSteps:()=>{c=!1,w||dr(W._readableStreamController),E||dr(j._readableStreamController),(!w||!E)&&U(void 0)},_errorSteps:()=>{c=!1}}),g(void 0))}function It(le){if(w=!0,$=le,E){let he=nr([$,B]),Se=Te(n,he);U(Se)}return K}function Ze(le){if(E=!0,B=le,w){let he=nr([$,B]),Se=Te(n,he);U(Se)}return K}function Ne(){}return W=Pi(Ne,$e,It),j=Pi(Ne,$e,Ze),v(l._closedPromise,le=>{Ye(W._readableStreamController,le),Ye(j._readableStreamController,le),(!w||!E)&&U(void 0)}),[W,j]}function th(n){let s=vt(n),l=!1,c=!1,b=!1,w=!1,E=!1,$,B,W,j,U,K=y(x=>{U=x});function $e(x){v(x._closedPromise,z=>{x===s&&(Ae(W._readableStreamController,z),Ae(j._readableStreamController,z),(!w||!E)&&U(void 0))})}function It(){ct(s)&&(oe(s),s=vt(n),$e(s)),rr(s,{_chunkSteps:z=>{A(()=>{c=!1,b=!1;let G=z,ge=z;if(!w&&!E)try{ge=Zs(z)}catch(Lt){Ae(W._readableStreamController,Lt),Ae(j._readableStreamController,Lt),U(Te(n,Lt));return}w||Xr(W._readableStreamController,G),E||Xr(j._readableStreamController,ge),l=!1,c?Ne():b&&le()})},_closeSteps:()=>{l=!1,w||sr(W._readableStreamController),E||sr(j._readableStreamController),W._readableStreamController._pendingPullIntos.length>0&&Qr(W._readableStreamController,0),j._readableStreamController._pendingPullIntos.length>0&&Qr(j._readableStreamController,0),(!w||!E)&&U(void 0)},_errorSteps:()=>{l=!1}})}function Ze(x,z){Ge(s)&&(oe(s),s=lo(n),$e(s));let G=z?j:W,ge=z?W:j;fo(s,x,{_chunkSteps:xt=>{A(()=>{c=!1,b=!1;let qt=z?E:w;if(z?w:E)qt||Kr(G._readableStreamController,xt);else{let Yo;try{Yo=Zs(xt)}catch(Li){Ae(G._readableStreamController,Li),Ae(ge._readableStreamController,Li),U(Te(n,Li));return}qt||Kr(G._readableStreamController,xt),Xr(ge._readableStreamController,Yo)}l=!1,c?Ne():b&&le()})},_closeSteps:xt=>{l=!1;let qt=z?E:w,wn=z?w:E;qt||sr(G._readableStreamController),wn||sr(ge._readableStreamController),xt!==void 0&&(qt||Kr(G._readableStreamController,xt),!wn&&ge._readableStreamController._pendingPullIntos.length>0&&Qr(ge._readableStreamController,0)),(!qt||!wn)&&U(void 0)},_errorSteps:()=>{l=!1}})}function Ne(){if(l)return c=!0,g(void 0);l=!0;let x=mi(W._readableStreamController);return x===null?It():Ze(x._view,!1),g(void 0)}function le(){if(l)return b=!0,g(void 0);l=!0;let x=mi(j._readableStreamController);return x===null?It():Ze(x._view,!0),g(void 0)}function he(x){if(w=!0,$=x,E){let z=nr([$,B]),G=Te(n,z);U(G)}return K}function Se(x){if(E=!0,B=x,w){let z=nr([$,B]),G=Te(n,z);U(G)}return K}function ze(){}return W=qo(ze,Ne,he),j=qo(ze,le,Se),$e(s),[W,j]}function rh(n,s){Be(n,s);let l=n,c=l==null?void 0:l.autoAllocateChunkSize,b=l==null?void 0:l.cancel,w=l==null?void 0:l.pull,E=l==null?void 0:l.start,$=l==null?void 0:l.type;return{autoAllocateChunkSize:c===void 0?void 0:ks(c,`${s} has member 'autoAllocateChunkSize' that`),cancel:b===void 0?void 0:nh(b,l,`${s} has member 'cancel' that`),pull:w===void 0?void 0:ih(w,l,`${s} has member 'pull' that`),start:E===void 0?void 0:sh(E,l,`${s} has member 'start' that`),type:$===void 0?void 0:oh($,`${s} has member 'type' that`)}}function nh(n,s,l){return ve(n,l),c=>I(n,s,[c])}function ih(n,s,l){return ve(n,l),c=>I(n,s,[c])}function sh(n,s,l){return ve(n,l),c=>q(n,s,[c])}function oh(n,s){if(n=`${n}`,n!=="bytes")throw new TypeError(`${s} '${n}' is not a valid enumeration value for ReadableStreamType`);return n}function ah(n,s){Be(n,s);let l=n==null?void 0:n.mode;return{mode:l===void 0?void 0:lh(l,`${s} has member 'mode' that`)}}function lh(n,s){if(n=`${n}`,n!=="byob")throw new TypeError(`${s} '${n}' is not a valid enumeration value for ReadableStreamReaderMode`);return n}function uh(n,s){return Be(n,s),{preventCancel:!!(n==null?void 0:n.preventCancel)}}function xo(n,s){Be(n,s);let l=n==null?void 0:n.preventAbort,c=n==null?void 0:n.preventCancel,b=n==null?void 0:n.preventClose,w=n==null?void 0:n.signal;return w!==void 0&&ch(w,`${s} has member 'signal' that`),{preventAbort:!!l,preventCancel:!!c,preventClose:!!b,signal:w}}function ch(n,s){if(!Ef(n))throw new TypeError(`${s} is not an AbortSignal.`)}function fh(n,s){Be(n,s);let l=n==null?void 0:n.readable;oi(l,"readable","ReadableWritablePair"),li(l,`${s} has member 'readable' that`);let c=n==null?void 0:n.writable;return oi(c,"writable","ReadableWritablePair"),ho(c,`${s} has member 'writable' that`),{readable:l,writable:c}}class Xe{constructor(s={},l={}){s===void 0?s=null:zs(s,"First parameter");let c=en(l,"Second parameter"),b=rh(s,"First parameter");if(Ii(this),b.type==="bytes"){if(c.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let w=lr(c,0);df(this,b,w)}else{let w=Jr(c),E=lr(c,1);Zf(this,b,E,w)}}get locked(){if(!Qe(this))throw dt("locked");return Ke(this)}cancel(s=void 0){return Qe(this)?Ke(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Te(this,s):p(dt("cancel"))}getReader(s=void 0){if(!Qe(this))throw dt("getReader");return ah(s,"First parameter").mode===void 0?vt(this):lo(this)}pipeThrough(s,l={}){if(!Qe(this))throw dt("pipeThrough");Fe(s,1,"pipeThrough");let c=fh(s,"First parameter"),b=xo(l,"Second parameter");if(Ke(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if($t(c.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let w=Po(this,c.writable,b.preventClose,b.preventAbort,b.preventCancel,b.signal);return D(w),c.readable}pipeTo(s,l={}){if(!Qe(this))return p(dt("pipeTo"));if(s===void 0)return p("Parameter 1 is required in 'pipeTo'.");if(!Tt(s))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let c;try{c=xo(l,"Second parameter")}catch(b){return p(b)}return Ke(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):$t(s)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Po(this,s,c.preventClose,c.preventAbort,c.preventCancel,c.signal)}tee(){if(!Qe(this))throw dt("tee");let s=Jf(this);return nr(s)}values(s=void 0){if(!Qe(this))throw dt("values");let l=uh(s,"First parameter");return of(this,l.preventCancel)}}Object.defineProperties(Xe.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Xe.prototype,e.toStringTag,{value:"ReadableStream",configurable:!0}),typeof e.asyncIterator=="symbol"&&Object.defineProperty(Xe.prototype,e.asyncIterator,{value:Xe.prototype.values,writable:!0,configurable:!0});function Pi(n,s,l,c=1,b=()=>1){let w=Object.create(Xe.prototype);Ii(w);let E=Object.create(Ot.prototype);return Lo(w,E,n,s,l,c,b),w}function qo(n,s,l){let c=Object.create(Xe.prototype);Ii(c);let b=Object.create(At.prototype);return ao(c,b,n,s,l,0,void 0),c}function Ii(n){n._state="readable",n._reader=void 0,n._storedError=void 0,n._disturbed=!1}function Qe(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readableStreamController")?!1:n instanceof Xe}function Ke(n){return n._reader!==void 0}function Te(n,s){if(n._disturbed=!0,n._state==="closed")return g(void 0);if(n._state==="errored")return p(n._storedError);pr(n);let l=n._reader;l!==void 0&&ct(l)&&(l._readIntoRequests.forEach(b=>{b._closeSteps(void 0)}),l._readIntoRequests=new k);let c=n._readableStreamController[ii](s);return P(c,t)}function pr(n){n._state="closed";let s=n._reader;s!==void 0&&(Ds(s),Ge(s)&&(s._readRequests.forEach(l=>{l._closeSteps()}),s._readRequests=new k))}function Do(n,s){n._state="errored",n._storedError=s;let l=n._reader;l!==void 0&&(ni(l,s),Ge(l)?(l._readRequests.forEach(c=>{c._errorSteps(s)}),l._readRequests=new k):(l._readIntoRequests.forEach(c=>{c._errorSteps(s)}),l._readIntoRequests=new k))}function dt(n){return new TypeError(`ReadableStream.prototype.${n} can only be used on a ReadableStream`)}function Bo(n,s){Be(n,s);let l=n==null?void 0:n.highWaterMark;return oi(l,"highWaterMark","QueuingStrategyInit"),{highWaterMark:ai(l)}}let Fo=n=>n.byteLength;try{Object.defineProperty(Fo,"name",{value:"size",configurable:!0})}catch{}class dn{constructor(s){Fe(s,1,"ByteLengthQueuingStrategy"),s=Bo(s,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=s.highWaterMark}get highWaterMark(){if(!zo(this))throw No("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!zo(this))throw No("size");return Fo}}Object.defineProperties(dn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(dn.prototype,e.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function No(n){return new TypeError(`ByteLengthQueuingStrategy.prototype.${n} can only be used on a ByteLengthQueuingStrategy`)}function zo(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_byteLengthQueuingStrategyHighWaterMark")?!1:n instanceof dn}let Wo=()=>1;try{Object.defineProperty(Wo,"name",{value:"size",configurable:!0})}catch{}class pn{constructor(s){Fe(s,1,"CountQueuingStrategy"),s=Bo(s,"First parameter"),this._countQueuingStrategyHighWaterMark=s.highWaterMark}get highWaterMark(){if(!jo(this))throw ko("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!jo(this))throw ko("size");return Wo}}Object.defineProperties(pn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(pn.prototype,e.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function ko(n){return new TypeError(`CountQueuingStrategy.prototype.${n} can only be used on a CountQueuingStrategy`)}function jo(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_countQueuingStrategyHighWaterMark")?!1:n instanceof pn}function hh(n,s){Be(n,s);let l=n==null?void 0:n.flush,c=n==null?void 0:n.readableType,b=n==null?void 0:n.start,w=n==null?void 0:n.transform,E=n==null?void 0:n.writableType;return{flush:l===void 0?void 0:dh(l,n,`${s} has member 'flush' that`),readableType:c,start:b===void 0?void 0:ph(b,n,`${s} has member 'start' that`),transform:w===void 0?void 0:mh(w,n,`${s} has member 'transform' that`),writableType:E}}function dh(n,s,l){return ve(n,l),c=>I(n,s,[c])}function ph(n,s,l){return ve(n,l),c=>q(n,s,[c])}function mh(n,s,l){return ve(n,l),(c,b)=>I(n,s,[c,b])}class mn{constructor(s={},l={},c={}){s===void 0&&(s=null);let b=en(l,"Second parameter"),w=en(c,"Third parameter"),E=hh(s,"First parameter");if(E.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(E.writableType!==void 0)throw new RangeError("Invalid writableType specified");let $=lr(w,0),B=Jr(w),W=lr(b,1),j=Jr(b),U,K=y($e=>{U=$e});gh(this,K,W,j,$,B),yh(this,E),E.start!==void 0?U(E.start(this._transformStreamController)):U(void 0)}get readable(){if(!Uo(this))throw Vo("readable");return this._readable}get writable(){if(!Uo(this))throw Vo("writable");return this._writable}}Object.defineProperties(mn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(mn.prototype,e.toStringTag,{value:"TransformStream",configurable:!0});function gh(n,s,l,c,b,w){function E(){return s}function $(K){return wh(n,K)}function B(K){return Eh(n,K)}function W(){return Rh(n)}n._writable=Af(E,$,W,B,l,c);function j(){return vh(n)}function U(K){return bn(n,K),g(void 0)}n._readable=Pi(E,j,U,b,w),n._backpressure=void 0,n._backpressureChangePromise=void 0,n._backpressureChangePromise_resolve=void 0,yn(n,!0),n._transformStreamController=void 0}function Uo(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_transformStreamController")?!1:n instanceof mn}function gn(n,s){Ye(n._readable._readableStreamController,s),bn(n,s)}function bn(n,s){Mo(n._transformStreamController),Ri(n._writable._writableStreamController,s),n._backpressure&&yn(n,!1)}function yn(n,s){n._backpressureChangePromise!==void 0&&n._backpressureChangePromise_resolve(),n._backpressureChangePromise=y(l=>{n._backpressureChangePromise_resolve=l}),n._backpressure=s}class mr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Sn(this))throw _n("desiredSize");let s=this._controlledTransformStream._readable._readableStreamController;return Oi(s)}enqueue(s=void 0){if(!Sn(this))throw _n("enqueue");Ho(this,s)}error(s=void 0){if(!Sn(this))throw _n("error");Sh(this,s)}terminate(){if(!Sn(this))throw _n("terminate");_h(this)}}Object.defineProperties(mr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(mr.prototype,e.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Sn(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledTransformStream")?!1:n instanceof mr}function bh(n,s,l,c){s._controlledTransformStream=n,n._transformStreamController=s,s._transformAlgorithm=l,s._flushAlgorithm=c}function yh(n,s){let l=Object.create(mr.prototype),c=w=>{try{return Ho(l,w),g(void 0)}catch(E){return p(E)}},b=()=>g(void 0);s.transform!==void 0&&(c=w=>s.transform(w,l)),s.flush!==void 0&&(b=()=>s.flush(l)),bh(n,l,c,b)}function Mo(n){n._transformAlgorithm=void 0,n._flushAlgorithm=void 0}function Ho(n,s){let l=n._controlledTransformStream,c=l._readable._readableStreamController;if(!Pt(c))throw new TypeError("Readable side is not in a state that permits enqueue");try{fn(c,s)}catch(w){throw bn(l,w),l._readable._storedError}Kf(c)!==l._backpressure&&yn(l,!0)}function Sh(n,s){gn(n._controlledTransformStream,s)}function Go(n,s){let l=n._transformAlgorithm(s);return P(l,void 0,c=>{throw gn(n._controlledTransformStream,c),c})}function _h(n){let s=n._controlledTransformStream,l=s._readable._readableStreamController;dr(l);let c=new TypeError("TransformStream terminated");bn(s,c)}function wh(n,s){let l=n._transformStreamController;if(n._backpressure){let c=n._backpressureChangePromise;return P(c,()=>{let b=n._writable;if(b._state==="erroring")throw b._storedError;return Go(l,s)})}return Go(l,s)}function Eh(n,s){return gn(n,s),g(void 0)}function Rh(n){let s=n._readable,l=n._transformStreamController,c=l._flushAlgorithm();return Mo(l),P(c,()=>{if(s._state==="errored")throw s._storedError;dr(s._readableStreamController)},b=>{throw gn(n,b),s._storedError})}function vh(n){return yn(n,!1),n._backpressureChangePromise}function _n(n){return new TypeError(`TransformStreamDefaultController.prototype.${n} can only be used on a TransformStreamDefaultController`)}function Vo(n){return new TypeError(`TransformStream.prototype.${n} can only be used on a TransformStream`)}r.ByteLengthQueuingStrategy=dn,r.CountQueuingStrategy=pn,r.ReadableByteStreamController=At,r.ReadableStream=Xe,r.ReadableStreamBYOBReader=ar,r.ReadableStreamBYOBRequest=ir,r.ReadableStreamDefaultController=Ot,r.ReadableStreamDefaultReader=tr,r.TransformStream=mn,r.TransformStreamDefaultController=mr,r.WritableStream=ur,r.WritableStreamDefaultController=Ct,r.WritableStreamDefaultWriter=cr,Object.defineProperty(r,"__esModule",{value:!0})})});var fa=T(()=>{if(!globalThis.ReadableStream)try{let r=be("node:process"),{emitWarning:e}=r;try{r.emitWarning=()=>{},Object.assign(globalThis,be("node:stream/web")),r.emitWarning=e}catch(t){throw r.emitWarning=e,t}}catch{Object.assign(globalThis,ca())}try{let{Blob:r}=be("buffer");r&&!r.prototype.stream&&(r.prototype.stream=function(t){let i=0,o=this;return new ReadableStream({type:"bytes",async pull(a){let h=await o.slice(i,Math.min(o.size,i+65536)).arrayBuffer();i+=h.byteLength,a.enqueue(new Uint8Array(h)),i===o.size&&a.close()}})})}catch{}});async function*ji(r,e=!0){for(let t of r)if("stream"in t)yield*t.stream();else if(ArrayBuffer.isView(t))if(e){let i=t.byteOffset,o=t.byteOffset+t.byteLength;for(;i!==o;){let a=Math.min(o-i,ha),u=t.buffer.slice(i,i+a);i+=u.byteLength,yield new Uint8Array(u)}}else yield t;else{let i=0,o=t;for(;i!==o.size;){let u=await o.slice(i,Math.min(o.size,i+ha)).arrayBuffer();i+=u.byteLength,yield new Uint8Array(u)}}}var Fb,ha,da,jh,We,Sr=gr(()=>{Fb=Ce(fa(),1);ha=65536;da=class Ui{#e=[];#t="";#r=0;#n="transparent";constructor(e=[],t={}){if(typeof e!="object"||e===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof e[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof t!="object"&&typeof t!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");t===null&&(t={});let i=new TextEncoder;for(let a of e){let u;ArrayBuffer.isView(a)?u=new Uint8Array(a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength)):a instanceof ArrayBuffer?u=new Uint8Array(a.slice(0)):a instanceof Ui?u=a:u=i.encode(`${a}`),this.#r+=ArrayBuffer.isView(u)?u.byteLength:u.size,this.#e.push(u)}this.#n=`${t.endings===void 0?"transparent":t.endings}`;let o=t.type===void 0?"":String(t.type);this.#t=/^[\x20-\x7E]*$/.test(o)?o:""}get size(){return this.#r}get type(){return this.#t}async text(){let e=new TextDecoder,t="";for await(let i of ji(this.#e,!1))t+=e.decode(i,{stream:!0});return t+=e.decode(),t}async arrayBuffer(){let e=new Uint8Array(this.size),t=0;for await(let i of ji(this.#e,!1))e.set(i,t),t+=i.length;return e.buffer}stream(){let e=ji(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(t){let i=await e.next();i.done?t.close():t.enqueue(i.value)},async cancel(){await e.return()}})}slice(e=0,t=this.size,i=""){let{size:o}=this,a=e<0?Math.max(o+e,0):Math.min(e,o),u=t<0?Math.max(o+t,0):Math.min(t,o),h=Math.max(u-a,0),d=this.#e,f=[],m=0;for(let g of d){if(m>=h)break;let p=ArrayBuffer.isView(g)?g.byteLength:g.size;if(a&&p<=a)a-=p,u-=p;else{let S;ArrayBuffer.isView(g)?(S=g.subarray(a,Math.min(p,u)),m+=S.byteLength):(S=g.slice(a,Math.min(p,u)),m+=S.size),u-=p,f.push(S),a=0}}let y=new Ui([],{type:String(i).toLowerCase()});return y.#r=h,y.#e=f,y}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}};Object.defineProperties(da.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});jh=da,We=jh});var Uh,Mh,Bt,Mi=gr(()=>{Sr();Uh=class extends We{#e=0;#t="";constructor(e,t,i={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,i),i===null&&(i={});let o=i.lastModified===void 0?Date.now():Number(i.lastModified);Number.isNaN(o)||(this.#e=o),this.#t=String(t)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof We&&/^(File)$/.test(e[Symbol.toStringTag])}},Mh=Uh,Bt=Mh});function ga(r,e=We){var t=`${pa()}${pa()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),i=[],o=`--${t}\r
4
- Content-Disposition: form-data; name="`;return r.forEach((a,u)=>typeof a=="string"?i.push(o+Hi(u)+`"\r
3
+ var Ah=Object.create;var qi=Object.defineProperty;var Th=Object.getOwnPropertyDescriptor;var $h=Object.getOwnPropertyNames;var Ch=Object.getPrototypeOf,Oh=Object.prototype.hasOwnProperty;var be=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var br=(r,e)=>()=>(r&&(e=r(r=0)),e);var T=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Ph=(r,e)=>{for(var t in e)qi(r,t,{get:e[t],enumerable:!0})},Ih=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of $h(e))!Oh.call(r,o)&&o!==t&&qi(r,o,{get:()=>e[o],enumerable:!(i=Th(e,o))||i.enumerable});return r};var Ce=(r,e,t)=>(t=r!=null?Ah(Ch(r)):{},Ih(e||!r||!r.__esModule?qi(t,"default",{value:r,enumerable:!0}):t,r));var Xo=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var Je=(r,e,t)=>(Xo(r,e,"read from private field"),t?t.call(r):e.get(r)),En=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)};var ne=(r,e,t)=>(Xo(r,e,"access private method"),t);var Zo=T((vb,Ko)=>{"use strict";var Bi=be("https"),Fi=be("http"),{URL:Qo}=be("url"),Ni=class extends Fi.Agent{constructor(e){let{proxy:t,proxyRequestOptions:i,...o}=e;super(o),this.proxy=typeof t=="string"?new Qo(t):t,this.proxyRequestOptions=i||{}}createConnection(e,t){let i={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");i.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(i.servername=this.proxy.hostname);let o=(this.proxy.protocol==="http:"?Fi:Bi).request(i);o.once("connect",(a,u,h)=>{o.removeAllListeners(),u.removeAllListeners(),a.statusCode===200?t(null,u):(u.destroy(),t(new Error(`Bad response: ${a.statusCode}`),null))}),o.once("timeout",()=>{o.destroy(new Error("Proxy timeout"))}),o.once("error",a=>{o.removeAllListeners(),t(a,null)}),o.end()}},zi=class extends Bi.Agent{constructor(e){let{proxy:t,proxyRequestOptions:i,...o}=e;super(o),this.proxy=typeof t=="string"?new Qo(t):t,this.proxyRequestOptions=i||{}}createConnection(e,t){let i={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");i.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(i.servername=this.proxy.hostname);let o=(this.proxy.protocol==="http:"?Fi:Bi).request(i);o.once("connect",(a,u,h)=>{if(o.removeAllListeners(),u.removeAllListeners(),a.statusCode===200){let d=super.createConnection({...e,socket:u});t(null,d)}else u.destroy(),t(new Error(`Bad response: ${a.statusCode}`),null)}),o.once("timeout",()=>{o.destroy(new Error("Proxy timeout"))}),o.once("error",a=>{o.removeAllListeners(),t(a,null)}),o.end()}};Ko.exports={HttpProxyAgent:Ni,HttpsProxyAgent:zi}});var ra=T(ta=>{"use strict";var Lh=be("url").parse,xh={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},qh=String.prototype.endsWith||function(r){return r.length<=this.length&&this.indexOf(r,this.length-r.length)!==-1};function Dh(r){var e=typeof r=="string"?Lh(r):r||{},t=e.protocol,i=e.host,o=e.port;if(typeof i!="string"||!i||typeof t!="string"||(t=t.split(":",1)[0],i=i.replace(/:\d*$/,""),o=parseInt(o)||xh[t]||0,!Bh(i,o)))return"";var a=Dt("npm_config_"+t+"_proxy")||Dt(t+"_proxy")||Dt("npm_config_proxy")||Dt("all_proxy");return a&&a.indexOf("://")===-1&&(a=t+"://"+a),a}function Bh(r,e){var t=(Dt("npm_config_no_proxy")||Dt("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(i){if(!i)return!0;var o=i.match(/^(.+):(\d+)$/),a=o?o[1]:i,u=o?parseInt(o[2]):0;return u&&u!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!qh.call(r,a)):r!==a}):!0}function Dt(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}ta.getProxyForUrl=Dh});var ji=T((xb,aa)=>{"use strict";function kh(r,e){var t=r;e.slice(0,-1).forEach(function(o){t=t[o]||{}});var i=e[e.length-1];return i in t}function sa(r){return typeof r=="number"||/^0x[0-9a-f]+$/i.test(r)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(r)}function oa(r,e){return e==="constructor"&&typeof r[e]=="function"||e==="__proto__"}aa.exports=function(r,e){e||(e={});var t={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(t.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?t.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(A){t.bools[A]=!0});var i={};function o(A){return i[A].some(function(q){return t.bools[q]})}Object.keys(e.alias||{}).forEach(function(A){i[A]=[].concat(e.alias[A]),i[A].forEach(function(q){i[q]=[A].concat(i[A].filter(function(I){return q!==I}))})}),[].concat(e.string).filter(Boolean).forEach(function(A){t.strings[A]=!0,i[A]&&[].concat(i[A]).forEach(function(q){t.strings[q]=!0})});var a=e.default||{},u={_:[]};function h(A,q){return t.allBools&&/^--[^=]+$/.test(q)||t.strings[A]||t.bools[A]||i[A]}function d(A,q,I){for(var L=A,W=0;W<q.length-1;W++){var Y=q[W];if(oa(L,Y))return;L[Y]===void 0&&(L[Y]={}),(L[Y]===Object.prototype||L[Y]===Number.prototype||L[Y]===String.prototype)&&(L[Y]={}),L[Y]===Array.prototype&&(L[Y]=[]),L=L[Y]}var X=q[q.length-1];oa(L,X)||((L===Object.prototype||L===Number.prototype||L===String.prototype)&&(L={}),L===Array.prototype&&(L=[]),L[X]===void 0||t.bools[X]||typeof L[X]=="boolean"?L[X]=I:Array.isArray(L[X])?L[X].push(I):L[X]=[L[X],I])}function f(A,q,I){if(!(I&&t.unknownFn&&!h(A,I)&&t.unknownFn(I)===!1)){var L=!t.strings[A]&&sa(q)?Number(q):q;d(u,A.split("."),L),(i[A]||[]).forEach(function(W){d(u,W.split("."),L)})}}Object.keys(t.bools).forEach(function(A){f(A,a[A]===void 0?!1:a[A])});var m=[];r.indexOf("--")!==-1&&(m=r.slice(r.indexOf("--")+1),r=r.slice(0,r.indexOf("--")));for(var y=0;y<r.length;y++){var g=r[y],p,_;if(/^--.+=/.test(g)){var R=g.match(/^--([^=]+)=([\s\S]*)$/);p=R[1];var S=R[2];t.bools[p]&&(S=S!=="false"),f(p,S,g)}else if(/^--no-.+/.test(g))p=g.match(/^--no-(.+)/)[1],f(p,!1,g);else if(/^--.+/.test(g))p=g.match(/^--(.+)/)[1],_=r[y+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!t.bools[p]&&!t.allBools&&(!i[p]||!o(p))?(f(p,_,g),y+=1):/^(true|false)$/.test(_)?(f(p,_==="true",g),y+=1):f(p,t.strings[p]?"":!0,g);else if(/^-[^-]+/.test(g)){for(var v=g.slice(1,-1).split(""),P=!1,D=0;D<v.length;D++){if(_=g.slice(D+2),_==="-"){f(v[D],_,g);continue}if(/[A-Za-z]/.test(v[D])&&_[0]==="="){f(v[D],_.slice(1),g),P=!0;break}if(/[A-Za-z]/.test(v[D])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){f(v[D],_,g),P=!0;break}if(v[D+1]&&v[D+1].match(/\W/)){f(v[D],g.slice(D+2),g),P=!0;break}else f(v[D],t.strings[v[D]]?"":!0,g)}p=g.slice(-1)[0],!P&&p!=="-"&&(r[y+1]&&!/^(-|--)[^-]/.test(r[y+1])&&!t.bools[p]&&(!i[p]||!o(p))?(f(p,r[y+1],g),y+=1):r[y+1]&&/^(true|false)$/.test(r[y+1])?(f(p,r[y+1]==="true",g),y+=1):f(p,t.strings[p]?"":!0,g))}else if((!t.unknownFn||t.unknownFn(g)!==!1)&&u._.push(t.strings._||!sa(g)?g:Number(g)),e.stopEarly){u._.push.apply(u._,r.slice(y+1));break}}return Object.keys(a).forEach(function(A){kh(u,A.split("."))||(d(u,A.split("."),a[A]),(i[A]||[]).forEach(function(q){d(u,q.split("."),a[A])}))}),e["--"]?u["--"]=m.slice():m.forEach(function(A){u._.push(A)}),u}});var ca=T((Rn,ua)=>{(function(r,e){typeof Rn=="object"&&typeof ua<"u"?e(Rn):typeof define=="function"&&define.amd?define(["exports"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.WebStreamsPolyfill={}))})(Rn,function(r){"use strict";let e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:n=>`Symbol(${n})`;function t(){}function i(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}let o=i();function a(n){return typeof n=="object"&&n!==null||typeof n=="function"}let u=t,h=Promise,d=Promise.prototype.then,f=Promise.resolve.bind(h),m=Promise.reject.bind(h);function y(n){return new h(n)}function g(n){return f(n)}function p(n){return m(n)}function _(n,s,l){return d.call(n,s,l)}function R(n,s,l){_(_(n,s,l),void 0,u)}function S(n,s){R(n,s)}function v(n,s){R(n,void 0,s)}function P(n,s,l){return _(n,s,l)}function D(n){_(n,void 0,u)}let A=(()=>{let n=o&&o.queueMicrotask;if(typeof n=="function")return n;let s=g(void 0);return l=>_(s,l)})();function q(n,s,l){if(typeof n!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(n,s,l)}function I(n,s,l){try{return g(q(n,s,l))}catch(c){return p(c)}}let L=16384;class W{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(s){let l=this._back,c=l;l._elements.length===L-1&&(c={_elements:[],_next:void 0}),l._elements.push(s),c!==l&&(this._back=c,l._next=c),++this._size}shift(){let s=this._front,l=s,c=this._cursor,b=c+1,w=s._elements,E=w[c];return b===L&&(l=s._next,b=0),--this._size,this._cursor=b,s!==l&&(this._front=l),w[c]=void 0,E}forEach(s){let l=this._cursor,c=this._front,b=c._elements;for(;(l!==b.length||c._next!==void 0)&&!(l===b.length&&(c=c._next,b=c._elements,l=0,b.length===0));)s(b[l]),++l}peek(){let s=this._front,l=this._cursor;return s._elements[l]}}function Y(n,s){n._ownerReadableStream=s,s._reader=n,s._state==="readable"?ni(n):s._state==="closed"?Jc(n):qs(n,s._storedError)}function X(n,s){let l=n._ownerReadableStream;return Te(l,s)}function oe(n){n._ownerReadableStream._state==="readable"?ii(n,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):ef(n,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),n._ownerReadableStream._reader=void 0,n._ownerReadableStream=void 0}function at(n){return new TypeError("Cannot "+n+" a stream using a released reader")}function ni(n){n._closedPromise=y((s,l)=>{n._closedPromise_resolve=s,n._closedPromise_reject=l})}function qs(n,s){ni(n),ii(n,s)}function Jc(n){ni(n),Ds(n)}function ii(n,s){n._closedPromise_reject!==void 0&&(D(n._closedPromise),n._closedPromise_reject(s),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}function ef(n,s){qs(n,s)}function Ds(n){n._closedPromise_resolve!==void 0&&(n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}let Bs=e("[[AbortSteps]]"),Fs=e("[[ErrorSteps]]"),si=e("[[CancelSteps]]"),oi=e("[[PullSteps]]"),Ns=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},tf=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};function rf(n){return typeof n=="object"||typeof n=="function"}function Be(n,s){if(n!==void 0&&!rf(n))throw new TypeError(`${s} is not an object.`)}function ve(n,s){if(typeof n!="function")throw new TypeError(`${s} is not a function.`)}function nf(n){return typeof n=="object"&&n!==null||typeof n=="function"}function zs(n,s){if(!nf(n))throw new TypeError(`${s} is not an object.`)}function Fe(n,s,l){if(n===void 0)throw new TypeError(`Parameter ${s} is required in '${l}'.`)}function ai(n,s,l){if(n===void 0)throw new TypeError(`${s} is required in '${l}'.`)}function li(n){return Number(n)}function ks(n){return n===0?0:n}function sf(n){return ks(tf(n))}function Ws(n,s){let c=Number.MAX_SAFE_INTEGER,b=Number(n);if(b=ks(b),!Ns(b))throw new TypeError(`${s} is not a finite number`);if(b=sf(b),b<0||b>c)throw new TypeError(`${s} is outside the accepted range of 0 to ${c}, inclusive`);return!Ns(b)||b===0?0:b}function ui(n,s){if(!Qe(n))throw new TypeError(`${s} is not a ReadableStream.`)}function vt(n){return new rr(n)}function js(n,s){n._reader._readRequests.push(s)}function ci(n,s,l){let b=n._reader._readRequests.shift();l?b._closeSteps():b._chunkSteps(s)}function Ur(n){return n._reader._readRequests.length}function Us(n){let s=n._reader;return!(s===void 0||!Ge(s))}class rr{constructor(s){if(Fe(s,1,"ReadableStreamDefaultReader"),ui(s,"First parameter"),Ke(s))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Y(this,s),this._readRequests=new W}get closed(){return Ge(this)?this._closedPromise:p(Mr("closed"))}cancel(s=void 0){return Ge(this)?this._ownerReadableStream===void 0?p(at("cancel")):X(this,s):p(Mr("cancel"))}read(){if(!Ge(this))return p(Mr("read"));if(this._ownerReadableStream===void 0)return p(at("read from"));let s,l,c=y((w,E)=>{s=w,l=E});return nr(this,{_chunkSteps:w=>s({value:w,done:!1}),_closeSteps:()=>s({value:void 0,done:!0}),_errorSteps:w=>l(w)}),c}releaseLock(){if(!Ge(this))throw Mr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");oe(this)}}}Object.defineProperties(rr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(rr.prototype,e.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Ge(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readRequests")?!1:n instanceof rr}function nr(n,s){let l=n._ownerReadableStream;l._disturbed=!0,l._state==="closed"?s._closeSteps():l._state==="errored"?s._errorSteps(l._storedError):l._readableStreamController[oi](s)}function Mr(n){return new TypeError(`ReadableStreamDefaultReader.prototype.${n} can only be used on a ReadableStreamDefaultReader`)}let Ms=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Hs{constructor(s,l){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=s,this._preventCancel=l}next(){let s=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,s,s):s(),this._ongoingPromise}return(s){let l=()=>this._returnSteps(s);return this._ongoingPromise?P(this._ongoingPromise,l,l):l()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let s=this._reader;if(s._ownerReadableStream===void 0)return p(at("iterate"));let l,c,b=y((E,$)=>{l=E,c=$});return nr(s,{_chunkSteps:E=>{this._ongoingPromise=void 0,A(()=>l({value:E,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,oe(s),l({value:void 0,done:!0})},_errorSteps:E=>{this._ongoingPromise=void 0,this._isFinished=!0,oe(s),c(E)}}),b}_returnSteps(s){if(this._isFinished)return Promise.resolve({value:s,done:!0});this._isFinished=!0;let l=this._reader;if(l._ownerReadableStream===void 0)return p(at("finish iterating"));if(!this._preventCancel){let c=X(l,s);return oe(l),P(c,()=>({value:s,done:!0}))}return oe(l),g({value:s,done:!0})}}let Gs={next(){return Vs(this)?this._asyncIteratorImpl.next():p(Ys("next"))},return(n){return Vs(this)?this._asyncIteratorImpl.return(n):p(Ys("return"))}};Ms!==void 0&&Object.setPrototypeOf(Gs,Ms);function of(n,s){let l=vt(n),c=new Hs(l,s),b=Object.create(Gs);return b._asyncIteratorImpl=c,b}function Vs(n){if(!a(n)||!Object.prototype.hasOwnProperty.call(n,"_asyncIteratorImpl"))return!1;try{return n._asyncIteratorImpl instanceof Hs}catch{return!1}}function Ys(n){return new TypeError(`ReadableStreamAsyncIterator.${n} can only be used on a ReadableSteamAsyncIterator`)}let Xs=Number.isNaN||function(n){return n!==n};function ir(n){return n.slice()}function Qs(n,s,l,c,b){new Uint8Array(n).set(new Uint8Array(l,c,b),s)}function wb(n){return n}function Hr(n){return!1}function Ks(n,s,l){if(n.slice)return n.slice(s,l);let c=l-s,b=new ArrayBuffer(c);return Qs(b,0,n,s,c),b}function af(n){return!(typeof n!="number"||Xs(n)||n<0)}function Zs(n){let s=Ks(n.buffer,n.byteOffset,n.byteOffset+n.byteLength);return new Uint8Array(s)}function fi(n){let s=n._queue.shift();return n._queueTotalSize-=s.size,n._queueTotalSize<0&&(n._queueTotalSize=0),s.value}function hi(n,s,l){if(!af(l)||l===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");n._queue.push({value:s,size:l}),n._queueTotalSize+=l}function lf(n){return n._queue.peek().value}function Ve(n){n._queue=new W,n._queueTotalSize=0}class sr{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!di(this))throw bi("view");return this._view}respond(s){if(!di(this))throw bi("respond");if(Fe(s,1,"respond"),s=Ws(s,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Hr(this._view.buffer),Qr(this._associatedReadableByteStreamController,s)}respondWithNewView(s){if(!di(this))throw bi("respondWithNewView");if(Fe(s,1,"respondWithNewView"),!ArrayBuffer.isView(s))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Hr(s.buffer),Kr(this._associatedReadableByteStreamController,s)}}Object.defineProperties(sr.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(sr.prototype,e.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class At{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!lt(this))throw ar("byobRequest");return gi(this)}get desiredSize(){if(!lt(this))throw ar("desiredSize");return oo(this)}close(){if(!lt(this))throw ar("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let s=this._controlledReadableByteStream._state;if(s!=="readable")throw new TypeError(`The stream (in ${s} state) is not in the readable state and cannot be closed`);or(this)}enqueue(s){if(!lt(this))throw ar("enqueue");if(Fe(s,1,"enqueue"),!ArrayBuffer.isView(s))throw new TypeError("chunk must be an array buffer view");if(s.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(s.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let l=this._controlledReadableByteStream._state;if(l!=="readable")throw new TypeError(`The stream (in ${l} state) is not in the readable state and cannot be enqueued to`);Xr(this,s)}error(s=void 0){if(!lt(this))throw ar("error");Ae(this,s)}[si](s){Js(this),Ve(this);let l=this._cancelAlgorithm(s);return Yr(this),l}[oi](s){let l=this._controlledReadableByteStream;if(this._queueTotalSize>0){let b=this._queue.shift();this._queueTotalSize-=b.byteLength,no(this);let w=new Uint8Array(b.buffer,b.byteOffset,b.byteLength);s._chunkSteps(w);return}let c=this._autoAllocateChunkSize;if(c!==void 0){let b;try{b=new ArrayBuffer(c)}catch(E){s._errorSteps(E);return}let w={buffer:b,bufferByteLength:c,byteOffset:0,byteLength:c,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(w)}js(l,s),ut(this)}}Object.defineProperties(At.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(At.prototype,e.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function lt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledReadableByteStream")?!1:n instanceof At}function di(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_associatedReadableByteStreamController")?!1:n instanceof sr}function ut(n){if(!hf(n))return;if(n._pulling){n._pullAgain=!0;return}n._pulling=!0;let l=n._pullAlgorithm();R(l,()=>{n._pulling=!1,n._pullAgain&&(n._pullAgain=!1,ut(n))},c=>{Ae(n,c)})}function Js(n){mi(n),n._pendingPullIntos=new W}function pi(n,s){let l=!1;n._state==="closed"&&(l=!0);let c=eo(s);s.readerType==="default"?ci(n,c,l):mf(n,c,l)}function eo(n){let s=n.bytesFilled,l=n.elementSize;return new n.viewConstructor(n.buffer,n.byteOffset,s/l)}function Gr(n,s,l,c){n._queue.push({buffer:s,byteOffset:l,byteLength:c}),n._queueTotalSize+=c}function to(n,s){let l=s.elementSize,c=s.bytesFilled-s.bytesFilled%l,b=Math.min(n._queueTotalSize,s.byteLength-s.bytesFilled),w=s.bytesFilled+b,E=w-w%l,$=b,F=!1;E>c&&($=E-s.bytesFilled,F=!0);let k=n._queue;for(;$>0;){let j=k.peek(),U=Math.min($,j.byteLength),K=s.byteOffset+s.bytesFilled;Qs(s.buffer,K,j.buffer,j.byteOffset,U),j.byteLength===U?k.shift():(j.byteOffset+=U,j.byteLength-=U),n._queueTotalSize-=U,ro(n,U,s),$-=U}return F}function ro(n,s,l){l.bytesFilled+=s}function no(n){n._queueTotalSize===0&&n._closeRequested?(Yr(n),mr(n._controlledReadableByteStream)):ut(n)}function mi(n){n._byobRequest!==null&&(n._byobRequest._associatedReadableByteStreamController=void 0,n._byobRequest._view=null,n._byobRequest=null)}function io(n){for(;n._pendingPullIntos.length>0;){if(n._queueTotalSize===0)return;let s=n._pendingPullIntos.peek();to(n,s)&&(Vr(n),pi(n._controlledReadableByteStream,s))}}function uf(n,s,l){let c=n._controlledReadableByteStream,b=1;s.constructor!==DataView&&(b=s.constructor.BYTES_PER_ELEMENT);let w=s.constructor,E=s.buffer,$={buffer:E,bufferByteLength:E.byteLength,byteOffset:s.byteOffset,byteLength:s.byteLength,bytesFilled:0,elementSize:b,viewConstructor:w,readerType:"byob"};if(n._pendingPullIntos.length>0){n._pendingPullIntos.push($),uo(c,l);return}if(c._state==="closed"){let F=new w($.buffer,$.byteOffset,0);l._closeSteps(F);return}if(n._queueTotalSize>0){if(to(n,$)){let F=eo($);no(n),l._chunkSteps(F);return}if(n._closeRequested){let F=new TypeError("Insufficient bytes to fill elements in the given buffer");Ae(n,F),l._errorSteps(F);return}}n._pendingPullIntos.push($),uo(c,l),ut(n)}function cf(n,s){let l=n._controlledReadableByteStream;if(yi(l))for(;co(l)>0;){let c=Vr(n);pi(l,c)}}function ff(n,s,l){if(ro(n,s,l),l.bytesFilled<l.elementSize)return;Vr(n);let c=l.bytesFilled%l.elementSize;if(c>0){let b=l.byteOffset+l.bytesFilled,w=Ks(l.buffer,b-c,b);Gr(n,w,0,w.byteLength)}l.bytesFilled-=c,pi(n._controlledReadableByteStream,l),io(n)}function so(n,s){let l=n._pendingPullIntos.peek();mi(n),n._controlledReadableByteStream._state==="closed"?cf(n):ff(n,s,l),ut(n)}function Vr(n){return n._pendingPullIntos.shift()}function hf(n){let s=n._controlledReadableByteStream;return s._state!=="readable"||n._closeRequested||!n._started?!1:!!(Us(s)&&Ur(s)>0||yi(s)&&co(s)>0||oo(n)>0)}function Yr(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0}function or(n){let s=n._controlledReadableByteStream;if(!(n._closeRequested||s._state!=="readable")){if(n._queueTotalSize>0){n._closeRequested=!0;return}if(n._pendingPullIntos.length>0&&n._pendingPullIntos.peek().bytesFilled>0){let c=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ae(n,c),c}Yr(n),mr(s)}}function Xr(n,s){let l=n._controlledReadableByteStream;if(n._closeRequested||l._state!=="readable")return;let c=s.buffer,b=s.byteOffset,w=s.byteLength,E=c;if(n._pendingPullIntos.length>0){let $=n._pendingPullIntos.peek();Hr($.buffer),$.buffer=$.buffer}if(mi(n),Us(l))if(Ur(l)===0)Gr(n,E,b,w);else{n._pendingPullIntos.length>0&&Vr(n);let $=new Uint8Array(E,b,w);ci(l,$,!1)}else yi(l)?(Gr(n,E,b,w),io(n)):Gr(n,E,b,w);ut(n)}function Ae(n,s){let l=n._controlledReadableByteStream;l._state==="readable"&&(Js(n),Ve(n),Yr(n),Do(l,s))}function gi(n){if(n._byobRequest===null&&n._pendingPullIntos.length>0){let s=n._pendingPullIntos.peek(),l=new Uint8Array(s.buffer,s.byteOffset+s.bytesFilled,s.byteLength-s.bytesFilled),c=Object.create(sr.prototype);pf(c,n,l),n._byobRequest=c}return n._byobRequest}function oo(n){let s=n._controlledReadableByteStream._state;return s==="errored"?null:s==="closed"?0:n._strategyHWM-n._queueTotalSize}function Qr(n,s){let l=n._pendingPullIntos.peek();if(n._controlledReadableByteStream._state==="closed"){if(s!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(s===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(l.bytesFilled+s>l.byteLength)throw new RangeError("bytesWritten out of range")}l.buffer=l.buffer,so(n,s)}function Kr(n,s){let l=n._pendingPullIntos.peek();if(n._controlledReadableByteStream._state==="closed"){if(s.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(s.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(l.byteOffset+l.bytesFilled!==s.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(l.bufferByteLength!==s.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(l.bytesFilled+s.byteLength>l.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let b=s.byteLength;l.buffer=s.buffer,so(n,b)}function ao(n,s,l,c,b,w,E){s._controlledReadableByteStream=n,s._pullAgain=!1,s._pulling=!1,s._byobRequest=null,s._queue=s._queueTotalSize=void 0,Ve(s),s._closeRequested=!1,s._started=!1,s._strategyHWM=w,s._pullAlgorithm=c,s._cancelAlgorithm=b,s._autoAllocateChunkSize=E,s._pendingPullIntos=new W,n._readableStreamController=s;let $=l();R(g($),()=>{s._started=!0,ut(s)},F=>{Ae(s,F)})}function df(n,s,l){let c=Object.create(At.prototype),b=()=>{},w=()=>g(void 0),E=()=>g(void 0);s.start!==void 0&&(b=()=>s.start(c)),s.pull!==void 0&&(w=()=>s.pull(c)),s.cancel!==void 0&&(E=F=>s.cancel(F));let $=s.autoAllocateChunkSize;if($===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");ao(n,c,b,w,E,l,$)}function pf(n,s,l){n._associatedReadableByteStreamController=s,n._view=l}function bi(n){return new TypeError(`ReadableStreamBYOBRequest.prototype.${n} can only be used on a ReadableStreamBYOBRequest`)}function ar(n){return new TypeError(`ReadableByteStreamController.prototype.${n} can only be used on a ReadableByteStreamController`)}function lo(n){return new lr(n)}function uo(n,s){n._reader._readIntoRequests.push(s)}function mf(n,s,l){let b=n._reader._readIntoRequests.shift();l?b._closeSteps(s):b._chunkSteps(s)}function co(n){return n._reader._readIntoRequests.length}function yi(n){let s=n._reader;return!(s===void 0||!ct(s))}class lr{constructor(s){if(Fe(s,1,"ReadableStreamBYOBReader"),ui(s,"First parameter"),Ke(s))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!lt(s._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Y(this,s),this._readIntoRequests=new W}get closed(){return ct(this)?this._closedPromise:p(Zr("closed"))}cancel(s=void 0){return ct(this)?this._ownerReadableStream===void 0?p(at("cancel")):X(this,s):p(Zr("cancel"))}read(s){if(!ct(this))return p(Zr("read"));if(!ArrayBuffer.isView(s))return p(new TypeError("view must be an array buffer view"));if(s.byteLength===0)return p(new TypeError("view must have non-zero byteLength"));if(s.buffer.byteLength===0)return p(new TypeError("view's buffer must have non-zero byteLength"));if(Hr(s.buffer),this._ownerReadableStream===void 0)return p(at("read from"));let l,c,b=y((E,$)=>{l=E,c=$});return fo(this,s,{_chunkSteps:E=>l({value:E,done:!1}),_closeSteps:E=>l({value:E,done:!0}),_errorSteps:E=>c(E)}),b}releaseLock(){if(!ct(this))throw Zr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");oe(this)}}}Object.defineProperties(lr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(lr.prototype,e.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function ct(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readIntoRequests")?!1:n instanceof lr}function fo(n,s,l){let c=n._ownerReadableStream;c._disturbed=!0,c._state==="errored"?l._errorSteps(c._storedError):uf(c._readableStreamController,s,l)}function Zr(n){return new TypeError(`ReadableStreamBYOBReader.prototype.${n} can only be used on a ReadableStreamBYOBReader`)}function ur(n,s){let{highWaterMark:l}=n;if(l===void 0)return s;if(Xs(l)||l<0)throw new RangeError("Invalid highWaterMark");return l}function Jr(n){let{size:s}=n;return s||(()=>1)}function en(n,s){Be(n,s);let l=n==null?void 0:n.highWaterMark,c=n==null?void 0:n.size;return{highWaterMark:l===void 0?void 0:li(l),size:c===void 0?void 0:gf(c,`${s} has member 'size' that`)}}function gf(n,s){return ve(n,s),l=>li(n(l))}function bf(n,s){Be(n,s);let l=n==null?void 0:n.abort,c=n==null?void 0:n.close,b=n==null?void 0:n.start,w=n==null?void 0:n.type,E=n==null?void 0:n.write;return{abort:l===void 0?void 0:yf(l,n,`${s} has member 'abort' that`),close:c===void 0?void 0:Sf(c,n,`${s} has member 'close' that`),start:b===void 0?void 0:_f(b,n,`${s} has member 'start' that`),write:E===void 0?void 0:wf(E,n,`${s} has member 'write' that`),type:w}}function yf(n,s,l){return ve(n,l),c=>I(n,s,[c])}function Sf(n,s,l){return ve(n,l),()=>I(n,s,[])}function _f(n,s,l){return ve(n,l),c=>q(n,s,[c])}function wf(n,s,l){return ve(n,l),(c,b)=>I(n,s,[c,b])}function ho(n,s){if(!Tt(n))throw new TypeError(`${s} is not a WritableStream.`)}function Ef(n){if(typeof n!="object"||n===null)return!1;try{return typeof n.aborted=="boolean"}catch{return!1}}let Rf=typeof AbortController=="function";function vf(){if(Rf)return new AbortController}class cr{constructor(s={},l={}){s===void 0?s=null:zs(s,"First parameter");let c=en(l,"Second parameter"),b=bf(s,"First parameter");if(mo(this),b.type!==void 0)throw new RangeError("Invalid type is specified");let E=Jr(c),$=ur(c,1);Nf(this,b,$,E)}get locked(){if(!Tt(this))throw on("locked");return $t(this)}abort(s=void 0){return Tt(this)?$t(this)?p(new TypeError("Cannot abort a stream that already has a writer")):tn(this,s):p(on("abort"))}close(){return Tt(this)?$t(this)?p(new TypeError("Cannot close a stream that already has a writer")):Ie(this)?p(new TypeError("Cannot close an already-closing stream")):go(this):p(on("close"))}getWriter(){if(!Tt(this))throw on("getWriter");return po(this)}}Object.defineProperties(cr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(cr.prototype,e.toStringTag,{value:"WritableStream",configurable:!0});function po(n){return new fr(n)}function Af(n,s,l,c,b=1,w=()=>1){let E=Object.create(cr.prototype);mo(E);let $=Object.create(Ct.prototype);return Eo(E,$,n,s,l,c,b,w),E}function mo(n){n._state="writable",n._storedError=void 0,n._writer=void 0,n._writableStreamController=void 0,n._writeRequests=new W,n._inFlightWriteRequest=void 0,n._closeRequest=void 0,n._inFlightCloseRequest=void 0,n._pendingAbortRequest=void 0,n._backpressure=!1}function Tt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_writableStreamController")?!1:n instanceof cr}function $t(n){return n._writer!==void 0}function tn(n,s){var l;if(n._state==="closed"||n._state==="errored")return g(void 0);n._writableStreamController._abortReason=s,(l=n._writableStreamController._abortController)===null||l===void 0||l.abort();let c=n._state;if(c==="closed"||c==="errored")return g(void 0);if(n._pendingAbortRequest!==void 0)return n._pendingAbortRequest._promise;let b=!1;c==="erroring"&&(b=!0,s=void 0);let w=y((E,$)=>{n._pendingAbortRequest={_promise:void 0,_resolve:E,_reject:$,_reason:s,_wasAlreadyErroring:b}});return n._pendingAbortRequest._promise=w,b||_i(n,s),w}function go(n){let s=n._state;if(s==="closed"||s==="errored")return p(new TypeError(`The stream (in ${s} state) is not in the writable state and cannot be closed`));let l=y((b,w)=>{let E={_resolve:b,_reject:w};n._closeRequest=E}),c=n._writer;return c!==void 0&&n._backpressure&&s==="writable"&&Oi(c),zf(n._writableStreamController),l}function Tf(n){return y((l,c)=>{let b={_resolve:l,_reject:c};n._writeRequests.push(b)})}function Si(n,s){if(n._state==="writable"){_i(n,s);return}wi(n)}function _i(n,s){let l=n._writableStreamController;n._state="erroring",n._storedError=s;let c=n._writer;c!==void 0&&yo(c,s),!If(n)&&l._started&&wi(n)}function wi(n){n._state="errored",n._writableStreamController[Fs]();let s=n._storedError;if(n._writeRequests.forEach(b=>{b._reject(s)}),n._writeRequests=new W,n._pendingAbortRequest===void 0){rn(n);return}let l=n._pendingAbortRequest;if(n._pendingAbortRequest=void 0,l._wasAlreadyErroring){l._reject(s),rn(n);return}let c=n._writableStreamController[Bs](l._reason);R(c,()=>{l._resolve(),rn(n)},b=>{l._reject(b),rn(n)})}function $f(n){n._inFlightWriteRequest._resolve(void 0),n._inFlightWriteRequest=void 0}function Cf(n,s){n._inFlightWriteRequest._reject(s),n._inFlightWriteRequest=void 0,Si(n,s)}function Of(n){n._inFlightCloseRequest._resolve(void 0),n._inFlightCloseRequest=void 0,n._state==="erroring"&&(n._storedError=void 0,n._pendingAbortRequest!==void 0&&(n._pendingAbortRequest._resolve(),n._pendingAbortRequest=void 0)),n._state="closed";let l=n._writer;l!==void 0&&To(l)}function Pf(n,s){n._inFlightCloseRequest._reject(s),n._inFlightCloseRequest=void 0,n._pendingAbortRequest!==void 0&&(n._pendingAbortRequest._reject(s),n._pendingAbortRequest=void 0),Si(n,s)}function Ie(n){return!(n._closeRequest===void 0&&n._inFlightCloseRequest===void 0)}function If(n){return!(n._inFlightWriteRequest===void 0&&n._inFlightCloseRequest===void 0)}function Lf(n){n._inFlightCloseRequest=n._closeRequest,n._closeRequest=void 0}function xf(n){n._inFlightWriteRequest=n._writeRequests.shift()}function rn(n){n._closeRequest!==void 0&&(n._closeRequest._reject(n._storedError),n._closeRequest=void 0);let s=n._writer;s!==void 0&&$i(s,n._storedError)}function Ei(n,s){let l=n._writer;l!==void 0&&s!==n._backpressure&&(s?Gf(l):Oi(l)),n._backpressure=s}class fr{constructor(s){if(Fe(s,1,"WritableStreamDefaultWriter"),ho(s,"First parameter"),$t(s))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=s,s._writer=this;let l=s._state;if(l==="writable")!Ie(s)&&s._backpressure?ln(this):$o(this),an(this);else if(l==="erroring")Ci(this,s._storedError),an(this);else if(l==="closed")$o(this),Mf(this);else{let c=s._storedError;Ci(this,c),Ao(this,c)}}get closed(){return ft(this)?this._closedPromise:p(ht("closed"))}get desiredSize(){if(!ft(this))throw ht("desiredSize");if(this._ownerWritableStream===void 0)throw hr("desiredSize");return Ff(this)}get ready(){return ft(this)?this._readyPromise:p(ht("ready"))}abort(s=void 0){return ft(this)?this._ownerWritableStream===void 0?p(hr("abort")):qf(this,s):p(ht("abort"))}close(){if(!ft(this))return p(ht("close"));let s=this._ownerWritableStream;return s===void 0?p(hr("close")):Ie(s)?p(new TypeError("Cannot close an already-closing stream")):bo(this)}releaseLock(){if(!ft(this))throw ht("releaseLock");this._ownerWritableStream!==void 0&&So(this)}write(s=void 0){return ft(this)?this._ownerWritableStream===void 0?p(hr("write to")):_o(this,s):p(ht("write"))}}Object.defineProperties(fr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(fr.prototype,e.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function ft(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_ownerWritableStream")?!1:n instanceof fr}function qf(n,s){let l=n._ownerWritableStream;return tn(l,s)}function bo(n){let s=n._ownerWritableStream;return go(s)}function Df(n){let s=n._ownerWritableStream,l=s._state;return Ie(s)||l==="closed"?g(void 0):l==="errored"?p(s._storedError):bo(n)}function Bf(n,s){n._closedPromiseState==="pending"?$i(n,s):Hf(n,s)}function yo(n,s){n._readyPromiseState==="pending"?Co(n,s):Vf(n,s)}function Ff(n){let s=n._ownerWritableStream,l=s._state;return l==="errored"||l==="erroring"?null:l==="closed"?0:Ro(s._writableStreamController)}function So(n){let s=n._ownerWritableStream,l=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");yo(n,l),Bf(n,l),s._writer=void 0,n._ownerWritableStream=void 0}function _o(n,s){let l=n._ownerWritableStream,c=l._writableStreamController,b=kf(c,s);if(l!==n._ownerWritableStream)return p(hr("write to"));let w=l._state;if(w==="errored")return p(l._storedError);if(Ie(l)||w==="closed")return p(new TypeError("The stream is closing or closed and cannot be written to"));if(w==="erroring")return p(l._storedError);let E=Tf(l);return Wf(c,s,b),E}let wo={};class Ct{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Ri(this))throw Ti("abortReason");return this._abortReason}get signal(){if(!Ri(this))throw Ti("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(s=void 0){if(!Ri(this))throw Ti("error");this._controlledWritableStream._state==="writable"&&vo(this,s)}[Bs](s){let l=this._abortAlgorithm(s);return nn(this),l}[Fs](){Ve(this)}}Object.defineProperties(Ct.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Ct.prototype,e.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Ri(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledWritableStream")?!1:n instanceof Ct}function Eo(n,s,l,c,b,w,E,$){s._controlledWritableStream=n,n._writableStreamController=s,s._queue=void 0,s._queueTotalSize=void 0,Ve(s),s._abortReason=void 0,s._abortController=vf(),s._started=!1,s._strategySizeAlgorithm=$,s._strategyHWM=E,s._writeAlgorithm=c,s._closeAlgorithm=b,s._abortAlgorithm=w;let F=Ai(s);Ei(n,F);let k=l(),j=g(k);R(j,()=>{s._started=!0,sn(s)},U=>{s._started=!0,Si(n,U)})}function Nf(n,s,l,c){let b=Object.create(Ct.prototype),w=()=>{},E=()=>g(void 0),$=()=>g(void 0),F=()=>g(void 0);s.start!==void 0&&(w=()=>s.start(b)),s.write!==void 0&&(E=k=>s.write(k,b)),s.close!==void 0&&($=()=>s.close()),s.abort!==void 0&&(F=k=>s.abort(k)),Eo(n,b,w,E,$,F,l,c)}function nn(n){n._writeAlgorithm=void 0,n._closeAlgorithm=void 0,n._abortAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function zf(n){hi(n,wo,0),sn(n)}function kf(n,s){try{return n._strategySizeAlgorithm(s)}catch(l){return vi(n,l),1}}function Ro(n){return n._strategyHWM-n._queueTotalSize}function Wf(n,s,l){try{hi(n,s,l)}catch(b){vi(n,b);return}let c=n._controlledWritableStream;if(!Ie(c)&&c._state==="writable"){let b=Ai(n);Ei(c,b)}sn(n)}function sn(n){let s=n._controlledWritableStream;if(!n._started||s._inFlightWriteRequest!==void 0)return;if(s._state==="erroring"){wi(s);return}if(n._queue.length===0)return;let c=lf(n);c===wo?jf(n):Uf(n,c)}function vi(n,s){n._controlledWritableStream._state==="writable"&&vo(n,s)}function jf(n){let s=n._controlledWritableStream;Lf(s),fi(n);let l=n._closeAlgorithm();nn(n),R(l,()=>{Of(s)},c=>{Pf(s,c)})}function Uf(n,s){let l=n._controlledWritableStream;xf(l);let c=n._writeAlgorithm(s);R(c,()=>{$f(l);let b=l._state;if(fi(n),!Ie(l)&&b==="writable"){let w=Ai(n);Ei(l,w)}sn(n)},b=>{l._state==="writable"&&nn(n),Cf(l,b)})}function Ai(n){return Ro(n)<=0}function vo(n,s){let l=n._controlledWritableStream;nn(n),_i(l,s)}function on(n){return new TypeError(`WritableStream.prototype.${n} can only be used on a WritableStream`)}function Ti(n){return new TypeError(`WritableStreamDefaultController.prototype.${n} can only be used on a WritableStreamDefaultController`)}function ht(n){return new TypeError(`WritableStreamDefaultWriter.prototype.${n} can only be used on a WritableStreamDefaultWriter`)}function hr(n){return new TypeError("Cannot "+n+" a stream using a released writer")}function an(n){n._closedPromise=y((s,l)=>{n._closedPromise_resolve=s,n._closedPromise_reject=l,n._closedPromiseState="pending"})}function Ao(n,s){an(n),$i(n,s)}function Mf(n){an(n),To(n)}function $i(n,s){n._closedPromise_reject!==void 0&&(D(n._closedPromise),n._closedPromise_reject(s),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0,n._closedPromiseState="rejected")}function Hf(n,s){Ao(n,s)}function To(n){n._closedPromise_resolve!==void 0&&(n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0,n._closedPromiseState="resolved")}function ln(n){n._readyPromise=y((s,l)=>{n._readyPromise_resolve=s,n._readyPromise_reject=l}),n._readyPromiseState="pending"}function Ci(n,s){ln(n),Co(n,s)}function $o(n){ln(n),Oi(n)}function Co(n,s){n._readyPromise_reject!==void 0&&(D(n._readyPromise),n._readyPromise_reject(s),n._readyPromise_resolve=void 0,n._readyPromise_reject=void 0,n._readyPromiseState="rejected")}function Gf(n){ln(n)}function Vf(n,s){Ci(n,s)}function Oi(n){n._readyPromise_resolve!==void 0&&(n._readyPromise_resolve(void 0),n._readyPromise_resolve=void 0,n._readyPromise_reject=void 0,n._readyPromiseState="fulfilled")}let Oo=typeof DOMException<"u"?DOMException:void 0;function Yf(n){if(!(typeof n=="function"||typeof n=="object"))return!1;try{return new n,!0}catch{return!1}}function Xf(){let n=function(l,c){this.message=l||"",this.name=c||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return n.prototype=Object.create(Error.prototype),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,configurable:!0}),n}let Qf=Yf(Oo)?Oo:Xf();function Po(n,s,l,c,b,w){let E=vt(n),$=po(s);n._disturbed=!0;let F=!1,k=g(void 0);return y((j,U)=>{let K;if(w!==void 0){if(K=()=>{let x=new Qf("Aborted","AbortError"),z=[];c||z.push(()=>s._state==="writable"?tn(s,x):g(void 0)),b||z.push(()=>n._state==="readable"?Te(n,x):g(void 0)),he(()=>Promise.all(z.map(G=>G())),!0,x)},w.aborted){K();return}w.addEventListener("abort",K)}function $e(){return y((x,z)=>{function G(ge){ge?x():_(It(),G,z)}G(!1)})}function It(){return F?g(!0):_($._readyPromise,()=>y((x,z)=>{nr(E,{_chunkSteps:G=>{k=_(_o($,G),void 0,t),x(!1)},_closeSteps:()=>x(!0),_errorSteps:z})}))}if(Ne(n,E._closedPromise,x=>{c?Se(!0,x):he(()=>tn(s,x),!0,x)}),Ne(s,$._closedPromise,x=>{b?Se(!0,x):he(()=>Te(n,x),!0,x)}),le(n,E._closedPromise,()=>{l?Se():he(()=>Df($))}),Ie(s)||s._state==="closed"){let x=new TypeError("the destination writable stream closed before all data could be piped to it");b?Se(!0,x):he(()=>Te(n,x),!0,x)}D($e());function Ze(){let x=k;return _(k,()=>x!==k?Ze():void 0)}function Ne(x,z,G){x._state==="errored"?G(x._storedError):v(z,G)}function le(x,z,G){x._state==="closed"?G():S(z,G)}function he(x,z,G){if(F)return;F=!0,s._state==="writable"&&!Ie(s)?S(Ze(),ge):ge();function ge(){R(x(),()=>ze(z,G),Lt=>ze(!0,Lt))}}function Se(x,z){F||(F=!0,s._state==="writable"&&!Ie(s)?S(Ze(),()=>ze(x,z)):ze(x,z))}function ze(x,z){So($),oe(E),w!==void 0&&w.removeEventListener("abort",K),x?U(z):j(void 0)}})}class Ot{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!un(this))throw hn("desiredSize");return Pi(this)}close(){if(!un(this))throw hn("close");if(!Pt(this))throw new TypeError("The stream is not in a state that permits close");pr(this)}enqueue(s=void 0){if(!un(this))throw hn("enqueue");if(!Pt(this))throw new TypeError("The stream is not in a state that permits enqueue");return fn(this,s)}error(s=void 0){if(!un(this))throw hn("error");Ye(this,s)}[si](s){Ve(this);let l=this._cancelAlgorithm(s);return cn(this),l}[oi](s){let l=this._controlledReadableStream;if(this._queue.length>0){let c=fi(this);this._closeRequested&&this._queue.length===0?(cn(this),mr(l)):dr(this),s._chunkSteps(c)}else js(l,s),dr(this)}}Object.defineProperties(Ot.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Ot.prototype,e.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function un(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledReadableStream")?!1:n instanceof Ot}function dr(n){if(!Io(n))return;if(n._pulling){n._pullAgain=!0;return}n._pulling=!0;let l=n._pullAlgorithm();R(l,()=>{n._pulling=!1,n._pullAgain&&(n._pullAgain=!1,dr(n))},c=>{Ye(n,c)})}function Io(n){let s=n._controlledReadableStream;return!Pt(n)||!n._started?!1:!!(Ke(s)&&Ur(s)>0||Pi(n)>0)}function cn(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function pr(n){if(!Pt(n))return;let s=n._controlledReadableStream;n._closeRequested=!0,n._queue.length===0&&(cn(n),mr(s))}function fn(n,s){if(!Pt(n))return;let l=n._controlledReadableStream;if(Ke(l)&&Ur(l)>0)ci(l,s,!1);else{let c;try{c=n._strategySizeAlgorithm(s)}catch(b){throw Ye(n,b),b}try{hi(n,s,c)}catch(b){throw Ye(n,b),b}}dr(n)}function Ye(n,s){let l=n._controlledReadableStream;l._state==="readable"&&(Ve(n),cn(n),Do(l,s))}function Pi(n){let s=n._controlledReadableStream._state;return s==="errored"?null:s==="closed"?0:n._strategyHWM-n._queueTotalSize}function Kf(n){return!Io(n)}function Pt(n){let s=n._controlledReadableStream._state;return!n._closeRequested&&s==="readable"}function Lo(n,s,l,c,b,w,E){s._controlledReadableStream=n,s._queue=void 0,s._queueTotalSize=void 0,Ve(s),s._started=!1,s._closeRequested=!1,s._pullAgain=!1,s._pulling=!1,s._strategySizeAlgorithm=E,s._strategyHWM=w,s._pullAlgorithm=c,s._cancelAlgorithm=b,n._readableStreamController=s;let $=l();R(g($),()=>{s._started=!0,dr(s)},F=>{Ye(s,F)})}function Zf(n,s,l,c){let b=Object.create(Ot.prototype),w=()=>{},E=()=>g(void 0),$=()=>g(void 0);s.start!==void 0&&(w=()=>s.start(b)),s.pull!==void 0&&(E=()=>s.pull(b)),s.cancel!==void 0&&($=F=>s.cancel(F)),Lo(n,b,w,E,$,l,c)}function hn(n){return new TypeError(`ReadableStreamDefaultController.prototype.${n} can only be used on a ReadableStreamDefaultController`)}function Jf(n,s){return lt(n._readableStreamController)?th(n):eh(n)}function eh(n,s){let l=vt(n),c=!1,b=!1,w=!1,E=!1,$,F,k,j,U,K=y(le=>{U=le});function $e(){return c?(b=!0,g(void 0)):(c=!0,nr(l,{_chunkSteps:he=>{A(()=>{b=!1;let Se=he,ze=he;w||fn(k._readableStreamController,Se),E||fn(j._readableStreamController,ze),c=!1,b&&$e()})},_closeSteps:()=>{c=!1,w||pr(k._readableStreamController),E||pr(j._readableStreamController),(!w||!E)&&U(void 0)},_errorSteps:()=>{c=!1}}),g(void 0))}function It(le){if(w=!0,$=le,E){let he=ir([$,F]),Se=Te(n,he);U(Se)}return K}function Ze(le){if(E=!0,F=le,w){let he=ir([$,F]),Se=Te(n,he);U(Se)}return K}function Ne(){}return k=Ii(Ne,$e,It),j=Ii(Ne,$e,Ze),v(l._closedPromise,le=>{Ye(k._readableStreamController,le),Ye(j._readableStreamController,le),(!w||!E)&&U(void 0)}),[k,j]}function th(n){let s=vt(n),l=!1,c=!1,b=!1,w=!1,E=!1,$,F,k,j,U,K=y(x=>{U=x});function $e(x){v(x._closedPromise,z=>{x===s&&(Ae(k._readableStreamController,z),Ae(j._readableStreamController,z),(!w||!E)&&U(void 0))})}function It(){ct(s)&&(oe(s),s=vt(n),$e(s)),nr(s,{_chunkSteps:z=>{A(()=>{c=!1,b=!1;let G=z,ge=z;if(!w&&!E)try{ge=Zs(z)}catch(Lt){Ae(k._readableStreamController,Lt),Ae(j._readableStreamController,Lt),U(Te(n,Lt));return}w||Xr(k._readableStreamController,G),E||Xr(j._readableStreamController,ge),l=!1,c?Ne():b&&le()})},_closeSteps:()=>{l=!1,w||or(k._readableStreamController),E||or(j._readableStreamController),k._readableStreamController._pendingPullIntos.length>0&&Qr(k._readableStreamController,0),j._readableStreamController._pendingPullIntos.length>0&&Qr(j._readableStreamController,0),(!w||!E)&&U(void 0)},_errorSteps:()=>{l=!1}})}function Ze(x,z){Ge(s)&&(oe(s),s=lo(n),$e(s));let G=z?j:k,ge=z?k:j;fo(s,x,{_chunkSteps:xt=>{A(()=>{c=!1,b=!1;let qt=z?E:w;if(z?w:E)qt||Kr(G._readableStreamController,xt);else{let Yo;try{Yo=Zs(xt)}catch(xi){Ae(G._readableStreamController,xi),Ae(ge._readableStreamController,xi),U(Te(n,xi));return}qt||Kr(G._readableStreamController,xt),Xr(ge._readableStreamController,Yo)}l=!1,c?Ne():b&&le()})},_closeSteps:xt=>{l=!1;let qt=z?E:w,wn=z?w:E;qt||or(G._readableStreamController),wn||or(ge._readableStreamController),xt!==void 0&&(qt||Kr(G._readableStreamController,xt),!wn&&ge._readableStreamController._pendingPullIntos.length>0&&Qr(ge._readableStreamController,0)),(!qt||!wn)&&U(void 0)},_errorSteps:()=>{l=!1}})}function Ne(){if(l)return c=!0,g(void 0);l=!0;let x=gi(k._readableStreamController);return x===null?It():Ze(x._view,!1),g(void 0)}function le(){if(l)return b=!0,g(void 0);l=!0;let x=gi(j._readableStreamController);return x===null?It():Ze(x._view,!0),g(void 0)}function he(x){if(w=!0,$=x,E){let z=ir([$,F]),G=Te(n,z);U(G)}return K}function Se(x){if(E=!0,F=x,w){let z=ir([$,F]),G=Te(n,z);U(G)}return K}function ze(){}return k=qo(ze,Ne,he),j=qo(ze,le,Se),$e(s),[k,j]}function rh(n,s){Be(n,s);let l=n,c=l==null?void 0:l.autoAllocateChunkSize,b=l==null?void 0:l.cancel,w=l==null?void 0:l.pull,E=l==null?void 0:l.start,$=l==null?void 0:l.type;return{autoAllocateChunkSize:c===void 0?void 0:Ws(c,`${s} has member 'autoAllocateChunkSize' that`),cancel:b===void 0?void 0:nh(b,l,`${s} has member 'cancel' that`),pull:w===void 0?void 0:ih(w,l,`${s} has member 'pull' that`),start:E===void 0?void 0:sh(E,l,`${s} has member 'start' that`),type:$===void 0?void 0:oh($,`${s} has member 'type' that`)}}function nh(n,s,l){return ve(n,l),c=>I(n,s,[c])}function ih(n,s,l){return ve(n,l),c=>I(n,s,[c])}function sh(n,s,l){return ve(n,l),c=>q(n,s,[c])}function oh(n,s){if(n=`${n}`,n!=="bytes")throw new TypeError(`${s} '${n}' is not a valid enumeration value for ReadableStreamType`);return n}function ah(n,s){Be(n,s);let l=n==null?void 0:n.mode;return{mode:l===void 0?void 0:lh(l,`${s} has member 'mode' that`)}}function lh(n,s){if(n=`${n}`,n!=="byob")throw new TypeError(`${s} '${n}' is not a valid enumeration value for ReadableStreamReaderMode`);return n}function uh(n,s){return Be(n,s),{preventCancel:!!(n==null?void 0:n.preventCancel)}}function xo(n,s){Be(n,s);let l=n==null?void 0:n.preventAbort,c=n==null?void 0:n.preventCancel,b=n==null?void 0:n.preventClose,w=n==null?void 0:n.signal;return w!==void 0&&ch(w,`${s} has member 'signal' that`),{preventAbort:!!l,preventCancel:!!c,preventClose:!!b,signal:w}}function ch(n,s){if(!Ef(n))throw new TypeError(`${s} is not an AbortSignal.`)}function fh(n,s){Be(n,s);let l=n==null?void 0:n.readable;ai(l,"readable","ReadableWritablePair"),ui(l,`${s} has member 'readable' that`);let c=n==null?void 0:n.writable;return ai(c,"writable","ReadableWritablePair"),ho(c,`${s} has member 'writable' that`),{readable:l,writable:c}}class Xe{constructor(s={},l={}){s===void 0?s=null:zs(s,"First parameter");let c=en(l,"Second parameter"),b=rh(s,"First parameter");if(Li(this),b.type==="bytes"){if(c.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let w=ur(c,0);df(this,b,w)}else{let w=Jr(c),E=ur(c,1);Zf(this,b,E,w)}}get locked(){if(!Qe(this))throw dt("locked");return Ke(this)}cancel(s=void 0){return Qe(this)?Ke(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Te(this,s):p(dt("cancel"))}getReader(s=void 0){if(!Qe(this))throw dt("getReader");return ah(s,"First parameter").mode===void 0?vt(this):lo(this)}pipeThrough(s,l={}){if(!Qe(this))throw dt("pipeThrough");Fe(s,1,"pipeThrough");let c=fh(s,"First parameter"),b=xo(l,"Second parameter");if(Ke(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if($t(c.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let w=Po(this,c.writable,b.preventClose,b.preventAbort,b.preventCancel,b.signal);return D(w),c.readable}pipeTo(s,l={}){if(!Qe(this))return p(dt("pipeTo"));if(s===void 0)return p("Parameter 1 is required in 'pipeTo'.");if(!Tt(s))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let c;try{c=xo(l,"Second parameter")}catch(b){return p(b)}return Ke(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):$t(s)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Po(this,s,c.preventClose,c.preventAbort,c.preventCancel,c.signal)}tee(){if(!Qe(this))throw dt("tee");let s=Jf(this);return ir(s)}values(s=void 0){if(!Qe(this))throw dt("values");let l=uh(s,"First parameter");return of(this,l.preventCancel)}}Object.defineProperties(Xe.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Xe.prototype,e.toStringTag,{value:"ReadableStream",configurable:!0}),typeof e.asyncIterator=="symbol"&&Object.defineProperty(Xe.prototype,e.asyncIterator,{value:Xe.prototype.values,writable:!0,configurable:!0});function Ii(n,s,l,c=1,b=()=>1){let w=Object.create(Xe.prototype);Li(w);let E=Object.create(Ot.prototype);return Lo(w,E,n,s,l,c,b),w}function qo(n,s,l){let c=Object.create(Xe.prototype);Li(c);let b=Object.create(At.prototype);return ao(c,b,n,s,l,0,void 0),c}function Li(n){n._state="readable",n._reader=void 0,n._storedError=void 0,n._disturbed=!1}function Qe(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readableStreamController")?!1:n instanceof Xe}function Ke(n){return n._reader!==void 0}function Te(n,s){if(n._disturbed=!0,n._state==="closed")return g(void 0);if(n._state==="errored")return p(n._storedError);mr(n);let l=n._reader;l!==void 0&&ct(l)&&(l._readIntoRequests.forEach(b=>{b._closeSteps(void 0)}),l._readIntoRequests=new W);let c=n._readableStreamController[si](s);return P(c,t)}function mr(n){n._state="closed";let s=n._reader;s!==void 0&&(Ds(s),Ge(s)&&(s._readRequests.forEach(l=>{l._closeSteps()}),s._readRequests=new W))}function Do(n,s){n._state="errored",n._storedError=s;let l=n._reader;l!==void 0&&(ii(l,s),Ge(l)?(l._readRequests.forEach(c=>{c._errorSteps(s)}),l._readRequests=new W):(l._readIntoRequests.forEach(c=>{c._errorSteps(s)}),l._readIntoRequests=new W))}function dt(n){return new TypeError(`ReadableStream.prototype.${n} can only be used on a ReadableStream`)}function Bo(n,s){Be(n,s);let l=n==null?void 0:n.highWaterMark;return ai(l,"highWaterMark","QueuingStrategyInit"),{highWaterMark:li(l)}}let Fo=n=>n.byteLength;try{Object.defineProperty(Fo,"name",{value:"size",configurable:!0})}catch{}class dn{constructor(s){Fe(s,1,"ByteLengthQueuingStrategy"),s=Bo(s,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=s.highWaterMark}get highWaterMark(){if(!zo(this))throw No("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!zo(this))throw No("size");return Fo}}Object.defineProperties(dn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(dn.prototype,e.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function No(n){return new TypeError(`ByteLengthQueuingStrategy.prototype.${n} can only be used on a ByteLengthQueuingStrategy`)}function zo(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_byteLengthQueuingStrategyHighWaterMark")?!1:n instanceof dn}let ko=()=>1;try{Object.defineProperty(ko,"name",{value:"size",configurable:!0})}catch{}class pn{constructor(s){Fe(s,1,"CountQueuingStrategy"),s=Bo(s,"First parameter"),this._countQueuingStrategyHighWaterMark=s.highWaterMark}get highWaterMark(){if(!jo(this))throw Wo("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!jo(this))throw Wo("size");return ko}}Object.defineProperties(pn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(pn.prototype,e.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Wo(n){return new TypeError(`CountQueuingStrategy.prototype.${n} can only be used on a CountQueuingStrategy`)}function jo(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_countQueuingStrategyHighWaterMark")?!1:n instanceof pn}function hh(n,s){Be(n,s);let l=n==null?void 0:n.flush,c=n==null?void 0:n.readableType,b=n==null?void 0:n.start,w=n==null?void 0:n.transform,E=n==null?void 0:n.writableType;return{flush:l===void 0?void 0:dh(l,n,`${s} has member 'flush' that`),readableType:c,start:b===void 0?void 0:ph(b,n,`${s} has member 'start' that`),transform:w===void 0?void 0:mh(w,n,`${s} has member 'transform' that`),writableType:E}}function dh(n,s,l){return ve(n,l),c=>I(n,s,[c])}function ph(n,s,l){return ve(n,l),c=>q(n,s,[c])}function mh(n,s,l){return ve(n,l),(c,b)=>I(n,s,[c,b])}class mn{constructor(s={},l={},c={}){s===void 0&&(s=null);let b=en(l,"Second parameter"),w=en(c,"Third parameter"),E=hh(s,"First parameter");if(E.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(E.writableType!==void 0)throw new RangeError("Invalid writableType specified");let $=ur(w,0),F=Jr(w),k=ur(b,1),j=Jr(b),U,K=y($e=>{U=$e});gh(this,K,k,j,$,F),yh(this,E),E.start!==void 0?U(E.start(this._transformStreamController)):U(void 0)}get readable(){if(!Uo(this))throw Vo("readable");return this._readable}get writable(){if(!Uo(this))throw Vo("writable");return this._writable}}Object.defineProperties(mn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(mn.prototype,e.toStringTag,{value:"TransformStream",configurable:!0});function gh(n,s,l,c,b,w){function E(){return s}function $(K){return wh(n,K)}function F(K){return Eh(n,K)}function k(){return Rh(n)}n._writable=Af(E,$,k,F,l,c);function j(){return vh(n)}function U(K){return bn(n,K),g(void 0)}n._readable=Ii(E,j,U,b,w),n._backpressure=void 0,n._backpressureChangePromise=void 0,n._backpressureChangePromise_resolve=void 0,yn(n,!0),n._transformStreamController=void 0}function Uo(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_transformStreamController")?!1:n instanceof mn}function gn(n,s){Ye(n._readable._readableStreamController,s),bn(n,s)}function bn(n,s){Mo(n._transformStreamController),vi(n._writable._writableStreamController,s),n._backpressure&&yn(n,!1)}function yn(n,s){n._backpressureChangePromise!==void 0&&n._backpressureChangePromise_resolve(),n._backpressureChangePromise=y(l=>{n._backpressureChangePromise_resolve=l}),n._backpressure=s}class gr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Sn(this))throw _n("desiredSize");let s=this._controlledTransformStream._readable._readableStreamController;return Pi(s)}enqueue(s=void 0){if(!Sn(this))throw _n("enqueue");Ho(this,s)}error(s=void 0){if(!Sn(this))throw _n("error");Sh(this,s)}terminate(){if(!Sn(this))throw _n("terminate");_h(this)}}Object.defineProperties(gr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(gr.prototype,e.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Sn(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledTransformStream")?!1:n instanceof gr}function bh(n,s,l,c){s._controlledTransformStream=n,n._transformStreamController=s,s._transformAlgorithm=l,s._flushAlgorithm=c}function yh(n,s){let l=Object.create(gr.prototype),c=w=>{try{return Ho(l,w),g(void 0)}catch(E){return p(E)}},b=()=>g(void 0);s.transform!==void 0&&(c=w=>s.transform(w,l)),s.flush!==void 0&&(b=()=>s.flush(l)),bh(n,l,c,b)}function Mo(n){n._transformAlgorithm=void 0,n._flushAlgorithm=void 0}function Ho(n,s){let l=n._controlledTransformStream,c=l._readable._readableStreamController;if(!Pt(c))throw new TypeError("Readable side is not in a state that permits enqueue");try{fn(c,s)}catch(w){throw bn(l,w),l._readable._storedError}Kf(c)!==l._backpressure&&yn(l,!0)}function Sh(n,s){gn(n._controlledTransformStream,s)}function Go(n,s){let l=n._transformAlgorithm(s);return P(l,void 0,c=>{throw gn(n._controlledTransformStream,c),c})}function _h(n){let s=n._controlledTransformStream,l=s._readable._readableStreamController;pr(l);let c=new TypeError("TransformStream terminated");bn(s,c)}function wh(n,s){let l=n._transformStreamController;if(n._backpressure){let c=n._backpressureChangePromise;return P(c,()=>{let b=n._writable;if(b._state==="erroring")throw b._storedError;return Go(l,s)})}return Go(l,s)}function Eh(n,s){return gn(n,s),g(void 0)}function Rh(n){let s=n._readable,l=n._transformStreamController,c=l._flushAlgorithm();return Mo(l),P(c,()=>{if(s._state==="errored")throw s._storedError;pr(s._readableStreamController)},b=>{throw gn(n,b),s._storedError})}function vh(n){return yn(n,!1),n._backpressureChangePromise}function _n(n){return new TypeError(`TransformStreamDefaultController.prototype.${n} can only be used on a TransformStreamDefaultController`)}function Vo(n){return new TypeError(`TransformStream.prototype.${n} can only be used on a TransformStream`)}r.ByteLengthQueuingStrategy=dn,r.CountQueuingStrategy=pn,r.ReadableByteStreamController=At,r.ReadableStream=Xe,r.ReadableStreamBYOBReader=lr,r.ReadableStreamBYOBRequest=sr,r.ReadableStreamDefaultController=Ot,r.ReadableStreamDefaultReader=rr,r.TransformStream=mn,r.TransformStreamDefaultController=gr,r.WritableStream=cr,r.WritableStreamDefaultController=Ct,r.WritableStreamDefaultWriter=fr,Object.defineProperty(r,"__esModule",{value:!0})})});var fa=T(()=>{if(!globalThis.ReadableStream)try{let r=be("node:process"),{emitWarning:e}=r;try{r.emitWarning=()=>{},Object.assign(globalThis,be("node:stream/web")),r.emitWarning=e}catch(t){throw r.emitWarning=e,t}}catch{Object.assign(globalThis,ca())}try{let{Blob:r}=be("buffer");r&&!r.prototype.stream&&(r.prototype.stream=function(t){let i=0,o=this;return new ReadableStream({type:"bytes",async pull(a){let h=await o.slice(i,Math.min(o.size,i+65536)).arrayBuffer();i+=h.byteLength,a.enqueue(new Uint8Array(h)),i===o.size&&a.close()}})})}catch{}});async function*Ui(r,e=!0){for(let t of r)if("stream"in t)yield*t.stream();else if(ArrayBuffer.isView(t))if(e){let i=t.byteOffset,o=t.byteOffset+t.byteLength;for(;i!==o;){let a=Math.min(o-i,ha),u=t.buffer.slice(i,i+a);i+=u.byteLength,yield new Uint8Array(u)}}else yield t;else{let i=0,o=t;for(;i!==o.size;){let u=await o.slice(i,Math.min(o.size,i+ha)).arrayBuffer();i+=u.byteLength,yield new Uint8Array(u)}}}var Fb,ha,da,jh,ke,_r=br(()=>{Fb=Ce(fa(),1);ha=65536;da=class Mi{#e=[];#t="";#r=0;#n="transparent";constructor(e=[],t={}){if(typeof e!="object"||e===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof e[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof t!="object"&&typeof t!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");t===null&&(t={});let i=new TextEncoder;for(let a of e){let u;ArrayBuffer.isView(a)?u=new Uint8Array(a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength)):a instanceof ArrayBuffer?u=new Uint8Array(a.slice(0)):a instanceof Mi?u=a:u=i.encode(`${a}`),this.#r+=ArrayBuffer.isView(u)?u.byteLength:u.size,this.#e.push(u)}this.#n=`${t.endings===void 0?"transparent":t.endings}`;let o=t.type===void 0?"":String(t.type);this.#t=/^[\x20-\x7E]*$/.test(o)?o:""}get size(){return this.#r}get type(){return this.#t}async text(){let e=new TextDecoder,t="";for await(let i of Ui(this.#e,!1))t+=e.decode(i,{stream:!0});return t+=e.decode(),t}async arrayBuffer(){let e=new Uint8Array(this.size),t=0;for await(let i of Ui(this.#e,!1))e.set(i,t),t+=i.length;return e.buffer}stream(){let e=Ui(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(t){let i=await e.next();i.done?t.close():t.enqueue(i.value)},async cancel(){await e.return()}})}slice(e=0,t=this.size,i=""){let{size:o}=this,a=e<0?Math.max(o+e,0):Math.min(e,o),u=t<0?Math.max(o+t,0):Math.min(t,o),h=Math.max(u-a,0),d=this.#e,f=[],m=0;for(let g of d){if(m>=h)break;let p=ArrayBuffer.isView(g)?g.byteLength:g.size;if(a&&p<=a)a-=p,u-=p;else{let _;ArrayBuffer.isView(g)?(_=g.subarray(a,Math.min(p,u)),m+=_.byteLength):(_=g.slice(a,Math.min(p,u)),m+=_.size),u-=p,f.push(_),a=0}}let y=new Mi([],{type:String(i).toLowerCase()});return y.#r=h,y.#e=f,y}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}};Object.defineProperties(da.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});jh=da,ke=jh});var Uh,Mh,Bt,Hi=br(()=>{_r();Uh=class extends ke{#e=0;#t="";constructor(e,t,i={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,i),i===null&&(i={});let o=i.lastModified===void 0?Date.now():Number(i.lastModified);Number.isNaN(o)||(this.#e=o),this.#t=String(t)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof ke&&/^(File)$/.test(e[Symbol.toStringTag])}},Mh=Uh,Bt=Mh});function ga(r,e=ke){var t=`${pa()}${pa()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),i=[],o=`--${t}\r
4
+ Content-Disposition: form-data; name="`;return r.forEach((a,u)=>typeof a=="string"?i.push(o+Gi(u)+`"\r
5
5
  \r
6
6
  ${a.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
7
7
  `)}\r
8
- `):i.push(o+Hi(u)+`"; filename="${Hi(a.name,1)}"\r
8
+ `):i.push(o+Gi(u)+`"; filename="${Gi(a.name,1)}"\r
9
9
  Content-Type: ${a.type||"application/octet-stream"}\r
10
10
  \r
11
11
  `,a,`\r
12
- `)),i.push(`--${t}--`),new e(i,{type:"multipart/form-data; boundary="+t})}var _r,Hh,Gh,pa,Vh,ma,Hi,pt,mt,vn=gr(()=>{Sr();Mi();({toStringTag:_r,iterator:Hh,hasInstance:Gh}=Symbol),pa=Math.random,Vh="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),ma=(r,e,t)=>(r+="",/^(Blob|File)$/.test(e&&e[_r])?[(t=t!==void 0?t+"":e[_r]=="File"?e.name:"blob",r),e.name!==t||e[_r]=="blob"?new Bt([e],t,e):e]:[r,e+""]),Hi=(r,e)=>(e?r:r.replace(/\r?\n|\r/g,`\r
13
- `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),pt=(r,e,t)=>{if(e.length<t)throw new TypeError(`Failed to execute '${r}' on 'FormData': ${t} arguments required, but only ${e.length} present.`)},mt=class{#e=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[_r](){return"FormData"}[Hh](){return this.entries()}static[Gh](e){return e&&typeof e=="object"&&e[_r]==="FormData"&&!Vh.some(t=>typeof e[t]!="function")}append(...e){pt("append",arguments,2),this.#e.push(ma(...e))}delete(e){pt("delete",arguments,1),e+="",this.#e=this.#e.filter(([t])=>t!==e)}get(e){pt("get",arguments,1),e+="";for(var t=this.#e,i=t.length,o=0;o<i;o++)if(t[o][0]===e)return t[o][1];return null}getAll(e,t){return pt("getAll",arguments,1),t=[],e+="",this.#e.forEach(i=>i[0]===e&&t.push(i[1])),t}has(e){return pt("has",arguments,1),e+="",this.#e.some(t=>t[0]===e)}forEach(e,t){pt("forEach",arguments,1);for(var[i,o]of this)e.call(t,o,i,this)}set(...e){pt("set",arguments,2);var t=[],i=!0;e=ma(...e),this.#e.forEach(o=>{o[0]===e[0]?i&&(i=!t.push(e)):t.push(o)}),i&&t.push(e),this.#e=t}*entries(){yield*this.#e}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}}});var wa=T((Qb,_a)=>{if(!globalThis.DOMException)try{let{MessageChannel:r}=be("worker_threads"),e=new r().port1,t=new ArrayBuffer;e.postMessage(t,[t,t])}catch(r){r.constructor.name==="DOMException"&&(globalThis.DOMException=r.constructor)}_a.exports=globalThis.DOMException});import{statSync as Zb,createReadStream as Yh,promises as Xh}from"node:fs";var Ea,Qh,Tn,Vi=gr(()=>{Ea=Ce(wa(),1);Mi();Sr();({stat:Qh}=Xh),Tn=class{#e;#t;constructor(e){this.#e=e.path,this.#t=e.start,this.size=e.size,this.lastModified=e.lastModified}slice(e,t){return new Tn({path:this.#e,lastModified:this.lastModified,size:t-e,start:this.#t+e})}async*stream(){let{mtimeMs:e}=await Qh(this.#e);if(e>this.lastModified)throw new Ea.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*Yh(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var va={};Ph(va,{toFormData:()=>nd});function rd(r){let e=r.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let t=e[2]||e[3]||"",i=t.slice(t.lastIndexOf("\\")+1);return i=i.replace(/%22/g,'"'),i=i.replace(/&#(\d{4});/g,(o,a)=>String.fromCharCode(a)),i}async function nd(r,e){if(!/multipart/i.test(e))throw new TypeError("Failed to fetch");let t=e.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!t)throw new TypeError("no or bad content-type header, no multipart boundary");let i=new Yi(t[1]||t[2]),o,a,u,h,d,f,m=[],y=new mt,g=v=>{u+=_.decode(v,{stream:!0})},p=v=>{m.push(v)},S=()=>{let v=new Bt(m,f,{type:d});y.append(h,v)},R=()=>{y.append(h,u)},_=new TextDecoder("utf-8");_.decode(),i.onPartBegin=function(){i.onPartData=g,i.onPartEnd=R,o="",a="",u="",h="",d="",f=null,m.length=0},i.onHeaderField=function(v){o+=_.decode(v,{stream:!0})},i.onHeaderValue=function(v){a+=_.decode(v,{stream:!0})},i.onHeaderEnd=function(){if(a+=_.decode(),o=o.toLowerCase(),o==="content-disposition"){let v=a.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);v&&(h=v[2]||v[3]||""),f=rd(a),f&&(i.onPartData=p,i.onPartEnd=S)}else o==="content-type"&&(d=a);a="",o=""};for await(let v of r)i.write(v);return i.end(),y}var Le,V,Ra,et,$n,Cn,Kh,Er,Zh,Jh,ed,td,gt,Yi,Aa=gr(()=>{Vi();vn();Le=0,V={START_BOUNDARY:Le++,HEADER_FIELD_START:Le++,HEADER_FIELD:Le++,HEADER_VALUE_START:Le++,HEADER_VALUE:Le++,HEADER_VALUE_ALMOST_DONE:Le++,HEADERS_ALMOST_DONE:Le++,PART_DATA_START:Le++,PART_DATA:Le++,END:Le++},Ra=1,et={PART_BOUNDARY:Ra,LAST_BOUNDARY:Ra*=2},$n=10,Cn=13,Kh=32,Er=45,Zh=58,Jh=97,ed=122,td=r=>r|32,gt=()=>{},Yi=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=gt,this.onHeaderField=gt,this.onHeadersEnd=gt,this.onHeaderValue=gt,this.onPartBegin=gt,this.onPartData=gt,this.onPartEnd=gt,this.boundaryChars={},e=`\r
14
- --`+e;let t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i),this.boundaryChars[t[i]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=V.START_BOUNDARY}write(e){let t=0,i=e.length,o=this.index,{lookbehind:a,boundary:u,boundaryChars:h,index:d,state:f,flags:m}=this,y=this.boundary.length,g=y-1,p=e.length,S,R,_=A=>{this[A+"Mark"]=t},v=A=>{delete this[A+"Mark"]},P=(A,q,I,L)=>{(q===void 0||q!==I)&&this[A](L&&L.subarray(q,I))},D=(A,q)=>{let I=A+"Mark";I in this&&(q?(P(A,this[I],t,e),delete this[I]):(P(A,this[I],e.length,e),this[I]=0))};for(t=0;t<i;t++)switch(S=e[t],f){case V.START_BOUNDARY:if(d===u.length-2){if(S===Er)m|=et.LAST_BOUNDARY;else if(S!==Cn)return;d++;break}else if(d-1===u.length-2){if(m&et.LAST_BOUNDARY&&S===Er)f=V.END,m=0;else if(!(m&et.LAST_BOUNDARY)&&S===$n)d=0,P("onPartBegin"),f=V.HEADER_FIELD_START;else return;break}S!==u[d+2]&&(d=-2),S===u[d+2]&&d++;break;case V.HEADER_FIELD_START:f=V.HEADER_FIELD,_("onHeaderField"),d=0;case V.HEADER_FIELD:if(S===Cn){v("onHeaderField"),f=V.HEADERS_ALMOST_DONE;break}if(d++,S===Er)break;if(S===Zh){if(d===1)return;D("onHeaderField",!0),f=V.HEADER_VALUE_START;break}if(R=td(S),R<Jh||R>ed)return;break;case V.HEADER_VALUE_START:if(S===Kh)break;_("onHeaderValue"),f=V.HEADER_VALUE;case V.HEADER_VALUE:S===Cn&&(D("onHeaderValue",!0),P("onHeaderEnd"),f=V.HEADER_VALUE_ALMOST_DONE);break;case V.HEADER_VALUE_ALMOST_DONE:if(S!==$n)return;f=V.HEADER_FIELD_START;break;case V.HEADERS_ALMOST_DONE:if(S!==$n)return;P("onHeadersEnd"),f=V.PART_DATA_START;break;case V.PART_DATA_START:f=V.PART_DATA,_("onPartData");case V.PART_DATA:if(o=d,d===0){for(t+=g;t<p&&!(e[t]in h);)t+=y;t-=g,S=e[t]}if(d<u.length)u[d]===S?(d===0&&D("onPartData",!0),d++):d=0;else if(d===u.length)d++,S===Cn?m|=et.PART_BOUNDARY:S===Er?m|=et.LAST_BOUNDARY:d=0;else if(d-1===u.length)if(m&et.PART_BOUNDARY){if(d=0,S===$n){m&=~et.PART_BOUNDARY,P("onPartEnd"),P("onPartBegin"),f=V.HEADER_FIELD_START;break}}else m&et.LAST_BOUNDARY&&S===Er?(P("onPartEnd"),f=V.END,m=0):d=0;if(d>0)a[d-1]=S;else if(o>0){let A=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);P("onPartData",0,o,A),o=0,_("onPartData"),t--}break;case V.END:break;default:throw new Error(`Unexpected state entered: ${f}`)}D("onHeaderField"),D("onHeaderValue"),D("onPartData"),this.index=d,this.state=f,this.flags=m}end(){if(this.state===V.HEADER_FIELD_START&&this.index===0||this.state===V.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==V.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var Ua=T((rS,ja)=>{function bd(r){return Buffer.from(r,"base64").toString("utf8")}function yd(r){return Buffer.from(r,"utf8").toString("base64")}ja.exports={decodeBase64:bd,encodeBase64:yd}});var Va=T(bt=>{bt.parse=bt.decode=Sd;bt.stringify=bt.encode=Ma;bt.safe=kt;bt.unsafe=Bn;var Zi=typeof process<"u"&&process.platform==="win32"?`\r
12
+ `)),i.push(`--${t}--`),new e(i,{type:"multipart/form-data; boundary="+t})}var wr,Hh,Gh,pa,Vh,ma,Gi,pt,mt,vn=br(()=>{_r();Hi();({toStringTag:wr,iterator:Hh,hasInstance:Gh}=Symbol),pa=Math.random,Vh="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),ma=(r,e,t)=>(r+="",/^(Blob|File)$/.test(e&&e[wr])?[(t=t!==void 0?t+"":e[wr]=="File"?e.name:"blob",r),e.name!==t||e[wr]=="blob"?new Bt([e],t,e):e]:[r,e+""]),Gi=(r,e)=>(e?r:r.replace(/\r?\n|\r/g,`\r
13
+ `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),pt=(r,e,t)=>{if(e.length<t)throw new TypeError(`Failed to execute '${r}' on 'FormData': ${t} arguments required, but only ${e.length} present.`)},mt=class{#e=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[wr](){return"FormData"}[Hh](){return this.entries()}static[Gh](e){return e&&typeof e=="object"&&e[wr]==="FormData"&&!Vh.some(t=>typeof e[t]!="function")}append(...e){pt("append",arguments,2),this.#e.push(ma(...e))}delete(e){pt("delete",arguments,1),e+="",this.#e=this.#e.filter(([t])=>t!==e)}get(e){pt("get",arguments,1),e+="";for(var t=this.#e,i=t.length,o=0;o<i;o++)if(t[o][0]===e)return t[o][1];return null}getAll(e,t){return pt("getAll",arguments,1),t=[],e+="",this.#e.forEach(i=>i[0]===e&&t.push(i[1])),t}has(e){return pt("has",arguments,1),e+="",this.#e.some(t=>t[0]===e)}forEach(e,t){pt("forEach",arguments,1);for(var[i,o]of this)e.call(t,o,i,this)}set(...e){pt("set",arguments,2);var t=[],i=!0;e=ma(...e),this.#e.forEach(o=>{o[0]===e[0]?i&&(i=!t.push(e)):t.push(o)}),i&&t.push(e),this.#e=t}*entries(){yield*this.#e}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}}});var wa=T((Qb,_a)=>{if(!globalThis.DOMException)try{let{MessageChannel:r}=be("worker_threads"),e=new r().port1,t=new ArrayBuffer;e.postMessage(t,[t,t])}catch(r){r.constructor.name==="DOMException"&&(globalThis.DOMException=r.constructor)}_a.exports=globalThis.DOMException});import{statSync as Zb,createReadStream as Yh,promises as Xh}from"node:fs";var Ea,Qh,Tn,Yi=br(()=>{Ea=Ce(wa(),1);Hi();_r();({stat:Qh}=Xh),Tn=class{#e;#t;constructor(e){this.#e=e.path,this.#t=e.start,this.size=e.size,this.lastModified=e.lastModified}slice(e,t){return new Tn({path:this.#e,lastModified:this.lastModified,size:t-e,start:this.#t+e})}async*stream(){let{mtimeMs:e}=await Qh(this.#e);if(e>this.lastModified)throw new Ea.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*Yh(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var va={};Ph(va,{toFormData:()=>nd});function rd(r){let e=r.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let t=e[2]||e[3]||"",i=t.slice(t.lastIndexOf("\\")+1);return i=i.replace(/%22/g,'"'),i=i.replace(/&#(\d{4});/g,(o,a)=>String.fromCharCode(a)),i}async function nd(r,e){if(!/multipart/i.test(e))throw new TypeError("Failed to fetch");let t=e.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!t)throw new TypeError("no or bad content-type header, no multipart boundary");let i=new Xi(t[1]||t[2]),o,a,u,h,d,f,m=[],y=new mt,g=v=>{u+=S.decode(v,{stream:!0})},p=v=>{m.push(v)},_=()=>{let v=new Bt(m,f,{type:d});y.append(h,v)},R=()=>{y.append(h,u)},S=new TextDecoder("utf-8");S.decode(),i.onPartBegin=function(){i.onPartData=g,i.onPartEnd=R,o="",a="",u="",h="",d="",f=null,m.length=0},i.onHeaderField=function(v){o+=S.decode(v,{stream:!0})},i.onHeaderValue=function(v){a+=S.decode(v,{stream:!0})},i.onHeaderEnd=function(){if(a+=S.decode(),o=o.toLowerCase(),o==="content-disposition"){let v=a.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);v&&(h=v[2]||v[3]||""),f=rd(a),f&&(i.onPartData=p,i.onPartEnd=_)}else o==="content-type"&&(d=a);a="",o=""};for await(let v of r)i.write(v);return i.end(),y}var Le,V,Ra,et,$n,Cn,Kh,Rr,Zh,Jh,ed,td,gt,Xi,Aa=br(()=>{Yi();vn();Le=0,V={START_BOUNDARY:Le++,HEADER_FIELD_START:Le++,HEADER_FIELD:Le++,HEADER_VALUE_START:Le++,HEADER_VALUE:Le++,HEADER_VALUE_ALMOST_DONE:Le++,HEADERS_ALMOST_DONE:Le++,PART_DATA_START:Le++,PART_DATA:Le++,END:Le++},Ra=1,et={PART_BOUNDARY:Ra,LAST_BOUNDARY:Ra*=2},$n=10,Cn=13,Kh=32,Rr=45,Zh=58,Jh=97,ed=122,td=r=>r|32,gt=()=>{},Xi=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=gt,this.onHeaderField=gt,this.onHeadersEnd=gt,this.onHeaderValue=gt,this.onPartBegin=gt,this.onPartData=gt,this.onPartEnd=gt,this.boundaryChars={},e=`\r
14
+ --`+e;let t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i),this.boundaryChars[t[i]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=V.START_BOUNDARY}write(e){let t=0,i=e.length,o=this.index,{lookbehind:a,boundary:u,boundaryChars:h,index:d,state:f,flags:m}=this,y=this.boundary.length,g=y-1,p=e.length,_,R,S=A=>{this[A+"Mark"]=t},v=A=>{delete this[A+"Mark"]},P=(A,q,I,L)=>{(q===void 0||q!==I)&&this[A](L&&L.subarray(q,I))},D=(A,q)=>{let I=A+"Mark";I in this&&(q?(P(A,this[I],t,e),delete this[I]):(P(A,this[I],e.length,e),this[I]=0))};for(t=0;t<i;t++)switch(_=e[t],f){case V.START_BOUNDARY:if(d===u.length-2){if(_===Rr)m|=et.LAST_BOUNDARY;else if(_!==Cn)return;d++;break}else if(d-1===u.length-2){if(m&et.LAST_BOUNDARY&&_===Rr)f=V.END,m=0;else if(!(m&et.LAST_BOUNDARY)&&_===$n)d=0,P("onPartBegin"),f=V.HEADER_FIELD_START;else return;break}_!==u[d+2]&&(d=-2),_===u[d+2]&&d++;break;case V.HEADER_FIELD_START:f=V.HEADER_FIELD,S("onHeaderField"),d=0;case V.HEADER_FIELD:if(_===Cn){v("onHeaderField"),f=V.HEADERS_ALMOST_DONE;break}if(d++,_===Rr)break;if(_===Zh){if(d===1)return;D("onHeaderField",!0),f=V.HEADER_VALUE_START;break}if(R=td(_),R<Jh||R>ed)return;break;case V.HEADER_VALUE_START:if(_===Kh)break;S("onHeaderValue"),f=V.HEADER_VALUE;case V.HEADER_VALUE:_===Cn&&(D("onHeaderValue",!0),P("onHeaderEnd"),f=V.HEADER_VALUE_ALMOST_DONE);break;case V.HEADER_VALUE_ALMOST_DONE:if(_!==$n)return;f=V.HEADER_FIELD_START;break;case V.HEADERS_ALMOST_DONE:if(_!==$n)return;P("onHeadersEnd"),f=V.PART_DATA_START;break;case V.PART_DATA_START:f=V.PART_DATA,S("onPartData");case V.PART_DATA:if(o=d,d===0){for(t+=g;t<p&&!(e[t]in h);)t+=y;t-=g,_=e[t]}if(d<u.length)u[d]===_?(d===0&&D("onPartData",!0),d++):d=0;else if(d===u.length)d++,_===Cn?m|=et.PART_BOUNDARY:_===Rr?m|=et.LAST_BOUNDARY:d=0;else if(d-1===u.length)if(m&et.PART_BOUNDARY){if(d=0,_===$n){m&=~et.PART_BOUNDARY,P("onPartEnd"),P("onPartBegin"),f=V.HEADER_FIELD_START;break}}else m&et.LAST_BOUNDARY&&_===Rr?(P("onPartEnd"),f=V.END,m=0):d=0;if(d>0)a[d-1]=_;else if(o>0){let A=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);P("onPartData",0,o,A),o=0,S("onPartData"),t--}break;case V.END:break;default:throw new Error(`Unexpected state entered: ${f}`)}D("onHeaderField"),D("onHeaderValue"),D("onPartData"),this.index=d,this.state=f,this.flags=m}end(){if(this.state===V.HEADER_FIELD_START&&this.index===0||this.state===V.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==V.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var Ua=T((rS,ja)=>{function bd(r){return Buffer.from(r,"base64").toString("utf8")}function yd(r){return Buffer.from(r,"utf8").toString("base64")}ja.exports={decodeBase64:bd,encodeBase64:yd}});var Va=T(bt=>{bt.parse=bt.decode=Sd;bt.stringify=bt.encode=Ma;bt.safe=Wt;bt.unsafe=Bn;var Ji=typeof process<"u"&&process.platform==="win32"?`\r
15
15
  `:`
16
- `;function Ma(r,e){var t=[],i="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var o=e.whitespace?" = ":"=";return Object.keys(r).forEach(function(a,u,h){var d=r[a];d&&Array.isArray(d)?d.forEach(function(f){i+=kt(a+"[]")+o+kt(f)+`
17
- `}):d&&typeof d=="object"?t.push(a):i+=kt(a)+o+kt(d)+Zi}),e.section&&i.length&&(i="["+kt(e.section)+"]"+Zi+i),t.forEach(function(a,u,h){var d=Ha(a).join("\\."),f=(e.section?e.section+".":"")+d,m=Ma(r[a],{section:f,whitespace:e.whitespace});i.length&&m.length&&(i+=Zi),i+=m}),i}function Ha(r){return r.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function Sd(r){var e={},t=e,i=null,o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,a=r.split(/[\r\n]+/g);return a.forEach(function(u,h,d){if(!(!u||u.match(/^\s*[;#]/))){var f=u.match(o);if(f){if(f[1]!==void 0){if(i=Bn(f[1]),i==="__proto__"){t={};return}t=e[i]=e[i]||{};return}var m=Bn(f[2]);if(m!=="__proto__"){var y=f[3]?Bn(f[4]):!0;switch(y){case"true":case"false":case"null":y=JSON.parse(y)}if(m.length>2&&m.slice(-2)==="[]"){if(m=m.substring(0,m.length-2),m==="__proto__")return;t[m]?Array.isArray(t[m])||(t[m]=[t[m]]):t[m]=[]}Array.isArray(t[m])?t[m].push(y):t[m]=y}}}}),Object.keys(e).filter(function(u,h,d){if(!e[u]||typeof e[u]!="object"||Array.isArray(e[u]))return!1;var f=Ha(u),m=e,y=f.pop(),g=y.replace(/\\\./g,".");return f.forEach(function(p,S,R){p!=="__proto__"&&((!m[p]||typeof m[p]!="object")&&(m[p]={}),m=m[p])}),m===e&&g===y?!1:(m[g]=e[u],!0)}).forEach(function(u,h,d){delete e[u]}),e}function Ga(r){return r.charAt(0)==='"'&&r.slice(-1)==='"'||r.charAt(0)==="'"&&r.slice(-1)==="'"}function kt(r){return typeof r!="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&Ga(r)||r!==r.trim()?JSON.stringify(r):r.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Bn(r,e){if(r=(r||"").trim(),Ga(r)){r.charAt(0)==="'"&&(r=r.substr(1,r.length-2));try{r=JSON.parse(r)}catch{}}else{for(var t=!1,i="",o=0,a=r.length;o<a;o++){var u=r.charAt(o);if(t)"\\;#".indexOf(u)!==-1?i+=u:i+="\\"+u,t=!1;else{if(";#".indexOf(u)!==-1)break;u==="\\"?t=!0:i+=u}}return t&&(i+="\\"),i.trim()}return r}});var Qa=T((iS,Xa)=>{"use strict";var Ji=1,Ya=2;function _d(){return""}function wd(r,e,t){return r.slice(e,t).replace(/\S/g," ")}Xa.exports=function(r,e){e=e||{};for(var t,i,o=!1,a=!1,u=0,h="",d=e.whitespace===!1?_d:wd,f=0;f<r.length;f++){if(t=r[f],i=r[f+1],!a&&t==='"'){var m=r[f-1]==="\\"&&r[f-2]!=="\\";m||(o=!o)}if(!o){if(!a&&t+i==="//")h+=r.slice(u,f),u=f,a=Ji,f++;else if(a===Ji&&t+i===`\r
18
- `){f++,a=!1,h+=d(r,u,f),u=f;continue}else if(a===Ji&&t===`
19
- `)a=!1,h+=d(r,u,f),u=f;else if(!a&&t+i==="/*"){h+=r.slice(u,f),u=f,a=Ya,f++;continue}else if(a===Ya&&t+i==="*/"){f++,a=!1,h+=d(r,u,f+1),u=f+1;continue}}}return h+(a?d(r.substr(u)):r.substr(u))}});var Za=T(jt=>{"use strict";var Ka=be("fs"),Ed=Va(),vr=be("path"),Rd=Qa(),vd=jt.parse=function(r){return/^\s*{/.test(r)?JSON.parse(Rd(r)):Ed.parse(r)},Ad=jt.file=function(){var r=[].slice.call(arguments).filter(function(o){return o!=null});for(var e in r)if(typeof r[e]!="string")return;var t=vr.join.apply(null,r),i;try{return Ka.readFileSync(t,"utf-8")}catch{return}},sS=jt.json=function(){var r=Ad.apply(null,arguments);return r?vd(r):null},oS=jt.env=function(r,e){e=e||process.env;var t={},i=r.length;for(var o in e)if(o.toLowerCase().indexOf(r.toLowerCase())===0){for(var a=o.substring(i).split("__"),u;(u=a.indexOf(""))>-1;)a.splice(u,1);var h=t;a.forEach(function(f,m){!f||typeof h!="object"||(m===a.length-1&&(h[f]=e[o]),h[f]===void 0&&(h[f]={}),h=h[f])})}return t},aS=jt.find=function(){var r=vr.join.apply(null,[].slice.call(arguments));function e(t,i){var o=vr.join(t,i);try{return Ka.statSync(o),o}catch{if(vr.dirname(t)!==t)return e(vr.dirname(t),i)}}return e(process.cwd(),r)}});var il=T((uS,nl)=>{"use strict";function el(r){return r instanceof Buffer||r instanceof Date||r instanceof RegExp}function tl(r){if(r instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(r.length):new Buffer(r.length);return r.copy(e),e}else{if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp)return new RegExp(r);throw new Error("Unexpected situation")}}function rl(r){var e=[];return r.forEach(function(t,i){typeof t=="object"&&t!==null?Array.isArray(t)?e[i]=rl(t):el(t)?e[i]=tl(t):e[i]=es({},t):e[i]=t}),e}function Ja(r,e){return e==="__proto__"?void 0:r[e]}var es=nl.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var r=arguments[0],e=Array.prototype.slice.call(arguments,1),t,i,o;return e.forEach(function(a){typeof a!="object"||a===null||Array.isArray(a)||Object.keys(a).forEach(function(u){if(i=Ja(r,u),t=Ja(a,u),t!==r)if(typeof t!="object"||t===null){r[u]=t;return}else if(Array.isArray(t)){r[u]=rl(t);return}else if(el(t)){r[u]=tl(t);return}else if(typeof i!="object"||i===null||Array.isArray(i)){r[u]=es({},t);return}else{r[u]=es(i,t);return}})}),r}});var Fn=T((cS,al)=>{var Ar=Za(),Ut=be("path").join,Td=il(),sl="/etc",ol=process.platform==="win32",Tr=ol?process.env.USERPROFILE:process.env.HOME;al.exports=function(r,e,t,i){if(typeof r!="string")throw new Error("rc(name): name *must* be string");t||(t=ki()(process.argv.slice(2))),e=(typeof e=="string"?Ar.json(e):e)||{},i=i||Ar.parse;var o=Ar.env(r+"_"),a=[e],u=[];function h(d){if(!(u.indexOf(d)>=0)){var f=Ar.file(d);f&&(a.push(i(f)),u.push(d))}}return ol||[Ut(sl,r,"config"),Ut(sl,r+"rc")].forEach(h),Tr&&[Ut(Tr,".config",r,"config"),Ut(Tr,".config",r),Ut(Tr,"."+r,"config"),Ut(Tr,"."+r+"rc")].forEach(h),h(Ar.find("."+r+"rc")),o.config&&h(o.config),t.config&&h(t.config),Td.apply(null,a.concat([o,t,u.length?{configs:u,config:u[u.length-1]}:void 0]))}});var ml=T((fS,pl)=>{var ts=be("url"),hl=Ua(),$d=hl.decodeBase64,Cd=hl.encodeBase64,ll=":_authToken",ul=":_auth",cl=":username",fl=":_password";pl.exports=function(){var r,e;return arguments.length>=2?(r=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?r=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||Fn()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),r=r||e.npmrc.registry,dl(r,e)||Od(e.npmrc)};function dl(r,e){for(var t=ts.parse(r,!1,!0),i;i!=="/"&&t.pathname!==i;){i=t.pathname||"/";var o="//"+t.host+i.replace(/\/$/,""),a=Id(o,e.npmrc);if(a)return a;if(!e.recursive)return/\/$/.test(r)?void 0:dl(ts.resolve(r,"."),e);t.pathname=ts.resolve(Pd(i),"..")||"/"}}function Od(r){if(r._auth){var e=Nn(r._auth);return{token:e,type:"Basic"}}}function Pd(r){return r[r.length-1]==="/"?r:r+"/"}function Id(r,e){var t=Ld(e[r+ll]||e[r+"/"+ll]);if(t)return t;var i=e[r+cl]||e[r+"/"+cl],o=e[r+fl]||e[r+"/"+fl],a=xd(i,o);if(a)return a;var u=qd(e[r+ul]||e[r+"/"+ul]);if(u)return u}function Nn(r){return r.replace(/^\$\{?([^}]*)\}?$/,function(e,t){return process.env[t]})}function Ld(r){if(r){var e=Nn(r);return{token:e,type:"Bearer"}}}function xd(r,e){if(!(!r||!e)){var t=$d(Nn(e)),i=Cd(r+":"+t);return{token:i,type:"Basic",password:t,username:r}}}function qd(r){if(r){var e=Nn(r);return{token:e,type:"Basic"}}}});var bl=T((hS,gl)=>{gl.exports=function(r,e){var t=e||Fn()("npm",{registry:"https://registry.npmjs.org/"}),i=t[r+":registry"]||t.registry;return i.slice(-1)==="/"?i:i+"/"}});var $r=T((dS,yl)=>{var Dd="2.0.0",Bd=Number.MAX_SAFE_INTEGER||9007199254740991,Fd=16;yl.exports={SEMVER_SPEC_VERSION:Dd,MAX_LENGTH:256,MAX_SAFE_INTEGER:Bd,MAX_SAFE_COMPONENT_LENGTH:Fd}});var Cr=T((pS,Sl)=>{var Nd=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Sl.exports=Nd});var yt=T((rt,_l)=>{var{MAX_SAFE_COMPONENT_LENGTH:rs}=$r(),zd=Cr();rt=_l.exports={};var Wd=rt.re=[],C=rt.src=[],O=rt.t={},kd=0,F=(r,e,t)=>{let i=kd++;zd(r,i,e),O[r]=i,C[i]=e,Wd[i]=new RegExp(e,t?"g":void 0)};F("NUMERICIDENTIFIER","0|[1-9]\\d*");F("NUMERICIDENTIFIERLOOSE","[0-9]+");F("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");F("MAINVERSION",`(${C[O.NUMERICIDENTIFIER]})\\.(${C[O.NUMERICIDENTIFIER]})\\.(${C[O.NUMERICIDENTIFIER]})`);F("MAINVERSIONLOOSE",`(${C[O.NUMERICIDENTIFIERLOOSE]})\\.(${C[O.NUMERICIDENTIFIERLOOSE]})\\.(${C[O.NUMERICIDENTIFIERLOOSE]})`);F("PRERELEASEIDENTIFIER",`(?:${C[O.NUMERICIDENTIFIER]}|${C[O.NONNUMERICIDENTIFIER]})`);F("PRERELEASEIDENTIFIERLOOSE",`(?:${C[O.NUMERICIDENTIFIERLOOSE]}|${C[O.NONNUMERICIDENTIFIER]})`);F("PRERELEASE",`(?:-(${C[O.PRERELEASEIDENTIFIER]}(?:\\.${C[O.PRERELEASEIDENTIFIER]})*))`);F("PRERELEASELOOSE",`(?:-?(${C[O.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[O.PRERELEASEIDENTIFIERLOOSE]})*))`);F("BUILDIDENTIFIER","[0-9A-Za-z-]+");F("BUILD",`(?:\\+(${C[O.BUILDIDENTIFIER]}(?:\\.${C[O.BUILDIDENTIFIER]})*))`);F("FULLPLAIN",`v?${C[O.MAINVERSION]}${C[O.PRERELEASE]}?${C[O.BUILD]}?`);F("FULL",`^${C[O.FULLPLAIN]}$`);F("LOOSEPLAIN",`[v=\\s]*${C[O.MAINVERSIONLOOSE]}${C[O.PRERELEASELOOSE]}?${C[O.BUILD]}?`);F("LOOSE",`^${C[O.LOOSEPLAIN]}$`);F("GTLT","((?:<|>)?=?)");F("XRANGEIDENTIFIERLOOSE",`${C[O.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);F("XRANGEIDENTIFIER",`${C[O.NUMERICIDENTIFIER]}|x|X|\\*`);F("XRANGEPLAIN",`[v=\\s]*(${C[O.XRANGEIDENTIFIER]})(?:\\.(${C[O.XRANGEIDENTIFIER]})(?:\\.(${C[O.XRANGEIDENTIFIER]})(?:${C[O.PRERELEASE]})?${C[O.BUILD]}?)?)?`);F("XRANGEPLAINLOOSE",`[v=\\s]*(${C[O.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[O.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[O.XRANGEIDENTIFIERLOOSE]})(?:${C[O.PRERELEASELOOSE]})?${C[O.BUILD]}?)?)?`);F("XRANGE",`^${C[O.GTLT]}\\s*${C[O.XRANGEPLAIN]}$`);F("XRANGELOOSE",`^${C[O.GTLT]}\\s*${C[O.XRANGEPLAINLOOSE]}$`);F("COERCE",`(^|[^\\d])(\\d{1,${rs}})(?:\\.(\\d{1,${rs}}))?(?:\\.(\\d{1,${rs}}))?(?:$|[^\\d])`);F("COERCERTL",C[O.COERCE],!0);F("LONETILDE","(?:~>?)");F("TILDETRIM",`(\\s*)${C[O.LONETILDE]}\\s+`,!0);rt.tildeTrimReplace="$1~";F("TILDE",`^${C[O.LONETILDE]}${C[O.XRANGEPLAIN]}$`);F("TILDELOOSE",`^${C[O.LONETILDE]}${C[O.XRANGEPLAINLOOSE]}$`);F("LONECARET","(?:\\^)");F("CARETTRIM",`(\\s*)${C[O.LONECARET]}\\s+`,!0);rt.caretTrimReplace="$1^";F("CARET",`^${C[O.LONECARET]}${C[O.XRANGEPLAIN]}$`);F("CARETLOOSE",`^${C[O.LONECARET]}${C[O.XRANGEPLAINLOOSE]}$`);F("COMPARATORLOOSE",`^${C[O.GTLT]}\\s*(${C[O.LOOSEPLAIN]})$|^$`);F("COMPARATOR",`^${C[O.GTLT]}\\s*(${C[O.FULLPLAIN]})$|^$`);F("COMPARATORTRIM",`(\\s*)${C[O.GTLT]}\\s*(${C[O.LOOSEPLAIN]}|${C[O.XRANGEPLAIN]})`,!0);rt.comparatorTrimReplace="$1$2$3";F("HYPHENRANGE",`^\\s*(${C[O.XRANGEPLAIN]})\\s+-\\s+(${C[O.XRANGEPLAIN]})\\s*$`);F("HYPHENRANGELOOSE",`^\\s*(${C[O.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[O.XRANGEPLAINLOOSE]})\\s*$`);F("STAR","(<|>)?=?\\s*\\*");F("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");F("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Or=T((mS,wl)=>{var jd=["includePrerelease","loose","rtl"],Ud=r=>r?typeof r!="object"?{loose:!0}:jd.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};wl.exports=Ud});var ns=T((gS,vl)=>{var El=/^[0-9]+$/,Rl=(r,e)=>{let t=El.test(r),i=El.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:r<e?-1:1},Md=(r,e)=>Rl(e,r);vl.exports={compareIdentifiers:Rl,rcompareIdentifiers:Md}});var ae=T((bS,Cl)=>{var zn=Cr(),{MAX_LENGTH:Al,MAX_SAFE_INTEGER:Wn}=$r(),{re:Tl,t:$l}=yt(),Hd=Or(),{compareIdentifiers:Mt}=ns(),ye=class{constructor(e,t){if(t=Hd(t),e instanceof ye){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Al)throw new TypeError(`version is longer than ${Al} characters`);zn("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?Tl[$l.LOOSE]:Tl[$l.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Wn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Wn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Wn||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let a=+o;if(a>=0&&a<Wn)return a}return o}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(zn("SemVer.compare",this.version,this.options,e),!(e instanceof ye)){if(typeof e=="string"&&e===this.version)return 0;e=new ye(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof ye||(e=new ye(e,this.options)),Mt(this.major,e.major)||Mt(this.minor,e.minor)||Mt(this.patch,e.patch)}comparePre(e){if(e instanceof ye||(e=new ye(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let i=this.prerelease[t],o=e.prerelease[t];if(zn("prerelease compare",t,i,o),i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i===o)continue;return Mt(i,o)}while(++t)}compareBuild(e){e instanceof ye||(e=new ye(e,this.options));let t=0;do{let i=this.build[t],o=e.build[t];if(zn("prerelease compare",t,i,o),i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i===o)continue;return Mt(i,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);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":if(this.prerelease.length===0)this.prerelease=[0];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(Mt(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};Cl.exports=ye});var St=T((yS,Ll)=>{var{MAX_LENGTH:Gd}=$r(),{re:Ol,t:Pl}=yt(),Il=ae(),Vd=Or(),Yd=(r,e)=>{if(e=Vd(e),r instanceof Il)return r;if(typeof r!="string"||r.length>Gd||!(e.loose?Ol[Pl.LOOSE]:Ol[Pl.FULL]).test(r))return null;try{return new Il(r,e)}catch{return null}};Ll.exports=Yd});var ql=T((SS,xl)=>{var Xd=St(),Qd=(r,e)=>{let t=Xd(r,e);return t?t.version:null};xl.exports=Qd});var Bl=T((_S,Dl)=>{var Kd=St(),Zd=(r,e)=>{let t=Kd(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Dl.exports=Zd});var zl=T((wS,Nl)=>{var Fl=ae(),Jd=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new Fl(r instanceof Fl?r.version:r,t).inc(e,i).version}catch{return null}};Nl.exports=Jd});var we=T((ES,kl)=>{var Wl=ae(),ep=(r,e,t)=>new Wl(r,t).compare(new Wl(e,t));kl.exports=ep});var kn=T((RS,jl)=>{var tp=we(),rp=(r,e,t)=>tp(r,e,t)===0;jl.exports=rp});var Hl=T((vS,Ml)=>{var Ul=St(),np=kn(),ip=(r,e)=>{if(np(r,e))return null;{let t=Ul(r),i=Ul(e),o=t.prerelease.length||i.prerelease.length,a=o?"pre":"",u=o?"prerelease":"";for(let h in t)if((h==="major"||h==="minor"||h==="patch")&&t[h]!==i[h])return a+h;return u}};Ml.exports=ip});var Vl=T((AS,Gl)=>{var sp=ae(),op=(r,e)=>new sp(r,e).major;Gl.exports=op});var Xl=T((TS,Yl)=>{var ap=ae(),lp=(r,e)=>new ap(r,e).minor;Yl.exports=lp});var Kl=T(($S,Ql)=>{var up=ae(),cp=(r,e)=>new up(r,e).patch;Ql.exports=cp});var Jl=T((CS,Zl)=>{var fp=St(),hp=(r,e)=>{let t=fp(r,e);return t&&t.prerelease.length?t.prerelease:null};Zl.exports=hp});var tu=T((OS,eu)=>{var dp=we(),pp=(r,e,t)=>dp(e,r,t);eu.exports=pp});var nu=T((PS,ru)=>{var mp=we(),gp=(r,e)=>mp(r,e,!0);ru.exports=gp});var jn=T((IS,su)=>{var iu=ae(),bp=(r,e,t)=>{let i=new iu(r,t),o=new iu(e,t);return i.compare(o)||i.compareBuild(o)};su.exports=bp});var au=T((LS,ou)=>{var yp=jn(),Sp=(r,e)=>r.sort((t,i)=>yp(t,i,e));ou.exports=Sp});var uu=T((xS,lu)=>{var _p=jn(),wp=(r,e)=>r.sort((t,i)=>_p(i,t,e));lu.exports=wp});var Pr=T((qS,cu)=>{var Ep=we(),Rp=(r,e,t)=>Ep(r,e,t)>0;cu.exports=Rp});var Un=T((DS,fu)=>{var vp=we(),Ap=(r,e,t)=>vp(r,e,t)<0;fu.exports=Ap});var is=T((BS,hu)=>{var Tp=we(),$p=(r,e,t)=>Tp(r,e,t)!==0;hu.exports=$p});var Mn=T((FS,du)=>{var Cp=we(),Op=(r,e,t)=>Cp(r,e,t)>=0;du.exports=Op});var Hn=T((NS,pu)=>{var Pp=we(),Ip=(r,e,t)=>Pp(r,e,t)<=0;pu.exports=Ip});var ss=T((zS,mu)=>{var Lp=kn(),xp=is(),qp=Pr(),Dp=Mn(),Bp=Un(),Fp=Hn(),Np=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return Lp(r,t,i);case"!=":return xp(r,t,i);case">":return qp(r,t,i);case">=":return Dp(r,t,i);case"<":return Bp(r,t,i);case"<=":return Fp(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};mu.exports=Np});var bu=T((WS,gu)=>{var zp=ae(),Wp=St(),{re:Gn,t:Vn}=yt(),kp=(r,e)=>{if(r instanceof zp)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(Gn[Vn.COERCE]);else{let i;for(;(i=Gn[Vn.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),Gn[Vn.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;Gn[Vn.COERCERTL].lastIndex=-1}return t===null?null:Wp(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};gu.exports=kp});var Su=T((kS,yu)=>{"use strict";yu.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var wu=T((jS,_u)=>{"use strict";_u.exports=M;M.Node=_t;M.create=M;function M(r){var e=this;if(e instanceof M||(e=new M),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(o){e.push(o)});else if(arguments.length>0)for(var t=0,i=arguments.length;t<i;t++)e.push(arguments[t]);return e}M.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};M.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};M.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};M.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)Up(this,arguments[r]);return this.length};M.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Mp(this,arguments[r]);return this.length};M.prototype.pop=function(){if(this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};M.prototype.shift=function(){if(this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};M.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,i=0;t!==null;i++)r.call(e,t.value,i,this),t=t.next};M.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,i=this.length-1;t!==null;i--)r.call(e,t.value,i,this),t=t.prev};M.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};M.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};M.prototype.map=function(r,e){e=e||this;for(var t=new M,i=this.head;i!==null;)t.push(r.call(e,i.value,this)),i=i.next;return t};M.prototype.mapReverse=function(r,e){e=e||this;for(var t=new M,i=this.tail;i!==null;)t.push(r.call(e,i.value,this)),i=i.prev;return t};M.prototype.reduce=function(r,e){var t,i=this.head;if(arguments.length>1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;i!==null;o++)t=r(t,i.value,o),i=i.next;return t};M.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=this.length-1;i!==null;o--)t=r(t,i.value,o),i=i.prev;return t};M.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};M.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};M.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new M;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var i=0,o=this.head;o!==null&&i<r;i++)o=o.next;for(;o!==null&&i<e;i++,o=o.next)t.push(o.value);return t};M.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new M;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var i=this.length,o=this.tail;o!==null&&i>e;i--)o=o.prev;for(;o!==null&&i>r;i--,o=o.prev)t.push(o.value);return t};M.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,o=this.head;o!==null&&i<r;i++)o=o.next;for(var a=[],i=0;o&&i<e;i++)a.push(o.value),o=this.removeNode(o);o===null&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(var i=0;i<t.length;i++)o=jp(this,o,t[i]);return a};M.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var i=t.prev;t.prev=t.next,t.next=i}return this.head=e,this.tail=r,this};function jp(r,e,t){var i=e===r.head?new _t(t,null,e,r):new _t(t,e,e.next,r);return i.next===null&&(r.tail=i),i.prev===null&&(r.head=i),r.length++,i}function Up(r,e){r.tail=new _t(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Mp(r,e){r.head=new _t(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function _t(r,e,t,i){if(!(this instanceof _t))return new _t(r,e,t,i);this.list=i,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{Su()(M)}catch{}});var Tu=T((US,Au)=>{"use strict";var Hp=wu(),wt=Symbol("max"),Me=Symbol("length"),Ht=Symbol("lengthCalculator"),Lr=Symbol("allowStale"),Et=Symbol("maxAge"),Ue=Symbol("dispose"),Eu=Symbol("noDisposeOnSet"),re=Symbol("lruList"),Pe=Symbol("cache"),vu=Symbol("updateAgeOnGet"),os=()=>1,ls=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[wt]=e.max||1/0,i=e.length||os;if(this[Ht]=typeof i!="function"?os:i,this[Lr]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Et]=e.maxAge||0,this[Ue]=e.dispose,this[Eu]=e.noDisposeOnSet||!1,this[vu]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[wt]=e||1/0,Ir(this)}get max(){return this[wt]}set allowStale(e){this[Lr]=!!e}get allowStale(){return this[Lr]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Et]=e,Ir(this)}get maxAge(){return this[Et]}set lengthCalculator(e){typeof e!="function"&&(e=os),e!==this[Ht]&&(this[Ht]=e,this[Me]=0,this[re].forEach(t=>{t.length=this[Ht](t.value,t.key),this[Me]+=t.length})),Ir(this)}get lengthCalculator(){return this[Ht]}get length(){return this[Me]}get itemCount(){return this[re].length}rforEach(e,t){t=t||this;for(let i=this[re].tail;i!==null;){let o=i.prev;Ru(this,e,i,t),i=o}}forEach(e,t){t=t||this;for(let i=this[re].head;i!==null;){let o=i.next;Ru(this,e,i,t),i=o}}keys(){return this[re].toArray().map(e=>e.key)}values(){return this[re].toArray().map(e=>e.value)}reset(){this[Ue]&&this[re]&&this[re].length&&this[re].forEach(e=>this[Ue](e.key,e.value)),this[Pe]=new Map,this[re]=new Hp,this[Me]=0}dump(){return this[re].map(e=>Yn(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[re]}set(e,t,i){if(i=i||this[Et],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let o=i?Date.now():0,a=this[Ht](t,e);if(this[Pe].has(e)){if(a>this[wt])return Gt(this,this[Pe].get(e)),!1;let d=this[Pe].get(e).value;return this[Ue]&&(this[Eu]||this[Ue](e,d.value)),d.now=o,d.maxAge=i,d.value=t,this[Me]+=a-d.length,d.length=a,this.get(e),Ir(this),!0}let u=new us(e,t,a,o,i);return u.length>this[wt]?(this[Ue]&&this[Ue](e,t),!1):(this[Me]+=u.length,this[re].unshift(u),this[Pe].set(e,this[re].head),Ir(this),!0)}has(e){if(!this[Pe].has(e))return!1;let t=this[Pe].get(e).value;return!Yn(this,t)}get(e){return as(this,e,!0)}peek(e){return as(this,e,!1)}pop(){let e=this[re].tail;return e?(Gt(this,e),e.value):null}del(e){Gt(this,this[Pe].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let o=e[i],a=o.e||0;if(a===0)this.set(o.k,o.v);else{let u=a-t;u>0&&this.set(o.k,o.v,u)}}}prune(){this[Pe].forEach((e,t)=>as(this,t,!1))}},as=(r,e,t)=>{let i=r[Pe].get(e);if(i){let o=i.value;if(Yn(r,o)){if(Gt(r,i),!r[Lr])return}else t&&(r[vu]&&(i.value.now=Date.now()),r[re].unshiftNode(i));return o.value}},Yn=(r,e)=>{if(!e||!e.maxAge&&!r[Et])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Et]&&t>r[Et]},Ir=r=>{if(r[Me]>r[wt])for(let e=r[re].tail;r[Me]>r[wt]&&e!==null;){let t=e.prev;Gt(r,e),e=t}},Gt=(r,e)=>{if(e){let t=e.value;r[Ue]&&r[Ue](t.key,t.value),r[Me]-=t.length,r[Pe].delete(t.key),r[re].removeNode(e)}},us=class{constructor(e,t,i,o,a){this.key=e,this.value=t,this.length=i,this.now=o,this.maxAge=a||0}},Ru=(r,e,t,i)=>{let o=t.value;Yn(r,o)&&(Gt(r,t),r[Lr]||(o=void 0)),o&&e.call(i,o.value,o.key,r)};Au.exports=ls});var Ee=T((MS,Pu)=>{var Rt=class{constructor(e,t){if(t=Vp(t),e instanceof Rt)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Rt(e.raw,t);if(e instanceof cs)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(o=>!Cu(o[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&Zp(o[0])){this.set=[o];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,o=$u.get(i);if(o)return o;let a=this.options.loose,u=a?me[ce.HYPHENRANGELOOSE]:me[ce.HYPHENRANGE];e=e.replace(u,lm(this.options.includePrerelease)),Q("hyphen replace",e),e=e.replace(me[ce.COMPARATORTRIM],Xp),Q("comparator trim",e),e=e.replace(me[ce.TILDETRIM],Qp),e=e.replace(me[ce.CARETTRIM],Kp),e=e.split(/\s+/).join(" ");let h=e.split(" ").map(y=>Jp(y,this.options)).join(" ").split(/\s+/).map(y=>am(y,this.options));a&&(h=h.filter(y=>(Q("loose invalid filter",y,this.options),!!y.match(me[ce.COMPARATORLOOSE])))),Q("range list",h);let d=new Map,f=h.map(y=>new cs(y,this.options));for(let y of f){if(Cu(y))return[y];d.set(y.value,y)}d.size>1&&d.has("")&&d.delete("");let m=[...d.values()];return $u.set(i,m),m}intersects(e,t){if(!(e instanceof Rt))throw new TypeError("a Range is required");return this.set.some(i=>Ou(i,t)&&e.set.some(o=>Ou(o,t)&&i.every(a=>o.every(u=>a.intersects(u,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Yp(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(um(this.set[t],e,this.options))return!0;return!1}};Pu.exports=Rt;var Gp=Tu(),$u=new Gp({max:1e3}),Vp=Or(),cs=xr(),Q=Cr(),Yp=ae(),{re:me,t:ce,comparatorTrimReplace:Xp,tildeTrimReplace:Qp,caretTrimReplace:Kp}=yt(),Cu=r=>r.value==="<0.0.0-0",Zp=r=>r.value==="",Ou=(r,e)=>{let t=!0,i=r.slice(),o=i.pop();for(;t&&i.length;)t=i.every(a=>o.intersects(a,e)),o=i.pop();return t},Jp=(r,e)=>(Q("comp",r,e),r=rm(r,e),Q("caret",r),r=em(r,e),Q("tildes",r),r=im(r,e),Q("xrange",r),r=om(r,e),Q("stars",r),r),fe=r=>!r||r.toLowerCase()==="x"||r==="*",em=(r,e)=>r.trim().split(/\s+/).map(t=>tm(t,e)).join(" "),tm=(r,e)=>{let t=e.loose?me[ce.TILDELOOSE]:me[ce.TILDE];return r.replace(t,(i,o,a,u,h)=>{Q("tilde",r,i,o,a,u,h);let d;return fe(o)?d="":fe(a)?d=`>=${o}.0.0 <${+o+1}.0.0-0`:fe(u)?d=`>=${o}.${a}.0 <${o}.${+a+1}.0-0`:h?(Q("replaceTilde pr",h),d=`>=${o}.${a}.${u}-${h} <${o}.${+a+1}.0-0`):d=`>=${o}.${a}.${u} <${o}.${+a+1}.0-0`,Q("tilde return",d),d})},rm=(r,e)=>r.trim().split(/\s+/).map(t=>nm(t,e)).join(" "),nm=(r,e)=>{Q("caret",r,e);let t=e.loose?me[ce.CARETLOOSE]:me[ce.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(o,a,u,h,d)=>{Q("caret",r,o,a,u,h,d);let f;return fe(a)?f="":fe(u)?f=`>=${a}.0.0${i} <${+a+1}.0.0-0`:fe(h)?a==="0"?f=`>=${a}.${u}.0${i} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.0${i} <${+a+1}.0.0-0`:d?(Q("replaceCaret pr",d),a==="0"?u==="0"?f=`>=${a}.${u}.${h}-${d} <${a}.${u}.${+h+1}-0`:f=`>=${a}.${u}.${h}-${d} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.${h}-${d} <${+a+1}.0.0-0`):(Q("no pr"),a==="0"?u==="0"?f=`>=${a}.${u}.${h}${i} <${a}.${u}.${+h+1}-0`:f=`>=${a}.${u}.${h}${i} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.${h} <${+a+1}.0.0-0`),Q("caret return",f),f})},im=(r,e)=>(Q("replaceXRanges",r,e),r.split(/\s+/).map(t=>sm(t,e)).join(" ")),sm=(r,e)=>{r=r.trim();let t=e.loose?me[ce.XRANGELOOSE]:me[ce.XRANGE];return r.replace(t,(i,o,a,u,h,d)=>{Q("xRange",r,i,o,a,u,h,d);let f=fe(a),m=f||fe(u),y=m||fe(h),g=y;return o==="="&&g&&(o=""),d=e.includePrerelease?"-0":"",f?o===">"||o==="<"?i="<0.0.0-0":i="*":o&&g?(m&&(u=0),h=0,o===">"?(o=">=",m?(a=+a+1,u=0,h=0):(u=+u+1,h=0)):o==="<="&&(o="<",m?a=+a+1:u=+u+1),o==="<"&&(d="-0"),i=`${o+a}.${u}.${h}${d}`):m?i=`>=${a}.0.0${d} <${+a+1}.0.0-0`:y&&(i=`>=${a}.${u}.0${d} <${a}.${+u+1}.0-0`),Q("xRange return",i),i})},om=(r,e)=>(Q("replaceStars",r,e),r.trim().replace(me[ce.STAR],"")),am=(r,e)=>(Q("replaceGTE0",r,e),r.trim().replace(me[e.includePrerelease?ce.GTE0PRE:ce.GTE0],"")),lm=r=>(e,t,i,o,a,u,h,d,f,m,y,g,p)=>(fe(i)?t="":fe(o)?t=`>=${i}.0.0${r?"-0":""}`:fe(a)?t=`>=${i}.${o}.0${r?"-0":""}`:u?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,fe(f)?d="":fe(m)?d=`<${+f+1}.0.0-0`:fe(y)?d=`<${f}.${+m+1}.0-0`:g?d=`<=${f}.${m}.${y}-${g}`:r?d=`<${f}.${m}.${+y+1}-0`:d=`<=${d}`,`${t} ${d}`.trim()),um=(r,e,t)=>{for(let i=0;i<r.length;i++)if(!r[i].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let i=0;i<r.length;i++)if(Q(r[i].semver),r[i].semver!==cs.ANY&&r[i].semver.prerelease.length>0){let o=r[i].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}});var xr=T((HS,Du)=>{var qr=Symbol("SemVer ANY"),Vt=class{static get ANY(){return qr}constructor(e,t){if(t=cm(t),e instanceof Vt){if(e.loose===!!t.loose)return e;e=e.value}hs("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===qr?this.value="":this.value=this.operator+this.semver.version,hs("comp",this)}parse(e){let t=this.options.loose?Iu[Lu.COMPARATORLOOSE]:Iu[Lu.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new xu(i[2],this.options.loose):this.semver=qr}toString(){return this.value}test(e){if(hs("Comparator.test",e,this.options.loose),this.semver===qr||e===qr)return!0;if(typeof e=="string")try{e=new xu(e,this.options)}catch{return!1}return fs(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Vt))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new qu(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new qu(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),o=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),a=this.semver.version===e.semver.version,u=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),h=fs(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),d=fs(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||o||a&&u||h||d}};Du.exports=Vt;var cm=Or(),{re:Iu,t:Lu}=yt(),fs=ss(),hs=Cr(),xu=ae(),qu=Ee()});var Dr=T((GS,Bu)=>{var fm=Ee(),hm=(r,e,t)=>{try{e=new fm(e,t)}catch{return!1}return e.test(r)};Bu.exports=hm});var Nu=T((VS,Fu)=>{var dm=Ee(),pm=(r,e)=>new dm(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));Fu.exports=pm});var Wu=T((YS,zu)=>{var mm=ae(),gm=Ee(),bm=(r,e,t)=>{let i=null,o=null,a=null;try{a=new gm(e,t)}catch{return null}return r.forEach(u=>{a.test(u)&&(!i||o.compare(u)===-1)&&(i=u,o=new mm(i,t))}),i};zu.exports=bm});var ju=T((XS,ku)=>{var ym=ae(),Sm=Ee(),_m=(r,e,t)=>{let i=null,o=null,a=null;try{a=new Sm(e,t)}catch{return null}return r.forEach(u=>{a.test(u)&&(!i||o.compare(u)===1)&&(i=u,o=new ym(i,t))}),i};ku.exports=_m});var Hu=T((QS,Mu)=>{var ds=ae(),wm=Ee(),Uu=Pr(),Em=(r,e)=>{r=new wm(r,e);let t=new ds("0.0.0");if(r.test(t)||(t=new ds("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i<r.set.length;++i){let o=r.set[i],a=null;o.forEach(u=>{let h=new ds(u.semver.version);switch(u.operator){case">":h.prerelease.length===0?h.patch++:h.prerelease.push(0),h.raw=h.format();case"":case">=":(!a||Uu(h,a))&&(a=h);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),a&&(!t||Uu(t,a))&&(t=a)}return t&&r.test(t)?t:null};Mu.exports=Em});var Vu=T((KS,Gu)=>{var Rm=Ee(),vm=(r,e)=>{try{return new Rm(r,e).range||"*"}catch{return null}};Gu.exports=vm});var Xn=T((ZS,Ku)=>{var Am=ae(),Qu=xr(),{ANY:Tm}=Qu,$m=Ee(),Cm=Dr(),Yu=Pr(),Xu=Un(),Om=Hn(),Pm=Mn(),Im=(r,e,t,i)=>{r=new Am(r,i),e=new $m(e,i);let o,a,u,h,d;switch(t){case">":o=Yu,a=Om,u=Xu,h=">",d=">=";break;case"<":o=Xu,a=Pm,u=Yu,h="<",d="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Cm(r,e,i))return!1;for(let f=0;f<e.set.length;++f){let m=e.set[f],y=null,g=null;if(m.forEach(p=>{p.semver===Tm&&(p=new Qu(">=0.0.0")),y=y||p,g=g||p,o(p.semver,y.semver,i)?y=p:u(p.semver,g.semver,i)&&(g=p)}),y.operator===h||y.operator===d||(!g.operator||g.operator===h)&&a(r,g.semver))return!1;if(g.operator===d&&u(r,g.semver))return!1}return!0};Ku.exports=Im});var Ju=T((JS,Zu)=>{var Lm=Xn(),xm=(r,e,t)=>Lm(r,e,">",t);Zu.exports=xm});var tc=T((e_,ec)=>{var qm=Xn(),Dm=(r,e,t)=>qm(r,e,"<",t);ec.exports=Dm});var ic=T((t_,nc)=>{var rc=Ee(),Bm=(r,e,t)=>(r=new rc(r,t),e=new rc(e,t),r.intersects(e));nc.exports=Bm});var oc=T((r_,sc)=>{var Fm=Dr(),Nm=we();sc.exports=(r,e,t)=>{let i=[],o=null,a=null,u=r.sort((m,y)=>Nm(m,y,t));for(let m of u)Fm(m,e,t)?(a=m,o||(o=m)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);let h=[];for(let[m,y]of i)m===y?h.push(m):!y&&m===u[0]?h.push("*"):y?m===u[0]?h.push(`<=${y}`):h.push(`${m} - ${y}`):h.push(`>=${m}`);let d=h.join(" || "),f=typeof e.raw=="string"?e.raw:String(e);return d.length<f.length?d:e}});var fc=T((n_,cc)=>{var ac=Ee(),Qn=xr(),{ANY:ps}=Qn,Br=Dr(),ms=we(),zm=(r,e,t={})=>{if(r===e)return!0;r=new ac(r,t),e=new ac(e,t);let i=!1;e:for(let o of r.set){for(let a of e.set){let u=Wm(o,a,t);if(i=i||u!==null,u)continue e}if(i)return!1}return!0},Wm=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===ps){if(e.length===1&&e[0].semver===ps)return!0;t.includePrerelease?r=[new Qn(">=0.0.0-0")]:r=[new Qn(">=0.0.0")]}if(e.length===1&&e[0].semver===ps){if(t.includePrerelease)return!0;e=[new Qn(">=0.0.0")]}let i=new Set,o,a;for(let p of r)p.operator===">"||p.operator===">="?o=lc(o,p,t):p.operator==="<"||p.operator==="<="?a=uc(a,p,t):i.add(p.semver);if(i.size>1)return null;let u;if(o&&a){if(u=ms(o.semver,a.semver,t),u>0)return null;if(u===0&&(o.operator!==">="||a.operator!=="<="))return null}for(let p of i){if(o&&!Br(p,String(o),t)||a&&!Br(p,String(a),t))return null;for(let S of e)if(!Br(p,String(S),t))return!1;return!0}let h,d,f,m,y=a&&!t.includePrerelease&&a.semver.prerelease.length?a.semver:!1,g=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1;y&&y.prerelease.length===1&&a.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(let p of e){if(m=m||p.operator===">"||p.operator===">=",f=f||p.operator==="<"||p.operator==="<=",o){if(g&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===g.major&&p.semver.minor===g.minor&&p.semver.patch===g.patch&&(g=!1),p.operator===">"||p.operator===">="){if(h=lc(o,p,t),h===p&&h!==o)return!1}else if(o.operator===">="&&!Br(o.semver,String(p),t))return!1}if(a){if(y&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===y.major&&p.semver.minor===y.minor&&p.semver.patch===y.patch&&(y=!1),p.operator==="<"||p.operator==="<="){if(d=uc(a,p,t),d===p&&d!==a)return!1}else if(a.operator==="<="&&!Br(a.semver,String(p),t))return!1}if(!p.operator&&(a||o)&&u!==0)return!1}return!(o&&f&&!a&&u!==0||a&&m&&!o&&u!==0||g||y)},lc=(r,e,t)=>{if(!r)return e;let i=ms(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},uc=(r,e,t)=>{if(!r)return e;let i=ms(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};cc.exports=zm});var pc=T((i_,dc)=>{var gs=yt(),km=$r(),jm=ae(),hc=ns(),Um=St(),Mm=ql(),Hm=Bl(),Gm=zl(),Vm=Hl(),Ym=Vl(),Xm=Xl(),Qm=Kl(),Km=Jl(),Zm=we(),Jm=tu(),eg=nu(),tg=jn(),rg=au(),ng=uu(),ig=Pr(),sg=Un(),og=kn(),ag=is(),lg=Mn(),ug=Hn(),cg=ss(),fg=bu(),hg=xr(),dg=Ee(),pg=Dr(),mg=Nu(),gg=Wu(),bg=ju(),yg=Hu(),Sg=Vu(),_g=Xn(),wg=Ju(),Eg=tc(),Rg=ic(),vg=oc(),Ag=fc();dc.exports={parse:Um,valid:Mm,clean:Hm,inc:Gm,diff:Vm,major:Ym,minor:Xm,patch:Qm,prerelease:Km,compare:Zm,rcompare:Jm,compareLoose:eg,compareBuild:tg,sort:rg,rsort:ng,gt:ig,lt:sg,eq:og,neq:ag,gte:lg,lte:ug,cmp:cg,coerce:fg,Comparator:hg,Range:dg,satisfies:pg,toComparators:mg,maxSatisfying:gg,minSatisfying:bg,minVersion:yg,validRange:Sg,outside:_g,gtr:wg,ltr:Eg,intersects:Rg,simplifyRange:vg,subset:Ag,SemVer:jm,re:gs.re,src:gs.src,tokens:gs.t,SEMVER_SPEC_VERSION:km.SEMVER_SPEC_VERSION,compareIdentifiers:hc.compareIdentifiers,rcompareIdentifiers:hc.rcompareIdentifiers}});var Sc=T((s_,yc)=>{yc.exports=function(r,e){e||(e={});var t=e.hsep===void 0?" ":e.hsep,i=e.align||[],o=e.stringLength||function(d){return String(d).length},a=gc(r,function(d,f){return bc(f,function(m,y){var g=mc(m);(!d[y]||g>d[y])&&(d[y]=g)}),d},[]),u=Kn(r,function(d){return Kn(d,function(f,m){var y=String(f);if(i[m]==="."){var g=mc(y),p=a[m]+(/\./.test(y)?1:2)-(o(y)-g);return y+Array(p).join(" ")}else return y})}),h=gc(u,function(d,f){return bc(f,function(m,y){var g=o(m);(!d[y]||g>d[y])&&(d[y]=g)}),d},[]);return Kn(u,function(d){return Kn(d,function(f,m){var y=h[m]-o(f)||0,g=Array(Math.max(y+1,1)).join(" ");return i[m]==="r"||i[m]==="."?g+f:i[m]==="c"?Array(Math.ceil(y/2+1)).join(" ")+f+Array(Math.floor(y/2+1)).join(" "):f+g}).join(t).replace(/\s+$/,"")}).join(`
20
- `)};function mc(r){var e=/\.[^.]*$/.exec(r);return e?e.index+1:r.length}function gc(r,e,t){if(r.reduce)return r.reduce(e,t);for(var i=0,o=arguments.length>=3?t:r[i++];i<r.length;i++)e(o,r[i],i);return o}function bc(r,e){if(r.forEach)return r.forEach(e);for(var t=0;t<r.length;t++)e.call(r,r[t],t)}function Kn(r,e){if(r.map)return r.map(e);for(var t=[],i=0;i<r.length;i++)t.push(e.call(r,r[i],i));return t}});var vc=T((l_,Rc)=>{var Fr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Tg=typeof AbortController=="function",Zn=Tg?AbortController:class{constructor(){this.signal=new _c}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},$g=typeof AbortSignal=="function",Cg=typeof Zn.AbortSignal=="function",_c=$g?AbortSignal:Cg?Zn.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(t=>t(e),this))}onabort(){}addEventListener(e,t){e==="abort"&&this._listeners.push(t)}removeEventListener(e,t){e==="abort"&&(this._listeners=this._listeners.filter(i=>i!==t))}},_s=new Set,bs=(r,e)=>{let t=`LRU_CACHE_OPTION_${r}`;Jn(t)&&ws(t,`${r} option`,`options.${e}`,He)},ys=(r,e)=>{let t=`LRU_CACHE_METHOD_${r}`;if(Jn(t)){let{prototype:i}=He,{get:o}=Object.getOwnPropertyDescriptor(i,r);ws(t,`${r} method`,`cache.${e}()`,o)}},Og=(r,e)=>{let t=`LRU_CACHE_PROPERTY_${r}`;if(Jn(t)){let{prototype:i}=He,{get:o}=Object.getOwnPropertyDescriptor(i,r);ws(t,`${r} property`,`cache.${e}`,o)}},wc=(...r)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...r):console.error(...r)},Jn=r=>!_s.has(r),ws=(r,e,t,i)=>{_s.add(r);let o=`The ${e} is deprecated. Please use ${t} instead.`;wc(o,"DeprecationWarning",r,i)},nt=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),Ec=r=>nt(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?Yt:null:null,Yt=class extends Array{constructor(e){super(e),this.fill(0)}},Ss=class{constructor(e){if(e===0)return[];let t=Ec(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},He=class{constructor(e={}){let{max:t=0,ttl:i,ttlResolution:o=1,ttlAutopurge:a,updateAgeOnGet:u,updateAgeOnHas:h,allowStale:d,dispose:f,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:g,maxSize:p=0,maxEntrySize:S=0,sizeCalculation:R,fetchMethod:_,fetchContext:v,noDeleteOnFetchRejection:P,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:q,ignoreFetchAbort:I}=e,{length:L,maxAge:k,stale:Y}=e instanceof He?{}:e;if(t!==0&&!nt(t))throw new TypeError("max option must be a nonnegative integer");let X=t?Ec(t):Array;if(!X)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=p,this.maxEntrySize=S||this.maxSize,this.sizeCalculation=R||L,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=_||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=v,!this.fetchMethod&&v!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new X(t),this.prev=new X(t),this.head=0,this.tail=0,this.free=new Ss(t),this.initialFill=1,this.size=0,typeof f=="function"&&(this.dispose=f),typeof m=="function"?(this.disposeAfter=m,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!P,this.allowStaleOnFetchRejection=!!A,this.allowStaleOnFetchAbort=!!q,this.ignoreFetchAbort=!!I,this.maxEntrySize!==0){if(this.maxSize!==0&&!nt(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!nt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!d||!!Y,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!h,this.ttlResolution=nt(o)||o===0?o:1,this.ttlAutopurge=!!a,this.ttl=i||k||0,this.ttl){if(!nt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let oe="LRU_CACHE_UNBOUNDED";Jn(oe)&&(_s.add(oe),wc("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",oe,He))}Y&&bs("stale","allowStale"),k&&bs("maxAge","ttl"),L&&bs("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Yt(this.max),this.starts=new Yt(this.max),this.setItemTTL=(i,o,a=Fr.now())=>{if(this.starts[i]=o!==0?a:0,this.ttls[i]=o,o!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.isStale(i)&&this.delete(this.keyList[i])},o+1);u.unref&&u.unref()}},this.updateItemAge=i=>{this.starts[i]=this.ttls[i]!==0?Fr.now():0},this.statusTTL=(i,o)=>{i&&(i.ttl=this.ttls[o],i.start=this.starts[o],i.now=e||t(),i.remainingTTL=i.now+i.ttl-i.start)};let e=0,t=()=>{let i=Fr.now();if(this.ttlResolution>0){e=i;let o=setTimeout(()=>e=0,this.ttlResolution);o.unref&&o.unref()}return i};this.getRemainingTTL=i=>{let o=this.keyMap.get(i);return o===void 0?0:this.ttls[o]===0||this.starts[o]===0?1/0:this.starts[o]+this.ttls[o]-(e||t())},this.isStale=i=>this.ttls[i]!==0&&this.starts[i]!==0&&(e||t())-this.starts[i]>this.ttls[i]}updateItemAge(e){}statusTTL(e,t){}setItemTTL(e,t,i){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Yt(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,i,o)=>{if(this.isBackgroundFetch(t))return 0;if(!nt(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(t,e),!nt(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.addItemSize=(e,t,i)=>{if(this.sizes[e]=t,this.maxSize){let o=this.maxSize-this.sizes[e];for(;this.calculatedSize>o;)this.evict(!0)}this.calculatedSize+=this.sizes[e],i&&(i.entrySize=t,i.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,i,o){if(i||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.head));)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.tail));)t=this.next[t]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,t){for(let i of this.indexes()){let o=this.valList[i],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;if(a!==void 0&&e(a,this.keyList[i],this))return this.get(this.keyList[i],t)}}forEach(e,t=this){for(let i of this.indexes()){let o=this.valList[i],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;a!==void 0&&e.call(t,a,this.keyList[i],this)}}rforEach(e,t=this){for(let i of this.rindexes()){let o=this.valList[i],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;a!==void 0&&e.call(t,a,this.keyList[i],this)}}get prune(){return ys("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){let e=[];for(let t of this.indexes({allowStale:!0})){let i=this.keyList[t],o=this.valList[t],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;if(a===void 0)continue;let u={value:a};if(this.ttls){u.ttl=this.ttls[t];let h=Fr.now()-this.starts[t];u.start=Math.floor(Date.now()-h)}this.sizes&&(u.size=this.sizes[t]),e.unshift([i,u])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let o=Date.now()-i.start;i.start=Fr.now()-o}this.set(t,i.value,i)}}dispose(e,t,i){}set(e,t,{ttl:i=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,status:f}={}){if(u=this.requireSize(e,t,u,h),this.maxEntrySize&&u>this.maxEntrySize)return f&&(f.set="miss",f.maxEntrySizeExceeded=!0),this.delete(e),this;let m=this.size===0?void 0:this.keyMap.get(e);if(m===void 0)m=this.newIndex(),this.keyList[m]=e,this.valList[m]=t,this.keyMap.set(e,m),this.next[this.tail]=m,this.prev[m]=this.tail,this.tail=m,this.size++,this.addItemSize(m,u,f),f&&(f.set="add"),d=!1;else{this.moveToTail(m);let y=this.valList[m];if(t!==y){if(this.isBackgroundFetch(y)?y.__abortController.abort(new Error("replaced")):a||(this.dispose(y,e,"set"),this.disposeAfter&&this.disposed.push([y,e,"set"])),this.removeItemSize(m),this.valList[m]=t,this.addItemSize(m,u,f),f){f.set="replace";let g=y&&this.isBackgroundFetch(y)?y.__staleWhileFetching:y;g!==void 0&&(f.oldValue=g)}}else f&&(f.set="update")}if(i!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),d||this.setItemTTL(m,i,o),this.statusTTL(f,m),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let t=this.head,i=this.keyList[t],o=this.valList[t];return this.isBackgroundFetch(o)?o.__abortController.abort(new Error("evicted")):(this.dispose(o,i,"evict"),this.disposeAfter&&this.disposed.push([o,i,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(i),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas,status:i}={}){let o=this.keyMap.get(e);if(o!==void 0)if(this.isStale(o))i&&(i.has="stale",this.statusTTL(i,o));else return t&&this.updateItemAge(o),i&&(i.has="hit"),this.statusTTL(i,o),!0;else i&&(i.has="miss");return!1}peek(e,{allowStale:t=this.allowStale}={}){let i=this.keyMap.get(e);if(i!==void 0&&(t||!this.isStale(i))){let o=this.valList[i];return this.isBackgroundFetch(o)?o.__staleWhileFetching:o}}backgroundFetch(e,t,i,o){let a=t===void 0?void 0:this.valList[t];if(this.isBackgroundFetch(a))return a;let u=new Zn;i.signal&&i.signal.addEventListener("abort",()=>u.abort(i.signal.reason));let h={signal:u.signal,options:i,context:o},d=(p,S=!1)=>{let{aborted:R}=u.signal,_=i.ignoreFetchAbort&&p!==void 0;return i.status&&(R&&!S?(i.status.fetchAborted=!0,i.status.fetchError=u.signal.reason,_&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),R&&!_&&!S?m(u.signal.reason):(this.valList[t]===g&&(p===void 0?g.__staleWhileFetching?this.valList[t]=g.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,p,h.options))),p)},f=p=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=p),m(p)),m=p=>{let{aborted:S}=u.signal,R=S&&i.allowStaleOnFetchAbort,_=R||i.allowStaleOnFetchRejection,v=_||i.noDeleteOnFetchRejection;if(this.valList[t]===g&&(!v||g.__staleWhileFetching===void 0?this.delete(e):R||(this.valList[t]=g.__staleWhileFetching)),_)return i.status&&g.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),g.__staleWhileFetching;if(g.__returned===g)throw p},y=(p,S)=>{this.fetchMethod(e,a,h).then(R=>p(R),S),u.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(p(),i.allowStaleOnFetchAbort&&(p=R=>d(R,!0)))})};i.status&&(i.status.fetchDispatched=!0);let g=new Promise(y).then(d,f);return g.__abortController=u,g.__staleWhileFetching=a,g.__returned=null,t===void 0?(this.set(e,g,{...h.options,status:void 0}),t=this.keyMap.get(e)):this.valList[t]=g,g}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:y=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,fetchContext:S=this.fetchContext,forceRefresh:R=!1,status:_,signal:v}={}){if(!this.fetchMethod)return _&&(_.fetch="get"),this.get(e,{allowStale:t,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:_});let P={allowStale:t,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:u,size:h,sizeCalculation:d,noUpdateTTL:f,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:p,ignoreFetchAbort:g,status:_,signal:v},D=this.keyMap.get(e);if(D===void 0){_&&(_.fetch="miss");let A=this.backgroundFetch(e,D,P,S);return A.__returned=A}else{let A=this.valList[D];if(this.isBackgroundFetch(A)){let Y=t&&A.__staleWhileFetching!==void 0;return _&&(_.fetch="inflight",Y&&(_.returnedStale=!0)),Y?A.__staleWhileFetching:A.__returned=A}let q=this.isStale(D);if(!R&&!q)return _&&(_.fetch="hit"),this.moveToTail(D),i&&this.updateItemAge(D),this.statusTTL(_,D),A;let I=this.backgroundFetch(e,D,P,S),L=I.__staleWhileFetching!==void 0,k=L&&t;return _&&(_.fetch=L&&q?"stale":"refresh",k&&q&&(_.returnedStale=!0)),k?I.__staleWhileFetching:I.__returned=I}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}={}){let u=this.keyMap.get(e);if(u!==void 0){let h=this.valList[u],d=this.isBackgroundFetch(h);return this.statusTTL(a,u),this.isStale(u)?(a&&(a.get="stale"),d?(a&&(a.returnedStale=t&&h.__staleWhileFetching!==void 0),t?h.__staleWhileFetching:void 0):(o||this.delete(e),a&&(a.returnedStale=t),t?h:void 0)):(a&&(a.get="hit"),d?h.__staleWhileFetching:(this.moveToTail(u),i&&this.updateItemAge(u),h))}else a&&(a.get="miss")}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return ys("del","delete"),this.delete}delete(e){let t=!1;if(this.size!==0){let i=this.keyMap.get(e);if(i!==void 0)if(t=!0,this.size===1)this.clear();else{this.removeItemSize(i);let o=this.valList[i];this.isBackgroundFetch(o)?o.__abortController.abort(new Error("deleted")):(this.dispose(o,e,"delete"),this.disposeAfter&&this.disposed.push([o,e,"delete"])),this.keyMap.delete(e),this.keyList[i]=null,this.valList[i]=null,i===this.tail?this.tail=this.prev[i]:i===this.head?this.head=this.next[i]:(this.next[this.prev[i]]=this.next[i],this.prev[this.next[i]]=this.prev[i]),this.size--,this.free.push(i)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(let e of this.rindexes({allowStale:!0})){let t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort(new Error("deleted"));else{let i=this.keyList[e];this.dispose(t,i,"delete"),this.disposeAfter&&this.disposed.push([t,i,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return ys("reset","clear"),this.clear}get length(){return Og("length","size"),this.size}static get AbortController(){return Zn}static get AbortSignal(){return _c}};Rc.exports=He});var $c=T((u_,Tc)=>{"use strict";var H=(...r)=>r.every(e=>e)?r.join(""):"",Z=r=>r?encodeURIComponent(r):"",Ac=r=>r.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),Pg={sshtemplate:({domain:r,user:e,project:t,committish:i})=>`git@${r}:${e}/${t}.git${H("#",i)}`,sshurltemplate:({domain:r,user:e,project:t,committish:i})=>`git+ssh://git@${r}/${e}/${t}.git${H("#",i)}`,edittemplate:({domain:r,user:e,project:t,committish:i,editpath:o,path:a})=>`https://${r}/${e}/${t}${H("/",o,"/",Z(i||"HEAD"),"/",a)}`,browsetemplate:({domain:r,user:e,project:t,committish:i,treepath:o})=>`https://${r}/${e}/${t}${H("/",o,"/",Z(i))}`,browsetreetemplate:({domain:r,user:e,project:t,committish:i,treepath:o,path:a,fragment:u,hashformat:h})=>`https://${r}/${e}/${t}/${o}/${Z(i||"HEAD")}/${a}${H("#",h(u||""))}`,browseblobtemplate:({domain:r,user:e,project:t,committish:i,blobpath:o,path:a,fragment:u,hashformat:h})=>`https://${r}/${e}/${t}/${o}/${Z(i||"HEAD")}/${a}${H("#",h(u||""))}`,docstemplate:({domain:r,user:e,project:t,treepath:i,committish:o})=>`https://${r}/${e}/${t}${H("/",i,"/",Z(o))}#readme`,httpstemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git+https://${H(r,"@")}${e}/${t}/${i}.git${H("#",o)}`,filetemplate:({domain:r,user:e,project:t,committish:i,path:o})=>`https://${r}/${e}/${t}/raw/${Z(i||"HEAD")}/${o}`,shortcuttemplate:({type:r,user:e,project:t,committish:i})=>`${r}:${e}/${t}${H("#",i)}`,pathtemplate:({user:r,project:e,committish:t})=>`${r}/${e}${H("#",t)}`,bugstemplate:({domain:r,user:e,project:t})=>`https://${r}/${e}/${t}/issues`,hashformat:Ac},it={};it.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:r,user:e,project:t,committish:i,path:o})=>`https://${H(r,"@")}raw.githubusercontent.com/${e}/${t}/${Z(i||"HEAD")}/${o}`,gittemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git://${H(r,"@")}${e}/${t}/${i}.git${H("#",o)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://codeload.${r}/${e}/${t}/tar.gz/${Z(i||"HEAD")}`,extract:r=>{let[,e,t,i,o]=r.pathname.split("/",5);if(!(i&&i!=="tree")&&(i||(o=r.hash.slice(1)),t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:o}}};it.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:r,user:e,project:t,committish:i,treepath:o,path:a,editpath:u})=>`https://${r}/${e}/${t}${H("/",o,"/",Z(i||"HEAD"),"/",a,u)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/get/${Z(i||"HEAD")}.tar.gz`,extract:r=>{let[,e,t,i]=r.pathname.split("/",4);if(!["get"].includes(i)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:r.hash.slice(1)}}};it.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git+https://${H(r,"@")}${e}/${t}/${i}.git${H("#",o)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/repository/archive.tar.gz?ref=${Z(i||"HEAD")}`,extract:r=>{let e=r.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let t=e.split("/"),i=t.pop();i.endsWith(".git")&&(i=i.slice(0,-4));let o=t.join("/");if(!(!o||!i))return{user:o,project:i,committish:r.hash.slice(1)}}};it.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:r,project:e,committish:t})=>`git@${r}:${e}.git${H("#",t)}`,sshurltemplate:({domain:r,project:e,committish:t})=>`git+ssh://git@${r}/${e}.git${H("#",t)}`,edittemplate:({domain:r,user:e,project:t,committish:i,editpath:o})=>`https://${r}/${e}/${t}${H("/",Z(i))}/${o}`,browsetemplate:({domain:r,project:e,committish:t})=>`https://${r}/${e}${H("/",Z(t))}`,browsetreetemplate:({domain:r,project:e,committish:t,path:i,hashformat:o})=>`https://${r}/${e}${H("/",Z(t))}${H("#",o(i))}`,browseblobtemplate:({domain:r,project:e,committish:t,path:i,hashformat:o})=>`https://${r}/${e}${H("/",Z(t))}${H("#",o(i))}`,docstemplate:({domain:r,project:e,committish:t})=>`https://${r}/${e}${H("/",Z(t))}`,httpstemplate:({domain:r,project:e,committish:t})=>`git+https://${r}/${e}.git${H("#",t)}`,filetemplate:({user:r,project:e,committish:t,path:i})=>`https://gist.githubusercontent.com/${r}/${e}/raw${H("/",Z(t))}/${i}`,shortcuttemplate:({type:r,project:e,committish:t})=>`${r}:${e}${H("#",t)}`,pathtemplate:({project:r,committish:e})=>`${r}${H("#",e)}`,bugstemplate:({domain:r,project:e})=>`https://${r}/${e}`,gittemplate:({domain:r,project:e,committish:t})=>`git://${r}/${e}.git${H("#",t)}`,tarballtemplate:({project:r,committish:e})=>`https://codeload.github.com/gist/${r}/tar.gz/${Z(e||"HEAD")}`,extract:r=>{let[,e,t,i]=r.pathname.split("/",4);if(i!=="raw"){if(!t){if(!e)return;t=e,e=null}return t.endsWith(".git")&&(t=t.slice(0,-4)),{user:e,project:t,committish:r.hash.slice(1)}}},hashformat:function(r){return r&&"file-"+Ac(r)}};it.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:r,user:e,project:t,committish:i,path:o})=>`https://${r}/${e}/${t}/blob/${Z(i)||"HEAD"}/${o}`,httpstemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}.git${H("#",i)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/archive/${Z(i)||"HEAD"}.tar.gz`,bugstemplate:({user:r,project:e})=>`https://todo.sr.ht/${r}/${e}`,extract:r=>{let[,e,t,i]=r.pathname.split("/",4);if(!["archive"].includes(i)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:r.hash.slice(1)}}};for(let[r,e]of Object.entries(it))it[r]=Object.assign({},Pg,e);Tc.exports=it});var Rs=T((c_,Oc)=>{var Ig=be("url"),Es=(r,e,t)=>{let i=r.indexOf(t);return r.lastIndexOf(e,i>-1?i:1/0)},Cc=r=>{try{return new Ig.URL(r)}catch{}},Lg=(r,e)=>{let t=r.indexOf(":"),i=r.slice(0,t+1);if(Object.prototype.hasOwnProperty.call(e,i))return r;let o=r.indexOf("@");return o>-1?o>t?`git+ssh://${r}`:r:r.indexOf("//")===t+1?r:`${r.slice(0,t+1)}//${r.slice(t+1)}`},xg=r=>{let e=Es(r,"@","#"),t=Es(r,":","#");return t>e&&(r=r.slice(0,t)+"/"+r.slice(t+1)),Es(r,":","#")===-1&&r.indexOf("//")===-1&&(r=`git+ssh://${r}`),r};Oc.exports=(r,e)=>{let t=e?Lg(r,e):r;return Cc(t)||Cc(xg(t))}});var Ic=T((f_,Pc)=>{"use strict";var qg=Rs(),Dg=r=>{let e=r.indexOf("#"),t=r.indexOf("/"),i=r.indexOf("/",t+1),o=r.indexOf(":"),a=/\s/.exec(r),u=r.indexOf("@"),h=!a||e>-1&&a.index>e,d=u===-1||e>-1&&u>e,f=o===-1||e>-1&&o>e,m=i===-1||e>-1&&i>e,y=t>0,g=e>-1?r[e-1]!=="/":!r.endsWith("/"),p=!r.startsWith(".");return h&&y&&g&&p&&d&&f&&m};Pc.exports=(r,e,{gitHosts:t,protocols:i})=>{var R,_;if(!r)return;let o=Dg(r)?`github:${r}`:r,a=qg(o,i);if(!a)return;let u=t.byShortcut[a.protocol],h=t.byDomain[a.hostname.startsWith("www.")?a.hostname.slice(4):a.hostname],d=u||h;if(!d)return;let f=t[u||h],m=null;(R=i[a.protocol])!=null&&R.auth&&(a.username||a.password)&&(m=`${a.username}${a.password?":"+a.password:""}`);let y=null,g=null,p=null,S=null;try{if(u){let v=a.pathname.startsWith("/")?a.pathname.slice(1):a.pathname,P=v.indexOf("@");P>-1&&(v=v.slice(P+1));let D=v.lastIndexOf("/");D>-1?(g=decodeURIComponent(v.slice(0,D)),g||(g=null),p=decodeURIComponent(v.slice(D+1))):p=decodeURIComponent(v),p.endsWith(".git")&&(p=p.slice(0,-4)),a.hash&&(y=decodeURIComponent(a.hash.slice(1))),S="shortcut"}else{if(!f.protocols.includes(a.protocol))return;let v=f.extract(a);if(!v)return;g=v.user&&decodeURIComponent(v.user),p=decodeURIComponent(v.project),y=decodeURIComponent(v.committish),S=((_=i[a.protocol])==null?void 0:_.name)||a.protocol.slice(0,-1)}}catch(v){if(v instanceof URIError)return;throw v}return[d,g,m,p,y,S,e]}});var xc=T((h_,Lc)=>{"use strict";var Bg=vc(),Fg=$c(),Ng=Ic(),zg=Rs(),vs=new Bg({max:1e3}),st,Nr,ee,se,qe=class{constructor(e,t,i,o,a,u,h={}){En(this,ee);Object.assign(this,Je(qe,st)[e],{type:e,user:t,auth:i,project:o,committish:a,default:u,opts:h})}static addHost(e,t){Je(qe,st)[e]=t,Je(qe,st).byDomain[t.domain]=e,Je(qe,st).byShortcut[`${e}:`]=e,Je(qe,Nr)[`${e}:`]={name:e}}static fromUrl(e,t){if(typeof e!="string")return;let i=e+JSON.stringify(t||{});if(!vs.has(i)){let o=Ng(e,t,{gitHosts:Je(qe,st),protocols:Je(qe,Nr)});vs.set(i,o?new qe(...o):void 0)}return vs.get(i)}static parseUrl(e){return zg(e)}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return ne(this,ee,se).call(this,this.sshtemplate,e)}sshurl(e){return ne(this,ee,se).call(this,this.sshurltemplate,e)}browse(e,...t){return typeof e!="string"?ne(this,ee,se).call(this,this.browsetemplate,e):typeof t[0]!="string"?ne(this,ee,se).call(this,this.browsetreetemplate,{...t[0],path:e}):ne(this,ee,se).call(this,this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return typeof t[0]!="string"?ne(this,ee,se).call(this,this.browseblobtemplate,{...t[0],path:e}):ne(this,ee,se).call(this,this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return ne(this,ee,se).call(this,this.docstemplate,e)}bugs(e){return ne(this,ee,se).call(this,this.bugstemplate,e)}https(e){return ne(this,ee,se).call(this,this.httpstemplate,e)}git(e){return ne(this,ee,se).call(this,this.gittemplate,e)}shortcut(e){return ne(this,ee,se).call(this,this.shortcuttemplate,e)}path(e){return ne(this,ee,se).call(this,this.pathtemplate,e)}tarball(e){return ne(this,ee,se).call(this,this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return ne(this,ee,se).call(this,this.filetemplate,{...t,path:e})}edit(e,t){return ne(this,ee,se).call(this,this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}},Xt=qe;st=new WeakMap,Nr=new WeakMap,ee=new WeakSet,se=function(e,t){if(typeof e!="function")return null;let i={...this,...this.opts,...t};i.path||(i.path=""),i.path.startsWith("/")&&(i.path=i.path.slice(1)),i.noCommittish&&(i.committish=null);let o=e(i);return i.noGitPlus&&o.startsWith("git+")?o.slice(4):o},En(Xt,st,{byShortcut:{},byDomain:{}}),En(Xt,Nr,{"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}});for(let[r,e]of Object.entries(Fg))Xt.addHost(r,e);Lc.exports=Xt});function qi({onlyFirst:r=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,r?void 0:"g")}var zi=Ce(Zo(),1);var Jo=zi.default.HttpProxyAgent,ea=zi.default.HttpsProxyAgent;var br=class extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if(typeof this.onEviction=="function")for(let[t,i]of e)this.onEviction(t,i.value)}_deleteIfExpired(e,t){return typeof t.expiry=="number"&&t.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(e,t.value),this.delete(e)):!1}_getOrDeleteIfExpired(e,t){if(this._deleteIfExpired(e,t)===!1)return t.value}_getItemValue(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}_peek(e,t){let i=t.get(e);return this._getItemValue(e,i)}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,t){this.oldCache.delete(e),this._set(e,t)}*_entriesAscending(){for(let e of this.oldCache){let[t,i]=e;this.cache.has(t)||this._deleteIfExpired(t,i)===!1&&(yield e)}for(let e of this.cache){let[t,i]=e;this._deleteIfExpired(t,i)===!1&&(yield e)}}get(e){if(this.cache.has(e)){let t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){let t=this.oldCache.get(e);if(this._deleteIfExpired(e,t)===!1)return this._moveToRecent(e,t),t.value}}set(e,t,{maxAge:i=this.maxAge}={}){let o=typeof i=="number"&&i!==Number.POSITIVE_INFINITY?Date.now()+i:void 0;this.cache.has(e)?this.cache.set(e,{value:t,expiry:o}):this._set(e,{value:t,expiry:o})}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):this.oldCache.has(e)?!this._deleteIfExpired(e,this.oldCache.get(e)):!1}peek(e){if(this.cache.has(e))return this._peek(e,this.cache);if(this.oldCache.has(e))return this._peek(e,this.oldCache)}delete(e){let t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let t=[...this._entriesAscending()],i=t.length-e;i<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(i>0&&this._emitEvictions(t.slice(0,i)),this.oldCache=new Map(t.slice(i)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache){let[t,i]=e;this._deleteIfExpired(t,i)===!1&&(yield[t,i.value])}for(let e of this.oldCache){let[t,i]=e;this.cache.has(t)||this._deleteIfExpired(t,i)===!1&&(yield[t,i.value])}}*entriesDescending(){let e=[...this.cache];for(let t=e.length-1;t>=0;--t){let i=e[t],[o,a]=i;this._deleteIfExpired(o,a)===!1&&(yield[o,a.value])}e=[...this.oldCache];for(let t=e.length-1;t>=0;--t){let i=e[t],[o,a]=i;this.cache.has(o)||this._deleteIfExpired(o,a)===!1&&(yield[o,a.value])}}*entriesAscending(){for(let[e,t]of this._entriesAscending())yield[e,t.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(let t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}entries(){return this.entriesAscending()}forEach(e,t=this){for(let[i,o]of this.entriesAscending())e.call(t,o,i,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};var ia=Ce(ra(),1);import{Agent as Fh}from"node:http";import{Agent as Nh}from"node:https";var zh={agentCacheSize:512},na={maxSockets:64,keepAlive:!1},yr=class extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,yr)}};function Wi(r,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let t={...zh,...e},i=new br({maxSize:t.agentCacheSize});async function o(u,h={}){let{origin:d,protocol:f}=new URL(u),m=h!=null&&h.noProxy?null:(0,ia.getProxyForUrl)(u),y=JSON.stringify({proxyUrl:m,origin:d,...h});if(i.has(y))return i.get(y);let g;if("noProxy"in h&&delete h.noProxy,e.undici){let{ProxyAgent:p,Agent:S}=await import("undici"),R={...h};"keepAlive"in R&&!("pipelining"in R)&&(R.pipelining=R.keepAlive?1:0),"keepAlive"in R&&delete R.keepAlive,"maxSockets"in R&&(R.connections=R.maxSockets,delete R.maxSockets),m?g=new p({...R,uri:m}):g=new S(R)}else{let p=f==="https:";m?g=new(p?ea:Jo)({...h,proxy:m}):g=new(p?Nh:Fh)(h)}return i.set(y,g),g}let a=(u,{timeout:h=0,agentOpts:d={},...f}={})=>new Promise(async(m,y)=>{var S;if(!e.undici&&!("agent"in f)){let R=await o(u,{...na,...d});R&&(f.agent=R)}else if(e.undici&&!("dispatcher"in f)){let R=await o(u,{...na,...d});R&&(f.dispatcher=R)}let g,p;h&&(!("signal"in f)&&globalThis.AbortController&&(p=new AbortController,f.signal=p.signal),g=setTimeout(()=>{var _;(_=p==null?void 0:p.abort)==null||_.call(p);let R=new yr(`${f.method||"GET"} ${u} timed out after ${h}ms`);y(R)},h),(S=g==null?void 0:g.unref)==null||S.call(g)),r(u,f).then(R=>{g&&clearTimeout(g),m(R)}).catch(R=>{if(g&&clearTimeout(g),R.name==="AbortError")return m(null);y(R)})});return a.clearCache=()=>{for(let u of i.values())"destroy"in u&&u.destroy();i.clear()},a}var jc=Ce(ki(),1);import dd from"node:http";import pd from"node:https";import zt from"node:zlib";import Wa,{PassThrough as ka,pipeline as Wt}from"node:stream";import{Buffer as qn}from"node:buffer";function kh(r){if(!/^data:/i.test(r))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');r=r.replace(/\r?\n/g,"");let e=r.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let t=r.substring(5,e).split(";"),i="",o=!1,a=t[0]||"text/plain",u=a;for(let m=1;m<t.length;m++)t[m]==="base64"?o=!0:t[m]&&(u+=`;${t[m]}`,t[m].indexOf("charset=")===0&&(i=t[m].substring(8)));!t[0]&&!i.length&&(u+=";charset=US-ASCII",i="US-ASCII");let h=o?"base64":"ascii",d=unescape(r.substring(e+1)),f=Buffer.from(d,h);return f.type=a,f.typeFull=u,f.charset=i,f}var la=kh;Sr();vn();import tt,{PassThrough as Ta}from"node:stream";import{types as $a,deprecate as Qi,promisify as id}from"node:util";import{Buffer as _e}from"node:buffer";var ke=class extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var de=class extends ke{constructor(e,t,i){super(e,t),i&&(this.code=this.errno=i.code,this.erroredSysCall=i.syscall)}};var An=Symbol.toStringTag,Gi=r=>typeof r=="object"&&typeof r.append=="function"&&typeof r.delete=="function"&&typeof r.get=="function"&&typeof r.getAll=="function"&&typeof r.has=="function"&&typeof r.set=="function"&&typeof r.sort=="function"&&r[An]==="URLSearchParams",wr=r=>r&&typeof r=="object"&&typeof r.arrayBuffer=="function"&&typeof r.type=="string"&&typeof r.stream=="function"&&typeof r.constructor=="function"&&/^(Blob|File)$/.test(r[An]),ba=r=>typeof r=="object"&&(r[An]==="AbortSignal"||r[An]==="EventTarget"),ya=(r,e)=>{let t=new URL(e).hostname,i=new URL(r).hostname;return t===i||t.endsWith(`.${i}`)},Sa=(r,e)=>{let t=new URL(e).protocol,i=new URL(r).protocol;return t===i};var sd=id(tt.pipeline),pe=Symbol("Body internals"),xe=class{constructor(e,{size:t=0}={}){let i=null;e===null?e=null:Gi(e)?e=_e.from(e.toString()):wr(e)||_e.isBuffer(e)||($a.isAnyArrayBuffer(e)?e=_e.from(e):ArrayBuffer.isView(e)?e=_e.from(e.buffer,e.byteOffset,e.byteLength):e instanceof tt||(e instanceof mt?(e=ga(e),i=e.type.split("=")[1]):e=_e.from(String(e))));let o=e;_e.isBuffer(e)?o=tt.Readable.from(e):wr(e)&&(o=tt.Readable.from(e.stream())),this[pe]={body:e,stream:o,boundary:i,disturbed:!1,error:null},this.size=t,e instanceof tt&&e.on("error",a=>{let u=a instanceof ke?a:new de(`Invalid response body while trying to fetch ${this.url}: ${a.message}`,"system",a);this[pe].error=u})}get body(){return this[pe].stream}get bodyUsed(){return this[pe].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:t,byteLength:i}=await Xi(this);return e.slice(t,t+i)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let i=new mt,o=new URLSearchParams(await this.text());for(let[a,u]of o)i.append(a,u);return i}let{toFormData:t}=await Promise.resolve().then(()=>(Aa(),va));return t(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[pe].body&&this[pe].body.type||"",t=await this.arrayBuffer();return new We([t],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await Xi(this);return new TextDecoder().decode(e)}buffer(){return Xi(this)}};xe.prototype.buffer=Qi(xe.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(xe.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:Qi(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function Xi(r){if(r[pe].disturbed)throw new TypeError(`body used already for: ${r.url}`);if(r[pe].disturbed=!0,r[pe].error)throw r[pe].error;let{body:e}=r;if(e===null)return _e.alloc(0);if(!(e instanceof tt))return _e.alloc(0);let t=[],i=0;try{for await(let o of e){if(r.size>0&&i+o.length>r.size){let a=new de(`content size at ${r.url} over limit: ${r.size}`,"max-size");throw e.destroy(a),a}i+=o.length,t.push(o)}}catch(o){throw o instanceof ke?o:new de(`Invalid response body while trying to fetch ${r.url}: ${o.message}`,"system",o)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return t.every(o=>typeof o=="string")?_e.from(t.join("")):_e.concat(t,i)}catch(o){throw new de(`Could not create Buffer from response body for ${r.url}: ${o.message}`,"system",o)}else throw new de(`Premature close of server response while trying to fetch ${r.url}`)}var Ft=(r,e)=>{let t,i,{body:o}=r[pe];if(r.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof tt&&typeof o.getBoundary!="function"&&(t=new Ta({highWaterMark:e}),i=new Ta({highWaterMark:e}),o.pipe(t),o.pipe(i),r[pe].stream=t,o=i),o},od=Qi(r=>r.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),On=(r,e)=>r===null?null:typeof r=="string"?"text/plain;charset=UTF-8":Gi(r)?"application/x-www-form-urlencoded;charset=UTF-8":wr(r)?r.type||null:_e.isBuffer(r)||$a.isAnyArrayBuffer(r)||ArrayBuffer.isView(r)?null:r instanceof mt?`multipart/form-data; boundary=${e[pe].boundary}`:r&&typeof r.getBoundary=="function"?`multipart/form-data;boundary=${od(r)}`:r instanceof tt?null:"text/plain;charset=UTF-8",Ca=r=>{let{body:e}=r[pe];return e===null?0:wr(e)?e.size:_e.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},Oa=async(r,{body:e})=>{e===null?r.end():await sd(e,r)};import{types as Pa}from"node:util";import In from"node:http";var Pn=typeof In.validateHeaderName=="function"?In.validateHeaderName:r=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(r)){let e=new TypeError(`Header name must be a valid HTTP token [${r}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},Ki=typeof In.validateHeaderValue=="function"?In.validateHeaderValue:(r,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let t=new TypeError(`Invalid character in header content ["${r}"]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_CHAR"}),t}},ue=class extends URLSearchParams{constructor(e){let t=[];if(e instanceof ue){let i=e.raw();for(let[o,a]of Object.entries(i))t.push(...a.map(u=>[o,u]))}else if(e!=null)if(typeof e=="object"&&!Pa.isBoxedPrimitive(e)){let i=e[Symbol.iterator];if(i==null)t.push(...Object.entries(e));else{if(typeof i!="function")throw new TypeError("Header pairs must be iterable");t=[...e].map(o=>{if(typeof o!="object"||Pa.isBoxedPrimitive(o))throw new TypeError("Each header pair must be an iterable object");return[...o]}).map(o=>{if(o.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...o]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return t=t.length>0?t.map(([i,o])=>(Pn(i),Ki(i,String(o)),[String(i).toLowerCase(),String(o)])):void 0,super(t),new Proxy(this,{get(i,o,a){switch(o){case"append":case"set":return(u,h)=>(Pn(u),Ki(u,String(h)),URLSearchParams.prototype[o].call(i,String(u).toLowerCase(),String(h)));case"delete":case"has":case"getAll":return u=>(Pn(u),URLSearchParams.prototype[o].call(i,String(u).toLowerCase()));case"keys":return()=>(i.sort(),new Set(URLSearchParams.prototype.keys.call(i)).keys());default:return Reflect.get(i,o,a)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let t=this.getAll(e);if(t.length===0)return null;let i=t.join(", ");return/^content-encoding$/i.test(e)&&(i=i.toLowerCase()),i}forEach(e,t=void 0){for(let i of this.keys())Reflect.apply(e,t,[this.get(i),i,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,t)=>(e[t]=this.getAll(t),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,t)=>{let i=this.getAll(t);return t==="host"?e[t]=i[0]:e[t]=i.length>1?i:i[0],e},{})}};Object.defineProperties(ue.prototype,["get","entries","forEach","values"].reduce((r,e)=>(r[e]={enumerable:!0},r),{}));function Ia(r=[]){return new ue(r.reduce((e,t,i,o)=>(i%2===0&&e.push(o.slice(i,i+2)),e),[]).filter(([e,t])=>{try{return Pn(e),Ki(e,String(t)),!0}catch{return!1}}))}var ad=new Set([301,302,303,307,308]),Ln=r=>ad.has(r);var Oe=Symbol("Response internals"),ie=class extends xe{constructor(e=null,t={}){super(e,t);let i=t.status!=null?t.status:200,o=new ue(t.headers);if(e!==null&&!o.has("Content-Type")){let a=On(e,this);a&&o.append("Content-Type",a)}this[Oe]={type:"default",url:t.url,status:i,statusText:t.statusText||"",headers:o,counter:t.counter,highWaterMark:t.highWaterMark}}get type(){return this[Oe].type}get url(){return this[Oe].url||""}get status(){return this[Oe].status}get ok(){return this[Oe].status>=200&&this[Oe].status<300}get redirected(){return this[Oe].counter>0}get statusText(){return this[Oe].statusText}get headers(){return this[Oe].headers}get highWaterMark(){return this[Oe].highWaterMark}clone(){return new ie(Ft(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,t=302){if(!Ln(t))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new ie(null,{headers:{location:new URL(e).toString()},status:t})}static error(){let e=new ie(null,{status:0,statusText:""});return e[Oe].type="error",e}static json(e=void 0,t={}){let i=JSON.stringify(e);if(i===void 0)throw new TypeError("data is not JSON serializable");let o=new ue(t&&t.headers);return o.has("content-type")||o.set("content-type","application/json"),new ie(i,{...t,headers:o})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(ie.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});import{format as cd}from"node:url";import{deprecate as fd}from"node:util";var La=r=>{if(r.search)return r.search;let e=r.href.length-1,t=r.hash||(r.href[e]==="#"?"#":"");return r.href[e-t.length]==="?"?"?":""};import{isIP as ld}from"node:net";function xa(r,e=!1){return r==null||(r=new URL(r),/^(about|blob|data):$/.test(r.protocol))?"no-referrer":(r.username="",r.password="",r.hash="",e&&(r.pathname="",r.search=""),r)}var qa=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Da="strict-origin-when-cross-origin";function Ba(r){if(!qa.has(r))throw new TypeError(`Invalid referrerPolicy: ${r}`);return r}function ud(r){if(/^(http|ws)s:$/.test(r.protocol))return!0;let e=r.host.replace(/(^\[)|(]$)/g,""),t=ld(e);return t===4&&/^127\./.test(e)||t===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:r.host==="localhost"||r.host.endsWith(".localhost")?!1:r.protocol==="file:"}function Nt(r){return/^about:(blank|srcdoc)$/.test(r)||r.protocol==="data:"||/^(blob|filesystem):$/.test(r.protocol)?!0:ud(r)}function Fa(r,{referrerURLCallback:e,referrerOriginCallback:t}={}){if(r.referrer==="no-referrer"||r.referrerPolicy==="")return null;let i=r.referrerPolicy;if(r.referrer==="about:client")return"no-referrer";let o=r.referrer,a=xa(o),u=xa(o,!0);a.toString().length>4096&&(a=u),e&&(a=e(a)),t&&(u=t(u));let h=new URL(r.url);switch(i){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return a;case"strict-origin":return Nt(a)&&!Nt(h)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return a.origin===h.origin?a:Nt(a)&&!Nt(h)?"no-referrer":u;case"same-origin":return a.origin===h.origin?a:"no-referrer";case"origin-when-cross-origin":return a.origin===h.origin?a:u;case"no-referrer-when-downgrade":return Nt(a)&&!Nt(h)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${i}`)}}function Na(r){let e=(r.get("referrer-policy")||"").split(/[,\s]+/),t="";for(let i of e)i&&qa.has(i)&&(t=i);return t}var te=Symbol("Request internals"),Rr=r=>typeof r=="object"&&typeof r[te]=="object",hd=fd(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),je=class extends xe{constructor(e,t={}){let i;if(Rr(e)?i=new URL(e.url):(i=new URL(e),e={}),i.username!==""||i.password!=="")throw new TypeError(`${i} is an url with embedded credentials.`);let o=t.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(o)&&(o=o.toUpperCase()),!Rr(t)&&"data"in t&&hd(),(t.body!=null||Rr(e)&&e.body!==null)&&(o==="GET"||o==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let a=t.body?t.body:Rr(e)&&e.body!==null?Ft(e):null;super(a,{size:t.size||e.size||0});let u=new ue(t.headers||e.headers||{});if(a!==null&&!u.has("Content-Type")){let f=On(a,this);f&&u.set("Content-Type",f)}let h=Rr(e)?e.signal:null;if("signal"in t&&(h=t.signal),h!=null&&!ba(h))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let d=t.referrer==null?e.referrer:t.referrer;if(d==="")d="no-referrer";else if(d){let f=new URL(d);d=/^about:(\/\/)?client$/.test(f)?"client":f}else d=void 0;this[te]={method:o,redirect:t.redirect||e.redirect||"follow",headers:u,parsedURL:i,signal:h,referrer:d},this.follow=t.follow===void 0?e.follow===void 0?20:e.follow:t.follow,this.compress=t.compress===void 0?e.compress===void 0?!0:e.compress:t.compress,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent,this.highWaterMark=t.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=t.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=t.referrerPolicy||e.referrerPolicy||""}get method(){return this[te].method}get url(){return cd(this[te].parsedURL)}get headers(){return this[te].headers}get redirect(){return this[te].redirect}get signal(){return this[te].signal}get referrer(){if(this[te].referrer==="no-referrer")return"";if(this[te].referrer==="client")return"about:client";if(this[te].referrer)return this[te].referrer.toString()}get referrerPolicy(){return this[te].referrerPolicy}set referrerPolicy(e){this[te].referrerPolicy=Ba(e)}clone(){return new je(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(je.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});var za=r=>{let{parsedURL:e}=r[te],t=new ue(r[te].headers);t.has("Accept")||t.set("Accept","*/*");let i=null;if(r.body===null&&/^(post|put)$/i.test(r.method)&&(i="0"),r.body!==null){let h=Ca(r);typeof h=="number"&&!Number.isNaN(h)&&(i=String(h))}i&&t.set("Content-Length",i),r.referrerPolicy===""&&(r.referrerPolicy=Da),r.referrer&&r.referrer!=="no-referrer"?r[te].referrer=Fa(r):r[te].referrer="no-referrer",r[te].referrer instanceof URL&&t.set("Referer",r.referrer),t.has("User-Agent")||t.set("User-Agent","node-fetch"),r.compress&&!t.has("Accept-Encoding")&&t.set("Accept-Encoding","gzip, deflate, br");let{agent:o}=r;typeof o=="function"&&(o=o(e)),!t.has("Connection")&&!o&&t.set("Connection","close");let a=La(e),u={path:e.pathname+a,method:r.method,headers:t[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:r.insecureHTTPParser,agent:o};return{parsedURL:e,options:u}};var xn=class extends ke{constructor(e,t="aborted"){super(e,t)}};vn();Vi();var md=new Set(["data:","http:","https:"]);async function Dn(r,e){return new Promise((t,i)=>{let o=new je(r,e),{parsedURL:a,options:u}=za(o);if(!md.has(a.protocol))throw new TypeError(`node-fetch cannot load ${r}. URL scheme "${a.protocol.replace(/:$/,"")}" is not supported.`);if(a.protocol==="data:"){let S=la(o.url),R=new ie(S,{headers:{"Content-Type":S.typeFull}});t(R);return}let h=(a.protocol==="https:"?pd:dd).request,{signal:d}=o,f=null,m=()=>{let S=new xn("The operation was aborted.");i(S),o.body&&o.body instanceof Wa.Readable&&o.body.destroy(S),!(!f||!f.body)&&f.body.emit("error",S)};if(d&&d.aborted){m();return}let y=()=>{m(),p()},g=h(a.toString(),u);d&&d.addEventListener("abort",y);let p=()=>{g.abort(),d&&d.removeEventListener("abort",y)};g.on("error",S=>{i(new de(`request to ${o.url} failed, reason: ${S.message}`,"system",S)),p()}),gd(g,S=>{f&&f.body&&f.body.destroy(S)}),process.version<"v14"&&g.on("socket",S=>{let R;S.prependListener("end",()=>{R=S._eventsCount}),S.prependListener("close",_=>{if(f&&R<S._eventsCount&&!_){let v=new Error("Premature close");v.code="ERR_STREAM_PREMATURE_CLOSE",f.body.emit("error",v)}})}),g.on("response",S=>{g.setTimeout(0);let R=Ia(S.rawHeaders);if(Ln(S.statusCode)){let A=R.get("Location"),q=null;try{q=A===null?null:new URL(A,o.url)}catch{if(o.redirect!=="manual"){i(new de(`uri requested responds with an invalid redirect URL: ${A}`,"invalid-redirect")),p();return}}switch(o.redirect){case"error":i(new de(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,"no-redirect")),p();return;case"manual":break;case"follow":{if(q===null)break;if(o.counter>=o.follow){i(new de(`maximum redirect reached at: ${o.url}`,"max-redirect")),p();return}let I={headers:new ue(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:Ft(o),signal:o.signal,size:o.size,referrer:o.referrer,referrerPolicy:o.referrerPolicy};if(!ya(o.url,q)||!Sa(o.url,q))for(let k of["authorization","www-authenticate","cookie","cookie2"])I.headers.delete(k);if(S.statusCode!==303&&o.body&&e.body instanceof Wa.Readable){i(new de("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(S.statusCode===303||(S.statusCode===301||S.statusCode===302)&&o.method==="POST")&&(I.method="GET",I.body=void 0,I.headers.delete("content-length"));let L=Na(R);L&&(I.referrerPolicy=L),t(Dn(new je(q,I))),p();return}default:return i(new TypeError(`Redirect option '${o.redirect}' is not a valid value of RequestRedirect`))}}d&&S.once("end",()=>{d.removeEventListener("abort",y)});let _=Wt(S,new ka,A=>{A&&i(A)});process.version<"v12.10"&&S.on("aborted",y);let v={url:o.url,status:S.statusCode,statusText:S.statusMessage,headers:R,size:o.size,counter:o.counter,highWaterMark:o.highWaterMark},P=R.get("Content-Encoding");if(!o.compress||o.method==="HEAD"||P===null||S.statusCode===204||S.statusCode===304){f=new ie(_,v),t(f);return}let D={flush:zt.Z_SYNC_FLUSH,finishFlush:zt.Z_SYNC_FLUSH};if(P==="gzip"||P==="x-gzip"){_=Wt(_,zt.createGunzip(D),A=>{A&&i(A)}),f=new ie(_,v),t(f);return}if(P==="deflate"||P==="x-deflate"){let A=Wt(S,new ka,q=>{q&&i(q)});A.once("data",q=>{(q[0]&15)===8?_=Wt(_,zt.createInflate(),I=>{I&&i(I)}):_=Wt(_,zt.createInflateRaw(),I=>{I&&i(I)}),f=new ie(_,v),t(f)}),A.once("end",()=>{f||(f=new ie(_,v),t(f))});return}if(P==="br"){_=Wt(_,zt.createBrotliDecompress(),A=>{A&&i(A)}),f=new ie(_,v),t(f);return}f=new ie(_,v),t(f)}),Oa(g,o).catch(i)})}function gd(r,e){let t=qn.from(`0\r
16
+ `;function Ma(r,e){var t=[],i="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var o=e.whitespace?" = ":"=";return Object.keys(r).forEach(function(a,u,h){var d=r[a];d&&Array.isArray(d)?d.forEach(function(f){i+=Wt(a+"[]")+o+Wt(f)+`
17
+ `}):d&&typeof d=="object"?t.push(a):i+=Wt(a)+o+Wt(d)+Ji}),e.section&&i.length&&(i="["+Wt(e.section)+"]"+Ji+i),t.forEach(function(a,u,h){var d=Ha(a).join("\\."),f=(e.section?e.section+".":"")+d,m=Ma(r[a],{section:f,whitespace:e.whitespace});i.length&&m.length&&(i+=Ji),i+=m}),i}function Ha(r){return r.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function Sd(r){var e={},t=e,i=null,o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,a=r.split(/[\r\n]+/g);return a.forEach(function(u,h,d){if(!(!u||u.match(/^\s*[;#]/))){var f=u.match(o);if(f){if(f[1]!==void 0){if(i=Bn(f[1]),i==="__proto__"){t={};return}t=e[i]=e[i]||{};return}var m=Bn(f[2]);if(m!=="__proto__"){var y=f[3]?Bn(f[4]):!0;switch(y){case"true":case"false":case"null":y=JSON.parse(y)}if(m.length>2&&m.slice(-2)==="[]"){if(m=m.substring(0,m.length-2),m==="__proto__")return;t[m]?Array.isArray(t[m])||(t[m]=[t[m]]):t[m]=[]}Array.isArray(t[m])?t[m].push(y):t[m]=y}}}}),Object.keys(e).filter(function(u,h,d){if(!e[u]||typeof e[u]!="object"||Array.isArray(e[u]))return!1;var f=Ha(u),m=e,y=f.pop(),g=y.replace(/\\\./g,".");return f.forEach(function(p,_,R){p!=="__proto__"&&((!m[p]||typeof m[p]!="object")&&(m[p]={}),m=m[p])}),m===e&&g===y?!1:(m[g]=e[u],!0)}).forEach(function(u,h,d){delete e[u]}),e}function Ga(r){return r.charAt(0)==='"'&&r.slice(-1)==='"'||r.charAt(0)==="'"&&r.slice(-1)==="'"}function Wt(r){return typeof r!="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&Ga(r)||r!==r.trim()?JSON.stringify(r):r.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Bn(r,e){if(r=(r||"").trim(),Ga(r)){r.charAt(0)==="'"&&(r=r.substr(1,r.length-2));try{r=JSON.parse(r)}catch{}}else{for(var t=!1,i="",o=0,a=r.length;o<a;o++){var u=r.charAt(o);if(t)"\\;#".indexOf(u)!==-1?i+=u:i+="\\"+u,t=!1;else{if(";#".indexOf(u)!==-1)break;u==="\\"?t=!0:i+=u}}return t&&(i+="\\"),i.trim()}return r}});var Qa=T((iS,Xa)=>{"use strict";var es=1,Ya=2;function _d(){return""}function wd(r,e,t){return r.slice(e,t).replace(/\S/g," ")}Xa.exports=function(r,e){e=e||{};for(var t,i,o=!1,a=!1,u=0,h="",d=e.whitespace===!1?_d:wd,f=0;f<r.length;f++){if(t=r[f],i=r[f+1],!a&&t==='"'){var m=r[f-1]==="\\"&&r[f-2]!=="\\";m||(o=!o)}if(!o){if(!a&&t+i==="//")h+=r.slice(u,f),u=f,a=es,f++;else if(a===es&&t+i===`\r
18
+ `){f++,a=!1,h+=d(r,u,f),u=f;continue}else if(a===es&&t===`
19
+ `)a=!1,h+=d(r,u,f),u=f;else if(!a&&t+i==="/*"){h+=r.slice(u,f),u=f,a=Ya,f++;continue}else if(a===Ya&&t+i==="*/"){f++,a=!1,h+=d(r,u,f+1),u=f+1;continue}}}return h+(a?d(r.substr(u)):r.substr(u))}});var Za=T(jt=>{"use strict";var Ka=be("fs"),Ed=Va(),Ar=be("path"),Rd=Qa(),vd=jt.parse=function(r){return/^\s*{/.test(r)?JSON.parse(Rd(r)):Ed.parse(r)},Ad=jt.file=function(){var r=[].slice.call(arguments).filter(function(o){return o!=null});for(var e in r)if(typeof r[e]!="string")return;var t=Ar.join.apply(null,r),i;try{return Ka.readFileSync(t,"utf-8")}catch{return}},sS=jt.json=function(){var r=Ad.apply(null,arguments);return r?vd(r):null},oS=jt.env=function(r,e){e=e||process.env;var t={},i=r.length;for(var o in e)if(o.toLowerCase().indexOf(r.toLowerCase())===0){for(var a=o.substring(i).split("__"),u;(u=a.indexOf(""))>-1;)a.splice(u,1);var h=t;a.forEach(function(f,m){!f||typeof h!="object"||(m===a.length-1&&(h[f]=e[o]),h[f]===void 0&&(h[f]={}),h=h[f])})}return t},aS=jt.find=function(){var r=Ar.join.apply(null,[].slice.call(arguments));function e(t,i){var o=Ar.join(t,i);try{return Ka.statSync(o),o}catch{if(Ar.dirname(t)!==t)return e(Ar.dirname(t),i)}}return e(process.cwd(),r)}});var il=T((uS,nl)=>{"use strict";function el(r){return r instanceof Buffer||r instanceof Date||r instanceof RegExp}function tl(r){if(r instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(r.length):new Buffer(r.length);return r.copy(e),e}else{if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp)return new RegExp(r);throw new Error("Unexpected situation")}}function rl(r){var e=[];return r.forEach(function(t,i){typeof t=="object"&&t!==null?Array.isArray(t)?e[i]=rl(t):el(t)?e[i]=tl(t):e[i]=ts({},t):e[i]=t}),e}function Ja(r,e){return e==="__proto__"?void 0:r[e]}var ts=nl.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var r=arguments[0],e=Array.prototype.slice.call(arguments,1),t,i,o;return e.forEach(function(a){typeof a!="object"||a===null||Array.isArray(a)||Object.keys(a).forEach(function(u){if(i=Ja(r,u),t=Ja(a,u),t!==r)if(typeof t!="object"||t===null){r[u]=t;return}else if(Array.isArray(t)){r[u]=rl(t);return}else if(el(t)){r[u]=tl(t);return}else if(typeof i!="object"||i===null||Array.isArray(i)){r[u]=ts({},t);return}else{r[u]=ts(i,t);return}})}),r}});var Fn=T((cS,al)=>{var Tr=Za(),Ut=be("path").join,Td=il(),sl="/etc",ol=process.platform==="win32",$r=ol?process.env.USERPROFILE:process.env.HOME;al.exports=function(r,e,t,i){if(typeof r!="string")throw new Error("rc(name): name *must* be string");t||(t=ji()(process.argv.slice(2))),e=(typeof e=="string"?Tr.json(e):e)||{},i=i||Tr.parse;var o=Tr.env(r+"_"),a=[e],u=[];function h(d){if(!(u.indexOf(d)>=0)){var f=Tr.file(d);f&&(a.push(i(f)),u.push(d))}}return ol||[Ut(sl,r,"config"),Ut(sl,r+"rc")].forEach(h),$r&&[Ut($r,".config",r,"config"),Ut($r,".config",r),Ut($r,"."+r,"config"),Ut($r,"."+r+"rc")].forEach(h),h(Tr.find("."+r+"rc")),o.config&&h(o.config),t.config&&h(t.config),Td.apply(null,a.concat([o,t,u.length?{configs:u,config:u[u.length-1]}:void 0]))}});var ml=T((fS,pl)=>{var rs=be("url"),hl=Ua(),$d=hl.decodeBase64,Cd=hl.encodeBase64,ll=":_authToken",ul=":_auth",cl=":username",fl=":_password";pl.exports=function(){var r,e;return arguments.length>=2?(r=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?r=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||Fn()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),r=r||e.npmrc.registry,dl(r,e)||Od(e.npmrc)};function dl(r,e){for(var t=rs.parse(r,!1,!0),i;i!=="/"&&t.pathname!==i;){i=t.pathname||"/";var o="//"+t.host+i.replace(/\/$/,""),a=Id(o,e.npmrc);if(a)return a;if(!e.recursive)return/\/$/.test(r)?void 0:dl(rs.resolve(r,"."),e);t.pathname=rs.resolve(Pd(i),"..")||"/"}}function Od(r){if(r._auth){var e=Nn(r._auth);return{token:e,type:"Basic"}}}function Pd(r){return r[r.length-1]==="/"?r:r+"/"}function Id(r,e){var t=Ld(e[r+ll]||e[r+"/"+ll]);if(t)return t;var i=e[r+cl]||e[r+"/"+cl],o=e[r+fl]||e[r+"/"+fl],a=xd(i,o);if(a)return a;var u=qd(e[r+ul]||e[r+"/"+ul]);if(u)return u}function Nn(r){return r.replace(/^\$\{?([^}]*)\}?$/,function(e,t){return process.env[t]})}function Ld(r){if(r){var e=Nn(r);return{token:e,type:"Bearer"}}}function xd(r,e){if(!(!r||!e)){var t=$d(Nn(e)),i=Cd(r+":"+t);return{token:i,type:"Basic",password:t,username:r}}}function qd(r){if(r){var e=Nn(r);return{token:e,type:"Basic"}}}});var bl=T((hS,gl)=>{gl.exports=function(r,e){var t=e||Fn()("npm",{registry:"https://registry.npmjs.org/"}),i=t[r+":registry"]||t.registry;return i.slice(-1)==="/"?i:i+"/"}});var Cr=T((dS,yl)=>{var Dd="2.0.0",Bd=Number.MAX_SAFE_INTEGER||9007199254740991,Fd=16;yl.exports={SEMVER_SPEC_VERSION:Dd,MAX_LENGTH:256,MAX_SAFE_INTEGER:Bd,MAX_SAFE_COMPONENT_LENGTH:Fd}});var Or=T((pS,Sl)=>{var Nd=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Sl.exports=Nd});var yt=T((rt,_l)=>{var{MAX_SAFE_COMPONENT_LENGTH:ns}=Cr(),zd=Or();rt=_l.exports={};var kd=rt.re=[],C=rt.src=[],O=rt.t={},Wd=0,N=(r,e,t)=>{let i=Wd++;zd(r,i,e),O[r]=i,C[i]=e,kd[i]=new RegExp(e,t?"g":void 0)};N("NUMERICIDENTIFIER","0|[1-9]\\d*");N("NUMERICIDENTIFIERLOOSE","[0-9]+");N("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");N("MAINVERSION",`(${C[O.NUMERICIDENTIFIER]})\\.(${C[O.NUMERICIDENTIFIER]})\\.(${C[O.NUMERICIDENTIFIER]})`);N("MAINVERSIONLOOSE",`(${C[O.NUMERICIDENTIFIERLOOSE]})\\.(${C[O.NUMERICIDENTIFIERLOOSE]})\\.(${C[O.NUMERICIDENTIFIERLOOSE]})`);N("PRERELEASEIDENTIFIER",`(?:${C[O.NUMERICIDENTIFIER]}|${C[O.NONNUMERICIDENTIFIER]})`);N("PRERELEASEIDENTIFIERLOOSE",`(?:${C[O.NUMERICIDENTIFIERLOOSE]}|${C[O.NONNUMERICIDENTIFIER]})`);N("PRERELEASE",`(?:-(${C[O.PRERELEASEIDENTIFIER]}(?:\\.${C[O.PRERELEASEIDENTIFIER]})*))`);N("PRERELEASELOOSE",`(?:-?(${C[O.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[O.PRERELEASEIDENTIFIERLOOSE]})*))`);N("BUILDIDENTIFIER","[0-9A-Za-z-]+");N("BUILD",`(?:\\+(${C[O.BUILDIDENTIFIER]}(?:\\.${C[O.BUILDIDENTIFIER]})*))`);N("FULLPLAIN",`v?${C[O.MAINVERSION]}${C[O.PRERELEASE]}?${C[O.BUILD]}?`);N("FULL",`^${C[O.FULLPLAIN]}$`);N("LOOSEPLAIN",`[v=\\s]*${C[O.MAINVERSIONLOOSE]}${C[O.PRERELEASELOOSE]}?${C[O.BUILD]}?`);N("LOOSE",`^${C[O.LOOSEPLAIN]}$`);N("GTLT","((?:<|>)?=?)");N("XRANGEIDENTIFIERLOOSE",`${C[O.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);N("XRANGEIDENTIFIER",`${C[O.NUMERICIDENTIFIER]}|x|X|\\*`);N("XRANGEPLAIN",`[v=\\s]*(${C[O.XRANGEIDENTIFIER]})(?:\\.(${C[O.XRANGEIDENTIFIER]})(?:\\.(${C[O.XRANGEIDENTIFIER]})(?:${C[O.PRERELEASE]})?${C[O.BUILD]}?)?)?`);N("XRANGEPLAINLOOSE",`[v=\\s]*(${C[O.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[O.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[O.XRANGEIDENTIFIERLOOSE]})(?:${C[O.PRERELEASELOOSE]})?${C[O.BUILD]}?)?)?`);N("XRANGE",`^${C[O.GTLT]}\\s*${C[O.XRANGEPLAIN]}$`);N("XRANGELOOSE",`^${C[O.GTLT]}\\s*${C[O.XRANGEPLAINLOOSE]}$`);N("COERCE",`(^|[^\\d])(\\d{1,${ns}})(?:\\.(\\d{1,${ns}}))?(?:\\.(\\d{1,${ns}}))?(?:$|[^\\d])`);N("COERCERTL",C[O.COERCE],!0);N("LONETILDE","(?:~>?)");N("TILDETRIM",`(\\s*)${C[O.LONETILDE]}\\s+`,!0);rt.tildeTrimReplace="$1~";N("TILDE",`^${C[O.LONETILDE]}${C[O.XRANGEPLAIN]}$`);N("TILDELOOSE",`^${C[O.LONETILDE]}${C[O.XRANGEPLAINLOOSE]}$`);N("LONECARET","(?:\\^)");N("CARETTRIM",`(\\s*)${C[O.LONECARET]}\\s+`,!0);rt.caretTrimReplace="$1^";N("CARET",`^${C[O.LONECARET]}${C[O.XRANGEPLAIN]}$`);N("CARETLOOSE",`^${C[O.LONECARET]}${C[O.XRANGEPLAINLOOSE]}$`);N("COMPARATORLOOSE",`^${C[O.GTLT]}\\s*(${C[O.LOOSEPLAIN]})$|^$`);N("COMPARATOR",`^${C[O.GTLT]}\\s*(${C[O.FULLPLAIN]})$|^$`);N("COMPARATORTRIM",`(\\s*)${C[O.GTLT]}\\s*(${C[O.LOOSEPLAIN]}|${C[O.XRANGEPLAIN]})`,!0);rt.comparatorTrimReplace="$1$2$3";N("HYPHENRANGE",`^\\s*(${C[O.XRANGEPLAIN]})\\s+-\\s+(${C[O.XRANGEPLAIN]})\\s*$`);N("HYPHENRANGELOOSE",`^\\s*(${C[O.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[O.XRANGEPLAINLOOSE]})\\s*$`);N("STAR","(<|>)?=?\\s*\\*");N("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");N("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Pr=T((mS,wl)=>{var jd=["includePrerelease","loose","rtl"],Ud=r=>r?typeof r!="object"?{loose:!0}:jd.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};wl.exports=Ud});var is=T((gS,vl)=>{var El=/^[0-9]+$/,Rl=(r,e)=>{let t=El.test(r),i=El.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:r<e?-1:1},Md=(r,e)=>Rl(e,r);vl.exports={compareIdentifiers:Rl,rcompareIdentifiers:Md}});var ae=T((bS,Cl)=>{var zn=Or(),{MAX_LENGTH:Al,MAX_SAFE_INTEGER:kn}=Cr(),{re:Tl,t:$l}=yt(),Hd=Pr(),{compareIdentifiers:Mt}=is(),ye=class{constructor(e,t){if(t=Hd(t),e instanceof ye){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Al)throw new TypeError(`version is longer than ${Al} characters`);zn("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?Tl[$l.LOOSE]:Tl[$l.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>kn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>kn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>kn||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let a=+o;if(a>=0&&a<kn)return a}return o}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(zn("SemVer.compare",this.version,this.options,e),!(e instanceof ye)){if(typeof e=="string"&&e===this.version)return 0;e=new ye(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof ye||(e=new ye(e,this.options)),Mt(this.major,e.major)||Mt(this.minor,e.minor)||Mt(this.patch,e.patch)}comparePre(e){if(e instanceof ye||(e=new ye(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let i=this.prerelease[t],o=e.prerelease[t];if(zn("prerelease compare",t,i,o),i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i===o)continue;return Mt(i,o)}while(++t)}compareBuild(e){e instanceof ye||(e=new ye(e,this.options));let t=0;do{let i=this.build[t],o=e.build[t];if(zn("prerelease compare",t,i,o),i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i===o)continue;return Mt(i,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);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":if(this.prerelease.length===0)this.prerelease=[0];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(Mt(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};Cl.exports=ye});var St=T((yS,Ll)=>{var{MAX_LENGTH:Gd}=Cr(),{re:Ol,t:Pl}=yt(),Il=ae(),Vd=Pr(),Yd=(r,e)=>{if(e=Vd(e),r instanceof Il)return r;if(typeof r!="string"||r.length>Gd||!(e.loose?Ol[Pl.LOOSE]:Ol[Pl.FULL]).test(r))return null;try{return new Il(r,e)}catch{return null}};Ll.exports=Yd});var ql=T((SS,xl)=>{var Xd=St(),Qd=(r,e)=>{let t=Xd(r,e);return t?t.version:null};xl.exports=Qd});var Bl=T((_S,Dl)=>{var Kd=St(),Zd=(r,e)=>{let t=Kd(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Dl.exports=Zd});var zl=T((wS,Nl)=>{var Fl=ae(),Jd=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new Fl(r instanceof Fl?r.version:r,t).inc(e,i).version}catch{return null}};Nl.exports=Jd});var we=T((ES,Wl)=>{var kl=ae(),ep=(r,e,t)=>new kl(r,t).compare(new kl(e,t));Wl.exports=ep});var Wn=T((RS,jl)=>{var tp=we(),rp=(r,e,t)=>tp(r,e,t)===0;jl.exports=rp});var Hl=T((vS,Ml)=>{var Ul=St(),np=Wn(),ip=(r,e)=>{if(np(r,e))return null;{let t=Ul(r),i=Ul(e),o=t.prerelease.length||i.prerelease.length,a=o?"pre":"",u=o?"prerelease":"";for(let h in t)if((h==="major"||h==="minor"||h==="patch")&&t[h]!==i[h])return a+h;return u}};Ml.exports=ip});var Vl=T((AS,Gl)=>{var sp=ae(),op=(r,e)=>new sp(r,e).major;Gl.exports=op});var Xl=T((TS,Yl)=>{var ap=ae(),lp=(r,e)=>new ap(r,e).minor;Yl.exports=lp});var Kl=T(($S,Ql)=>{var up=ae(),cp=(r,e)=>new up(r,e).patch;Ql.exports=cp});var Jl=T((CS,Zl)=>{var fp=St(),hp=(r,e)=>{let t=fp(r,e);return t&&t.prerelease.length?t.prerelease:null};Zl.exports=hp});var tu=T((OS,eu)=>{var dp=we(),pp=(r,e,t)=>dp(e,r,t);eu.exports=pp});var nu=T((PS,ru)=>{var mp=we(),gp=(r,e)=>mp(r,e,!0);ru.exports=gp});var jn=T((IS,su)=>{var iu=ae(),bp=(r,e,t)=>{let i=new iu(r,t),o=new iu(e,t);return i.compare(o)||i.compareBuild(o)};su.exports=bp});var au=T((LS,ou)=>{var yp=jn(),Sp=(r,e)=>r.sort((t,i)=>yp(t,i,e));ou.exports=Sp});var uu=T((xS,lu)=>{var _p=jn(),wp=(r,e)=>r.sort((t,i)=>_p(i,t,e));lu.exports=wp});var Ir=T((qS,cu)=>{var Ep=we(),Rp=(r,e,t)=>Ep(r,e,t)>0;cu.exports=Rp});var Un=T((DS,fu)=>{var vp=we(),Ap=(r,e,t)=>vp(r,e,t)<0;fu.exports=Ap});var ss=T((BS,hu)=>{var Tp=we(),$p=(r,e,t)=>Tp(r,e,t)!==0;hu.exports=$p});var Mn=T((FS,du)=>{var Cp=we(),Op=(r,e,t)=>Cp(r,e,t)>=0;du.exports=Op});var Hn=T((NS,pu)=>{var Pp=we(),Ip=(r,e,t)=>Pp(r,e,t)<=0;pu.exports=Ip});var os=T((zS,mu)=>{var Lp=Wn(),xp=ss(),qp=Ir(),Dp=Mn(),Bp=Un(),Fp=Hn(),Np=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return Lp(r,t,i);case"!=":return xp(r,t,i);case">":return qp(r,t,i);case">=":return Dp(r,t,i);case"<":return Bp(r,t,i);case"<=":return Fp(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};mu.exports=Np});var bu=T((kS,gu)=>{var zp=ae(),kp=St(),{re:Gn,t:Vn}=yt(),Wp=(r,e)=>{if(r instanceof zp)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(Gn[Vn.COERCE]);else{let i;for(;(i=Gn[Vn.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),Gn[Vn.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;Gn[Vn.COERCERTL].lastIndex=-1}return t===null?null:kp(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};gu.exports=Wp});var Su=T((WS,yu)=>{"use strict";yu.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var wu=T((jS,_u)=>{"use strict";_u.exports=M;M.Node=_t;M.create=M;function M(r){var e=this;if(e instanceof M||(e=new M),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(o){e.push(o)});else if(arguments.length>0)for(var t=0,i=arguments.length;t<i;t++)e.push(arguments[t]);return e}M.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};M.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};M.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};M.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)Up(this,arguments[r]);return this.length};M.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Mp(this,arguments[r]);return this.length};M.prototype.pop=function(){if(this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};M.prototype.shift=function(){if(this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};M.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,i=0;t!==null;i++)r.call(e,t.value,i,this),t=t.next};M.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,i=this.length-1;t!==null;i--)r.call(e,t.value,i,this),t=t.prev};M.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};M.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};M.prototype.map=function(r,e){e=e||this;for(var t=new M,i=this.head;i!==null;)t.push(r.call(e,i.value,this)),i=i.next;return t};M.prototype.mapReverse=function(r,e){e=e||this;for(var t=new M,i=this.tail;i!==null;)t.push(r.call(e,i.value,this)),i=i.prev;return t};M.prototype.reduce=function(r,e){var t,i=this.head;if(arguments.length>1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;i!==null;o++)t=r(t,i.value,o),i=i.next;return t};M.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=this.length-1;i!==null;o--)t=r(t,i.value,o),i=i.prev;return t};M.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};M.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};M.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new M;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var i=0,o=this.head;o!==null&&i<r;i++)o=o.next;for(;o!==null&&i<e;i++,o=o.next)t.push(o.value);return t};M.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new M;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var i=this.length,o=this.tail;o!==null&&i>e;i--)o=o.prev;for(;o!==null&&i>r;i--,o=o.prev)t.push(o.value);return t};M.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,o=this.head;o!==null&&i<r;i++)o=o.next;for(var a=[],i=0;o&&i<e;i++)a.push(o.value),o=this.removeNode(o);o===null&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(var i=0;i<t.length;i++)o=jp(this,o,t[i]);return a};M.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var i=t.prev;t.prev=t.next,t.next=i}return this.head=e,this.tail=r,this};function jp(r,e,t){var i=e===r.head?new _t(t,null,e,r):new _t(t,e,e.next,r);return i.next===null&&(r.tail=i),i.prev===null&&(r.head=i),r.length++,i}function Up(r,e){r.tail=new _t(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Mp(r,e){r.head=new _t(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function _t(r,e,t,i){if(!(this instanceof _t))return new _t(r,e,t,i);this.list=i,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{Su()(M)}catch{}});var Tu=T((US,Au)=>{"use strict";var Hp=wu(),wt=Symbol("max"),Me=Symbol("length"),Ht=Symbol("lengthCalculator"),xr=Symbol("allowStale"),Et=Symbol("maxAge"),Ue=Symbol("dispose"),Eu=Symbol("noDisposeOnSet"),re=Symbol("lruList"),Pe=Symbol("cache"),vu=Symbol("updateAgeOnGet"),as=()=>1,us=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[wt]=e.max||1/0,i=e.length||as;if(this[Ht]=typeof i!="function"?as:i,this[xr]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Et]=e.maxAge||0,this[Ue]=e.dispose,this[Eu]=e.noDisposeOnSet||!1,this[vu]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[wt]=e||1/0,Lr(this)}get max(){return this[wt]}set allowStale(e){this[xr]=!!e}get allowStale(){return this[xr]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Et]=e,Lr(this)}get maxAge(){return this[Et]}set lengthCalculator(e){typeof e!="function"&&(e=as),e!==this[Ht]&&(this[Ht]=e,this[Me]=0,this[re].forEach(t=>{t.length=this[Ht](t.value,t.key),this[Me]+=t.length})),Lr(this)}get lengthCalculator(){return this[Ht]}get length(){return this[Me]}get itemCount(){return this[re].length}rforEach(e,t){t=t||this;for(let i=this[re].tail;i!==null;){let o=i.prev;Ru(this,e,i,t),i=o}}forEach(e,t){t=t||this;for(let i=this[re].head;i!==null;){let o=i.next;Ru(this,e,i,t),i=o}}keys(){return this[re].toArray().map(e=>e.key)}values(){return this[re].toArray().map(e=>e.value)}reset(){this[Ue]&&this[re]&&this[re].length&&this[re].forEach(e=>this[Ue](e.key,e.value)),this[Pe]=new Map,this[re]=new Hp,this[Me]=0}dump(){return this[re].map(e=>Yn(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[re]}set(e,t,i){if(i=i||this[Et],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let o=i?Date.now():0,a=this[Ht](t,e);if(this[Pe].has(e)){if(a>this[wt])return Gt(this,this[Pe].get(e)),!1;let d=this[Pe].get(e).value;return this[Ue]&&(this[Eu]||this[Ue](e,d.value)),d.now=o,d.maxAge=i,d.value=t,this[Me]+=a-d.length,d.length=a,this.get(e),Lr(this),!0}let u=new cs(e,t,a,o,i);return u.length>this[wt]?(this[Ue]&&this[Ue](e,t),!1):(this[Me]+=u.length,this[re].unshift(u),this[Pe].set(e,this[re].head),Lr(this),!0)}has(e){if(!this[Pe].has(e))return!1;let t=this[Pe].get(e).value;return!Yn(this,t)}get(e){return ls(this,e,!0)}peek(e){return ls(this,e,!1)}pop(){let e=this[re].tail;return e?(Gt(this,e),e.value):null}del(e){Gt(this,this[Pe].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let o=e[i],a=o.e||0;if(a===0)this.set(o.k,o.v);else{let u=a-t;u>0&&this.set(o.k,o.v,u)}}}prune(){this[Pe].forEach((e,t)=>ls(this,t,!1))}},ls=(r,e,t)=>{let i=r[Pe].get(e);if(i){let o=i.value;if(Yn(r,o)){if(Gt(r,i),!r[xr])return}else t&&(r[vu]&&(i.value.now=Date.now()),r[re].unshiftNode(i));return o.value}},Yn=(r,e)=>{if(!e||!e.maxAge&&!r[Et])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Et]&&t>r[Et]},Lr=r=>{if(r[Me]>r[wt])for(let e=r[re].tail;r[Me]>r[wt]&&e!==null;){let t=e.prev;Gt(r,e),e=t}},Gt=(r,e)=>{if(e){let t=e.value;r[Ue]&&r[Ue](t.key,t.value),r[Me]-=t.length,r[Pe].delete(t.key),r[re].removeNode(e)}},cs=class{constructor(e,t,i,o,a){this.key=e,this.value=t,this.length=i,this.now=o,this.maxAge=a||0}},Ru=(r,e,t,i)=>{let o=t.value;Yn(r,o)&&(Gt(r,t),r[xr]||(o=void 0)),o&&e.call(i,o.value,o.key,r)};Au.exports=us});var Ee=T((MS,Pu)=>{var Rt=class{constructor(e,t){if(t=Vp(t),e instanceof Rt)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Rt(e.raw,t);if(e instanceof fs)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(o=>!Cu(o[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&Zp(o[0])){this.set=[o];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,o=$u.get(i);if(o)return o;let a=this.options.loose,u=a?me[ce.HYPHENRANGELOOSE]:me[ce.HYPHENRANGE];e=e.replace(u,lm(this.options.includePrerelease)),Q("hyphen replace",e),e=e.replace(me[ce.COMPARATORTRIM],Xp),Q("comparator trim",e),e=e.replace(me[ce.TILDETRIM],Qp),e=e.replace(me[ce.CARETTRIM],Kp),e=e.split(/\s+/).join(" ");let h=e.split(" ").map(y=>Jp(y,this.options)).join(" ").split(/\s+/).map(y=>am(y,this.options));a&&(h=h.filter(y=>(Q("loose invalid filter",y,this.options),!!y.match(me[ce.COMPARATORLOOSE])))),Q("range list",h);let d=new Map,f=h.map(y=>new fs(y,this.options));for(let y of f){if(Cu(y))return[y];d.set(y.value,y)}d.size>1&&d.has("")&&d.delete("");let m=[...d.values()];return $u.set(i,m),m}intersects(e,t){if(!(e instanceof Rt))throw new TypeError("a Range is required");return this.set.some(i=>Ou(i,t)&&e.set.some(o=>Ou(o,t)&&i.every(a=>o.every(u=>a.intersects(u,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Yp(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(um(this.set[t],e,this.options))return!0;return!1}};Pu.exports=Rt;var Gp=Tu(),$u=new Gp({max:1e3}),Vp=Pr(),fs=qr(),Q=Or(),Yp=ae(),{re:me,t:ce,comparatorTrimReplace:Xp,tildeTrimReplace:Qp,caretTrimReplace:Kp}=yt(),Cu=r=>r.value==="<0.0.0-0",Zp=r=>r.value==="",Ou=(r,e)=>{let t=!0,i=r.slice(),o=i.pop();for(;t&&i.length;)t=i.every(a=>o.intersects(a,e)),o=i.pop();return t},Jp=(r,e)=>(Q("comp",r,e),r=rm(r,e),Q("caret",r),r=em(r,e),Q("tildes",r),r=im(r,e),Q("xrange",r),r=om(r,e),Q("stars",r),r),fe=r=>!r||r.toLowerCase()==="x"||r==="*",em=(r,e)=>r.trim().split(/\s+/).map(t=>tm(t,e)).join(" "),tm=(r,e)=>{let t=e.loose?me[ce.TILDELOOSE]:me[ce.TILDE];return r.replace(t,(i,o,a,u,h)=>{Q("tilde",r,i,o,a,u,h);let d;return fe(o)?d="":fe(a)?d=`>=${o}.0.0 <${+o+1}.0.0-0`:fe(u)?d=`>=${o}.${a}.0 <${o}.${+a+1}.0-0`:h?(Q("replaceTilde pr",h),d=`>=${o}.${a}.${u}-${h} <${o}.${+a+1}.0-0`):d=`>=${o}.${a}.${u} <${o}.${+a+1}.0-0`,Q("tilde return",d),d})},rm=(r,e)=>r.trim().split(/\s+/).map(t=>nm(t,e)).join(" "),nm=(r,e)=>{Q("caret",r,e);let t=e.loose?me[ce.CARETLOOSE]:me[ce.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(o,a,u,h,d)=>{Q("caret",r,o,a,u,h,d);let f;return fe(a)?f="":fe(u)?f=`>=${a}.0.0${i} <${+a+1}.0.0-0`:fe(h)?a==="0"?f=`>=${a}.${u}.0${i} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.0${i} <${+a+1}.0.0-0`:d?(Q("replaceCaret pr",d),a==="0"?u==="0"?f=`>=${a}.${u}.${h}-${d} <${a}.${u}.${+h+1}-0`:f=`>=${a}.${u}.${h}-${d} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.${h}-${d} <${+a+1}.0.0-0`):(Q("no pr"),a==="0"?u==="0"?f=`>=${a}.${u}.${h}${i} <${a}.${u}.${+h+1}-0`:f=`>=${a}.${u}.${h}${i} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.${h} <${+a+1}.0.0-0`),Q("caret return",f),f})},im=(r,e)=>(Q("replaceXRanges",r,e),r.split(/\s+/).map(t=>sm(t,e)).join(" ")),sm=(r,e)=>{r=r.trim();let t=e.loose?me[ce.XRANGELOOSE]:me[ce.XRANGE];return r.replace(t,(i,o,a,u,h,d)=>{Q("xRange",r,i,o,a,u,h,d);let f=fe(a),m=f||fe(u),y=m||fe(h),g=y;return o==="="&&g&&(o=""),d=e.includePrerelease?"-0":"",f?o===">"||o==="<"?i="<0.0.0-0":i="*":o&&g?(m&&(u=0),h=0,o===">"?(o=">=",m?(a=+a+1,u=0,h=0):(u=+u+1,h=0)):o==="<="&&(o="<",m?a=+a+1:u=+u+1),o==="<"&&(d="-0"),i=`${o+a}.${u}.${h}${d}`):m?i=`>=${a}.0.0${d} <${+a+1}.0.0-0`:y&&(i=`>=${a}.${u}.0${d} <${a}.${+u+1}.0-0`),Q("xRange return",i),i})},om=(r,e)=>(Q("replaceStars",r,e),r.trim().replace(me[ce.STAR],"")),am=(r,e)=>(Q("replaceGTE0",r,e),r.trim().replace(me[e.includePrerelease?ce.GTE0PRE:ce.GTE0],"")),lm=r=>(e,t,i,o,a,u,h,d,f,m,y,g,p)=>(fe(i)?t="":fe(o)?t=`>=${i}.0.0${r?"-0":""}`:fe(a)?t=`>=${i}.${o}.0${r?"-0":""}`:u?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,fe(f)?d="":fe(m)?d=`<${+f+1}.0.0-0`:fe(y)?d=`<${f}.${+m+1}.0-0`:g?d=`<=${f}.${m}.${y}-${g}`:r?d=`<${f}.${m}.${+y+1}-0`:d=`<=${d}`,`${t} ${d}`.trim()),um=(r,e,t)=>{for(let i=0;i<r.length;i++)if(!r[i].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let i=0;i<r.length;i++)if(Q(r[i].semver),r[i].semver!==fs.ANY&&r[i].semver.prerelease.length>0){let o=r[i].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}});var qr=T((HS,Du)=>{var Dr=Symbol("SemVer ANY"),Vt=class{static get ANY(){return Dr}constructor(e,t){if(t=cm(t),e instanceof Vt){if(e.loose===!!t.loose)return e;e=e.value}ds("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Dr?this.value="":this.value=this.operator+this.semver.version,ds("comp",this)}parse(e){let t=this.options.loose?Iu[Lu.COMPARATORLOOSE]:Iu[Lu.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new xu(i[2],this.options.loose):this.semver=Dr}toString(){return this.value}test(e){if(ds("Comparator.test",e,this.options.loose),this.semver===Dr||e===Dr)return!0;if(typeof e=="string")try{e=new xu(e,this.options)}catch{return!1}return hs(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Vt))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new qu(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new qu(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),o=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),a=this.semver.version===e.semver.version,u=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),h=hs(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),d=hs(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||o||a&&u||h||d}};Du.exports=Vt;var cm=Pr(),{re:Iu,t:Lu}=yt(),hs=os(),ds=Or(),xu=ae(),qu=Ee()});var Br=T((GS,Bu)=>{var fm=Ee(),hm=(r,e,t)=>{try{e=new fm(e,t)}catch{return!1}return e.test(r)};Bu.exports=hm});var Nu=T((VS,Fu)=>{var dm=Ee(),pm=(r,e)=>new dm(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));Fu.exports=pm});var ku=T((YS,zu)=>{var mm=ae(),gm=Ee(),bm=(r,e,t)=>{let i=null,o=null,a=null;try{a=new gm(e,t)}catch{return null}return r.forEach(u=>{a.test(u)&&(!i||o.compare(u)===-1)&&(i=u,o=new mm(i,t))}),i};zu.exports=bm});var ju=T((XS,Wu)=>{var ym=ae(),Sm=Ee(),_m=(r,e,t)=>{let i=null,o=null,a=null;try{a=new Sm(e,t)}catch{return null}return r.forEach(u=>{a.test(u)&&(!i||o.compare(u)===1)&&(i=u,o=new ym(i,t))}),i};Wu.exports=_m});var Hu=T((QS,Mu)=>{var ps=ae(),wm=Ee(),Uu=Ir(),Em=(r,e)=>{r=new wm(r,e);let t=new ps("0.0.0");if(r.test(t)||(t=new ps("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i<r.set.length;++i){let o=r.set[i],a=null;o.forEach(u=>{let h=new ps(u.semver.version);switch(u.operator){case">":h.prerelease.length===0?h.patch++:h.prerelease.push(0),h.raw=h.format();case"":case">=":(!a||Uu(h,a))&&(a=h);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),a&&(!t||Uu(t,a))&&(t=a)}return t&&r.test(t)?t:null};Mu.exports=Em});var Vu=T((KS,Gu)=>{var Rm=Ee(),vm=(r,e)=>{try{return new Rm(r,e).range||"*"}catch{return null}};Gu.exports=vm});var Xn=T((ZS,Ku)=>{var Am=ae(),Qu=qr(),{ANY:Tm}=Qu,$m=Ee(),Cm=Br(),Yu=Ir(),Xu=Un(),Om=Hn(),Pm=Mn(),Im=(r,e,t,i)=>{r=new Am(r,i),e=new $m(e,i);let o,a,u,h,d;switch(t){case">":o=Yu,a=Om,u=Xu,h=">",d=">=";break;case"<":o=Xu,a=Pm,u=Yu,h="<",d="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Cm(r,e,i))return!1;for(let f=0;f<e.set.length;++f){let m=e.set[f],y=null,g=null;if(m.forEach(p=>{p.semver===Tm&&(p=new Qu(">=0.0.0")),y=y||p,g=g||p,o(p.semver,y.semver,i)?y=p:u(p.semver,g.semver,i)&&(g=p)}),y.operator===h||y.operator===d||(!g.operator||g.operator===h)&&a(r,g.semver))return!1;if(g.operator===d&&u(r,g.semver))return!1}return!0};Ku.exports=Im});var Ju=T((JS,Zu)=>{var Lm=Xn(),xm=(r,e,t)=>Lm(r,e,">",t);Zu.exports=xm});var tc=T((e_,ec)=>{var qm=Xn(),Dm=(r,e,t)=>qm(r,e,"<",t);ec.exports=Dm});var ic=T((t_,nc)=>{var rc=Ee(),Bm=(r,e,t)=>(r=new rc(r,t),e=new rc(e,t),r.intersects(e));nc.exports=Bm});var oc=T((r_,sc)=>{var Fm=Br(),Nm=we();sc.exports=(r,e,t)=>{let i=[],o=null,a=null,u=r.sort((m,y)=>Nm(m,y,t));for(let m of u)Fm(m,e,t)?(a=m,o||(o=m)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);let h=[];for(let[m,y]of i)m===y?h.push(m):!y&&m===u[0]?h.push("*"):y?m===u[0]?h.push(`<=${y}`):h.push(`${m} - ${y}`):h.push(`>=${m}`);let d=h.join(" || "),f=typeof e.raw=="string"?e.raw:String(e);return d.length<f.length?d:e}});var fc=T((n_,cc)=>{var ac=Ee(),Qn=qr(),{ANY:ms}=Qn,Fr=Br(),gs=we(),zm=(r,e,t={})=>{if(r===e)return!0;r=new ac(r,t),e=new ac(e,t);let i=!1;e:for(let o of r.set){for(let a of e.set){let u=km(o,a,t);if(i=i||u!==null,u)continue e}if(i)return!1}return!0},km=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===ms){if(e.length===1&&e[0].semver===ms)return!0;t.includePrerelease?r=[new Qn(">=0.0.0-0")]:r=[new Qn(">=0.0.0")]}if(e.length===1&&e[0].semver===ms){if(t.includePrerelease)return!0;e=[new Qn(">=0.0.0")]}let i=new Set,o,a;for(let p of r)p.operator===">"||p.operator===">="?o=lc(o,p,t):p.operator==="<"||p.operator==="<="?a=uc(a,p,t):i.add(p.semver);if(i.size>1)return null;let u;if(o&&a){if(u=gs(o.semver,a.semver,t),u>0)return null;if(u===0&&(o.operator!==">="||a.operator!=="<="))return null}for(let p of i){if(o&&!Fr(p,String(o),t)||a&&!Fr(p,String(a),t))return null;for(let _ of e)if(!Fr(p,String(_),t))return!1;return!0}let h,d,f,m,y=a&&!t.includePrerelease&&a.semver.prerelease.length?a.semver:!1,g=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1;y&&y.prerelease.length===1&&a.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(let p of e){if(m=m||p.operator===">"||p.operator===">=",f=f||p.operator==="<"||p.operator==="<=",o){if(g&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===g.major&&p.semver.minor===g.minor&&p.semver.patch===g.patch&&(g=!1),p.operator===">"||p.operator===">="){if(h=lc(o,p,t),h===p&&h!==o)return!1}else if(o.operator===">="&&!Fr(o.semver,String(p),t))return!1}if(a){if(y&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===y.major&&p.semver.minor===y.minor&&p.semver.patch===y.patch&&(y=!1),p.operator==="<"||p.operator==="<="){if(d=uc(a,p,t),d===p&&d!==a)return!1}else if(a.operator==="<="&&!Fr(a.semver,String(p),t))return!1}if(!p.operator&&(a||o)&&u!==0)return!1}return!(o&&f&&!a&&u!==0||a&&m&&!o&&u!==0||g||y)},lc=(r,e,t)=>{if(!r)return e;let i=gs(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},uc=(r,e,t)=>{if(!r)return e;let i=gs(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};cc.exports=zm});var pc=T((i_,dc)=>{var bs=yt(),Wm=Cr(),jm=ae(),hc=is(),Um=St(),Mm=ql(),Hm=Bl(),Gm=zl(),Vm=Hl(),Ym=Vl(),Xm=Xl(),Qm=Kl(),Km=Jl(),Zm=we(),Jm=tu(),eg=nu(),tg=jn(),rg=au(),ng=uu(),ig=Ir(),sg=Un(),og=Wn(),ag=ss(),lg=Mn(),ug=Hn(),cg=os(),fg=bu(),hg=qr(),dg=Ee(),pg=Br(),mg=Nu(),gg=ku(),bg=ju(),yg=Hu(),Sg=Vu(),_g=Xn(),wg=Ju(),Eg=tc(),Rg=ic(),vg=oc(),Ag=fc();dc.exports={parse:Um,valid:Mm,clean:Hm,inc:Gm,diff:Vm,major:Ym,minor:Xm,patch:Qm,prerelease:Km,compare:Zm,rcompare:Jm,compareLoose:eg,compareBuild:tg,sort:rg,rsort:ng,gt:ig,lt:sg,eq:og,neq:ag,gte:lg,lte:ug,cmp:cg,coerce:fg,Comparator:hg,Range:dg,satisfies:pg,toComparators:mg,maxSatisfying:gg,minSatisfying:bg,minVersion:yg,validRange:Sg,outside:_g,gtr:wg,ltr:Eg,intersects:Rg,simplifyRange:vg,subset:Ag,SemVer:jm,re:bs.re,src:bs.src,tokens:bs.t,SEMVER_SPEC_VERSION:Wm.SEMVER_SPEC_VERSION,compareIdentifiers:hc.compareIdentifiers,rcompareIdentifiers:hc.rcompareIdentifiers}});var Sc=T((s_,yc)=>{yc.exports=function(r,e){e||(e={});var t=e.hsep===void 0?" ":e.hsep,i=e.align||[],o=e.stringLength||function(d){return String(d).length},a=gc(r,function(d,f){return bc(f,function(m,y){var g=mc(m);(!d[y]||g>d[y])&&(d[y]=g)}),d},[]),u=Kn(r,function(d){return Kn(d,function(f,m){var y=String(f);if(i[m]==="."){var g=mc(y),p=a[m]+(/\./.test(y)?1:2)-(o(y)-g);return y+Array(p).join(" ")}else return y})}),h=gc(u,function(d,f){return bc(f,function(m,y){var g=o(m);(!d[y]||g>d[y])&&(d[y]=g)}),d},[]);return Kn(u,function(d){return Kn(d,function(f,m){var y=h[m]-o(f)||0,g=Array(Math.max(y+1,1)).join(" ");return i[m]==="r"||i[m]==="."?g+f:i[m]==="c"?Array(Math.ceil(y/2+1)).join(" ")+f+Array(Math.floor(y/2+1)).join(" "):f+g}).join(t).replace(/\s+$/,"")}).join(`
20
+ `)};function mc(r){var e=/\.[^.]*$/.exec(r);return e?e.index+1:r.length}function gc(r,e,t){if(r.reduce)return r.reduce(e,t);for(var i=0,o=arguments.length>=3?t:r[i++];i<r.length;i++)e(o,r[i],i);return o}function bc(r,e){if(r.forEach)return r.forEach(e);for(var t=0;t<r.length;t++)e.call(r,r[t],t)}function Kn(r,e){if(r.map)return r.map(e);for(var t=[],i=0;i<r.length;i++)t.push(e.call(r,r[i],i));return t}});var vc=T((l_,Rc)=>{var Nr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Tg=typeof AbortController=="function",Zn=Tg?AbortController:class{constructor(){this.signal=new _c}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},$g=typeof AbortSignal=="function",Cg=typeof Zn.AbortSignal=="function",_c=$g?AbortSignal:Cg?Zn.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(t=>t(e),this))}onabort(){}addEventListener(e,t){e==="abort"&&this._listeners.push(t)}removeEventListener(e,t){e==="abort"&&(this._listeners=this._listeners.filter(i=>i!==t))}},ws=new Set,ys=(r,e)=>{let t=`LRU_CACHE_OPTION_${r}`;Jn(t)&&Es(t,`${r} option`,`options.${e}`,He)},Ss=(r,e)=>{let t=`LRU_CACHE_METHOD_${r}`;if(Jn(t)){let{prototype:i}=He,{get:o}=Object.getOwnPropertyDescriptor(i,r);Es(t,`${r} method`,`cache.${e}()`,o)}},Og=(r,e)=>{let t=`LRU_CACHE_PROPERTY_${r}`;if(Jn(t)){let{prototype:i}=He,{get:o}=Object.getOwnPropertyDescriptor(i,r);Es(t,`${r} property`,`cache.${e}`,o)}},wc=(...r)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...r):console.error(...r)},Jn=r=>!ws.has(r),Es=(r,e,t,i)=>{ws.add(r);let o=`The ${e} is deprecated. Please use ${t} instead.`;wc(o,"DeprecationWarning",r,i)},nt=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),Ec=r=>nt(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?Yt:null:null,Yt=class extends Array{constructor(e){super(e),this.fill(0)}},_s=class{constructor(e){if(e===0)return[];let t=Ec(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},He=class{constructor(e={}){let{max:t=0,ttl:i,ttlResolution:o=1,ttlAutopurge:a,updateAgeOnGet:u,updateAgeOnHas:h,allowStale:d,dispose:f,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:g,maxSize:p=0,maxEntrySize:_=0,sizeCalculation:R,fetchMethod:S,fetchContext:v,noDeleteOnFetchRejection:P,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:q,ignoreFetchAbort:I}=e,{length:L,maxAge:W,stale:Y}=e instanceof He?{}:e;if(t!==0&&!nt(t))throw new TypeError("max option must be a nonnegative integer");let X=t?Ec(t):Array;if(!X)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=p,this.maxEntrySize=_||this.maxSize,this.sizeCalculation=R||L,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=S||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=v,!this.fetchMethod&&v!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new X(t),this.prev=new X(t),this.head=0,this.tail=0,this.free=new _s(t),this.initialFill=1,this.size=0,typeof f=="function"&&(this.dispose=f),typeof m=="function"?(this.disposeAfter=m,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!P,this.allowStaleOnFetchRejection=!!A,this.allowStaleOnFetchAbort=!!q,this.ignoreFetchAbort=!!I,this.maxEntrySize!==0){if(this.maxSize!==0&&!nt(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!nt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!d||!!Y,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!h,this.ttlResolution=nt(o)||o===0?o:1,this.ttlAutopurge=!!a,this.ttl=i||W||0,this.ttl){if(!nt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let oe="LRU_CACHE_UNBOUNDED";Jn(oe)&&(ws.add(oe),wc("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",oe,He))}Y&&ys("stale","allowStale"),W&&ys("maxAge","ttl"),L&&ys("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Yt(this.max),this.starts=new Yt(this.max),this.setItemTTL=(i,o,a=Nr.now())=>{if(this.starts[i]=o!==0?a:0,this.ttls[i]=o,o!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.isStale(i)&&this.delete(this.keyList[i])},o+1);u.unref&&u.unref()}},this.updateItemAge=i=>{this.starts[i]=this.ttls[i]!==0?Nr.now():0},this.statusTTL=(i,o)=>{i&&(i.ttl=this.ttls[o],i.start=this.starts[o],i.now=e||t(),i.remainingTTL=i.now+i.ttl-i.start)};let e=0,t=()=>{let i=Nr.now();if(this.ttlResolution>0){e=i;let o=setTimeout(()=>e=0,this.ttlResolution);o.unref&&o.unref()}return i};this.getRemainingTTL=i=>{let o=this.keyMap.get(i);return o===void 0?0:this.ttls[o]===0||this.starts[o]===0?1/0:this.starts[o]+this.ttls[o]-(e||t())},this.isStale=i=>this.ttls[i]!==0&&this.starts[i]!==0&&(e||t())-this.starts[i]>this.ttls[i]}updateItemAge(e){}statusTTL(e,t){}setItemTTL(e,t,i){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Yt(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,i,o)=>{if(this.isBackgroundFetch(t))return 0;if(!nt(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(t,e),!nt(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.addItemSize=(e,t,i)=>{if(this.sizes[e]=t,this.maxSize){let o=this.maxSize-this.sizes[e];for(;this.calculatedSize>o;)this.evict(!0)}this.calculatedSize+=this.sizes[e],i&&(i.entrySize=t,i.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,i,o){if(i||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.head));)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.tail));)t=this.next[t]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,t){for(let i of this.indexes()){let o=this.valList[i],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;if(a!==void 0&&e(a,this.keyList[i],this))return this.get(this.keyList[i],t)}}forEach(e,t=this){for(let i of this.indexes()){let o=this.valList[i],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;a!==void 0&&e.call(t,a,this.keyList[i],this)}}rforEach(e,t=this){for(let i of this.rindexes()){let o=this.valList[i],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;a!==void 0&&e.call(t,a,this.keyList[i],this)}}get prune(){return Ss("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){let e=[];for(let t of this.indexes({allowStale:!0})){let i=this.keyList[t],o=this.valList[t],a=this.isBackgroundFetch(o)?o.__staleWhileFetching:o;if(a===void 0)continue;let u={value:a};if(this.ttls){u.ttl=this.ttls[t];let h=Nr.now()-this.starts[t];u.start=Math.floor(Date.now()-h)}this.sizes&&(u.size=this.sizes[t]),e.unshift([i,u])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let o=Date.now()-i.start;i.start=Nr.now()-o}this.set(t,i.value,i)}}dispose(e,t,i){}set(e,t,{ttl:i=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,status:f}={}){if(u=this.requireSize(e,t,u,h),this.maxEntrySize&&u>this.maxEntrySize)return f&&(f.set="miss",f.maxEntrySizeExceeded=!0),this.delete(e),this;let m=this.size===0?void 0:this.keyMap.get(e);if(m===void 0)m=this.newIndex(),this.keyList[m]=e,this.valList[m]=t,this.keyMap.set(e,m),this.next[this.tail]=m,this.prev[m]=this.tail,this.tail=m,this.size++,this.addItemSize(m,u,f),f&&(f.set="add"),d=!1;else{this.moveToTail(m);let y=this.valList[m];if(t!==y){if(this.isBackgroundFetch(y)?y.__abortController.abort(new Error("replaced")):a||(this.dispose(y,e,"set"),this.disposeAfter&&this.disposed.push([y,e,"set"])),this.removeItemSize(m),this.valList[m]=t,this.addItemSize(m,u,f),f){f.set="replace";let g=y&&this.isBackgroundFetch(y)?y.__staleWhileFetching:y;g!==void 0&&(f.oldValue=g)}}else f&&(f.set="update")}if(i!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),d||this.setItemTTL(m,i,o),this.statusTTL(f,m),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let t=this.head,i=this.keyList[t],o=this.valList[t];return this.isBackgroundFetch(o)?o.__abortController.abort(new Error("evicted")):(this.dispose(o,i,"evict"),this.disposeAfter&&this.disposed.push([o,i,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(i),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas,status:i}={}){let o=this.keyMap.get(e);if(o!==void 0)if(this.isStale(o))i&&(i.has="stale",this.statusTTL(i,o));else return t&&this.updateItemAge(o),i&&(i.has="hit"),this.statusTTL(i,o),!0;else i&&(i.has="miss");return!1}peek(e,{allowStale:t=this.allowStale}={}){let i=this.keyMap.get(e);if(i!==void 0&&(t||!this.isStale(i))){let o=this.valList[i];return this.isBackgroundFetch(o)?o.__staleWhileFetching:o}}backgroundFetch(e,t,i,o){let a=t===void 0?void 0:this.valList[t];if(this.isBackgroundFetch(a))return a;let u=new Zn;i.signal&&i.signal.addEventListener("abort",()=>u.abort(i.signal.reason));let h={signal:u.signal,options:i,context:o},d=(p,_=!1)=>{let{aborted:R}=u.signal,S=i.ignoreFetchAbort&&p!==void 0;return i.status&&(R&&!_?(i.status.fetchAborted=!0,i.status.fetchError=u.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),R&&!S&&!_?m(u.signal.reason):(this.valList[t]===g&&(p===void 0?g.__staleWhileFetching?this.valList[t]=g.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,p,h.options))),p)},f=p=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=p),m(p)),m=p=>{let{aborted:_}=u.signal,R=_&&i.allowStaleOnFetchAbort,S=R||i.allowStaleOnFetchRejection,v=S||i.noDeleteOnFetchRejection;if(this.valList[t]===g&&(!v||g.__staleWhileFetching===void 0?this.delete(e):R||(this.valList[t]=g.__staleWhileFetching)),S)return i.status&&g.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),g.__staleWhileFetching;if(g.__returned===g)throw p},y=(p,_)=>{this.fetchMethod(e,a,h).then(R=>p(R),_),u.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(p(),i.allowStaleOnFetchAbort&&(p=R=>d(R,!0)))})};i.status&&(i.status.fetchDispatched=!0);let g=new Promise(y).then(d,f);return g.__abortController=u,g.__staleWhileFetching=a,g.__returned=null,t===void 0?(this.set(e,g,{...h.options,status:void 0}),t=this.keyMap.get(e)):this.valList[t]=g,g}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:y=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,fetchContext:_=this.fetchContext,forceRefresh:R=!1,status:S,signal:v}={}){if(!this.fetchMethod)return S&&(S.fetch="get"),this.get(e,{allowStale:t,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:S});let P={allowStale:t,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:u,size:h,sizeCalculation:d,noUpdateTTL:f,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:p,ignoreFetchAbort:g,status:S,signal:v},D=this.keyMap.get(e);if(D===void 0){S&&(S.fetch="miss");let A=this.backgroundFetch(e,D,P,_);return A.__returned=A}else{let A=this.valList[D];if(this.isBackgroundFetch(A)){let Y=t&&A.__staleWhileFetching!==void 0;return S&&(S.fetch="inflight",Y&&(S.returnedStale=!0)),Y?A.__staleWhileFetching:A.__returned=A}let q=this.isStale(D);if(!R&&!q)return S&&(S.fetch="hit"),this.moveToTail(D),i&&this.updateItemAge(D),this.statusTTL(S,D),A;let I=this.backgroundFetch(e,D,P,_),L=I.__staleWhileFetching!==void 0,W=L&&t;return S&&(S.fetch=L&&q?"stale":"refresh",W&&q&&(S.returnedStale=!0)),W?I.__staleWhileFetching:I.__returned=I}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}={}){let u=this.keyMap.get(e);if(u!==void 0){let h=this.valList[u],d=this.isBackgroundFetch(h);return this.statusTTL(a,u),this.isStale(u)?(a&&(a.get="stale"),d?(a&&(a.returnedStale=t&&h.__staleWhileFetching!==void 0),t?h.__staleWhileFetching:void 0):(o||this.delete(e),a&&(a.returnedStale=t),t?h:void 0)):(a&&(a.get="hit"),d?h.__staleWhileFetching:(this.moveToTail(u),i&&this.updateItemAge(u),h))}else a&&(a.get="miss")}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return Ss("del","delete"),this.delete}delete(e){let t=!1;if(this.size!==0){let i=this.keyMap.get(e);if(i!==void 0)if(t=!0,this.size===1)this.clear();else{this.removeItemSize(i);let o=this.valList[i];this.isBackgroundFetch(o)?o.__abortController.abort(new Error("deleted")):(this.dispose(o,e,"delete"),this.disposeAfter&&this.disposed.push([o,e,"delete"])),this.keyMap.delete(e),this.keyList[i]=null,this.valList[i]=null,i===this.tail?this.tail=this.prev[i]:i===this.head?this.head=this.next[i]:(this.next[this.prev[i]]=this.next[i],this.prev[this.next[i]]=this.prev[i]),this.size--,this.free.push(i)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(let e of this.rindexes({allowStale:!0})){let t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort(new Error("deleted"));else{let i=this.keyList[e];this.dispose(t,i,"delete"),this.disposeAfter&&this.disposed.push([t,i,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return Ss("reset","clear"),this.clear}get length(){return Og("length","size"),this.size}static get AbortController(){return Zn}static get AbortSignal(){return _c}};Rc.exports=He});var $c=T((u_,Tc)=>{"use strict";var H=(...r)=>r.every(e=>e)?r.join(""):"",Z=r=>r?encodeURIComponent(r):"",Ac=r=>r.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),Pg={sshtemplate:({domain:r,user:e,project:t,committish:i})=>`git@${r}:${e}/${t}.git${H("#",i)}`,sshurltemplate:({domain:r,user:e,project:t,committish:i})=>`git+ssh://git@${r}/${e}/${t}.git${H("#",i)}`,edittemplate:({domain:r,user:e,project:t,committish:i,editpath:o,path:a})=>`https://${r}/${e}/${t}${H("/",o,"/",Z(i||"HEAD"),"/",a)}`,browsetemplate:({domain:r,user:e,project:t,committish:i,treepath:o})=>`https://${r}/${e}/${t}${H("/",o,"/",Z(i))}`,browsetreetemplate:({domain:r,user:e,project:t,committish:i,treepath:o,path:a,fragment:u,hashformat:h})=>`https://${r}/${e}/${t}/${o}/${Z(i||"HEAD")}/${a}${H("#",h(u||""))}`,browseblobtemplate:({domain:r,user:e,project:t,committish:i,blobpath:o,path:a,fragment:u,hashformat:h})=>`https://${r}/${e}/${t}/${o}/${Z(i||"HEAD")}/${a}${H("#",h(u||""))}`,docstemplate:({domain:r,user:e,project:t,treepath:i,committish:o})=>`https://${r}/${e}/${t}${H("/",i,"/",Z(o))}#readme`,httpstemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git+https://${H(r,"@")}${e}/${t}/${i}.git${H("#",o)}`,filetemplate:({domain:r,user:e,project:t,committish:i,path:o})=>`https://${r}/${e}/${t}/raw/${Z(i||"HEAD")}/${o}`,shortcuttemplate:({type:r,user:e,project:t,committish:i})=>`${r}:${e}/${t}${H("#",i)}`,pathtemplate:({user:r,project:e,committish:t})=>`${r}/${e}${H("#",t)}`,bugstemplate:({domain:r,user:e,project:t})=>`https://${r}/${e}/${t}/issues`,hashformat:Ac},it={};it.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:r,user:e,project:t,committish:i,path:o})=>`https://${H(r,"@")}raw.githubusercontent.com/${e}/${t}/${Z(i||"HEAD")}/${o}`,gittemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git://${H(r,"@")}${e}/${t}/${i}.git${H("#",o)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://codeload.${r}/${e}/${t}/tar.gz/${Z(i||"HEAD")}`,extract:r=>{let[,e,t,i,o]=r.pathname.split("/",5);if(!(i&&i!=="tree")&&(i||(o=r.hash.slice(1)),t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:o}}};it.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:r,user:e,project:t,committish:i,treepath:o,path:a,editpath:u})=>`https://${r}/${e}/${t}${H("/",o,"/",Z(i||"HEAD"),"/",a,u)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/get/${Z(i||"HEAD")}.tar.gz`,extract:r=>{let[,e,t,i]=r.pathname.split("/",4);if(!["get"].includes(i)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:r.hash.slice(1)}}};it.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git+https://${H(r,"@")}${e}/${t}/${i}.git${H("#",o)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/repository/archive.tar.gz?ref=${Z(i||"HEAD")}`,extract:r=>{let e=r.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let t=e.split("/"),i=t.pop();i.endsWith(".git")&&(i=i.slice(0,-4));let o=t.join("/");if(!(!o||!i))return{user:o,project:i,committish:r.hash.slice(1)}}};it.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:r,project:e,committish:t})=>`git@${r}:${e}.git${H("#",t)}`,sshurltemplate:({domain:r,project:e,committish:t})=>`git+ssh://git@${r}/${e}.git${H("#",t)}`,edittemplate:({domain:r,user:e,project:t,committish:i,editpath:o})=>`https://${r}/${e}/${t}${H("/",Z(i))}/${o}`,browsetemplate:({domain:r,project:e,committish:t})=>`https://${r}/${e}${H("/",Z(t))}`,browsetreetemplate:({domain:r,project:e,committish:t,path:i,hashformat:o})=>`https://${r}/${e}${H("/",Z(t))}${H("#",o(i))}`,browseblobtemplate:({domain:r,project:e,committish:t,path:i,hashformat:o})=>`https://${r}/${e}${H("/",Z(t))}${H("#",o(i))}`,docstemplate:({domain:r,project:e,committish:t})=>`https://${r}/${e}${H("/",Z(t))}`,httpstemplate:({domain:r,project:e,committish:t})=>`git+https://${r}/${e}.git${H("#",t)}`,filetemplate:({user:r,project:e,committish:t,path:i})=>`https://gist.githubusercontent.com/${r}/${e}/raw${H("/",Z(t))}/${i}`,shortcuttemplate:({type:r,project:e,committish:t})=>`${r}:${e}${H("#",t)}`,pathtemplate:({project:r,committish:e})=>`${r}${H("#",e)}`,bugstemplate:({domain:r,project:e})=>`https://${r}/${e}`,gittemplate:({domain:r,project:e,committish:t})=>`git://${r}/${e}.git${H("#",t)}`,tarballtemplate:({project:r,committish:e})=>`https://codeload.github.com/gist/${r}/tar.gz/${Z(e||"HEAD")}`,extract:r=>{let[,e,t,i]=r.pathname.split("/",4);if(i!=="raw"){if(!t){if(!e)return;t=e,e=null}return t.endsWith(".git")&&(t=t.slice(0,-4)),{user:e,project:t,committish:r.hash.slice(1)}}},hashformat:function(r){return r&&"file-"+Ac(r)}};it.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:r,user:e,project:t,committish:i,path:o})=>`https://${r}/${e}/${t}/blob/${Z(i)||"HEAD"}/${o}`,httpstemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}.git${H("#",i)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/archive/${Z(i)||"HEAD"}.tar.gz`,bugstemplate:({user:r,project:e})=>`https://todo.sr.ht/${r}/${e}`,extract:r=>{let[,e,t,i]=r.pathname.split("/",4);if(!["archive"].includes(i)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:r.hash.slice(1)}}};for(let[r,e]of Object.entries(it))it[r]=Object.assign({},Pg,e);Tc.exports=it});var vs=T((c_,Oc)=>{var Ig=be("url"),Rs=(r,e,t)=>{let i=r.indexOf(t);return r.lastIndexOf(e,i>-1?i:1/0)},Cc=r=>{try{return new Ig.URL(r)}catch{}},Lg=(r,e)=>{let t=r.indexOf(":"),i=r.slice(0,t+1);if(Object.prototype.hasOwnProperty.call(e,i))return r;let o=r.indexOf("@");return o>-1?o>t?`git+ssh://${r}`:r:r.indexOf("//")===t+1?r:`${r.slice(0,t+1)}//${r.slice(t+1)}`},xg=r=>{let e=Rs(r,"@","#"),t=Rs(r,":","#");return t>e&&(r=r.slice(0,t)+"/"+r.slice(t+1)),Rs(r,":","#")===-1&&r.indexOf("//")===-1&&(r=`git+ssh://${r}`),r};Oc.exports=(r,e)=>{let t=e?Lg(r,e):r;return Cc(t)||Cc(xg(t))}});var Ic=T((f_,Pc)=>{"use strict";var qg=vs(),Dg=r=>{let e=r.indexOf("#"),t=r.indexOf("/"),i=r.indexOf("/",t+1),o=r.indexOf(":"),a=/\s/.exec(r),u=r.indexOf("@"),h=!a||e>-1&&a.index>e,d=u===-1||e>-1&&u>e,f=o===-1||e>-1&&o>e,m=i===-1||e>-1&&i>e,y=t>0,g=e>-1?r[e-1]!=="/":!r.endsWith("/"),p=!r.startsWith(".");return h&&y&&g&&p&&d&&f&&m};Pc.exports=(r,e,{gitHosts:t,protocols:i})=>{var R,S;if(!r)return;let o=Dg(r)?`github:${r}`:r,a=qg(o,i);if(!a)return;let u=t.byShortcut[a.protocol],h=t.byDomain[a.hostname.startsWith("www.")?a.hostname.slice(4):a.hostname],d=u||h;if(!d)return;let f=t[u||h],m=null;(R=i[a.protocol])!=null&&R.auth&&(a.username||a.password)&&(m=`${a.username}${a.password?":"+a.password:""}`);let y=null,g=null,p=null,_=null;try{if(u){let v=a.pathname.startsWith("/")?a.pathname.slice(1):a.pathname,P=v.indexOf("@");P>-1&&(v=v.slice(P+1));let D=v.lastIndexOf("/");D>-1?(g=decodeURIComponent(v.slice(0,D)),g||(g=null),p=decodeURIComponent(v.slice(D+1))):p=decodeURIComponent(v),p.endsWith(".git")&&(p=p.slice(0,-4)),a.hash&&(y=decodeURIComponent(a.hash.slice(1))),_="shortcut"}else{if(!f.protocols.includes(a.protocol))return;let v=f.extract(a);if(!v)return;g=v.user&&decodeURIComponent(v.user),p=decodeURIComponent(v.project),y=decodeURIComponent(v.committish),_=((S=i[a.protocol])==null?void 0:S.name)||a.protocol.slice(0,-1)}}catch(v){if(v instanceof URIError)return;throw v}return[d,g,m,p,y,_,e]}});var xc=T((h_,Lc)=>{"use strict";var Bg=vc(),Fg=$c(),Ng=Ic(),zg=vs(),As=new Bg({max:1e3}),st,zr,ee,se,qe=class{constructor(e,t,i,o,a,u,h={}){En(this,ee);Object.assign(this,Je(qe,st)[e],{type:e,user:t,auth:i,project:o,committish:a,default:u,opts:h})}static addHost(e,t){Je(qe,st)[e]=t,Je(qe,st).byDomain[t.domain]=e,Je(qe,st).byShortcut[`${e}:`]=e,Je(qe,zr)[`${e}:`]={name:e}}static fromUrl(e,t){if(typeof e!="string")return;let i=e+JSON.stringify(t||{});if(!As.has(i)){let o=Ng(e,t,{gitHosts:Je(qe,st),protocols:Je(qe,zr)});As.set(i,o?new qe(...o):void 0)}return As.get(i)}static parseUrl(e){return zg(e)}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return ne(this,ee,se).call(this,this.sshtemplate,e)}sshurl(e){return ne(this,ee,se).call(this,this.sshurltemplate,e)}browse(e,...t){return typeof e!="string"?ne(this,ee,se).call(this,this.browsetemplate,e):typeof t[0]!="string"?ne(this,ee,se).call(this,this.browsetreetemplate,{...t[0],path:e}):ne(this,ee,se).call(this,this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return typeof t[0]!="string"?ne(this,ee,se).call(this,this.browseblobtemplate,{...t[0],path:e}):ne(this,ee,se).call(this,this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return ne(this,ee,se).call(this,this.docstemplate,e)}bugs(e){return ne(this,ee,se).call(this,this.bugstemplate,e)}https(e){return ne(this,ee,se).call(this,this.httpstemplate,e)}git(e){return ne(this,ee,se).call(this,this.gittemplate,e)}shortcut(e){return ne(this,ee,se).call(this,this.shortcuttemplate,e)}path(e){return ne(this,ee,se).call(this,this.pathtemplate,e)}tarball(e){return ne(this,ee,se).call(this,this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return ne(this,ee,se).call(this,this.filetemplate,{...t,path:e})}edit(e,t){return ne(this,ee,se).call(this,this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}},Xt=qe;st=new WeakMap,zr=new WeakMap,ee=new WeakSet,se=function(e,t){if(typeof e!="function")return null;let i={...this,...this.opts,...t};i.path||(i.path=""),i.path.startsWith("/")&&(i.path=i.path.slice(1)),i.noCommittish&&(i.committish=null);let o=e(i);return i.noGitPlus&&o.startsWith("git+")?o.slice(4):o},En(Xt,st,{byShortcut:{},byDomain:{}}),En(Xt,zr,{"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}});for(let[r,e]of Object.entries(Fg))Xt.addHost(r,e);Lc.exports=Xt});function Di({onlyFirst:r=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,r?void 0:"g")}var ki=Ce(Zo(),1);var Jo=ki.default.HttpProxyAgent,ea=ki.default.HttpsProxyAgent;var yr=class extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if(typeof this.onEviction=="function")for(let[t,i]of e)this.onEviction(t,i.value)}_deleteIfExpired(e,t){return typeof t.expiry=="number"&&t.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(e,t.value),this.delete(e)):!1}_getOrDeleteIfExpired(e,t){if(this._deleteIfExpired(e,t)===!1)return t.value}_getItemValue(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}_peek(e,t){let i=t.get(e);return this._getItemValue(e,i)}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,t){this.oldCache.delete(e),this._set(e,t)}*_entriesAscending(){for(let e of this.oldCache){let[t,i]=e;this.cache.has(t)||this._deleteIfExpired(t,i)===!1&&(yield e)}for(let e of this.cache){let[t,i]=e;this._deleteIfExpired(t,i)===!1&&(yield e)}}get(e){if(this.cache.has(e)){let t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){let t=this.oldCache.get(e);if(this._deleteIfExpired(e,t)===!1)return this._moveToRecent(e,t),t.value}}set(e,t,{maxAge:i=this.maxAge}={}){let o=typeof i=="number"&&i!==Number.POSITIVE_INFINITY?Date.now()+i:void 0;this.cache.has(e)?this.cache.set(e,{value:t,expiry:o}):this._set(e,{value:t,expiry:o})}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):this.oldCache.has(e)?!this._deleteIfExpired(e,this.oldCache.get(e)):!1}peek(e){if(this.cache.has(e))return this._peek(e,this.cache);if(this.oldCache.has(e))return this._peek(e,this.oldCache)}delete(e){let t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let t=[...this._entriesAscending()],i=t.length-e;i<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(i>0&&this._emitEvictions(t.slice(0,i)),this.oldCache=new Map(t.slice(i)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache){let[t,i]=e;this._deleteIfExpired(t,i)===!1&&(yield[t,i.value])}for(let e of this.oldCache){let[t,i]=e;this.cache.has(t)||this._deleteIfExpired(t,i)===!1&&(yield[t,i.value])}}*entriesDescending(){let e=[...this.cache];for(let t=e.length-1;t>=0;--t){let i=e[t],[o,a]=i;this._deleteIfExpired(o,a)===!1&&(yield[o,a.value])}e=[...this.oldCache];for(let t=e.length-1;t>=0;--t){let i=e[t],[o,a]=i;this.cache.has(o)||this._deleteIfExpired(o,a)===!1&&(yield[o,a.value])}}*entriesAscending(){for(let[e,t]of this._entriesAscending())yield[e,t.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(let t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}entries(){return this.entriesAscending()}forEach(e,t=this){for(let[i,o]of this.entriesAscending())e.call(t,o,i,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};var ia=Ce(ra(),1);import{Agent as Fh}from"node:http";import{Agent as Nh}from"node:https";var zh={agentCacheSize:512},na={maxSockets:64,keepAlive:!1},Sr=class extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,Sr)}};function Wi(r,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let t={...zh,...e},i=new yr({maxSize:t.agentCacheSize});async function o(u,h={}){let{origin:d,protocol:f}=new URL(u),m=h!=null&&h.noProxy?null:(0,ia.getProxyForUrl)(u),y=JSON.stringify({proxyUrl:m,origin:d,...h});if(i.has(y))return i.get(y);let g;if("noProxy"in h&&delete h.noProxy,e.undici){let{ProxyAgent:p,Agent:_}=await import("undici"),R={...h};"keepAlive"in R&&!("pipelining"in R)&&(R.pipelining=R.keepAlive?1:0),"keepAlive"in R&&delete R.keepAlive,"maxSockets"in R&&(R.connections=R.maxSockets,delete R.maxSockets),m?g=new p({...R,uri:m}):g=new _(R)}else{let p=f==="https:";m?g=new(p?ea:Jo)({...h,proxy:m}):g=new(p?Nh:Fh)(h)}return i.set(y,g),g}let a=(u,{timeout:h=0,agentOpts:d={},...f}={})=>new Promise(async(m,y)=>{var _;if(!e.undici&&!("agent"in f)){let R=await o(u,{...na,...d});R&&(f.agent=R)}else if(e.undici&&!("dispatcher"in f)){let R=await o(u,{...na,...d});R&&(f.dispatcher=R)}let g,p;h&&(!("signal"in f)&&globalThis.AbortController&&(p=new AbortController,f.signal=p.signal),g=setTimeout(()=>{var S;(S=p==null?void 0:p.abort)==null||S.call(p);let R=new Sr(`${f.method||"GET"} ${u} timed out after ${h}ms`);y(R)},h),(_=g==null?void 0:g.unref)==null||_.call(g)),r(u,f).then(R=>{g&&clearTimeout(g),m(R)}).catch(R=>{if(g&&clearTimeout(g),R.name==="AbortError")return m(null);y(R)})});return a.clearCache=()=>{for(let u of i.values())"destroy"in u&&u.destroy();i.clear()},a}var jc=Ce(ji(),1);import dd from"node:http";import pd from"node:https";import zt from"node:zlib";import ka,{PassThrough as Wa,pipeline as kt}from"node:stream";import{Buffer as qn}from"node:buffer";function Wh(r){if(!/^data:/i.test(r))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');r=r.replace(/\r?\n/g,"");let e=r.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let t=r.substring(5,e).split(";"),i="",o=!1,a=t[0]||"text/plain",u=a;for(let m=1;m<t.length;m++)t[m]==="base64"?o=!0:t[m]&&(u+=`;${t[m]}`,t[m].indexOf("charset=")===0&&(i=t[m].substring(8)));!t[0]&&!i.length&&(u+=";charset=US-ASCII",i="US-ASCII");let h=o?"base64":"ascii",d=unescape(r.substring(e+1)),f=Buffer.from(d,h);return f.type=a,f.typeFull=u,f.charset=i,f}var la=Wh;_r();vn();import tt,{PassThrough as Ta}from"node:stream";import{types as $a,deprecate as Ki,promisify as id}from"node:util";import{Buffer as _e}from"node:buffer";var We=class extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var de=class extends We{constructor(e,t,i){super(e,t),i&&(this.code=this.errno=i.code,this.erroredSysCall=i.syscall)}};var An=Symbol.toStringTag,Vi=r=>typeof r=="object"&&typeof r.append=="function"&&typeof r.delete=="function"&&typeof r.get=="function"&&typeof r.getAll=="function"&&typeof r.has=="function"&&typeof r.set=="function"&&typeof r.sort=="function"&&r[An]==="URLSearchParams",Er=r=>r&&typeof r=="object"&&typeof r.arrayBuffer=="function"&&typeof r.type=="string"&&typeof r.stream=="function"&&typeof r.constructor=="function"&&/^(Blob|File)$/.test(r[An]),ba=r=>typeof r=="object"&&(r[An]==="AbortSignal"||r[An]==="EventTarget"),ya=(r,e)=>{let t=new URL(e).hostname,i=new URL(r).hostname;return t===i||t.endsWith(`.${i}`)},Sa=(r,e)=>{let t=new URL(e).protocol,i=new URL(r).protocol;return t===i};var sd=id(tt.pipeline),pe=Symbol("Body internals"),xe=class{constructor(e,{size:t=0}={}){let i=null;e===null?e=null:Vi(e)?e=_e.from(e.toString()):Er(e)||_e.isBuffer(e)||($a.isAnyArrayBuffer(e)?e=_e.from(e):ArrayBuffer.isView(e)?e=_e.from(e.buffer,e.byteOffset,e.byteLength):e instanceof tt||(e instanceof mt?(e=ga(e),i=e.type.split("=")[1]):e=_e.from(String(e))));let o=e;_e.isBuffer(e)?o=tt.Readable.from(e):Er(e)&&(o=tt.Readable.from(e.stream())),this[pe]={body:e,stream:o,boundary:i,disturbed:!1,error:null},this.size=t,e instanceof tt&&e.on("error",a=>{let u=a instanceof We?a:new de(`Invalid response body while trying to fetch ${this.url}: ${a.message}`,"system",a);this[pe].error=u})}get body(){return this[pe].stream}get bodyUsed(){return this[pe].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:t,byteLength:i}=await Qi(this);return e.slice(t,t+i)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let i=new mt,o=new URLSearchParams(await this.text());for(let[a,u]of o)i.append(a,u);return i}let{toFormData:t}=await Promise.resolve().then(()=>(Aa(),va));return t(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[pe].body&&this[pe].body.type||"",t=await this.arrayBuffer();return new ke([t],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await Qi(this);return new TextDecoder().decode(e)}buffer(){return Qi(this)}};xe.prototype.buffer=Ki(xe.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(xe.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:Ki(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function Qi(r){if(r[pe].disturbed)throw new TypeError(`body used already for: ${r.url}`);if(r[pe].disturbed=!0,r[pe].error)throw r[pe].error;let{body:e}=r;if(e===null)return _e.alloc(0);if(!(e instanceof tt))return _e.alloc(0);let t=[],i=0;try{for await(let o of e){if(r.size>0&&i+o.length>r.size){let a=new de(`content size at ${r.url} over limit: ${r.size}`,"max-size");throw e.destroy(a),a}i+=o.length,t.push(o)}}catch(o){throw o instanceof We?o:new de(`Invalid response body while trying to fetch ${r.url}: ${o.message}`,"system",o)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return t.every(o=>typeof o=="string")?_e.from(t.join("")):_e.concat(t,i)}catch(o){throw new de(`Could not create Buffer from response body for ${r.url}: ${o.message}`,"system",o)}else throw new de(`Premature close of server response while trying to fetch ${r.url}`)}var Ft=(r,e)=>{let t,i,{body:o}=r[pe];if(r.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof tt&&typeof o.getBoundary!="function"&&(t=new Ta({highWaterMark:e}),i=new Ta({highWaterMark:e}),o.pipe(t),o.pipe(i),r[pe].stream=t,o=i),o},od=Ki(r=>r.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),On=(r,e)=>r===null?null:typeof r=="string"?"text/plain;charset=UTF-8":Vi(r)?"application/x-www-form-urlencoded;charset=UTF-8":Er(r)?r.type||null:_e.isBuffer(r)||$a.isAnyArrayBuffer(r)||ArrayBuffer.isView(r)?null:r instanceof mt?`multipart/form-data; boundary=${e[pe].boundary}`:r&&typeof r.getBoundary=="function"?`multipart/form-data;boundary=${od(r)}`:r instanceof tt?null:"text/plain;charset=UTF-8",Ca=r=>{let{body:e}=r[pe];return e===null?0:Er(e)?e.size:_e.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},Oa=async(r,{body:e})=>{e===null?r.end():await sd(e,r)};import{types as Pa}from"node:util";import In from"node:http";var Pn=typeof In.validateHeaderName=="function"?In.validateHeaderName:r=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(r)){let e=new TypeError(`Header name must be a valid HTTP token [${r}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},Zi=typeof In.validateHeaderValue=="function"?In.validateHeaderValue:(r,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let t=new TypeError(`Invalid character in header content ["${r}"]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_CHAR"}),t}},ue=class extends URLSearchParams{constructor(e){let t=[];if(e instanceof ue){let i=e.raw();for(let[o,a]of Object.entries(i))t.push(...a.map(u=>[o,u]))}else if(e!=null)if(typeof e=="object"&&!Pa.isBoxedPrimitive(e)){let i=e[Symbol.iterator];if(i==null)t.push(...Object.entries(e));else{if(typeof i!="function")throw new TypeError("Header pairs must be iterable");t=[...e].map(o=>{if(typeof o!="object"||Pa.isBoxedPrimitive(o))throw new TypeError("Each header pair must be an iterable object");return[...o]}).map(o=>{if(o.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...o]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return t=t.length>0?t.map(([i,o])=>(Pn(i),Zi(i,String(o)),[String(i).toLowerCase(),String(o)])):void 0,super(t),new Proxy(this,{get(i,o,a){switch(o){case"append":case"set":return(u,h)=>(Pn(u),Zi(u,String(h)),URLSearchParams.prototype[o].call(i,String(u).toLowerCase(),String(h)));case"delete":case"has":case"getAll":return u=>(Pn(u),URLSearchParams.prototype[o].call(i,String(u).toLowerCase()));case"keys":return()=>(i.sort(),new Set(URLSearchParams.prototype.keys.call(i)).keys());default:return Reflect.get(i,o,a)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let t=this.getAll(e);if(t.length===0)return null;let i=t.join(", ");return/^content-encoding$/i.test(e)&&(i=i.toLowerCase()),i}forEach(e,t=void 0){for(let i of this.keys())Reflect.apply(e,t,[this.get(i),i,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,t)=>(e[t]=this.getAll(t),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,t)=>{let i=this.getAll(t);return t==="host"?e[t]=i[0]:e[t]=i.length>1?i:i[0],e},{})}};Object.defineProperties(ue.prototype,["get","entries","forEach","values"].reduce((r,e)=>(r[e]={enumerable:!0},r),{}));function Ia(r=[]){return new ue(r.reduce((e,t,i,o)=>(i%2===0&&e.push(o.slice(i,i+2)),e),[]).filter(([e,t])=>{try{return Pn(e),Zi(e,String(t)),!0}catch{return!1}}))}var ad=new Set([301,302,303,307,308]),Ln=r=>ad.has(r);var Oe=Symbol("Response internals"),ie=class extends xe{constructor(e=null,t={}){super(e,t);let i=t.status!=null?t.status:200,o=new ue(t.headers);if(e!==null&&!o.has("Content-Type")){let a=On(e,this);a&&o.append("Content-Type",a)}this[Oe]={type:"default",url:t.url,status:i,statusText:t.statusText||"",headers:o,counter:t.counter,highWaterMark:t.highWaterMark}}get type(){return this[Oe].type}get url(){return this[Oe].url||""}get status(){return this[Oe].status}get ok(){return this[Oe].status>=200&&this[Oe].status<300}get redirected(){return this[Oe].counter>0}get statusText(){return this[Oe].statusText}get headers(){return this[Oe].headers}get highWaterMark(){return this[Oe].highWaterMark}clone(){return new ie(Ft(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,t=302){if(!Ln(t))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new ie(null,{headers:{location:new URL(e).toString()},status:t})}static error(){let e=new ie(null,{status:0,statusText:""});return e[Oe].type="error",e}static json(e=void 0,t={}){let i=JSON.stringify(e);if(i===void 0)throw new TypeError("data is not JSON serializable");let o=new ue(t&&t.headers);return o.has("content-type")||o.set("content-type","application/json"),new ie(i,{...t,headers:o})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(ie.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});import{format as cd}from"node:url";import{deprecate as fd}from"node:util";var La=r=>{if(r.search)return r.search;let e=r.href.length-1,t=r.hash||(r.href[e]==="#"?"#":"");return r.href[e-t.length]==="?"?"?":""};import{isIP as ld}from"node:net";function xa(r,e=!1){return r==null||(r=new URL(r),/^(about|blob|data):$/.test(r.protocol))?"no-referrer":(r.username="",r.password="",r.hash="",e&&(r.pathname="",r.search=""),r)}var qa=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Da="strict-origin-when-cross-origin";function Ba(r){if(!qa.has(r))throw new TypeError(`Invalid referrerPolicy: ${r}`);return r}function ud(r){if(/^(http|ws)s:$/.test(r.protocol))return!0;let e=r.host.replace(/(^\[)|(]$)/g,""),t=ld(e);return t===4&&/^127\./.test(e)||t===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:r.host==="localhost"||r.host.endsWith(".localhost")?!1:r.protocol==="file:"}function Nt(r){return/^about:(blank|srcdoc)$/.test(r)||r.protocol==="data:"||/^(blob|filesystem):$/.test(r.protocol)?!0:ud(r)}function Fa(r,{referrerURLCallback:e,referrerOriginCallback:t}={}){if(r.referrer==="no-referrer"||r.referrerPolicy==="")return null;let i=r.referrerPolicy;if(r.referrer==="about:client")return"no-referrer";let o=r.referrer,a=xa(o),u=xa(o,!0);a.toString().length>4096&&(a=u),e&&(a=e(a)),t&&(u=t(u));let h=new URL(r.url);switch(i){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return a;case"strict-origin":return Nt(a)&&!Nt(h)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return a.origin===h.origin?a:Nt(a)&&!Nt(h)?"no-referrer":u;case"same-origin":return a.origin===h.origin?a:"no-referrer";case"origin-when-cross-origin":return a.origin===h.origin?a:u;case"no-referrer-when-downgrade":return Nt(a)&&!Nt(h)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${i}`)}}function Na(r){let e=(r.get("referrer-policy")||"").split(/[,\s]+/),t="";for(let i of e)i&&qa.has(i)&&(t=i);return t}var te=Symbol("Request internals"),vr=r=>typeof r=="object"&&typeof r[te]=="object",hd=fd(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),je=class extends xe{constructor(e,t={}){let i;if(vr(e)?i=new URL(e.url):(i=new URL(e),e={}),i.username!==""||i.password!=="")throw new TypeError(`${i} is an url with embedded credentials.`);let o=t.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(o)&&(o=o.toUpperCase()),!vr(t)&&"data"in t&&hd(),(t.body!=null||vr(e)&&e.body!==null)&&(o==="GET"||o==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let a=t.body?t.body:vr(e)&&e.body!==null?Ft(e):null;super(a,{size:t.size||e.size||0});let u=new ue(t.headers||e.headers||{});if(a!==null&&!u.has("Content-Type")){let f=On(a,this);f&&u.set("Content-Type",f)}let h=vr(e)?e.signal:null;if("signal"in t&&(h=t.signal),h!=null&&!ba(h))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let d=t.referrer==null?e.referrer:t.referrer;if(d==="")d="no-referrer";else if(d){let f=new URL(d);d=/^about:(\/\/)?client$/.test(f)?"client":f}else d=void 0;this[te]={method:o,redirect:t.redirect||e.redirect||"follow",headers:u,parsedURL:i,signal:h,referrer:d},this.follow=t.follow===void 0?e.follow===void 0?20:e.follow:t.follow,this.compress=t.compress===void 0?e.compress===void 0?!0:e.compress:t.compress,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent,this.highWaterMark=t.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=t.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=t.referrerPolicy||e.referrerPolicy||""}get method(){return this[te].method}get url(){return cd(this[te].parsedURL)}get headers(){return this[te].headers}get redirect(){return this[te].redirect}get signal(){return this[te].signal}get referrer(){if(this[te].referrer==="no-referrer")return"";if(this[te].referrer==="client")return"about:client";if(this[te].referrer)return this[te].referrer.toString()}get referrerPolicy(){return this[te].referrerPolicy}set referrerPolicy(e){this[te].referrerPolicy=Ba(e)}clone(){return new je(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(je.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});var za=r=>{let{parsedURL:e}=r[te],t=new ue(r[te].headers);t.has("Accept")||t.set("Accept","*/*");let i=null;if(r.body===null&&/^(post|put)$/i.test(r.method)&&(i="0"),r.body!==null){let h=Ca(r);typeof h=="number"&&!Number.isNaN(h)&&(i=String(h))}i&&t.set("Content-Length",i),r.referrerPolicy===""&&(r.referrerPolicy=Da),r.referrer&&r.referrer!=="no-referrer"?r[te].referrer=Fa(r):r[te].referrer="no-referrer",r[te].referrer instanceof URL&&t.set("Referer",r.referrer),t.has("User-Agent")||t.set("User-Agent","node-fetch"),r.compress&&!t.has("Accept-Encoding")&&t.set("Accept-Encoding","gzip, deflate, br");let{agent:o}=r;typeof o=="function"&&(o=o(e)),!t.has("Connection")&&!o&&t.set("Connection","close");let a=La(e),u={path:e.pathname+a,method:r.method,headers:t[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:r.insecureHTTPParser,agent:o};return{parsedURL:e,options:u}};var xn=class extends We{constructor(e,t="aborted"){super(e,t)}};vn();Yi();var md=new Set(["data:","http:","https:"]);async function Dn(r,e){return new Promise((t,i)=>{let o=new je(r,e),{parsedURL:a,options:u}=za(o);if(!md.has(a.protocol))throw new TypeError(`node-fetch cannot load ${r}. URL scheme "${a.protocol.replace(/:$/,"")}" is not supported.`);if(a.protocol==="data:"){let _=la(o.url),R=new ie(_,{headers:{"Content-Type":_.typeFull}});t(R);return}let h=(a.protocol==="https:"?pd:dd).request,{signal:d}=o,f=null,m=()=>{let _=new xn("The operation was aborted.");i(_),o.body&&o.body instanceof ka.Readable&&o.body.destroy(_),!(!f||!f.body)&&f.body.emit("error",_)};if(d&&d.aborted){m();return}let y=()=>{m(),p()},g=h(a.toString(),u);d&&d.addEventListener("abort",y);let p=()=>{g.abort(),d&&d.removeEventListener("abort",y)};g.on("error",_=>{i(new de(`request to ${o.url} failed, reason: ${_.message}`,"system",_)),p()}),gd(g,_=>{f&&f.body&&f.body.destroy(_)}),process.version<"v14"&&g.on("socket",_=>{let R;_.prependListener("end",()=>{R=_._eventsCount}),_.prependListener("close",S=>{if(f&&R<_._eventsCount&&!S){let v=new Error("Premature close");v.code="ERR_STREAM_PREMATURE_CLOSE",f.body.emit("error",v)}})}),g.on("response",_=>{g.setTimeout(0);let R=Ia(_.rawHeaders);if(Ln(_.statusCode)){let A=R.get("Location"),q=null;try{q=A===null?null:new URL(A,o.url)}catch{if(o.redirect!=="manual"){i(new de(`uri requested responds with an invalid redirect URL: ${A}`,"invalid-redirect")),p();return}}switch(o.redirect){case"error":i(new de(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,"no-redirect")),p();return;case"manual":break;case"follow":{if(q===null)break;if(o.counter>=o.follow){i(new de(`maximum redirect reached at: ${o.url}`,"max-redirect")),p();return}let I={headers:new ue(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:Ft(o),signal:o.signal,size:o.size,referrer:o.referrer,referrerPolicy:o.referrerPolicy};if(!ya(o.url,q)||!Sa(o.url,q))for(let W of["authorization","www-authenticate","cookie","cookie2"])I.headers.delete(W);if(_.statusCode!==303&&o.body&&e.body instanceof ka.Readable){i(new de("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(_.statusCode===303||(_.statusCode===301||_.statusCode===302)&&o.method==="POST")&&(I.method="GET",I.body=void 0,I.headers.delete("content-length"));let L=Na(R);L&&(I.referrerPolicy=L),t(Dn(new je(q,I))),p();return}default:return i(new TypeError(`Redirect option '${o.redirect}' is not a valid value of RequestRedirect`))}}d&&_.once("end",()=>{d.removeEventListener("abort",y)});let S=kt(_,new Wa,A=>{A&&i(A)});process.version<"v12.10"&&_.on("aborted",y);let v={url:o.url,status:_.statusCode,statusText:_.statusMessage,headers:R,size:o.size,counter:o.counter,highWaterMark:o.highWaterMark},P=R.get("Content-Encoding");if(!o.compress||o.method==="HEAD"||P===null||_.statusCode===204||_.statusCode===304){f=new ie(S,v),t(f);return}let D={flush:zt.Z_SYNC_FLUSH,finishFlush:zt.Z_SYNC_FLUSH};if(P==="gzip"||P==="x-gzip"){S=kt(S,zt.createGunzip(D),A=>{A&&i(A)}),f=new ie(S,v),t(f);return}if(P==="deflate"||P==="x-deflate"){let A=kt(_,new Wa,q=>{q&&i(q)});A.once("data",q=>{(q[0]&15)===8?S=kt(S,zt.createInflate(),I=>{I&&i(I)}):S=kt(S,zt.createInflateRaw(),I=>{I&&i(I)}),f=new ie(S,v),t(f)}),A.once("end",()=>{f||(f=new ie(S,v),t(f))});return}if(P==="br"){S=kt(S,zt.createBrotliDecompress(),A=>{A&&i(A)}),f=new ie(S,v),t(f);return}f=new ie(S,v),t(f)}),Oa(g,o).catch(i)})}function gd(r,e){let t=qn.from(`0\r
21
21
  \r
22
- `),i=!1,o=!1,a;r.on("response",u=>{let{headers:h}=u;i=h["transfer-encoding"]==="chunked"&&!h["content-length"]}),r.on("socket",u=>{let h=()=>{if(i&&!o){let f=new Error("Premature close");f.code="ERR_STREAM_PREMATURE_CLOSE",e(f)}},d=f=>{o=qn.compare(f.slice(-5),t)===0,!o&&a&&(o=qn.compare(a.slice(-3),t.slice(0,3))===0&&qn.compare(f.slice(-2),t.slice(3))===0),a=f};u.prependListener("close",h),u.on("data",d),r.on("close",()=>{u.removeListener("close",h),u.removeListener("data",d)})})}var Uc=Ce(ml(),1),Mc=Ce(Fn(),1),Hc=Ce(bl(),1),J=Ce(pc(),1),Gc=Ce(Sc(),1),Vc=Ce(xc(),1);import{cwd as jg,stdout as Ug,argv as Mg,env as zr,exit as Wr,versions as Hg}from"node:process";import{join as Yc,dirname as Gg}from"node:path";import{lstatSync as Vg,readFileSync as qc,truncateSync as Yg,writeFileSync as Xg,accessSync as Qg}from"node:fs";import{platform as Kg}from"node:os";import{rootCertificates as Dc}from"node:tls";var Wg=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],kg={"1 day ago":"yesterday","1 week ago":"last week","1 month ago":"last month","1 year ago":"last year","in 1 day":"tomorrow","in 1 week":"next week","in 1 month":"next month","in 1 year":"next year"};function As(r,{noAffix:e=!1,times:t=Wg,nowThreshold:i=1e4,nowString:o="now",aliases:a=!1,aliasesMap:u=kg}={}){let h=Date.now();if(r=typeof r=="number"?r:Date.parse(r),Number.isNaN(r))return"unknown";let d=!1,f=h-r;if(f<0&&(d=!0,f=Math.abs(f)),f<i)return o;let m,y;for(let p=0,S=t.length;p<S;p++){let R=t[p];if(!(f>=R[1])){m=Math.floor(f/R[0]),y=R[2]+(m>1?"s":"");break}}let g=`${d&&!e?"in ":""}${m} ${y}${!d&&!e?" ago":""}`;return a?u[g]??g:g}var{fromUrl:Zg}=Vc.default,kr,kc;globalThis.fetch&&!((kc=Hg)!=null&&kc.node)?kr=globalThis.fetch:kr=Wi(Dn,{undici:!1});var Xc=96,ot="\0",Jg=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,eb=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Is=/^[0-9a-f]{7,}$/i,Bc=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Fc=r=>r.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),tb=ti(Zg),Ts=ti(Uc.default),rb=ti(Hc.default),xs=ti(r=>r.endsWith("/")?r.substring(0,r.length-1):r),nb=new Set(["patch"]),ib=new Set(["patch","minor"]),sb=new Set(["patch","minor","major"]),N=(0,jc.default)(Mg.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","G","githubapi","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",G:"githubapi",h:"help",i:"include",j:"json",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}}),Ls,ei,jr;N.color===!1||zr.TERM==="dumb"?Ls=ei=jr=r=>r:(Ls=r=>`\x1B[35m${r}\x1B[0m`,ei=r=>`\x1B[31m${r}\x1B[0m`,jr=r=>`\x1B[32m${r}\x1B[0m`);var Qt=er(N.greatest),$s=er(N.prerelease),Cs=er(N.release),Kt=er(N.patch),Zt=er(N.minor),Jt=er(N["allow-downgrade"]),De=(0,Mc.default)("npm",{registry:"https://registry.npmjs.org"}),Os={npmrc:De,recursive:!0},ob=xs(N.registry||De.registry),Nc=N.githubapi?xs(N.githubapi):"https://api.github.com",Qc=typeof N.sockets=="number"?parseInt(N.sockets):Xc,zc=r=>Array.from(r.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g)).map(e=>e[0]);function ti(r){let e=Object.create(null);return(t,i)=>t in e?e[t]:e[t]=r(t,i)}function Kc(r,e,t){let i=Yc(e,r);try{return Qg(i),i}catch{}let o=Gg(e);return t&&i===t||o===e?null:Kc(r,o,t)}function ab(r,e){if(r.startsWith("@")){let t=(/@[a-z0-9][\w-.]+/.exec(r)||[])[0],i=xs(rb(t,De));if(i!==e)try{let o=Ts(i,Os);if(o!=null&&o.token)return[o,i]}catch{}return[Ts(e,Os),e]}else return[Ts(e,Os),e]}async function lb(r,e,t,i){let[o,a]=ab(r,t),u={maxSockets:Qc};Object.keys(i).length&&(u.agentOpts=i),o!=null&&o.token&&(u.headers={Authorization:`${o.type} ${o.token}`});let d=(e==="resolutions"?yb(r):r).replace(/\//g,"%2f"),f=`${a}/${d}`;N.verbose&&console.error(`${Ls("fetch")} ${f}`);let m=await kr(f,u);if(m!=null&&m.ok)return N.verbose&&console.error(`${jr("done")} ${f}`),[await m.json(),e,a,r];throw m!=null&&m.status&&(m!=null&&m.statusText)?new Error(`Received ${m.status} ${m.statusText} for ${r} from ${a}`):new Error(`Unable to fetch ${r} from ${a}`)}function ub({repository:r,homepage:e},t,i){let o;if(t==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(r){let u=typeof r=="string"?r:r.url,h=tb(u);h!=null&&h.browse&&(o=h.browse()),o&&r.directory&&h.treepath&&(o=`${o}/${h.treepath}/HEAD/${r.directory}`),!o&&(r!=null&&r.url)&&/^https?:/.test(r.url)&&(o=r.url)}let a=o||e||"";if(a){let u=new URL(a);u.protocol==="http:"&&u.hostname==="github.com"&&(u.protocol="https:",a=String(u))}return a}function Re(r,e={}){let t={},i=r instanceof Error;typeof r=="string"?t.message=r:i&&(t.error=r.message);for(let o of Object.values(e))"oldPrint"in o&&(o.old=o.oldPrint,delete o.oldPrint),"newPrint"in o&&(o.new=o.newPrint,delete o.newPrint),"oldOriginal"in o&&(o.old=o.oldOriginal,delete o.oldOriginal);if(N.json){if(!i){t.results={};for(let[o,a]of Object.entries(e)){let[u,h]=o.split(ot);t.results[u]||(t.results[u]={}),t.results[u][h]=a}}console.info(JSON.stringify(t))}else Object.keys(e).length&&!i&&console.info(fb(e)),(t.message||t.error)&&(t.message?console.info(t.message):t.error&&console.info(ei(t.error)));N["error-on-outdated"]?Wr(Object.keys(e).length?2:0):N["error-on-unchanged"]?Wr(Object.keys(e).length?0:2):Wr(t.error?1:0)}function cb(r,e){let t=Kg()==="win32";t&&Yg(r,0),Xg(r,e,t?{flag:"r+"}:void 0)}function Wc(r,e,t){let i=r.split(/\./),o=e.split(/\./),a=t?jr:ei,u=/^[0-9a-zA-Z-.]+$/,h="";for(let d=0;d<i.length;d++)if(i[d]!==o[d]){u.test(i[d])?h+=a(i.slice(d).join(".")):h+=i[d].split("").map(f=>u.test(f)?a(f):f).join("")+a(`.${i.slice(d+1).join(".")}`);break}else h+=`${i[d]}.`;return h}function fb(r){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[t,i]of Object.entries(r))e.push([t.split(ot)[1],Wc(i.old,i.new,!1),Wc(i.new,i.old,!0),i.age||"",i.info]);return(0,Gc.default)(e,{hsep:" ",stringLength:t=>t.replace(qi(),"").length})}function hb(r,e){let t=r;for(let i of Object.keys(e)){let o=i.split(ot)[1],a=e[i].oldOriginal||e[i].old,u=new RegExp(`"${Fc(o)}": +"${Fc(a)}"`,"g");t=t.replace(u,`"${o}": "${e[i].new}"`)}return t}function db(r,e){return r.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Ps(r){let e=J.default.parse(r);return e?!!e.prerelease.length:!1}function Zc(r){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(r)}function pb(r){try{return J.default.coerce(r).version}catch{return null}}function mb(r,e,{range:t,semvers:i,usePre:o,useRel:a,useGreatest:u}={}){let h=pb(t),d=0;i=new Set(i),o=Zc(t)||o,o&&(i.add("prerelease"),i.has("patch")&&i.add("prepatch"),i.has("minor")&&i.add("preminor"),i.has("major")&&i.add("premajor"));for(let f of e){let m=J.default.parse(f);if(m.prerelease.length&&(!o||a))continue;let y=J.default.diff(h,m.version);if(!(!y||!i.has(y)))if(u||!("time"in r))J.default.gte(J.default.coerce(m.version).version,h)&&(h=m.version);else{let g=new Date(r.time[f]).getTime();g>=0&&g>d&&(h=m.version,d=g)}}return h||null}function gb(r,e){var o;if(e.range==="*"||e.range.includes("||"))return null;let t=Object.keys(r.versions).filter(a=>J.default.valid(a)),i=mb(r,t,e);if(e.useGreatest)return i;{let a=r["dist-tags"].latest,u=J.default.coerce(e.range).version,h=Zc(e.range),d=Ps(i),f=Ps(a),m=J.default.gt(i,u);if(!e.useRel&&e.usePre||h&&d||e.useRel&&!m&&h&&!d||h&&!d&&m)return i;if(h&&!d&&!m)return null;let y=J.default.diff(u,a);return y&&y!=="prerelease"&&!e.semvers.has(y.replace(/^pre/,""))||e.useRel&&Ps(a)?i:J.default.lt(a,u)&&!f?Jt===!0||(o=Jt==null?void 0:Jt.has)!=null&&o.call(Jt,r.name)?a:null:a}}async function bb([r,e],{useGreatest:t}={}){var d,f;let i=e.old.replace(Jg,""),[o,a,u,h]=eb.exec(i)||[];if(!(!a||!u||!h))if(Is.test(h)){let m={maxSockets:Qc},y=zr.UPDATES_GITHUB_API_TOKEN||zr.GITHUB_API_TOKEN||zr.GH_TOKEN||zr.HOMEBREW_GITHUB_API_TOKEN;y&&(m.headers={Authorization:`Bearer ${y}`});let g=await kr(`${Nc}/repos/${a}/${u}/commits`,m);if(!g||!g.ok)return;let p=await g.json(),{sha:S,commit:R}=p[0];if(!S||!S.length)return;let _=((d=R==null?void 0:R.committer)==null?void 0:d.date)??((f=R==null?void 0:R.author)==null?void 0:f.date);if(S=S.substring(0,h.length),h!==S){let v=e.old.replace(h,S);return{key:r,newRange:v,user:a,repo:u,oldRef:h,newRef:S,newDate:_}}}else{let m=await kr(`${Nc}/repos/${a}/${u}/git/refs/tags`);if(!m||!m.ok)return;let g=(await m.json()).map(S=>S.ref.replace(/^refs\/tags\//,"")),p=h.replace(/^v/,"");if(!J.default.valid(p))return;if(t){let S=h,R=h.replace(/^v/,"");for(let _ of g){let v=_.replace(/^v/,"");J.default.valid(v)&&(!S||J.default.gt(v,R))&&(S=_,R=v)}if(J.default.neq(p,R))return{key:r,newRange:S,user:a,repo:u,oldRef:h,newRef:S}}else{let S=g[g.length-1],R=S.replace(/^v/,"");if(!J.default.valid(R))return;if(J.default.neq(p,R))return{key:r,newRange:S,user:a,repo:u,oldRef:h,newRef:S}}}}function yb(r){let e=r.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Sb(r){let e=r.match(Bc);return(e==null?void 0:e.length)!==1?r:r.replace(Bc,J.default.coerce(e[0]))}function er(r){return r===void 0?!1:r===""?!0:typeof r=="string"?r.includes(",")?new Set(r.split(",")):new Set([r]):Array.isArray(r)?new Set(r):!1}async function _b(){var y,g,p,S,R;for(let _ of[process.stdout,process.stderr])(g=(y=_==null?void 0:_._handle)==null?void 0:y.setBlocking)==null||g.call(y,!0);N.help&&(Ug.write(`usage: updates [options]
22
+ `),i=!1,o=!1,a;r.on("response",u=>{let{headers:h}=u;i=h["transfer-encoding"]==="chunked"&&!h["content-length"]}),r.on("socket",u=>{let h=()=>{if(i&&!o){let f=new Error("Premature close");f.code="ERR_STREAM_PREMATURE_CLOSE",e(f)}},d=f=>{o=qn.compare(f.slice(-5),t)===0,!o&&a&&(o=qn.compare(a.slice(-3),t.slice(0,3))===0&&qn.compare(f.slice(-2),t.slice(3))===0),a=f};u.prependListener("close",h),u.on("data",d),r.on("close",()=>{u.removeListener("close",h),u.removeListener("data",d)})})}var Uc=Ce(ml(),1),Mc=Ce(Fn(),1),Hc=Ce(bl(),1),J=Ce(pc(),1),Gc=Ce(Sc(),1),Vc=Ce(xc(),1);import{cwd as jg,stdout as Ug,argv as Mg,env as kr,exit as Wr,versions as Hg}from"node:process";import{join as Yc,dirname as Gg}from"node:path";import{lstatSync as Vg,readFileSync as qc,truncateSync as Yg,writeFileSync as Xg,accessSync as Qg}from"node:fs";import{platform as Kg}from"node:os";import{rootCertificates as Dc}from"node:tls";var kg=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],Wg={"1 day ago":"yesterday","1 week ago":"last week","1 month ago":"last month","1 year ago":"last year","in 1 day":"tomorrow","in 1 week":"next week","in 1 month":"next month","in 1 year":"next year"};function Ts(r,{noAffix:e=!1,times:t=kg,nowThreshold:i=1e4,nowString:o="now",aliases:a=!1,aliasesMap:u=Wg}={}){let h=Date.now();if(r=typeof r=="number"?r:Date.parse(r),Number.isNaN(r))return"unknown";let d=!1,f=h-r;if(f<0&&(d=!0,f=Math.abs(f)),f<i)return o;let m,y;for(let p=0,_=t.length;p<_;p++){let R=t[p];if(!(f>=R[1])){m=Math.floor(f/R[0]),y=R[2]+(m>1?"s":"");break}}let g=`${d&&!e?"in ":""}${m} ${y}${!d&&!e?" ago":""}`;return a?u[g]??g:g}var{fromUrl:Zg}=Vc.default,jr,Wc;globalThis.fetch&&!((Wc=Hg)!=null&&Wc.node)?jr=globalThis.fetch:jr=Wi(Dn,{undici:!1});var Xc=96,ot="\0",Jg=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,eb=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Ls=/^[0-9a-f]{7,}$/i,Bc=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Fc=r=>r.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),tb=ri(Zg),$s=ri(Uc.default),rb=ri(Hc.default),xs=ri(r=>r.endsWith("/")?r.substring(0,r.length-1):r),nb=new Set(["patch"]),ib=new Set(["patch","minor"]),sb=new Set(["patch","minor","major"]),B=(0,jc.default)(Mg.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","G","githubapi","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",G:"githubapi",h:"help",i:"include",j:"json",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}}),ei,ti,er;B.color===!1||kr.TERM==="dumb"?ei=ti=er=r=>r:(ei=r=>`\x1B[35m${r}\x1B[0m`,ti=r=>`\x1B[31m${r}\x1B[0m`,er=r=>`\x1B[32m${r}\x1B[0m`);var Qt=tr(B.greatest),Cs=tr(B.prerelease),Os=tr(B.release),Kt=tr(B.patch),Zt=tr(B.minor),Jt=tr(B["allow-downgrade"]),De=(0,Mc.default)("npm",{registry:"https://registry.npmjs.org"}),Ps={npmrc:De,recursive:!0},ob=xs(B.registry||De.registry),Nc=B.githubapi?xs(B.githubapi):"https://api.github.com",Qc=typeof B.sockets=="number"?parseInt(B.sockets):Xc,zc=r=>Array.from(r.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g)).map(e=>e[0]);function ri(r){let e=Object.create(null);return(t,i)=>t in e?e[t]:e[t]=r(t,i)}function Kc(r,e,t){let i=Yc(e,r);try{return Qg(i),i}catch{}let o=Gg(e);return t&&i===t||o===e?null:Kc(r,o,t)}function ab(r,e){if(r.startsWith("@")){let t=(/@[a-z0-9][\w-.]+/.exec(r)||[])[0],i=xs(rb(t,De));if(i!==e)try{let o=$s(i,Ps);if(o!=null&&o.token)return[o,i]}catch{}return[$s(e,Ps),e]}else return[$s(e,Ps),e]}async function lb(r,e,t,i){let[o,a]=ab(r,t),u={maxSockets:Qc};Object.keys(i).length&&(u.agentOpts=i),o!=null&&o.token&&(u.headers={Authorization:`${o.type} ${o.token}`});let d=(e==="resolutions"?yb(r):r).replace(/\//g,"%2f"),f=`${a}/${d}`;B.verbose&&console.error(`${ei("fetch")} ${f}`);let m=await jr(f,u);if(m!=null&&m.ok)return B.verbose&&console.error(`${er("done")} ${f}`),[await m.json(),e,a,r];throw m!=null&&m.status&&(m!=null&&m.statusText)?new Error(`Received ${m.status} ${m.statusText} for ${r} from ${a}`):new Error(`Unable to fetch ${r} from ${a}`)}function ub({repository:r,homepage:e},t,i){let o;if(t==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(r){let u=typeof r=="string"?r:r.url,h=tb(u);h!=null&&h.browse&&(o=h.browse()),o&&r.directory&&h.treepath&&(o=`${o}/${h.treepath}/HEAD/${r.directory}`),!o&&(r!=null&&r.url)&&/^https?:/.test(r.url)&&(o=r.url)}let a=o||e||"";if(a){let u=new URL(a);u.protocol==="http:"&&u.hostname==="github.com"&&(u.protocol="https:",a=String(u))}return a}function Re(r,e={}){let t={},i=r instanceof Error;typeof r=="string"?t.message=r:i&&(t.error=r.stack||r.message);for(let o of Object.values(e))"oldPrint"in o&&(o.old=o.oldPrint,delete o.oldPrint),"newPrint"in o&&(o.new=o.newPrint,delete o.newPrint),"oldOriginal"in o&&(o.old=o.oldOriginal,delete o.oldOriginal);if(B.json){if(!i){t.results={};for(let[o,a]of Object.entries(e)){let[u,h]=o.split(ot);t.results[u]||(t.results[u]={}),t.results[u][h]=a}}console.info(JSON.stringify(t))}else Object.keys(e).length&&!i&&console.info(fb(e)),(t.message||t.error)&&(t.message?console.info(t.message):t.error&&console.info(ti(t.error)));B["error-on-outdated"]?Wr(Object.keys(e).length?2:0):B["error-on-unchanged"]?Wr(Object.keys(e).length?0:2):Wr(t.error?1:0)}function cb(r,e){let t=Kg()==="win32";t&&Yg(r,0),Xg(r,e,t?{flag:"r+"}:void 0)}function kc(r,e,t){let i=r.split(/\./),o=e.split(/\./),a=t?er:ti,u=/^[0-9a-zA-Z-.]+$/,h="";for(let d=0;d<i.length;d++)if(i[d]!==o[d]){u.test(i[d])?h+=a(i.slice(d).join(".")):h+=i[d].split("").map(f=>u.test(f)?a(f):f).join("")+a(`.${i.slice(d+1).join(".")}`);break}else h+=`${i[d]}.`;return h}function fb(r){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[t,i]of Object.entries(r))e.push([t.split(ot)[1],kc(i.old,i.new,!1),kc(i.new,i.old,!0),i.age||"",i.info]);return(0,Gc.default)(e,{hsep:" ",stringLength:t=>t.replace(Di(),"").length})}function hb(r,e){let t=r;for(let i of Object.keys(e)){let o=i.split(ot)[1],a=e[i].oldOriginal||e[i].old,u=new RegExp(`"${Fc(o)}": +"${Fc(a)}"`,"g");t=t.replace(u,`"${o}": "${e[i].new}"`)}return t}function db(r,e){return r.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Is(r){let e=J.default.parse(r);return e?!!e.prerelease.length:!1}function Zc(r){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(r)}function pb(r){try{return J.default.coerce(r).version}catch{return null}}function mb(r,e,{range:t,semvers:i,usePre:o,useRel:a,useGreatest:u}={}){let h=pb(t),d=0;i=new Set(i),o=Zc(t)||o,o&&(i.add("prerelease"),i.has("patch")&&i.add("prepatch"),i.has("minor")&&i.add("preminor"),i.has("major")&&i.add("premajor"));for(let f of e){let m=J.default.parse(f);if(m.prerelease.length&&(!o||a))continue;let y=J.default.diff(h,m.version);if(!(!y||!i.has(y)))if(u||!("time"in r))J.default.gte(J.default.coerce(m.version).version,h)&&(h=m.version);else{let g=new Date(r.time[f]).getTime();g>=0&&g>d&&(h=m.version,d=g)}}return h||null}function gb(r,e){var o;if(e.range==="*"||e.range.includes("||"))return null;let t=Object.keys(r.versions).filter(a=>J.default.valid(a)),i=mb(r,t,e);if(e.useGreatest)return i;{let a=r["dist-tags"].latest,u=J.default.coerce(e.range).version,h=Zc(e.range),d=Is(i),f=Is(a),m=J.default.gt(i,u);if(!e.useRel&&e.usePre||h&&d||e.useRel&&!m&&h&&!d||h&&!d&&m)return i;if(h&&!d&&!m)return null;let y=J.default.diff(u,a);return y&&y!=="prerelease"&&!e.semvers.has(y.replace(/^pre/,""))||e.useRel&&Is(a)?i:J.default.lt(a,u)&&!f?Jt===!0||(o=Jt==null?void 0:Jt.has)!=null&&o.call(Jt,r.name)?a:null:a}}async function bb([r,e],{useGreatest:t}={}){var d,f;let i=e.old.replace(Jg,""),[o,a,u,h]=eb.exec(i)||[];if(!(!a||!u||!h))if(Ls.test(h)){let m={maxSockets:Qc},y=kr.UPDATES_GITHUB_API_TOKEN||kr.GITHUB_API_TOKEN||kr.GH_TOKEN||kr.HOMEBREW_GITHUB_API_TOKEN;y&&(m.headers={Authorization:`Bearer ${y}`});let g=`${Nc}/repos/${a}/${u}/commits`;B.verbose&&console.error(`${ei("fetch")} ${g}`);let p=await jr(g,m);if(B.verbose&&(p!=null&&p.ok)&&console.error(`${er("done")} ${g}`),!p||!p.ok)return;let _=await p.json(),{sha:R,commit:S}=_[0];if(!R||!R.length)return;let v=((d=S==null?void 0:S.committer)==null?void 0:d.date)??((f=S==null?void 0:S.author)==null?void 0:f.date);if(R=R.substring(0,h.length),h!==R){let P=e.old.replace(h,R);return{key:r,newRange:P,user:a,repo:u,oldRef:h,newRef:R,newDate:v}}}else{let m=await jr(`${Nc}/repos/${a}/${u}/git/refs/tags`);if(!m||!m.ok)return;let g=(await m.json()).map(_=>_.ref.replace(/^refs\/tags\//,"")),p=h.replace(/^v/,"");if(!J.default.valid(p))return;if(t){let _=h,R=h.replace(/^v/,"");for(let S of g){let v=S.replace(/^v/,"");J.default.valid(v)&&(!_||J.default.gt(v,R))&&(_=S,R=v)}if(J.default.neq(p,R))return{key:r,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}else{let _=g[g.length-1],R=_.replace(/^v/,"");if(!J.default.valid(R))return;if(J.default.neq(p,R))return{key:r,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}}}function yb(r){let e=r.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Sb(r){let e=r.match(Bc);return(e==null?void 0:e.length)!==1?r:r.replace(Bc,J.default.coerce(e[0]))}function tr(r){return r===void 0?!1:r===""?!0:typeof r=="string"?r.includes(",")?new Set(r.split(",")):new Set([r]):Array.isArray(r)?new Set(r):!1}async function _b(){var y,g,p,_,R;for(let S of[process.stdout,process.stderr])(g=(y=S==null?void 0:S._handle)==null?void 0:y.setBlocking)==null||g.call(y,!0);B.help&&(Ug.write(`usage: updates [options]
23
23
 
24
24
  Options:
25
25
  -u, --update Update versions and write package.json
@@ -46,7 +46,5 @@ Content-Type: ${a.type||"application/octet-stream"}\r
46
46
 
47
47
  Examples:
48
48
  $ updates
49
- $ updates -u
50
- $ updates -u -m -e eslint
51
- $ updates -u -U && rm -rf node_modules && npm i
52
- `),Wr(0)),N.version&&(console.info("14.0.0"),Wr(0));let r={};if(De["strict-ssl"]===!1)r.rejectUnauthorized=!1;else if("cafile"in De&&(r.ca=Dc.concat(zc(qc(De.cafile,"utf8")))),"ca"in De){let _=Array.isArray(De.ca)?De.ca:[De.ca];r.ca=Dc.concat(_.map(v=>zc(v)))}let e;if(N.file){let _;try{_=Vg(N.file)}catch(v){Re(new Error(`Unable to open ${N.file}: ${v.message}`))}_!=null&&_.isFile()?e=N.file:_!=null&&_.isDirectory()?e=Yc(N.file,"package.json"):Re(new Error(`${N.file} is neither a file nor directory`))}else{let _=jg();e=Kc("package.json",_),e||Re(new Error(`Unable to find package.json in ${_} or any of its parent directories`))}let t;N.types?t=Array.isArray(N.types)?N.types:N.types.split(","):t=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"];let i,o;try{o=qc(e,"utf8")}catch(_){Re(new Error(`Unable to open ${e}: ${_.message}`))}try{i=JSON.parse(o)}catch(_){Re(new Error(`Error parsing ${e}: ${_.message}`))}let a,u;N.include&&N.include!==!0&&(a=new Set((Array.isArray(N.include)?N.include:[N.include]).flatMap(_=>_.split(",")))),N.exclude&&N.exclude!==!0&&(u=new Set((Array.isArray(N.exclude)?N.exclude:[N.exclude]).flatMap(_=>_.split(","))));function h(_){var v,P;return!(((v=u==null?void 0:u.has)==null?void 0:v.call(u,_))===!0||((P=a==null?void 0:a.has)==null?void 0:P.call(a,_))===!1)}let d={},f={};for(let _ of t)for(let[v,P]of Object.entries(i[_]||{}))J.default.validRange(P)&&h(v)?d[`${_}${ot}${v}`]={old:Sb(P),oldOriginal:P}:h(v)&&(f[`${_}${ot}${v}`]={old:P});!Object.keys(d).length&&!Object.keys(f).length&&Re(a||u?new Error("No dependencies match the given include/exclude filters"):"No dependencies present, nothing to do");let m=await Promise.all(Object.keys(d).map(_=>{let[v,P]=_.split(ot);return lb(P,v,ob,r)}));for(let[_,v,P,D]of m){if(_!=null&&_.error)throw new Error(_.error);let A=typeof Qt=="boolean"?Qt:Qt.has(_.name),q=typeof $s=="boolean"?$s:$s.has(_.name),I=typeof Cs=="boolean"?Cs:Cs.has(_.name),L;Kt===!0||(p=Kt==null?void 0:Kt.has)!=null&&p.call(Kt,_.name)?L=nb:Zt===!0||(S=Zt==null?void 0:Zt.has)!=null&&S.call(Zt,_.name)?L=ib:L=sb;let k=`${v}${ot}${D}`,Y=d[k].old,X=gb(_,{usePre:q,useRel:I,useGreatest:A,semvers:L,range:Y}),oe=db(Y,X);!X||Y===oe?delete d[k]:(d[k].new=oe,d[k].info=ub(_.versions[X]||_,P,_.name),(R=_.time)!=null&&R[X]&&(d[k].age=As(_.time[X],{noAffix:!0})))}if(Object.keys(f).length){let _=await Promise.all(Object.entries(f).map(([v,P])=>{let D=v.split(ot)[1],A=typeof Qt=="boolean"?Qt:Qt.has(D);return bb([v,P],{useGreatest:A})}));_=_.filter(Boolean);for(let v of _||[]){let{key:P,newRange:D,user:A,repo:q,oldRef:I,newRef:L,newDate:k}=v;d[P]={old:f[P].old,new:D,oldPrint:Is.test(I)?I.substring(0,7):I,newPrint:Is.test(L)?L.substring(0,7):L,info:`https://github.com/${A}/${q}`,...k?{age:As(k,{noAffix:!0})}:{}}}}Object.keys(d).length||Re("All dependencies are up to date."),N.update||Re(void 0,d);try{cb(e,hb(o,d))}catch(_){Re(new Error(`Error writing ${e}: ${_.message}`))}Re(jr("\u2728 package.json updated"),d)}_b().catch(Re);
49
+ $ updates -u && npm i
50
+ `),Wr(0)),B.version&&(console.info("14.0.1"),Wr(0));let r={};if(De["strict-ssl"]===!1)r.rejectUnauthorized=!1;else if("cafile"in De&&(r.ca=Dc.concat(zc(qc(De.cafile,"utf8")))),"ca"in De){let S=Array.isArray(De.ca)?De.ca:[De.ca];r.ca=Dc.concat(S.map(v=>zc(v)))}let e;if(B.file){let S;try{S=Vg(B.file)}catch(v){Re(new Error(`Unable to open ${B.file}: ${v.message}`))}S!=null&&S.isFile()?e=B.file:S!=null&&S.isDirectory()?e=Yc(B.file,"package.json"):Re(new Error(`${B.file} is neither a file nor directory`))}else{let S=jg();e=Kc("package.json",S),e||Re(new Error(`Unable to find package.json in ${S} or any of its parent directories`))}let t;B.types?t=Array.isArray(B.types)?B.types:B.types.split(","):t=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"];let i,o;try{o=qc(e,"utf8")}catch(S){Re(new Error(`Unable to open ${e}: ${S.message}`))}try{i=JSON.parse(o)}catch(S){Re(new Error(`Error parsing ${e}: ${S.message}`))}let a,u;B.include&&B.include!==!0&&(a=new Set((Array.isArray(B.include)?B.include:[B.include]).flatMap(S=>S.split(",")))),B.exclude&&B.exclude!==!0&&(u=new Set((Array.isArray(B.exclude)?B.exclude:[B.exclude]).flatMap(S=>S.split(","))));function h(S){var v,P;return!(((v=u==null?void 0:u.has)==null?void 0:v.call(u,S))===!0||((P=a==null?void 0:a.has)==null?void 0:P.call(a,S))===!1)}let d={},f={};for(let S of t)for(let[v,P]of Object.entries(i[S]||{}))J.default.validRange(P)&&h(v)?d[`${S}${ot}${v}`]={old:Sb(P),oldOriginal:P}:h(v)&&(f[`${S}${ot}${v}`]={old:P});!Object.keys(d).length&&!Object.keys(f).length&&Re(a||u?new Error("No dependencies match the given include/exclude filters"):"No dependencies present, nothing to do");let m=await Promise.all(Object.keys(d).map(S=>{let[v,P]=S.split(ot);return lb(P,v,ob,r)}));for(let[S,v,P,D]of m){if(S!=null&&S.error)throw new Error(S.error);let A=typeof Qt=="boolean"?Qt:Qt.has(S.name),q=typeof Cs=="boolean"?Cs:Cs.has(S.name),I=typeof Os=="boolean"?Os:Os.has(S.name),L;Kt===!0||(p=Kt==null?void 0:Kt.has)!=null&&p.call(Kt,S.name)?L=nb:Zt===!0||(_=Zt==null?void 0:Zt.has)!=null&&_.call(Zt,S.name)?L=ib:L=sb;let W=`${v}${ot}${D}`,Y=d[W].old,X=gb(S,{usePre:q,useRel:I,useGreatest:A,semvers:L,range:Y}),oe=db(Y,X);!X||Y===oe?delete d[W]:(d[W].new=oe,d[W].info=ub(S.versions[X]||S,P,S.name),(R=S.time)!=null&&R[X]&&(d[W].age=Ts(S.time[X],{noAffix:!0})))}if(Object.keys(f).length){let S=await Promise.all(Object.entries(f).map(([v,P])=>{let D=v.split(ot)[1],A=typeof Qt=="boolean"?Qt:Qt.has(D);return bb([v,P],{useGreatest:A})}));for(let v of(S||[]).filter(Boolean)){let{key:P,newRange:D,user:A,repo:q,oldRef:I,newRef:L,newDate:W}=v;d[P]={old:f[P].old,new:D,oldPrint:Ls.test(I)?I.substring(0,7):I,newPrint:Ls.test(L)?L.substring(0,7):L,info:`https://github.com/${A}/${q}`,...W?{age:Ts(W,{noAffix:!0})}:{}}}}Object.keys(d).length||Re("All dependencies are up to date."),B.update||Re(void 0,d);try{cb(e,hb(o,d))}catch(S){Re(new Error(`Error writing ${e}: ${S.message}`))}Re(er("\u2728 package.json updated"),d)}_b().catch(Re);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "updates",
3
- "version": "14.0.0",
3
+ "version": "14.0.1",
4
4
  "description": "Flexible npm dependency update tool",
5
5
  "author": "silverwind",
6
6
  "repository": "silverwind/updates",
@@ -8,7 +8,7 @@
8
8
  "bin": "./bin/updates.js",
9
9
  "type": "module",
10
10
  "engines": {
11
- "node": ">= 16"
11
+ "node": ">=16"
12
12
  },
13
13
  "files": [
14
14
  "./bin/updates.js"