updates 13.2.9 → 13.4.0

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 (2) hide show
  1. package/bin/updates.js +14 -14
  2. package/package.json +9 -9
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 xh=Object.create;var zs=Object.defineProperty;var Lh=Object.getOwnPropertyDescriptor;var qh=Object.getOwnPropertyNames;var Dh=Object.getPrototypeOf,Bh=Object.prototype.hasOwnProperty;var we=(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 Er=(r,e)=>()=>(r&&(e=r(r=0)),e);var $=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Nh=(r,e)=>{for(var t in e)zs(r,t,{get:e[t],enumerable:!0})},zh=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of qh(e))!Bh.call(r,o)&&o!==t&&zs(r,o,{get:()=>e[o],enumerable:!(s=Lh(e,o))||s.enumerable});return r};var xe=(r,e,t)=>(t=r!=null?xh(Dh(r)):{},zh(e||!r||!r.__esModule?zs(t,"default",{value:r,enumerable:!0}):t,r));var Fs=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var F=(r,e,t)=>(Fs(r,e,"read from private field"),t?t.call(r):e.get(r)),oe=(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)},fe=(r,e,t,s)=>(Fs(r,e,"write to private field"),s?s.call(r,t):e.set(r,t),t);var ae=(r,e,t)=>(Fs(r,e,"access private method"),t);var sa=$((Ib,na)=>{"use strict";var ks=we("https"),js=we("http"),{URL:ra}=we("url"),Us=class extends js.Agent{constructor(e){let{proxy:t,proxyRequestOptions:s,...o}=e;super(o),this.proxy=typeof t=="string"?new ra(t):t,this.proxyRequestOptions=s||{}}createConnection(e,t){let s={...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");s.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(s.servername=this.proxy.hostname);let o=(this.proxy.protocol==="http:"?js:ks).request(s);o.once("connect",(a,u,d)=>{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()}},Ms=class extends ks.Agent{constructor(e){let{proxy:t,proxyRequestOptions:s,...o}=e;super(o),this.proxy=typeof t=="string"?new ra(t):t,this.proxyRequestOptions=s||{}}createConnection(e,t){let s={...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");s.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(s.servername=this.proxy.hostname);let o=(this.proxy.protocol==="http:"?js:ks).request(s);o.once("connect",(a,u,d)=>{if(o.removeAllListeners(),u.removeAllListeners(),a.statusCode===200){let f=super.createConnection({...e,socket:u});t(null,f)}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()}};na.exports={HttpProxyAgent:Us,HttpsProxyAgent:Ms}});var la=$(aa=>{"use strict";var Fh=we("url").parse,Wh={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},kh=String.prototype.endsWith||function(r){return r.length<=this.length&&this.indexOf(r,this.length-r.length)!==-1};function jh(r){var e=typeof r=="string"?Fh(r):r||{},t=e.protocol,s=e.host,o=e.port;if(typeof s!="string"||!s||typeof t!="string"||(t=t.split(":",1)[0],s=s.replace(/:\d*$/,""),o=parseInt(o)||Wh[t]||0,!Uh(s,o)))return"";var a=zt("npm_config_"+t+"_proxy")||zt(t+"_proxy")||zt("npm_config_proxy")||zt("all_proxy");return a&&a.indexOf("://")===-1&&(a=t+"://"+a),a}function Uh(r,e){var t=(zt("npm_config_no_proxy")||zt("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(s){if(!s)return!0;var o=s.match(/^(.+):(\d+)$/),a=o?o[1]:s,u=o?parseInt(o[2]):0;return u&&u!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!kh.call(r,a)):r!==a}):!0}function zt(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}aa.getProxyForUrl=jh});var Vs=$((Wb,da)=>{"use strict";function Vh(r,e){var t=r;e.slice(0,-1).forEach(function(o){t=t[o]||{}});var s=e[e.length-1];return s in t}function fa(r){return typeof r=="number"||/^0x[0-9a-f]+$/i.test(r)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(r)}function ha(r,e){return e==="constructor"&&typeof r[e]=="function"||e==="__proto__"}da.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(T){t.bools[T]=!0});var s={};function o(T){return s[T].some(function(q){return t.bools[q]})}Object.keys(e.alias||{}).forEach(function(T){s[T]=[].concat(e.alias[T]),s[T].forEach(function(q){s[q]=[T].concat(s[T].filter(function(D){return q!==D}))})}),[].concat(e.string).filter(Boolean).forEach(function(T){t.strings[T]=!0,s[T]&&[].concat(s[T]).forEach(function(q){t.strings[q]=!0})});var a=e.default||{},u={_:[]};function d(T,q){return t.allBools&&/^--[^=]+$/.test(q)||t.strings[T]||t.bools[T]||s[T]}function f(T,q,D){for(var x=T,U=0;U<q.length-1;U++){var ie=q[U];if(ha(x,ie))return;x[ie]===void 0&&(x[ie]={}),(x[ie]===Object.prototype||x[ie]===Number.prototype||x[ie]===String.prototype)&&(x[ie]={}),x[ie]===Array.prototype&&(x[ie]=[]),x=x[ie]}var ee=q[q.length-1];ha(x,ee)||((x===Object.prototype||x===Number.prototype||x===String.prototype)&&(x={}),x===Array.prototype&&(x=[]),x[ee]===void 0||t.bools[ee]||typeof x[ee]=="boolean"?x[ee]=D:Array.isArray(x[ee])?x[ee].push(D):x[ee]=[x[ee],D])}function h(T,q,D){if(!(D&&t.unknownFn&&!d(T,D)&&t.unknownFn(D)===!1)){var x=!t.strings[T]&&fa(q)?Number(q):q;f(u,T.split("."),x),(s[T]||[]).forEach(function(U){f(u,U.split("."),x)})}}Object.keys(t.bools).forEach(function(T){h(T,a[T]===void 0?!1:a[T])});var g=[];r.indexOf("--")!==-1&&(g=r.slice(r.indexOf("--")+1),r=r.slice(0,r.indexOf("--")));for(var y=0;y<r.length;y++){var b=r[y],p,S;if(/^--.+=/.test(b)){var v=b.match(/^--([^=]+)=([\s\S]*)$/);p=v[1];var _=v[2];t.bools[p]&&(_=_!=="false"),h(p,_,b)}else if(/^--no-.+/.test(b))p=b.match(/^--no-(.+)/)[1],h(p,!1,b);else if(/^--.+/.test(b))p=b.match(/^--(.+)/)[1],S=r[y+1],S!==void 0&&!/^(-|--)[^-]/.test(S)&&!t.bools[p]&&!t.allBools&&(!s[p]||!o(p))?(h(p,S,b),y+=1):/^(true|false)$/.test(S)?(h(p,S==="true",b),y+=1):h(p,t.strings[p]?"":!0,b);else if(/^-[^-]+/.test(b)){for(var R=b.slice(1,-1).split(""),O=!1,B=0;B<R.length;B++){if(S=b.slice(B+2),S==="-"){h(R[B],S,b);continue}if(/[A-Za-z]/.test(R[B])&&S[0]==="="){h(R[B],S.slice(1),b),O=!0;break}if(/[A-Za-z]/.test(R[B])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(S)){h(R[B],S,b),O=!0;break}if(R[B+1]&&R[B+1].match(/\W/)){h(R[B],b.slice(B+2),b),O=!0;break}else h(R[B],t.strings[R[B]]?"":!0,b)}p=b.slice(-1)[0],!O&&p!=="-"&&(r[y+1]&&!/^(-|--)[^-]/.test(r[y+1])&&!t.bools[p]&&(!s[p]||!o(p))?(h(p,r[y+1],b),y+=1):r[y+1]&&/^(true|false)$/.test(r[y+1])?(h(p,r[y+1]==="true",b),y+=1):h(p,t.strings[p]?"":!0,b))}else if((!t.unknownFn||t.unknownFn(b)!==!1)&&u._.push(t.strings._||!fa(b)?b:Number(b)),e.stopEarly){u._.push.apply(u._,r.slice(y+1));break}}return Object.keys(a).forEach(function(T){Vh(u,T.split("."))||(f(u,T.split("."),a[T]),(s[T]||[]).forEach(function(q){f(u,q.split("."),a[T])}))}),e["--"]?u["--"]=g.slice():g.forEach(function(T){u._.push(T)}),u}});var ga=$((Cn,ma)=>{(function(r,e){typeof Cn=="object"&&typeof ma<"u"?e(Cn):typeof define=="function"&&define.amd?define(["exports"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.WebStreamsPolyfill={}))})(Cn,function(r){"use strict";let e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:n=>`Symbol(${n})`;function t(){}function s(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}let o=s();function a(n){return typeof n=="object"&&n!==null||typeof n=="function"}let u=t,d=Promise,f=Promise.prototype.then,h=Promise.resolve.bind(d),g=Promise.reject.bind(d);function y(n){return new d(n)}function b(n){return h(n)}function p(n){return g(n)}function S(n,i,l){return f.call(n,i,l)}function v(n,i,l){S(S(n,i,l),void 0,u)}function _(n,i){v(n,i)}function R(n,i){v(n,void 0,i)}function O(n,i,l){return S(n,i,l)}function B(n){S(n,void 0,u)}let T=(()=>{let n=o&&o.queueMicrotask;if(typeof n=="function")return n;let i=b(void 0);return l=>S(i,l)})();function q(n,i,l){if(typeof n!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(n,i,l)}function D(n,i,l){try{return b(q(n,i,l))}catch(c){return p(c)}}let x=16384;class U{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(i){let l=this._back,c=l;l._elements.length===x-1&&(c={_elements:[],_next:void 0}),l._elements.push(i),c!==l&&(this._back=c,l._next=c),++this._size}shift(){let i=this._front,l=i,c=this._cursor,m=c+1,w=i._elements,E=w[c];return m===x&&(l=i._next,m=0),--this._size,this._cursor=m,i!==l&&(this._front=l),w[c]=void 0,E}forEach(i){let l=this._cursor,c=this._front,m=c._elements;for(;(l!==m.length||c._next!==void 0)&&!(l===m.length&&(c=c._next,m=c._elements,l=0,m.length===0));)i(m[l]),++l}peek(){let i=this._front,l=this._cursor;return i._elements[l]}}function ie(n,i){n._ownerReadableStream=i,i._reader=n,i._state==="readable"?os(n):i._state==="closed"?af(n):ki(n,i._storedError)}function ee(n,i){let l=n._ownerReadableStream;return Oe(l,i)}function Ee(n){n._ownerReadableStream._state==="readable"?as(n,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):lf(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 Ot(n){return new TypeError("Cannot "+n+" a stream using a released reader")}function os(n){n._closedPromise=y((i,l)=>{n._closedPromise_resolve=i,n._closedPromise_reject=l})}function ki(n,i){os(n),as(n,i)}function af(n){os(n),ji(n)}function as(n,i){n._closedPromise_reject!==void 0&&(B(n._closedPromise),n._closedPromise_reject(i),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}function lf(n,i){ki(n,i)}function ji(n){n._closedPromise_resolve!==void 0&&(n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}let Ui=e("[[AbortSteps]]"),Mi=e("[[ErrorSteps]]"),ls=e("[[CancelSteps]]"),us=e("[[PullSteps]]"),Hi=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},uf=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};function cf(n){return typeof n=="object"||typeof n=="function"}function je(n,i){if(n!==void 0&&!cf(n))throw new TypeError(`${i} is not an object.`)}function Ce(n,i){if(typeof n!="function")throw new TypeError(`${i} is not a function.`)}function ff(n){return typeof n=="object"&&n!==null||typeof n=="function"}function Gi(n,i){if(!ff(n))throw new TypeError(`${i} is not an object.`)}function Ue(n,i,l){if(n===void 0)throw new TypeError(`Parameter ${i} is required in '${l}'.`)}function cs(n,i,l){if(n===void 0)throw new TypeError(`${i} is required in '${l}'.`)}function fs(n){return Number(n)}function Vi(n){return n===0?0:n}function hf(n){return Vi(uf(n))}function Yi(n,i){let c=Number.MAX_SAFE_INTEGER,m=Number(n);if(m=Vi(m),!Hi(m))throw new TypeError(`${i} is not a finite number`);if(m=hf(m),m<0||m>c)throw new TypeError(`${i} is outside the accepted range of 0 to ${c}, inclusive`);return!Hi(m)||m===0?0:m}function hs(n,i){if(!et(n))throw new TypeError(`${i} is not a ReadableStream.`)}function It(n){return new or(n)}function Xi(n,i){n._reader._readRequests.push(i)}function ds(n,i,l){let m=n._reader._readRequests.shift();l?m._closeSteps():m._chunkSteps(i)}function Qr(n){return n._reader._readRequests.length}function Qi(n){let i=n._reader;return!(i===void 0||!Qe(i))}class or{constructor(i){if(Ue(i,1,"ReadableStreamDefaultReader"),hs(i,"First parameter"),tt(i))throw new TypeError("This stream has already been locked for exclusive reading by another reader");ie(this,i),this._readRequests=new U}get closed(){return Qe(this)?this._closedPromise:p(Zr("closed"))}cancel(i=void 0){return Qe(this)?this._ownerReadableStream===void 0?p(Ot("cancel")):ee(this,i):p(Zr("cancel"))}read(){if(!Qe(this))return p(Zr("read"));if(this._ownerReadableStream===void 0)return p(Ot("read from"));let i,l,c=y((w,E)=>{i=w,l=E});return ar(this,{_chunkSteps:w=>i({value:w,done:!1}),_closeSteps:()=>i({value:void 0,done:!0}),_errorSteps:w=>l(w)}),c}releaseLock(){if(!Qe(this))throw Zr("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");Ee(this)}}}Object.defineProperties(or.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(or.prototype,e.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Qe(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readRequests")?!1:n instanceof or}function ar(n,i){let l=n._ownerReadableStream;l._disturbed=!0,l._state==="closed"?i._closeSteps():l._state==="errored"?i._errorSteps(l._storedError):l._readableStreamController[us](i)}function Zr(n){return new TypeError(`ReadableStreamDefaultReader.prototype.${n} can only be used on a ReadableStreamDefaultReader`)}let Zi=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ji{constructor(i,l){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=i,this._preventCancel=l}next(){let i=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?O(this._ongoingPromise,i,i):i(),this._ongoingPromise}return(i){let l=()=>this._returnSteps(i);return this._ongoingPromise?O(this._ongoingPromise,l,l):l()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let i=this._reader;if(i._ownerReadableStream===void 0)return p(Ot("iterate"));let l,c,m=y((E,A)=>{l=E,c=A});return ar(i,{_chunkSteps:E=>{this._ongoingPromise=void 0,T(()=>l({value:E,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,Ee(i),l({value:void 0,done:!0})},_errorSteps:E=>{this._ongoingPromise=void 0,this._isFinished=!0,Ee(i),c(E)}}),m}_returnSteps(i){if(this._isFinished)return Promise.resolve({value:i,done:!0});this._isFinished=!0;let l=this._reader;if(l._ownerReadableStream===void 0)return p(Ot("finish iterating"));if(!this._preventCancel){let c=ee(l,i);return Ee(l),O(c,()=>({value:i,done:!0}))}return Ee(l),b({value:i,done:!0})}}let Ki={next(){return eo(this)?this._asyncIteratorImpl.next():p(to("next"))},return(n){return eo(this)?this._asyncIteratorImpl.return(n):p(to("return"))}};Zi!==void 0&&Object.setPrototypeOf(Ki,Zi);function df(n,i){let l=It(n),c=new Ji(l,i),m=Object.create(Ki);return m._asyncIteratorImpl=c,m}function eo(n){if(!a(n)||!Object.prototype.hasOwnProperty.call(n,"_asyncIteratorImpl"))return!1;try{return n._asyncIteratorImpl instanceof Ji}catch{return!1}}function to(n){return new TypeError(`ReadableStreamAsyncIterator.${n} can only be used on a ReadableSteamAsyncIterator`)}let ro=Number.isNaN||function(n){return n!==n};function lr(n){return n.slice()}function no(n,i,l,c,m){new Uint8Array(n).set(new Uint8Array(l,c,m),i)}function Cb(n){return n}function Jr(n){return!1}function so(n,i,l){if(n.slice)return n.slice(i,l);let c=l-i,m=new ArrayBuffer(c);return no(m,0,n,i,c),m}function pf(n){return!(typeof n!="number"||ro(n)||n<0)}function io(n){let i=so(n.buffer,n.byteOffset,n.byteOffset+n.byteLength);return new Uint8Array(i)}function ps(n){let i=n._queue.shift();return n._queueTotalSize-=i.size,n._queueTotalSize<0&&(n._queueTotalSize=0),i.value}function ms(n,i,l){if(!pf(l)||l===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");n._queue.push({value:i,size:l}),n._queueTotalSize+=l}function mf(n){return n._queue.peek().value}function Ze(n){n._queue=new U,n._queueTotalSize=0}class ur{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!gs(this))throw _s("view");return this._view}respond(i){if(!gs(this))throw _s("respond");if(Ue(i,1,"respond"),i=Yi(i,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Jr(this._view.buffer),rn(this._associatedReadableByteStreamController,i)}respondWithNewView(i){if(!gs(this))throw _s("respondWithNewView");if(Ue(i,1,"respondWithNewView"),!ArrayBuffer.isView(i))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");Jr(i.buffer),nn(this._associatedReadableByteStreamController,i)}}Object.defineProperties(ur.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(ur.prototype,e.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class xt{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!ft(this))throw fr("byobRequest");return ws(this)}get desiredSize(){if(!ft(this))throw fr("desiredSize");return po(this)}close(){if(!ft(this))throw fr("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let i=this._controlledReadableByteStream._state;if(i!=="readable")throw new TypeError(`The stream (in ${i} state) is not in the readable state and cannot be closed`);cr(this)}enqueue(i){if(!ft(this))throw fr("enqueue");if(Ue(i,1,"enqueue"),!ArrayBuffer.isView(i))throw new TypeError("chunk must be an array buffer view");if(i.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(i.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`);tn(this,i)}error(i=void 0){if(!ft(this))throw fr("error");Pe(this,i)}[ls](i){oo(this),Ze(this);let l=this._cancelAlgorithm(i);return en(this),l}[us](i){let l=this._controlledReadableByteStream;if(this._queueTotalSize>0){let m=this._queue.shift();this._queueTotalSize-=m.byteLength,co(this);let w=new Uint8Array(m.buffer,m.byteOffset,m.byteLength);i._chunkSteps(w);return}let c=this._autoAllocateChunkSize;if(c!==void 0){let m;try{m=new ArrayBuffer(c)}catch(E){i._errorSteps(E);return}let w={buffer:m,bufferByteLength:c,byteOffset:0,byteLength:c,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(w)}Xi(l,i),ht(this)}}Object.defineProperties(xt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(xt.prototype,e.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ft(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledReadableByteStream")?!1:n instanceof xt}function gs(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_associatedReadableByteStreamController")?!1:n instanceof ur}function ht(n){if(!Sf(n))return;if(n._pulling){n._pullAgain=!0;return}n._pulling=!0;let l=n._pullAlgorithm();v(l,()=>{n._pulling=!1,n._pullAgain&&(n._pullAgain=!1,ht(n))},c=>{Pe(n,c)})}function oo(n){ys(n),n._pendingPullIntos=new U}function bs(n,i){let l=!1;n._state==="closed"&&(l=!0);let c=ao(i);i.readerType==="default"?ds(n,c,l):Ef(n,c,l)}function ao(n){let i=n.bytesFilled,l=n.elementSize;return new n.viewConstructor(n.buffer,n.byteOffset,i/l)}function Kr(n,i,l,c){n._queue.push({buffer:i,byteOffset:l,byteLength:c}),n._queueTotalSize+=c}function lo(n,i){let l=i.elementSize,c=i.bytesFilled-i.bytesFilled%l,m=Math.min(n._queueTotalSize,i.byteLength-i.bytesFilled),w=i.bytesFilled+m,E=w-w%l,A=m,I=!1;E>c&&(A=E-i.bytesFilled,I=!0);let W=n._queue;for(;A>0;){let Y=W.peek(),G=Math.min(A,Y.byteLength),Z=i.byteOffset+i.bytesFilled;no(i.buffer,Z,Y.buffer,Y.byteOffset,G),Y.byteLength===G?W.shift():(Y.byteOffset+=G,Y.byteLength-=G),n._queueTotalSize-=G,uo(n,G,i),A-=G}return I}function uo(n,i,l){l.bytesFilled+=i}function co(n){n._queueTotalSize===0&&n._closeRequested?(en(n),Sr(n._controlledReadableByteStream)):ht(n)}function ys(n){n._byobRequest!==null&&(n._byobRequest._associatedReadableByteStreamController=void 0,n._byobRequest._view=null,n._byobRequest=null)}function fo(n){for(;n._pendingPullIntos.length>0;){if(n._queueTotalSize===0)return;let i=n._pendingPullIntos.peek();lo(n,i)&&(Ss(n),bs(n._controlledReadableByteStream,i))}}function gf(n,i,l){let c=n._controlledReadableByteStream,m=1;i.constructor!==DataView&&(m=i.constructor.BYTES_PER_ELEMENT);let w=i.constructor,E=i.buffer,A={buffer:E,bufferByteLength:E.byteLength,byteOffset:i.byteOffset,byteLength:i.byteLength,bytesFilled:0,elementSize:m,viewConstructor:w,readerType:"byob"};if(n._pendingPullIntos.length>0){n._pendingPullIntos.push(A),bo(c,l);return}if(c._state==="closed"){let I=new w(A.buffer,A.byteOffset,0);l._closeSteps(I);return}if(n._queueTotalSize>0){if(lo(n,A)){let I=ao(A);co(n),l._chunkSteps(I);return}if(n._closeRequested){let I=new TypeError("Insufficient bytes to fill elements in the given buffer");Pe(n,I),l._errorSteps(I);return}}n._pendingPullIntos.push(A),bo(c,l),ht(n)}function bf(n,i){let l=n._controlledReadableByteStream;if(Es(l))for(;yo(l)>0;){let c=Ss(n);bs(l,c)}}function yf(n,i,l){if(uo(n,i,l),l.bytesFilled<l.elementSize)return;Ss(n);let c=l.bytesFilled%l.elementSize;if(c>0){let m=l.byteOffset+l.bytesFilled,w=so(l.buffer,m-c,m);Kr(n,w,0,w.byteLength)}l.bytesFilled-=c,bs(n._controlledReadableByteStream,l),fo(n)}function ho(n,i){let l=n._pendingPullIntos.peek();ys(n),n._controlledReadableByteStream._state==="closed"?bf(n):yf(n,i,l),ht(n)}function Ss(n){return n._pendingPullIntos.shift()}function Sf(n){let i=n._controlledReadableByteStream;return i._state!=="readable"||n._closeRequested||!n._started?!1:!!(Qi(i)&&Qr(i)>0||Es(i)&&yo(i)>0||po(n)>0)}function en(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0}function cr(n){let i=n._controlledReadableByteStream;if(!(n._closeRequested||i._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 Pe(n,c),c}en(n),Sr(i)}}function tn(n,i){let l=n._controlledReadableByteStream;if(n._closeRequested||l._state!=="readable")return;let c=i.buffer,m=i.byteOffset,w=i.byteLength,E=c;if(n._pendingPullIntos.length>0){let A=n._pendingPullIntos.peek();Jr(A.buffer),A.buffer=A.buffer}if(ys(n),Qi(l))if(Qr(l)===0)Kr(n,E,m,w);else{let A=new Uint8Array(E,m,w);ds(l,A,!1)}else Es(l)?(Kr(n,E,m,w),fo(n)):Kr(n,E,m,w);ht(n)}function Pe(n,i){let l=n._controlledReadableByteStream;l._state==="readable"&&(oo(n),Ze(n),en(n),jo(l,i))}function ws(n){if(n._byobRequest===null&&n._pendingPullIntos.length>0){let i=n._pendingPullIntos.peek(),l=new Uint8Array(i.buffer,i.byteOffset+i.bytesFilled,i.byteLength-i.bytesFilled),c=Object.create(ur.prototype);_f(c,n,l),n._byobRequest=c}return n._byobRequest}function po(n){let i=n._controlledReadableByteStream._state;return i==="errored"?null:i==="closed"?0:n._strategyHWM-n._queueTotalSize}function rn(n,i){let l=n._pendingPullIntos.peek();if(n._controlledReadableByteStream._state==="closed"){if(i!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(i===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(l.bytesFilled+i>l.byteLength)throw new RangeError("bytesWritten out of range")}l.buffer=l.buffer,ho(n,i)}function nn(n,i){let l=n._pendingPullIntos.peek();if(n._controlledReadableByteStream._state==="closed"){if(i.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(i.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!==i.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(l.bufferByteLength!==i.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(l.bytesFilled+i.byteLength>l.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");l.buffer=i.buffer,ho(n,i.byteLength)}function mo(n,i,l,c,m,w,E){i._controlledReadableByteStream=n,i._pullAgain=!1,i._pulling=!1,i._byobRequest=null,i._queue=i._queueTotalSize=void 0,Ze(i),i._closeRequested=!1,i._started=!1,i._strategyHWM=w,i._pullAlgorithm=c,i._cancelAlgorithm=m,i._autoAllocateChunkSize=E,i._pendingPullIntos=new U,n._readableStreamController=i;let A=l();v(b(A),()=>{i._started=!0,ht(i)},I=>{Pe(i,I)})}function wf(n,i,l){let c=Object.create(xt.prototype),m=()=>{},w=()=>b(void 0),E=()=>b(void 0);i.start!==void 0&&(m=()=>i.start(c)),i.pull!==void 0&&(w=()=>i.pull(c)),i.cancel!==void 0&&(E=I=>i.cancel(I));let A=i.autoAllocateChunkSize;if(A===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");mo(n,c,m,w,E,l,A)}function _f(n,i,l){n._associatedReadableByteStreamController=i,n._view=l}function _s(n){return new TypeError(`ReadableStreamBYOBRequest.prototype.${n} can only be used on a ReadableStreamBYOBRequest`)}function fr(n){return new TypeError(`ReadableByteStreamController.prototype.${n} can only be used on a ReadableByteStreamController`)}function go(n){return new hr(n)}function bo(n,i){n._reader._readIntoRequests.push(i)}function Ef(n,i,l){let m=n._reader._readIntoRequests.shift();l?m._closeSteps(i):m._chunkSteps(i)}function yo(n){return n._reader._readIntoRequests.length}function Es(n){let i=n._reader;return!(i===void 0||!dt(i))}class hr{constructor(i){if(Ue(i,1,"ReadableStreamBYOBReader"),hs(i,"First parameter"),tt(i))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ft(i._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");ie(this,i),this._readIntoRequests=new U}get closed(){return dt(this)?this._closedPromise:p(sn("closed"))}cancel(i=void 0){return dt(this)?this._ownerReadableStream===void 0?p(Ot("cancel")):ee(this,i):p(sn("cancel"))}read(i){if(!dt(this))return p(sn("read"));if(!ArrayBuffer.isView(i))return p(new TypeError("view must be an array buffer view"));if(i.byteLength===0)return p(new TypeError("view must have non-zero byteLength"));if(i.buffer.byteLength===0)return p(new TypeError("view's buffer must have non-zero byteLength"));if(Jr(i.buffer),this._ownerReadableStream===void 0)return p(Ot("read from"));let l,c,m=y((E,A)=>{l=E,c=A});return So(this,i,{_chunkSteps:E=>l({value:E,done:!1}),_closeSteps:E=>l({value:E,done:!0}),_errorSteps:E=>c(E)}),m}releaseLock(){if(!dt(this))throw sn("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");Ee(this)}}}Object.defineProperties(hr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(hr.prototype,e.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function dt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readIntoRequests")?!1:n instanceof hr}function So(n,i,l){let c=n._ownerReadableStream;c._disturbed=!0,c._state==="errored"?l._errorSteps(c._storedError):gf(c._readableStreamController,i,l)}function sn(n){return new TypeError(`ReadableStreamBYOBReader.prototype.${n} can only be used on a ReadableStreamBYOBReader`)}function dr(n,i){let{highWaterMark:l}=n;if(l===void 0)return i;if(ro(l)||l<0)throw new RangeError("Invalid highWaterMark");return l}function on(n){let{size:i}=n;return i||(()=>1)}function an(n,i){je(n,i);let l=n==null?void 0:n.highWaterMark,c=n==null?void 0:n.size;return{highWaterMark:l===void 0?void 0:fs(l),size:c===void 0?void 0:Rf(c,`${i} has member 'size' that`)}}function Rf(n,i){return Ce(n,i),l=>fs(n(l))}function vf(n,i){je(n,i);let l=n==null?void 0:n.abort,c=n==null?void 0:n.close,m=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:Tf(l,n,`${i} has member 'abort' that`),close:c===void 0?void 0:Af(c,n,`${i} has member 'close' that`),start:m===void 0?void 0:$f(m,n,`${i} has member 'start' that`),write:E===void 0?void 0:Cf(E,n,`${i} has member 'write' that`),type:w}}function Tf(n,i,l){return Ce(n,l),c=>D(n,i,[c])}function Af(n,i,l){return Ce(n,l),()=>D(n,i,[])}function $f(n,i,l){return Ce(n,l),c=>q(n,i,[c])}function Cf(n,i,l){return Ce(n,l),(c,m)=>D(n,i,[c,m])}function wo(n,i){if(!Lt(n))throw new TypeError(`${i} is not a WritableStream.`)}function Pf(n){if(typeof n!="object"||n===null)return!1;try{return typeof n.aborted=="boolean"}catch{return!1}}let Of=typeof AbortController=="function";function If(){if(Of)return new AbortController}class pr{constructor(i={},l={}){i===void 0?i=null:Gi(i,"First parameter");let c=an(l,"Second parameter"),m=vf(i,"First parameter");if(Eo(this),m.type!==void 0)throw new RangeError("Invalid type is specified");let E=on(c),A=dr(c,1);Hf(this,m,A,E)}get locked(){if(!Lt(this))throw hn("locked");return qt(this)}abort(i=void 0){return Lt(this)?qt(this)?p(new TypeError("Cannot abort a stream that already has a writer")):ln(this,i):p(hn("abort"))}close(){return Lt(this)?qt(this)?p(new TypeError("Cannot close a stream that already has a writer")):De(this)?p(new TypeError("Cannot close an already-closing stream")):Ro(this):p(hn("close"))}getWriter(){if(!Lt(this))throw hn("getWriter");return _o(this)}}Object.defineProperties(pr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(pr.prototype,e.toStringTag,{value:"WritableStream",configurable:!0});function _o(n){return new mr(n)}function xf(n,i,l,c,m=1,w=()=>1){let E=Object.create(pr.prototype);Eo(E);let A=Object.create(Dt.prototype);return Po(E,A,n,i,l,c,m,w),E}function Eo(n){n._state="writable",n._storedError=void 0,n._writer=void 0,n._writableStreamController=void 0,n._writeRequests=new U,n._inFlightWriteRequest=void 0,n._closeRequest=void 0,n._inFlightCloseRequest=void 0,n._pendingAbortRequest=void 0,n._backpressure=!1}function Lt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_writableStreamController")?!1:n instanceof pr}function qt(n){return n._writer!==void 0}function ln(n,i){var l;if(n._state==="closed"||n._state==="errored")return b(void 0);n._writableStreamController._abortReason=i,(l=n._writableStreamController._abortController)===null||l===void 0||l.abort();let c=n._state;if(c==="closed"||c==="errored")return b(void 0);if(n._pendingAbortRequest!==void 0)return n._pendingAbortRequest._promise;let m=!1;c==="erroring"&&(m=!0,i=void 0);let w=y((E,A)=>{n._pendingAbortRequest={_promise:void 0,_resolve:E,_reject:A,_reason:i,_wasAlreadyErroring:m}});return n._pendingAbortRequest._promise=w,m||vs(n,i),w}function Ro(n){let i=n._state;if(i==="closed"||i==="errored")return p(new TypeError(`The stream (in ${i} state) is not in the writable state and cannot be closed`));let l=y((m,w)=>{let E={_resolve:m,_reject:w};n._closeRequest=E}),c=n._writer;return c!==void 0&&n._backpressure&&i==="writable"&&Ls(c),Gf(n._writableStreamController),l}function Lf(n){return y((l,c)=>{let m={_resolve:l,_reject:c};n._writeRequests.push(m)})}function Rs(n,i){if(n._state==="writable"){vs(n,i);return}Ts(n)}function vs(n,i){let l=n._writableStreamController;n._state="erroring",n._storedError=i;let c=n._writer;c!==void 0&&To(c,i),!zf(n)&&l._started&&Ts(n)}function Ts(n){n._state="errored",n._writableStreamController[Mi]();let i=n._storedError;if(n._writeRequests.forEach(m=>{m._reject(i)}),n._writeRequests=new U,n._pendingAbortRequest===void 0){un(n);return}let l=n._pendingAbortRequest;if(n._pendingAbortRequest=void 0,l._wasAlreadyErroring){l._reject(i),un(n);return}let c=n._writableStreamController[Ui](l._reason);v(c,()=>{l._resolve(),un(n)},m=>{l._reject(m),un(n)})}function qf(n){n._inFlightWriteRequest._resolve(void 0),n._inFlightWriteRequest=void 0}function Df(n,i){n._inFlightWriteRequest._reject(i),n._inFlightWriteRequest=void 0,Rs(n,i)}function Bf(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&&Lo(l)}function Nf(n,i){n._inFlightCloseRequest._reject(i),n._inFlightCloseRequest=void 0,n._pendingAbortRequest!==void 0&&(n._pendingAbortRequest._reject(i),n._pendingAbortRequest=void 0),Rs(n,i)}function De(n){return!(n._closeRequest===void 0&&n._inFlightCloseRequest===void 0)}function zf(n){return!(n._inFlightWriteRequest===void 0&&n._inFlightCloseRequest===void 0)}function Ff(n){n._inFlightCloseRequest=n._closeRequest,n._closeRequest=void 0}function Wf(n){n._inFlightWriteRequest=n._writeRequests.shift()}function un(n){n._closeRequest!==void 0&&(n._closeRequest._reject(n._storedError),n._closeRequest=void 0);let i=n._writer;i!==void 0&&Is(i,n._storedError)}function As(n,i){let l=n._writer;l!==void 0&&i!==n._backpressure&&(i?Kf(l):Ls(l)),n._backpressure=i}class mr{constructor(i){if(Ue(i,1,"WritableStreamDefaultWriter"),wo(i,"First parameter"),qt(i))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=i,i._writer=this;let l=i._state;if(l==="writable")!De(i)&&i._backpressure?pn(this):qo(this),dn(this);else if(l==="erroring")xs(this,i._storedError),dn(this);else if(l==="closed")qo(this),Zf(this);else{let c=i._storedError;xs(this,c),xo(this,c)}}get closed(){return pt(this)?this._closedPromise:p(mt("closed"))}get desiredSize(){if(!pt(this))throw mt("desiredSize");if(this._ownerWritableStream===void 0)throw gr("desiredSize");return Mf(this)}get ready(){return pt(this)?this._readyPromise:p(mt("ready"))}abort(i=void 0){return pt(this)?this._ownerWritableStream===void 0?p(gr("abort")):kf(this,i):p(mt("abort"))}close(){if(!pt(this))return p(mt("close"));let i=this._ownerWritableStream;return i===void 0?p(gr("close")):De(i)?p(new TypeError("Cannot close an already-closing stream")):vo(this)}releaseLock(){if(!pt(this))throw mt("releaseLock");this._ownerWritableStream!==void 0&&Ao(this)}write(i=void 0){return pt(this)?this._ownerWritableStream===void 0?p(gr("write to")):$o(this,i):p(mt("write"))}}Object.defineProperties(mr.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(mr.prototype,e.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function pt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_ownerWritableStream")?!1:n instanceof mr}function kf(n,i){let l=n._ownerWritableStream;return ln(l,i)}function vo(n){let i=n._ownerWritableStream;return Ro(i)}function jf(n){let i=n._ownerWritableStream,l=i._state;return De(i)||l==="closed"?b(void 0):l==="errored"?p(i._storedError):vo(n)}function Uf(n,i){n._closedPromiseState==="pending"?Is(n,i):Jf(n,i)}function To(n,i){n._readyPromiseState==="pending"?Do(n,i):eh(n,i)}function Mf(n){let i=n._ownerWritableStream,l=i._state;return l==="errored"||l==="erroring"?null:l==="closed"?0:Oo(i._writableStreamController)}function Ao(n){let i=n._ownerWritableStream,l=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");To(n,l),Uf(n,l),i._writer=void 0,n._ownerWritableStream=void 0}function $o(n,i){let l=n._ownerWritableStream,c=l._writableStreamController,m=Vf(c,i);if(l!==n._ownerWritableStream)return p(gr("write to"));let w=l._state;if(w==="errored")return p(l._storedError);if(De(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=Lf(l);return Yf(c,i,m),E}let Co={};class Dt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!$s(this))throw Os("abortReason");return this._abortReason}get signal(){if(!$s(this))throw Os("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(i=void 0){if(!$s(this))throw Os("error");this._controlledWritableStream._state==="writable"&&Io(this,i)}[Ui](i){let l=this._abortAlgorithm(i);return cn(this),l}[Mi](){Ze(this)}}Object.defineProperties(Dt.prototype,{error:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Dt.prototype,e.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function $s(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledWritableStream")?!1:n instanceof Dt}function Po(n,i,l,c,m,w,E,A){i._controlledWritableStream=n,n._writableStreamController=i,i._queue=void 0,i._queueTotalSize=void 0,Ze(i),i._abortReason=void 0,i._abortController=If(),i._started=!1,i._strategySizeAlgorithm=A,i._strategyHWM=E,i._writeAlgorithm=c,i._closeAlgorithm=m,i._abortAlgorithm=w;let I=Ps(i);As(n,I);let W=l(),Y=b(W);v(Y,()=>{i._started=!0,fn(i)},G=>{i._started=!0,Rs(n,G)})}function Hf(n,i,l,c){let m=Object.create(Dt.prototype),w=()=>{},E=()=>b(void 0),A=()=>b(void 0),I=()=>b(void 0);i.start!==void 0&&(w=()=>i.start(m)),i.write!==void 0&&(E=W=>i.write(W,m)),i.close!==void 0&&(A=()=>i.close()),i.abort!==void 0&&(I=W=>i.abort(W)),Po(n,m,w,E,A,I,l,c)}function cn(n){n._writeAlgorithm=void 0,n._closeAlgorithm=void 0,n._abortAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function Gf(n){ms(n,Co,0),fn(n)}function Vf(n,i){try{return n._strategySizeAlgorithm(i)}catch(l){return Cs(n,l),1}}function Oo(n){return n._strategyHWM-n._queueTotalSize}function Yf(n,i,l){try{ms(n,i,l)}catch(m){Cs(n,m);return}let c=n._controlledWritableStream;if(!De(c)&&c._state==="writable"){let m=Ps(n);As(c,m)}fn(n)}function fn(n){let i=n._controlledWritableStream;if(!n._started||i._inFlightWriteRequest!==void 0)return;if(i._state==="erroring"){Ts(i);return}if(n._queue.length===0)return;let c=mf(n);c===Co?Xf(n):Qf(n,c)}function Cs(n,i){n._controlledWritableStream._state==="writable"&&Io(n,i)}function Xf(n){let i=n._controlledWritableStream;Ff(i),ps(n);let l=n._closeAlgorithm();cn(n),v(l,()=>{Bf(i)},c=>{Nf(i,c)})}function Qf(n,i){let l=n._controlledWritableStream;Wf(l);let c=n._writeAlgorithm(i);v(c,()=>{qf(l);let m=l._state;if(ps(n),!De(l)&&m==="writable"){let w=Ps(n);As(l,w)}fn(n)},m=>{l._state==="writable"&&cn(n),Df(l,m)})}function Ps(n){return Oo(n)<=0}function Io(n,i){let l=n._controlledWritableStream;cn(n),vs(l,i)}function hn(n){return new TypeError(`WritableStream.prototype.${n} can only be used on a WritableStream`)}function Os(n){return new TypeError(`WritableStreamDefaultController.prototype.${n} can only be used on a WritableStreamDefaultController`)}function mt(n){return new TypeError(`WritableStreamDefaultWriter.prototype.${n} can only be used on a WritableStreamDefaultWriter`)}function gr(n){return new TypeError("Cannot "+n+" a stream using a released writer")}function dn(n){n._closedPromise=y((i,l)=>{n._closedPromise_resolve=i,n._closedPromise_reject=l,n._closedPromiseState="pending"})}function xo(n,i){dn(n),Is(n,i)}function Zf(n){dn(n),Lo(n)}function Is(n,i){n._closedPromise_reject!==void 0&&(B(n._closedPromise),n._closedPromise_reject(i),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0,n._closedPromiseState="rejected")}function Jf(n,i){xo(n,i)}function Lo(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 pn(n){n._readyPromise=y((i,l)=>{n._readyPromise_resolve=i,n._readyPromise_reject=l}),n._readyPromiseState="pending"}function xs(n,i){pn(n),Do(n,i)}function qo(n){pn(n),Ls(n)}function Do(n,i){n._readyPromise_reject!==void 0&&(B(n._readyPromise),n._readyPromise_reject(i),n._readyPromise_resolve=void 0,n._readyPromise_reject=void 0,n._readyPromiseState="rejected")}function Kf(n){pn(n)}function eh(n,i){xs(n,i)}function Ls(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 Bo=typeof DOMException<"u"?DOMException:void 0;function th(n){if(!(typeof n=="function"||typeof n=="object"))return!1;try{return new n,!0}catch{return!1}}function rh(){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 nh=th(Bo)?Bo:rh();function No(n,i,l,c,m,w){let E=It(n),A=_o(i);n._disturbed=!0;let I=!1,W=b(void 0);return y((Y,G)=>{let Z;if(w!==void 0){if(Z=()=>{let L=new nh("Aborted","AbortError"),M=[];c||M.push(()=>i._state==="writable"?ln(i,L):b(void 0)),m||M.push(()=>n._state==="readable"?Oe(n,L):b(void 0)),ge(()=>Promise.all(M.map(te=>te())),!0,L)},w.aborted){Z();return}w.addEventListener("abort",Z)}function rt(){return y((L,M)=>{function te(Ie){Ie?L():S(_r(),te,M)}te(!1)})}function _r(){return I?b(!0):S(A._readyPromise,()=>y((L,M)=>{ar(E,{_chunkSteps:te=>{W=S($o(A,te),void 0,t),L(!1)},_closeSteps:()=>L(!0),_errorSteps:M})}))}if(me(n,E._closedPromise,L=>{c?V(!0,L):ge(()=>ln(i,L),!0,L)}),me(i,A._closedPromise,L=>{m?V(!0,L):ge(()=>Oe(n,L),!0,L)}),Be(n,E._closedPromise,()=>{l?V():ge(()=>jf(A))}),De(i)||i._state==="closed"){let L=new TypeError("the destination writable stream closed before all data could be piped to it");m?V(!0,L):ge(()=>Oe(n,L),!0,L)}B(rt());function nt(){let L=W;return S(W,()=>L!==W?nt():void 0)}function me(L,M,te){L._state==="errored"?te(L._storedError):R(M,te)}function Be(L,M,te){L._state==="closed"?te():_(M,te)}function ge(L,M,te){if(I)return;I=!0,i._state==="writable"&&!De(i)?_(nt(),Ie):Ie();function Ie(){v(L(),()=>Q(M,te),st=>Q(!0,st))}}function V(L,M){I||(I=!0,i._state==="writable"&&!De(i)?_(nt(),()=>Q(L,M)):Q(L,M))}function Q(L,M){Ao(A),Ee(E),w!==void 0&&w.removeEventListener("abort",Z),L?G(M):Y(void 0)}})}class Bt{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!mn(this))throw yn("desiredSize");return qs(this)}close(){if(!mn(this))throw yn("close");if(!Nt(this))throw new TypeError("The stream is not in a state that permits close");yr(this)}enqueue(i=void 0){if(!mn(this))throw yn("enqueue");if(!Nt(this))throw new TypeError("The stream is not in a state that permits enqueue");return bn(this,i)}error(i=void 0){if(!mn(this))throw yn("error");Je(this,i)}[ls](i){Ze(this);let l=this._cancelAlgorithm(i);return gn(this),l}[us](i){let l=this._controlledReadableStream;if(this._queue.length>0){let c=ps(this);this._closeRequested&&this._queue.length===0?(gn(this),Sr(l)):br(this),i._chunkSteps(c)}else Xi(l,i),br(this)}}Object.defineProperties(Bt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Bt.prototype,e.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function mn(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledReadableStream")?!1:n instanceof Bt}function br(n){if(!zo(n))return;if(n._pulling){n._pullAgain=!0;return}n._pulling=!0;let l=n._pullAlgorithm();v(l,()=>{n._pulling=!1,n._pullAgain&&(n._pullAgain=!1,br(n))},c=>{Je(n,c)})}function zo(n){let i=n._controlledReadableStream;return!Nt(n)||!n._started?!1:!!(tt(i)&&Qr(i)>0||qs(n)>0)}function gn(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function yr(n){if(!Nt(n))return;let i=n._controlledReadableStream;n._closeRequested=!0,n._queue.length===0&&(gn(n),Sr(i))}function bn(n,i){if(!Nt(n))return;let l=n._controlledReadableStream;if(tt(l)&&Qr(l)>0)ds(l,i,!1);else{let c;try{c=n._strategySizeAlgorithm(i)}catch(m){throw Je(n,m),m}try{ms(n,i,c)}catch(m){throw Je(n,m),m}}br(n)}function Je(n,i){let l=n._controlledReadableStream;l._state==="readable"&&(Ze(n),gn(n),jo(l,i))}function qs(n){let i=n._controlledReadableStream._state;return i==="errored"?null:i==="closed"?0:n._strategyHWM-n._queueTotalSize}function sh(n){return!zo(n)}function Nt(n){let i=n._controlledReadableStream._state;return!n._closeRequested&&i==="readable"}function Fo(n,i,l,c,m,w,E){i._controlledReadableStream=n,i._queue=void 0,i._queueTotalSize=void 0,Ze(i),i._started=!1,i._closeRequested=!1,i._pullAgain=!1,i._pulling=!1,i._strategySizeAlgorithm=E,i._strategyHWM=w,i._pullAlgorithm=c,i._cancelAlgorithm=m,n._readableStreamController=i;let A=l();v(b(A),()=>{i._started=!0,br(i)},I=>{Je(i,I)})}function ih(n,i,l,c){let m=Object.create(Bt.prototype),w=()=>{},E=()=>b(void 0),A=()=>b(void 0);i.start!==void 0&&(w=()=>i.start(m)),i.pull!==void 0&&(E=()=>i.pull(m)),i.cancel!==void 0&&(A=I=>i.cancel(I)),Fo(n,m,w,E,A,l,c)}function yn(n){return new TypeError(`ReadableStreamDefaultController.prototype.${n} can only be used on a ReadableStreamDefaultController`)}function oh(n,i){return ft(n._readableStreamController)?lh(n):ah(n)}function ah(n,i){let l=It(n),c=!1,m=!1,w=!1,E,A,I,W,Y,G=y(me=>{Y=me});function Z(){return c||(c=!0,ar(l,{_chunkSteps:Be=>{T(()=>{c=!1;let ge=Be,V=Be;m||bn(I._readableStreamController,ge),w||bn(W._readableStreamController,V)})},_closeSteps:()=>{c=!1,m||yr(I._readableStreamController),w||yr(W._readableStreamController),(!m||!w)&&Y(void 0)},_errorSteps:()=>{c=!1}})),b(void 0)}function rt(me){if(m=!0,E=me,w){let Be=lr([E,A]),ge=Oe(n,Be);Y(ge)}return G}function _r(me){if(w=!0,A=me,m){let Be=lr([E,A]),ge=Oe(n,Be);Y(ge)}return G}function nt(){}return I=Ds(nt,Z,rt),W=Ds(nt,Z,_r),R(l._closedPromise,me=>{Je(I._readableStreamController,me),Je(W._readableStreamController,me),(!m||!w)&&Y(void 0)}),[I,W]}function lh(n){let i=It(n),l=!1,c=!1,m=!1,w,E,A,I,W,Y=y(V=>{W=V});function G(V){R(V._closedPromise,Q=>{V===i&&(Pe(A._readableStreamController,Q),Pe(I._readableStreamController,Q),(!c||!m)&&W(void 0))})}function Z(){dt(i)&&(Ee(i),i=It(n),G(i)),ar(i,{_chunkSteps:Q=>{T(()=>{l=!1;let L=Q,M=Q;if(!c&&!m)try{M=io(Q)}catch(te){Pe(A._readableStreamController,te),Pe(I._readableStreamController,te),W(Oe(n,te));return}c||tn(A._readableStreamController,L),m||tn(I._readableStreamController,M)})},_closeSteps:()=>{l=!1,c||cr(A._readableStreamController),m||cr(I._readableStreamController),A._readableStreamController._pendingPullIntos.length>0&&rn(A._readableStreamController,0),I._readableStreamController._pendingPullIntos.length>0&&rn(I._readableStreamController,0),(!c||!m)&&W(void 0)},_errorSteps:()=>{l=!1}})}function rt(V,Q){Qe(i)&&(Ee(i),i=go(n),G(i));let L=Q?I:A,M=Q?A:I;So(i,V,{_chunkSteps:Ie=>{T(()=>{l=!1;let st=Q?m:c;if(Q?c:m)st||nn(L._readableStreamController,Ie);else{let ta;try{ta=io(Ie)}catch(Ns){Pe(L._readableStreamController,Ns),Pe(M._readableStreamController,Ns),W(Oe(n,Ns));return}st||nn(L._readableStreamController,Ie),tn(M._readableStreamController,ta)}})},_closeSteps:Ie=>{l=!1;let st=Q?m:c,$n=Q?c:m;st||cr(L._readableStreamController),$n||cr(M._readableStreamController),Ie!==void 0&&(st||nn(L._readableStreamController,Ie),!$n&&M._readableStreamController._pendingPullIntos.length>0&&rn(M._readableStreamController,0)),(!st||!$n)&&W(void 0)},_errorSteps:()=>{l=!1}})}function _r(){if(l)return b(void 0);l=!0;let V=ws(A._readableStreamController);return V===null?Z():rt(V._view,!1),b(void 0)}function nt(){if(l)return b(void 0);l=!0;let V=ws(I._readableStreamController);return V===null?Z():rt(V._view,!0),b(void 0)}function me(V){if(c=!0,w=V,m){let Q=lr([w,E]),L=Oe(n,Q);W(L)}return Y}function Be(V){if(m=!0,E=V,c){let Q=lr([w,E]),L=Oe(n,Q);W(L)}return Y}function ge(){}return A=ko(ge,_r,me),I=ko(ge,nt,Be),G(i),[A,I]}function uh(n,i){je(n,i);let l=n,c=l==null?void 0:l.autoAllocateChunkSize,m=l==null?void 0:l.cancel,w=l==null?void 0:l.pull,E=l==null?void 0:l.start,A=l==null?void 0:l.type;return{autoAllocateChunkSize:c===void 0?void 0:Yi(c,`${i} has member 'autoAllocateChunkSize' that`),cancel:m===void 0?void 0:ch(m,l,`${i} has member 'cancel' that`),pull:w===void 0?void 0:fh(w,l,`${i} has member 'pull' that`),start:E===void 0?void 0:hh(E,l,`${i} has member 'start' that`),type:A===void 0?void 0:dh(A,`${i} has member 'type' that`)}}function ch(n,i,l){return Ce(n,l),c=>D(n,i,[c])}function fh(n,i,l){return Ce(n,l),c=>D(n,i,[c])}function hh(n,i,l){return Ce(n,l),c=>q(n,i,[c])}function dh(n,i){if(n=`${n}`,n!=="bytes")throw new TypeError(`${i} '${n}' is not a valid enumeration value for ReadableStreamType`);return n}function ph(n,i){je(n,i);let l=n==null?void 0:n.mode;return{mode:l===void 0?void 0:mh(l,`${i} has member 'mode' that`)}}function mh(n,i){if(n=`${n}`,n!=="byob")throw new TypeError(`${i} '${n}' is not a valid enumeration value for ReadableStreamReaderMode`);return n}function gh(n,i){return je(n,i),{preventCancel:!!(n==null?void 0:n.preventCancel)}}function Wo(n,i){je(n,i);let l=n==null?void 0:n.preventAbort,c=n==null?void 0:n.preventCancel,m=n==null?void 0:n.preventClose,w=n==null?void 0:n.signal;return w!==void 0&&bh(w,`${i} has member 'signal' that`),{preventAbort:!!l,preventCancel:!!c,preventClose:!!m,signal:w}}function bh(n,i){if(!Pf(n))throw new TypeError(`${i} is not an AbortSignal.`)}function yh(n,i){je(n,i);let l=n==null?void 0:n.readable;cs(l,"readable","ReadableWritablePair"),hs(l,`${i} has member 'readable' that`);let c=n==null?void 0:n.writable;return cs(c,"writable","ReadableWritablePair"),wo(c,`${i} has member 'writable' that`),{readable:l,writable:c}}class Ke{constructor(i={},l={}){i===void 0?i=null:Gi(i,"First parameter");let c=an(l,"Second parameter"),m=uh(i,"First parameter");if(Bs(this),m.type==="bytes"){if(c.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let w=dr(c,0);wf(this,m,w)}else{let w=on(c),E=dr(c,1);ih(this,m,E,w)}}get locked(){if(!et(this))throw gt("locked");return tt(this)}cancel(i=void 0){return et(this)?tt(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Oe(this,i):p(gt("cancel"))}getReader(i=void 0){if(!et(this))throw gt("getReader");return ph(i,"First parameter").mode===void 0?It(this):go(this)}pipeThrough(i,l={}){if(!et(this))throw gt("pipeThrough");Ue(i,1,"pipeThrough");let c=yh(i,"First parameter"),m=Wo(l,"Second parameter");if(tt(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(qt(c.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let w=No(this,c.writable,m.preventClose,m.preventAbort,m.preventCancel,m.signal);return B(w),c.readable}pipeTo(i,l={}){if(!et(this))return p(gt("pipeTo"));if(i===void 0)return p("Parameter 1 is required in 'pipeTo'.");if(!Lt(i))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let c;try{c=Wo(l,"Second parameter")}catch(m){return p(m)}return tt(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):qt(i)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):No(this,i,c.preventClose,c.preventAbort,c.preventCancel,c.signal)}tee(){if(!et(this))throw gt("tee");let i=oh(this);return lr(i)}values(i=void 0){if(!et(this))throw gt("values");let l=gh(i,"First parameter");return df(this,l.preventCancel)}}Object.defineProperties(Ke.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(Ke.prototype,e.toStringTag,{value:"ReadableStream",configurable:!0}),typeof e.asyncIterator=="symbol"&&Object.defineProperty(Ke.prototype,e.asyncIterator,{value:Ke.prototype.values,writable:!0,configurable:!0});function Ds(n,i,l,c=1,m=()=>1){let w=Object.create(Ke.prototype);Bs(w);let E=Object.create(Bt.prototype);return Fo(w,E,n,i,l,c,m),w}function ko(n,i,l){let c=Object.create(Ke.prototype);Bs(c);let m=Object.create(xt.prototype);return mo(c,m,n,i,l,0,void 0),c}function Bs(n){n._state="readable",n._reader=void 0,n._storedError=void 0,n._disturbed=!1}function et(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readableStreamController")?!1:n instanceof Ke}function tt(n){return n._reader!==void 0}function Oe(n,i){if(n._disturbed=!0,n._state==="closed")return b(void 0);if(n._state==="errored")return p(n._storedError);Sr(n);let l=n._reader;l!==void 0&&dt(l)&&(l._readIntoRequests.forEach(m=>{m._closeSteps(void 0)}),l._readIntoRequests=new U);let c=n._readableStreamController[ls](i);return O(c,t)}function Sr(n){n._state="closed";let i=n._reader;i!==void 0&&(ji(i),Qe(i)&&(i._readRequests.forEach(l=>{l._closeSteps()}),i._readRequests=new U))}function jo(n,i){n._state="errored",n._storedError=i;let l=n._reader;l!==void 0&&(as(l,i),Qe(l)?(l._readRequests.forEach(c=>{c._errorSteps(i)}),l._readRequests=new U):(l._readIntoRequests.forEach(c=>{c._errorSteps(i)}),l._readIntoRequests=new U))}function gt(n){return new TypeError(`ReadableStream.prototype.${n} can only be used on a ReadableStream`)}function Uo(n,i){je(n,i);let l=n==null?void 0:n.highWaterMark;return cs(l,"highWaterMark","QueuingStrategyInit"),{highWaterMark:fs(l)}}let Mo=n=>n.byteLength;Object.defineProperty(Mo,"name",{value:"size",configurable:!0});class Sn{constructor(i){Ue(i,1,"ByteLengthQueuingStrategy"),i=Uo(i,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=i.highWaterMark}get highWaterMark(){if(!Go(this))throw Ho("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Go(this))throw Ho("size");return Mo}}Object.defineProperties(Sn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Sn.prototype,e.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Ho(n){return new TypeError(`ByteLengthQueuingStrategy.prototype.${n} can only be used on a ByteLengthQueuingStrategy`)}function Go(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_byteLengthQueuingStrategyHighWaterMark")?!1:n instanceof Sn}let Vo=()=>1;Object.defineProperty(Vo,"name",{value:"size",configurable:!0});class wn{constructor(i){Ue(i,1,"CountQueuingStrategy"),i=Uo(i,"First parameter"),this._countQueuingStrategyHighWaterMark=i.highWaterMark}get highWaterMark(){if(!Xo(this))throw Yo("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Xo(this))throw Yo("size");return Vo}}Object.defineProperties(wn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(wn.prototype,e.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Yo(n){return new TypeError(`CountQueuingStrategy.prototype.${n} can only be used on a CountQueuingStrategy`)}function Xo(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_countQueuingStrategyHighWaterMark")?!1:n instanceof wn}function Sh(n,i){je(n,i);let l=n==null?void 0:n.flush,c=n==null?void 0:n.readableType,m=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:wh(l,n,`${i} has member 'flush' that`),readableType:c,start:m===void 0?void 0:_h(m,n,`${i} has member 'start' that`),transform:w===void 0?void 0:Eh(w,n,`${i} has member 'transform' that`),writableType:E}}function wh(n,i,l){return Ce(n,l),c=>D(n,i,[c])}function _h(n,i,l){return Ce(n,l),c=>q(n,i,[c])}function Eh(n,i,l){return Ce(n,l),(c,m)=>D(n,i,[c,m])}class _n{constructor(i={},l={},c={}){i===void 0&&(i=null);let m=an(l,"Second parameter"),w=an(c,"Third parameter"),E=Sh(i,"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 A=dr(w,0),I=on(w),W=dr(m,1),Y=on(m),G,Z=y(rt=>{G=rt});Rh(this,Z,W,Y,A,I),Th(this,E),E.start!==void 0?G(E.start(this._transformStreamController)):G(void 0)}get readable(){if(!Qo(this))throw ea("readable");return this._readable}get writable(){if(!Qo(this))throw ea("writable");return this._writable}}Object.defineProperties(_n.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(_n.prototype,e.toStringTag,{value:"TransformStream",configurable:!0});function Rh(n,i,l,c,m,w){function E(){return i}function A(Z){return Ch(n,Z)}function I(Z){return Ph(n,Z)}function W(){return Oh(n)}n._writable=xf(E,A,W,I,l,c);function Y(){return Ih(n)}function G(Z){return Rn(n,Z),b(void 0)}n._readable=Ds(E,Y,G,m,w),n._backpressure=void 0,n._backpressureChangePromise=void 0,n._backpressureChangePromise_resolve=void 0,vn(n,!0),n._transformStreamController=void 0}function Qo(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_transformStreamController")?!1:n instanceof _n}function En(n,i){Je(n._readable._readableStreamController,i),Rn(n,i)}function Rn(n,i){Zo(n._transformStreamController),Cs(n._writable._writableStreamController,i),n._backpressure&&vn(n,!1)}function vn(n,i){n._backpressureChangePromise!==void 0&&n._backpressureChangePromise_resolve(),n._backpressureChangePromise=y(l=>{n._backpressureChangePromise_resolve=l}),n._backpressure=i}class wr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Tn(this))throw An("desiredSize");let i=this._controlledTransformStream._readable._readableStreamController;return qs(i)}enqueue(i=void 0){if(!Tn(this))throw An("enqueue");Jo(this,i)}error(i=void 0){if(!Tn(this))throw An("error");Ah(this,i)}terminate(){if(!Tn(this))throw An("terminate");$h(this)}}Object.defineProperties(wr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(wr.prototype,e.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Tn(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledTransformStream")?!1:n instanceof wr}function vh(n,i,l,c){i._controlledTransformStream=n,n._transformStreamController=i,i._transformAlgorithm=l,i._flushAlgorithm=c}function Th(n,i){let l=Object.create(wr.prototype),c=w=>{try{return Jo(l,w),b(void 0)}catch(E){return p(E)}},m=()=>b(void 0);i.transform!==void 0&&(c=w=>i.transform(w,l)),i.flush!==void 0&&(m=()=>i.flush(l)),vh(n,l,c,m)}function Zo(n){n._transformAlgorithm=void 0,n._flushAlgorithm=void 0}function Jo(n,i){let l=n._controlledTransformStream,c=l._readable._readableStreamController;if(!Nt(c))throw new TypeError("Readable side is not in a state that permits enqueue");try{bn(c,i)}catch(w){throw Rn(l,w),l._readable._storedError}sh(c)!==l._backpressure&&vn(l,!0)}function Ah(n,i){En(n._controlledTransformStream,i)}function Ko(n,i){let l=n._transformAlgorithm(i);return O(l,void 0,c=>{throw En(n._controlledTransformStream,c),c})}function $h(n){let i=n._controlledTransformStream,l=i._readable._readableStreamController;yr(l);let c=new TypeError("TransformStream terminated");Rn(i,c)}function Ch(n,i){let l=n._transformStreamController;if(n._backpressure){let c=n._backpressureChangePromise;return O(c,()=>{let m=n._writable;if(m._state==="erroring")throw m._storedError;return Ko(l,i)})}return Ko(l,i)}function Ph(n,i){return En(n,i),b(void 0)}function Oh(n){let i=n._readable,l=n._transformStreamController,c=l._flushAlgorithm();return Zo(l),O(c,()=>{if(i._state==="errored")throw i._storedError;yr(i._readableStreamController)},m=>{throw En(n,m),i._storedError})}function Ih(n){return vn(n,!1),n._backpressureChangePromise}function An(n){return new TypeError(`TransformStreamDefaultController.prototype.${n} can only be used on a TransformStreamDefaultController`)}function ea(n){return new TypeError(`TransformStream.prototype.${n} can only be used on a TransformStream`)}r.ByteLengthQueuingStrategy=Sn,r.CountQueuingStrategy=wn,r.ReadableByteStreamController=xt,r.ReadableStream=Ke,r.ReadableStreamBYOBReader=hr,r.ReadableStreamBYOBRequest=ur,r.ReadableStreamDefaultController=Bt,r.ReadableStreamDefaultReader=or,r.TransformStream=_n,r.TransformStreamDefaultController=wr,r.WritableStream=pr,r.WritableStreamDefaultController=Dt,r.WritableStreamDefaultWriter=mr,Object.defineProperty(r,"__esModule",{value:!0})})});var ba=$(()=>{if(!globalThis.ReadableStream)try{let r=we("process"),{emitWarning:e}=r;try{r.emitWarning=()=>{},Object.assign(globalThis,we("stream/web")),r.emitWarning=e}catch(t){throw r.emitWarning=e,t}}catch{Object.assign(globalThis,ga())}try{let{Blob:r}=we("buffer");r&&!r.prototype.stream&&(r.prototype.stream=function(t){let s=0,o=this;return new ReadableStream({type:"bytes",async pull(a){let d=await o.slice(s,Math.min(o.size,s+65536)).arrayBuffer();s+=d.byteLength,a.enqueue(new Uint8Array(d)),s===o.size&&a.close()}})})}catch{}});async function*Ys(r,e=!0){for(let t of r)if("stream"in t)yield*t.stream();else if(ArrayBuffer.isView(t))if(e){let s=t.byteOffset,o=t.byteOffset+t.byteLength;for(;s!==o;){let a=Math.min(o-s,ya),u=t.buffer.slice(s,s+a);s+=u.byteLength,yield new Uint8Array(u)}}else yield t;else{let s=0,o=t;for(;s!==o.size;){let u=await o.slice(s,Math.min(o.size,s+ya)).arrayBuffer();s+=u.byteLength,yield new Uint8Array(u)}}}var Mb,ya,Me,Tr,Ft,Pn,Wt,Sa,Xh,He,Ar=Er(()=>{Mb=xe(ba(),1);ya=65536;Sa=(Wt=class{constructor(e=[],t={}){oe(this,Me,[]);oe(this,Tr,"");oe(this,Ft,0);oe(this,Pn,"transparent");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 s=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 Wt?u=a:u=s.encode(`${a}`),fe(this,Ft,F(this,Ft)+(ArrayBuffer.isView(u)?u.byteLength:u.size)),F(this,Me).push(u)}fe(this,Pn,`${t.endings===void 0?"transparent":t.endings}`);let o=t.type===void 0?"":String(t.type);fe(this,Tr,/^[\x20-\x7E]*$/.test(o)?o:"")}get size(){return F(this,Ft)}get type(){return F(this,Tr)}async text(){let e=new TextDecoder,t="";for await(let s of Ys(F(this,Me),!1))t+=e.decode(s,{stream:!0});return t+=e.decode(),t}async arrayBuffer(){let e=new Uint8Array(this.size),t=0;for await(let s of Ys(F(this,Me),!1))e.set(s,t),t+=s.length;return e.buffer}stream(){let e=Ys(F(this,Me),!0);return new globalThis.ReadableStream({type:"bytes",async pull(t){let s=await e.next();s.done?t.close():t.enqueue(s.value)},async cancel(){await e.return()}})}slice(e=0,t=this.size,s=""){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),d=Math.max(u-a,0),f=F(this,Me),h=[],g=0;for(let b of f){if(g>=d)break;let p=ArrayBuffer.isView(b)?b.byteLength:b.size;if(a&&p<=a)a-=p,u-=p;else{let S;ArrayBuffer.isView(b)?(S=b.subarray(a,Math.min(p,u)),g+=S.byteLength):(S=b.slice(a,Math.min(p,u)),g+=S.size),u-=p,h.push(S),a=0}}let y=new Wt([],{type:String(s).toLowerCase()});return fe(y,Ft,d),fe(y,Me,h),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])}},Me=new WeakMap,Tr=new WeakMap,Ft=new WeakMap,Pn=new WeakMap,Wt);Object.defineProperties(Sa.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});Xh=Sa,He=Xh});var $r,Cr,wa,Qh,Zh,kt,Xs=Er(()=>{Ar();Qh=(wa=class extends He{constructor(t,s,o={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(t,o);oe(this,$r,0);oe(this,Cr,"");o===null&&(o={});let a=o.lastModified===void 0?Date.now():Number(o.lastModified);Number.isNaN(a)||fe(this,$r,a),fe(this,Cr,String(s))}get name(){return F(this,Cr)}get lastModified(){return F(this,$r)}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](t){return!!t&&t instanceof He&&/^(File)$/.test(t[Symbol.toStringTag])}},$r=new WeakMap,Cr=new WeakMap,wa),Zh=Qh,kt=Zh});function va(r,e=He){var t=`${_a()}${_a()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),s=[],o=`--${t}\r
4
- Content-Disposition: form-data; name="`;return r.forEach((a,u)=>typeof a=="string"?s.push(o+Qs(u)+`"\r
3
+ var Nh=Object.create;var Ui=Object.defineProperty;var zh=Object.getOwnPropertyDescriptor;var Wh=Object.getOwnPropertyNames;var kh=Object.getPrototypeOf,jh=Object.prototype.hasOwnProperty;var _e=(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 vr=(r,e)=>()=>(r&&(e=r(r=0)),e);var T=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Uh=(r,e)=>{for(var t in e)Ui(r,t,{get:e[t],enumerable:!0})},Mh=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Wh(e))!jh.call(r,o)&&o!==t&&Ui(r,o,{get:()=>e[o],enumerable:!(i=zh(e,o))||i.enumerable});return r};var Le=(r,e,t)=>(t=r!=null?Nh(kh(r)):{},Mh(e||!r||!r.__esModule?Ui(t,"default",{value:r,enumerable:!0}):t,r));var Mi=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var k=(r,e,t)=>(Mi(r,e,"read from private field"),t?t.call(r):e.get(r)),ie=(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)},fe=(r,e,t,i)=>(Mi(r,e,"write to private field"),i?i.call(r,t):e.set(r,t),t);var se=(r,e,t)=>(Mi(r,e,"access private method"),t);var la=T((Fb,aa)=>{"use strict";var Gi=_e("https"),Vi=_e("http"),{URL:oa}=_e("url"),Yi=class extends Vi.Agent{constructor(e){let{proxy:t,proxyRequestOptions:i,...o}=e;super(o),this.proxy=typeof t=="string"?new oa(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:"?Vi:Gi).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()}},Xi=class extends Gi.Agent{constructor(e){let{proxy:t,proxyRequestOptions:i,...o}=e;super(o),this.proxy=typeof t=="string"?new oa(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:"?Vi:Gi).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()}};aa.exports={HttpProxyAgent:Yi,HttpsProxyAgent:Xi}});var ha=T(fa=>{"use strict";var Hh=_e("url").parse,Gh={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Vh=String.prototype.endsWith||function(r){return r.length<=this.length&&this.indexOf(r,this.length-r.length)!==-1};function Yh(r){var e=typeof r=="string"?Hh(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)||Gh[t]||0,!Xh(i,o)))return"";var a=kt("npm_config_"+t+"_proxy")||kt(t+"_proxy")||kt("npm_config_proxy")||kt("all_proxy");return a&&a.indexOf("://")===-1&&(a=t+"://"+a),a}function Xh(r,e){var t=(kt("npm_config_no_proxy")||kt("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)),!Vh.call(r,a)):r!==a}):!0}function kt(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}fa.getProxyForUrl=Yh});var Zi=T((Gb,ba)=>{"use strict";function Jh(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 ma(r){return typeof r=="number"||/^0x[0-9a-f]+$/i.test(r)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(r)}function ga(r,e){return e==="constructor"&&typeof r[e]=="function"||e==="__proto__"}ba.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,j=0;j<q.length-1;j++){var X=q[j];if(ga(L,X))return;L[X]===void 0&&(L[X]={}),(L[X]===Object.prototype||L[X]===Number.prototype||L[X]===String.prototype)&&(L[X]={}),L[X]===Array.prototype&&(L[X]=[]),L=L[X]}var Q=q[q.length-1];ga(L,Q)||((L===Object.prototype||L===Number.prototype||L===String.prototype)&&(L={}),L===Array.prototype&&(L=[]),L[Q]===void 0||t.bools[Q]||typeof L[Q]=="boolean"?L[Q]=I:Array.isArray(L[Q])?L[Q].push(I):L[Q]=[L[Q],I])}function f(A,q,I){if(!(I&&t.unknownFn&&!h(A,I)&&t.unknownFn(I)===!1)){var L=!t.strings[A]&&ma(q)?Number(q):q;d(u,A.split("."),L),(i[A]||[]).forEach(function(j){d(u,j.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._||!ma(g)?g:Number(g)),e.stopEarly){u._.push.apply(u._,r.slice(y+1));break}}return Object.keys(a).forEach(function(A){Jh(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 _a=T((xn,Sa)=>{(function(r,e){typeof xn=="object"&&typeof Sa<"u"?e(xn):typeof define=="function"&&define.amd?define(["exports"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.WebStreamsPolyfill={}))})(xn,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 j{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 X(n,s){n._ownerReadableStream=s,s._reader=n,s._state==="readable"?hi(n):s._state==="closed"?df(n):Hs(n,s._storedError)}function Q(n,s){let l=n._ownerReadableStream;return Pe(l,s)}function le(n){n._ownerReadableStream._state==="readable"?di(n,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):pf(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 ft(n){return new TypeError("Cannot "+n+" a stream using a released reader")}function hi(n){n._closedPromise=y((s,l)=>{n._closedPromise_resolve=s,n._closedPromise_reject=l})}function Hs(n,s){hi(n),di(n,s)}function df(n){hi(n),Gs(n)}function di(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 pf(n,s){Hs(n,s)}function Gs(n){n._closedPromise_resolve!==void 0&&(n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}let Vs=e("[[AbortSteps]]"),Ys=e("[[ErrorSteps]]"),pi=e("[[CancelSteps]]"),mi=e("[[PullSteps]]"),Xs=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},mf=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};function gf(n){return typeof n=="object"||typeof n=="function"}function We(n,s){if(n!==void 0&&!gf(n))throw new TypeError(`${s} is not an object.`)}function Ce(n,s){if(typeof n!="function")throw new TypeError(`${s} is not a function.`)}function bf(n){return typeof n=="object"&&n!==null||typeof n=="function"}function Qs(n,s){if(!bf(n))throw new TypeError(`${s} is not an object.`)}function ke(n,s,l){if(n===void 0)throw new TypeError(`Parameter ${s} is required in '${l}'.`)}function gi(n,s,l){if(n===void 0)throw new TypeError(`${s} is required in '${l}'.`)}function bi(n){return Number(n)}function Ks(n){return n===0?0:n}function yf(n){return Ks(mf(n))}function Zs(n,s){let c=Number.MAX_SAFE_INTEGER,b=Number(n);if(b=Ks(b),!Xs(b))throw new TypeError(`${s} is not a finite number`);if(b=yf(b),b<0||b>c)throw new TypeError(`${s} is outside the accepted range of 0 to ${c}, inclusive`);return!Xs(b)||b===0?0:b}function yi(n,s){if(!tt(n))throw new TypeError(`${s} is not a ReadableStream.`)}function Pt(n){return new ur(n)}function Js(n,s){n._reader._readRequests.push(s)}function Si(n,s,l){let b=n._reader._readRequests.shift();l?b._closeSteps():b._chunkSteps(s)}function en(n){return n._reader._readRequests.length}function eo(n){let s=n._reader;return!(s===void 0||!Ke(s))}class ur{constructor(s){if(ke(s,1,"ReadableStreamDefaultReader"),yi(s,"First parameter"),rt(s))throw new TypeError("This stream has already been locked for exclusive reading by another reader");X(this,s),this._readRequests=new j}get closed(){return Ke(this)?this._closedPromise:p(tn("closed"))}cancel(s=void 0){return Ke(this)?this._ownerReadableStream===void 0?p(ft("cancel")):Q(this,s):p(tn("cancel"))}read(){if(!Ke(this))return p(tn("read"));if(this._ownerReadableStream===void 0)return p(ft("read from"));let s,l,c=y((w,E)=>{s=w,l=E});return cr(this,{_chunkSteps:w=>s({value:w,done:!1}),_closeSteps:()=>s({value:void 0,done:!0}),_errorSteps:w=>l(w)}),c}releaseLock(){if(!Ke(this))throw tn("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");le(this)}}}Object.defineProperties(ur.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(ur.prototype,e.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Ke(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readRequests")?!1:n instanceof ur}function cr(n,s){let l=n._ownerReadableStream;l._disturbed=!0,l._state==="closed"?s._closeSteps():l._state==="errored"?s._errorSteps(l._storedError):l._readableStreamController[mi](s)}function tn(n){return new TypeError(`ReadableStreamDefaultReader.prototype.${n} can only be used on a ReadableStreamDefaultReader`)}let to=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class ro{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(ft("iterate"));let l,c,b=y((E,$)=>{l=E,c=$});return cr(s,{_chunkSteps:E=>{this._ongoingPromise=void 0,A(()=>l({value:E,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,le(s),l({value:void 0,done:!0})},_errorSteps:E=>{this._ongoingPromise=void 0,this._isFinished=!0,le(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(ft("finish iterating"));if(!this._preventCancel){let c=Q(l,s);return le(l),P(c,()=>({value:s,done:!0}))}return le(l),g({value:s,done:!0})}}let no={next(){return io(this)?this._asyncIteratorImpl.next():p(so("next"))},return(n){return io(this)?this._asyncIteratorImpl.return(n):p(so("return"))}};to!==void 0&&Object.setPrototypeOf(no,to);function Sf(n,s){let l=Pt(n),c=new ro(l,s),b=Object.create(no);return b._asyncIteratorImpl=c,b}function io(n){if(!a(n)||!Object.prototype.hasOwnProperty.call(n,"_asyncIteratorImpl"))return!1;try{return n._asyncIteratorImpl instanceof ro}catch{return!1}}function so(n){return new TypeError(`ReadableStreamAsyncIterator.${n} can only be used on a ReadableSteamAsyncIterator`)}let oo=Number.isNaN||function(n){return n!==n};function fr(n){return n.slice()}function ao(n,s,l,c,b){new Uint8Array(n).set(new Uint8Array(l,c,b),s)}function qb(n){return n}function rn(n){return!1}function lo(n,s,l){if(n.slice)return n.slice(s,l);let c=l-s,b=new ArrayBuffer(c);return ao(b,0,n,s,c),b}function _f(n){return!(typeof n!="number"||oo(n)||n<0)}function uo(n){let s=lo(n.buffer,n.byteOffset,n.byteOffset+n.byteLength);return new Uint8Array(s)}function _i(n){let s=n._queue.shift();return n._queueTotalSize-=s.size,n._queueTotalSize<0&&(n._queueTotalSize=0),s.value}function wi(n,s,l){if(!_f(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 wf(n){return n._queue.peek().value}function Ze(n){n._queue=new j,n._queueTotalSize=0}class hr{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Ei(this))throw Ti("view");return this._view}respond(s){if(!Ei(this))throw Ti("respond");if(ke(s,1,"respond"),s=Zs(s,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");rn(this._view.buffer),ln(this._associatedReadableByteStreamController,s)}respondWithNewView(s){if(!Ei(this))throw Ti("respondWithNewView");if(ke(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");rn(s.buffer),un(this._associatedReadableByteStreamController,s)}}Object.defineProperties(hr.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(hr.prototype,e.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class It{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!ht(this))throw pr("byobRequest");return Ai(this)}get desiredSize(){if(!ht(this))throw pr("desiredSize");return yo(this)}close(){if(!ht(this))throw pr("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`);dr(this)}enqueue(s){if(!ht(this))throw pr("enqueue");if(ke(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`);an(this,s)}error(s=void 0){if(!ht(this))throw pr("error");Oe(this,s)}[pi](s){co(this),Ze(this);let l=this._cancelAlgorithm(s);return on(this),l}[mi](s){let l=this._controlledReadableByteStream;if(this._queueTotalSize>0){let b=this._queue.shift();this._queueTotalSize-=b.byteLength,mo(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),dt(this)}}Object.defineProperties(It.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(It.prototype,e.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ht(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledReadableByteStream")?!1:n instanceof It}function Ei(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_associatedReadableByteStreamController")?!1:n instanceof hr}function dt(n){if(!Af(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,dt(n))},c=>{Oe(n,c)})}function co(n){vi(n),n._pendingPullIntos=new j}function Ri(n,s){let l=!1;n._state==="closed"&&(l=!0);let c=fo(s);s.readerType==="default"?Si(n,c,l):Cf(n,c,l)}function fo(n){let s=n.bytesFilled,l=n.elementSize;return new n.viewConstructor(n.buffer,n.byteOffset,s/l)}function nn(n,s,l,c){n._queue.push({buffer:s,byteOffset:l,byteLength:c}),n._queueTotalSize+=c}function ho(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 U=W.peek(),M=Math.min($,U.byteLength),Z=s.byteOffset+s.bytesFilled;ao(s.buffer,Z,U.buffer,U.byteOffset,M),U.byteLength===M?W.shift():(U.byteOffset+=M,U.byteLength-=M),n._queueTotalSize-=M,po(n,M,s),$-=M}return B}function po(n,s,l){l.bytesFilled+=s}function mo(n){n._queueTotalSize===0&&n._closeRequested?(on(n),Er(n._controlledReadableByteStream)):dt(n)}function vi(n){n._byobRequest!==null&&(n._byobRequest._associatedReadableByteStreamController=void 0,n._byobRequest._view=null,n._byobRequest=null)}function go(n){for(;n._pendingPullIntos.length>0;){if(n._queueTotalSize===0)return;let s=n._pendingPullIntos.peek();ho(n,s)&&(sn(n),Ri(n._controlledReadableByteStream,s))}}function Ef(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($),wo(c,l);return}if(c._state==="closed"){let B=new w($.buffer,$.byteOffset,0);l._closeSteps(B);return}if(n._queueTotalSize>0){if(ho(n,$)){let B=fo($);mo(n),l._chunkSteps(B);return}if(n._closeRequested){let B=new TypeError("Insufficient bytes to fill elements in the given buffer");Oe(n,B),l._errorSteps(B);return}}n._pendingPullIntos.push($),wo(c,l),dt(n)}function Rf(n,s){let l=n._controlledReadableByteStream;if($i(l))for(;Eo(l)>0;){let c=sn(n);Ri(l,c)}}function vf(n,s,l){if(po(n,s,l),l.bytesFilled<l.elementSize)return;sn(n);let c=l.bytesFilled%l.elementSize;if(c>0){let b=l.byteOffset+l.bytesFilled,w=lo(l.buffer,b-c,b);nn(n,w,0,w.byteLength)}l.bytesFilled-=c,Ri(n._controlledReadableByteStream,l),go(n)}function bo(n,s){let l=n._pendingPullIntos.peek();vi(n),n._controlledReadableByteStream._state==="closed"?Rf(n):vf(n,s,l),dt(n)}function sn(n){return n._pendingPullIntos.shift()}function Af(n){let s=n._controlledReadableByteStream;return s._state!=="readable"||n._closeRequested||!n._started?!1:!!(eo(s)&&en(s)>0||$i(s)&&Eo(s)>0||yo(n)>0)}function on(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0}function dr(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 Oe(n,c),c}on(n),Er(s)}}function an(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();rn($.buffer),$.buffer=$.buffer}if(vi(n),eo(l))if(en(l)===0)nn(n,E,b,w);else{n._pendingPullIntos.length>0&&sn(n);let $=new Uint8Array(E,b,w);Si(l,$,!1)}else $i(l)?(nn(n,E,b,w),go(n)):nn(n,E,b,w);dt(n)}function Oe(n,s){let l=n._controlledReadableByteStream;l._state==="readable"&&(co(n),Ze(n),on(n),Go(l,s))}function Ai(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(hr.prototype);$f(c,n,l),n._byobRequest=c}return n._byobRequest}function yo(n){let s=n._controlledReadableByteStream._state;return s==="errored"?null:s==="closed"?0:n._strategyHWM-n._queueTotalSize}function ln(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,bo(n,s)}function un(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,bo(n,b)}function So(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,Ze(s),s._closeRequested=!1,s._started=!1,s._strategyHWM=w,s._pullAlgorithm=c,s._cancelAlgorithm=b,s._autoAllocateChunkSize=E,s._pendingPullIntos=new j,n._readableStreamController=s;let $=l();R(g($),()=>{s._started=!0,dt(s)},B=>{Oe(s,B)})}function Tf(n,s,l){let c=Object.create(It.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");So(n,c,b,w,E,l,$)}function $f(n,s,l){n._associatedReadableByteStreamController=s,n._view=l}function Ti(n){return new TypeError(`ReadableStreamBYOBRequest.prototype.${n} can only be used on a ReadableStreamBYOBRequest`)}function pr(n){return new TypeError(`ReadableByteStreamController.prototype.${n} can only be used on a ReadableByteStreamController`)}function _o(n){return new mr(n)}function wo(n,s){n._reader._readIntoRequests.push(s)}function Cf(n,s,l){let b=n._reader._readIntoRequests.shift();l?b._closeSteps(s):b._chunkSteps(s)}function Eo(n){return n._reader._readIntoRequests.length}function $i(n){let s=n._reader;return!(s===void 0||!pt(s))}class mr{constructor(s){if(ke(s,1,"ReadableStreamBYOBReader"),yi(s,"First parameter"),rt(s))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ht(s._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");X(this,s),this._readIntoRequests=new j}get closed(){return pt(this)?this._closedPromise:p(cn("closed"))}cancel(s=void 0){return pt(this)?this._ownerReadableStream===void 0?p(ft("cancel")):Q(this,s):p(cn("cancel"))}read(s){if(!pt(this))return p(cn("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(rn(s.buffer),this._ownerReadableStream===void 0)return p(ft("read from"));let l,c,b=y((E,$)=>{l=E,c=$});return Ro(this,s,{_chunkSteps:E=>l({value:E,done:!1}),_closeSteps:E=>l({value:E,done:!0}),_errorSteps:E=>c(E)}),b}releaseLock(){if(!pt(this))throw cn("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");le(this)}}}Object.defineProperties(mr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(mr.prototype,e.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function pt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readIntoRequests")?!1:n instanceof mr}function Ro(n,s,l){let c=n._ownerReadableStream;c._disturbed=!0,c._state==="errored"?l._errorSteps(c._storedError):Ef(c._readableStreamController,s,l)}function cn(n){return new TypeError(`ReadableStreamBYOBReader.prototype.${n} can only be used on a ReadableStreamBYOBReader`)}function gr(n,s){let{highWaterMark:l}=n;if(l===void 0)return s;if(oo(l)||l<0)throw new RangeError("Invalid highWaterMark");return l}function fn(n){let{size:s}=n;return s||(()=>1)}function hn(n,s){We(n,s);let l=n==null?void 0:n.highWaterMark,c=n==null?void 0:n.size;return{highWaterMark:l===void 0?void 0:bi(l),size:c===void 0?void 0:Of(c,`${s} has member 'size' that`)}}function Of(n,s){return Ce(n,s),l=>bi(n(l))}function Pf(n,s){We(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:If(l,n,`${s} has member 'abort' that`),close:c===void 0?void 0:Lf(c,n,`${s} has member 'close' that`),start:b===void 0?void 0:xf(b,n,`${s} has member 'start' that`),write:E===void 0?void 0:qf(E,n,`${s} has member 'write' that`),type:w}}function If(n,s,l){return Ce(n,l),c=>I(n,s,[c])}function Lf(n,s,l){return Ce(n,l),()=>I(n,s,[])}function xf(n,s,l){return Ce(n,l),c=>q(n,s,[c])}function qf(n,s,l){return Ce(n,l),(c,b)=>I(n,s,[c,b])}function vo(n,s){if(!Lt(n))throw new TypeError(`${s} is not a WritableStream.`)}function Df(n){if(typeof n!="object"||n===null)return!1;try{return typeof n.aborted=="boolean"}catch{return!1}}let Bf=typeof AbortController=="function";function Ff(){if(Bf)return new AbortController}class br{constructor(s={},l={}){s===void 0?s=null:Qs(s,"First parameter");let c=hn(l,"Second parameter"),b=Pf(s,"First parameter");if(To(this),b.type!==void 0)throw new RangeError("Invalid type is specified");let E=fn(c),$=gr(c,1);Kf(this,b,$,E)}get locked(){if(!Lt(this))throw bn("locked");return xt(this)}abort(s=void 0){return Lt(this)?xt(this)?p(new TypeError("Cannot abort a stream that already has a writer")):dn(this,s):p(bn("abort"))}close(){return Lt(this)?xt(this)?p(new TypeError("Cannot close a stream that already has a writer")):De(this)?p(new TypeError("Cannot close an already-closing stream")):$o(this):p(bn("close"))}getWriter(){if(!Lt(this))throw bn("getWriter");return Ao(this)}}Object.defineProperties(br.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(br.prototype,e.toStringTag,{value:"WritableStream",configurable:!0});function Ao(n){return new yr(n)}function Nf(n,s,l,c,b=1,w=()=>1){let E=Object.create(br.prototype);To(E);let $=Object.create(qt.prototype);return xo(E,$,n,s,l,c,b,w),E}function To(n){n._state="writable",n._storedError=void 0,n._writer=void 0,n._writableStreamController=void 0,n._writeRequests=new j,n._inFlightWriteRequest=void 0,n._closeRequest=void 0,n._inFlightCloseRequest=void 0,n._pendingAbortRequest=void 0,n._backpressure=!1}function Lt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_writableStreamController")?!1:n instanceof br}function xt(n){return n._writer!==void 0}function dn(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||Oi(n,s),w}function $o(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"&&Ni(c),Zf(n._writableStreamController),l}function zf(n){return y((l,c)=>{let b={_resolve:l,_reject:c};n._writeRequests.push(b)})}function Ci(n,s){if(n._state==="writable"){Oi(n,s);return}Pi(n)}function Oi(n,s){let l=n._writableStreamController;n._state="erroring",n._storedError=s;let c=n._writer;c!==void 0&&Oo(c,s),!Mf(n)&&l._started&&Pi(n)}function Pi(n){n._state="errored",n._writableStreamController[Ys]();let s=n._storedError;if(n._writeRequests.forEach(b=>{b._reject(s)}),n._writeRequests=new j,n._pendingAbortRequest===void 0){pn(n);return}let l=n._pendingAbortRequest;if(n._pendingAbortRequest=void 0,l._wasAlreadyErroring){l._reject(s),pn(n);return}let c=n._writableStreamController[Vs](l._reason);R(c,()=>{l._resolve(),pn(n)},b=>{l._reject(b),pn(n)})}function Wf(n){n._inFlightWriteRequest._resolve(void 0),n._inFlightWriteRequest=void 0}function kf(n,s){n._inFlightWriteRequest._reject(s),n._inFlightWriteRequest=void 0,Ci(n,s)}function jf(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&&Fo(l)}function Uf(n,s){n._inFlightCloseRequest._reject(s),n._inFlightCloseRequest=void 0,n._pendingAbortRequest!==void 0&&(n._pendingAbortRequest._reject(s),n._pendingAbortRequest=void 0),Ci(n,s)}function De(n){return!(n._closeRequest===void 0&&n._inFlightCloseRequest===void 0)}function Mf(n){return!(n._inFlightWriteRequest===void 0&&n._inFlightCloseRequest===void 0)}function Hf(n){n._inFlightCloseRequest=n._closeRequest,n._closeRequest=void 0}function Gf(n){n._inFlightWriteRequest=n._writeRequests.shift()}function pn(n){n._closeRequest!==void 0&&(n._closeRequest._reject(n._storedError),n._closeRequest=void 0);let s=n._writer;s!==void 0&&Bi(s,n._storedError)}function Ii(n,s){let l=n._writer;l!==void 0&&s!==n._backpressure&&(s?sh(l):Ni(l)),n._backpressure=s}class yr{constructor(s){if(ke(s,1,"WritableStreamDefaultWriter"),vo(s,"First parameter"),xt(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")!De(s)&&s._backpressure?Sn(this):No(this),yn(this);else if(l==="erroring")Fi(this,s._storedError),yn(this);else if(l==="closed")No(this),nh(this);else{let c=s._storedError;Fi(this,c),Bo(this,c)}}get closed(){return mt(this)?this._closedPromise:p(gt("closed"))}get desiredSize(){if(!mt(this))throw gt("desiredSize");if(this._ownerWritableStream===void 0)throw Sr("desiredSize");return Qf(this)}get ready(){return mt(this)?this._readyPromise:p(gt("ready"))}abort(s=void 0){return mt(this)?this._ownerWritableStream===void 0?p(Sr("abort")):Vf(this,s):p(gt("abort"))}close(){if(!mt(this))return p(gt("close"));let s=this._ownerWritableStream;return s===void 0?p(Sr("close")):De(s)?p(new TypeError("Cannot close an already-closing stream")):Co(this)}releaseLock(){if(!mt(this))throw gt("releaseLock");this._ownerWritableStream!==void 0&&Po(this)}write(s=void 0){return mt(this)?this._ownerWritableStream===void 0?p(Sr("write to")):Io(this,s):p(gt("write"))}}Object.defineProperties(yr.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(yr.prototype,e.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function mt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_ownerWritableStream")?!1:n instanceof yr}function Vf(n,s){let l=n._ownerWritableStream;return dn(l,s)}function Co(n){let s=n._ownerWritableStream;return $o(s)}function Yf(n){let s=n._ownerWritableStream,l=s._state;return De(s)||l==="closed"?g(void 0):l==="errored"?p(s._storedError):Co(n)}function Xf(n,s){n._closedPromiseState==="pending"?Bi(n,s):ih(n,s)}function Oo(n,s){n._readyPromiseState==="pending"?zo(n,s):oh(n,s)}function Qf(n){let s=n._ownerWritableStream,l=s._state;return l==="errored"||l==="erroring"?null:l==="closed"?0:qo(s._writableStreamController)}function Po(n){let s=n._ownerWritableStream,l=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Oo(n,l),Xf(n,l),s._writer=void 0,n._ownerWritableStream=void 0}function Io(n,s){let l=n._ownerWritableStream,c=l._writableStreamController,b=Jf(c,s);if(l!==n._ownerWritableStream)return p(Sr("write to"));let w=l._state;if(w==="errored")return p(l._storedError);if(De(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=zf(l);return eh(c,s,b),E}let Lo={};class qt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Li(this))throw Di("abortReason");return this._abortReason}get signal(){if(!Li(this))throw Di("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(s=void 0){if(!Li(this))throw Di("error");this._controlledWritableStream._state==="writable"&&Do(this,s)}[Vs](s){let l=this._abortAlgorithm(s);return mn(this),l}[Ys](){Ze(this)}}Object.defineProperties(qt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(qt.prototype,e.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Li(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledWritableStream")?!1:n instanceof qt}function xo(n,s,l,c,b,w,E,$){s._controlledWritableStream=n,n._writableStreamController=s,s._queue=void 0,s._queueTotalSize=void 0,Ze(s),s._abortReason=void 0,s._abortController=Ff(),s._started=!1,s._strategySizeAlgorithm=$,s._strategyHWM=E,s._writeAlgorithm=c,s._closeAlgorithm=b,s._abortAlgorithm=w;let B=qi(s);Ii(n,B);let W=l(),U=g(W);R(U,()=>{s._started=!0,gn(s)},M=>{s._started=!0,Ci(n,M)})}function Kf(n,s,l,c){let b=Object.create(qt.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)),xo(n,b,w,E,$,B,l,c)}function mn(n){n._writeAlgorithm=void 0,n._closeAlgorithm=void 0,n._abortAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function Zf(n){wi(n,Lo,0),gn(n)}function Jf(n,s){try{return n._strategySizeAlgorithm(s)}catch(l){return xi(n,l),1}}function qo(n){return n._strategyHWM-n._queueTotalSize}function eh(n,s,l){try{wi(n,s,l)}catch(b){xi(n,b);return}let c=n._controlledWritableStream;if(!De(c)&&c._state==="writable"){let b=qi(n);Ii(c,b)}gn(n)}function gn(n){let s=n._controlledWritableStream;if(!n._started||s._inFlightWriteRequest!==void 0)return;if(s._state==="erroring"){Pi(s);return}if(n._queue.length===0)return;let c=wf(n);c===Lo?th(n):rh(n,c)}function xi(n,s){n._controlledWritableStream._state==="writable"&&Do(n,s)}function th(n){let s=n._controlledWritableStream;Hf(s),_i(n);let l=n._closeAlgorithm();mn(n),R(l,()=>{jf(s)},c=>{Uf(s,c)})}function rh(n,s){let l=n._controlledWritableStream;Gf(l);let c=n._writeAlgorithm(s);R(c,()=>{Wf(l);let b=l._state;if(_i(n),!De(l)&&b==="writable"){let w=qi(n);Ii(l,w)}gn(n)},b=>{l._state==="writable"&&mn(n),kf(l,b)})}function qi(n){return qo(n)<=0}function Do(n,s){let l=n._controlledWritableStream;mn(n),Oi(l,s)}function bn(n){return new TypeError(`WritableStream.prototype.${n} can only be used on a WritableStream`)}function Di(n){return new TypeError(`WritableStreamDefaultController.prototype.${n} can only be used on a WritableStreamDefaultController`)}function gt(n){return new TypeError(`WritableStreamDefaultWriter.prototype.${n} can only be used on a WritableStreamDefaultWriter`)}function Sr(n){return new TypeError("Cannot "+n+" a stream using a released writer")}function yn(n){n._closedPromise=y((s,l)=>{n._closedPromise_resolve=s,n._closedPromise_reject=l,n._closedPromiseState="pending"})}function Bo(n,s){yn(n),Bi(n,s)}function nh(n){yn(n),Fo(n)}function Bi(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 ih(n,s){Bo(n,s)}function Fo(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 Sn(n){n._readyPromise=y((s,l)=>{n._readyPromise_resolve=s,n._readyPromise_reject=l}),n._readyPromiseState="pending"}function Fi(n,s){Sn(n),zo(n,s)}function No(n){Sn(n),Ni(n)}function zo(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 sh(n){Sn(n)}function oh(n,s){Fi(n,s)}function Ni(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 Wo=typeof DOMException<"u"?DOMException:void 0;function ah(n){if(!(typeof n=="function"||typeof n=="object"))return!1;try{return new n,!0}catch{return!1}}function lh(){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 uh=ah(Wo)?Wo:lh();function ko(n,s,l,c,b,w){let E=Pt(n),$=Ao(s);n._disturbed=!0;let B=!1,W=g(void 0);return y((U,M)=>{let Z;if(w!==void 0){if(Z=()=>{let x=new uh("Aborted","AbortError"),z=[];c||z.push(()=>s._state==="writable"?dn(s,x):g(void 0)),b||z.push(()=>n._state==="readable"?Pe(n,x):g(void 0)),me(()=>Promise.all(z.map(V=>V())),!0,x)},w.aborted){Z();return}w.addEventListener("abort",Z)}function Ie(){return y((x,z)=>{function V(Se){Se?x():S(Ft(),V,z)}V(!1)})}function Ft(){return B?g(!0):S($._readyPromise,()=>y((x,z)=>{cr(E,{_chunkSteps:V=>{W=S(Io($,V),void 0,t),x(!1)},_closeSteps:()=>x(!0),_errorSteps:z})}))}if(je(n,E._closedPromise,x=>{c?Ee(!0,x):me(()=>dn(s,x),!0,x)}),je(s,$._closedPromise,x=>{b?Ee(!0,x):me(()=>Pe(n,x),!0,x)}),ce(n,E._closedPromise,()=>{l?Ee():me(()=>Yf($))}),De(s)||s._state==="closed"){let x=new TypeError("the destination writable stream closed before all data could be piped to it");b?Ee(!0,x):me(()=>Pe(n,x),!0,x)}D(Ie());function nt(){let x=W;return S(W,()=>x!==W?nt():void 0)}function je(x,z,V){x._state==="errored"?V(x._storedError):v(z,V)}function ce(x,z,V){x._state==="closed"?V():_(z,V)}function me(x,z,V){if(B)return;B=!0,s._state==="writable"&&!De(s)?_(nt(),Se):Se();function Se(){R(x(),()=>Ue(z,V),Nt=>Ue(!0,Nt))}}function Ee(x,z){B||(B=!0,s._state==="writable"&&!De(s)?_(nt(),()=>Ue(x,z)):Ue(x,z))}function Ue(x,z){Po($),le(E),w!==void 0&&w.removeEventListener("abort",Z),x?M(z):U(void 0)}})}class Dt{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!_n(this))throw Rn("desiredSize");return zi(this)}close(){if(!_n(this))throw Rn("close");if(!Bt(this))throw new TypeError("The stream is not in a state that permits close");wr(this)}enqueue(s=void 0){if(!_n(this))throw Rn("enqueue");if(!Bt(this))throw new TypeError("The stream is not in a state that permits enqueue");return En(this,s)}error(s=void 0){if(!_n(this))throw Rn("error");Je(this,s)}[pi](s){Ze(this);let l=this._cancelAlgorithm(s);return wn(this),l}[mi](s){let l=this._controlledReadableStream;if(this._queue.length>0){let c=_i(this);this._closeRequested&&this._queue.length===0?(wn(this),Er(l)):_r(this),s._chunkSteps(c)}else Js(l,s),_r(this)}}Object.defineProperties(Dt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Dt.prototype,e.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function _n(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledReadableStream")?!1:n instanceof Dt}function _r(n){if(!jo(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,_r(n))},c=>{Je(n,c)})}function jo(n){let s=n._controlledReadableStream;return!Bt(n)||!n._started?!1:!!(rt(s)&&en(s)>0||zi(n)>0)}function wn(n){n._pullAlgorithm=void 0,n._cancelAlgorithm=void 0,n._strategySizeAlgorithm=void 0}function wr(n){if(!Bt(n))return;let s=n._controlledReadableStream;n._closeRequested=!0,n._queue.length===0&&(wn(n),Er(s))}function En(n,s){if(!Bt(n))return;let l=n._controlledReadableStream;if(rt(l)&&en(l)>0)Si(l,s,!1);else{let c;try{c=n._strategySizeAlgorithm(s)}catch(b){throw Je(n,b),b}try{wi(n,s,c)}catch(b){throw Je(n,b),b}}_r(n)}function Je(n,s){let l=n._controlledReadableStream;l._state==="readable"&&(Ze(n),wn(n),Go(l,s))}function zi(n){let s=n._controlledReadableStream._state;return s==="errored"?null:s==="closed"?0:n._strategyHWM-n._queueTotalSize}function ch(n){return!jo(n)}function Bt(n){let s=n._controlledReadableStream._state;return!n._closeRequested&&s==="readable"}function Uo(n,s,l,c,b,w,E){s._controlledReadableStream=n,s._queue=void 0,s._queueTotalSize=void 0,Ze(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,_r(s)},B=>{Je(s,B)})}function fh(n,s,l,c){let b=Object.create(Dt.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)),Uo(n,b,w,E,$,l,c)}function Rn(n){return new TypeError(`ReadableStreamDefaultController.prototype.${n} can only be used on a ReadableStreamDefaultController`)}function hh(n,s){return ht(n._readableStreamController)?ph(n):dh(n)}function dh(n,s){let l=Pt(n),c=!1,b=!1,w=!1,E=!1,$,B,W,U,M,Z=y(ce=>{M=ce});function Ie(){return c?(b=!0,g(void 0)):(c=!0,cr(l,{_chunkSteps:me=>{A(()=>{b=!1;let Ee=me,Ue=me;w||En(W._readableStreamController,Ee),E||En(U._readableStreamController,Ue),c=!1,b&&Ie()})},_closeSteps:()=>{c=!1,w||wr(W._readableStreamController),E||wr(U._readableStreamController),(!w||!E)&&M(void 0)},_errorSteps:()=>{c=!1}}),g(void 0))}function Ft(ce){if(w=!0,$=ce,E){let me=fr([$,B]),Ee=Pe(n,me);M(Ee)}return Z}function nt(ce){if(E=!0,B=ce,w){let me=fr([$,B]),Ee=Pe(n,me);M(Ee)}return Z}function je(){}return W=Wi(je,Ie,Ft),U=Wi(je,Ie,nt),v(l._closedPromise,ce=>{Je(W._readableStreamController,ce),Je(U._readableStreamController,ce),(!w||!E)&&M(void 0)}),[W,U]}function ph(n){let s=Pt(n),l=!1,c=!1,b=!1,w=!1,E=!1,$,B,W,U,M,Z=y(x=>{M=x});function Ie(x){v(x._closedPromise,z=>{x===s&&(Oe(W._readableStreamController,z),Oe(U._readableStreamController,z),(!w||!E)&&M(void 0))})}function Ft(){pt(s)&&(le(s),s=Pt(n),Ie(s)),cr(s,{_chunkSteps:z=>{A(()=>{c=!1,b=!1;let V=z,Se=z;if(!w&&!E)try{Se=uo(z)}catch(Nt){Oe(W._readableStreamController,Nt),Oe(U._readableStreamController,Nt),M(Pe(n,Nt));return}w||an(W._readableStreamController,V),E||an(U._readableStreamController,Se),l=!1,c?je():b&&ce()})},_closeSteps:()=>{l=!1,w||dr(W._readableStreamController),E||dr(U._readableStreamController),W._readableStreamController._pendingPullIntos.length>0&&ln(W._readableStreamController,0),U._readableStreamController._pendingPullIntos.length>0&&ln(U._readableStreamController,0),(!w||!E)&&M(void 0)},_errorSteps:()=>{l=!1}})}function nt(x,z){Ke(s)&&(le(s),s=_o(n),Ie(s));let V=z?U:W,Se=z?W:U;Ro(s,x,{_chunkSteps:zt=>{A(()=>{c=!1,b=!1;let Wt=z?E:w;if(z?w:E)Wt||un(V._readableStreamController,zt);else{let sa;try{sa=uo(zt)}catch(ji){Oe(V._readableStreamController,ji),Oe(Se._readableStreamController,ji),M(Pe(n,ji));return}Wt||un(V._readableStreamController,zt),an(Se._readableStreamController,sa)}l=!1,c?je():b&&ce()})},_closeSteps:zt=>{l=!1;let Wt=z?E:w,Ln=z?w:E;Wt||dr(V._readableStreamController),Ln||dr(Se._readableStreamController),zt!==void 0&&(Wt||un(V._readableStreamController,zt),!Ln&&Se._readableStreamController._pendingPullIntos.length>0&&ln(Se._readableStreamController,0)),(!Wt||!Ln)&&M(void 0)},_errorSteps:()=>{l=!1}})}function je(){if(l)return c=!0,g(void 0);l=!0;let x=Ai(W._readableStreamController);return x===null?Ft():nt(x._view,!1),g(void 0)}function ce(){if(l)return b=!0,g(void 0);l=!0;let x=Ai(U._readableStreamController);return x===null?Ft():nt(x._view,!0),g(void 0)}function me(x){if(w=!0,$=x,E){let z=fr([$,B]),V=Pe(n,z);M(V)}return Z}function Ee(x){if(E=!0,B=x,w){let z=fr([$,B]),V=Pe(n,z);M(V)}return Z}function Ue(){}return W=Ho(Ue,je,me),U=Ho(Ue,ce,Ee),Ie(s),[W,U]}function mh(n,s){We(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:Zs(c,`${s} has member 'autoAllocateChunkSize' that`),cancel:b===void 0?void 0:gh(b,l,`${s} has member 'cancel' that`),pull:w===void 0?void 0:bh(w,l,`${s} has member 'pull' that`),start:E===void 0?void 0:yh(E,l,`${s} has member 'start' that`),type:$===void 0?void 0:Sh($,`${s} has member 'type' that`)}}function gh(n,s,l){return Ce(n,l),c=>I(n,s,[c])}function bh(n,s,l){return Ce(n,l),c=>I(n,s,[c])}function yh(n,s,l){return Ce(n,l),c=>q(n,s,[c])}function Sh(n,s){if(n=`${n}`,n!=="bytes")throw new TypeError(`${s} '${n}' is not a valid enumeration value for ReadableStreamType`);return n}function _h(n,s){We(n,s);let l=n==null?void 0:n.mode;return{mode:l===void 0?void 0:wh(l,`${s} has member 'mode' that`)}}function wh(n,s){if(n=`${n}`,n!=="byob")throw new TypeError(`${s} '${n}' is not a valid enumeration value for ReadableStreamReaderMode`);return n}function Eh(n,s){return We(n,s),{preventCancel:!!(n==null?void 0:n.preventCancel)}}function Mo(n,s){We(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&&Rh(w,`${s} has member 'signal' that`),{preventAbort:!!l,preventCancel:!!c,preventClose:!!b,signal:w}}function Rh(n,s){if(!Df(n))throw new TypeError(`${s} is not an AbortSignal.`)}function vh(n,s){We(n,s);let l=n==null?void 0:n.readable;gi(l,"readable","ReadableWritablePair"),yi(l,`${s} has member 'readable' that`);let c=n==null?void 0:n.writable;return gi(c,"writable","ReadableWritablePair"),vo(c,`${s} has member 'writable' that`),{readable:l,writable:c}}class et{constructor(s={},l={}){s===void 0?s=null:Qs(s,"First parameter");let c=hn(l,"Second parameter"),b=mh(s,"First parameter");if(ki(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=gr(c,0);Tf(this,b,w)}else{let w=fn(c),E=gr(c,1);fh(this,b,E,w)}}get locked(){if(!tt(this))throw bt("locked");return rt(this)}cancel(s=void 0){return tt(this)?rt(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Pe(this,s):p(bt("cancel"))}getReader(s=void 0){if(!tt(this))throw bt("getReader");return _h(s,"First parameter").mode===void 0?Pt(this):_o(this)}pipeThrough(s,l={}){if(!tt(this))throw bt("pipeThrough");ke(s,1,"pipeThrough");let c=vh(s,"First parameter"),b=Mo(l,"Second parameter");if(rt(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(xt(c.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let w=ko(this,c.writable,b.preventClose,b.preventAbort,b.preventCancel,b.signal);return D(w),c.readable}pipeTo(s,l={}){if(!tt(this))return p(bt("pipeTo"));if(s===void 0)return p("Parameter 1 is required in 'pipeTo'.");if(!Lt(s))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let c;try{c=Mo(l,"Second parameter")}catch(b){return p(b)}return rt(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):xt(s)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):ko(this,s,c.preventClose,c.preventAbort,c.preventCancel,c.signal)}tee(){if(!tt(this))throw bt("tee");let s=hh(this);return fr(s)}values(s=void 0){if(!tt(this))throw bt("values");let l=Eh(s,"First parameter");return Sf(this,l.preventCancel)}}Object.defineProperties(et.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(et.prototype,e.toStringTag,{value:"ReadableStream",configurable:!0}),typeof e.asyncIterator=="symbol"&&Object.defineProperty(et.prototype,e.asyncIterator,{value:et.prototype.values,writable:!0,configurable:!0});function Wi(n,s,l,c=1,b=()=>1){let w=Object.create(et.prototype);ki(w);let E=Object.create(Dt.prototype);return Uo(w,E,n,s,l,c,b),w}function Ho(n,s,l){let c=Object.create(et.prototype);ki(c);let b=Object.create(It.prototype);return So(c,b,n,s,l,0,void 0),c}function ki(n){n._state="readable",n._reader=void 0,n._storedError=void 0,n._disturbed=!1}function tt(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_readableStreamController")?!1:n instanceof et}function rt(n){return n._reader!==void 0}function Pe(n,s){if(n._disturbed=!0,n._state==="closed")return g(void 0);if(n._state==="errored")return p(n._storedError);Er(n);let l=n._reader;l!==void 0&&pt(l)&&(l._readIntoRequests.forEach(b=>{b._closeSteps(void 0)}),l._readIntoRequests=new j);let c=n._readableStreamController[pi](s);return P(c,t)}function Er(n){n._state="closed";let s=n._reader;s!==void 0&&(Gs(s),Ke(s)&&(s._readRequests.forEach(l=>{l._closeSteps()}),s._readRequests=new j))}function Go(n,s){n._state="errored",n._storedError=s;let l=n._reader;l!==void 0&&(di(l,s),Ke(l)?(l._readRequests.forEach(c=>{c._errorSteps(s)}),l._readRequests=new j):(l._readIntoRequests.forEach(c=>{c._errorSteps(s)}),l._readIntoRequests=new j))}function bt(n){return new TypeError(`ReadableStream.prototype.${n} can only be used on a ReadableStream`)}function Vo(n,s){We(n,s);let l=n==null?void 0:n.highWaterMark;return gi(l,"highWaterMark","QueuingStrategyInit"),{highWaterMark:bi(l)}}let Yo=n=>n.byteLength;try{Object.defineProperty(Yo,"name",{value:"size",configurable:!0})}catch{}class vn{constructor(s){ke(s,1,"ByteLengthQueuingStrategy"),s=Vo(s,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=s.highWaterMark}get highWaterMark(){if(!Qo(this))throw Xo("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Qo(this))throw Xo("size");return Yo}}Object.defineProperties(vn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(vn.prototype,e.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Xo(n){return new TypeError(`ByteLengthQueuingStrategy.prototype.${n} can only be used on a ByteLengthQueuingStrategy`)}function Qo(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_byteLengthQueuingStrategyHighWaterMark")?!1:n instanceof vn}let Ko=()=>1;try{Object.defineProperty(Ko,"name",{value:"size",configurable:!0})}catch{}class An{constructor(s){ke(s,1,"CountQueuingStrategy"),s=Vo(s,"First parameter"),this._countQueuingStrategyHighWaterMark=s.highWaterMark}get highWaterMark(){if(!Jo(this))throw Zo("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Jo(this))throw Zo("size");return Ko}}Object.defineProperties(An.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(An.prototype,e.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Zo(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 An}function Ah(n,s){We(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:Th(l,n,`${s} has member 'flush' that`),readableType:c,start:b===void 0?void 0:$h(b,n,`${s} has member 'start' that`),transform:w===void 0?void 0:Ch(w,n,`${s} has member 'transform' that`),writableType:E}}function Th(n,s,l){return Ce(n,l),c=>I(n,s,[c])}function $h(n,s,l){return Ce(n,l),c=>q(n,s,[c])}function Ch(n,s,l){return Ce(n,l),(c,b)=>I(n,s,[c,b])}class Tn{constructor(s={},l={},c={}){s===void 0&&(s=null);let b=hn(l,"Second parameter"),w=hn(c,"Third parameter"),E=Ah(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 $=gr(w,0),B=fn(w),W=gr(b,1),U=fn(b),M,Z=y(Ie=>{M=Ie});Oh(this,Z,W,U,$,B),Ih(this,E),E.start!==void 0?M(E.start(this._transformStreamController)):M(void 0)}get readable(){if(!ea(this))throw ia("readable");return this._readable}get writable(){if(!ea(this))throw ia("writable");return this._writable}}Object.defineProperties(Tn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Tn.prototype,e.toStringTag,{value:"TransformStream",configurable:!0});function Oh(n,s,l,c,b,w){function E(){return s}function $(Z){return qh(n,Z)}function B(Z){return Dh(n,Z)}function W(){return Bh(n)}n._writable=Nf(E,$,W,B,l,c);function U(){return Fh(n)}function M(Z){return Cn(n,Z),g(void 0)}n._readable=Wi(E,U,M,b,w),n._backpressure=void 0,n._backpressureChangePromise=void 0,n._backpressureChangePromise_resolve=void 0,On(n,!0),n._transformStreamController=void 0}function ea(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_transformStreamController")?!1:n instanceof Tn}function $n(n,s){Je(n._readable._readableStreamController,s),Cn(n,s)}function Cn(n,s){ta(n._transformStreamController),xi(n._writable._writableStreamController,s),n._backpressure&&On(n,!1)}function On(n,s){n._backpressureChangePromise!==void 0&&n._backpressureChangePromise_resolve(),n._backpressureChangePromise=y(l=>{n._backpressureChangePromise_resolve=l}),n._backpressure=s}class Rr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Pn(this))throw In("desiredSize");let s=this._controlledTransformStream._readable._readableStreamController;return zi(s)}enqueue(s=void 0){if(!Pn(this))throw In("enqueue");ra(this,s)}error(s=void 0){if(!Pn(this))throw In("error");Lh(this,s)}terminate(){if(!Pn(this))throw In("terminate");xh(this)}}Object.defineProperties(Rr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Rr.prototype,e.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Pn(n){return!a(n)||!Object.prototype.hasOwnProperty.call(n,"_controlledTransformStream")?!1:n instanceof Rr}function Ph(n,s,l,c){s._controlledTransformStream=n,n._transformStreamController=s,s._transformAlgorithm=l,s._flushAlgorithm=c}function Ih(n,s){let l=Object.create(Rr.prototype),c=w=>{try{return ra(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)),Ph(n,l,c,b)}function ta(n){n._transformAlgorithm=void 0,n._flushAlgorithm=void 0}function ra(n,s){let l=n._controlledTransformStream,c=l._readable._readableStreamController;if(!Bt(c))throw new TypeError("Readable side is not in a state that permits enqueue");try{En(c,s)}catch(w){throw Cn(l,w),l._readable._storedError}ch(c)!==l._backpressure&&On(l,!0)}function Lh(n,s){$n(n._controlledTransformStream,s)}function na(n,s){let l=n._transformAlgorithm(s);return P(l,void 0,c=>{throw $n(n._controlledTransformStream,c),c})}function xh(n){let s=n._controlledTransformStream,l=s._readable._readableStreamController;wr(l);let c=new TypeError("TransformStream terminated");Cn(s,c)}function qh(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 na(l,s)})}return na(l,s)}function Dh(n,s){return $n(n,s),g(void 0)}function Bh(n){let s=n._readable,l=n._transformStreamController,c=l._flushAlgorithm();return ta(l),P(c,()=>{if(s._state==="errored")throw s._storedError;wr(s._readableStreamController)},b=>{throw $n(n,b),s._storedError})}function Fh(n){return On(n,!1),n._backpressureChangePromise}function In(n){return new TypeError(`TransformStreamDefaultController.prototype.${n} can only be used on a TransformStreamDefaultController`)}function ia(n){return new TypeError(`TransformStream.prototype.${n} can only be used on a TransformStream`)}r.ByteLengthQueuingStrategy=vn,r.CountQueuingStrategy=An,r.ReadableByteStreamController=It,r.ReadableStream=et,r.ReadableStreamBYOBReader=mr,r.ReadableStreamBYOBRequest=hr,r.ReadableStreamDefaultController=Dt,r.ReadableStreamDefaultReader=ur,r.TransformStream=Tn,r.TransformStreamDefaultController=Rr,r.WritableStream=br,r.WritableStreamDefaultController=qt,r.WritableStreamDefaultWriter=yr,Object.defineProperty(r,"__esModule",{value:!0})})});var wa=T(()=>{if(!globalThis.ReadableStream)try{let r=_e("process"),{emitWarning:e}=r;try{r.emitWarning=()=>{},Object.assign(globalThis,_e("stream/web")),r.emitWarning=e}catch(t){throw r.emitWarning=e,t}}catch{Object.assign(globalThis,_a())}try{let{Blob:r}=_e("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,Ea),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+Ea)).arrayBuffer();i+=u.byteLength,yield new Uint8Array(u)}}}var Qb,Ea,Me,$r,jt,qn,Ut,Ra,td,He,Cr=vr(()=>{Qb=Le(wa(),1);Ea=65536;Ra=(Ut=class{constructor(e=[],t={}){ie(this,Me,[]);ie(this,$r,"");ie(this,jt,0);ie(this,qn,"transparent");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 Ut?u=a:u=i.encode(`${a}`),fe(this,jt,k(this,jt)+(ArrayBuffer.isView(u)?u.byteLength:u.size)),k(this,Me).push(u)}fe(this,qn,`${t.endings===void 0?"transparent":t.endings}`);let o=t.type===void 0?"":String(t.type);fe(this,$r,/^[\x20-\x7E]*$/.test(o)?o:"")}get size(){return k(this,jt)}get type(){return k(this,$r)}async text(){let e=new TextDecoder,t="";for await(let i of Ji(k(this,Me),!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(k(this,Me),!1))e.set(i,t),t+=i.length;return e.buffer}stream(){let e=Ji(k(this,Me),!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=k(this,Me),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 Ut([],{type:String(i).toLowerCase()});return fe(y,jt,h),fe(y,Me,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])}},Me=new WeakMap,$r=new WeakMap,jt=new WeakMap,qn=new WeakMap,Ut);Object.defineProperties(Ra.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});td=Ra,He=td});var Or,Pr,va,rd,nd,Mt,es=vr(()=>{Cr();rd=(va=class extends He{constructor(t,i,o={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(t,o);ie(this,Or,0);ie(this,Pr,"");o===null&&(o={});let a=o.lastModified===void 0?Date.now():Number(o.lastModified);Number.isNaN(a)||fe(this,Or,a),fe(this,Pr,String(i))}get name(){return k(this,Pr)}get lastModified(){return k(this,Or)}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](t){return!!t&&t instanceof He&&/^(File)$/.test(t[Symbol.toStringTag])}},Or=new WeakMap,Pr=new WeakMap,va),nd=rd,Mt=nd});function Ca(r,e=He){var t=`${Aa()}${Aa()}`.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+ts(u)+`"\r
5
5
  \r
6
6
  ${a.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
7
7
  `)}\r
8
- `):s.push(o+Qs(u)+`"; filename="${Qs(a.name,1)}"\r
8
+ `):i.push(o+ts(u)+`"; filename="${ts(a.name,1)}"\r
9
9
  Content-Type: ${a.type||"application/octet-stream"}\r
10
10
  \r
11
11
  `,a,`\r
12
- `)),s.push(`--${t}--`),new e(s,{type:"multipart/form-data; boundary="+t})}var Pr,Jh,Kh,_a,ed,Ea,Qs,bt,Re,Ra,yt,On=Er(()=>{Ar();Xs();({toStringTag:Pr,iterator:Jh,hasInstance:Kh}=Symbol),_a=Math.random,ed="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),Ea=(r,e,t)=>(r+="",/^(Blob|File)$/.test(e&&e[Pr])?[(t=t!==void 0?t+"":e[Pr]=="File"?e.name:"blob",r),e.name!==t||e[Pr]=="blob"?new kt([e],t,e):e]:[r,e+""]),Qs=(r,e)=>(e?r:r.replace(/\r?\n|\r/g,`\r
13
- `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),bt=(r,e,t)=>{if(e.length<t)throw new TypeError(`Failed to execute '${r}' on 'FormData': ${t} arguments required, but only ${e.length} present.`)},yt=(Ra=class{constructor(...e){oe(this,Re,[]);if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Pr](){return"FormData"}[Jh](){return this.entries()}static[Kh](e){return e&&typeof e=="object"&&e[Pr]==="FormData"&&!ed.some(t=>typeof e[t]!="function")}append(...e){bt("append",arguments,2),F(this,Re).push(Ea(...e))}delete(e){bt("delete",arguments,1),e+="",fe(this,Re,F(this,Re).filter(([t])=>t!==e))}get(e){bt("get",arguments,1),e+="";for(var t=F(this,Re),s=t.length,o=0;o<s;o++)if(t[o][0]===e)return t[o][1];return null}getAll(e,t){return bt("getAll",arguments,1),t=[],e+="",F(this,Re).forEach(s=>s[0]===e&&t.push(s[1])),t}has(e){return bt("has",arguments,1),e+="",F(this,Re).some(t=>t[0]===e)}forEach(e,t){bt("forEach",arguments,1);for(var[s,o]of this)e.call(t,o,s,this)}set(...e){bt("set",arguments,2);var t=[],s=!0;e=Ea(...e),F(this,Re).forEach(o=>{o[0]===e[0]?s&&(s=!t.push(e)):t.push(o)}),s&&t.push(e),fe(this,Re,t)}*entries(){yield*F(this,Re)}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}},Re=new WeakMap,Ra)});var Pa=$((oy,Ca)=>{if(!globalThis.DOMException)try{let{MessageChannel:r}=we("worker_threads"),e=new r().port1,t=new ArrayBuffer;e.postMessage(t,[t,t])}catch(r){r.constructor.name==="DOMException"&&(globalThis.DOMException=r.constructor)}Ca.exports=globalThis.DOMException});import{statSync as ly,createReadStream as td,promises as rd}from"fs";var Ia,nd,St,wt,Js,Oa,Ks=Er(()=>{Ia=xe(Pa(),1);Xs();Ar();({stat:nd}=rd),Js=class{constructor(e){oe(this,St,void 0);oe(this,wt,void 0);fe(this,St,e.path),fe(this,wt,e.start),this.size=e.size,this.lastModified=e.lastModified}slice(e,t){return new Js({path:F(this,St),lastModified:this.lastModified,size:t-e,start:F(this,wt)+e})}async*stream(){let{mtimeMs:e}=await nd(F(this,St));if(e>this.lastModified)throw new Ia.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*td(F(this,St),{start:F(this,wt),end:F(this,wt)+this.size-1})}get[Symbol.toStringTag](){return"Blob"}},Oa=Js;St=new WeakMap,wt=new WeakMap});var La={};Nh(La,{toFormData:()=>cd});function ud(r){let e=r.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let t=e[2]||e[3]||"",s=t.slice(t.lastIndexOf("\\")+1);return s=s.replace(/%22/g,'"'),s=s.replace(/&#(\d{4});/g,(o,a)=>String.fromCharCode(a)),s}async function cd(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 s=new ei(t[1]||t[2]),o,a,u,d,f,h,g=[],y=new yt,b=R=>{u+=_.decode(R,{stream:!0})},p=R=>{g.push(R)},S=()=>{let R=new kt(g,h,{type:f});y.append(d,R)},v=()=>{y.append(d,u)},_=new TextDecoder("utf-8");_.decode(),s.onPartBegin=function(){s.onPartData=b,s.onPartEnd=v,o="",a="",u="",d="",f="",h=null,g.length=0},s.onHeaderField=function(R){o+=_.decode(R,{stream:!0})},s.onHeaderValue=function(R){a+=_.decode(R,{stream:!0})},s.onHeaderEnd=function(){if(a+=_.decode(),o=o.toLowerCase(),o==="content-disposition"){let R=a.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);R&&(d=R[2]||R[3]||""),h=ud(a),h&&(s.onPartData=p,s.onPartEnd=S)}else o==="content-type"&&(f=a);a="",o=""};for await(let R of r)s.write(R);return s.end(),y}var Ne,H,xa,it,xn,Ln,sd,Ir,id,od,ad,ld,_t,ei,qa=Er(()=>{Ks();On();Ne=0,H={START_BOUNDARY:Ne++,HEADER_FIELD_START:Ne++,HEADER_FIELD:Ne++,HEADER_VALUE_START:Ne++,HEADER_VALUE:Ne++,HEADER_VALUE_ALMOST_DONE:Ne++,HEADERS_ALMOST_DONE:Ne++,PART_DATA_START:Ne++,PART_DATA:Ne++,END:Ne++},xa=1,it={PART_BOUNDARY:xa,LAST_BOUNDARY:xa*=2},xn=10,Ln=13,sd=32,Ir=45,id=58,od=97,ad=122,ld=r=>r|32,_t=()=>{},ei=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=_t,this.onHeaderField=_t,this.onHeadersEnd=_t,this.onHeaderValue=_t,this.onPartBegin=_t,this.onPartData=_t,this.onPartEnd=_t,this.boundaryChars={},e=`\r
14
- --`+e;let t=new Uint8Array(e.length);for(let s=0;s<e.length;s++)t[s]=e.charCodeAt(s),this.boundaryChars[t[s]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=H.START_BOUNDARY}write(e){let t=0,s=e.length,o=this.index,{lookbehind:a,boundary:u,boundaryChars:d,index:f,state:h,flags:g}=this,y=this.boundary.length,b=y-1,p=e.length,S,v,_=T=>{this[T+"Mark"]=t},R=T=>{delete this[T+"Mark"]},O=(T,q,D,x)=>{(q===void 0||q!==D)&&this[T](x&&x.subarray(q,D))},B=(T,q)=>{let D=T+"Mark";D in this&&(q?(O(T,this[D],t,e),delete this[D]):(O(T,this[D],e.length,e),this[D]=0))};for(t=0;t<s;t++)switch(S=e[t],h){case H.START_BOUNDARY:if(f===u.length-2){if(S===Ir)g|=it.LAST_BOUNDARY;else if(S!==Ln)return;f++;break}else if(f-1===u.length-2){if(g&it.LAST_BOUNDARY&&S===Ir)h=H.END,g=0;else if(!(g&it.LAST_BOUNDARY)&&S===xn)f=0,O("onPartBegin"),h=H.HEADER_FIELD_START;else return;break}S!==u[f+2]&&(f=-2),S===u[f+2]&&f++;break;case H.HEADER_FIELD_START:h=H.HEADER_FIELD,_("onHeaderField"),f=0;case H.HEADER_FIELD:if(S===Ln){R("onHeaderField"),h=H.HEADERS_ALMOST_DONE;break}if(f++,S===Ir)break;if(S===id){if(f===1)return;B("onHeaderField",!0),h=H.HEADER_VALUE_START;break}if(v=ld(S),v<od||v>ad)return;break;case H.HEADER_VALUE_START:if(S===sd)break;_("onHeaderValue"),h=H.HEADER_VALUE;case H.HEADER_VALUE:S===Ln&&(B("onHeaderValue",!0),O("onHeaderEnd"),h=H.HEADER_VALUE_ALMOST_DONE);break;case H.HEADER_VALUE_ALMOST_DONE:if(S!==xn)return;h=H.HEADER_FIELD_START;break;case H.HEADERS_ALMOST_DONE:if(S!==xn)return;O("onHeadersEnd"),h=H.PART_DATA_START;break;case H.PART_DATA_START:h=H.PART_DATA,_("onPartData");case H.PART_DATA:if(o=f,f===0){for(t+=b;t<p&&!(e[t]in d);)t+=y;t-=b,S=e[t]}if(f<u.length)u[f]===S?(f===0&&B("onPartData",!0),f++):f=0;else if(f===u.length)f++,S===Ln?g|=it.PART_BOUNDARY:S===Ir?g|=it.LAST_BOUNDARY:f=0;else if(f-1===u.length)if(g&it.PART_BOUNDARY){if(f=0,S===xn){g&=~it.PART_BOUNDARY,O("onPartEnd"),O("onPartBegin"),h=H.HEADER_FIELD_START;break}}else g&it.LAST_BOUNDARY&&S===Ir?(O("onPartEnd"),h=H.END,g=0):f=0;if(f>0)a[f-1]=S;else if(o>0){let T=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);O("onPartData",0,o,T),o=0,_("onPartData"),t--}break;case H.END:break;default:throw new Error(`Unexpected state entered: ${h}`)}B("onHeaderField"),B("onHeaderValue"),B("onPartData"),this.index=f,this.state=h,this.flags=g}end(){if(this.state===H.HEADER_FIELD_START&&this.index===0||this.state===H.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==H.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var Ja=$((dS,Za)=>{function vd(r){return Buffer.from(r,"base64").toString("utf8")}function Td(r){return Buffer.from(r,"utf8").toString("base64")}Za.exports={decodeBase64:vd,encodeBase64:Td}});var rl=$(Et=>{Et.parse=Et.decode=Ad;Et.stringify=Et.encode=Ka;Et.safe=Gt;Et.unsafe=kn;var si=typeof process<"u"&&process.platform==="win32"?`\r
12
+ `)),i.push(`--${t}--`),new e(i,{type:"multipart/form-data; boundary="+t})}var Ir,id,sd,Aa,od,Ta,ts,yt,Re,$a,St,Dn=vr(()=>{Cr();es();({toStringTag:Ir,iterator:id,hasInstance:sd}=Symbol),Aa=Math.random,od="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),Ta=(r,e,t)=>(r+="",/^(Blob|File)$/.test(e&&e[Ir])?[(t=t!==void 0?t+"":e[Ir]=="File"?e.name:"blob",r),e.name!==t||e[Ir]=="blob"?new Mt([e],t,e):e]:[r,e+""]),ts=(r,e)=>(e?r:r.replace(/\r?\n|\r/g,`\r
13
+ `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),yt=(r,e,t)=>{if(e.length<t)throw new TypeError(`Failed to execute '${r}' on 'FormData': ${t} arguments required, but only ${e.length} present.`)},St=($a=class{constructor(...e){ie(this,Re,[]);if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Ir](){return"FormData"}[id](){return this.entries()}static[sd](e){return e&&typeof e=="object"&&e[Ir]==="FormData"&&!od.some(t=>typeof e[t]!="function")}append(...e){yt("append",arguments,2),k(this,Re).push(Ta(...e))}delete(e){yt("delete",arguments,1),e+="",fe(this,Re,k(this,Re).filter(([t])=>t!==e))}get(e){yt("get",arguments,1),e+="";for(var t=k(this,Re),i=t.length,o=0;o<i;o++)if(t[o][0]===e)return t[o][1];return null}getAll(e,t){return yt("getAll",arguments,1),t=[],e+="",k(this,Re).forEach(i=>i[0]===e&&t.push(i[1])),t}has(e){return yt("has",arguments,1),e+="",k(this,Re).some(t=>t[0]===e)}forEach(e,t){yt("forEach",arguments,1);for(var[i,o]of this)e.call(t,o,i,this)}set(...e){yt("set",arguments,2);var t=[],i=!0;e=Ta(...e),k(this,Re).forEach(o=>{o[0]===e[0]?i&&(i=!t.push(e)):t.push(o)}),i&&t.push(e),fe(this,Re,t)}*entries(){yield*k(this,Re)}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}},Re=new WeakMap,$a)});var xa=T((hy,La)=>{if(!globalThis.DOMException)try{let{MessageChannel:r}=_e("worker_threads"),e=new r().port1,t=new ArrayBuffer;e.postMessage(t,[t,t])}catch(r){r.constructor.name==="DOMException"&&(globalThis.DOMException=r.constructor)}La.exports=globalThis.DOMException});import{statSync as py,createReadStream as ad,promises as ld}from"fs";var Da,ud,_t,wt,ns,qa,is=vr(()=>{Da=Le(xa(),1);es();Cr();({stat:ud}=ld),ns=class{constructor(e){ie(this,_t,void 0);ie(this,wt,void 0);fe(this,_t,e.path),fe(this,wt,e.start),this.size=e.size,this.lastModified=e.lastModified}slice(e,t){return new ns({path:k(this,_t),lastModified:this.lastModified,size:t-e,start:k(this,wt)+e})}async*stream(){let{mtimeMs:e}=await ud(k(this,_t));if(e>this.lastModified)throw new Da.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*ad(k(this,_t),{start:k(this,wt),end:k(this,wt)+this.size-1})}get[Symbol.toStringTag](){return"Blob"}},qa=ns;_t=new WeakMap,wt=new WeakMap});var Fa={};Uh(Fa,{toFormData:()=>gd});function md(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 gd(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 ss(t[1]||t[2]),o,a,u,h,d,f,m=[],y=new St,g=v=>{u+=_.decode(v,{stream:!0})},p=v=>{m.push(v)},S=()=>{let v=new Mt(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=md(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 Be,Y,Ba,it,Fn,Nn,cd,xr,fd,hd,dd,pd,Et,ss,Na=vr(()=>{is();Dn();Be=0,Y={START_BOUNDARY:Be++,HEADER_FIELD_START:Be++,HEADER_FIELD:Be++,HEADER_VALUE_START:Be++,HEADER_VALUE:Be++,HEADER_VALUE_ALMOST_DONE:Be++,HEADERS_ALMOST_DONE:Be++,PART_DATA_START:Be++,PART_DATA:Be++,END:Be++},Ba=1,it={PART_BOUNDARY:Ba,LAST_BOUNDARY:Ba*=2},Fn=10,Nn=13,cd=32,xr=45,fd=58,hd=97,dd=122,pd=r=>r|32,Et=()=>{},ss=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=Et,this.onHeaderField=Et,this.onHeadersEnd=Et,this.onHeaderValue=Et,this.onPartBegin=Et,this.onPartData=Et,this.onPartEnd=Et,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=Y.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 Y.START_BOUNDARY:if(d===u.length-2){if(S===xr)m|=it.LAST_BOUNDARY;else if(S!==Nn)return;d++;break}else if(d-1===u.length-2){if(m&it.LAST_BOUNDARY&&S===xr)f=Y.END,m=0;else if(!(m&it.LAST_BOUNDARY)&&S===Fn)d=0,P("onPartBegin"),f=Y.HEADER_FIELD_START;else return;break}S!==u[d+2]&&(d=-2),S===u[d+2]&&d++;break;case Y.HEADER_FIELD_START:f=Y.HEADER_FIELD,_("onHeaderField"),d=0;case Y.HEADER_FIELD:if(S===Nn){v("onHeaderField"),f=Y.HEADERS_ALMOST_DONE;break}if(d++,S===xr)break;if(S===fd){if(d===1)return;D("onHeaderField",!0),f=Y.HEADER_VALUE_START;break}if(R=pd(S),R<hd||R>dd)return;break;case Y.HEADER_VALUE_START:if(S===cd)break;_("onHeaderValue"),f=Y.HEADER_VALUE;case Y.HEADER_VALUE:S===Nn&&(D("onHeaderValue",!0),P("onHeaderEnd"),f=Y.HEADER_VALUE_ALMOST_DONE);break;case Y.HEADER_VALUE_ALMOST_DONE:if(S!==Fn)return;f=Y.HEADER_FIELD_START;break;case Y.HEADERS_ALMOST_DONE:if(S!==Fn)return;P("onHeadersEnd"),f=Y.PART_DATA_START;break;case Y.PART_DATA_START:f=Y.PART_DATA,_("onPartData");case Y.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===Nn?m|=it.PART_BOUNDARY:S===xr?m|=it.LAST_BOUNDARY:d=0;else if(d-1===u.length)if(m&it.PART_BOUNDARY){if(d=0,S===Fn){m&=~it.PART_BOUNDARY,P("onPartEnd"),P("onPartBegin"),f=Y.HEADER_FIELD_START;break}}else m&it.LAST_BOUNDARY&&S===xr?(P("onPartEnd"),f=Y.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 Y.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===Y.HEADER_FIELD_START&&this.index===0||this.state===Y.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==Y.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var rl=T((SS,tl)=>{function Pd(r){return Buffer.from(r,"base64").toString("utf8")}function Id(r){return Buffer.from(r,"utf8").toString("base64")}tl.exports={decodeBase64:Pd,encodeBase64:Id}});var ol=T(Rt=>{Rt.parse=Rt.decode=Ld;Rt.stringify=Rt.encode=nl;Rt.safe=Xt;Rt.unsafe=Gn;var us=typeof process<"u"&&process.platform==="win32"?`\r
15
15
  `:`
16
- `;function Ka(r,e){var t=[],s="";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,d){var f=r[a];f&&Array.isArray(f)?f.forEach(function(h){s+=Gt(a+"[]")+o+Gt(h)+`
17
- `}):f&&typeof f=="object"?t.push(a):s+=Gt(a)+o+Gt(f)+si}),e.section&&s.length&&(s="["+Gt(e.section)+"]"+si+s),t.forEach(function(a,u,d){var f=el(a).join("\\."),h=(e.section?e.section+".":"")+f,g=Ka(r[a],{section:h,whitespace:e.whitespace});s.length&&g.length&&(s+=si),s+=g}),s}function el(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 Ad(r){var e={},t=e,s=null,o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,a=r.split(/[\r\n]+/g);return a.forEach(function(u,d,f){if(!(!u||u.match(/^\s*[;#]/))){var h=u.match(o);if(h){if(h[1]!==void 0){if(s=kn(h[1]),s==="__proto__"){t={};return}t=e[s]=e[s]||{};return}var g=kn(h[2]);if(g!=="__proto__"){var y=h[3]?kn(h[4]):!0;switch(y){case"true":case"false":case"null":y=JSON.parse(y)}if(g.length>2&&g.slice(-2)==="[]"){if(g=g.substring(0,g.length-2),g==="__proto__")return;t[g]?Array.isArray(t[g])||(t[g]=[t[g]]):t[g]=[]}Array.isArray(t[g])?t[g].push(y):t[g]=y}}}}),Object.keys(e).filter(function(u,d,f){if(!e[u]||typeof e[u]!="object"||Array.isArray(e[u]))return!1;var h=el(u),g=e,y=h.pop(),b=y.replace(/\\\./g,".");return h.forEach(function(p,S,v){p!=="__proto__"&&((!g[p]||typeof g[p]!="object")&&(g[p]={}),g=g[p])}),g===e&&b===y?!1:(g[b]=e[u],!0)}).forEach(function(u,d,f){delete e[u]}),e}function tl(r){return r.charAt(0)==='"'&&r.slice(-1)==='"'||r.charAt(0)==="'"&&r.slice(-1)==="'"}function Gt(r){return typeof r!="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&tl(r)||r!==r.trim()?JSON.stringify(r):r.replace(/;/g,"\\;").replace(/#/g,"\\#")}function kn(r,e){if(r=(r||"").trim(),tl(r)){r.charAt(0)==="'"&&(r=r.substr(1,r.length-2));try{r=JSON.parse(r)}catch{}}else{for(var t=!1,s="",o=0,a=r.length;o<a;o++){var u=r.charAt(o);if(t)"\\;#".indexOf(u)!==-1?s+=u:s+="\\"+u,t=!1;else{if(";#".indexOf(u)!==-1)break;u==="\\"?t=!0:s+=u}}return t&&(s+="\\"),s.trim()}return r}});var il=$((mS,sl)=>{"use strict";var ii=1,nl=2;function $d(){return""}function Cd(r,e,t){return r.slice(e,t).replace(/\S/g," ")}sl.exports=function(r,e){e=e||{};for(var t,s,o=!1,a=!1,u=0,d="",f=e.whitespace===!1?$d:Cd,h=0;h<r.length;h++){if(t=r[h],s=r[h+1],!a&&t==='"'){var g=r[h-1]==="\\"&&r[h-2]!=="\\";g||(o=!o)}if(!o){if(!a&&t+s==="//")d+=r.slice(u,h),u=h,a=ii,h++;else if(a===ii&&t+s===`\r
18
- `){h++,a=!1,d+=f(r,u,h),u=h;continue}else if(a===ii&&t===`
19
- `)a=!1,d+=f(r,u,h),u=h;else if(!a&&t+s==="/*"){d+=r.slice(u,h),u=h,a=nl,h++;continue}else if(a===nl&&t+s==="*/"){h++,a=!1,d+=f(r,u,h+1),u=h+1;continue}}}return d+(a?f(r.substr(u)):r.substr(u))}});var al=$(Vt=>{"use strict";var ol=we("fs"),Pd=rl(),Lr=we("path"),Od=il(),Id=Vt.parse=function(r){return/^\s*{/.test(r)?JSON.parse(Od(r)):Pd.parse(r)},xd=Vt.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=Lr.join.apply(null,r),s;try{return ol.readFileSync(t,"utf-8")}catch{return}},gS=Vt.json=function(){var r=xd.apply(null,arguments);return r?Id(r):null},bS=Vt.env=function(r,e){e=e||process.env;var t={},s=r.length;for(var o in e)if(o.toLowerCase().indexOf(r.toLowerCase())===0){for(var a=o.substring(s).split("__"),u;(u=a.indexOf(""))>-1;)a.splice(u,1);var d=t;a.forEach(function(h,g){!h||typeof d!="object"||(g===a.length-1&&(d[h]=e[o]),d[h]===void 0&&(d[h]={}),d=d[h])})}return t},yS=Vt.find=function(){var r=Lr.join.apply(null,[].slice.call(arguments));function e(t,s){var o=Lr.join(t,s);try{return ol.statSync(o),o}catch{if(Lr.dirname(t)!==t)return e(Lr.dirname(t),s)}}return e(process.cwd(),r)}});var dl=$((wS,hl)=>{"use strict";function ul(r){return r instanceof Buffer||r instanceof Date||r instanceof RegExp}function cl(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 fl(r){var e=[];return r.forEach(function(t,s){typeof t=="object"&&t!==null?Array.isArray(t)?e[s]=fl(t):ul(t)?e[s]=cl(t):e[s]=oi({},t):e[s]=t}),e}function ll(r,e){return e==="__proto__"?void 0:r[e]}var oi=hl.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,s,o;return e.forEach(function(a){typeof a!="object"||a===null||Array.isArray(a)||Object.keys(a).forEach(function(u){if(s=ll(r,u),t=ll(a,u),t!==r)if(typeof t!="object"||t===null){r[u]=t;return}else if(Array.isArray(t)){r[u]=fl(t);return}else if(ul(t)){r[u]=cl(t);return}else if(typeof s!="object"||s===null||Array.isArray(s)){r[u]=oi({},t);return}else{r[u]=oi(s,t);return}})}),r}});var jn=$((_S,gl)=>{var qr=al(),Yt=we("path").join,Ld=dl(),pl="/etc",ml=process.platform==="win32",Dr=ml?process.env.USERPROFILE:process.env.HOME;gl.exports=function(r,e,t,s){if(typeof r!="string")throw new Error("rc(name): name *must* be string");t||(t=Vs()(process.argv.slice(2))),e=(typeof e=="string"?qr.json(e):e)||{},s=s||qr.parse;var o=qr.env(r+"_"),a=[e],u=[];function d(f){if(!(u.indexOf(f)>=0)){var h=qr.file(f);h&&(a.push(s(h)),u.push(f))}}return ml||[Yt(pl,r,"config"),Yt(pl,r+"rc")].forEach(d),Dr&&[Yt(Dr,".config",r,"config"),Yt(Dr,".config",r),Yt(Dr,"."+r,"config"),Yt(Dr,"."+r+"rc")].forEach(d),d(qr.find("."+r+"rc")),o.config&&d(o.config),t.config&&d(t.config),Ld.apply(null,a.concat([o,t,u.length?{configs:u,config:u[u.length-1]}:void 0]))}});var vl=$((ES,Rl)=>{var ai=we("url"),_l=Ja(),qd=_l.decodeBase64,Dd=_l.encodeBase64,bl=":_authToken",yl=":_auth",Sl=":username",wl=":_password";Rl.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||jn()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),r=r||e.npmrc.registry,El(r,e)||Bd(e.npmrc)};function El(r,e){for(var t=ai.parse(r,!1,!0),s;s!=="/"&&t.pathname!==s;){s=t.pathname||"/";var o="//"+t.host+s.replace(/\/$/,""),a=zd(o,e.npmrc);if(a)return a;if(!e.recursive)return/\/$/.test(r)?void 0:El(ai.resolve(r,"."),e);t.pathname=ai.resolve(Nd(s),"..")||"/"}}function Bd(r){if(r._auth){var e=Un(r._auth);return{token:e,type:"Basic"}}}function Nd(r){return r[r.length-1]==="/"?r:r+"/"}function zd(r,e){var t=Fd(e[r+bl]||e[r+"/"+bl]);if(t)return t;var s=e[r+Sl]||e[r+"/"+Sl],o=e[r+wl]||e[r+"/"+wl],a=Wd(s,o);if(a)return a;var u=kd(e[r+yl]||e[r+"/"+yl]);if(u)return u}function Un(r){return r.replace(/^\$\{?([^}]*)\}?$/,function(e,t){return process.env[t]})}function Fd(r){if(r){var e=Un(r);return{token:e,type:"Bearer"}}}function Wd(r,e){if(!(!r||!e)){var t=qd(Un(e)),s=Dd(r+":"+t);return{token:s,type:"Basic",password:t,username:r}}}function kd(r){if(r){var e=Un(r);return{token:e,type:"Basic"}}}});var Al=$((RS,Tl)=>{Tl.exports=function(r,e){var t=e||jn()("npm",{registry:"https://registry.npmjs.org/"}),s=t[r+":registry"]||t.registry;return s.slice(-1)==="/"?s:s+"/"}});var Br=$((vS,$l)=>{var jd="2.0.0",Ud=Number.MAX_SAFE_INTEGER||9007199254740991,Md=16;$l.exports={SEMVER_SPEC_VERSION:jd,MAX_LENGTH:256,MAX_SAFE_INTEGER:Ud,MAX_SAFE_COMPONENT_LENGTH:Md}});var Nr=$((TS,Cl)=>{var Hd=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Cl.exports=Hd});var Rt=$((at,Pl)=>{var{MAX_SAFE_COMPONENT_LENGTH:li}=Br(),Gd=Nr();at=Pl.exports={};var Vd=at.re=[],C=at.src=[],P=at.t={},Yd=0,N=(r,e,t)=>{let s=Yd++;Gd(r,s,e),P[r]=s,C[s]=e,Vd[s]=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[P.NUMERICIDENTIFIER]})\\.(${C[P.NUMERICIDENTIFIER]})\\.(${C[P.NUMERICIDENTIFIER]})`);N("MAINVERSIONLOOSE",`(${C[P.NUMERICIDENTIFIERLOOSE]})\\.(${C[P.NUMERICIDENTIFIERLOOSE]})\\.(${C[P.NUMERICIDENTIFIERLOOSE]})`);N("PRERELEASEIDENTIFIER",`(?:${C[P.NUMERICIDENTIFIER]}|${C[P.NONNUMERICIDENTIFIER]})`);N("PRERELEASEIDENTIFIERLOOSE",`(?:${C[P.NUMERICIDENTIFIERLOOSE]}|${C[P.NONNUMERICIDENTIFIER]})`);N("PRERELEASE",`(?:-(${C[P.PRERELEASEIDENTIFIER]}(?:\\.${C[P.PRERELEASEIDENTIFIER]})*))`);N("PRERELEASELOOSE",`(?:-?(${C[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[P.PRERELEASEIDENTIFIERLOOSE]})*))`);N("BUILDIDENTIFIER","[0-9A-Za-z-]+");N("BUILD",`(?:\\+(${C[P.BUILDIDENTIFIER]}(?:\\.${C[P.BUILDIDENTIFIER]})*))`);N("FULLPLAIN",`v?${C[P.MAINVERSION]}${C[P.PRERELEASE]}?${C[P.BUILD]}?`);N("FULL",`^${C[P.FULLPLAIN]}$`);N("LOOSEPLAIN",`[v=\\s]*${C[P.MAINVERSIONLOOSE]}${C[P.PRERELEASELOOSE]}?${C[P.BUILD]}?`);N("LOOSE",`^${C[P.LOOSEPLAIN]}$`);N("GTLT","((?:<|>)?=?)");N("XRANGEIDENTIFIERLOOSE",`${C[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);N("XRANGEIDENTIFIER",`${C[P.NUMERICIDENTIFIER]}|x|X|\\*`);N("XRANGEPLAIN",`[v=\\s]*(${C[P.XRANGEIDENTIFIER]})(?:\\.(${C[P.XRANGEIDENTIFIER]})(?:\\.(${C[P.XRANGEIDENTIFIER]})(?:${C[P.PRERELEASE]})?${C[P.BUILD]}?)?)?`);N("XRANGEPLAINLOOSE",`[v=\\s]*(${C[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[P.XRANGEIDENTIFIERLOOSE]})(?:${C[P.PRERELEASELOOSE]})?${C[P.BUILD]}?)?)?`);N("XRANGE",`^${C[P.GTLT]}\\s*${C[P.XRANGEPLAIN]}$`);N("XRANGELOOSE",`^${C[P.GTLT]}\\s*${C[P.XRANGEPLAINLOOSE]}$`);N("COERCE",`(^|[^\\d])(\\d{1,${li}})(?:\\.(\\d{1,${li}}))?(?:\\.(\\d{1,${li}}))?(?:$|[^\\d])`);N("COERCERTL",C[P.COERCE],!0);N("LONETILDE","(?:~>?)");N("TILDETRIM",`(\\s*)${C[P.LONETILDE]}\\s+`,!0);at.tildeTrimReplace="$1~";N("TILDE",`^${C[P.LONETILDE]}${C[P.XRANGEPLAIN]}$`);N("TILDELOOSE",`^${C[P.LONETILDE]}${C[P.XRANGEPLAINLOOSE]}$`);N("LONECARET","(?:\\^)");N("CARETTRIM",`(\\s*)${C[P.LONECARET]}\\s+`,!0);at.caretTrimReplace="$1^";N("CARET",`^${C[P.LONECARET]}${C[P.XRANGEPLAIN]}$`);N("CARETLOOSE",`^${C[P.LONECARET]}${C[P.XRANGEPLAINLOOSE]}$`);N("COMPARATORLOOSE",`^${C[P.GTLT]}\\s*(${C[P.LOOSEPLAIN]})$|^$`);N("COMPARATOR",`^${C[P.GTLT]}\\s*(${C[P.FULLPLAIN]})$|^$`);N("COMPARATORTRIM",`(\\s*)${C[P.GTLT]}\\s*(${C[P.LOOSEPLAIN]}|${C[P.XRANGEPLAIN]})`,!0);at.comparatorTrimReplace="$1$2$3";N("HYPHENRANGE",`^\\s*(${C[P.XRANGEPLAIN]})\\s+-\\s+(${C[P.XRANGEPLAIN]})\\s*$`);N("HYPHENRANGELOOSE",`^\\s*(${C[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[P.XRANGEPLAINLOOSE]})\\s*$`);N("STAR","(<|>)?=?\\s*\\*");N("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");N("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var zr=$((AS,Ol)=>{var Xd=["includePrerelease","loose","rtl"],Qd=r=>r?typeof r!="object"?{loose:!0}:Xd.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};Ol.exports=Qd});var ui=$(($S,Ll)=>{var Il=/^[0-9]+$/,xl=(r,e)=>{let t=Il.test(r),s=Il.test(e);return t&&s&&(r=+r,e=+e),r===e?0:t&&!s?-1:s&&!t?1:r<e?-1:1},Zd=(r,e)=>xl(e,r);Ll.exports={compareIdentifiers:xl,rcompareIdentifiers:Zd}});var ce=$((CS,Nl)=>{var Mn=Nr(),{MAX_LENGTH:ql,MAX_SAFE_INTEGER:Hn}=Br(),{re:Dl,t:Bl}=Rt(),Jd=zr(),{compareIdentifiers:Xt}=ui(),_e=class{constructor(e,t){if(t=Jd(t),e instanceof _e){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>ql)throw new TypeError(`version is longer than ${ql} characters`);Mn("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let s=e.trim().match(t.loose?Dl[Bl.LOOSE]:Dl[Bl.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>Hn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Hn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Hn||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let a=+o;if(a>=0&&a<Hn)return a}return o}):this.prerelease=[],this.build=s[5]?s[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(Mn("SemVer.compare",this.version,this.options,e),!(e instanceof _e)){if(typeof e=="string"&&e===this.version)return 0;e=new _e(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof _e||(e=new _e(e,this.options)),Xt(this.major,e.major)||Xt(this.minor,e.minor)||Xt(this.patch,e.patch)}comparePre(e){if(e instanceof _e||(e=new _e(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 s=this.prerelease[t],o=e.prerelease[t];if(Mn("prerelease compare",t,s,o),s===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(s===void 0)return-1;if(s===o)continue;return Xt(s,o)}while(++t)}compareBuild(e){e instanceof _e||(e=new _e(e,this.options));let t=0;do{let s=this.build[t],o=e.build[t];if(Mn("prerelease compare",t,s,o),s===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(s===void 0)return-1;if(s===o)continue;return Xt(s,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 s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);s===-1&&this.prerelease.push(0)}t&&(Xt(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}};Nl.exports=_e});var vt=$((PS,kl)=>{var{MAX_LENGTH:Kd}=Br(),{re:zl,t:Fl}=Rt(),Wl=ce(),ep=zr(),tp=(r,e)=>{if(e=ep(e),r instanceof Wl)return r;if(typeof r!="string"||r.length>Kd||!(e.loose?zl[Fl.LOOSE]:zl[Fl.FULL]).test(r))return null;try{return new Wl(r,e)}catch{return null}};kl.exports=tp});var Ul=$((OS,jl)=>{var rp=vt(),np=(r,e)=>{let t=rp(r,e);return t?t.version:null};jl.exports=np});var Hl=$((IS,Ml)=>{var sp=vt(),ip=(r,e)=>{let t=sp(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Ml.exports=ip});var Yl=$((xS,Vl)=>{var Gl=ce(),op=(r,e,t,s)=>{typeof t=="string"&&(s=t,t=void 0);try{return new Gl(r instanceof Gl?r.version:r,t).inc(e,s).version}catch{return null}};Vl.exports=op});var Te=$((LS,Ql)=>{var Xl=ce(),ap=(r,e,t)=>new Xl(r,t).compare(new Xl(e,t));Ql.exports=ap});var Gn=$((qS,Zl)=>{var lp=Te(),up=(r,e,t)=>lp(r,e,t)===0;Zl.exports=up});var eu=$((DS,Kl)=>{var Jl=vt(),cp=Gn(),fp=(r,e)=>{if(cp(r,e))return null;{let t=Jl(r),s=Jl(e),o=t.prerelease.length||s.prerelease.length,a=o?"pre":"",u=o?"prerelease":"";for(let d in t)if((d==="major"||d==="minor"||d==="patch")&&t[d]!==s[d])return a+d;return u}};Kl.exports=fp});var ru=$((BS,tu)=>{var hp=ce(),dp=(r,e)=>new hp(r,e).major;tu.exports=dp});var su=$((NS,nu)=>{var pp=ce(),mp=(r,e)=>new pp(r,e).minor;nu.exports=mp});var ou=$((zS,iu)=>{var gp=ce(),bp=(r,e)=>new gp(r,e).patch;iu.exports=bp});var lu=$((FS,au)=>{var yp=vt(),Sp=(r,e)=>{let t=yp(r,e);return t&&t.prerelease.length?t.prerelease:null};au.exports=Sp});var cu=$((WS,uu)=>{var wp=Te(),_p=(r,e,t)=>wp(e,r,t);uu.exports=_p});var hu=$((kS,fu)=>{var Ep=Te(),Rp=(r,e)=>Ep(r,e,!0);fu.exports=Rp});var Vn=$((jS,pu)=>{var du=ce(),vp=(r,e,t)=>{let s=new du(r,t),o=new du(e,t);return s.compare(o)||s.compareBuild(o)};pu.exports=vp});var gu=$((US,mu)=>{var Tp=Vn(),Ap=(r,e)=>r.sort((t,s)=>Tp(t,s,e));mu.exports=Ap});var yu=$((MS,bu)=>{var $p=Vn(),Cp=(r,e)=>r.sort((t,s)=>$p(s,t,e));bu.exports=Cp});var Fr=$((HS,Su)=>{var Pp=Te(),Op=(r,e,t)=>Pp(r,e,t)>0;Su.exports=Op});var Yn=$((GS,wu)=>{var Ip=Te(),xp=(r,e,t)=>Ip(r,e,t)<0;wu.exports=xp});var ci=$((VS,_u)=>{var Lp=Te(),qp=(r,e,t)=>Lp(r,e,t)!==0;_u.exports=qp});var Xn=$((YS,Eu)=>{var Dp=Te(),Bp=(r,e,t)=>Dp(r,e,t)>=0;Eu.exports=Bp});var Qn=$((XS,Ru)=>{var Np=Te(),zp=(r,e,t)=>Np(r,e,t)<=0;Ru.exports=zp});var fi=$((QS,vu)=>{var Fp=Gn(),Wp=ci(),kp=Fr(),jp=Xn(),Up=Yn(),Mp=Qn(),Hp=(r,e,t,s)=>{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 Fp(r,t,s);case"!=":return Wp(r,t,s);case">":return kp(r,t,s);case">=":return jp(r,t,s);case"<":return Up(r,t,s);case"<=":return Mp(r,t,s);default:throw new TypeError(`Invalid operator: ${e}`)}};vu.exports=Hp});var Au=$((ZS,Tu)=>{var Gp=ce(),Vp=vt(),{re:Zn,t:Jn}=Rt(),Yp=(r,e)=>{if(r instanceof Gp)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(Zn[Jn.COERCE]);else{let s;for(;(s=Zn[Jn.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||s.index+s[0].length!==t.index+t[0].length)&&(t=s),Zn[Jn.COERCERTL].lastIndex=s.index+s[1].length+s[2].length;Zn[Jn.COERCERTL].lastIndex=-1}return t===null?null:Vp(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};Tu.exports=Yp});var Cu=$((JS,$u)=>{"use strict";$u.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Ou=$((KS,Pu)=>{"use strict";Pu.exports=k;k.Node=Tt;k.create=k;function k(r){var e=this;if(e instanceof k||(e=new k),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,s=arguments.length;t<s;t++)e.push(arguments[t]);return e}k.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};k.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++}};k.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++}};k.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)Qp(this,arguments[r]);return this.length};k.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Zp(this,arguments[r]);return this.length};k.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}};k.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}};k.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,s=0;t!==null;s++)r.call(e,t.value,s,this),t=t.next};k.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,s=this.length-1;t!==null;s--)r.call(e,t.value,s,this),t=t.prev};k.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};k.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};k.prototype.map=function(r,e){e=e||this;for(var t=new k,s=this.head;s!==null;)t.push(r.call(e,s.value,this)),s=s.next;return t};k.prototype.mapReverse=function(r,e){e=e||this;for(var t=new k,s=this.tail;s!==null;)t.push(r.call(e,s.value,this)),s=s.prev;return t};k.prototype.reduce=function(r,e){var t,s=this.head;if(arguments.length>1)t=e;else if(this.head)s=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;s!==null;o++)t=r(t,s.value,o),s=s.next;return t};k.prototype.reduceReverse=function(r,e){var t,s=this.tail;if(arguments.length>1)t=e;else if(this.tail)s=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;s!==null;o--)t=r(t,s.value,o),s=s.prev;return t};k.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};k.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};k.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 k;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var s=0,o=this.head;o!==null&&s<r;s++)o=o.next;for(;o!==null&&s<e;s++,o=o.next)t.push(o.value);return t};k.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 k;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var s=this.length,o=this.tail;o!==null&&s>e;s--)o=o.prev;for(;o!==null&&s>r;s--,o=o.prev)t.push(o.value);return t};k.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var s=0,o=this.head;o!==null&&s<r;s++)o=o.next;for(var a=[],s=0;o&&s<e;s++)a.push(o.value),o=this.removeNode(o);o===null&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(var s=0;s<t.length;s++)o=Xp(this,o,t[s]);return a};k.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var s=t.prev;t.prev=t.next,t.next=s}return this.head=e,this.tail=r,this};function Xp(r,e,t){var s=e===r.head?new Tt(t,null,e,r):new Tt(t,e,e.next,r);return s.next===null&&(r.tail=s),s.prev===null&&(r.head=s),r.length++,s}function Qp(r,e){r.tail=new Tt(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Zp(r,e){r.head=new Tt(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Tt(r,e,t,s){if(!(this instanceof Tt))return new Tt(r,e,t,s);this.list=s,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{Cu()(k)}catch{}});var Du=$((ew,qu)=>{"use strict";var Jp=Ou(),At=Symbol("max"),Xe=Symbol("length"),Qt=Symbol("lengthCalculator"),kr=Symbol("allowStale"),$t=Symbol("maxAge"),Ye=Symbol("dispose"),Iu=Symbol("noDisposeOnSet"),se=Symbol("lruList"),qe=Symbol("cache"),Lu=Symbol("updateAgeOnGet"),hi=()=>1,pi=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[At]=e.max||1/0,s=e.length||hi;if(this[Qt]=typeof s!="function"?hi:s,this[kr]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[$t]=e.maxAge||0,this[Ye]=e.dispose,this[Iu]=e.noDisposeOnSet||!1,this[Lu]=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[At]=e||1/0,Wr(this)}get max(){return this[At]}set allowStale(e){this[kr]=!!e}get allowStale(){return this[kr]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[$t]=e,Wr(this)}get maxAge(){return this[$t]}set lengthCalculator(e){typeof e!="function"&&(e=hi),e!==this[Qt]&&(this[Qt]=e,this[Xe]=0,this[se].forEach(t=>{t.length=this[Qt](t.value,t.key),this[Xe]+=t.length})),Wr(this)}get lengthCalculator(){return this[Qt]}get length(){return this[Xe]}get itemCount(){return this[se].length}rforEach(e,t){t=t||this;for(let s=this[se].tail;s!==null;){let o=s.prev;xu(this,e,s,t),s=o}}forEach(e,t){t=t||this;for(let s=this[se].head;s!==null;){let o=s.next;xu(this,e,s,t),s=o}}keys(){return this[se].toArray().map(e=>e.key)}values(){return this[se].toArray().map(e=>e.value)}reset(){this[Ye]&&this[se]&&this[se].length&&this[se].forEach(e=>this[Ye](e.key,e.value)),this[qe]=new Map,this[se]=new Jp,this[Xe]=0}dump(){return this[se].map(e=>Kn(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[se]}set(e,t,s){if(s=s||this[$t],s&&typeof s!="number")throw new TypeError("maxAge must be a number");let o=s?Date.now():0,a=this[Qt](t,e);if(this[qe].has(e)){if(a>this[At])return Zt(this,this[qe].get(e)),!1;let f=this[qe].get(e).value;return this[Ye]&&(this[Iu]||this[Ye](e,f.value)),f.now=o,f.maxAge=s,f.value=t,this[Xe]+=a-f.length,f.length=a,this.get(e),Wr(this),!0}let u=new mi(e,t,a,o,s);return u.length>this[At]?(this[Ye]&&this[Ye](e,t),!1):(this[Xe]+=u.length,this[se].unshift(u),this[qe].set(e,this[se].head),Wr(this),!0)}has(e){if(!this[qe].has(e))return!1;let t=this[qe].get(e).value;return!Kn(this,t)}get(e){return di(this,e,!0)}peek(e){return di(this,e,!1)}pop(){let e=this[se].tail;return e?(Zt(this,e),e.value):null}del(e){Zt(this,this[qe].get(e))}load(e){this.reset();let t=Date.now();for(let s=e.length-1;s>=0;s--){let o=e[s],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[qe].forEach((e,t)=>di(this,t,!1))}},di=(r,e,t)=>{let s=r[qe].get(e);if(s){let o=s.value;if(Kn(r,o)){if(Zt(r,s),!r[kr])return}else t&&(r[Lu]&&(s.value.now=Date.now()),r[se].unshiftNode(s));return o.value}},Kn=(r,e)=>{if(!e||!e.maxAge&&!r[$t])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[$t]&&t>r[$t]},Wr=r=>{if(r[Xe]>r[At])for(let e=r[se].tail;r[Xe]>r[At]&&e!==null;){let t=e.prev;Zt(r,e),e=t}},Zt=(r,e)=>{if(e){let t=e.value;r[Ye]&&r[Ye](t.key,t.value),r[Xe]-=t.length,r[qe].delete(t.key),r[se].removeNode(e)}},mi=class{constructor(e,t,s,o,a){this.key=e,this.value=t,this.length=s,this.now=o,this.maxAge=a||0}},xu=(r,e,t,s)=>{let o=t.value;Kn(r,o)&&(Zt(r,t),r[kr]||(o=void 0)),o&&e.call(s,o.value,o.key,r)};qu.exports=pi});var Ae=$((tw,Fu)=>{var Ct=class{constructor(e,t){if(t=em(t),e instanceof Ct)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Ct(e.raw,t);if(e instanceof gi)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(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(o=>!Nu(o[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&im(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 s=`parseRange:${Object.keys(this.options).join(",")}:${e}`,o=Bu.get(s);if(o)return o;let a=this.options.loose,u=a?Se[de.HYPHENRANGELOOSE]:Se[de.HYPHENRANGE];e=e.replace(u,mm(this.options.includePrerelease)),X("hyphen replace",e),e=e.replace(Se[de.COMPARATORTRIM],rm),X("comparator trim",e),e=e.replace(Se[de.TILDETRIM],nm),e=e.replace(Se[de.CARETTRIM],sm),e=e.split(/\s+/).join(" ");let d=e.split(" ").map(y=>om(y,this.options)).join(" ").split(/\s+/).map(y=>pm(y,this.options));a&&(d=d.filter(y=>(X("loose invalid filter",y,this.options),!!y.match(Se[de.COMPARATORLOOSE])))),X("range list",d);let f=new Map,h=d.map(y=>new gi(y,this.options));for(let y of h){if(Nu(y))return[y];f.set(y.value,y)}f.size>1&&f.has("")&&f.delete("");let g=[...f.values()];return Bu.set(s,g),g}intersects(e,t){if(!(e instanceof Ct))throw new TypeError("a Range is required");return this.set.some(s=>zu(s,t)&&e.set.some(o=>zu(o,t)&&s.every(a=>o.every(u=>a.intersects(u,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new tm(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(gm(this.set[t],e,this.options))return!0;return!1}};Fu.exports=Ct;var Kp=Du(),Bu=new Kp({max:1e3}),em=zr(),gi=jr(),X=Nr(),tm=ce(),{re:Se,t:de,comparatorTrimReplace:rm,tildeTrimReplace:nm,caretTrimReplace:sm}=Rt(),Nu=r=>r.value==="<0.0.0-0",im=r=>r.value==="",zu=(r,e)=>{let t=!0,s=r.slice(),o=s.pop();for(;t&&s.length;)t=s.every(a=>o.intersects(a,e)),o=s.pop();return t},om=(r,e)=>(X("comp",r,e),r=um(r,e),X("caret",r),r=am(r,e),X("tildes",r),r=fm(r,e),X("xrange",r),r=dm(r,e),X("stars",r),r),pe=r=>!r||r.toLowerCase()==="x"||r==="*",am=(r,e)=>r.trim().split(/\s+/).map(t=>lm(t,e)).join(" "),lm=(r,e)=>{let t=e.loose?Se[de.TILDELOOSE]:Se[de.TILDE];return r.replace(t,(s,o,a,u,d)=>{X("tilde",r,s,o,a,u,d);let f;return pe(o)?f="":pe(a)?f=`>=${o}.0.0 <${+o+1}.0.0-0`:pe(u)?f=`>=${o}.${a}.0 <${o}.${+a+1}.0-0`:d?(X("replaceTilde pr",d),f=`>=${o}.${a}.${u}-${d} <${o}.${+a+1}.0-0`):f=`>=${o}.${a}.${u} <${o}.${+a+1}.0-0`,X("tilde return",f),f})},um=(r,e)=>r.trim().split(/\s+/).map(t=>cm(t,e)).join(" "),cm=(r,e)=>{X("caret",r,e);let t=e.loose?Se[de.CARETLOOSE]:Se[de.CARET],s=e.includePrerelease?"-0":"";return r.replace(t,(o,a,u,d,f)=>{X("caret",r,o,a,u,d,f);let h;return pe(a)?h="":pe(u)?h=`>=${a}.0.0${s} <${+a+1}.0.0-0`:pe(d)?a==="0"?h=`>=${a}.${u}.0${s} <${a}.${+u+1}.0-0`:h=`>=${a}.${u}.0${s} <${+a+1}.0.0-0`:f?(X("replaceCaret pr",f),a==="0"?u==="0"?h=`>=${a}.${u}.${d}-${f} <${a}.${u}.${+d+1}-0`:h=`>=${a}.${u}.${d}-${f} <${a}.${+u+1}.0-0`:h=`>=${a}.${u}.${d}-${f} <${+a+1}.0.0-0`):(X("no pr"),a==="0"?u==="0"?h=`>=${a}.${u}.${d}${s} <${a}.${u}.${+d+1}-0`:h=`>=${a}.${u}.${d}${s} <${a}.${+u+1}.0-0`:h=`>=${a}.${u}.${d} <${+a+1}.0.0-0`),X("caret return",h),h})},fm=(r,e)=>(X("replaceXRanges",r,e),r.split(/\s+/).map(t=>hm(t,e)).join(" ")),hm=(r,e)=>{r=r.trim();let t=e.loose?Se[de.XRANGELOOSE]:Se[de.XRANGE];return r.replace(t,(s,o,a,u,d,f)=>{X("xRange",r,s,o,a,u,d,f);let h=pe(a),g=h||pe(u),y=g||pe(d),b=y;return o==="="&&b&&(o=""),f=e.includePrerelease?"-0":"",h?o===">"||o==="<"?s="<0.0.0-0":s="*":o&&b?(g&&(u=0),d=0,o===">"?(o=">=",g?(a=+a+1,u=0,d=0):(u=+u+1,d=0)):o==="<="&&(o="<",g?a=+a+1:u=+u+1),o==="<"&&(f="-0"),s=`${o+a}.${u}.${d}${f}`):g?s=`>=${a}.0.0${f} <${+a+1}.0.0-0`:y&&(s=`>=${a}.${u}.0${f} <${a}.${+u+1}.0-0`),X("xRange return",s),s})},dm=(r,e)=>(X("replaceStars",r,e),r.trim().replace(Se[de.STAR],"")),pm=(r,e)=>(X("replaceGTE0",r,e),r.trim().replace(Se[e.includePrerelease?de.GTE0PRE:de.GTE0],"")),mm=r=>(e,t,s,o,a,u,d,f,h,g,y,b,p)=>(pe(s)?t="":pe(o)?t=`>=${s}.0.0${r?"-0":""}`:pe(a)?t=`>=${s}.${o}.0${r?"-0":""}`:u?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,pe(h)?f="":pe(g)?f=`<${+h+1}.0.0-0`:pe(y)?f=`<${h}.${+g+1}.0-0`:b?f=`<=${h}.${g}.${y}-${b}`:r?f=`<${h}.${g}.${+y+1}-0`:f=`<=${f}`,`${t} ${f}`.trim()),gm=(r,e,t)=>{for(let s=0;s<r.length;s++)if(!r[s].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let s=0;s<r.length;s++)if(X(r[s].semver),r[s].semver!==gi.ANY&&r[s].semver.prerelease.length>0){let o=r[s].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}});var jr=$((rw,Mu)=>{var Ur=Symbol("SemVer ANY"),Jt=class{static get ANY(){return Ur}constructor(e,t){if(t=bm(t),e instanceof Jt){if(e.loose===!!t.loose)return e;e=e.value}yi("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ur?this.value="":this.value=this.operator+this.semver.version,yi("comp",this)}parse(e){let t=this.options.loose?Wu[ku.COMPARATORLOOSE]:Wu[ku.COMPARATOR],s=e.match(t);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new ju(s[2],this.options.loose):this.semver=Ur}toString(){return this.value}test(e){if(yi("Comparator.test",e,this.options.loose),this.semver===Ur||e===Ur)return!0;if(typeof e=="string")try{e=new ju(e,this.options)}catch{return!1}return bi(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Jt))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Uu(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new Uu(this.value,t).test(e.semver);let s=(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==="<="),d=bi(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),f=bi(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return s||o||a&&u||d||f}};Mu.exports=Jt;var bm=zr(),{re:Wu,t:ku}=Rt(),bi=fi(),yi=Nr(),ju=ce(),Uu=Ae()});var Mr=$((nw,Hu)=>{var ym=Ae(),Sm=(r,e,t)=>{try{e=new ym(e,t)}catch{return!1}return e.test(r)};Hu.exports=Sm});var Vu=$((sw,Gu)=>{var wm=Ae(),_m=(r,e)=>new wm(r,e).set.map(t=>t.map(s=>s.value).join(" ").trim().split(" "));Gu.exports=_m});var Xu=$((iw,Yu)=>{var Em=ce(),Rm=Ae(),vm=(r,e,t)=>{let s=null,o=null,a=null;try{a=new Rm(e,t)}catch{return null}return r.forEach(u=>{a.test(u)&&(!s||o.compare(u)===-1)&&(s=u,o=new Em(s,t))}),s};Yu.exports=vm});var Zu=$((ow,Qu)=>{var Tm=ce(),Am=Ae(),$m=(r,e,t)=>{let s=null,o=null,a=null;try{a=new Am(e,t)}catch{return null}return r.forEach(u=>{a.test(u)&&(!s||o.compare(u)===1)&&(s=u,o=new Tm(s,t))}),s};Qu.exports=$m});var ec=$((aw,Ku)=>{var Si=ce(),Cm=Ae(),Ju=Fr(),Pm=(r,e)=>{r=new Cm(r,e);let t=new Si("0.0.0");if(r.test(t)||(t=new Si("0.0.0-0"),r.test(t)))return t;t=null;for(let s=0;s<r.set.length;++s){let o=r.set[s],a=null;o.forEach(u=>{let d=new Si(u.semver.version);switch(u.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!a||Ju(d,a))&&(a=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),a&&(!t||Ju(t,a))&&(t=a)}return t&&r.test(t)?t:null};Ku.exports=Pm});var rc=$((lw,tc)=>{var Om=Ae(),Im=(r,e)=>{try{return new Om(r,e).range||"*"}catch{return null}};tc.exports=Im});var es=$((uw,oc)=>{var xm=ce(),ic=jr(),{ANY:Lm}=ic,qm=Ae(),Dm=Mr(),nc=Fr(),sc=Yn(),Bm=Qn(),Nm=Xn(),zm=(r,e,t,s)=>{r=new xm(r,s),e=new qm(e,s);let o,a,u,d,f;switch(t){case">":o=nc,a=Bm,u=sc,d=">",f=">=";break;case"<":o=sc,a=Nm,u=nc,d="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Dm(r,e,s))return!1;for(let h=0;h<e.set.length;++h){let g=e.set[h],y=null,b=null;if(g.forEach(p=>{p.semver===Lm&&(p=new ic(">=0.0.0")),y=y||p,b=b||p,o(p.semver,y.semver,s)?y=p:u(p.semver,b.semver,s)&&(b=p)}),y.operator===d||y.operator===f||(!b.operator||b.operator===d)&&a(r,b.semver))return!1;if(b.operator===f&&u(r,b.semver))return!1}return!0};oc.exports=zm});var lc=$((cw,ac)=>{var Fm=es(),Wm=(r,e,t)=>Fm(r,e,">",t);ac.exports=Wm});var cc=$((fw,uc)=>{var km=es(),jm=(r,e,t)=>km(r,e,"<",t);uc.exports=jm});var dc=$((hw,hc)=>{var fc=Ae(),Um=(r,e,t)=>(r=new fc(r,t),e=new fc(e,t),r.intersects(e));hc.exports=Um});var mc=$((dw,pc)=>{var Mm=Mr(),Hm=Te();pc.exports=(r,e,t)=>{let s=[],o=null,a=null,u=r.sort((g,y)=>Hm(g,y,t));for(let g of u)Mm(g,e,t)?(a=g,o||(o=g)):(a&&s.push([o,a]),a=null,o=null);o&&s.push([o,null]);let d=[];for(let[g,y]of s)g===y?d.push(g):!y&&g===u[0]?d.push("*"):y?g===u[0]?d.push(`<=${y}`):d.push(`${g} - ${y}`):d.push(`>=${g}`);let f=d.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return f.length<h.length?f:e}});var wc=$((pw,Sc)=>{var gc=Ae(),ts=jr(),{ANY:wi}=ts,Hr=Mr(),_i=Te(),Gm=(r,e,t={})=>{if(r===e)return!0;r=new gc(r,t),e=new gc(e,t);let s=!1;e:for(let o of r.set){for(let a of e.set){let u=Vm(o,a,t);if(s=s||u!==null,u)continue e}if(s)return!1}return!0},Vm=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===wi){if(e.length===1&&e[0].semver===wi)return!0;t.includePrerelease?r=[new ts(">=0.0.0-0")]:r=[new ts(">=0.0.0")]}if(e.length===1&&e[0].semver===wi){if(t.includePrerelease)return!0;e=[new ts(">=0.0.0")]}let s=new Set,o,a;for(let p of r)p.operator===">"||p.operator===">="?o=bc(o,p,t):p.operator==="<"||p.operator==="<="?a=yc(a,p,t):s.add(p.semver);if(s.size>1)return null;let u;if(o&&a){if(u=_i(o.semver,a.semver,t),u>0)return null;if(u===0&&(o.operator!==">="||a.operator!=="<="))return null}for(let p of s){if(o&&!Hr(p,String(o),t)||a&&!Hr(p,String(a),t))return null;for(let S of e)if(!Hr(p,String(S),t))return!1;return!0}let d,f,h,g,y=a&&!t.includePrerelease&&a.semver.prerelease.length?a.semver:!1,b=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(g=g||p.operator===">"||p.operator===">=",h=h||p.operator==="<"||p.operator==="<=",o){if(b&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===b.major&&p.semver.minor===b.minor&&p.semver.patch===b.patch&&(b=!1),p.operator===">"||p.operator===">="){if(d=bc(o,p,t),d===p&&d!==o)return!1}else if(o.operator===">="&&!Hr(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(f=yc(a,p,t),f===p&&f!==a)return!1}else if(a.operator==="<="&&!Hr(a.semver,String(p),t))return!1}if(!p.operator&&(a||o)&&u!==0)return!1}return!(o&&h&&!a&&u!==0||a&&g&&!o&&u!==0||b||y)},bc=(r,e,t)=>{if(!r)return e;let s=_i(r.semver,e.semver,t);return s>0?r:s<0||e.operator===">"&&r.operator===">="?e:r},yc=(r,e,t)=>{if(!r)return e;let s=_i(r.semver,e.semver,t);return s<0?r:s>0||e.operator==="<"&&r.operator==="<="?e:r};Sc.exports=Gm});var Rc=$((mw,Ec)=>{var Ei=Rt(),Ym=Br(),Xm=ce(),_c=ui(),Qm=vt(),Zm=Ul(),Jm=Hl(),Km=Yl(),eg=eu(),tg=ru(),rg=su(),ng=ou(),sg=lu(),ig=Te(),og=cu(),ag=hu(),lg=Vn(),ug=gu(),cg=yu(),fg=Fr(),hg=Yn(),dg=Gn(),pg=ci(),mg=Xn(),gg=Qn(),bg=fi(),yg=Au(),Sg=jr(),wg=Ae(),_g=Mr(),Eg=Vu(),Rg=Xu(),vg=Zu(),Tg=ec(),Ag=rc(),$g=es(),Cg=lc(),Pg=cc(),Og=dc(),Ig=mc(),xg=wc();Ec.exports={parse:Qm,valid:Zm,clean:Jm,inc:Km,diff:eg,major:tg,minor:rg,patch:ng,prerelease:sg,compare:ig,rcompare:og,compareLoose:ag,compareBuild:lg,sort:ug,rsort:cg,gt:fg,lt:hg,eq:dg,neq:pg,gte:mg,lte:gg,cmp:bg,coerce:yg,Comparator:Sg,Range:wg,satisfies:_g,toComparators:Eg,maxSatisfying:Rg,minSatisfying:vg,minVersion:Tg,validRange:Ag,outside:$g,gtr:Cg,ltr:Pg,intersects:Og,simplifyRange:Ig,subset:xg,SemVer:Xm,re:Ei.re,src:Ei.src,tokens:Ei.t,SEMVER_SPEC_VERSION:Ym.SEMVER_SPEC_VERSION,compareIdentifiers:_c.compareIdentifiers,rcompareIdentifiers:_c.rcompareIdentifiers}});var Cc=$((gw,$c)=>{$c.exports=function(r,e){e||(e={});var t=e.hsep===void 0?" ":e.hsep,s=e.align||[],o=e.stringLength||function(f){return String(f).length},a=Tc(r,function(f,h){return Ac(h,function(g,y){var b=vc(g);(!f[y]||b>f[y])&&(f[y]=b)}),f},[]),u=rs(r,function(f){return rs(f,function(h,g){var y=String(h);if(s[g]==="."){var b=vc(y),p=a[g]+(/\./.test(y)?1:2)-(o(y)-b);return y+Array(p).join(" ")}else return y})}),d=Tc(u,function(f,h){return Ac(h,function(g,y){var b=o(g);(!f[y]||b>f[y])&&(f[y]=b)}),f},[]);return rs(u,function(f){return rs(f,function(h,g){var y=d[g]-o(h)||0,b=Array(Math.max(y+1,1)).join(" ");return s[g]==="r"||s[g]==="."?b+h:s[g]==="c"?Array(Math.ceil(y/2+1)).join(" ")+h+Array(Math.floor(y/2+1)).join(" "):h+b}).join(t).replace(/\s+$/,"")}).join(`
20
- `)};function vc(r){var e=/\.[^.]*$/.exec(r);return e?e.index+1:r.length}function Tc(r,e,t){if(r.reduce)return r.reduce(e,t);for(var s=0,o=arguments.length>=3?t:r[s++];s<r.length;s++)e(o,r[s],s);return o}function Ac(r,e){if(r.forEach)return r.forEach(e);for(var t=0;t<r.length;t++)e.call(r,r[t],t)}function rs(r,e){if(r.map)return r.map(e);for(var t=[],s=0;s<r.length;s++)t.push(e.call(r,r[s],s));return t}});var xc=$((Sw,Ic)=>{var Ri=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Lg=typeof AbortController<"u",Pc=Lg?AbortController:Object.assign(class{constructor(){this.signal=new Pc.AbortSignal}abort(){this.signal.aborted=!0}},{AbortSignal:class{constructor(){this.aborted=!1}}}),$i=new Set,vi=(r,e)=>{let t=`LRU_CACHE_OPTION_${r}`;ns(t)&&Ci(t,`${r} option`,`options.${e}`,Fe)},Ti=(r,e)=>{let t=`LRU_CACHE_METHOD_${r}`;if(ns(t)){let{prototype:s}=Fe,{get:o}=Object.getOwnPropertyDescriptor(s,r);Ci(t,`${r} method`,`cache.${e}()`,o)}},qg=(r,e)=>{let t=`LRU_CACHE_PROPERTY_${r}`;if(ns(t)){let{prototype:s}=Fe,{get:o}=Object.getOwnPropertyDescriptor(s,r);Ci(t,`${r} property`,`cache.${e}`,o)}},ns=r=>typeof process=="object"&&process&&!$i.has(r),Ci=(r,e,t,s)=>{$i.add(r);let o=`The ${e} is deprecated. Please use ${t} instead.`;process.emitWarning(o,"DeprecationWarning",r,s)},Pt=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),Oc=r=>Pt(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?Kt:null:null,Kt=class extends Array{constructor(e){super(e),this.fill(0)}},Ai=class{constructor(e){let t=e?Oc(e):Array;this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Fe=class{constructor(e={}){let{max:t=0,ttl:s,ttlResolution:o=1,ttlAutopurge:a,updateAgeOnGet:u,allowStale:d,dispose:f,disposeAfter:h,noDisposeOnSet:g,noUpdateTTL:y,maxSize:b=0,sizeCalculation:p,fetchMethod:S}=e,{length:v,maxAge:_,stale:R}=e instanceof Fe?{}:e;if(t!==0&&!Pt(t))throw new TypeError("max option must be a nonnegative integer");let O=t?Oc(t):Array;if(!O)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=b,this.sizeCalculation=p||v,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");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.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new O(t),this.prev=new O(t),this.head=0,this.tail=0,this.free=new Ai(t),this.initialFill=1,this.size=0,typeof f=="function"&&(this.dispose=f),typeof h=="function"?(this.disposeAfter=h,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!g,this.noUpdateTTL=!!y,this.maxSize!==0){if(!Pt(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!d||!!R,this.updateAgeOnGet=!!u,this.ttlResolution=Pt(o)||o===0?o:1,this.ttlAutopurge=!!a,this.ttl=s||_||0,this.ttl){if(!Pt(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 B="LRU_CACHE_UNBOUNDED";if(ns(B)){$i.add(B);let T="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";process.emitWarning(T,"UnboundedCacheWarning",B,Fe)}}R&&vi("stale","allowStale"),_&&vi("maxAge","ttl"),v&&vi("length","sizeCalculation")}getRemainingTTL(e){return this.has(e)?1/0:0}initializeTTLTracking(){this.ttls=new Kt(this.max),this.starts=new Kt(this.max),this.setItemTTL=(s,o)=>{if(this.starts[s]=o!==0?Ri.now():0,this.ttls[s]=o,o!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.isStale(s)&&this.delete(this.keyList[s])},o+1);a.unref&&a.unref()}},this.updateItemAge=s=>{this.starts[s]=this.ttls[s]!==0?Ri.now():0};let e=0,t=()=>{let s=Ri.now();if(this.ttlResolution>0){e=s;let o=setTimeout(()=>e=0,this.ttlResolution);o.unref&&o.unref()}return s};this.getRemainingTTL=s=>{let o=this.keyMap.get(s);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=s=>this.ttls[s]!==0&&this.starts[s]!==0&&(e||t())-this.starts[s]>this.ttls[s]}updateItemAge(e){}setItemTTL(e,t){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Kt(this.max),this.removeItemSize=e=>this.calculatedSize-=this.sizes[e],this.requireSize=(e,t,s,o)=>{if(!Pt(s))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(s=o(t,e),!Pt(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer)");return s},this.addItemSize=(e,t,s,o)=>{this.sizes[e]=o;let a=this.maxSize-this.sizes[e];for(;this.calculatedSize>a;)this.evict();this.calculatedSize+=this.sizes[e]},this.delete=e=>{if(this.size!==0){let t=this.keyMap.get(e);t!==void 0&&(this.calculatedSize-=this.sizes[t])}return Fe.prototype.delete.call(this,e)}}removeItemSize(e){}addItemSize(e,t,s,o){}requireSize(e,t,s,o){if(s||o)throw new TypeError("cannot set size without setting maxSize 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 this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(let e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(let e of this.indexes())yield this.keyList[e]}*rkeys(){for(let e of this.rindexes())yield this.keyList[e]}*values(){for(let e of this.indexes())yield this.valList[e]}*rvalues(){for(let e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(let s of this.indexes())if(e(this.valList[s],this.keyList[s],this))return this.get(this.keyList[s],t)}forEach(e,t=this){for(let s of this.indexes())e.call(t,this.valList[s],this.keyList[s],this)}rforEach(e,t=this){for(let s of this.rindexes())e.call(t,this.valList[s],this.keyList[s],this)}get prune(){return Ti("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()){let s=this.keyList[t],a={value:this.valList[t]};this.ttls&&(a.ttl=this.ttls[t]),this.sizes&&(a.size=this.sizes[t]),e.unshift([s,a])}return e}load(e){this.clear();for(let[t,s]of e)this.set(t,s.value,s)}dispose(e,t,s){}set(e,t,{ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL}={}){a=this.requireSize(e,t,a,u);let f=this.size===0?void 0:this.keyMap.get(e);if(f===void 0)f=this.newIndex(),this.keyList[f]=e,this.valList[f]=t,this.keyMap.set(e,f),this.next[this.tail]=f,this.prev[f]=this.tail,this.tail=f,this.size++,this.addItemSize(f,t,e,a),d=!1;else{let h=this.valList[f];t!==h&&(this.isBackgroundFetch(h)?h.__abortController.abort():o||(this.dispose(h,e,"set"),this.disposeAfter&&this.disposed.push([h,e,"set"])),this.removeItemSize(f),this.valList[f]=t,this.addItemSize(f,t,e,a)),this.moveToTail(f)}if(s!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),d||this.setItemTTL(f,s),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.evict():this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(),e}}evict(){let e=this.head,t=this.keyList[e],s=this.valList[e];return this.isBackgroundFetch(s)?s.__abortController.abort():(this.dispose(s,t,"evict"),this.disposeAfter&&this.disposed.push([s,t,"evict"])),this.removeItemSize(e),this.head=this.next[e],this.keyMap.delete(t),this.size--,e}has(e){return this.keyMap.has(e)&&!this.isStale(this.keyMap.get(e))}peek(e,{allowStale:t=this.allowStale}={}){let s=this.keyMap.get(e);if(s!==void 0&&(t||!this.isStale(s)))return this.valList[s]}backgroundFetch(e,t,s){let o=t===void 0?void 0:this.valList[t];if(this.isBackgroundFetch(o))return o;let a=new Pc,u={signal:a.signal,options:s},d=Promise.resolve(this.fetchMethod(e,o,u)).then(f=>(a.signal.aborted||this.set(e,f,u.options),f));return d.__abortController=a,d.__staleWhileFetching=o,t===void 0?(this.set(e,d,u.options),t=this.keyMap.get(e)):this.valList[t]=d,d}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:s});let h={allowStale:t,updateAgeOnGet:s,ttl:o,noDisposeOnSet:a,size:u,sizeCalculation:d,noUpdateTTL:f},g=this.keyMap.get(e);if(g===void 0)return this.backgroundFetch(e,g,h);{let y=this.valList[g];if(this.isBackgroundFetch(y))return t&&y.__staleWhileFetching!==void 0?y.__staleWhileFetching:y;if(!this.isStale(g))return this.moveToTail(g),s&&this.updateItemAge(g),y;let b=this.backgroundFetch(e,g,h);return t&&b.__staleWhileFetching!==void 0?b.__staleWhileFetching:b}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet}={}){let o=this.keyMap.get(e);if(o!==void 0){let a=this.valList[o],u=this.isBackgroundFetch(a);return this.isStale(o)?u?t?a.__staleWhileFetching:void 0:(this.delete(e),t?a:void 0):u?void 0:(this.moveToTail(o),s&&this.updateItemAge(o),a)}}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 Ti("del","delete"),this.delete}delete(e){let t=!1;if(this.size!==0){let s=this.keyMap.get(e);if(s!==void 0)if(t=!0,this.size===1)this.clear();else{this.removeItemSize(s);let o=this.valList[s];this.isBackgroundFetch(o)?o.__abortController.abort():(this.dispose(o,e,"delete"),this.disposeAfter&&this.disposed.push([o,e,"delete"])),this.keyMap.delete(e),this.keyList[s]=null,this.valList[s]=null,s===this.tail?this.tail=this.prev[s]:s===this.head?this.head=this.next[s]:(this.next[this.prev[s]]=this.next[s],this.prev[this.next[s]]=this.prev[s]),this.size--,this.free.push(s)}}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();else{let s=this.keyList[e];this.dispose(t,s,"delete"),this.disposeAfter&&this.disposed.push([t,s,"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 Ti("reset","clear"),this.clear}get length(){return qg("length","size"),this.size}};Ic.exports=Fe});var Dc=$((ww,qc)=>{"use strict";var j=(...r)=>r.every(e=>e)?r.join(""):"",J=r=>r?encodeURIComponent(r):"",Lc=r=>r.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),Dg={sshtemplate:({domain:r,user:e,project:t,committish:s})=>`git@${r}:${e}/${t}.git${j("#",s)}`,sshurltemplate:({domain:r,user:e,project:t,committish:s})=>`git+ssh://git@${r}/${e}/${t}.git${j("#",s)}`,edittemplate:({domain:r,user:e,project:t,committish:s,editpath:o,path:a})=>`https://${r}/${e}/${t}${j("/",o,"/",J(s||"HEAD"),"/",a)}`,browsetemplate:({domain:r,user:e,project:t,committish:s,treepath:o})=>`https://${r}/${e}/${t}${j("/",o,"/",J(s))}`,browsetreetemplate:({domain:r,user:e,project:t,committish:s,treepath:o,path:a,fragment:u,hashformat:d})=>`https://${r}/${e}/${t}/${o}/${J(s||"HEAD")}/${a}${j("#",d(u||""))}`,browseblobtemplate:({domain:r,user:e,project:t,committish:s,blobpath:o,path:a,fragment:u,hashformat:d})=>`https://${r}/${e}/${t}/${o}/${J(s||"HEAD")}/${a}${j("#",d(u||""))}`,docstemplate:({domain:r,user:e,project:t,treepath:s,committish:o})=>`https://${r}/${e}/${t}${j("/",s,"/",J(o))}#readme`,httpstemplate:({auth:r,domain:e,user:t,project:s,committish:o})=>`git+https://${j(r,"@")}${e}/${t}/${s}.git${j("#",o)}`,filetemplate:({domain:r,user:e,project:t,committish:s,path:o})=>`https://${r}/${e}/${t}/raw/${J(s||"HEAD")}/${o}`,shortcuttemplate:({type:r,user:e,project:t,committish:s})=>`${r}:${e}/${t}${j("#",s)}`,pathtemplate:({user:r,project:e,committish:t})=>`${r}/${e}${j("#",t)}`,bugstemplate:({domain:r,user:e,project:t})=>`https://${r}/${e}/${t}/issues`,hashformat:Lc},lt={};lt.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:s,path:o})=>`https://${j(r,"@")}raw.githubusercontent.com/${e}/${t}/${J(s||"HEAD")}/${o}`,gittemplate:({auth:r,domain:e,user:t,project:s,committish:o})=>`git://${j(r,"@")}${e}/${t}/${s}.git${j("#",o)}`,tarballtemplate:({domain:r,user:e,project:t,committish:s})=>`https://codeload.${r}/${e}/${t}/tar.gz/${J(s||"HEAD")}`,extract:r=>{let[,e,t,s,o]=r.pathname.split("/",5);if(!(s&&s!=="tree")&&(s||(o=r.hash.slice(1)),t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:o}}};lt.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:s,treepath:o,path:a,editpath:u})=>`https://${r}/${e}/${t}${j("/",o,"/",J(s||"HEAD"),"/",a,u)}`,tarballtemplate:({domain:r,user:e,project:t,committish:s})=>`https://${r}/${e}/${t}/get/${J(s||"HEAD")}.tar.gz`,extract:r=>{let[,e,t,s]=r.pathname.split("/",4);if(!["get"].includes(s)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:r.hash.slice(1)}}};lt.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:s,committish:o})=>`git+https://${j(r,"@")}${e}/${t}/${s}.git${j("#",o)}`,tarballtemplate:({domain:r,user:e,project:t,committish:s})=>`https://${r}/${e}/${t}/repository/archive.tar.gz?ref=${J(s||"HEAD")}`,extract:r=>{let e=r.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let t=e.split("/"),s=t.pop();s.endsWith(".git")&&(s=s.slice(0,-4));let o=t.join("/");if(!(!o||!s))return{user:o,project:s,committish:r.hash.slice(1)}}};lt.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${j("#",t)}`,sshurltemplate:({domain:r,project:e,committish:t})=>`git+ssh://git@${r}/${e}.git${j("#",t)}`,edittemplate:({domain:r,user:e,project:t,committish:s,editpath:o})=>`https://${r}/${e}/${t}${j("/",J(s))}/${o}`,browsetemplate:({domain:r,project:e,committish:t})=>`https://${r}/${e}${j("/",J(t))}`,browsetreetemplate:({domain:r,project:e,committish:t,path:s,hashformat:o})=>`https://${r}/${e}${j("/",J(t))}${j("#",o(s))}`,browseblobtemplate:({domain:r,project:e,committish:t,path:s,hashformat:o})=>`https://${r}/${e}${j("/",J(t))}${j("#",o(s))}`,docstemplate:({domain:r,project:e,committish:t})=>`https://${r}/${e}${j("/",J(t))}`,httpstemplate:({domain:r,project:e,committish:t})=>`git+https://${r}/${e}.git${j("#",t)}`,filetemplate:({user:r,project:e,committish:t,path:s})=>`https://gist.githubusercontent.com/${r}/${e}/raw${j("/",J(t))}/${s}`,shortcuttemplate:({type:r,project:e,committish:t})=>`${r}:${e}${j("#",t)}`,pathtemplate:({project:r,committish:e})=>`${r}${j("#",e)}`,bugstemplate:({domain:r,project:e})=>`https://${r}/${e}`,gittemplate:({domain:r,project:e,committish:t})=>`git://${r}/${e}.git${j("#",t)}`,tarballtemplate:({project:r,committish:e})=>`https://codeload.github.com/gist/${r}/tar.gz/${J(e||"HEAD")}`,extract:r=>{let[,e,t,s]=r.pathname.split("/",4);if(s!=="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-"+Lc(r)}};lt.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:r,user:e,project:t,committish:s,path:o})=>`https://${r}/${e}/${t}/blob/${J(s)||"HEAD"}/${o}`,httpstemplate:({domain:r,user:e,project:t,committish:s})=>`https://${r}/${e}/${t}.git${j("#",s)}`,tarballtemplate:({domain:r,user:e,project:t,committish:s})=>`https://${r}/${e}/${t}/archive/${J(s)||"HEAD"}.tar.gz`,bugstemplate:({user:r,project:e})=>`https://todo.sr.ht/${r}/${e}`,extract:r=>{let[,e,t,s]=r.pathname.split("/",4);if(!["archive"].includes(s)&&(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(lt))lt[r]=Object.assign({},Dg,e);qc.exports=lt});var Oi=$((_w,Nc)=>{var Bg=we("url"),Pi=(r,e,t)=>{let s=r.indexOf(t);return r.lastIndexOf(e,s>-1?s:1/0)},Bc=r=>{try{return new Bg.URL(r)}catch{}},Ng=(r,e)=>{let t=r.indexOf(":"),s=r.slice(0,t+1);if(Object.prototype.hasOwnProperty.call(e,s))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)}`},zg=r=>{let e=Pi(r,"@","#"),t=Pi(r,":","#");return t>e&&(r=r.slice(0,t)+"/"+r.slice(t+1)),Pi(r,":","#")===-1&&r.indexOf("//")===-1&&(r=`git+ssh://${r}`),r};Nc.exports=(r,e)=>{let t=e?Ng(r,e):r;return Bc(t)||Bc(zg(t))}});var Fc=$((Ew,zc)=>{"use strict";var Fg=Oi(),Wg=r=>{let e=r.indexOf("#"),t=r.indexOf("/"),s=r.indexOf("/",t+1),o=r.indexOf(":"),a=/\s/.exec(r),u=r.indexOf("@"),d=!a||e>-1&&a.index>e,f=u===-1||e>-1&&u>e,h=o===-1||e>-1&&o>e,g=s===-1||e>-1&&s>e,y=t>0,b=e>-1?r[e-1]!=="/":!r.endsWith("/"),p=!r.startsWith(".");return d&&y&&b&&p&&f&&h&&g};zc.exports=(r,e,{gitHosts:t,protocols:s})=>{var v,_;if(!r)return;let o=Wg(r)?`github:${r}`:r,a=Fg(o,s);if(!a)return;let u=t.byShortcut[a.protocol],d=t.byDomain[a.hostname.startsWith("www.")?a.hostname.slice(4):a.hostname],f=u||d;if(!f)return;let h=t[u||d],g=null;(v=s[a.protocol])!=null&&v.auth&&(a.username||a.password)&&(g=`${a.username}${a.password?":"+a.password:""}`);let y=null,b=null,p=null,S=null;try{if(u){let R=a.pathname.startsWith("/")?a.pathname.slice(1):a.pathname,O=R.indexOf("@");O>-1&&(R=R.slice(O+1));let B=R.lastIndexOf("/");B>-1?(b=decodeURIComponent(R.slice(0,B)),b||(b=null),p=decodeURIComponent(R.slice(B+1))):p=decodeURIComponent(R),p.endsWith(".git")&&(p=p.slice(0,-4)),a.hash&&(y=decodeURIComponent(a.hash.slice(1))),S="shortcut"}else{if(!h.protocols.includes(a.protocol))return;let R=h.extract(a);if(!R)return;b=R.user&&decodeURIComponent(R.user),p=decodeURIComponent(R.project),y=decodeURIComponent(R.committish),S=((_=s[a.protocol])==null?void 0:_.name)||a.protocol.slice(0,-1)}}catch(R){if(R instanceof URIError)return;throw R}return[f,b,g,p,y,S,e]}});var kc=$((Rw,Wc)=>{"use strict";var kg=xc(),jg=Dc(),Ug=Fc(),Mg=Oi(),Ii=new kg({max:1e3}),ut,Gr,re,ue,We=class{constructor(e,t,s,o,a,u,d={}){oe(this,re);Object.assign(this,F(We,ut)[e],{type:e,user:t,auth:s,project:o,committish:a,default:u,opts:d})}static addHost(e,t){F(We,ut)[e]=t,F(We,ut).byDomain[t.domain]=e,F(We,ut).byShortcut[`${e}:`]=e,F(We,Gr)[`${e}:`]={name:e}}static fromUrl(e,t){if(typeof e!="string")return;let s=e+JSON.stringify(t||{});if(!Ii.has(s)){let o=Ug(e,t,{gitHosts:F(We,ut),protocols:F(We,Gr)});Ii.set(s,o?new We(...o):void 0)}return Ii.get(s)}static parseUrl(e){return Mg(e)}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return ae(this,re,ue).call(this,this.sshtemplate,e)}sshurl(e){return ae(this,re,ue).call(this,this.sshurltemplate,e)}browse(e,...t){return typeof e!="string"?ae(this,re,ue).call(this,this.browsetemplate,e):typeof t[0]!="string"?ae(this,re,ue).call(this,this.browsetreetemplate,{...t[0],path:e}):ae(this,re,ue).call(this,this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return typeof t[0]!="string"?ae(this,re,ue).call(this,this.browseblobtemplate,{...t[0],path:e}):ae(this,re,ue).call(this,this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return ae(this,re,ue).call(this,this.docstemplate,e)}bugs(e){return ae(this,re,ue).call(this,this.bugstemplate,e)}https(e){return ae(this,re,ue).call(this,this.httpstemplate,e)}git(e){return ae(this,re,ue).call(this,this.gittemplate,e)}shortcut(e){return ae(this,re,ue).call(this,this.shortcuttemplate,e)}path(e){return ae(this,re,ue).call(this,this.pathtemplate,e)}tarball(e){return ae(this,re,ue).call(this,this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return ae(this,re,ue).call(this,this.filetemplate,{...t,path:e})}edit(e,t){return ae(this,re,ue).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)}},er=We;ut=new WeakMap,Gr=new WeakMap,re=new WeakSet,ue=function(e,t){if(typeof e!="function")return null;let s={...this,...this.opts,...t};s.path||(s.path=""),s.path.startsWith("/")&&(s.path=s.path.slice(1)),s.noCommittish&&(s.committish=null);let o=e(s);return s.noGitPlus&&o.startsWith("git+")?o.slice(4):o},oe(er,ut,{byShortcut:{},byDomain:{}}),oe(er,Gr,{"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(jg))er.addHost(r,e);Wc.exports=er});function Ws({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 Hs=xe(sa(),1);var ia=Hs.default.HttpProxyAgent,oa=Hs.default.HttpsProxyAgent;var Rr=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,s]of e)this.onEviction(t,s.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 s=t.get(e);return this._getItemValue(e,s)}_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,s]=e;this.cache.has(t)||this._deleteIfExpired(t,s)===!1&&(yield e)}for(let e of this.cache){let[t,s]=e;this._deleteIfExpired(t,s)===!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:s=this.maxAge}={}){let o=typeof s=="number"&&s!==Number.POSITIVE_INFINITY?Date.now()+s: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()],s=t.length-e;s<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(s>0&&this._emitEvictions(t.slice(0,s)),this.oldCache=new Map(t.slice(s)),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,s]=e;this._deleteIfExpired(t,s)===!1&&(yield[t,s.value])}for(let e of this.oldCache){let[t,s]=e;this.cache.has(t)||this._deleteIfExpired(t,s)===!1&&(yield[t,s.value])}}*entriesDescending(){let e=[...this.cache];for(let t=e.length-1;t>=0;--t){let s=e[t],[o,a]=s;this._deleteIfExpired(o,a)===!1&&(yield[o,a.value])}e=[...this.oldCache];for(let t=e.length-1;t>=0;--t){let s=e[t],[o,a]=s;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[s,o]of this.entriesAscending())e.call(t,o,s,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};var ca=xe(la(),1);import{Agent as Mh}from"http";import{Agent as Hh}from"https";var Gh={agentCacheSize:512},ua={maxSockets:64,keepAlive:!1},vr=class extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,vr)}};function Gs(r,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let t={...Gh,...e},s=new Rr({maxSize:t.agentCacheSize});async function o(u,d={}){let{origin:f,protocol:h}=new URL(u),g=d!=null&&d.noProxy?null:(0,ca.getProxyForUrl)(u),y=JSON.stringify({proxyUrl:g,origin:f,...d});if(s.has(y))return s.get(y);let b;if("noProxy"in d&&delete d.noProxy,e.undici){let{ProxyAgent:p,Agent:S}=await import("undici"),v={...d};"keepAlive"in v&&!("pipelining"in v)&&(v.pipelining=v.keepAlive?1:0),"keepAlive"in v&&delete v.keepAlive,"maxSockets"in v&&(v.connections=v.maxSockets,delete v.maxSockets),g?b=new p({...v,uri:g}):b=new S(v)}else{let p=h==="https:";g?b=new(p?oa:ia)({...d,proxy:g}):b=new(p?Hh:Mh)(d)}return s.set(y,b),b}let a=(u,{timeout:d=0,agentOpts:f={},...h}={})=>new Promise(async(g,y)=>{var S;if(!e.undici&&!("agent"in h)){let v=await o(u,{...ua,...f});v&&(h.agent=v)}else if(e.undici&&!("dispatcher"in h)){let v=await o(u,{...ua,...f});v&&(h.dispatcher=v)}let b,p;d&&(!("signal"in h)&&globalThis.AbortController&&(p=new AbortController,h.signal=p.signal),b=setTimeout(()=>{var _;(_=p==null?void 0:p.abort)==null||_.call(p);let v=new vr(`${h.method||"GET"} ${u} timed out after ${d}ms`);y(v)},d),(S=b==null?void 0:b.unref)==null||S.call(b)),r(u,h).then(v=>{b&&clearTimeout(b),g(v)}).catch(v=>{if(b&&clearTimeout(b),v.name==="AbortError")return g(null);y(v)})});return a.clearCache=()=>{for(let u of s.values())"destroy"in u&&u.destroy();s.clear()},a}var Qc=xe(Vs(),1);import wd from"http";import _d from"https";import Mt from"zlib";import Xa,{PassThrough as Qa,pipeline as Ht}from"stream";import{Buffer as Fn}from"buffer";function Yh(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(";"),s="",o=!1,a=t[0]||"text/plain",u=a;for(let g=1;g<t.length;g++)t[g]==="base64"?o=!0:(u+=`;${t[g]}`,t[g].indexOf("charset=")===0&&(s=t[g].substring(8)));!t[0]&&!s.length&&(u+=";charset=US-ASCII",s="US-ASCII");let d=o?"base64":"ascii",f=unescape(r.substring(e+1)),h=Buffer.from(f,d);return h.type=a,h.typeFull=u,h.charset=s,h}var pa=Yh;Ar();On();import ot,{PassThrough as Da}from"stream";import{types as Ba,deprecate as ri,promisify as fd}from"util";import{Buffer as ve}from"buffer";var Ge=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 be=class extends Ge{constructor(e,t,s){super(e,t),s&&(this.code=this.errno=s.code,this.erroredSysCall=s.syscall)}};var In=Symbol.toStringTag,Zs=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[In]==="URLSearchParams",Or=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[In]),Ta=r=>typeof r=="object"&&(r[In]==="AbortSignal"||r[In]==="EventTarget"),Aa=(r,e)=>{let t=new URL(e).hostname,s=new URL(r).hostname;return t===s||t.endsWith(`.${s}`)},$a=(r,e)=>{let t=new URL(e).protocol,s=new URL(r).protocol;return t===s};var hd=fd(ot.pipeline),ye=Symbol("Body internals"),ze=class{constructor(e,{size:t=0}={}){let s=null;e===null?e=null:Zs(e)?e=ve.from(e.toString()):Or(e)||ve.isBuffer(e)||(Ba.isAnyArrayBuffer(e)?e=ve.from(e):ArrayBuffer.isView(e)?e=ve.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ot||(e instanceof yt?(e=va(e),s=e.type.split("=")[1]):e=ve.from(String(e))));let o=e;ve.isBuffer(e)?o=ot.Readable.from(e):Or(e)&&(o=ot.Readable.from(e.stream())),this[ye]={body:e,stream:o,boundary:s,disturbed:!1,error:null},this.size=t,e instanceof ot&&e.on("error",a=>{let u=a instanceof Ge?a:new be(`Invalid response body while trying to fetch ${this.url}: ${a.message}`,"system",a);this[ye].error=u})}get body(){return this[ye].stream}get bodyUsed(){return this[ye].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:t,byteLength:s}=await ti(this);return e.slice(t,t+s)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let s=new yt,o=new URLSearchParams(await this.text());for(let[a,u]of o)s.append(a,u);return s}let{toFormData:t}=await Promise.resolve().then(()=>(qa(),La));return t(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[ye].body&&this[ye].body.type||"",t=await this.arrayBuffer();return new He([t],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await ti(this);return new TextDecoder().decode(e)}buffer(){return ti(this)}};ze.prototype.buffer=ri(ze.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(ze.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:ri(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function ti(r){if(r[ye].disturbed)throw new TypeError(`body used already for: ${r.url}`);if(r[ye].disturbed=!0,r[ye].error)throw r[ye].error;let{body:e}=r;if(e===null)return ve.alloc(0);if(!(e instanceof ot))return ve.alloc(0);let t=[],s=0;try{for await(let o of e){if(r.size>0&&s+o.length>r.size){let a=new be(`content size at ${r.url} over limit: ${r.size}`,"max-size");throw e.destroy(a),a}s+=o.length,t.push(o)}}catch(o){throw o instanceof Ge?o:new be(`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")?ve.from(t.join("")):ve.concat(t,s)}catch(o){throw new be(`Could not create Buffer from response body for ${r.url}: ${o.message}`,"system",o)}else throw new be(`Premature close of server response while trying to fetch ${r.url}`)}var jt=(r,e)=>{let t,s,{body:o}=r[ye];if(r.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof ot&&typeof o.getBoundary!="function"&&(t=new Da({highWaterMark:e}),s=new Da({highWaterMark:e}),o.pipe(t),o.pipe(s),r[ye].stream=t,o=s),o},dd=ri(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"),qn=(r,e)=>r===null?null:typeof r=="string"?"text/plain;charset=UTF-8":Zs(r)?"application/x-www-form-urlencoded;charset=UTF-8":Or(r)?r.type||null:ve.isBuffer(r)||Ba.isAnyArrayBuffer(r)||ArrayBuffer.isView(r)?null:r instanceof yt?`multipart/form-data; boundary=${e[ye].boundary}`:r&&typeof r.getBoundary=="function"?`multipart/form-data;boundary=${dd(r)}`:r instanceof ot?null:"text/plain;charset=UTF-8",Na=r=>{let{body:e}=r[ye];return e===null?0:Or(e)?e.size:ve.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},za=async(r,{body:e})=>{e===null?r.end():await hd(e,r)};import{types as Fa}from"util";import Bn from"http";var Dn=typeof Bn.validateHeaderName=="function"?Bn.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}},ni=typeof Bn.validateHeaderValue=="function"?Bn.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}},he=class extends URLSearchParams{constructor(e){let t=[];if(e instanceof he){let s=e.raw();for(let[o,a]of Object.entries(s))t.push(...a.map(u=>[o,u]))}else if(e!=null)if(typeof e=="object"&&!Fa.isBoxedPrimitive(e)){let s=e[Symbol.iterator];if(s==null)t.push(...Object.entries(e));else{if(typeof s!="function")throw new TypeError("Header pairs must be iterable");t=[...e].map(o=>{if(typeof o!="object"||Fa.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(([s,o])=>(Dn(s),ni(s,String(o)),[String(s).toLowerCase(),String(o)])):void 0,super(t),new Proxy(this,{get(s,o,a){switch(o){case"append":case"set":return(u,d)=>(Dn(u),ni(u,String(d)),URLSearchParams.prototype[o].call(s,String(u).toLowerCase(),String(d)));case"delete":case"has":case"getAll":return u=>(Dn(u),URLSearchParams.prototype[o].call(s,String(u).toLowerCase()));case"keys":return()=>(s.sort(),new Set(URLSearchParams.prototype.keys.call(s)).keys());default:return Reflect.get(s,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 s=t.join(", ");return/^content-encoding$/i.test(e)&&(s=s.toLowerCase()),s}forEach(e,t=void 0){for(let s of this.keys())Reflect.apply(e,t,[this.get(s),s,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 s=this.getAll(t);return t==="host"?e[t]=s[0]:e[t]=s.length>1?s:s[0],e},{})}};Object.defineProperties(he.prototype,["get","entries","forEach","values"].reduce((r,e)=>(r[e]={enumerable:!0},r),{}));function Wa(r=[]){return new he(r.reduce((e,t,s,o)=>(s%2===0&&e.push(o.slice(s,s+2)),e),[]).filter(([e,t])=>{try{return Dn(e),ni(e,String(t)),!0}catch{return!1}}))}var pd=new Set([301,302,303,307,308]),Nn=r=>pd.has(r);var Le=Symbol("Response internals"),le=class extends ze{constructor(e=null,t={}){super(e,t);let s=t.status!=null?t.status:200,o=new he(t.headers);if(e!==null&&!o.has("Content-Type")){let a=qn(e,this);a&&o.append("Content-Type",a)}this[Le]={type:"default",url:t.url,status:s,statusText:t.statusText||"",headers:o,counter:t.counter,highWaterMark:t.highWaterMark}}get type(){return this[Le].type}get url(){return this[Le].url||""}get status(){return this[Le].status}get ok(){return this[Le].status>=200&&this[Le].status<300}get redirected(){return this[Le].counter>0}get statusText(){return this[Le].statusText}get headers(){return this[Le].headers}get highWaterMark(){return this[Le].highWaterMark}clone(){return new le(jt(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(!Nn(t))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new le(null,{headers:{location:new URL(e).toString()},status:t})}static error(){let e=new le(null,{status:0,statusText:""});return e[Le].type="error",e}static json(e=void 0,t={}){let s=JSON.stringify(e);if(s===void 0)throw new TypeError("data is not JSON serializable");let o=new he(t&&t.headers);return o.has("content-type")||o.set("content-type","application/json"),new le(s,{...t,headers:o})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(le.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 bd}from"url";import{deprecate as yd}from"util";var ka=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 md}from"net";function ja(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 Ua=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Ma="strict-origin-when-cross-origin";function Ha(r){if(!Ua.has(r))throw new TypeError(`Invalid referrerPolicy: ${r}`);return r}function gd(r){if(/^(http|ws)s:$/.test(r.protocol))return!0;let e=r.host.replace(/(^\[)|(]$)/g,""),t=md(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 Ut(r){return/^about:(blank|srcdoc)$/.test(r)||r.protocol==="data:"||/^(blob|filesystem):$/.test(r.protocol)?!0:gd(r)}function Ga(r,{referrerURLCallback:e,referrerOriginCallback:t}={}){if(r.referrer==="no-referrer"||r.referrerPolicy==="")return null;let s=r.referrerPolicy;if(r.referrer==="about:client")return"no-referrer";let o=r.referrer,a=ja(o),u=ja(o,!0);a.toString().length>4096&&(a=u),e&&(a=e(a)),t&&(u=t(u));let d=new URL(r.url);switch(s){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return a;case"strict-origin":return Ut(a)&&!Ut(d)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return a.origin===d.origin?a:Ut(a)&&!Ut(d)?"no-referrer":u;case"same-origin":return a.origin===d.origin?a:"no-referrer";case"origin-when-cross-origin":return a.origin===d.origin?a:u;case"no-referrer-when-downgrade":return Ut(a)&&!Ut(d)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${s}`)}}function Va(r){let e=(r.get("referrer-policy")||"").split(/[,\s]+/),t="";for(let s of e)s&&Ua.has(s)&&(t=s);return t}var ne=Symbol("Request internals"),xr=r=>typeof r=="object"&&typeof r[ne]=="object",Sd=yd(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),Ve=class extends ze{constructor(e,t={}){let s;if(xr(e)?s=new URL(e.url):(s=new URL(e),e={}),s.username!==""||s.password!=="")throw new TypeError(`${s} 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()),!xr(t)&&"data"in t&&Sd(),(t.body!=null||xr(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:xr(e)&&e.body!==null?jt(e):null;super(a,{size:t.size||e.size||0});let u=new he(t.headers||e.headers||{});if(a!==null&&!u.has("Content-Type")){let h=qn(a,this);h&&u.set("Content-Type",h)}let d=xr(e)?e.signal:null;if("signal"in t&&(d=t.signal),d!=null&&!Ta(d))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let f=t.referrer==null?e.referrer:t.referrer;if(f==="")f="no-referrer";else if(f){let h=new URL(f);f=/^about:(\/\/)?client$/.test(h)?"client":h}else f=void 0;this[ne]={method:o,redirect:t.redirect||e.redirect||"follow",headers:u,parsedURL:s,signal:d,referrer:f},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[ne].method}get url(){return bd(this[ne].parsedURL)}get headers(){return this[ne].headers}get redirect(){return this[ne].redirect}get signal(){return this[ne].signal}get referrer(){if(this[ne].referrer==="no-referrer")return"";if(this[ne].referrer==="client")return"about:client";if(this[ne].referrer)return this[ne].referrer.toString()}get referrerPolicy(){return this[ne].referrerPolicy}set referrerPolicy(e){this[ne].referrerPolicy=Ha(e)}clone(){return new Ve(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(Ve.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 Ya=r=>{let{parsedURL:e}=r[ne],t=new he(r[ne].headers);t.has("Accept")||t.set("Accept","*/*");let s=null;if(r.body===null&&/^(post|put)$/i.test(r.method)&&(s="0"),r.body!==null){let d=Na(r);typeof d=="number"&&!Number.isNaN(d)&&(s=String(d))}s&&t.set("Content-Length",s),r.referrerPolicy===""&&(r.referrerPolicy=Ma),r.referrer&&r.referrer!=="no-referrer"?r[ne].referrer=Ga(r):r[ne].referrer="no-referrer",r[ne].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=ka(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 zn=class extends Ge{constructor(e,t="aborted"){super(e,t)}};On();Ks();var Ed=new Set(["data:","http:","https:"]);async function Wn(r,e){return new Promise((t,s)=>{let o=new Ve(r,e),{parsedURL:a,options:u}=Ya(o);if(!Ed.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=pa(o.url),v=new le(S,{headers:{"Content-Type":S.typeFull}});t(v);return}let d=(a.protocol==="https:"?_d:wd).request,{signal:f}=o,h=null,g=()=>{let S=new zn("The operation was aborted.");s(S),o.body&&o.body instanceof Xa.Readable&&o.body.destroy(S),!(!h||!h.body)&&h.body.emit("error",S)};if(f&&f.aborted){g();return}let y=()=>{g(),p()},b=d(a.toString(),u);f&&f.addEventListener("abort",y);let p=()=>{b.abort(),f&&f.removeEventListener("abort",y)};b.on("error",S=>{s(new be(`request to ${o.url} failed, reason: ${S.message}`,"system",S)),p()}),Rd(b,S=>{h&&h.body&&h.body.destroy(S)}),process.version<"v14"&&b.on("socket",S=>{let v;S.prependListener("end",()=>{v=S._eventsCount}),S.prependListener("close",_=>{if(h&&v<S._eventsCount&&!_){let R=new Error("Premature close");R.code="ERR_STREAM_PREMATURE_CLOSE",h.body.emit("error",R)}})}),b.on("response",S=>{b.setTimeout(0);let v=Wa(S.rawHeaders);if(Nn(S.statusCode)){let T=v.get("Location"),q=null;try{q=T===null?null:new URL(T,o.url)}catch{if(o.redirect!=="manual"){s(new be(`uri requested responds with an invalid redirect URL: ${T}`,"invalid-redirect")),p();return}}switch(o.redirect){case"error":s(new be(`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){s(new be(`maximum redirect reached at: ${o.url}`,"max-redirect")),p();return}let D={headers:new he(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:jt(o),signal:o.signal,size:o.size,referrer:o.referrer,referrerPolicy:o.referrerPolicy};if(!Aa(o.url,q)||!$a(o.url,q))for(let U of["authorization","www-authenticate","cookie","cookie2"])D.headers.delete(U);if(S.statusCode!==303&&o.body&&e.body instanceof Xa.Readable){s(new be("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")&&(D.method="GET",D.body=void 0,D.headers.delete("content-length"));let x=Va(v);x&&(D.referrerPolicy=x),t(Wn(new Ve(q,D))),p();return}default:return s(new TypeError(`Redirect option '${o.redirect}' is not a valid value of RequestRedirect`))}}f&&S.once("end",()=>{f.removeEventListener("abort",y)});let _=Ht(S,new Qa,T=>{T&&s(T)});process.version<"v12.10"&&S.on("aborted",y);let R={url:o.url,status:S.statusCode,statusText:S.statusMessage,headers:v,size:o.size,counter:o.counter,highWaterMark:o.highWaterMark},O=v.get("Content-Encoding");if(!o.compress||o.method==="HEAD"||O===null||S.statusCode===204||S.statusCode===304){h=new le(_,R),t(h);return}let B={flush:Mt.Z_SYNC_FLUSH,finishFlush:Mt.Z_SYNC_FLUSH};if(O==="gzip"||O==="x-gzip"){_=Ht(_,Mt.createGunzip(B),T=>{T&&s(T)}),h=new le(_,R),t(h);return}if(O==="deflate"||O==="x-deflate"){let T=Ht(S,new Qa,q=>{q&&s(q)});T.once("data",q=>{(q[0]&15)===8?_=Ht(_,Mt.createInflate(),D=>{D&&s(D)}):_=Ht(_,Mt.createInflateRaw(),D=>{D&&s(D)}),h=new le(_,R),t(h)}),T.once("end",()=>{h||(h=new le(_,R),t(h))});return}if(O==="br"){_=Ht(_,Mt.createBrotliDecompress(),T=>{T&&s(T)}),h=new le(_,R),t(h);return}h=new le(_,R),t(h)}),za(b,o).catch(s)})}function Rd(r,e){let t=Fn.from(`0\r
16
+ `;function nl(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+=Xt(a+"[]")+o+Xt(f)+`
17
+ `}):d&&typeof d=="object"?t.push(a):i+=Xt(a)+o+Xt(d)+us}),e.section&&i.length&&(i="["+Xt(e.section)+"]"+us+i),t.forEach(function(a,u,h){var d=il(a).join("\\."),f=(e.section?e.section+".":"")+d,m=nl(r[a],{section:f,whitespace:e.whitespace});i.length&&m.length&&(i+=us),i+=m}),i}function il(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 Ld(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=Gn(f[1]),i==="__proto__"){t={};return}t=e[i]=e[i]||{};return}var m=Gn(f[2]);if(m!=="__proto__"){var y=f[3]?Gn(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=il(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 sl(r){return r.charAt(0)==='"'&&r.slice(-1)==='"'||r.charAt(0)==="'"&&r.slice(-1)==="'"}function Xt(r){return typeof r!="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&sl(r)||r!==r.trim()?JSON.stringify(r):r.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Gn(r,e){if(r=(r||"").trim(),sl(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 ul=T((wS,ll)=>{"use strict";var cs=1,al=2;function xd(){return""}function qd(r,e,t){return r.slice(e,t).replace(/\S/g," ")}ll.exports=function(r,e){e=e||{};for(var t,i,o=!1,a=!1,u=0,h="",d=e.whitespace===!1?xd:qd,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=cs,f++;else if(a===cs&&t+i===`\r
18
+ `){f++,a=!1,h+=d(r,u,f),u=f;continue}else if(a===cs&&t===`
19
+ `)a=!1,h+=d(r,u,f),u=f;else if(!a&&t+i==="/*"){h+=r.slice(u,f),u=f,a=al,f++;continue}else if(a===al&&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 fl=T(Qt=>{"use strict";var cl=_e("fs"),Dd=ol(),Dr=_e("path"),Bd=ul(),Fd=Qt.parse=function(r){return/^\s*{/.test(r)?JSON.parse(Bd(r)):Dd.parse(r)},Nd=Qt.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=Dr.join.apply(null,r),i;try{return cl.readFileSync(t,"utf-8")}catch{return}},ES=Qt.json=function(){var r=Nd.apply(null,arguments);return r?Fd(r):null},RS=Qt.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},vS=Qt.find=function(){var r=Dr.join.apply(null,[].slice.call(arguments));function e(t,i){var o=Dr.join(t,i);try{return cl.statSync(o),o}catch{if(Dr.dirname(t)!==t)return e(Dr.dirname(t),i)}}return e(process.cwd(),r)}});var bl=T((TS,gl)=>{"use strict";function dl(r){return r instanceof Buffer||r instanceof Date||r instanceof RegExp}function pl(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 ml(r){var e=[];return r.forEach(function(t,i){typeof t=="object"&&t!==null?Array.isArray(t)?e[i]=ml(t):dl(t)?e[i]=pl(t):e[i]=fs({},t):e[i]=t}),e}function hl(r,e){return e==="__proto__"?void 0:r[e]}var fs=gl.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=hl(r,u),t=hl(a,u),t!==r)if(typeof t!="object"||t===null){r[u]=t;return}else if(Array.isArray(t)){r[u]=ml(t);return}else if(dl(t)){r[u]=pl(t);return}else if(typeof i!="object"||i===null||Array.isArray(i)){r[u]=fs({},t);return}else{r[u]=fs(i,t);return}})}),r}});var Vn=T(($S,_l)=>{var Br=fl(),Kt=_e("path").join,zd=bl(),yl="/etc",Sl=process.platform==="win32",Fr=Sl?process.env.USERPROFILE:process.env.HOME;_l.exports=function(r,e,t,i){if(typeof r!="string")throw new Error("rc(name): name *must* be string");t||(t=Zi()(process.argv.slice(2))),e=(typeof e=="string"?Br.json(e):e)||{},i=i||Br.parse;var o=Br.env(r+"_"),a=[e],u=[];function h(d){if(!(u.indexOf(d)>=0)){var f=Br.file(d);f&&(a.push(i(f)),u.push(d))}}return Sl||[Kt(yl,r,"config"),Kt(yl,r+"rc")].forEach(h),Fr&&[Kt(Fr,".config",r,"config"),Kt(Fr,".config",r),Kt(Fr,"."+r,"config"),Kt(Fr,"."+r+"rc")].forEach(h),h(Br.find("."+r+"rc")),o.config&&h(o.config),t.config&&h(t.config),zd.apply(null,a.concat([o,t,u.length?{configs:u,config:u[u.length-1]}:void 0]))}});var Cl=T((CS,$l)=>{var hs=_e("url"),Al=rl(),Wd=Al.decodeBase64,kd=Al.encodeBase64,wl=":_authToken",El=":_auth",Rl=":username",vl=":_password";$l.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||Vn()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),r=r||e.npmrc.registry,Tl(r,e)||jd(e.npmrc)};function Tl(r,e){for(var t=hs.parse(r,!1,!0),i;i!=="/"&&t.pathname!==i;){i=t.pathname||"/";var o="//"+t.host+i.replace(/\/$/,""),a=Md(o,e.npmrc);if(a)return a;if(!e.recursive)return/\/$/.test(r)?void 0:Tl(hs.resolve(r,"."),e);t.pathname=hs.resolve(Ud(i),"..")||"/"}}function jd(r){if(r._auth){var e=Yn(r._auth);return{token:e,type:"Basic"}}}function Ud(r){return r[r.length-1]==="/"?r:r+"/"}function Md(r,e){var t=Hd(e[r+wl]||e[r+"/"+wl]);if(t)return t;var i=e[r+Rl]||e[r+"/"+Rl],o=e[r+vl]||e[r+"/"+vl],a=Gd(i,o);if(a)return a;var u=Vd(e[r+El]||e[r+"/"+El]);if(u)return u}function Yn(r){return r.replace(/^\$\{?([^}]*)\}?$/,function(e,t){return process.env[t]})}function Hd(r){if(r){var e=Yn(r);return{token:e,type:"Bearer"}}}function Gd(r,e){if(!(!r||!e)){var t=Wd(Yn(e)),i=kd(r+":"+t);return{token:i,type:"Basic",password:t,username:r}}}function Vd(r){if(r){var e=Yn(r);return{token:e,type:"Basic"}}}});var Pl=T((OS,Ol)=>{Ol.exports=function(r,e){var t=e||Vn()("npm",{registry:"https://registry.npmjs.org/"}),i=t[r+":registry"]||t.registry;return i.slice(-1)==="/"?i:i+"/"}});var Nr=T((PS,Il)=>{var Yd="2.0.0",Xd=Number.MAX_SAFE_INTEGER||9007199254740991,Qd=16;Il.exports={SEMVER_SPEC_VERSION:Yd,MAX_LENGTH:256,MAX_SAFE_INTEGER:Xd,MAX_SAFE_COMPONENT_LENGTH:Qd}});var zr=T((IS,Ll)=>{var Kd=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Ll.exports=Kd});var vt=T((ot,xl)=>{var{MAX_SAFE_COMPONENT_LENGTH:ds}=Nr(),Zd=zr();ot=xl.exports={};var Jd=ot.re=[],C=ot.src=[],O=ot.t={},ep=0,F=(r,e,t)=>{let i=ep++;Zd(r,i,e),O[r]=i,C[i]=e,Jd[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,${ds}})(?:\\.(\\d{1,${ds}}))?(?:\\.(\\d{1,${ds}}))?(?:$|[^\\d])`);F("COERCERTL",C[O.COERCE],!0);F("LONETILDE","(?:~>?)");F("TILDETRIM",`(\\s*)${C[O.LONETILDE]}\\s+`,!0);ot.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);ot.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);ot.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 Wr=T((LS,ql)=>{var tp=["includePrerelease","loose","rtl"],rp=r=>r?typeof r!="object"?{loose:!0}:tp.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};ql.exports=rp});var ps=T((xS,Fl)=>{var Dl=/^[0-9]+$/,Bl=(r,e)=>{let t=Dl.test(r),i=Dl.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:r<e?-1:1},np=(r,e)=>Bl(e,r);Fl.exports={compareIdentifiers:Bl,rcompareIdentifiers:np}});var ue=T((qS,kl)=>{var Xn=zr(),{MAX_LENGTH:Nl,MAX_SAFE_INTEGER:Qn}=Nr(),{re:zl,t:Wl}=vt(),ip=Wr(),{compareIdentifiers:Zt}=ps(),we=class{constructor(e,t){if(t=ip(t),e instanceof we){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>Nl)throw new TypeError(`version is longer than ${Nl} characters`);Xn("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?zl[Wl.LOOSE]:zl[Wl.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>Qn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Qn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Qn||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<Qn)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(Xn("SemVer.compare",this.version,this.options,e),!(e instanceof we)){if(typeof e=="string"&&e===this.version)return 0;e=new we(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof we||(e=new we(e,this.options)),Zt(this.major,e.major)||Zt(this.minor,e.minor)||Zt(this.patch,e.patch)}comparePre(e){if(e instanceof we||(e=new we(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(Xn("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 Zt(i,o)}while(++t)}compareBuild(e){e instanceof we||(e=new we(e,this.options));let t=0;do{let i=this.build[t],o=e.build[t];if(Xn("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 Zt(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&&(Zt(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}};kl.exports=we});var At=T((DS,Hl)=>{var{MAX_LENGTH:sp}=Nr(),{re:jl,t:Ul}=vt(),Ml=ue(),op=Wr(),ap=(r,e)=>{if(e=op(e),r instanceof Ml)return r;if(typeof r!="string"||r.length>sp||!(e.loose?jl[Ul.LOOSE]:jl[Ul.FULL]).test(r))return null;try{return new Ml(r,e)}catch{return null}};Hl.exports=ap});var Vl=T((BS,Gl)=>{var lp=At(),up=(r,e)=>{let t=lp(r,e);return t?t.version:null};Gl.exports=up});var Xl=T((FS,Yl)=>{var cp=At(),fp=(r,e)=>{let t=cp(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Yl.exports=fp});var Zl=T((NS,Kl)=>{var Ql=ue(),hp=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new Ql(r instanceof Ql?r.version:r,t).inc(e,i).version}catch{return null}};Kl.exports=hp});var Ae=T((zS,eu)=>{var Jl=ue(),dp=(r,e,t)=>new Jl(r,t).compare(new Jl(e,t));eu.exports=dp});var Kn=T((WS,tu)=>{var pp=Ae(),mp=(r,e,t)=>pp(r,e,t)===0;tu.exports=mp});var iu=T((kS,nu)=>{var ru=At(),gp=Kn(),bp=(r,e)=>{if(gp(r,e))return null;{let t=ru(r),i=ru(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}};nu.exports=bp});var ou=T((jS,su)=>{var yp=ue(),Sp=(r,e)=>new yp(r,e).major;su.exports=Sp});var lu=T((US,au)=>{var _p=ue(),wp=(r,e)=>new _p(r,e).minor;au.exports=wp});var cu=T((MS,uu)=>{var Ep=ue(),Rp=(r,e)=>new Ep(r,e).patch;uu.exports=Rp});var hu=T((HS,fu)=>{var vp=At(),Ap=(r,e)=>{let t=vp(r,e);return t&&t.prerelease.length?t.prerelease:null};fu.exports=Ap});var pu=T((GS,du)=>{var Tp=Ae(),$p=(r,e,t)=>Tp(e,r,t);du.exports=$p});var gu=T((VS,mu)=>{var Cp=Ae(),Op=(r,e)=>Cp(r,e,!0);mu.exports=Op});var Zn=T((YS,yu)=>{var bu=ue(),Pp=(r,e,t)=>{let i=new bu(r,t),o=new bu(e,t);return i.compare(o)||i.compareBuild(o)};yu.exports=Pp});var _u=T((XS,Su)=>{var Ip=Zn(),Lp=(r,e)=>r.sort((t,i)=>Ip(t,i,e));Su.exports=Lp});var Eu=T((QS,wu)=>{var xp=Zn(),qp=(r,e)=>r.sort((t,i)=>xp(i,t,e));wu.exports=qp});var kr=T((KS,Ru)=>{var Dp=Ae(),Bp=(r,e,t)=>Dp(r,e,t)>0;Ru.exports=Bp});var Jn=T((ZS,vu)=>{var Fp=Ae(),Np=(r,e,t)=>Fp(r,e,t)<0;vu.exports=Np});var ms=T((JS,Au)=>{var zp=Ae(),Wp=(r,e,t)=>zp(r,e,t)!==0;Au.exports=Wp});var ei=T((e_,Tu)=>{var kp=Ae(),jp=(r,e,t)=>kp(r,e,t)>=0;Tu.exports=jp});var ti=T((t_,$u)=>{var Up=Ae(),Mp=(r,e,t)=>Up(r,e,t)<=0;$u.exports=Mp});var gs=T((r_,Cu)=>{var Hp=Kn(),Gp=ms(),Vp=kr(),Yp=ei(),Xp=Jn(),Qp=ti(),Kp=(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 Hp(r,t,i);case"!=":return Gp(r,t,i);case">":return Vp(r,t,i);case">=":return Yp(r,t,i);case"<":return Xp(r,t,i);case"<=":return Qp(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};Cu.exports=Kp});var Pu=T((n_,Ou)=>{var Zp=ue(),Jp=At(),{re:ri,t:ni}=vt(),em=(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(ri[ni.COERCE]);else{let i;for(;(i=ri[ni.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),ri[ni.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;ri[ni.COERCERTL].lastIndex=-1}return t===null?null:Jp(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};Ou.exports=em});var Lu=T((i_,Iu)=>{"use strict";Iu.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var qu=T((s_,xu)=>{"use strict";xu.exports=H;H.Node=Tt;H.create=H;function H(r){var e=this;if(e instanceof H||(e=new H),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}H.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};H.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++}};H.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++}};H.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)rm(this,arguments[r]);return this.length};H.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)nm(this,arguments[r]);return this.length};H.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}};H.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}};H.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};H.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};H.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};H.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};H.prototype.map=function(r,e){e=e||this;for(var t=new H,i=this.head;i!==null;)t.push(r.call(e,i.value,this)),i=i.next;return t};H.prototype.mapReverse=function(r,e){e=e||this;for(var t=new H,i=this.tail;i!==null;)t.push(r.call(e,i.value,this)),i=i.prev;return t};H.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};H.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};H.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};H.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};H.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 H;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};H.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 H;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};H.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=tm(this,o,t[i]);return a};H.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 tm(r,e,t){var i=e===r.head?new Tt(t,null,e,r):new Tt(t,e,e.next,r);return i.next===null&&(r.tail=i),i.prev===null&&(r.head=i),r.length++,i}function rm(r,e){r.tail=new Tt(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function nm(r,e){r.head=new Tt(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Tt(r,e,t,i){if(!(this instanceof Tt))return new Tt(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{Lu()(H)}catch{}});var zu=T((o_,Nu)=>{"use strict";var im=qu(),$t=Symbol("max"),Xe=Symbol("length"),Jt=Symbol("lengthCalculator"),Ur=Symbol("allowStale"),Ct=Symbol("maxAge"),Ye=Symbol("dispose"),Du=Symbol("noDisposeOnSet"),ne=Symbol("lruList"),qe=Symbol("cache"),Fu=Symbol("updateAgeOnGet"),bs=()=>1,Ss=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[$t]=e.max||1/0,i=e.length||bs;if(this[Jt]=typeof i!="function"?bs:i,this[Ur]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ct]=e.maxAge||0,this[Ye]=e.dispose,this[Du]=e.noDisposeOnSet||!1,this[Fu]=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[$t]=e||1/0,jr(this)}get max(){return this[$t]}set allowStale(e){this[Ur]=!!e}get allowStale(){return this[Ur]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ct]=e,jr(this)}get maxAge(){return this[Ct]}set lengthCalculator(e){typeof e!="function"&&(e=bs),e!==this[Jt]&&(this[Jt]=e,this[Xe]=0,this[ne].forEach(t=>{t.length=this[Jt](t.value,t.key),this[Xe]+=t.length})),jr(this)}get lengthCalculator(){return this[Jt]}get length(){return this[Xe]}get itemCount(){return this[ne].length}rforEach(e,t){t=t||this;for(let i=this[ne].tail;i!==null;){let o=i.prev;Bu(this,e,i,t),i=o}}forEach(e,t){t=t||this;for(let i=this[ne].head;i!==null;){let o=i.next;Bu(this,e,i,t),i=o}}keys(){return this[ne].toArray().map(e=>e.key)}values(){return this[ne].toArray().map(e=>e.value)}reset(){this[Ye]&&this[ne]&&this[ne].length&&this[ne].forEach(e=>this[Ye](e.key,e.value)),this[qe]=new Map,this[ne]=new im,this[Xe]=0}dump(){return this[ne].map(e=>ii(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[ne]}set(e,t,i){if(i=i||this[Ct],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let o=i?Date.now():0,a=this[Jt](t,e);if(this[qe].has(e)){if(a>this[$t])return er(this,this[qe].get(e)),!1;let d=this[qe].get(e).value;return this[Ye]&&(this[Du]||this[Ye](e,d.value)),d.now=o,d.maxAge=i,d.value=t,this[Xe]+=a-d.length,d.length=a,this.get(e),jr(this),!0}let u=new _s(e,t,a,o,i);return u.length>this[$t]?(this[Ye]&&this[Ye](e,t),!1):(this[Xe]+=u.length,this[ne].unshift(u),this[qe].set(e,this[ne].head),jr(this),!0)}has(e){if(!this[qe].has(e))return!1;let t=this[qe].get(e).value;return!ii(this,t)}get(e){return ys(this,e,!0)}peek(e){return ys(this,e,!1)}pop(){let e=this[ne].tail;return e?(er(this,e),e.value):null}del(e){er(this,this[qe].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[qe].forEach((e,t)=>ys(this,t,!1))}},ys=(r,e,t)=>{let i=r[qe].get(e);if(i){let o=i.value;if(ii(r,o)){if(er(r,i),!r[Ur])return}else t&&(r[Fu]&&(i.value.now=Date.now()),r[ne].unshiftNode(i));return o.value}},ii=(r,e)=>{if(!e||!e.maxAge&&!r[Ct])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Ct]&&t>r[Ct]},jr=r=>{if(r[Xe]>r[$t])for(let e=r[ne].tail;r[Xe]>r[$t]&&e!==null;){let t=e.prev;er(r,e),e=t}},er=(r,e)=>{if(e){let t=e.value;r[Ye]&&r[Ye](t.key,t.value),r[Xe]-=t.length,r[qe].delete(t.key),r[ne].removeNode(e)}},_s=class{constructor(e,t,i,o,a){this.key=e,this.value=t,this.length=i,this.now=o,this.maxAge=a||0}},Bu=(r,e,t,i)=>{let o=t.value;ii(r,o)&&(er(r,t),r[Ur]||(o=void 0)),o&&e.call(i,o.value,o.key,r)};Nu.exports=Ss});var Te=T((a_,Uu)=>{var Ot=class{constructor(e,t){if(t=om(t),e instanceof Ot)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Ot(e.raw,t);if(e instanceof ws)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=>!ku(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&&fm(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=Wu.get(i);if(o)return o;let a=this.options.loose,u=a?ye[de.HYPHENRANGELOOSE]:ye[de.HYPHENRANGE];e=e.replace(u,wm(this.options.includePrerelease)),K("hyphen replace",e),e=e.replace(ye[de.COMPARATORTRIM],lm),K("comparator trim",e),e=e.replace(ye[de.TILDETRIM],um),e=e.replace(ye[de.CARETTRIM],cm),e=e.split(/\s+/).join(" ");let h=e.split(" ").map(y=>hm(y,this.options)).join(" ").split(/\s+/).map(y=>_m(y,this.options));a&&(h=h.filter(y=>(K("loose invalid filter",y,this.options),!!y.match(ye[de.COMPARATORLOOSE])))),K("range list",h);let d=new Map,f=h.map(y=>new ws(y,this.options));for(let y of f){if(ku(y))return[y];d.set(y.value,y)}d.size>1&&d.has("")&&d.delete("");let m=[...d.values()];return Wu.set(i,m),m}intersects(e,t){if(!(e instanceof Ot))throw new TypeError("a Range is required");return this.set.some(i=>ju(i,t)&&e.set.some(o=>ju(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 am(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(Em(this.set[t],e,this.options))return!0;return!1}};Uu.exports=Ot;var sm=zu(),Wu=new sm({max:1e3}),om=Wr(),ws=Mr(),K=zr(),am=ue(),{re:ye,t:de,comparatorTrimReplace:lm,tildeTrimReplace:um,caretTrimReplace:cm}=vt(),ku=r=>r.value==="<0.0.0-0",fm=r=>r.value==="",ju=(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},hm=(r,e)=>(K("comp",r,e),r=mm(r,e),K("caret",r),r=dm(r,e),K("tildes",r),r=bm(r,e),K("xrange",r),r=Sm(r,e),K("stars",r),r),pe=r=>!r||r.toLowerCase()==="x"||r==="*",dm=(r,e)=>r.trim().split(/\s+/).map(t=>pm(t,e)).join(" "),pm=(r,e)=>{let t=e.loose?ye[de.TILDELOOSE]:ye[de.TILDE];return r.replace(t,(i,o,a,u,h)=>{K("tilde",r,i,o,a,u,h);let d;return pe(o)?d="":pe(a)?d=`>=${o}.0.0 <${+o+1}.0.0-0`:pe(u)?d=`>=${o}.${a}.0 <${o}.${+a+1}.0-0`:h?(K("replaceTilde pr",h),d=`>=${o}.${a}.${u}-${h} <${o}.${+a+1}.0-0`):d=`>=${o}.${a}.${u} <${o}.${+a+1}.0-0`,K("tilde return",d),d})},mm=(r,e)=>r.trim().split(/\s+/).map(t=>gm(t,e)).join(" "),gm=(r,e)=>{K("caret",r,e);let t=e.loose?ye[de.CARETLOOSE]:ye[de.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(o,a,u,h,d)=>{K("caret",r,o,a,u,h,d);let f;return pe(a)?f="":pe(u)?f=`>=${a}.0.0${i} <${+a+1}.0.0-0`:pe(h)?a==="0"?f=`>=${a}.${u}.0${i} <${a}.${+u+1}.0-0`:f=`>=${a}.${u}.0${i} <${+a+1}.0.0-0`:d?(K("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`):(K("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`),K("caret return",f),f})},bm=(r,e)=>(K("replaceXRanges",r,e),r.split(/\s+/).map(t=>ym(t,e)).join(" ")),ym=(r,e)=>{r=r.trim();let t=e.loose?ye[de.XRANGELOOSE]:ye[de.XRANGE];return r.replace(t,(i,o,a,u,h,d)=>{K("xRange",r,i,o,a,u,h,d);let f=pe(a),m=f||pe(u),y=m||pe(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`),K("xRange return",i),i})},Sm=(r,e)=>(K("replaceStars",r,e),r.trim().replace(ye[de.STAR],"")),_m=(r,e)=>(K("replaceGTE0",r,e),r.trim().replace(ye[e.includePrerelease?de.GTE0PRE:de.GTE0],"")),wm=r=>(e,t,i,o,a,u,h,d,f,m,y,g,p)=>(pe(i)?t="":pe(o)?t=`>=${i}.0.0${r?"-0":""}`:pe(a)?t=`>=${i}.${o}.0${r?"-0":""}`:u?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,pe(f)?d="":pe(m)?d=`<${+f+1}.0.0-0`:pe(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()),Em=(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(K(r[i].semver),r[i].semver!==ws.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 Mr=T((l_,Yu)=>{var Hr=Symbol("SemVer ANY"),tr=class{static get ANY(){return Hr}constructor(e,t){if(t=Rm(t),e instanceof tr){if(e.loose===!!t.loose)return e;e=e.value}Rs("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Hr?this.value="":this.value=this.operator+this.semver.version,Rs("comp",this)}parse(e){let t=this.options.loose?Mu[Hu.COMPARATORLOOSE]:Mu[Hu.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 Gu(i[2],this.options.loose):this.semver=Hr}toString(){return this.value}test(e){if(Rs("Comparator.test",e,this.options.loose),this.semver===Hr||e===Hr)return!0;if(typeof e=="string")try{e=new Gu(e,this.options)}catch{return!1}return Es(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof tr))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Vu(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new Vu(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=Es(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),d=Es(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||o||a&&u||h||d}};Yu.exports=tr;var Rm=Wr(),{re:Mu,t:Hu}=vt(),Es=gs(),Rs=zr(),Gu=ue(),Vu=Te()});var Gr=T((u_,Xu)=>{var vm=Te(),Am=(r,e,t)=>{try{e=new vm(e,t)}catch{return!1}return e.test(r)};Xu.exports=Am});var Ku=T((c_,Qu)=>{var Tm=Te(),$m=(r,e)=>new Tm(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));Qu.exports=$m});var Ju=T((f_,Zu)=>{var Cm=ue(),Om=Te(),Pm=(r,e,t)=>{let i=null,o=null,a=null;try{a=new Om(e,t)}catch{return null}return r.forEach(u=>{a.test(u)&&(!i||o.compare(u)===-1)&&(i=u,o=new Cm(i,t))}),i};Zu.exports=Pm});var tc=T((h_,ec)=>{var Im=ue(),Lm=Te(),xm=(r,e,t)=>{let i=null,o=null,a=null;try{a=new Lm(e,t)}catch{return null}return r.forEach(u=>{a.test(u)&&(!i||o.compare(u)===1)&&(i=u,o=new Im(i,t))}),i};ec.exports=xm});var ic=T((d_,nc)=>{var vs=ue(),qm=Te(),rc=kr(),Dm=(r,e)=>{r=new qm(r,e);let t=new vs("0.0.0");if(r.test(t)||(t=new vs("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 vs(u.semver.version);switch(u.operator){case">":h.prerelease.length===0?h.patch++:h.prerelease.push(0),h.raw=h.format();case"":case">=":(!a||rc(h,a))&&(a=h);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),a&&(!t||rc(t,a))&&(t=a)}return t&&r.test(t)?t:null};nc.exports=Dm});var oc=T((p_,sc)=>{var Bm=Te(),Fm=(r,e)=>{try{return new Bm(r,e).range||"*"}catch{return null}};sc.exports=Fm});var si=T((m_,cc)=>{var Nm=ue(),uc=Mr(),{ANY:zm}=uc,Wm=Te(),km=Gr(),ac=kr(),lc=Jn(),jm=ti(),Um=ei(),Mm=(r,e,t,i)=>{r=new Nm(r,i),e=new Wm(e,i);let o,a,u,h,d;switch(t){case">":o=ac,a=jm,u=lc,h=">",d=">=";break;case"<":o=lc,a=Um,u=ac,h="<",d="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(km(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===zm&&(p=new uc(">=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};cc.exports=Mm});var hc=T((g_,fc)=>{var Hm=si(),Gm=(r,e,t)=>Hm(r,e,">",t);fc.exports=Gm});var pc=T((b_,dc)=>{var Vm=si(),Ym=(r,e,t)=>Vm(r,e,"<",t);dc.exports=Ym});var bc=T((y_,gc)=>{var mc=Te(),Xm=(r,e,t)=>(r=new mc(r,t),e=new mc(e,t),r.intersects(e));gc.exports=Xm});var Sc=T((S_,yc)=>{var Qm=Gr(),Km=Ae();yc.exports=(r,e,t)=>{let i=[],o=null,a=null,u=r.sort((m,y)=>Km(m,y,t));for(let m of u)Qm(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 vc=T((__,Rc)=>{var _c=Te(),oi=Mr(),{ANY:As}=oi,Vr=Gr(),Ts=Ae(),Zm=(r,e,t={})=>{if(r===e)return!0;r=new _c(r,t),e=new _c(e,t);let i=!1;e:for(let o of r.set){for(let a of e.set){let u=Jm(o,a,t);if(i=i||u!==null,u)continue e}if(i)return!1}return!0},Jm=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===As){if(e.length===1&&e[0].semver===As)return!0;t.includePrerelease?r=[new oi(">=0.0.0-0")]:r=[new oi(">=0.0.0")]}if(e.length===1&&e[0].semver===As){if(t.includePrerelease)return!0;e=[new oi(">=0.0.0")]}let i=new Set,o,a;for(let p of r)p.operator===">"||p.operator===">="?o=wc(o,p,t):p.operator==="<"||p.operator==="<="?a=Ec(a,p,t):i.add(p.semver);if(i.size>1)return null;let u;if(o&&a){if(u=Ts(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&&!Vr(p,String(o),t)||a&&!Vr(p,String(a),t))return null;for(let S of e)if(!Vr(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=wc(o,p,t),h===p&&h!==o)return!1}else if(o.operator===">="&&!Vr(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=Ec(a,p,t),d===p&&d!==a)return!1}else if(a.operator==="<="&&!Vr(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)},wc=(r,e,t)=>{if(!r)return e;let i=Ts(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},Ec=(r,e,t)=>{if(!r)return e;let i=Ts(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};Rc.exports=Zm});var $c=T((w_,Tc)=>{var $s=vt(),eg=Nr(),tg=ue(),Ac=ps(),rg=At(),ng=Vl(),ig=Xl(),sg=Zl(),og=iu(),ag=ou(),lg=lu(),ug=cu(),cg=hu(),fg=Ae(),hg=pu(),dg=gu(),pg=Zn(),mg=_u(),gg=Eu(),bg=kr(),yg=Jn(),Sg=Kn(),_g=ms(),wg=ei(),Eg=ti(),Rg=gs(),vg=Pu(),Ag=Mr(),Tg=Te(),$g=Gr(),Cg=Ku(),Og=Ju(),Pg=tc(),Ig=ic(),Lg=oc(),xg=si(),qg=hc(),Dg=pc(),Bg=bc(),Fg=Sc(),Ng=vc();Tc.exports={parse:rg,valid:ng,clean:ig,inc:sg,diff:og,major:ag,minor:lg,patch:ug,prerelease:cg,compare:fg,rcompare:hg,compareLoose:dg,compareBuild:pg,sort:mg,rsort:gg,gt:bg,lt:yg,eq:Sg,neq:_g,gte:wg,lte:Eg,cmp:Rg,coerce:vg,Comparator:Ag,Range:Tg,satisfies:$g,toComparators:Cg,maxSatisfying:Og,minSatisfying:Pg,minVersion:Ig,validRange:Lg,outside:xg,gtr:qg,ltr:Dg,intersects:Bg,simplifyRange:Fg,subset:Ng,SemVer:tg,re:$s.re,src:$s.src,tokens:$s.t,SEMVER_SPEC_VERSION:eg.SEMVER_SPEC_VERSION,compareIdentifiers:Ac.compareIdentifiers,rcompareIdentifiers:Ac.rcompareIdentifiers}});var Lc=T((E_,Ic)=>{Ic.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=Oc(r,function(d,f){return Pc(f,function(m,y){var g=Cc(m);(!d[y]||g>d[y])&&(d[y]=g)}),d},[]),u=ai(r,function(d){return ai(d,function(f,m){var y=String(f);if(i[m]==="."){var g=Cc(y),p=a[m]+(/\./.test(y)?1:2)-(o(y)-g);return y+Array(p).join(" ")}else return y})}),h=Oc(u,function(d,f){return Pc(f,function(m,y){var g=o(m);(!d[y]||g>d[y])&&(d[y]=g)}),d},[]);return ai(u,function(d){return ai(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 Cc(r){var e=/\.[^.]*$/.exec(r);return e?e.index+1:r.length}function Oc(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 Pc(r,e){if(r.forEach)return r.forEach(e);for(var t=0;t<r.length;t++)e.call(r,r[t],t)}function ai(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 Fc=T((A_,Bc)=>{var Yr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,zg=typeof AbortController=="function",li=zg?AbortController:class{constructor(){this.signal=new xc}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})}},Wg=typeof AbortSignal=="function",kg=typeof li.AbortSignal=="function",xc=Wg?AbortSignal:kg?li.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))}},Is=new Set,Cs=(r,e)=>{let t=`LRU_CACHE_OPTION_${r}`;ui(t)&&Ls(t,`${r} option`,`options.${e}`,Qe)},Os=(r,e)=>{let t=`LRU_CACHE_METHOD_${r}`;if(ui(t)){let{prototype:i}=Qe,{get:o}=Object.getOwnPropertyDescriptor(i,r);Ls(t,`${r} method`,`cache.${e}()`,o)}},jg=(r,e)=>{let t=`LRU_CACHE_PROPERTY_${r}`;if(ui(t)){let{prototype:i}=Qe,{get:o}=Object.getOwnPropertyDescriptor(i,r);Ls(t,`${r} property`,`cache.${e}`,o)}},qc=(...r)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...r):console.error(...r)},ui=r=>!Is.has(r),Ls=(r,e,t,i)=>{Is.add(r);let o=`The ${e} is deprecated. Please use ${t} instead.`;qc(o,"DeprecationWarning",r,i)},at=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),Dc=r=>at(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?rr:null:null,rr=class extends Array{constructor(e){super(e),this.fill(0)}},Ps=class{constructor(e){if(e===0)return[];let t=Dc(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Qe=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:j,stale:X}=e instanceof Qe?{}:e;if(t!==0&&!at(t))throw new TypeError("max option must be a nonnegative integer");let Q=t?Dc(t):Array;if(!Q)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 Q(t),this.prev=new Q(t),this.head=0,this.tail=0,this.free=new Ps(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&&!at(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!at(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!d||!!X,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!h,this.ttlResolution=at(o)||o===0?o:1,this.ttlAutopurge=!!a,this.ttl=i||j||0,this.ttl){if(!at(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 le="LRU_CACHE_UNBOUNDED";ui(le)&&(Is.add(le),qc("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",le,Qe))}X&&Cs("stale","allowStale"),j&&Cs("maxAge","ttl"),L&&Cs("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new rr(this.max),this.starts=new rr(this.max),this.setItemTTL=(i,o,a=Yr.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?Yr.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=Yr.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 rr(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(!at(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(t,e),!at(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 Os("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=Yr.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=Yr.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 li;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 X=t&&A.__staleWhileFetching!==void 0;return _&&(_.fetch="inflight",X&&(_.returnedStale=!0)),X?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,j=L&&t;return _&&(_.fetch=L&&q?"stale":"refresh",j&&q&&(_.returnedStale=!0)),j?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 Os("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 Os("reset","clear"),this.clear}get length(){return jg("length","size"),this.size}static get AbortController(){return li}static get AbortSignal(){return xc}};Bc.exports=Qe});var Wc=T((T_,zc)=>{"use strict";var G=(...r)=>r.every(e=>e)?r.join(""):"",J=r=>r?encodeURIComponent(r):"",Nc=r=>r.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),Ug={sshtemplate:({domain:r,user:e,project:t,committish:i})=>`git@${r}:${e}/${t}.git${G("#",i)}`,sshurltemplate:({domain:r,user:e,project:t,committish:i})=>`git+ssh://git@${r}/${e}/${t}.git${G("#",i)}`,edittemplate:({domain:r,user:e,project:t,committish:i,editpath:o,path:a})=>`https://${r}/${e}/${t}${G("/",o,"/",J(i||"HEAD"),"/",a)}`,browsetemplate:({domain:r,user:e,project:t,committish:i,treepath:o})=>`https://${r}/${e}/${t}${G("/",o,"/",J(i))}`,browsetreetemplate:({domain:r,user:e,project:t,committish:i,treepath:o,path:a,fragment:u,hashformat:h})=>`https://${r}/${e}/${t}/${o}/${J(i||"HEAD")}/${a}${G("#",h(u||""))}`,browseblobtemplate:({domain:r,user:e,project:t,committish:i,blobpath:o,path:a,fragment:u,hashformat:h})=>`https://${r}/${e}/${t}/${o}/${J(i||"HEAD")}/${a}${G("#",h(u||""))}`,docstemplate:({domain:r,user:e,project:t,treepath:i,committish:o})=>`https://${r}/${e}/${t}${G("/",i,"/",J(o))}#readme`,httpstemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git+https://${G(r,"@")}${e}/${t}/${i}.git${G("#",o)}`,filetemplate:({domain:r,user:e,project:t,committish:i,path:o})=>`https://${r}/${e}/${t}/raw/${J(i||"HEAD")}/${o}`,shortcuttemplate:({type:r,user:e,project:t,committish:i})=>`${r}:${e}/${t}${G("#",i)}`,pathtemplate:({user:r,project:e,committish:t})=>`${r}/${e}${G("#",t)}`,bugstemplate:({domain:r,user:e,project:t})=>`https://${r}/${e}/${t}/issues`,hashformat:Nc},lt={};lt.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://${G(r,"@")}raw.githubusercontent.com/${e}/${t}/${J(i||"HEAD")}/${o}`,gittemplate:({auth:r,domain:e,user:t,project:i,committish:o})=>`git://${G(r,"@")}${e}/${t}/${i}.git${G("#",o)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://codeload.${r}/${e}/${t}/tar.gz/${J(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}}};lt.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}${G("/",o,"/",J(i||"HEAD"),"/",a,u)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/get/${J(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)}}};lt.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://${G(r,"@")}${e}/${t}/${i}.git${G("#",o)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/repository/archive.tar.gz?ref=${J(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)}}};lt.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${G("#",t)}`,sshurltemplate:({domain:r,project:e,committish:t})=>`git+ssh://git@${r}/${e}.git${G("#",t)}`,edittemplate:({domain:r,user:e,project:t,committish:i,editpath:o})=>`https://${r}/${e}/${t}${G("/",J(i))}/${o}`,browsetemplate:({domain:r,project:e,committish:t})=>`https://${r}/${e}${G("/",J(t))}`,browsetreetemplate:({domain:r,project:e,committish:t,path:i,hashformat:o})=>`https://${r}/${e}${G("/",J(t))}${G("#",o(i))}`,browseblobtemplate:({domain:r,project:e,committish:t,path:i,hashformat:o})=>`https://${r}/${e}${G("/",J(t))}${G("#",o(i))}`,docstemplate:({domain:r,project:e,committish:t})=>`https://${r}/${e}${G("/",J(t))}`,httpstemplate:({domain:r,project:e,committish:t})=>`git+https://${r}/${e}.git${G("#",t)}`,filetemplate:({user:r,project:e,committish:t,path:i})=>`https://gist.githubusercontent.com/${r}/${e}/raw${G("/",J(t))}/${i}`,shortcuttemplate:({type:r,project:e,committish:t})=>`${r}:${e}${G("#",t)}`,pathtemplate:({project:r,committish:e})=>`${r}${G("#",e)}`,bugstemplate:({domain:r,project:e})=>`https://${r}/${e}`,gittemplate:({domain:r,project:e,committish:t})=>`git://${r}/${e}.git${G("#",t)}`,tarballtemplate:({project:r,committish:e})=>`https://codeload.github.com/gist/${r}/tar.gz/${J(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-"+Nc(r)}};lt.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/${J(i)||"HEAD"}/${o}`,httpstemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}.git${G("#",i)}`,tarballtemplate:({domain:r,user:e,project:t,committish:i})=>`https://${r}/${e}/${t}/archive/${J(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(lt))lt[r]=Object.assign({},Ug,e);zc.exports=lt});var qs=T(($_,jc)=>{var Mg=_e("url"),xs=(r,e,t)=>{let i=r.indexOf(t);return r.lastIndexOf(e,i>-1?i:1/0)},kc=r=>{try{return new Mg.URL(r)}catch{}},Hg=(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)}`},Gg=r=>{let e=xs(r,"@","#"),t=xs(r,":","#");return t>e&&(r=r.slice(0,t)+"/"+r.slice(t+1)),xs(r,":","#")===-1&&r.indexOf("//")===-1&&(r=`git+ssh://${r}`),r};jc.exports=(r,e)=>{let t=e?Hg(r,e):r;return kc(t)||kc(Gg(t))}});var Mc=T((C_,Uc)=>{"use strict";var Vg=qs(),Yg=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};Uc.exports=(r,e,{gitHosts:t,protocols:i})=>{var R,_;if(!r)return;let o=Yg(r)?`github:${r}`:r,a=Vg(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 Gc=T((O_,Hc)=>{"use strict";var Xg=Fc(),Qg=Wc(),Kg=Mc(),Zg=qs(),Ds=new Xg({max:1e3}),ut,Xr,te,ae,Ne=class{constructor(e,t,i,o,a,u,h={}){ie(this,te);Object.assign(this,k(Ne,ut)[e],{type:e,user:t,auth:i,project:o,committish:a,default:u,opts:h})}static addHost(e,t){k(Ne,ut)[e]=t,k(Ne,ut).byDomain[t.domain]=e,k(Ne,ut).byShortcut[`${e}:`]=e,k(Ne,Xr)[`${e}:`]={name:e}}static fromUrl(e,t){if(typeof e!="string")return;let i=e+JSON.stringify(t||{});if(!Ds.has(i)){let o=Kg(e,t,{gitHosts:k(Ne,ut),protocols:k(Ne,Xr)});Ds.set(i,o?new Ne(...o):void 0)}return Ds.get(i)}static parseUrl(e){return Zg(e)}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return se(this,te,ae).call(this,this.sshtemplate,e)}sshurl(e){return se(this,te,ae).call(this,this.sshurltemplate,e)}browse(e,...t){return typeof e!="string"?se(this,te,ae).call(this,this.browsetemplate,e):typeof t[0]!="string"?se(this,te,ae).call(this,this.browsetreetemplate,{...t[0],path:e}):se(this,te,ae).call(this,this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return typeof t[0]!="string"?se(this,te,ae).call(this,this.browseblobtemplate,{...t[0],path:e}):se(this,te,ae).call(this,this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return se(this,te,ae).call(this,this.docstemplate,e)}bugs(e){return se(this,te,ae).call(this,this.bugstemplate,e)}https(e){return se(this,te,ae).call(this,this.httpstemplate,e)}git(e){return se(this,te,ae).call(this,this.gittemplate,e)}shortcut(e){return se(this,te,ae).call(this,this.shortcuttemplate,e)}path(e){return se(this,te,ae).call(this,this.pathtemplate,e)}tarball(e){return se(this,te,ae).call(this,this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return se(this,te,ae).call(this,this.filetemplate,{...t,path:e})}edit(e,t){return se(this,te,ae).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)}},nr=Ne;ut=new WeakMap,Xr=new WeakMap,te=new WeakSet,ae=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},ie(nr,ut,{byShortcut:{},byDomain:{}}),ie(nr,Xr,{"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(Qg))nr.addHost(r,e);Hc.exports=nr});function Hi({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 Qi=Le(la(),1);var ua=Qi.default.HttpProxyAgent,ca=Qi.default.HttpsProxyAgent;var Ar=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 pa=Le(ha(),1);import{Agent as Qh}from"http";import{Agent as Kh}from"https";var Zh={agentCacheSize:512},da={maxSockets:64,keepAlive:!1},Tr=class extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,Tr)}};function Ki(r,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let t={...Zh,...e},i=new Ar({maxSize:t.agentCacheSize});async function o(u,h={}){let{origin:d,protocol:f}=new URL(u),m=h!=null&&h.noProxy?null:(0,pa.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?ca:ua)({...h,proxy:m}):g=new(p?Kh:Qh)(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,{...da,...d});R&&(f.agent=R)}else if(e.undici&&!("dispatcher"in f)){let R=await o(u,{...da,...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 Tr(`${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 tf=Le(Zi(),1);import Td from"http";import $d from"https";import Vt from"zlib";import Ja,{PassThrough as el,pipeline as Yt}from"stream";import{Buffer as Mn}from"buffer";function ed(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 ya=ed;Cr();Dn();import st,{PassThrough as za}from"stream";import{types as Wa,deprecate as as,promisify as bd}from"util";import{Buffer as ve}from"buffer";var Ge=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 ge=class extends Ge{constructor(e,t,i){super(e,t),i&&(this.code=this.errno=i.code,this.erroredSysCall=i.syscall)}};var Bn=Symbol.toStringTag,rs=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[Bn]==="URLSearchParams",Lr=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[Bn]),Oa=r=>typeof r=="object"&&(r[Bn]==="AbortSignal"||r[Bn]==="EventTarget"),Pa=(r,e)=>{let t=new URL(e).hostname,i=new URL(r).hostname;return t===i||t.endsWith(`.${i}`)},Ia=(r,e)=>{let t=new URL(e).protocol,i=new URL(r).protocol;return t===i};var yd=bd(st.pipeline),be=Symbol("Body internals"),Fe=class{constructor(e,{size:t=0}={}){let i=null;e===null?e=null:rs(e)?e=ve.from(e.toString()):Lr(e)||ve.isBuffer(e)||(Wa.isAnyArrayBuffer(e)?e=ve.from(e):ArrayBuffer.isView(e)?e=ve.from(e.buffer,e.byteOffset,e.byteLength):e instanceof st||(e instanceof St?(e=Ca(e),i=e.type.split("=")[1]):e=ve.from(String(e))));let o=e;ve.isBuffer(e)?o=st.Readable.from(e):Lr(e)&&(o=st.Readable.from(e.stream())),this[be]={body:e,stream:o,boundary:i,disturbed:!1,error:null},this.size=t,e instanceof st&&e.on("error",a=>{let u=a instanceof Ge?a:new ge(`Invalid response body while trying to fetch ${this.url}: ${a.message}`,"system",a);this[be].error=u})}get body(){return this[be].stream}get bodyUsed(){return this[be].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:t,byteLength:i}=await os(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 St,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(()=>(Na(),Fa));return t(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[be].body&&this[be].body.type||"",t=await this.arrayBuffer();return new He([t],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await os(this);return new TextDecoder().decode(e)}buffer(){return os(this)}};Fe.prototype.buffer=as(Fe.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Fe.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:as(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function os(r){if(r[be].disturbed)throw new TypeError(`body used already for: ${r.url}`);if(r[be].disturbed=!0,r[be].error)throw r[be].error;let{body:e}=r;if(e===null)return ve.alloc(0);if(!(e instanceof st))return ve.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 ge(`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 Ge?o:new ge(`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")?ve.from(t.join("")):ve.concat(t,i)}catch(o){throw new ge(`Could not create Buffer from response body for ${r.url}: ${o.message}`,"system",o)}else throw new ge(`Premature close of server response while trying to fetch ${r.url}`)}var Ht=(r,e)=>{let t,i,{body:o}=r[be];if(r.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof st&&typeof o.getBoundary!="function"&&(t=new za({highWaterMark:e}),i=new za({highWaterMark:e}),o.pipe(t),o.pipe(i),r[be].stream=t,o=i),o},Sd=as(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"),zn=(r,e)=>r===null?null:typeof r=="string"?"text/plain;charset=UTF-8":rs(r)?"application/x-www-form-urlencoded;charset=UTF-8":Lr(r)?r.type||null:ve.isBuffer(r)||Wa.isAnyArrayBuffer(r)||ArrayBuffer.isView(r)?null:r instanceof St?`multipart/form-data; boundary=${e[be].boundary}`:r&&typeof r.getBoundary=="function"?`multipart/form-data;boundary=${Sd(r)}`:r instanceof st?null:"text/plain;charset=UTF-8",ka=r=>{let{body:e}=r[be];return e===null?0:Lr(e)?e.size:ve.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},ja=async(r,{body:e})=>{e===null?r.end():await yd(e,r)};import{types as Ua}from"util";import kn from"http";var Wn=typeof kn.validateHeaderName=="function"?kn.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}},ls=typeof kn.validateHeaderValue=="function"?kn.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}},he=class extends URLSearchParams{constructor(e){let t=[];if(e instanceof he){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"&&!Ua.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"||Ua.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])=>(Wn(i),ls(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)=>(Wn(u),ls(u,String(h)),URLSearchParams.prototype[o].call(i,String(u).toLowerCase(),String(h)));case"delete":case"has":case"getAll":return u=>(Wn(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(he.prototype,["get","entries","forEach","values"].reduce((r,e)=>(r[e]={enumerable:!0},r),{}));function Ma(r=[]){return new he(r.reduce((e,t,i,o)=>(i%2===0&&e.push(o.slice(i,i+2)),e),[]).filter(([e,t])=>{try{return Wn(e),ls(e,String(t)),!0}catch{return!1}}))}var _d=new Set([301,302,303,307,308]),jn=r=>_d.has(r);var xe=Symbol("Response internals"),oe=class extends Fe{constructor(e=null,t={}){super(e,t);let i=t.status!=null?t.status:200,o=new he(t.headers);if(e!==null&&!o.has("Content-Type")){let a=zn(e,this);a&&o.append("Content-Type",a)}this[xe]={type:"default",url:t.url,status:i,statusText:t.statusText||"",headers:o,counter:t.counter,highWaterMark:t.highWaterMark}}get type(){return this[xe].type}get url(){return this[xe].url||""}get status(){return this[xe].status}get ok(){return this[xe].status>=200&&this[xe].status<300}get redirected(){return this[xe].counter>0}get statusText(){return this[xe].statusText}get headers(){return this[xe].headers}get highWaterMark(){return this[xe].highWaterMark}clone(){return new oe(Ht(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(!jn(t))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new oe(null,{headers:{location:new URL(e).toString()},status:t})}static error(){let e=new oe(null,{status:0,statusText:""});return e[xe].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 he(t&&t.headers);return o.has("content-type")||o.set("content-type","application/json"),new oe(i,{...t,headers:o})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(oe.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 Rd}from"url";import{deprecate as vd}from"util";var Ha=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 wd}from"net";function Ga(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 Va=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Ya="strict-origin-when-cross-origin";function Xa(r){if(!Va.has(r))throw new TypeError(`Invalid referrerPolicy: ${r}`);return r}function Ed(r){if(/^(http|ws)s:$/.test(r.protocol))return!0;let e=r.host.replace(/(^\[)|(]$)/g,""),t=wd(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 Gt(r){return/^about:(blank|srcdoc)$/.test(r)||r.protocol==="data:"||/^(blob|filesystem):$/.test(r.protocol)?!0:Ed(r)}function Qa(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=Ga(o),u=Ga(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 Gt(a)&&!Gt(h)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return a.origin===h.origin?a:Gt(a)&&!Gt(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 Gt(a)&&!Gt(h)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${i}`)}}function Ka(r){let e=(r.get("referrer-policy")||"").split(/[,\s]+/),t="";for(let i of e)i&&Va.has(i)&&(t=i);return t}var re=Symbol("Request internals"),qr=r=>typeof r=="object"&&typeof r[re]=="object",Ad=vd(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),Ve=class extends Fe{constructor(e,t={}){let i;if(qr(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()),!qr(t)&&"data"in t&&Ad(),(t.body!=null||qr(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:qr(e)&&e.body!==null?Ht(e):null;super(a,{size:t.size||e.size||0});let u=new he(t.headers||e.headers||{});if(a!==null&&!u.has("Content-Type")){let f=zn(a,this);f&&u.set("Content-Type",f)}let h=qr(e)?e.signal:null;if("signal"in t&&(h=t.signal),h!=null&&!Oa(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[re]={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[re].method}get url(){return Rd(this[re].parsedURL)}get headers(){return this[re].headers}get redirect(){return this[re].redirect}get signal(){return this[re].signal}get referrer(){if(this[re].referrer==="no-referrer")return"";if(this[re].referrer==="client")return"about:client";if(this[re].referrer)return this[re].referrer.toString()}get referrerPolicy(){return this[re].referrerPolicy}set referrerPolicy(e){this[re].referrerPolicy=Xa(e)}clone(){return new Ve(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(Ve.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[re],t=new he(r[re].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=ka(r);typeof h=="number"&&!Number.isNaN(h)&&(i=String(h))}i&&t.set("Content-Length",i),r.referrerPolicy===""&&(r.referrerPolicy=Ya),r.referrer&&r.referrer!=="no-referrer"?r[re].referrer=Qa(r):r[re].referrer="no-referrer",r[re].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=Ha(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 Un=class extends Ge{constructor(e,t="aborted"){super(e,t)}};Dn();is();var Cd=new Set(["data:","http:","https:"]);async function Hn(r,e){return new Promise((t,i)=>{let o=new Ve(r,e),{parsedURL:a,options:u}=Za(o);if(!Cd.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=ya(o.url),R=new oe(S,{headers:{"Content-Type":S.typeFull}});t(R);return}let h=(a.protocol==="https:"?$d:Td).request,{signal:d}=o,f=null,m=()=>{let S=new Un("The operation was aborted.");i(S),o.body&&o.body instanceof Ja.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 ge(`request to ${o.url} failed, reason: ${S.message}`,"system",S)),p()}),Od(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=Ma(S.rawHeaders);if(jn(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 ge(`uri requested responds with an invalid redirect URL: ${A}`,"invalid-redirect")),p();return}}switch(o.redirect){case"error":i(new ge(`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 ge(`maximum redirect reached at: ${o.url}`,"max-redirect")),p();return}let I={headers:new he(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:Ht(o),signal:o.signal,size:o.size,referrer:o.referrer,referrerPolicy:o.referrerPolicy};if(!Pa(o.url,q)||!Ia(o.url,q))for(let j of["authorization","www-authenticate","cookie","cookie2"])I.headers.delete(j);if(S.statusCode!==303&&o.body&&e.body instanceof Ja.Readable){i(new ge("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=Ka(R);L&&(I.referrerPolicy=L),t(Hn(new Ve(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 _=Yt(S,new el,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 oe(_,v),t(f);return}let D={flush:Vt.Z_SYNC_FLUSH,finishFlush:Vt.Z_SYNC_FLUSH};if(P==="gzip"||P==="x-gzip"){_=Yt(_,Vt.createGunzip(D),A=>{A&&i(A)}),f=new oe(_,v),t(f);return}if(P==="deflate"||P==="x-deflate"){let A=Yt(S,new el,q=>{q&&i(q)});A.once("data",q=>{(q[0]&15)===8?_=Yt(_,Vt.createInflate(),I=>{I&&i(I)}):_=Yt(_,Vt.createInflateRaw(),I=>{I&&i(I)}),f=new oe(_,v),t(f)}),A.once("end",()=>{f||(f=new oe(_,v),t(f))});return}if(P==="br"){_=Yt(_,Vt.createBrotliDecompress(),A=>{A&&i(A)}),f=new oe(_,v),t(f);return}f=new oe(_,v),t(f)}),ja(g,o).catch(i)})}function Od(r,e){let t=Mn.from(`0\r
21
21
  \r
22
- `),s=!1,o=!1,a;r.on("response",u=>{let{headers:d}=u;s=d["transfer-encoding"]==="chunked"&&!d["content-length"]}),r.on("socket",u=>{let d=()=>{if(s&&!o){let h=new Error("Premature close");h.code="ERR_STREAM_PREMATURE_CLOSE",e(h)}},f=h=>{o=Fn.compare(h.slice(-5),t)===0,!o&&a&&(o=Fn.compare(a.slice(-3),t.slice(0,3))===0&&Fn.compare(h.slice(-2),t.slice(3))===0),a=h};u.prependListener("close",d),u.on("data",f),r.on("close",()=>{u.removeListener("close",d),u.removeListener("data",f)})})}var Zc=xe(vl(),1),Jc=xe(jn(),1),Kc=xe(Al(),1),K=xe(Rc(),1),ef=xe(Cc(),1),tf=xe(kc(),1);import{cwd as Vg,stdout as Yg,argv as Xg,env as Qg,exit as Vr,versions as Zg}from"process";import{join as rf,dirname as Jg}from"path";import{lstatSync as Kg,readFileSync as jc,truncateSync as eb,writeFileSync as tb,accessSync as rb}from"fs";import{platform as nb}from"os";import{rootCertificates as Uc}from"tls";var Hg=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],Gg={"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 xi(r,{noAffix:e=!1,times:t=Hg,nowThreshold:s=1e4,nowString:o="now",aliases:a=!1,aliasesMap:u=Gg}={}){let d=Date.now();if(r=typeof r=="number"?r:Date.parse(r),Number.isNaN(r))return"unknown";let f=!1,h=d-r;if(h<0&&(f=!0,h=Math.abs(h)),h<s)return o;let g,y;for(let p=0,S=t.length;p<S;p++){let v=t[p];if(!(h>=v[1])){g=Math.floor(h/v[0]),y=v[2]+(g>1?"s":"");break}}let b=`${f&&!e?"in ":""}${g} ${y}${!f&&!e?" ago":""}`;return a?u[b]??b:b}var{fromUrl:sb}=tf.default,Yr,Xc;globalThis.fetch&&!((Xc=Zg)!=null&&Xc.node)?Yr=globalThis.fetch:Yr=Gs(Wn,{undici:!1});var nf=96,ct="\0",ib=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,ob=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,zi=/^[0-9a-f]{7,}$/i,Mc=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Hc=r=>r.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),ab=is(sb),Li=is(Zc.default),lb=is(Kc.default),Wi=is(r=>r.endsWith("/")?r.substring(0,r.length-1):r),ub=new Set(["patch"]),cb=new Set(["patch","minor"]),fb=new Set(["patch","minor","major"]),z=(0,Qc.default)(Xg.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"}}),Fi,ss,Xr;z.color===!1||Qg.TERM==="dumb"?Fi=ss=Xr=r=>r:(Fi=r=>`\x1B[35m${r}\x1B[0m`,ss=r=>`\x1B[31m${r}\x1B[0m`,Xr=r=>`\x1B[32m${r}\x1B[0m`);var tr=ir(z.greatest),qi=ir(z.prerelease),Di=ir(z.release),rr=ir(z.patch),nr=ir(z.minor),sr=ir(z["allow-downgrade"]),ke=(0,Jc.default)("npm",{registry:"https://registry.npmjs.org"}),Bi={npmrc:ke,recursive:!0},hb=Wi(z.registry||ke.registry),Gc=z.githubapi?Wi(z.githubapi):"https://api.github.com",db=typeof z.sockets=="number"?parseInt(z.sockets):nf,Vc=r=>Array.from(r.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g)).map(e=>e[0]);function is(r){let e=Object.create(null);return(t,s)=>t in e?e[t]:e[t]=r(t,s)}function sf(r,e,t){let s=rf(e,r);try{return rb(s),s}catch{}let o=Jg(e);return t&&s===t||o===e?null:sf(r,o,t)}function pb(r,e){if(r.startsWith("@")){let t=(/@[a-z0-9][\w-.]+/.exec(r)||[])[0],s=Wi(lb(t,ke));if(s!==e)try{let o=Li(s,Bi);if(o!=null&&o.token)return[o,s]}catch{}return[Li(e,Bi),e]}else return[Li(e,Bi),e]}async function mb(r,e,t,s){let[o,a]=pb(r,t),u={maxSockets:db};Object.keys(s).length&&(u.agentOpts=s),o!=null&&o.token&&(u.headers={Authorization:`${o.type} ${o.token}`});let f=(e==="resolutions"?Tb(r):r).replace(/\//g,"%2f"),h=`${a}/${f}`;z.verbose&&console.error(`${Fi("fetch")} ${h}`);let g=await Yr(h,u);if(g!=null&&g.ok)return z.verbose&&console.error(`${Xr("done")} ${h}`),[await g.json(),e,a,r];throw g!=null&&g.status&&(g!=null&&g.statusText)?new Error(`Received ${g.status} ${g.statusText} for ${r} from ${a}`):new Error(`Unable to fetch ${r} from ${a}`)}function gb({repository:r,homepage:e},t,s){let o;if(t==="https://npm.pkg.github.com")return`https://github.com/${s.replace(/^@/,"")}`;if(r){let u=typeof r=="string"?r:r.url,d=ab(u);d!=null&&d.browse&&(o=d.browse()),o&&r.directory&&d.treepath&&(o=`${o}/${d.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 $e(r,e={}){let t={},s=r instanceof Error;typeof r=="string"?t.message=r:s&&(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(z.json){if(!s){t.results={};for(let[o,a]of Object.entries(e)){let[u,d]=o.split(ct);t.results[u]||(t.results[u]={}),t.results[u][d]=a}}console.info(JSON.stringify(t))}else Object.keys(e).length&&!s&&console.info(yb(e)),(t.message||t.error)&&(t.message?console.info(t.message):t.error&&console.info(ss(t.error)));z["error-on-outdated"]?Vr(Object.keys(e).length?2:0):z["error-on-unchanged"]?Vr(Object.keys(e).length?0:2):Vr(t.error?1:0)}function bb(r,e){let t=nb()==="win32";t&&eb(r,0),tb(r,e,t?{flag:"r+"}:void 0)}function Yc(r,e,t){let s=r.split(/\./),o=e.split(/\./),a=t?Xr:ss,u=/^[0-9a-zA-Z-.]+$/,d="";for(let f=0;f<s.length;f++)if(s[f]!==o[f]){u.test(s[f])?d+=a(s.slice(f).join(".")):d+=s[f].split("").map(h=>u.test(h)?a(h):h).join("")+a(`.${s.slice(f+1).join(".")}`);break}else d+=`${s[f]}.`;return d}function yb(r){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[t,s]of Object.entries(r))e.push([t.split(ct)[1],Yc(s.old,s.new,!1),Yc(s.new,s.old,!0),s.age||"",s.info]);return(0,ef.default)(e,{hsep:" ",stringLength:t=>t.replace(Ws(),"").length})}function Sb(r,e){let t=r;for(let s of Object.keys(e)){let o=s.split(ct)[1],a=e[s].oldOriginal||e[s].old,u=new RegExp(`"${Hc(o)}": +"${Hc(a)}"`,"g");t=t.replace(u,`"${o}": "${e[s].new}"`)}return t}function wb(r,e){return r.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Ni(r){let e=K.default.parse(r);return e?!!e.prerelease.length:!1}function of(r){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(r)}function _b(r){try{return K.default.coerce(r).version}catch{return null}}function Eb(r,e,{range:t,semvers:s,usePre:o,useRel:a,useGreatest:u}={}){let d=_b(t),f=0;s=new Set(s),o=of(t)||o,o&&(s.add("prerelease"),s.has("patch")&&s.add("prepatch"),s.has("minor")&&s.add("preminor"),s.has("major")&&s.add("premajor"));for(let h of e){let g=K.default.parse(h);if(g.prerelease.length&&(!o||a))continue;let y=K.default.diff(d,g.version);if(!(!y||!s.has(y)))if(u||!("time"in r))K.default.gte(K.default.coerce(g.version).version,d)&&(d=g.version);else{let b=new Date(r.time[h]).getTime();b>=0&&b>f&&(d=g.version,f=b)}}return d||null}function Rb(r,e){var o;if(e.range==="*"||e.range.includes("||"))return null;let t=Object.keys(r.versions).filter(a=>K.default.valid(a)),s=Eb(r,t,e);if(e.useGreatest)return s;{let a=r["dist-tags"].latest,u=K.default.coerce(e.range).version,d=of(e.range),f=Ni(s),h=Ni(a),g=K.default.gt(s,u);if(!e.useRel&&e.usePre||d&&f||e.useRel&&!g&&d&&!f||d&&!f&&g)return s;if(d&&!f&&!g)return null;let y=K.default.diff(u,a);return y&&y!=="prerelease"&&!e.semvers.has(y.replace(/^pre/,""))||e.useRel&&Ni(a)?s:K.default.lt(a,u)&&!h?sr===!0||(o=sr==null?void 0:sr.has)!=null&&o.call(sr,r.name)?a:null:a}}async function vb([r,e],{useGreatest:t}={}){var f,h;let s=e.old.replace(ib,""),[o,a,u,d]=ob.exec(s)||[];if(!(!a||!u||!d))if(zi.test(d)){let g=await Yr(`${Gc}/repos/${a}/${u}/commits`);if(!g||!g.ok)return;let y=await g.json(),{sha:b,commit:p}=y[0];if(!b||!b.length)return;let S=((f=p==null?void 0:p.committer)==null?void 0:f.date)??((h=p==null?void 0:p.author)==null?void 0:h.date);if(b=b.substring(0,d.length),d!==b){let v=e.old.replace(d,b);return{key:r,newRange:v,user:a,repo:u,oldRef:d,newRef:b,newDate:S}}}else{let g=await Yr(`${Gc}/repos/${a}/${u}/git/refs/tags`);if(!g||!g.ok)return;let b=(await g.json()).map(S=>S.ref.replace(/^refs\/tags\//,"")),p=d.replace(/^v/,"");if(!K.default.valid(p))return;if(t){let S=d,v=d.replace(/^v/,"");for(let _ of b){let R=_.replace(/^v/,"");K.default.valid(R)&&(!S||K.default.gt(R,v))&&(S=_,v=R)}if(K.default.neq(p,v))return{key:r,newRange:S,user:a,repo:u,oldRef:d,newRef:S}}else{let S=b[b.length-1],v=S.replace(/^v/,"");if(!K.default.valid(v))return;if(K.default.neq(p,v))return{key:r,newRange:S,user:a,repo:u,oldRef:d,newRef:S}}}}function Tb(r){let e=r.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Ab(r){let e=r.match(Mc);return(e==null?void 0:e.length)!==1?r:r.replace(Mc,K.default.coerce(e[0]))}function ir(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,b,p,S,v;for(let _ of[process.stdout,process.stderr])(b=(y=_==null?void 0:_._handle)==null?void 0:y.setBlocking)==null||b.call(y,!0);z.help&&(Yg.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=Mn.compare(f.slice(-5),t)===0,!o&&a&&(o=Mn.compare(a.slice(-3),t.slice(0,3))===0&&Mn.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 rf=Le(Cl(),1),nf=Le(Vn(),1),sf=Le(Pl(),1),ee=Le($c(),1),of=Le(Lc(),1),af=Le(Gc(),1);import{cwd as tb,stdout as rb,argv as nb,env as Qr,exit as Kr,versions as ib}from"process";import{join as lf,dirname as sb}from"path";import{lstatSync as ob,readFileSync as Vc,truncateSync as ab,writeFileSync as lb,accessSync as ub}from"fs";import{platform as cb}from"os";import{rootCertificates as Yc}from"tls";var Jg=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],eb={"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 Bs(r,{noAffix:e=!1,times:t=Jg,nowThreshold:i=1e4,nowString:o="now",aliases:a=!1,aliasesMap:u=eb}={}){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:fb}=af.default,Zr,ef;globalThis.fetch&&!((ef=ib)!=null&&ef.node)?Zr=globalThis.fetch:Zr=Ki(Hn,{undici:!1});var uf=96,ct="\0",hb=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,db=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,js=/^[0-9a-f]{7,}$/i,Xc=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Qc=r=>r.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),pb=fi(fb),Fs=fi(rf.default),mb=fi(sf.default),Ms=fi(r=>r.endsWith("/")?r.substring(0,r.length-1):r),gb=new Set(["patch"]),bb=new Set(["patch","minor"]),yb=new Set(["patch","minor","major"]),N=(0,tf.default)(nb.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"}}),Us,ci,Jr;N.color===!1||Qr.TERM==="dumb"?Us=ci=Jr=r=>r:(Us=r=>`\x1B[35m${r}\x1B[0m`,ci=r=>`\x1B[31m${r}\x1B[0m`,Jr=r=>`\x1B[32m${r}\x1B[0m`);var ir=lr(N.greatest),Ns=lr(N.prerelease),zs=lr(N.release),sr=lr(N.patch),or=lr(N.minor),ar=lr(N["allow-downgrade"]),ze=(0,nf.default)("npm",{registry:"https://registry.npmjs.org"}),Ws={npmrc:ze,recursive:!0},Sb=Ms(N.registry||ze.registry),Kc=N.githubapi?Ms(N.githubapi):"https://api.github.com",cf=typeof N.sockets=="number"?parseInt(N.sockets):uf,Zc=r=>Array.from(r.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g)).map(e=>e[0]);function fi(r){let e=Object.create(null);return(t,i)=>t in e?e[t]:e[t]=r(t,i)}function ff(r,e,t){let i=lf(e,r);try{return ub(i),i}catch{}let o=sb(e);return t&&i===t||o===e?null:ff(r,o,t)}function _b(r,e){if(r.startsWith("@")){let t=(/@[a-z0-9][\w-.]+/.exec(r)||[])[0],i=Ms(mb(t,ze));if(i!==e)try{let o=Fs(i,Ws);if(o!=null&&o.token)return[o,i]}catch{}return[Fs(e,Ws),e]}else return[Fs(e,Ws),e]}async function wb(r,e,t,i){let[o,a]=_b(r,t),u={maxSockets:cf};Object.keys(i).length&&(u.agentOpts=i),o!=null&&o.token&&(u.headers={Authorization:`${o.type} ${o.token}`});let d=(e==="resolutions"?Ib(r):r).replace(/\//g,"%2f"),f=`${a}/${d}`;N.verbose&&console.error(`${Us("fetch")} ${f}`);let m=await Zr(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 Eb({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=pb(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 $e(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(ct);t.results[u]||(t.results[u]={}),t.results[u][h]=a}}console.info(JSON.stringify(t))}else Object.keys(e).length&&!i&&console.info(vb(e)),(t.message||t.error)&&(t.message?console.info(t.message):t.error&&console.info(ci(t.error)));N["error-on-outdated"]?Kr(Object.keys(e).length?2:0):N["error-on-unchanged"]?Kr(Object.keys(e).length?0:2):Kr(t.error?1:0)}function Rb(r,e){let t=cb()==="win32";t&&ab(r,0),lb(r,e,t?{flag:"r+"}:void 0)}function Jc(r,e,t){let i=r.split(/\./),o=e.split(/\./),a=t?Jr:ci,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 vb(r){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[t,i]of Object.entries(r))e.push([t.split(ct)[1],Jc(i.old,i.new,!1),Jc(i.new,i.old,!0),i.age||"",i.info]);return(0,of.default)(e,{hsep:" ",stringLength:t=>t.replace(Hi(),"").length})}function Ab(r,e){let t=r;for(let i of Object.keys(e)){let o=i.split(ct)[1],a=e[i].oldOriginal||e[i].old,u=new RegExp(`"${Qc(o)}": +"${Qc(a)}"`,"g");t=t.replace(u,`"${o}": "${e[i].new}"`)}return t}function Tb(r,e){return r.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function ks(r){let e=ee.default.parse(r);return e?!!e.prerelease.length:!1}function hf(r){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(r)}function $b(r){try{return ee.default.coerce(r).version}catch{return null}}function Cb(r,e,{range:t,semvers:i,usePre:o,useRel:a,useGreatest:u}={}){let h=$b(t),d=0;i=new Set(i),o=hf(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=ee.default.parse(f);if(m.prerelease.length&&(!o||a))continue;let y=ee.default.diff(h,m.version);if(!(!y||!i.has(y)))if(u||!("time"in r))ee.default.gte(ee.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 Ob(r,e){var o;if(e.range==="*"||e.range.includes("||"))return null;let t=Object.keys(r.versions).filter(a=>ee.default.valid(a)),i=Cb(r,t,e);if(e.useGreatest)return i;{let a=r["dist-tags"].latest,u=ee.default.coerce(e.range).version,h=hf(e.range),d=ks(i),f=ks(a),m=ee.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=ee.default.diff(u,a);return y&&y!=="prerelease"&&!e.semvers.has(y.replace(/^pre/,""))||e.useRel&&ks(a)?i:ee.default.lt(a,u)&&!f?ar===!0||(o=ar==null?void 0:ar.has)!=null&&o.call(ar,r.name)?a:null:a}}async function Pb([r,e],{useGreatest:t}={}){var d,f;let i=e.old.replace(hb,""),[o,a,u,h]=db.exec(i)||[];if(!(!a||!u||!h))if(js.test(h)){let m={maxSockets:cf},y=Qr.UPDATES_GITHUB_API_TOKEN||Qr.GITHUB_API_TOKEN||Qr.GH_TOKEN||Qr.HOMEBREW_GITHUB_API_TOKEN;y&&(m.headers={Authorization:`Bearer ${y}`});let g=await Zr(`${Kc}/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 Zr(`${Kc}/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(!ee.default.valid(p))return;if(t){let S=h,R=h.replace(/^v/,"");for(let _ of g){let v=_.replace(/^v/,"");ee.default.valid(v)&&(!S||ee.default.gt(v,R))&&(S=_,R=v)}if(ee.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(!ee.default.valid(R))return;if(ee.default.neq(p,R))return{key:r,newRange:S,user:a,repo:u,oldRef:h,newRef:S}}}}function Ib(r){let e=r.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Lb(r){let e=r.match(Xc);return(e==null?void 0:e.length)!==1?r:r.replace(Xc,ee.default.coerce(e[0]))}function lr(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 xb(){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&&(rb.write(`usage: updates [options]
23
23
 
24
24
  Options:
25
25
  -u, --update Update versions and write package.json
@@ -37,7 +37,7 @@ Content-Type: ${a.type||"application/octet-stream"}\r
37
37
  -r, --registry <url> Override npm registry URL
38
38
  -G, --githubapi <url> Override Github API URL
39
39
  -f, --file <path> Use given package.json file or module directory
40
- -S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${nf}
40
+ -S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${uf}
41
41
  -j, --json Output a JSON object
42
42
  -n, --no-color Disable color output
43
43
  -v, --version Print the version
@@ -49,4 +49,4 @@ Content-Type: ${a.type||"application/octet-stream"}\r
49
49
  $ updates -u
50
50
  $ updates -u -m -e eslint
51
51
  $ updates -u -U && rm -rf node_modules && npm i
52
- `),Vr(0)),z.version&&(console.info("13.2.9"),Vr(0));let r={};if(ke["strict-ssl"]===!1)r.rejectUnauthorized=!1;else if("cafile"in ke&&(r.ca=Uc.concat(Vc(jc(ke.cafile,"utf8")))),"ca"in ke){let _=Array.isArray(ke.ca)?ke.ca:[ke.ca];r.ca=Uc.concat(_.map(R=>Vc(R)))}let e;if(z.file){let _;try{_=Kg(z.file)}catch(R){$e(new Error(`Unable to open ${z.file}: ${R.message}`))}_!=null&&_.isFile()?e=z.file:_!=null&&_.isDirectory()?e=rf(z.file,"package.json"):$e(new Error(`${z.file} is neither a file nor directory`))}else{let _=Vg();e=sf("package.json",_),e||$e(new Error(`Unable to find package.json in ${_} or any of its parent directories`))}let t;z.types?t=Array.isArray(z.types)?z.types:z.types.split(","):t=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"];let s,o;try{o=jc(e,"utf8")}catch(_){$e(new Error(`Unable to open ${e}: ${_.message}`))}try{s=JSON.parse(o)}catch(_){$e(new Error(`Error parsing ${e}: ${_.message}`))}let a,u;z.include&&z.include!==!0&&(a=new Set((Array.isArray(z.include)?z.include:[z.include]).flatMap(_=>_.split(",")))),z.exclude&&z.exclude!==!0&&(u=new Set((Array.isArray(z.exclude)?z.exclude:[z.exclude]).flatMap(_=>_.split(","))));function d(_){var R,O;return!(((R=u==null?void 0:u.has)==null?void 0:R.call(u,_))===!0||((O=a==null?void 0:a.has)==null?void 0:O.call(a,_))===!1)}let f={},h={};for(let _ of t)for(let[R,O]of Object.entries(s[_]||{}))K.default.validRange(O)&&d(R)?f[`${_}${ct}${R}`]={old:Ab(O),oldOriginal:O}:d(R)&&(h[`${_}${ct}${R}`]={old:O});!Object.keys(f).length&&!Object.keys(h).length&&$e(a||u?new Error("No dependencies match the given include/exclude filters"):"No dependencies present, nothing to do");let g=await Promise.all(Object.keys(f).map(_=>{let[R,O]=_.split(ct);return mb(O,R,hb,r)}));for(let[_,R,O,B]of g){if(_!=null&&_.error)throw new Error(_.error);let T=typeof tr=="boolean"?tr:tr.has(_.name),q=typeof qi=="boolean"?qi:qi.has(_.name),D=typeof Di=="boolean"?Di:Di.has(_.name),x;rr===!0||(p=rr==null?void 0:rr.has)!=null&&p.call(rr,_.name)?x=ub:nr===!0||(S=nr==null?void 0:nr.has)!=null&&S.call(nr,_.name)?x=cb:x=fb;let U=`${R}${ct}${B}`,ie=f[U].old,ee=Rb(_,{usePre:q,useRel:D,useGreatest:T,semvers:x,range:ie}),Ee=wb(ie,ee);!ee||ie===Ee?delete f[U]:(f[U].new=Ee,f[U].info=gb(_.versions[ee]||_,O,_.name),(v=_.time)!=null&&v[ee]&&(f[U].age=xi(_.time[ee],{noAffix:!0})))}if(Object.keys(h).length){let _=await Promise.all(Object.entries(h).map(([R,O])=>{let B=R.split(ct)[1],T=typeof tr=="boolean"?tr:tr.has(B);return vb([R,O],{useGreatest:T})}));_=_.filter(Boolean);for(let R of _||[]){let{key:O,newRange:B,user:T,repo:q,oldRef:D,newRef:x,newDate:U}=R;f[O]={old:h[O].old,new:B,oldPrint:zi.test(D)?D.substring(0,7):D,newPrint:zi.test(x)?x.substring(0,7):x,info:`https://github.com/${T}/${q}`,...U?{age:xi(U,{noAffix:!0})}:{}}}}Object.keys(f).length||$e("All dependencies are up to date."),z.update||$e(void 0,f);try{bb(e,Sb(o,f))}catch(_){$e(new Error(`Error writing ${e}: ${_.message}`))}$e(Xr("\u2728 package.json updated"),f)}$b().catch($e);
52
+ `),Kr(0)),N.version&&(console.info("13.4.0"),Kr(0));let r={};if(ze["strict-ssl"]===!1)r.rejectUnauthorized=!1;else if("cafile"in ze&&(r.ca=Yc.concat(Zc(Vc(ze.cafile,"utf8")))),"ca"in ze){let _=Array.isArray(ze.ca)?ze.ca:[ze.ca];r.ca=Yc.concat(_.map(v=>Zc(v)))}let e;if(N.file){let _;try{_=ob(N.file)}catch(v){$e(new Error(`Unable to open ${N.file}: ${v.message}`))}_!=null&&_.isFile()?e=N.file:_!=null&&_.isDirectory()?e=lf(N.file,"package.json"):$e(new Error(`${N.file} is neither a file nor directory`))}else{let _=tb();e=ff("package.json",_),e||$e(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=Vc(e,"utf8")}catch(_){$e(new Error(`Unable to open ${e}: ${_.message}`))}try{i=JSON.parse(o)}catch(_){$e(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[_]||{}))ee.default.validRange(P)&&h(v)?d[`${_}${ct}${v}`]={old:Lb(P),oldOriginal:P}:h(v)&&(f[`${_}${ct}${v}`]={old:P});!Object.keys(d).length&&!Object.keys(f).length&&$e(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(ct);return wb(P,v,Sb,r)}));for(let[_,v,P,D]of m){if(_!=null&&_.error)throw new Error(_.error);let A=typeof ir=="boolean"?ir:ir.has(_.name),q=typeof Ns=="boolean"?Ns:Ns.has(_.name),I=typeof zs=="boolean"?zs:zs.has(_.name),L;sr===!0||(p=sr==null?void 0:sr.has)!=null&&p.call(sr,_.name)?L=gb:or===!0||(S=or==null?void 0:or.has)!=null&&S.call(or,_.name)?L=bb:L=yb;let j=`${v}${ct}${D}`,X=d[j].old,Q=Ob(_,{usePre:q,useRel:I,useGreatest:A,semvers:L,range:X}),le=Tb(X,Q);!Q||X===le?delete d[j]:(d[j].new=le,d[j].info=Eb(_.versions[Q]||_,P,_.name),(R=_.time)!=null&&R[Q]&&(d[j].age=Bs(_.time[Q],{noAffix:!0})))}if(Object.keys(f).length){let _=await Promise.all(Object.entries(f).map(([v,P])=>{let D=v.split(ct)[1],A=typeof ir=="boolean"?ir:ir.has(D);return Pb([v,P],{useGreatest:A})}));_=_.filter(Boolean);for(let v of _||[]){let{key:P,newRange:D,user:A,repo:q,oldRef:I,newRef:L,newDate:j}=v;d[P]={old:f[P].old,new:D,oldPrint:js.test(I)?I.substring(0,7):I,newPrint:js.test(L)?L.substring(0,7):L,info:`https://github.com/${A}/${q}`,...j?{age:Bs(j,{noAffix:!0})}:{}}}}Object.keys(d).length||$e("All dependencies are up to date."),N.update||$e(void 0,d);try{Rb(e,Ab(o,d))}catch(_){$e(new Error(`Error writing ${e}: ${_.message}`))}$e(Jr("\u2728 package.json updated"),d)}xb().catch($e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "updates",
3
- "version": "13.2.9",
3
+ "version": "13.4.0",
4
4
  "description": "Flexible npm dependency update tool",
5
5
  "author": "silverwind",
6
6
  "repository": "silverwind/updates",
@@ -15,21 +15,21 @@
15
15
  ],
16
16
  "devDependencies": {
17
17
  "ansi-regex": "6.0.1",
18
- "esbuild": "0.17.11",
19
- "eslint": "8.35.0",
20
- "eslint-config-silverwind": "65.1.2",
21
- "execa": "7.0.0",
18
+ "esbuild": "0.17.15",
19
+ "eslint": "8.37.0",
20
+ "eslint-config-silverwind": "65.1.3",
21
+ "execa": "7.1.1",
22
22
  "fetch-enhanced": "11.1.1",
23
23
  "hosted-git-info": "6.1.1",
24
24
  "minimist": "1.2.8",
25
- "node-fetch": "3.3.0",
25
+ "node-fetch": "3.3.1",
26
26
  "rc": "1.2.8",
27
27
  "registry-auth-token": "4.2.2",
28
28
  "restana": "4.9.7",
29
29
  "semver": "7.3.8",
30
30
  "text-table": "0.2.0",
31
- "timerel": "5.4.0",
32
- "versions": "10.4.1",
33
- "vitest": "0.29.2"
31
+ "timerel": "5.4.1",
32
+ "versions": "10.4.2",
33
+ "vitest": "0.29.8"
34
34
  }
35
35
  }