updates 15.0.3 → 15.1.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.
- package/bin/updates.js +13 -26
- package/package.json +9 -9
package/bin/updates.js
CHANGED
|
@@ -1,31 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {createRequire} from 'module';const require = createRequire(import.meta.url);
|
|
3
|
-
var tp=Object.create;var ri=Object.defineProperty;var rp=Object.getOwnPropertyDescriptor;var np=Object.getOwnPropertyNames;var sp=Object.getPrototypeOf,ip=Object.prototype.hasOwnProperty;var Ae=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Hr=(t,e)=>()=>(t&&(e=t(t=0)),e);var I=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),op=(t,e)=>{for(var r in e)ri(t,r,{get:e[r],enumerable:!0})},ap=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of np(e))!ip.call(t,i)&&i!==r&&ri(t,i,{get:()=>e[i],enumerable:!(n=rp(e,i))||n.enumerable});return t};var Fe=(t,e,r)=>(r=t!=null?tp(sp(t)):{},ap(e||!t||!t.__esModule?ri(r,"default",{value:t,enumerable:!0}):r,t));var Ha=I((k_,Na)=>{"use strict";var si=Ae("https"),ii=Ae("http"),{URL:Pa}=Ae("url"),oi=class extends ii.Agent{constructor(e){let{proxy:r,proxyRequestOptions:n,...i}=e;super(i),this.proxy=typeof r=="string"?new Pa(r):r,this.proxyRequestOptions=n||{}}createConnection(e,r){let n={...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");n.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(n.servername=this.proxy.hostname);let i=(this.proxy.protocol==="http:"?ii:si).request(n);i.once("connect",(a,l,f)=>{i.removeAllListeners(),l.removeAllListeners(),a.statusCode===200?r(null,l):(l.destroy(),r(new Error(`Bad response: ${a.statusCode}`),null))}),i.once("timeout",()=>{i.destroy(new Error("Proxy timeout"))}),i.once("error",a=>{i.removeAllListeners(),r(a,null)}),i.end()}},ai=class extends si.Agent{constructor(e){let{proxy:r,proxyRequestOptions:n,...i}=e;super(i),this.proxy=typeof r=="string"?new Pa(r):r,this.proxyRequestOptions=n||{}}createConnection(e,r){let n={...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");n.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(n.servername=this.proxy.hostname);let i=(this.proxy.protocol==="http:"?ii:si).request(n);i.once("connect",(a,l,f)=>{if(i.removeAllListeners(),l.removeAllListeners(),a.statusCode===200){let c=super.createConnection({...e,socket:l});r(null,c)}else l.destroy(),r(new Error(`Bad response: ${a.statusCode}`),null)}),i.once("timeout",()=>{i.destroy(new Error("Proxy timeout"))}),i.once("error",a=>{i.removeAllListeners(),r(a,null)}),i.end()}};Na.exports={HttpProxyAgent:oi,HttpsProxyAgent:ai}});var qa=I(Fa=>{"use strict";var lp=Ae("url").parse,up={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},cp=String.prototype.endsWith||function(t){return t.length<=this.length&&this.indexOf(t,this.length-t.length)!==-1};function fp(t){var e=typeof t=="string"?lp(t):t||{},r=e.protocol,n=e.host,i=e.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),i=parseInt(i)||up[r]||0,!hp(n,i)))return"";var a=er("npm_config_"+r+"_proxy")||er(r+"_proxy")||er("npm_config_proxy")||er("all_proxy");return a&&a.indexOf("://")===-1&&(a=r+"://"+a),a}function hp(t,e){var r=(er("npm_config_no_proxy")||er("no_proxy")).toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var i=n.match(/^(.+):(\d+)$/),a=i?i[1]:n,l=i?parseInt(i[2]):0;return l&&l!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!cp.call(t,a)):t!==a}):!0}function er(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}Fa.getProxyForUrl=fp});var fi=I((Z_,za)=>{"use strict";function gp(t,e){var r=t;e.slice(0,-1).forEach(function(i){r=r[i]||{}});var n=e[e.length-1];return n in r}function Wa(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function ka(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}za.exports=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(T){r.bools[T]=!0});var n={};function i(T){return n[T].some(function(v){return r.bools[v]})}Object.keys(e.alias||{}).forEach(function(T){n[T]=[].concat(e.alias[T]),n[T].forEach(function(v){n[v]=[T].concat(n[T].filter(function(F){return v!==F}))})}),[].concat(e.string).filter(Boolean).forEach(function(T){r.strings[T]=!0,n[T]&&[].concat(n[T]).forEach(function(v){r.strings[v]=!0})});var a=e.default||{},l={_:[]};function f(T,v){return r.allBools&&/^--[^=]+$/.test(v)||r.strings[T]||r.bools[T]||n[T]}function c(T,v,F){for(var B=T,H=0;H<v.length-1;H++){var k=v[H];if(ka(B,k))return;B[k]===void 0&&(B[k]={}),(B[k]===Object.prototype||B[k]===Number.prototype||B[k]===String.prototype)&&(B[k]={}),B[k]===Array.prototype&&(B[k]=[]),B=B[k]}var N=v[v.length-1];ka(B,N)||((B===Object.prototype||B===Number.prototype||B===String.prototype)&&(B={}),B===Array.prototype&&(B=[]),B[N]===void 0||r.bools[N]||typeof B[N]=="boolean"?B[N]=F:Array.isArray(B[N])?B[N].push(F):B[N]=[B[N],F])}function h(T,v,F){if(!(F&&r.unknownFn&&!f(T,F)&&r.unknownFn(F)===!1)){var B=!r.strings[T]&&Wa(v)?Number(v):v;c(l,T.split("."),B),(n[T]||[]).forEach(function(H){c(l,H.split("."),B)})}}Object.keys(r.bools).forEach(function(T){h(T,a[T]===void 0?!1:a[T])});var b=[];t.indexOf("--")!==-1&&(b=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var g=0;g<t.length;g++){var m=t[g],d,_;if(/^--.+=/.test(m)){var R=m.match(/^--([^=]+)=([\s\S]*)$/);d=R[1];var O=R[2];r.bools[d]&&(O=O!=="false"),h(d,O,m)}else if(/^--no-.+/.test(m))d=m.match(/^--no-(.+)/)[1],h(d,!1,m);else if(/^--.+/.test(m))d=m.match(/^--(.+)/)[1],_=t[g+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!r.bools[d]&&!r.allBools&&(!n[d]||!i(d))?(h(d,_,m),g+=1):/^(true|false)$/.test(_)?(h(d,_==="true",m),g+=1):h(d,r.strings[d]?"":!0,m);else if(/^-[^-]+/.test(m)){for(var x=m.slice(1,-1).split(""),D=!1,L=0;L<x.length;L++){if(_=m.slice(L+2),_==="-"){h(x[L],_,m);continue}if(/[A-Za-z]/.test(x[L])&&_[0]==="="){h(x[L],_.slice(1),m),D=!0;break}if(/[A-Za-z]/.test(x[L])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){h(x[L],_,m),D=!0;break}if(x[L+1]&&x[L+1].match(/\W/)){h(x[L],m.slice(L+2),m),D=!0;break}else h(x[L],r.strings[x[L]]?"":!0,m)}d=m.slice(-1)[0],!D&&d!=="-"&&(t[g+1]&&!/^(-|--)[^-]/.test(t[g+1])&&!r.bools[d]&&(!n[d]||!i(d))?(h(d,t[g+1],m),g+=1):t[g+1]&&/^(true|false)$/.test(t[g+1])?(h(d,t[g+1]==="true",m),g+=1):h(d,r.strings[d]?"":!0,m))}else if((!r.unknownFn||r.unknownFn(m)!==!1)&&l._.push(r.strings._||!Wa(m)?m:Number(m)),e.stopEarly){l._.push.apply(l._,t.slice(g+1));break}}return Object.keys(a).forEach(function(T){gp(l,T.split("."))||(c(l,T.split("."),a[T]),(n[T]||[]).forEach(function(v){c(l,v.split("."),a[T])}))}),e["--"]?l["--"]=b.slice():b.forEach(function(T){l._.push(T)}),l}});var Va=I((Un,Ga)=>{(function(t,e){typeof Un=="object"&&typeof Ga<"u"?e(Un):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(Un,function(t){"use strict";let e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:s=>`Symbol(${s})`;function r(){}function n(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}let i=n();function a(s){return typeof s=="object"&&s!==null||typeof s=="function"}let l=r,f=Promise,c=Promise.prototype.then,h=Promise.resolve.bind(f),b=Promise.reject.bind(f);function g(s){return new f(s)}function m(s){return h(s)}function d(s){return b(s)}function _(s,o,u){return c.call(s,o,u)}function R(s,o,u){_(_(s,o,u),void 0,l)}function O(s,o){R(s,o)}function x(s,o){R(s,void 0,o)}function D(s,o,u){return _(s,o,u)}function L(s){_(s,void 0,l)}let T=(()=>{let s=i&&i.queueMicrotask;if(typeof s=="function")return s;let o=m(void 0);return u=>_(o,u)})();function v(s,o,u){if(typeof s!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(s,o,u)}function F(s,o,u){try{return m(v(s,o,u))}catch(p){return d(p)}}let B=16384;class H{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(o){let u=this._back,p=u;u._elements.length===B-1&&(p={_elements:[],_next:void 0}),u._elements.push(o),p!==u&&(this._back=p,u._next=p),++this._size}shift(){let o=this._front,u=o,p=this._cursor,y=p+1,A=o._elements,C=A[p];return y===B&&(u=o._next,y=0),--this._size,this._cursor=y,o!==u&&(this._front=u),A[p]=void 0,C}forEach(o){let u=this._cursor,p=this._front,y=p._elements;for(;(u!==y.length||p._next!==void 0)&&!(u===y.length&&(p=p._next,y=p._elements,u=0,y.length===0));)o(y[u]),++u}peek(){let o=this._front,u=this._cursor;return o._elements[u]}}function k(s,o){s._ownerReadableStream=o,o._reader=s,o._state==="readable"?Y(s):o._state==="closed"?E(s):Re(s,o._storedError)}function N(s,o){let u=s._ownerReadableStream;return Ge(u,o)}function S(s){s._ownerReadableStream._state==="readable"?w(s,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):oe(s,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),s._ownerReadableStream._reader=void 0,s._ownerReadableStream=void 0}function z(s){return new TypeError("Cannot "+s+" a stream using a released reader")}function Y(s){s._closedPromise=g((o,u)=>{s._closedPromise_resolve=o,s._closedPromise_reject=u})}function Re(s,o){Y(s),w(s,o)}function E(s){Y(s),j(s)}function w(s,o){s._closedPromise_reject!==void 0&&(L(s._closedPromise),s._closedPromise_reject(o),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0)}function oe(s,o){Re(s,o)}function j(s){s._closedPromise_resolve!==void 0&&(s._closedPromise_resolve(void 0),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0)}let Se=e("[[AbortSteps]]"),de=e("[[ErrorSteps]]"),me=e("[[CancelSteps]]"),ct=e("[[PullSteps]]"),an=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},kt=Math.trunc||function(s){return s<0?Math.ceil(s):Math.floor(s)};function tt(s){return typeof s=="object"||typeof s=="function"}function G(s,o){if(s!==void 0&&!tt(s))throw new TypeError(`${o} is not an object.`)}function Ee(s,o){if(typeof s!="function")throw new TypeError(`${o} is not a function.`)}function Is(s){return typeof s=="object"&&s!==null||typeof s=="function"}function P(s,o){if(!Is(s))throw new TypeError(`${o} is not an object.`)}function J(s,o,u){if(s===void 0)throw new TypeError(`Parameter ${o} is required in '${u}'.`)}function $(s,o,u){if(s===void 0)throw new TypeError(`${o} is required in '${u}'.`)}function V(s){return Number(s)}function ae(s){return s===0?0:s}function we(s){return ae(kt(s))}function he(s,o){let p=Number.MAX_SAFE_INTEGER,y=Number(s);if(y=ae(y),!an(y))throw new TypeError(`${o} is not a finite number`);if(y=we(y),y<0||y>p)throw new TypeError(`${o} is outside the accepted range of 0 to ${p}, inclusive`);return!an(y)||y===0?0:y}function Et(s,o){if(!mt(s))throw new TypeError(`${o} is not a ReadableStream.`)}function ze(s){return new Rr(s)}function xo(s,o){s._reader._readRequests.push(o)}function Ls(s,o,u){let y=s._reader._readRequests.shift();u?y._closeSteps():y._chunkSteps(o)}function ln(s){return s._reader._readRequests.length}function vo(s){let o=s._reader;return!(o===void 0||!ft(o))}class Rr{constructor(o){if(J(o,1,"ReadableStreamDefaultReader"),Et(o,"First parameter"),gt(o))throw new TypeError("This stream has already been locked for exclusive reading by another reader");k(this,o),this._readRequests=new H}get closed(){return ft(this)?this._closedPromise:d(un("closed"))}cancel(o=void 0){return ft(this)?this._ownerReadableStream===void 0?d(z("cancel")):N(this,o):d(un("cancel"))}read(){if(!ft(this))return d(un("read"));if(this._ownerReadableStream===void 0)return d(z("read from"));let o,u,p=g((A,C)=>{o=A,u=C});return Sr(this,{_chunkSteps:A=>o({value:A,done:!1}),_closeSteps:()=>o({value:void 0,done:!0}),_errorSteps:A=>u(A)}),p}releaseLock(){if(!ft(this))throw un("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");S(this)}}}Object.defineProperties(Rr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Rr.prototype,e.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function ft(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readRequests")?!1:s instanceof Rr}function Sr(s,o){let u=s._ownerReadableStream;u._disturbed=!0,u._state==="closed"?o._closeSteps():u._state==="errored"?o._errorSteps(u._storedError):u._readableStreamController[ct](o)}function un(s){return new TypeError(`ReadableStreamDefaultReader.prototype.${s} can only be used on a ReadableStreamDefaultReader`)}let Oo=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class $o{constructor(o,u){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=o,this._preventCancel=u}next(){let o=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?D(this._ongoingPromise,o,o):o(),this._ongoingPromise}return(o){let u=()=>this._returnSteps(o);return this._ongoingPromise?D(this._ongoingPromise,u,u):u()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let o=this._reader;if(o._ownerReadableStream===void 0)return d(z("iterate"));let u,p,y=g((C,q)=>{u=C,p=q});return Sr(o,{_chunkSteps:C=>{this._ongoingPromise=void 0,T(()=>u({value:C,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,S(o),u({value:void 0,done:!0})},_errorSteps:C=>{this._ongoingPromise=void 0,this._isFinished=!0,S(o),p(C)}}),y}_returnSteps(o){if(this._isFinished)return Promise.resolve({value:o,done:!0});this._isFinished=!0;let u=this._reader;if(u._ownerReadableStream===void 0)return d(z("finish iterating"));if(!this._preventCancel){let p=N(u,o);return S(u),D(p,()=>({value:o,done:!0}))}return S(u),m({value:o,done:!0})}}let Io={next(){return Lo(this)?this._asyncIteratorImpl.next():d(Po("next"))},return(s){return Lo(this)?this._asyncIteratorImpl.return(s):d(Po("return"))}};Oo!==void 0&&Object.setPrototypeOf(Io,Oo);function Dh(s,o){let u=ze(s),p=new $o(u,o),y=Object.create(Io);return y._asyncIteratorImpl=p,y}function Lo(s){if(!a(s)||!Object.prototype.hasOwnProperty.call(s,"_asyncIteratorImpl"))return!1;try{return s._asyncIteratorImpl instanceof $o}catch{return!1}}function Po(s){return new TypeError(`ReadableStreamAsyncIterator.${s} can only be used on a ReadableSteamAsyncIterator`)}let No=Number.isNaN||function(s){return s!==s};function wr(s){return s.slice()}function Ho(s,o,u,p,y){new Uint8Array(s).set(new Uint8Array(u,p,y),o)}function U_(s){return s}function cn(s){return!1}function Do(s,o,u){if(s.slice)return s.slice(o,u);let p=u-o,y=new ArrayBuffer(p);return Ho(y,0,s,o,p),y}function Bh(s){return!(typeof s!="number"||No(s)||s<0)}function Bo(s){let o=Do(s.buffer,s.byteOffset,s.byteOffset+s.byteLength);return new Uint8Array(o)}function Ps(s){let o=s._queue.shift();return s._queueTotalSize-=o.size,s._queueTotalSize<0&&(s._queueTotalSize=0),o.value}function Ns(s,o,u){if(!Bh(u)||u===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");s._queue.push({value:o,size:u}),s._queueTotalSize+=u}function Fh(s){return s._queue.peek().value}function ht(s){s._queue=new H,s._queueTotalSize=0}class Er{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Hs(this))throw qs("view");return this._view}respond(o){if(!Hs(this))throw qs("respond");if(J(o,1,"respond"),o=he(o,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");cn(this._view.buffer),mn(this._associatedReadableByteStreamController,o)}respondWithNewView(o){if(!Hs(this))throw qs("respondWithNewView");if(J(o,1,"respondWithNewView"),!ArrayBuffer.isView(o))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");cn(o.buffer),gn(this._associatedReadableByteStreamController,o)}}Object.defineProperties(Er.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Er.prototype,e.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class zt{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!At(this))throw Tr("byobRequest");return Fs(this)}get desiredSize(){if(!At(this))throw Tr("desiredSize");return jo(this)}close(){if(!At(this))throw Tr("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let o=this._controlledReadableByteStream._state;if(o!=="readable")throw new TypeError(`The stream (in ${o} state) is not in the readable state and cannot be closed`);Ar(this)}enqueue(o){if(!At(this))throw Tr("enqueue");if(J(o,1,"enqueue"),!ArrayBuffer.isView(o))throw new TypeError("chunk must be an array buffer view");if(o.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(o.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 u=this._controlledReadableByteStream._state;if(u!=="readable")throw new TypeError(`The stream (in ${u} state) is not in the readable state and cannot be enqueued to`);pn(this,o)}error(o=void 0){if(!At(this))throw Tr("error");je(this,o)}[me](o){Fo(this),ht(this);let u=this._cancelAlgorithm(o);return dn(this),u}[ct](o){let u=this._controlledReadableByteStream;if(this._queueTotalSize>0){let y=this._queue.shift();this._queueTotalSize-=y.byteLength,Wo(this);let A=new Uint8Array(y.buffer,y.byteOffset,y.byteLength);o._chunkSteps(A);return}let p=this._autoAllocateChunkSize;if(p!==void 0){let y;try{y=new ArrayBuffer(p)}catch(C){o._errorSteps(C);return}let A={buffer:y,bufferByteLength:p,byteOffset:0,byteLength:p,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(A)}xo(u,o),Tt(this)}}Object.defineProperties(zt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(zt.prototype,e.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function At(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledReadableByteStream")?!1:s instanceof zt}function Hs(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_associatedReadableByteStreamController")?!1:s instanceof Er}function Tt(s){if(!Wh(s))return;if(s._pulling){s._pullAgain=!0;return}s._pulling=!0;let u=s._pullAlgorithm();R(u,()=>{s._pulling=!1,s._pullAgain&&(s._pullAgain=!1,Tt(s))},p=>{je(s,p)})}function Fo(s){Bs(s),s._pendingPullIntos=new H}function Ds(s,o){let u=!1;s._state==="closed"&&(u=!0);let p=qo(o);o.readerType==="default"?Ls(s,p,u):jh(s,p,u)}function qo(s){let o=s.bytesFilled,u=s.elementSize;return new s.viewConstructor(s.buffer,s.byteOffset,o/u)}function fn(s,o,u,p){s._queue.push({buffer:o,byteOffset:u,byteLength:p}),s._queueTotalSize+=p}function Uo(s,o){let u=o.elementSize,p=o.bytesFilled-o.bytesFilled%u,y=Math.min(s._queueTotalSize,o.byteLength-o.bytesFilled),A=o.bytesFilled+y,C=A-A%u,q=y,Q=!1;C>p&&(q=C-o.bytesFilled,Q=!0);let ee=s._queue;for(;q>0;){let te=ee.peek(),re=Math.min(q,te.byteLength),ge=o.byteOffset+o.bytesFilled;Ho(o.buffer,ge,te.buffer,te.byteOffset,re),te.byteLength===re?ee.shift():(te.byteOffset+=re,te.byteLength-=re),s._queueTotalSize-=re,Mo(s,re,o),q-=re}return Q}function Mo(s,o,u){u.bytesFilled+=o}function Wo(s){s._queueTotalSize===0&&s._closeRequested?(dn(s),Pr(s._controlledReadableByteStream)):Tt(s)}function Bs(s){s._byobRequest!==null&&(s._byobRequest._associatedReadableByteStreamController=void 0,s._byobRequest._view=null,s._byobRequest=null)}function ko(s){for(;s._pendingPullIntos.length>0;){if(s._queueTotalSize===0)return;let o=s._pendingPullIntos.peek();Uo(s,o)&&(hn(s),Ds(s._controlledReadableByteStream,o))}}function qh(s,o,u){let p=s._controlledReadableByteStream,y=1;o.constructor!==DataView&&(y=o.constructor.BYTES_PER_ELEMENT);let A=o.constructor,C=o.buffer,q={buffer:C,bufferByteLength:C.byteLength,byteOffset:o.byteOffset,byteLength:o.byteLength,bytesFilled:0,elementSize:y,viewConstructor:A,readerType:"byob"};if(s._pendingPullIntos.length>0){s._pendingPullIntos.push(q),Yo(p,u);return}if(p._state==="closed"){let Q=new A(q.buffer,q.byteOffset,0);u._closeSteps(Q);return}if(s._queueTotalSize>0){if(Uo(s,q)){let Q=qo(q);Wo(s),u._chunkSteps(Q);return}if(s._closeRequested){let Q=new TypeError("Insufficient bytes to fill elements in the given buffer");je(s,Q),u._errorSteps(Q);return}}s._pendingPullIntos.push(q),Yo(p,u),Tt(s)}function Uh(s,o){let u=s._controlledReadableByteStream;if(Us(u))for(;Qo(u)>0;){let p=hn(s);Ds(u,p)}}function Mh(s,o,u){if(Mo(s,o,u),u.bytesFilled<u.elementSize)return;hn(s);let p=u.bytesFilled%u.elementSize;if(p>0){let y=u.byteOffset+u.bytesFilled,A=Do(u.buffer,y-p,y);fn(s,A,0,A.byteLength)}u.bytesFilled-=p,Ds(s._controlledReadableByteStream,u),ko(s)}function zo(s,o){let u=s._pendingPullIntos.peek();Bs(s),s._controlledReadableByteStream._state==="closed"?Uh(s):Mh(s,o,u),Tt(s)}function hn(s){return s._pendingPullIntos.shift()}function Wh(s){let o=s._controlledReadableByteStream;return o._state!=="readable"||s._closeRequested||!s._started?!1:!!(vo(o)&&ln(o)>0||Us(o)&&Qo(o)>0||jo(s)>0)}function dn(s){s._pullAlgorithm=void 0,s._cancelAlgorithm=void 0}function Ar(s){let o=s._controlledReadableByteStream;if(!(s._closeRequested||o._state!=="readable")){if(s._queueTotalSize>0){s._closeRequested=!0;return}if(s._pendingPullIntos.length>0&&s._pendingPullIntos.peek().bytesFilled>0){let p=new TypeError("Insufficient bytes to fill elements in the given buffer");throw je(s,p),p}dn(s),Pr(o)}}function pn(s,o){let u=s._controlledReadableByteStream;if(s._closeRequested||u._state!=="readable")return;let p=o.buffer,y=o.byteOffset,A=o.byteLength,C=p;if(s._pendingPullIntos.length>0){let q=s._pendingPullIntos.peek();cn(q.buffer),q.buffer=q.buffer}if(Bs(s),vo(u))if(ln(u)===0)fn(s,C,y,A);else{s._pendingPullIntos.length>0&&hn(s);let q=new Uint8Array(C,y,A);Ls(u,q,!1)}else Us(u)?(fn(s,C,y,A),ko(s)):fn(s,C,y,A);Tt(s)}function je(s,o){let u=s._controlledReadableByteStream;u._state==="readable"&&(Fo(s),ht(s),dn(s),_a(u,o))}function Fs(s){if(s._byobRequest===null&&s._pendingPullIntos.length>0){let o=s._pendingPullIntos.peek(),u=new Uint8Array(o.buffer,o.byteOffset+o.bytesFilled,o.byteLength-o.bytesFilled),p=Object.create(Er.prototype);zh(p,s,u),s._byobRequest=p}return s._byobRequest}function jo(s){let o=s._controlledReadableByteStream._state;return o==="errored"?null:o==="closed"?0:s._strategyHWM-s._queueTotalSize}function mn(s,o){let u=s._pendingPullIntos.peek();if(s._controlledReadableByteStream._state==="closed"){if(o!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(o===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(u.bytesFilled+o>u.byteLength)throw new RangeError("bytesWritten out of range")}u.buffer=u.buffer,zo(s,o)}function gn(s,o){let u=s._pendingPullIntos.peek();if(s._controlledReadableByteStream._state==="closed"){if(o.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(o.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(u.byteOffset+u.bytesFilled!==o.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(u.bufferByteLength!==o.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(u.bytesFilled+o.byteLength>u.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let y=o.byteLength;u.buffer=o.buffer,zo(s,y)}function Go(s,o,u,p,y,A,C){o._controlledReadableByteStream=s,o._pullAgain=!1,o._pulling=!1,o._byobRequest=null,o._queue=o._queueTotalSize=void 0,ht(o),o._closeRequested=!1,o._started=!1,o._strategyHWM=A,o._pullAlgorithm=p,o._cancelAlgorithm=y,o._autoAllocateChunkSize=C,o._pendingPullIntos=new H,s._readableStreamController=o;let q=u();R(m(q),()=>{o._started=!0,Tt(o)},Q=>{je(o,Q)})}function kh(s,o,u){let p=Object.create(zt.prototype),y=()=>{},A=()=>m(void 0),C=()=>m(void 0);o.start!==void 0&&(y=()=>o.start(p)),o.pull!==void 0&&(A=()=>o.pull(p)),o.cancel!==void 0&&(C=Q=>o.cancel(Q));let q=o.autoAllocateChunkSize;if(q===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Go(s,p,y,A,C,u,q)}function zh(s,o,u){s._associatedReadableByteStreamController=o,s._view=u}function qs(s){return new TypeError(`ReadableStreamBYOBRequest.prototype.${s} can only be used on a ReadableStreamBYOBRequest`)}function Tr(s){return new TypeError(`ReadableByteStreamController.prototype.${s} can only be used on a ReadableByteStreamController`)}function Vo(s){return new Cr(s)}function Yo(s,o){s._reader._readIntoRequests.push(o)}function jh(s,o,u){let y=s._reader._readIntoRequests.shift();u?y._closeSteps(o):y._chunkSteps(o)}function Qo(s){return s._reader._readIntoRequests.length}function Us(s){let o=s._reader;return!(o===void 0||!Ct(o))}class Cr{constructor(o){if(J(o,1,"ReadableStreamBYOBReader"),Et(o,"First parameter"),gt(o))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!At(o._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");k(this,o),this._readIntoRequests=new H}get closed(){return Ct(this)?this._closedPromise:d(bn("closed"))}cancel(o=void 0){return Ct(this)?this._ownerReadableStream===void 0?d(z("cancel")):N(this,o):d(bn("cancel"))}read(o){if(!Ct(this))return d(bn("read"));if(!ArrayBuffer.isView(o))return d(new TypeError("view must be an array buffer view"));if(o.byteLength===0)return d(new TypeError("view must have non-zero byteLength"));if(o.buffer.byteLength===0)return d(new TypeError("view's buffer must have non-zero byteLength"));if(cn(o.buffer),this._ownerReadableStream===void 0)return d(z("read from"));let u,p,y=g((C,q)=>{u=C,p=q});return Ko(this,o,{_chunkSteps:C=>u({value:C,done:!1}),_closeSteps:C=>u({value:C,done:!0}),_errorSteps:C=>p(C)}),y}releaseLock(){if(!Ct(this))throw bn("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");S(this)}}}Object.defineProperties(Cr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Cr.prototype,e.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Ct(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readIntoRequests")?!1:s instanceof Cr}function Ko(s,o,u){let p=s._ownerReadableStream;p._disturbed=!0,p._state==="errored"?u._errorSteps(p._storedError):qh(p._readableStreamController,o,u)}function bn(s){return new TypeError(`ReadableStreamBYOBReader.prototype.${s} can only be used on a ReadableStreamBYOBReader`)}function xr(s,o){let{highWaterMark:u}=s;if(u===void 0)return o;if(No(u)||u<0)throw new RangeError("Invalid highWaterMark");return u}function yn(s){let{size:o}=s;return o||(()=>1)}function _n(s,o){G(s,o);let u=s?.highWaterMark,p=s?.size;return{highWaterMark:u===void 0?void 0:V(u),size:p===void 0?void 0:Gh(p,`${o} has member 'size' that`)}}function Gh(s,o){return Ee(s,o),u=>V(s(u))}function Vh(s,o){G(s,o);let u=s?.abort,p=s?.close,y=s?.start,A=s?.type,C=s?.write;return{abort:u===void 0?void 0:Yh(u,s,`${o} has member 'abort' that`),close:p===void 0?void 0:Qh(p,s,`${o} has member 'close' that`),start:y===void 0?void 0:Kh(y,s,`${o} has member 'start' that`),write:C===void 0?void 0:Xh(C,s,`${o} has member 'write' that`),type:A}}function Yh(s,o,u){return Ee(s,u),p=>F(s,o,[p])}function Qh(s,o,u){return Ee(s,u),()=>F(s,o,[])}function Kh(s,o,u){return Ee(s,u),p=>v(s,o,[p])}function Xh(s,o,u){return Ee(s,u),(p,y)=>F(s,o,[p,y])}function Xo(s,o){if(!jt(s))throw new TypeError(`${o} is not a WritableStream.`)}function Zh(s){if(typeof s!="object"||s===null)return!1;try{return typeof s.aborted=="boolean"}catch{return!1}}let Jh=typeof AbortController=="function";function ed(){if(Jh)return new AbortController}class vr{constructor(o={},u={}){o===void 0?o=null:P(o,"First parameter");let p=_n(u,"Second parameter"),y=Vh(o,"First parameter");if(Jo(this),y.type!==void 0)throw new RangeError("Invalid type is specified");let C=yn(p),q=xr(p,1);pd(this,y,q,C)}get locked(){if(!jt(this))throw An("locked");return Gt(this)}abort(o=void 0){return jt(this)?Gt(this)?d(new TypeError("Cannot abort a stream that already has a writer")):Rn(this,o):d(An("abort"))}close(){return jt(this)?Gt(this)?d(new TypeError("Cannot close a stream that already has a writer")):Ke(this)?d(new TypeError("Cannot close an already-closing stream")):ea(this):d(An("close"))}getWriter(){if(!jt(this))throw An("getWriter");return Zo(this)}}Object.defineProperties(vr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(vr.prototype,e.toStringTag,{value:"WritableStream",configurable:!0});function Zo(s){return new Or(s)}function td(s,o,u,p,y=1,A=()=>1){let C=Object.create(vr.prototype);Jo(C);let q=Object.create(Vt.prototype);return oa(C,q,s,o,u,p,y,A),C}function Jo(s){s._state="writable",s._storedError=void 0,s._writer=void 0,s._writableStreamController=void 0,s._writeRequests=new H,s._inFlightWriteRequest=void 0,s._closeRequest=void 0,s._inFlightCloseRequest=void 0,s._pendingAbortRequest=void 0,s._backpressure=!1}function jt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_writableStreamController")?!1:s instanceof vr}function Gt(s){return s._writer!==void 0}function Rn(s,o){var u;if(s._state==="closed"||s._state==="errored")return m(void 0);s._writableStreamController._abortReason=o,(u=s._writableStreamController._abortController)===null||u===void 0||u.abort();let p=s._state;if(p==="closed"||p==="errored")return m(void 0);if(s._pendingAbortRequest!==void 0)return s._pendingAbortRequest._promise;let y=!1;p==="erroring"&&(y=!0,o=void 0);let A=g((C,q)=>{s._pendingAbortRequest={_promise:void 0,_resolve:C,_reject:q,_reason:o,_wasAlreadyErroring:y}});return s._pendingAbortRequest._promise=A,y||Ws(s,o),A}function ea(s){let o=s._state;if(o==="closed"||o==="errored")return d(new TypeError(`The stream (in ${o} state) is not in the writable state and cannot be closed`));let u=g((y,A)=>{let C={_resolve:y,_reject:A};s._closeRequest=C}),p=s._writer;return p!==void 0&&s._backpressure&&o==="writable"&&Xs(p),md(s._writableStreamController),u}function rd(s){return g((u,p)=>{let y={_resolve:u,_reject:p};s._writeRequests.push(y)})}function Ms(s,o){if(s._state==="writable"){Ws(s,o);return}ks(s)}function Ws(s,o){let u=s._writableStreamController;s._state="erroring",s._storedError=o;let p=s._writer;p!==void 0&&ra(p,o),!ad(s)&&u._started&&ks(s)}function ks(s){s._state="errored",s._writableStreamController[de]();let o=s._storedError;if(s._writeRequests.forEach(y=>{y._reject(o)}),s._writeRequests=new H,s._pendingAbortRequest===void 0){Sn(s);return}let u=s._pendingAbortRequest;if(s._pendingAbortRequest=void 0,u._wasAlreadyErroring){u._reject(o),Sn(s);return}let p=s._writableStreamController[Se](u._reason);R(p,()=>{u._resolve(),Sn(s)},y=>{u._reject(y),Sn(s)})}function nd(s){s._inFlightWriteRequest._resolve(void 0),s._inFlightWriteRequest=void 0}function sd(s,o){s._inFlightWriteRequest._reject(o),s._inFlightWriteRequest=void 0,Ms(s,o)}function id(s){s._inFlightCloseRequest._resolve(void 0),s._inFlightCloseRequest=void 0,s._state==="erroring"&&(s._storedError=void 0,s._pendingAbortRequest!==void 0&&(s._pendingAbortRequest._resolve(),s._pendingAbortRequest=void 0)),s._state="closed";let u=s._writer;u!==void 0&&ca(u)}function od(s,o){s._inFlightCloseRequest._reject(o),s._inFlightCloseRequest=void 0,s._pendingAbortRequest!==void 0&&(s._pendingAbortRequest._reject(o),s._pendingAbortRequest=void 0),Ms(s,o)}function Ke(s){return!(s._closeRequest===void 0&&s._inFlightCloseRequest===void 0)}function ad(s){return!(s._inFlightWriteRequest===void 0&&s._inFlightCloseRequest===void 0)}function ld(s){s._inFlightCloseRequest=s._closeRequest,s._closeRequest=void 0}function ud(s){s._inFlightWriteRequest=s._writeRequests.shift()}function Sn(s){s._closeRequest!==void 0&&(s._closeRequest._reject(s._storedError),s._closeRequest=void 0);let o=s._writer;o!==void 0&&Qs(o,s._storedError)}function zs(s,o){let u=s._writer;u!==void 0&&o!==s._backpressure&&(o?wd(u):Xs(u)),s._backpressure=o}class Or{constructor(o){if(J(o,1,"WritableStreamDefaultWriter"),Xo(o,"First parameter"),Gt(o))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=o,o._writer=this;let u=o._state;if(u==="writable")!Ke(o)&&o._backpressure?Cn(this):fa(this),Tn(this);else if(u==="erroring")Ks(this,o._storedError),Tn(this);else if(u==="closed")fa(this),Rd(this);else{let p=o._storedError;Ks(this,p),ua(this,p)}}get closed(){return xt(this)?this._closedPromise:d(vt("closed"))}get desiredSize(){if(!xt(this))throw vt("desiredSize");if(this._ownerWritableStream===void 0)throw $r("desiredSize");return dd(this)}get ready(){return xt(this)?this._readyPromise:d(vt("ready"))}abort(o=void 0){return xt(this)?this._ownerWritableStream===void 0?d($r("abort")):cd(this,o):d(vt("abort"))}close(){if(!xt(this))return d(vt("close"));let o=this._ownerWritableStream;return o===void 0?d($r("close")):Ke(o)?d(new TypeError("Cannot close an already-closing stream")):ta(this)}releaseLock(){if(!xt(this))throw vt("releaseLock");this._ownerWritableStream!==void 0&&na(this)}write(o=void 0){return xt(this)?this._ownerWritableStream===void 0?d($r("write to")):sa(this,o):d(vt("write"))}}Object.defineProperties(Or.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(Or.prototype,e.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function xt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_ownerWritableStream")?!1:s instanceof Or}function cd(s,o){let u=s._ownerWritableStream;return Rn(u,o)}function ta(s){let o=s._ownerWritableStream;return ea(o)}function fd(s){let o=s._ownerWritableStream,u=o._state;return Ke(o)||u==="closed"?m(void 0):u==="errored"?d(o._storedError):ta(s)}function hd(s,o){s._closedPromiseState==="pending"?Qs(s,o):Sd(s,o)}function ra(s,o){s._readyPromiseState==="pending"?ha(s,o):Ed(s,o)}function dd(s){let o=s._ownerWritableStream,u=o._state;return u==="errored"||u==="erroring"?null:u==="closed"?0:aa(o._writableStreamController)}function na(s){let o=s._ownerWritableStream,u=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");ra(s,u),hd(s,u),o._writer=void 0,s._ownerWritableStream=void 0}function sa(s,o){let u=s._ownerWritableStream,p=u._writableStreamController,y=gd(p,o);if(u!==s._ownerWritableStream)return d($r("write to"));let A=u._state;if(A==="errored")return d(u._storedError);if(Ke(u)||A==="closed")return d(new TypeError("The stream is closing or closed and cannot be written to"));if(A==="erroring")return d(u._storedError);let C=rd(u);return bd(p,o,y),C}let ia={};class Vt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!js(this))throw Ys("abortReason");return this._abortReason}get signal(){if(!js(this))throw Ys("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(o=void 0){if(!js(this))throw Ys("error");this._controlledWritableStream._state==="writable"&&la(this,o)}[Se](o){let u=this._abortAlgorithm(o);return wn(this),u}[de](){ht(this)}}Object.defineProperties(Vt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Vt.prototype,e.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function js(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledWritableStream")?!1:s instanceof Vt}function oa(s,o,u,p,y,A,C,q){o._controlledWritableStream=s,s._writableStreamController=o,o._queue=void 0,o._queueTotalSize=void 0,ht(o),o._abortReason=void 0,o._abortController=ed(),o._started=!1,o._strategySizeAlgorithm=q,o._strategyHWM=C,o._writeAlgorithm=p,o._closeAlgorithm=y,o._abortAlgorithm=A;let Q=Vs(o);zs(s,Q);let ee=u(),te=m(ee);R(te,()=>{o._started=!0,En(o)},re=>{o._started=!0,Ms(s,re)})}function pd(s,o,u,p){let y=Object.create(Vt.prototype),A=()=>{},C=()=>m(void 0),q=()=>m(void 0),Q=()=>m(void 0);o.start!==void 0&&(A=()=>o.start(y)),o.write!==void 0&&(C=ee=>o.write(ee,y)),o.close!==void 0&&(q=()=>o.close()),o.abort!==void 0&&(Q=ee=>o.abort(ee)),oa(s,y,A,C,q,Q,u,p)}function wn(s){s._writeAlgorithm=void 0,s._closeAlgorithm=void 0,s._abortAlgorithm=void 0,s._strategySizeAlgorithm=void 0}function md(s){Ns(s,ia,0),En(s)}function gd(s,o){try{return s._strategySizeAlgorithm(o)}catch(u){return Gs(s,u),1}}function aa(s){return s._strategyHWM-s._queueTotalSize}function bd(s,o,u){try{Ns(s,o,u)}catch(y){Gs(s,y);return}let p=s._controlledWritableStream;if(!Ke(p)&&p._state==="writable"){let y=Vs(s);zs(p,y)}En(s)}function En(s){let o=s._controlledWritableStream;if(!s._started||o._inFlightWriteRequest!==void 0)return;if(o._state==="erroring"){ks(o);return}if(s._queue.length===0)return;let p=Fh(s);p===ia?yd(s):_d(s,p)}function Gs(s,o){s._controlledWritableStream._state==="writable"&&la(s,o)}function yd(s){let o=s._controlledWritableStream;ld(o),Ps(s);let u=s._closeAlgorithm();wn(s),R(u,()=>{id(o)},p=>{od(o,p)})}function _d(s,o){let u=s._controlledWritableStream;ud(u);let p=s._writeAlgorithm(o);R(p,()=>{nd(u);let y=u._state;if(Ps(s),!Ke(u)&&y==="writable"){let A=Vs(s);zs(u,A)}En(s)},y=>{u._state==="writable"&&wn(s),sd(u,y)})}function Vs(s){return aa(s)<=0}function la(s,o){let u=s._controlledWritableStream;wn(s),Ws(u,o)}function An(s){return new TypeError(`WritableStream.prototype.${s} can only be used on a WritableStream`)}function Ys(s){return new TypeError(`WritableStreamDefaultController.prototype.${s} can only be used on a WritableStreamDefaultController`)}function vt(s){return new TypeError(`WritableStreamDefaultWriter.prototype.${s} can only be used on a WritableStreamDefaultWriter`)}function $r(s){return new TypeError("Cannot "+s+" a stream using a released writer")}function Tn(s){s._closedPromise=g((o,u)=>{s._closedPromise_resolve=o,s._closedPromise_reject=u,s._closedPromiseState="pending"})}function ua(s,o){Tn(s),Qs(s,o)}function Rd(s){Tn(s),ca(s)}function Qs(s,o){s._closedPromise_reject!==void 0&&(L(s._closedPromise),s._closedPromise_reject(o),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0,s._closedPromiseState="rejected")}function Sd(s,o){ua(s,o)}function ca(s){s._closedPromise_resolve!==void 0&&(s._closedPromise_resolve(void 0),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0,s._closedPromiseState="resolved")}function Cn(s){s._readyPromise=g((o,u)=>{s._readyPromise_resolve=o,s._readyPromise_reject=u}),s._readyPromiseState="pending"}function Ks(s,o){Cn(s),ha(s,o)}function fa(s){Cn(s),Xs(s)}function ha(s,o){s._readyPromise_reject!==void 0&&(L(s._readyPromise),s._readyPromise_reject(o),s._readyPromise_resolve=void 0,s._readyPromise_reject=void 0,s._readyPromiseState="rejected")}function wd(s){Cn(s)}function Ed(s,o){Ks(s,o)}function Xs(s){s._readyPromise_resolve!==void 0&&(s._readyPromise_resolve(void 0),s._readyPromise_resolve=void 0,s._readyPromise_reject=void 0,s._readyPromiseState="fulfilled")}let da=typeof DOMException<"u"?DOMException:void 0;function Ad(s){if(!(typeof s=="function"||typeof s=="object"))return!1;try{return new s,!0}catch{return!1}}function Td(){let s=function(u,p){this.message=u||"",this.name=p||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return s.prototype=Object.create(Error.prototype),Object.defineProperty(s.prototype,"constructor",{value:s,writable:!0,configurable:!0}),s}let Cd=Ad(da)?da:Td();function pa(s,o,u,p,y,A){let C=ze(s),q=Zo(o);s._disturbed=!0;let Q=!1,ee=m(void 0);return g((te,re)=>{let ge;if(A!==void 0){if(ge=()=>{let W=new Cd("Aborted","AbortError"),X=[];p||X.push(()=>o._state==="writable"?Rn(o,W):m(void 0)),y||X.push(()=>s._state==="readable"?Ge(s,W):m(void 0)),Oe(()=>Promise.all(X.map(le=>le())),!0,W)},A.aborted){ge();return}A.addEventListener("abort",ge)}function Ve(){return g((W,X)=>{function le(Ne){Ne?W():_(Kt(),le,X)}le(!1)})}function Kt(){return Q?m(!0):_(q._readyPromise,()=>g((W,X)=>{Sr(C,{_chunkSteps:le=>{ee=_(sa(q,le),void 0,r),W(!1)},_closeSteps:()=>W(!0),_errorSteps:X})}))}if(rt(s,C._closedPromise,W=>{p?Be(!0,W):Oe(()=>Rn(o,W),!0,W)}),rt(o,q._closedPromise,W=>{y?Be(!0,W):Oe(()=>Ge(s,W),!0,W)}),Ce(s,C._closedPromise,()=>{u?Be():Oe(()=>fd(q))}),Ke(o)||o._state==="closed"){let W=new TypeError("the destination writable stream closed before all data could be piped to it");y?Be(!0,W):Oe(()=>Ge(s,W),!0,W)}L(Ve());function bt(){let W=ee;return _(ee,()=>W!==ee?bt():void 0)}function rt(W,X,le){W._state==="errored"?le(W._storedError):x(X,le)}function Ce(W,X,le){W._state==="closed"?le():O(X,le)}function Oe(W,X,le){if(Q)return;Q=!0,o._state==="writable"&&!Ke(o)?O(bt(),Ne):Ne();function Ne(){R(W(),()=>nt(X,le),Xt=>nt(!0,Xt))}}function Be(W,X){Q||(Q=!0,o._state==="writable"&&!Ke(o)?O(bt(),()=>nt(W,X)):nt(W,X))}function nt(W,X){na(q),S(C),A!==void 0&&A.removeEventListener("abort",ge),W?re(X):te(void 0)}})}class Yt{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!xn(this))throw $n("desiredSize");return Zs(this)}close(){if(!xn(this))throw $n("close");if(!Qt(this))throw new TypeError("The stream is not in a state that permits close");Lr(this)}enqueue(o=void 0){if(!xn(this))throw $n("enqueue");if(!Qt(this))throw new TypeError("The stream is not in a state that permits enqueue");return On(this,o)}error(o=void 0){if(!xn(this))throw $n("error");dt(this,o)}[me](o){ht(this);let u=this._cancelAlgorithm(o);return vn(this),u}[ct](o){let u=this._controlledReadableStream;if(this._queue.length>0){let p=Ps(this);this._closeRequested&&this._queue.length===0?(vn(this),Pr(u)):Ir(this),o._chunkSteps(p)}else xo(u,o),Ir(this)}}Object.defineProperties(Yt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Yt.prototype,e.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function xn(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledReadableStream")?!1:s instanceof Yt}function Ir(s){if(!ma(s))return;if(s._pulling){s._pullAgain=!0;return}s._pulling=!0;let u=s._pullAlgorithm();R(u,()=>{s._pulling=!1,s._pullAgain&&(s._pullAgain=!1,Ir(s))},p=>{dt(s,p)})}function ma(s){let o=s._controlledReadableStream;return!Qt(s)||!s._started?!1:!!(gt(o)&&ln(o)>0||Zs(s)>0)}function vn(s){s._pullAlgorithm=void 0,s._cancelAlgorithm=void 0,s._strategySizeAlgorithm=void 0}function Lr(s){if(!Qt(s))return;let o=s._controlledReadableStream;s._closeRequested=!0,s._queue.length===0&&(vn(s),Pr(o))}function On(s,o){if(!Qt(s))return;let u=s._controlledReadableStream;if(gt(u)&&ln(u)>0)Ls(u,o,!1);else{let p;try{p=s._strategySizeAlgorithm(o)}catch(y){throw dt(s,y),y}try{Ns(s,o,p)}catch(y){throw dt(s,y),y}}Ir(s)}function dt(s,o){let u=s._controlledReadableStream;u._state==="readable"&&(ht(s),vn(s),_a(u,o))}function Zs(s){let o=s._controlledReadableStream._state;return o==="errored"?null:o==="closed"?0:s._strategyHWM-s._queueTotalSize}function xd(s){return!ma(s)}function Qt(s){let o=s._controlledReadableStream._state;return!s._closeRequested&&o==="readable"}function ga(s,o,u,p,y,A,C){o._controlledReadableStream=s,o._queue=void 0,o._queueTotalSize=void 0,ht(o),o._started=!1,o._closeRequested=!1,o._pullAgain=!1,o._pulling=!1,o._strategySizeAlgorithm=C,o._strategyHWM=A,o._pullAlgorithm=p,o._cancelAlgorithm=y,s._readableStreamController=o;let q=u();R(m(q),()=>{o._started=!0,Ir(o)},Q=>{dt(o,Q)})}function vd(s,o,u,p){let y=Object.create(Yt.prototype),A=()=>{},C=()=>m(void 0),q=()=>m(void 0);o.start!==void 0&&(A=()=>o.start(y)),o.pull!==void 0&&(C=()=>o.pull(y)),o.cancel!==void 0&&(q=Q=>o.cancel(Q)),ga(s,y,A,C,q,u,p)}function $n(s){return new TypeError(`ReadableStreamDefaultController.prototype.${s} can only be used on a ReadableStreamDefaultController`)}function Od(s,o){return At(s._readableStreamController)?Id(s):$d(s)}function $d(s,o){let u=ze(s),p=!1,y=!1,A=!1,C=!1,q,Q,ee,te,re,ge=g(Ce=>{re=Ce});function Ve(){return p?(y=!0,m(void 0)):(p=!0,Sr(u,{_chunkSteps:Oe=>{T(()=>{y=!1;let Be=Oe,nt=Oe;A||On(ee._readableStreamController,Be),C||On(te._readableStreamController,nt),p=!1,y&&Ve()})},_closeSteps:()=>{p=!1,A||Lr(ee._readableStreamController),C||Lr(te._readableStreamController),(!A||!C)&&re(void 0)},_errorSteps:()=>{p=!1}}),m(void 0))}function Kt(Ce){if(A=!0,q=Ce,C){let Oe=wr([q,Q]),Be=Ge(s,Oe);re(Be)}return ge}function bt(Ce){if(C=!0,Q=Ce,A){let Oe=wr([q,Q]),Be=Ge(s,Oe);re(Be)}return ge}function rt(){}return ee=Js(rt,Ve,Kt),te=Js(rt,Ve,bt),x(u._closedPromise,Ce=>{dt(ee._readableStreamController,Ce),dt(te._readableStreamController,Ce),(!A||!C)&&re(void 0)}),[ee,te]}function Id(s){let o=ze(s),u=!1,p=!1,y=!1,A=!1,C=!1,q,Q,ee,te,re,ge=g(W=>{re=W});function Ve(W){x(W._closedPromise,X=>{W===o&&(je(ee._readableStreamController,X),je(te._readableStreamController,X),(!A||!C)&&re(void 0))})}function Kt(){Ct(o)&&(S(o),o=ze(s),Ve(o)),Sr(o,{_chunkSteps:X=>{T(()=>{p=!1,y=!1;let le=X,Ne=X;if(!A&&!C)try{Ne=Bo(X)}catch(Xt){je(ee._readableStreamController,Xt),je(te._readableStreamController,Xt),re(Ge(s,Xt));return}A||pn(ee._readableStreamController,le),C||pn(te._readableStreamController,Ne),u=!1,p?rt():y&&Ce()})},_closeSteps:()=>{u=!1,A||Ar(ee._readableStreamController),C||Ar(te._readableStreamController),ee._readableStreamController._pendingPullIntos.length>0&&mn(ee._readableStreamController,0),te._readableStreamController._pendingPullIntos.length>0&&mn(te._readableStreamController,0),(!A||!C)&&re(void 0)},_errorSteps:()=>{u=!1}})}function bt(W,X){ft(o)&&(S(o),o=Vo(s),Ve(o));let le=X?te:ee,Ne=X?ee:te;Ko(o,W,{_chunkSteps:Zt=>{T(()=>{p=!1,y=!1;let Jt=X?C:A;if(X?A:C)Jt||gn(le._readableStreamController,Zt);else{let La;try{La=Bo(Zt)}catch(ti){je(le._readableStreamController,ti),je(Ne._readableStreamController,ti),re(Ge(s,ti));return}Jt||gn(le._readableStreamController,Zt),pn(Ne._readableStreamController,La)}u=!1,p?rt():y&&Ce()})},_closeSteps:Zt=>{u=!1;let Jt=X?C:A,qn=X?A:C;Jt||Ar(le._readableStreamController),qn||Ar(Ne._readableStreamController),Zt!==void 0&&(Jt||gn(le._readableStreamController,Zt),!qn&&Ne._readableStreamController._pendingPullIntos.length>0&&mn(Ne._readableStreamController,0)),(!Jt||!qn)&&re(void 0)},_errorSteps:()=>{u=!1}})}function rt(){if(u)return p=!0,m(void 0);u=!0;let W=Fs(ee._readableStreamController);return W===null?Kt():bt(W._view,!1),m(void 0)}function Ce(){if(u)return y=!0,m(void 0);u=!0;let W=Fs(te._readableStreamController);return W===null?Kt():bt(W._view,!0),m(void 0)}function Oe(W){if(A=!0,q=W,C){let X=wr([q,Q]),le=Ge(s,X);re(le)}return ge}function Be(W){if(C=!0,Q=W,A){let X=wr([q,Q]),le=Ge(s,X);re(le)}return ge}function nt(){}return ee=ya(nt,rt,Oe),te=ya(nt,Ce,Be),Ve(o),[ee,te]}function Ld(s,o){G(s,o);let u=s,p=u?.autoAllocateChunkSize,y=u?.cancel,A=u?.pull,C=u?.start,q=u?.type;return{autoAllocateChunkSize:p===void 0?void 0:he(p,`${o} has member 'autoAllocateChunkSize' that`),cancel:y===void 0?void 0:Pd(y,u,`${o} has member 'cancel' that`),pull:A===void 0?void 0:Nd(A,u,`${o} has member 'pull' that`),start:C===void 0?void 0:Hd(C,u,`${o} has member 'start' that`),type:q===void 0?void 0:Dd(q,`${o} has member 'type' that`)}}function Pd(s,o,u){return Ee(s,u),p=>F(s,o,[p])}function Nd(s,o,u){return Ee(s,u),p=>F(s,o,[p])}function Hd(s,o,u){return Ee(s,u),p=>v(s,o,[p])}function Dd(s,o){if(s=`${s}`,s!=="bytes")throw new TypeError(`${o} '${s}' is not a valid enumeration value for ReadableStreamType`);return s}function Bd(s,o){G(s,o);let u=s?.mode;return{mode:u===void 0?void 0:Fd(u,`${o} has member 'mode' that`)}}function Fd(s,o){if(s=`${s}`,s!=="byob")throw new TypeError(`${o} '${s}' is not a valid enumeration value for ReadableStreamReaderMode`);return s}function qd(s,o){return G(s,o),{preventCancel:!!s?.preventCancel}}function ba(s,o){G(s,o);let u=s?.preventAbort,p=s?.preventCancel,y=s?.preventClose,A=s?.signal;return A!==void 0&&Ud(A,`${o} has member 'signal' that`),{preventAbort:!!u,preventCancel:!!p,preventClose:!!y,signal:A}}function Ud(s,o){if(!Zh(s))throw new TypeError(`${o} is not an AbortSignal.`)}function Md(s,o){G(s,o);let u=s?.readable;$(u,"readable","ReadableWritablePair"),Et(u,`${o} has member 'readable' that`);let p=s?.writable;return $(p,"writable","ReadableWritablePair"),Xo(p,`${o} has member 'writable' that`),{readable:u,writable:p}}class pt{constructor(o={},u={}){o===void 0?o=null:P(o,"First parameter");let p=_n(u,"Second parameter"),y=Ld(o,"First parameter");if(ei(this),y.type==="bytes"){if(p.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let A=xr(p,0);kh(this,y,A)}else{let A=yn(p),C=xr(p,1);vd(this,y,C,A)}}get locked(){if(!mt(this))throw Ot("locked");return gt(this)}cancel(o=void 0){return mt(this)?gt(this)?d(new TypeError("Cannot cancel a stream that already has a reader")):Ge(this,o):d(Ot("cancel"))}getReader(o=void 0){if(!mt(this))throw Ot("getReader");return Bd(o,"First parameter").mode===void 0?ze(this):Vo(this)}pipeThrough(o,u={}){if(!mt(this))throw Ot("pipeThrough");J(o,1,"pipeThrough");let p=Md(o,"First parameter"),y=ba(u,"Second parameter");if(gt(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Gt(p.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let A=pa(this,p.writable,y.preventClose,y.preventAbort,y.preventCancel,y.signal);return L(A),p.readable}pipeTo(o,u={}){if(!mt(this))return d(Ot("pipeTo"));if(o===void 0)return d("Parameter 1 is required in 'pipeTo'.");if(!jt(o))return d(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let p;try{p=ba(u,"Second parameter")}catch(y){return d(y)}return gt(this)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Gt(o)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):pa(this,o,p.preventClose,p.preventAbort,p.preventCancel,p.signal)}tee(){if(!mt(this))throw Ot("tee");let o=Od(this);return wr(o)}values(o=void 0){if(!mt(this))throw Ot("values");let u=qd(o,"First parameter");return Dh(this,u.preventCancel)}}Object.defineProperties(pt.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(pt.prototype,e.toStringTag,{value:"ReadableStream",configurable:!0}),typeof e.asyncIterator=="symbol"&&Object.defineProperty(pt.prototype,e.asyncIterator,{value:pt.prototype.values,writable:!0,configurable:!0});function Js(s,o,u,p=1,y=()=>1){let A=Object.create(pt.prototype);ei(A);let C=Object.create(Yt.prototype);return ga(A,C,s,o,u,p,y),A}function ya(s,o,u){let p=Object.create(pt.prototype);ei(p);let y=Object.create(zt.prototype);return Go(p,y,s,o,u,0,void 0),p}function ei(s){s._state="readable",s._reader=void 0,s._storedError=void 0,s._disturbed=!1}function mt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readableStreamController")?!1:s instanceof pt}function gt(s){return s._reader!==void 0}function Ge(s,o){if(s._disturbed=!0,s._state==="closed")return m(void 0);if(s._state==="errored")return d(s._storedError);Pr(s);let u=s._reader;u!==void 0&&Ct(u)&&(u._readIntoRequests.forEach(y=>{y._closeSteps(void 0)}),u._readIntoRequests=new H);let p=s._readableStreamController[me](o);return D(p,r)}function Pr(s){s._state="closed";let o=s._reader;o!==void 0&&(j(o),ft(o)&&(o._readRequests.forEach(u=>{u._closeSteps()}),o._readRequests=new H))}function _a(s,o){s._state="errored",s._storedError=o;let u=s._reader;u!==void 0&&(w(u,o),ft(u)?(u._readRequests.forEach(p=>{p._errorSteps(o)}),u._readRequests=new H):(u._readIntoRequests.forEach(p=>{p._errorSteps(o)}),u._readIntoRequests=new H))}function Ot(s){return new TypeError(`ReadableStream.prototype.${s} can only be used on a ReadableStream`)}function Ra(s,o){G(s,o);let u=s?.highWaterMark;return $(u,"highWaterMark","QueuingStrategyInit"),{highWaterMark:V(u)}}let Sa=s=>s.byteLength;try{Object.defineProperty(Sa,"name",{value:"size",configurable:!0})}catch{}class In{constructor(o){J(o,1,"ByteLengthQueuingStrategy"),o=Ra(o,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=o.highWaterMark}get highWaterMark(){if(!Ea(this))throw wa("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Ea(this))throw wa("size");return Sa}}Object.defineProperties(In.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(In.prototype,e.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function wa(s){return new TypeError(`ByteLengthQueuingStrategy.prototype.${s} can only be used on a ByteLengthQueuingStrategy`)}function Ea(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_byteLengthQueuingStrategyHighWaterMark")?!1:s instanceof In}let Aa=()=>1;try{Object.defineProperty(Aa,"name",{value:"size",configurable:!0})}catch{}class Ln{constructor(o){J(o,1,"CountQueuingStrategy"),o=Ra(o,"First parameter"),this._countQueuingStrategyHighWaterMark=o.highWaterMark}get highWaterMark(){if(!Ca(this))throw Ta("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Ca(this))throw Ta("size");return Aa}}Object.defineProperties(Ln.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Ln.prototype,e.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Ta(s){return new TypeError(`CountQueuingStrategy.prototype.${s} can only be used on a CountQueuingStrategy`)}function Ca(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_countQueuingStrategyHighWaterMark")?!1:s instanceof Ln}function Wd(s,o){G(s,o);let u=s?.flush,p=s?.readableType,y=s?.start,A=s?.transform,C=s?.writableType;return{flush:u===void 0?void 0:kd(u,s,`${o} has member 'flush' that`),readableType:p,start:y===void 0?void 0:zd(y,s,`${o} has member 'start' that`),transform:A===void 0?void 0:jd(A,s,`${o} has member 'transform' that`),writableType:C}}function kd(s,o,u){return Ee(s,u),p=>F(s,o,[p])}function zd(s,o,u){return Ee(s,u),p=>v(s,o,[p])}function jd(s,o,u){return Ee(s,u),(p,y)=>F(s,o,[p,y])}class Pn{constructor(o={},u={},p={}){o===void 0&&(o=null);let y=_n(u,"Second parameter"),A=_n(p,"Third parameter"),C=Wd(o,"First parameter");if(C.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(C.writableType!==void 0)throw new RangeError("Invalid writableType specified");let q=xr(A,0),Q=yn(A),ee=xr(y,1),te=yn(y),re,ge=g(Ve=>{re=Ve});Gd(this,ge,ee,te,q,Q),Yd(this,C),C.start!==void 0?re(C.start(this._transformStreamController)):re(void 0)}get readable(){if(!xa(this))throw Ia("readable");return this._readable}get writable(){if(!xa(this))throw Ia("writable");return this._writable}}Object.defineProperties(Pn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Pn.prototype,e.toStringTag,{value:"TransformStream",configurable:!0});function Gd(s,o,u,p,y,A){function C(){return o}function q(ge){return Xd(s,ge)}function Q(ge){return Zd(s,ge)}function ee(){return Jd(s)}s._writable=td(C,q,ee,Q,u,p);function te(){return ep(s)}function re(ge){return Hn(s,ge),m(void 0)}s._readable=Js(C,te,re,y,A),s._backpressure=void 0,s._backpressureChangePromise=void 0,s._backpressureChangePromise_resolve=void 0,Dn(s,!0),s._transformStreamController=void 0}function xa(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_transformStreamController")?!1:s instanceof Pn}function Nn(s,o){dt(s._readable._readableStreamController,o),Hn(s,o)}function Hn(s,o){va(s._transformStreamController),Gs(s._writable._writableStreamController,o),s._backpressure&&Dn(s,!1)}function Dn(s,o){s._backpressureChangePromise!==void 0&&s._backpressureChangePromise_resolve(),s._backpressureChangePromise=g(u=>{s._backpressureChangePromise_resolve=u}),s._backpressure=o}class Nr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Bn(this))throw Fn("desiredSize");let o=this._controlledTransformStream._readable._readableStreamController;return Zs(o)}enqueue(o=void 0){if(!Bn(this))throw Fn("enqueue");Oa(this,o)}error(o=void 0){if(!Bn(this))throw Fn("error");Qd(this,o)}terminate(){if(!Bn(this))throw Fn("terminate");Kd(this)}}Object.defineProperties(Nr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Nr.prototype,e.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Bn(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledTransformStream")?!1:s instanceof Nr}function Vd(s,o,u,p){o._controlledTransformStream=s,s._transformStreamController=o,o._transformAlgorithm=u,o._flushAlgorithm=p}function Yd(s,o){let u=Object.create(Nr.prototype),p=A=>{try{return Oa(u,A),m(void 0)}catch(C){return d(C)}},y=()=>m(void 0);o.transform!==void 0&&(p=A=>o.transform(A,u)),o.flush!==void 0&&(y=()=>o.flush(u)),Vd(s,u,p,y)}function va(s){s._transformAlgorithm=void 0,s._flushAlgorithm=void 0}function Oa(s,o){let u=s._controlledTransformStream,p=u._readable._readableStreamController;if(!Qt(p))throw new TypeError("Readable side is not in a state that permits enqueue");try{On(p,o)}catch(A){throw Hn(u,A),u._readable._storedError}xd(p)!==u._backpressure&&Dn(u,!0)}function Qd(s,o){Nn(s._controlledTransformStream,o)}function $a(s,o){let u=s._transformAlgorithm(o);return D(u,void 0,p=>{throw Nn(s._controlledTransformStream,p),p})}function Kd(s){let o=s._controlledTransformStream,u=o._readable._readableStreamController;Lr(u);let p=new TypeError("TransformStream terminated");Hn(o,p)}function Xd(s,o){let u=s._transformStreamController;if(s._backpressure){let p=s._backpressureChangePromise;return D(p,()=>{let y=s._writable;if(y._state==="erroring")throw y._storedError;return $a(u,o)})}return $a(u,o)}function Zd(s,o){return Nn(s,o),m(void 0)}function Jd(s){let o=s._readable,u=s._transformStreamController,p=u._flushAlgorithm();return va(u),D(p,()=>{if(o._state==="errored")throw o._storedError;Lr(o._readableStreamController)},y=>{throw Nn(s,y),o._storedError})}function ep(s){return Dn(s,!1),s._backpressureChangePromise}function Fn(s){return new TypeError(`TransformStreamDefaultController.prototype.${s} can only be used on a TransformStreamDefaultController`)}function Ia(s){return new TypeError(`TransformStream.prototype.${s} can only be used on a TransformStream`)}t.ByteLengthQueuingStrategy=In,t.CountQueuingStrategy=Ln,t.ReadableByteStreamController=zt,t.ReadableStream=pt,t.ReadableStreamBYOBReader=Cr,t.ReadableStreamBYOBRequest=Er,t.ReadableStreamDefaultController=Yt,t.ReadableStreamDefaultReader=Rr,t.TransformStream=Pn,t.TransformStreamDefaultController=Nr,t.WritableStream=vr,t.WritableStreamDefaultController=Vt,t.WritableStreamDefaultWriter=Or,Object.defineProperty(t,"__esModule",{value:!0})})});var Ya=I(()=>{if(!globalThis.ReadableStream)try{let t=Ae("node:process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,Ae("node:stream/web")),t.emitWarning=e}catch(r){throw t.emitWarning=e,r}}catch{Object.assign(globalThis,Va())}try{let{Blob:t}=Ae("buffer");t&&!t.prototype.stream&&(t.prototype.stream=function(r){let n=0,i=this;return new ReadableStream({type:"bytes",async pull(a){let f=await i.slice(n,Math.min(i.size,n+65536)).arrayBuffer();n+=f.byteLength,a.enqueue(new Uint8Array(f)),n===i.size&&a.close()}})})}catch{}});async function*hi(t,e=!0){for(let r of t)if("stream"in r)yield*r.stream();else if(ArrayBuffer.isView(r))if(e){let n=r.byteOffset,i=r.byteOffset+r.byteLength;for(;n!==i;){let a=Math.min(i-n,Qa),l=r.buffer.slice(n,n+a);n+=l.byteLength,yield new Uint8Array(l)}}else yield r;else{let n=0,i=r;for(;n!==i.size;){let l=await i.slice(n,Math.min(i.size,n+Qa)).arrayBuffer();n+=l.byteLength,yield new Uint8Array(l)}}}var rR,Qa,Ka,yp,st,Br=Hr(()=>{rR=Fe(Ya(),1);Qa=65536;Ka=class di{#e=[];#r="";#t=0;#u="transparent";constructor(e=[],r={}){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 r!="object"&&typeof r!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");r===null&&(r={});let n=new TextEncoder;for(let a of e){let l;ArrayBuffer.isView(a)?l=new Uint8Array(a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength)):a instanceof ArrayBuffer?l=new Uint8Array(a.slice(0)):a instanceof di?l=a:l=n.encode(`${a}`),this.#t+=ArrayBuffer.isView(l)?l.byteLength:l.size,this.#e.push(l)}this.#u=`${r.endings===void 0?"transparent":r.endings}`;let i=r.type===void 0?"":String(r.type);this.#r=/^[\x20-\x7E]*$/.test(i)?i:""}get size(){return this.#t}get type(){return this.#r}async text(){let e=new TextDecoder,r="";for await(let n of hi(this.#e,!1))r+=e.decode(n,{stream:!0});return r+=e.decode(),r}async arrayBuffer(){let e=new Uint8Array(this.size),r=0;for await(let n of hi(this.#e,!1))e.set(n,r),r+=n.length;return e.buffer}stream(){let e=hi(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(r){let n=await e.next();n.done?r.close():r.enqueue(n.value)},async cancel(){await e.return()}})}slice(e=0,r=this.size,n=""){let{size:i}=this,a=e<0?Math.max(i+e,0):Math.min(e,i),l=r<0?Math.max(i+r,0):Math.min(r,i),f=Math.max(l-a,0),c=this.#e,h=[],b=0;for(let m of c){if(b>=f)break;let d=ArrayBuffer.isView(m)?m.byteLength:m.size;if(a&&d<=a)a-=d,l-=d;else{let _;ArrayBuffer.isView(m)?(_=m.subarray(a,Math.min(d,l)),b+=_.byteLength):(_=m.slice(a,Math.min(d,l)),b+=_.size),l-=d,h.push(_),a=0}}let g=new di([],{type:String(n).toLowerCase()});return g.#t=f,g.#e=h,g}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}};Object.defineProperties(Ka.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});yp=Ka,st=yp});var _p,Rp,tr,pi=Hr(()=>{Br();_p=class extends st{#e=0;#r="";constructor(e,r,n={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,n),n===null&&(n={});let i=n.lastModified===void 0?Date.now():Number(n.lastModified);Number.isNaN(i)||(this.#e=i),this.#r=String(r)}get name(){return this.#r}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof st&&/^(File)$/.test(e[Symbol.toStringTag])}},Rp=_p,tr=Rp});function Ja(t,e=st){var r=`${Xa()}${Xa()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),n=[],i=`--${r}\r
|
|
4
|
-
Content-Disposition: form-data; name="`;return t.forEach((a,l)=>typeof a=="string"?n.push(i+mi(l)+`"\r
|
|
5
|
-
\r
|
|
6
|
-
${a.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
|
|
7
|
-
`)}\r
|
|
8
|
-
`):n.push(i+mi(l)+`"; filename="${mi(a.name,1)}"\r
|
|
9
|
-
Content-Type: ${a.type||"application/octet-stream"}\r
|
|
10
|
-
\r
|
|
11
|
-
`,a,`\r
|
|
12
|
-
`)),n.push(`--${r}--`),new e(n,{type:"multipart/form-data; boundary="+r})}var Fr,Sp,wp,Xa,Ep,Za,mi,$t,It,Mn=Hr(()=>{Br();pi();({toStringTag:Fr,iterator:Sp,hasInstance:wp}=Symbol),Xa=Math.random,Ep="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),Za=(t,e,r)=>(t+="",/^(Blob|File)$/.test(e&&e[Fr])?[(r=r!==void 0?r+"":e[Fr]=="File"?e.name:"blob",t),e.name!==r||e[Fr]=="blob"?new tr([e],r,e):e]:[t,e+""]),mi=(t,e)=>(e?t:t.replace(/\r?\n|\r/g,`\r
|
|
13
|
-
`)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),$t=(t,e,r)=>{if(e.length<r)throw new TypeError(`Failed to execute '${t}' on 'FormData': ${r} arguments required, but only ${e.length} present.`)},It=class{#e=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Fr](){return"FormData"}[Sp](){return this.entries()}static[wp](e){return e&&typeof e=="object"&&e[Fr]==="FormData"&&!Ep.some(r=>typeof e[r]!="function")}append(...e){$t("append",arguments,2),this.#e.push(Za(...e))}delete(e){$t("delete",arguments,1),e+="",this.#e=this.#e.filter(([r])=>r!==e)}get(e){$t("get",arguments,1),e+="";for(var r=this.#e,n=r.length,i=0;i<n;i++)if(r[i][0]===e)return r[i][1];return null}getAll(e,r){return $t("getAll",arguments,1),r=[],e+="",this.#e.forEach(n=>n[0]===e&&r.push(n[1])),r}has(e){return $t("has",arguments,1),e+="",this.#e.some(r=>r[0]===e)}forEach(e,r){$t("forEach",arguments,1);for(var[n,i]of this)e.call(r,i,n,this)}set(...e){$t("set",arguments,2);var r=[],n=!0;e=Za(...e),this.#e.forEach(i=>{i[0]===e[0]?n&&(n=!r.push(e)):r.push(i)}),n&&r.push(e),this.#e=r}*entries(){yield*this.#e}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}}});var sl=I((mR,nl)=>{if(!globalThis.DOMException)try{let{MessageChannel:t}=Ae("worker_threads"),e=new t().port1,r=new ArrayBuffer;e.postMessage(r,[r,r])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}nl.exports=globalThis.DOMException});import{statSync as bR,createReadStream as Ap,promises as Tp}from"node:fs";var ol,Cp,il,bi=Hr(()=>{ol=Fe(sl(),1);pi();Br();({stat:Cp}=Tp),il=class t{#e;#r;constructor(e){this.#e=e.path,this.#r=e.start,this.size=e.size,this.lastModified=e.lastModified}slice(e,r){return new t({path:this.#e,lastModified:this.lastModified,size:r-e,start:this.#r+e})}async*stream(){let{mtimeMs:e}=await Cp(this.#e);if(e>this.lastModified)throw new ol.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*Ap(this.#e,{start:this.#r,end:this.#r+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var ll={};op(ll,{toFormData:()=>Pp});function Lp(t){let e=t.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let r=e[2]||e[3]||"",n=r.slice(r.lastIndexOf("\\")+1);return n=n.replace(/%22/g,'"'),n=n.replace(/&#(\d{4});/g,(i,a)=>String.fromCharCode(a)),n}async function Pp(t,e){if(!/multipart/i.test(e))throw new TypeError("Failed to fetch");let r=e.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!r)throw new TypeError("no or bad content-type header, no multipart boundary");let n=new yi(r[1]||r[2]),i,a,l,f,c,h,b=[],g=new It,m=x=>{l+=O.decode(x,{stream:!0})},d=x=>{b.push(x)},_=()=>{let x=new tr(b,h,{type:c});g.append(f,x)},R=()=>{g.append(f,l)},O=new TextDecoder("utf-8");O.decode(),n.onPartBegin=function(){n.onPartData=m,n.onPartEnd=R,i="",a="",l="",f="",c="",h=null,b.length=0},n.onHeaderField=function(x){i+=O.decode(x,{stream:!0})},n.onHeaderValue=function(x){a+=O.decode(x,{stream:!0})},n.onHeaderEnd=function(){if(a+=O.decode(),i=i.toLowerCase(),i==="content-disposition"){let x=a.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);x&&(f=x[2]||x[3]||""),h=Lp(a),h&&(n.onPartData=d,n.onPartEnd=_)}else i==="content-type"&&(c=a);a="",i=""};for await(let x of t)n.write(x);return n.end(),g}var Xe,ue,al,yt,kn,zn,xp,Ur,vp,Op,$p,Ip,Lt,yi,ul=Hr(()=>{bi();Mn();Xe=0,ue={START_BOUNDARY:Xe++,HEADER_FIELD_START:Xe++,HEADER_FIELD:Xe++,HEADER_VALUE_START:Xe++,HEADER_VALUE:Xe++,HEADER_VALUE_ALMOST_DONE:Xe++,HEADERS_ALMOST_DONE:Xe++,PART_DATA_START:Xe++,PART_DATA:Xe++,END:Xe++},al=1,yt={PART_BOUNDARY:al,LAST_BOUNDARY:al*=2},kn=10,zn=13,xp=32,Ur=45,vp=58,Op=97,$p=122,Ip=t=>t|32,Lt=()=>{},yi=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=Lt,this.onHeaderField=Lt,this.onHeadersEnd=Lt,this.onHeaderValue=Lt,this.onPartBegin=Lt,this.onPartData=Lt,this.onPartEnd=Lt,this.boundaryChars={},e=`\r
|
|
14
|
-
--`+e;let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n),this.boundaryChars[r[n]]=!0;this.boundary=r,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=ue.START_BOUNDARY}write(e){let r=0,n=e.length,i=this.index,{lookbehind:a,boundary:l,boundaryChars:f,index:c,state:h,flags:b}=this,g=this.boundary.length,m=g-1,d=e.length,_,R,O=T=>{this[T+"Mark"]=r},x=T=>{delete this[T+"Mark"]},D=(T,v,F,B)=>{(v===void 0||v!==F)&&this[T](B&&B.subarray(v,F))},L=(T,v)=>{let F=T+"Mark";F in this&&(v?(D(T,this[F],r,e),delete this[F]):(D(T,this[F],e.length,e),this[F]=0))};for(r=0;r<n;r++)switch(_=e[r],h){case ue.START_BOUNDARY:if(c===l.length-2){if(_===Ur)b|=yt.LAST_BOUNDARY;else if(_!==zn)return;c++;break}else if(c-1===l.length-2){if(b&yt.LAST_BOUNDARY&&_===Ur)h=ue.END,b=0;else if(!(b&yt.LAST_BOUNDARY)&&_===kn)c=0,D("onPartBegin"),h=ue.HEADER_FIELD_START;else return;break}_!==l[c+2]&&(c=-2),_===l[c+2]&&c++;break;case ue.HEADER_FIELD_START:h=ue.HEADER_FIELD,O("onHeaderField"),c=0;case ue.HEADER_FIELD:if(_===zn){x("onHeaderField"),h=ue.HEADERS_ALMOST_DONE;break}if(c++,_===Ur)break;if(_===vp){if(c===1)return;L("onHeaderField",!0),h=ue.HEADER_VALUE_START;break}if(R=Ip(_),R<Op||R>$p)return;break;case ue.HEADER_VALUE_START:if(_===xp)break;O("onHeaderValue"),h=ue.HEADER_VALUE;case ue.HEADER_VALUE:_===zn&&(L("onHeaderValue",!0),D("onHeaderEnd"),h=ue.HEADER_VALUE_ALMOST_DONE);break;case ue.HEADER_VALUE_ALMOST_DONE:if(_!==kn)return;h=ue.HEADER_FIELD_START;break;case ue.HEADERS_ALMOST_DONE:if(_!==kn)return;D("onHeadersEnd"),h=ue.PART_DATA_START;break;case ue.PART_DATA_START:h=ue.PART_DATA,O("onPartData");case ue.PART_DATA:if(i=c,c===0){for(r+=m;r<d&&!(e[r]in f);)r+=g;r-=m,_=e[r]}if(c<l.length)l[c]===_?(c===0&&L("onPartData",!0),c++):c=0;else if(c===l.length)c++,_===zn?b|=yt.PART_BOUNDARY:_===Ur?b|=yt.LAST_BOUNDARY:c=0;else if(c-1===l.length)if(b&yt.PART_BOUNDARY){if(c=0,_===kn){b&=~yt.PART_BOUNDARY,D("onPartEnd"),D("onPartBegin"),h=ue.HEADER_FIELD_START;break}}else b&yt.LAST_BOUNDARY&&_===Ur?(D("onPartEnd"),h=ue.END,b=0):c=0;if(c>0)a[c-1]=_;else if(i>0){let T=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);D("onPartData",0,i,T),i=0,O("onPartData"),r--}break;case ue.END:break;default:throw new Error(`Unexpected state entered: ${h}`)}L("onHeaderField"),L("onHeaderValue"),L("onPartData"),this.index=c,this.state=h,this.flags=b}end(){if(this.state===ue.HEADER_FIELD_START&&this.index===0||this.state===ue.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==ue.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var xl=I((SS,Cl)=>{function Vp(t){return Buffer.from(t,"base64").toString("utf8")}function Yp(t){return Buffer.from(t,"utf8").toString("base64")}Cl.exports={decodeBase64:Vp,encodeBase64:Yp}});var Il=I(Nt=>{Nt.parse=Nt.decode=Qp;Nt.stringify=Nt.encode=vl;Nt.safe=or;Nt.unsafe=Zn;var wi=typeof process<"u"&&process.platform==="win32"?`\r
|
|
3
|
+
var Fa=Object.create;var ps=Object.defineProperty;var qa=Object.getOwnPropertyDescriptor;var Ba=Object.getOwnPropertyNames;var Ga=Object.getPrototypeOf,ja=Object.prototype.hasOwnProperty;var me=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var x=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var za=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ba(e))!ja.call(t,i)&&i!==r&&ps(t,i,{get:()=>e[i],enumerable:!(s=qa(e,i))||s.enumerable});return t};var ge=(t,e,r)=>(r=t!=null?Fa(Ga(t)):{},za(e||!t||!t.__esModule?ps(r,"default",{value:t,enumerable:!0}):r,t));var gs=x((Yf,ms)=>{"use strict";var rr=me("https"),sr=me("http"),{URL:ds}=me("url"),ir=class extends sr.Agent{constructor(e){let{proxy:r,proxyRequestOptions:s,...i}=e;super(i),this.proxy=typeof r=="string"?new ds(r):r,this.proxyRequestOptions=s||{}}createConnection(e,r){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 n=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");s.headers["proxy-authorization"]=`Basic ${n}`}this.proxy.protocol==="https:"&&(s.servername=this.proxy.hostname);let i=(this.proxy.protocol==="http:"?sr:rr).request(s);i.once("connect",(n,o,a)=>{i.removeAllListeners(),o.removeAllListeners(),n.statusCode===200?r(null,o):(o.destroy(),r(new Error(`Bad response: ${n.statusCode}`),null))}),i.once("timeout",()=>{i.destroy(new Error("Proxy timeout"))}),i.once("error",n=>{i.removeAllListeners(),r(n,null)}),i.end()}},nr=class extends rr.Agent{constructor(e){let{proxy:r,proxyRequestOptions:s,...i}=e;super(i),this.proxy=typeof r=="string"?new ds(r):r,this.proxyRequestOptions=s||{}}createConnection(e,r){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 n=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");s.headers["proxy-authorization"]=`Basic ${n}`}this.proxy.protocol==="https:"&&(s.servername=this.proxy.hostname);let i=(this.proxy.protocol==="http:"?sr:rr).request(s);i.once("connect",(n,o,a)=>{if(i.removeAllListeners(),o.removeAllListeners(),n.statusCode===200){let l=super.createConnection({...e,socket:o});r(null,l)}else o.destroy(),r(new Error(`Bad response: ${n.statusCode}`),null)}),i.once("timeout",()=>{i.destroy(new Error("Proxy timeout"))}),i.once("error",n=>{i.removeAllListeners(),r(n,null)}),i.end()}};ms.exports={HttpProxyAgent:ir,HttpsProxyAgent:nr}});var xs=x(Rs=>{"use strict";var Wa=me("url").parse,ka={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Va=String.prototype.endsWith||function(t){return t.length<=this.length&&this.indexOf(t,this.length-t.length)!==-1};function Ka(t){var e=typeof t=="string"?Wa(t):t||{},r=e.protocol,s=e.host,i=e.port;if(typeof s!="string"||!s||typeof r!="string"||(r=r.split(":",1)[0],s=s.replace(/:\d*$/,""),i=parseInt(i)||ka[r]||0,!Xa(s,i)))return"";var n=Me("npm_config_"+r+"_proxy")||Me(r+"_proxy")||Me("npm_config_proxy")||Me("all_proxy");return n&&n.indexOf("://")===-1&&(n=r+"://"+n),n}function Xa(t,e){var r=(Me("npm_config_no_proxy")||Me("no_proxy")).toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(s){if(!s)return!0;var i=s.match(/^(.+):(\d+)$/),n=i?i[1]:s,o=i?parseInt(i[2]):0;return o&&o!==e?!0:/^[.*]/.test(n)?(n.charAt(0)==="*"&&(n=n.slice(1)),!Va.call(t,n)):t!==n}):!0}function Me(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}Rs.getProxyForUrl=Ka});var hr=x((np,bs)=>{"use strict";function Ja(t,e){var r=t;e.slice(0,-1).forEach(function(i){r=r[i]||{}});var s=e[e.length-1];return s in r}function _s(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function Ts(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}bs.exports=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(y){r.bools[y]=!0});var s={};function i(y){return s[y].some(function(C){return r.bools[C]})}Object.keys(e.alias||{}).forEach(function(y){s[y]=[].concat(e.alias[y]),s[y].forEach(function(C){s[C]=[y].concat(s[y].filter(function(L){return C!==L}))})}),[].concat(e.string).filter(Boolean).forEach(function(y){r.strings[y]=!0,s[y]&&[].concat(s[y]).forEach(function(C){r.strings[C]=!0})});var n=e.default||{},o={_:[]};function a(y,C){return r.allBools&&/^--[^=]+$/.test(C)||r.strings[y]||r.bools[y]||s[y]}function l(y,C,L){for(var $=y,O=0;O<C.length-1;O++){var v=C[O];if(Ts($,v))return;$[v]===void 0&&($[v]={}),($[v]===Object.prototype||$[v]===Number.prototype||$[v]===String.prototype)&&($[v]={}),$[v]===Array.prototype&&($[v]=[]),$=$[v]}var d=C[C.length-1];Ts($,d)||(($===Object.prototype||$===Number.prototype||$===String.prototype)&&($={}),$===Array.prototype&&($=[]),$[d]===void 0||r.bools[d]||typeof $[d]=="boolean"?$[d]=L:Array.isArray($[d])?$[d].push(L):$[d]=[$[d],L])}function h(y,C,L){if(!(L&&r.unknownFn&&!a(y,L)&&r.unknownFn(L)===!1)){var $=!r.strings[y]&&_s(C)?Number(C):C;l(o,y.split("."),$),(s[y]||[]).forEach(function(O){l(o,O.split("."),$)})}}Object.keys(r.bools).forEach(function(y){h(y,n[y]===void 0?!1:n[y])});var p=[];t.indexOf("--")!==-1&&(p=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var u=0;u<t.length;u++){var c=t[u],f,A;if(/^--.+=/.test(c)){var g=c.match(/^--([^=]+)=([\s\S]*)$/);f=g[1];var I=g[2];r.bools[f]&&(I=I!=="false"),h(f,I,c)}else if(/^--no-.+/.test(c))f=c.match(/^--no-(.+)/)[1],h(f,!1,c);else if(/^--.+/.test(c))f=c.match(/^--(.+)/)[1],A=t[u+1],A!==void 0&&!/^(-|--)[^-]/.test(A)&&!r.bools[f]&&!r.allBools&&(!s[f]||!i(f))?(h(f,A,c),u+=1):/^(true|false)$/.test(A)?(h(f,A==="true",c),u+=1):h(f,r.strings[f]?"":!0,c);else if(/^-[^-]+/.test(c)){for(var b=c.slice(1,-1).split(""),S=!1,N=0;N<b.length;N++){if(A=c.slice(N+2),A==="-"){h(b[N],A,c);continue}if(/[A-Za-z]/.test(b[N])&&A[0]==="="){h(b[N],A.slice(1),c),S=!0;break}if(/[A-Za-z]/.test(b[N])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(A)){h(b[N],A,c),S=!0;break}if(b[N+1]&&b[N+1].match(/\W/)){h(b[N],c.slice(N+2),c),S=!0;break}else h(b[N],r.strings[b[N]]?"":!0,c)}f=c.slice(-1)[0],!S&&f!=="-"&&(t[u+1]&&!/^(-|--)[^-]/.test(t[u+1])&&!r.bools[f]&&(!s[f]||!i(f))?(h(f,t[u+1],c),u+=1):t[u+1]&&/^(true|false)$/.test(t[u+1])?(h(f,t[u+1]==="true",c),u+=1):h(f,r.strings[f]?"":!0,c))}else if((!r.unknownFn||r.unknownFn(c)!==!1)&&o._.push(r.strings._||!_s(c)?c:Number(c)),e.stopEarly){o._.push.apply(o._,t.slice(u+1));break}}return Object.keys(n).forEach(function(y){Ja(o,y.split("."))||(l(o,y.split("."),n[y]),(s[y]||[]).forEach(function(C){l(o,C.split("."),n[y])}))}),e["--"]?o["--"]=p.slice():p.forEach(function(y){o._.push(y)}),o}});var Ss=x((op,Cs)=>{function el(t){return Buffer.from(t,"base64").toString("utf8")}function tl(t){return Buffer.from(t,"utf8").toString("base64")}Cs.exports={decodeBase64:el,encodeBase64:tl}});var Is=x(ve=>{ve.parse=ve.decode=rl;ve.stringify=ve.encode=$s;ve.safe=Fe;ve.unsafe=yt;var cr=typeof process<"u"&&process.platform==="win32"?`\r
|
|
15
4
|
`:`
|
|
16
|
-
`;function
|
|
17
|
-
`}):
|
|
18
|
-
`){h++,
|
|
19
|
-
`)a=!1,f+=c(t,l,h),l=h;else if(!a&&r+n==="/*"){f+=t.slice(l,h),l=h,a=Ll,h++;continue}else if(a===Ll&&r+n==="*/"){h++,a=!1,f+=c(t,l,h+1),l=h+1;continue}}}return f+(a?c(t.substr(l)):t.substr(l))}});var Dl=I(ar=>{"use strict";var Hl=Ae("fs"),Zp=Il(),Wr=Ae("path"),Jp=Nl(),em=ar.parse=function(t){return/^\s*{/.test(t)?JSON.parse(Jp(t)):Zp.parse(t)},tm=ar.file=function(){var t=[].slice.call(arguments).filter(function(i){return i!=null});for(var e in t)if(typeof t[e]!="string")return;var r=Wr.join.apply(null,t),n;try{return Hl.readFileSync(r,"utf-8")}catch{return}},AS=ar.json=function(){var t=tm.apply(null,arguments);return t?em(t):null},TS=ar.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var i in e)if(i.toLowerCase().indexOf(t.toLowerCase())===0){for(var a=i.substring(n).split("__"),l;(l=a.indexOf(""))>-1;)a.splice(l,1);var f=r;a.forEach(function(h,b){!h||typeof f!="object"||(b===a.length-1&&(f[h]=e[i]),f[h]===void 0&&(f[h]={}),f=f[h])})}return r},CS=ar.find=function(){var t=Wr.join.apply(null,[].slice.call(arguments));function e(r,n){var i=Wr.join(r,n);try{return Hl.statSync(i),i}catch{if(Wr.dirname(r)!==r)return e(Wr.dirname(r),n)}}return e(process.cwd(),t)}});var Wl=I((vS,Ml)=>{"use strict";function Fl(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function ql(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function Ul(t){var e=[];return t.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?e[n]=Ul(r):Fl(r)?e[n]=ql(r):e[n]=Ai({},r):e[n]=r}),e}function Bl(t,e){return e==="__proto__"?void 0:t[e]}var Ai=Ml.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,n,i;return e.forEach(function(a){typeof a!="object"||a===null||Array.isArray(a)||Object.keys(a).forEach(function(l){if(n=Bl(t,l),r=Bl(a,l),r!==t)if(typeof r!="object"||r===null){t[l]=r;return}else if(Array.isArray(r)){t[l]=Ul(r);return}else if(Fl(r)){t[l]=ql(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[l]=Ai({},r);return}else{t[l]=Ai(n,r);return}})}),t}});var Ti=I((OS,jl)=>{var kr=Dl(),lr=Ae("path").join,rm=Wl(),kl="/etc",zl=process.platform==="win32",zr=zl?process.env.USERPROFILE:process.env.HOME;jl.exports=function(t,e,r,n){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=fi()(process.argv.slice(2))),e=(typeof e=="string"?kr.json(e):e)||{},n=n||kr.parse;var i=kr.env(t+"_"),a=[e],l=[];function f(c){if(!(l.indexOf(c)>=0)){var h=kr.file(c);h&&(a.push(n(h)),l.push(c))}}return zl||[lr(kl,t,"config"),lr(kl,t+"rc")].forEach(f),zr&&[lr(zr,".config",t,"config"),lr(zr,".config",t),lr(zr,"."+t,"config"),lr(zr,"."+t+"rc")].forEach(f),f(kr.find("."+t+"rc")),i.config&&f(i.config),r.config&&f(r.config),rm.apply(null,a.concat([i,r,l.length?{configs:l,config:l[l.length-1]}:void 0]))}});var Jl=I(($S,Zl)=>{var Ci=Ae("url"),Kl=xl(),nm=Kl.decodeBase64,sm=Kl.encodeBase64,Gl=":_authToken",Vl=":_auth",Yl=":username",Ql=":_password";Zl.exports=function(){var t,e;return arguments.length>=2?(t=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?t=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||Ti()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),t=t||e.npmrc.registry,Xl(t,e)||im(e.npmrc)};function Xl(t,e){for(var r=Ci.parse(t,!1,!0),n;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";var i="//"+r.host+n.replace(/\/$/,""),a=am(i,e.npmrc);if(a)return a;if(!e.recursive)return/\/$/.test(t)?void 0:Xl(Ci.resolve(t,"."),e);r.pathname=Ci.resolve(om(n),"..")||"/"}}function im(t){if(t._auth){var e=Jn(t._auth);return{token:e,type:"Basic"}}}function om(t){return t[t.length-1]==="/"?t:t+"/"}function am(t,e){var r=lm(e[t+Gl]||e[t+"/"+Gl]);if(r)return r;var n=e[t+Yl]||e[t+"/"+Yl],i=e[t+Ql]||e[t+"/"+Ql],a=um(n,i);if(a)return a;var l=cm(e[t+Vl]||e[t+"/"+Vl]);if(l)return l}function Jn(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function lm(t){if(t){var e=Jn(t);return{token:e,type:"Bearer"}}}function um(t,e){if(!(!t||!e)){var r=nm(Jn(e)),n=sm(t+":"+r);return{token:n,type:"Basic",password:r,username:t}}}function cm(t){if(t){var e=Jn(t);return{token:e,type:"Basic"}}}});var jr=I((IS,eu)=>{var fm="2.0.0",hm=Number.MAX_SAFE_INTEGER||9007199254740991,dm=16;eu.exports={SEMVER_SPEC_VERSION:fm,MAX_LENGTH:256,MAX_SAFE_INTEGER:hm,MAX_SAFE_COMPONENT_LENGTH:dm}});var Gr=I((LS,tu)=>{var pm=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};tu.exports=pm});var Ht=I((Rt,ru)=>{var{MAX_SAFE_COMPONENT_LENGTH:xi}=jr(),mm=Gr();Rt=ru.exports={};var gm=Rt.re=[],U=Rt.src=[],M=Rt.t={},bm=0,K=(t,e,r)=>{let n=bm++;mm(t,n,e),M[t]=n,U[n]=e,gm[n]=new RegExp(e,r?"g":void 0)};K("NUMERICIDENTIFIER","0|[1-9]\\d*");K("NUMERICIDENTIFIERLOOSE","[0-9]+");K("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");K("MAINVERSION",`(${U[M.NUMERICIDENTIFIER]})\\.(${U[M.NUMERICIDENTIFIER]})\\.(${U[M.NUMERICIDENTIFIER]})`);K("MAINVERSIONLOOSE",`(${U[M.NUMERICIDENTIFIERLOOSE]})\\.(${U[M.NUMERICIDENTIFIERLOOSE]})\\.(${U[M.NUMERICIDENTIFIERLOOSE]})`);K("PRERELEASEIDENTIFIER",`(?:${U[M.NUMERICIDENTIFIER]}|${U[M.NONNUMERICIDENTIFIER]})`);K("PRERELEASEIDENTIFIERLOOSE",`(?:${U[M.NUMERICIDENTIFIERLOOSE]}|${U[M.NONNUMERICIDENTIFIER]})`);K("PRERELEASE",`(?:-(${U[M.PRERELEASEIDENTIFIER]}(?:\\.${U[M.PRERELEASEIDENTIFIER]})*))`);K("PRERELEASELOOSE",`(?:-?(${U[M.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${U[M.PRERELEASEIDENTIFIERLOOSE]})*))`);K("BUILDIDENTIFIER","[0-9A-Za-z-]+");K("BUILD",`(?:\\+(${U[M.BUILDIDENTIFIER]}(?:\\.${U[M.BUILDIDENTIFIER]})*))`);K("FULLPLAIN",`v?${U[M.MAINVERSION]}${U[M.PRERELEASE]}?${U[M.BUILD]}?`);K("FULL",`^${U[M.FULLPLAIN]}$`);K("LOOSEPLAIN",`[v=\\s]*${U[M.MAINVERSIONLOOSE]}${U[M.PRERELEASELOOSE]}?${U[M.BUILD]}?`);K("LOOSE",`^${U[M.LOOSEPLAIN]}$`);K("GTLT","((?:<|>)?=?)");K("XRANGEIDENTIFIERLOOSE",`${U[M.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);K("XRANGEIDENTIFIER",`${U[M.NUMERICIDENTIFIER]}|x|X|\\*`);K("XRANGEPLAIN",`[v=\\s]*(${U[M.XRANGEIDENTIFIER]})(?:\\.(${U[M.XRANGEIDENTIFIER]})(?:\\.(${U[M.XRANGEIDENTIFIER]})(?:${U[M.PRERELEASE]})?${U[M.BUILD]}?)?)?`);K("XRANGEPLAINLOOSE",`[v=\\s]*(${U[M.XRANGEIDENTIFIERLOOSE]})(?:\\.(${U[M.XRANGEIDENTIFIERLOOSE]})(?:\\.(${U[M.XRANGEIDENTIFIERLOOSE]})(?:${U[M.PRERELEASELOOSE]})?${U[M.BUILD]}?)?)?`);K("XRANGE",`^${U[M.GTLT]}\\s*${U[M.XRANGEPLAIN]}$`);K("XRANGELOOSE",`^${U[M.GTLT]}\\s*${U[M.XRANGEPLAINLOOSE]}$`);K("COERCE",`(^|[^\\d])(\\d{1,${xi}})(?:\\.(\\d{1,${xi}}))?(?:\\.(\\d{1,${xi}}))?(?:$|[^\\d])`);K("COERCERTL",U[M.COERCE],!0);K("LONETILDE","(?:~>?)");K("TILDETRIM",`(\\s*)${U[M.LONETILDE]}\\s+`,!0);Rt.tildeTrimReplace="$1~";K("TILDE",`^${U[M.LONETILDE]}${U[M.XRANGEPLAIN]}$`);K("TILDELOOSE",`^${U[M.LONETILDE]}${U[M.XRANGEPLAINLOOSE]}$`);K("LONECARET","(?:\\^)");K("CARETTRIM",`(\\s*)${U[M.LONECARET]}\\s+`,!0);Rt.caretTrimReplace="$1^";K("CARET",`^${U[M.LONECARET]}${U[M.XRANGEPLAIN]}$`);K("CARETLOOSE",`^${U[M.LONECARET]}${U[M.XRANGEPLAINLOOSE]}$`);K("COMPARATORLOOSE",`^${U[M.GTLT]}\\s*(${U[M.LOOSEPLAIN]})$|^$`);K("COMPARATOR",`^${U[M.GTLT]}\\s*(${U[M.FULLPLAIN]})$|^$`);K("COMPARATORTRIM",`(\\s*)${U[M.GTLT]}\\s*(${U[M.LOOSEPLAIN]}|${U[M.XRANGEPLAIN]})`,!0);Rt.comparatorTrimReplace="$1$2$3";K("HYPHENRANGE",`^\\s*(${U[M.XRANGEPLAIN]})\\s+-\\s+(${U[M.XRANGEPLAIN]})\\s*$`);K("HYPHENRANGELOOSE",`^\\s*(${U[M.XRANGEPLAINLOOSE]})\\s+-\\s+(${U[M.XRANGEPLAINLOOSE]})\\s*$`);K("STAR","(<|>)?=?\\s*\\*");K("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");K("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Vr=I((PS,nu)=>{var ym=["includePrerelease","loose","rtl"],_m=t=>t?typeof t!="object"?{loose:!0}:ym.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};nu.exports=_m});var vi=I((NS,ou)=>{var su=/^[0-9]+$/,iu=(t,e)=>{let r=su.test(t),n=su.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},Rm=(t,e)=>iu(e,t);ou.exports={compareIdentifiers:iu,rcompareIdentifiers:Rm}});var Te=I((HS,cu)=>{var es=Gr(),{MAX_LENGTH:au,MAX_SAFE_INTEGER:ts}=jr(),{re:lu,t:uu}=Ht(),Sm=Vr(),{compareIdentifiers:ur}=vi(),Oi=class t{constructor(e,r){if(r=Sm(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>au)throw new TypeError(`version is longer than ${au} characters`);es("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?lu[uu.LOOSE]:lu[uu.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>ts||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ts||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ts||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let a=+i;if(a>=0&&a<ts)return a}return i}):this.prerelease=[],this.build=n[5]?n[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(es("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),ur(this.major,e.major)||ur(this.minor,e.minor)||ur(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(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 r=0;do{let n=this.prerelease[r],i=e.prerelease[r];if(es("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return ur(n,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],i=e.build[r];if(es("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return ur(n,i)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);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 n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}r&&(ur(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};cu.exports=Oi});var Dt=I((DS,pu)=>{var{MAX_LENGTH:wm}=jr(),{re:fu,t:hu}=Ht(),du=Te(),Em=Vr(),Am=(t,e)=>{if(e=Em(e),t instanceof du)return t;if(typeof t!="string"||t.length>wm||!(e.loose?fu[hu.LOOSE]:fu[hu.FULL]).test(t))return null;try{return new du(t,e)}catch{return null}};pu.exports=Am});var gu=I((BS,mu)=>{var Tm=Dt(),Cm=(t,e)=>{let r=Tm(t,e);return r?r.version:null};mu.exports=Cm});var yu=I((FS,bu)=>{var xm=Dt(),vm=(t,e)=>{let r=xm(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};bu.exports=vm});var Su=I((qS,Ru)=>{var _u=Te(),Om=(t,e,r,n)=>{typeof r=="string"&&(n=r,r=void 0);try{return new _u(t instanceof _u?t.version:t,r).inc(e,n).version}catch{return null}};Ru.exports=Om});var Me=I((US,Eu)=>{var wu=Te(),$m=(t,e,r)=>new wu(t,r).compare(new wu(e,r));Eu.exports=$m});var rs=I((MS,Au)=>{var Im=Me(),Lm=(t,e,r)=>Im(t,e,r)===0;Au.exports=Lm});var xu=I((WS,Cu)=>{var Tu=Dt(),Pm=rs(),Nm=(t,e)=>{if(Pm(t,e))return null;{let r=Tu(t),n=Tu(e),i=r.prerelease.length||n.prerelease.length,a=i?"pre":"",l=i?"prerelease":"";for(let f in r)if((f==="major"||f==="minor"||f==="patch")&&r[f]!==n[f])return a+f;return l}};Cu.exports=Nm});var Ou=I((kS,vu)=>{var Hm=Te(),Dm=(t,e)=>new Hm(t,e).major;vu.exports=Dm});var Iu=I((zS,$u)=>{var Bm=Te(),Fm=(t,e)=>new Bm(t,e).minor;$u.exports=Fm});var Pu=I((jS,Lu)=>{var qm=Te(),Um=(t,e)=>new qm(t,e).patch;Lu.exports=Um});var Hu=I((GS,Nu)=>{var Mm=Dt(),Wm=(t,e)=>{let r=Mm(t,e);return r&&r.prerelease.length?r.prerelease:null};Nu.exports=Wm});var Bu=I((VS,Du)=>{var km=Me(),zm=(t,e,r)=>km(e,t,r);Du.exports=zm});var qu=I((YS,Fu)=>{var jm=Me(),Gm=(t,e)=>jm(t,e,!0);Fu.exports=Gm});var ns=I((QS,Mu)=>{var Uu=Te(),Vm=(t,e,r)=>{let n=new Uu(t,r),i=new Uu(e,r);return n.compare(i)||n.compareBuild(i)};Mu.exports=Vm});var ku=I((KS,Wu)=>{var Ym=ns(),Qm=(t,e)=>t.sort((r,n)=>Ym(r,n,e));Wu.exports=Qm});var ju=I((XS,zu)=>{var Km=ns(),Xm=(t,e)=>t.sort((r,n)=>Km(n,r,e));zu.exports=Xm});var Yr=I((ZS,Gu)=>{var Zm=Me(),Jm=(t,e,r)=>Zm(t,e,r)>0;Gu.exports=Jm});var ss=I((JS,Vu)=>{var eg=Me(),tg=(t,e,r)=>eg(t,e,r)<0;Vu.exports=tg});var $i=I((ew,Yu)=>{var rg=Me(),ng=(t,e,r)=>rg(t,e,r)!==0;Yu.exports=ng});var is=I((tw,Qu)=>{var sg=Me(),ig=(t,e,r)=>sg(t,e,r)>=0;Qu.exports=ig});var os=I((rw,Ku)=>{var og=Me(),ag=(t,e,r)=>og(t,e,r)<=0;Ku.exports=ag});var Ii=I((nw,Xu)=>{var lg=rs(),ug=$i(),cg=Yr(),fg=is(),hg=ss(),dg=os(),pg=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return lg(t,r,n);case"!=":return ug(t,r,n);case">":return cg(t,r,n);case">=":return fg(t,r,n);case"<":return hg(t,r,n);case"<=":return dg(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Xu.exports=pg});var Ju=I((sw,Zu)=>{var mg=Te(),gg=Dt(),{re:as,t:ls}=Ht(),bg=(t,e)=>{if(t instanceof mg)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(as[ls.COERCE]);else{let n;for(;(n=as[ls.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),as[ls.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;as[ls.COERCERTL].lastIndex=-1}return r===null?null:gg(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};Zu.exports=bg});var tc=I((iw,ec)=>{"use strict";ec.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var nc=I((ow,rc)=>{"use strict";rc.exports=ne;ne.Node=Bt;ne.create=ne;function ne(t){var e=this;if(e instanceof ne||(e=new ne),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)e.push(arguments[r]);return e}ne.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};ne.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};ne.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};ne.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)_g(this,arguments[t]);return this.length};ne.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Rg(this,arguments[t]);return this.length};ne.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};ne.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};ne.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,n=0;r!==null;n++)t.call(e,r.value,n,this),r=r.next};ne.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,n=this.length-1;r!==null;n--)t.call(e,r.value,n,this),r=r.prev};ne.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};ne.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};ne.prototype.map=function(t,e){e=e||this;for(var r=new ne,n=this.head;n!==null;)r.push(t.call(e,n.value,this)),n=n.next;return r};ne.prototype.mapReverse=function(t,e){e=e||this;for(var r=new ne,n=this.tail;n!==null;)r.push(t.call(e,n.value,this)),n=n.prev;return r};ne.prototype.reduce=function(t,e){var r,n=this.head;if(arguments.length>1)r=e;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=t(r,n.value,i),n=n.next;return r};ne.prototype.reduceReverse=function(t,e){var r,n=this.tail;if(arguments.length>1)r=e;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=t(r,n.value,i),n=n.prev;return r};ne.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};ne.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};ne.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new ne;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)r.push(i.value);return r};ne.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new ne;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>t;n--,i=i.prev)r.push(i.value);return r};ne.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(var a=[],n=0;i&&n<e;n++)a.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<r.length;n++)i=yg(this,i,r[n]);return a};ne.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=e,this.tail=t,this};function yg(t,e,r){var n=e===t.head?new Bt(r,null,e,t):new Bt(r,e,e.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function _g(t,e){t.tail=new Bt(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Rg(t,e){t.head=new Bt(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Bt(t,e,r,n){if(!(this instanceof Bt))return new Bt(t,e,r,n);this.list=n,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{tc()(ne)}catch{}});var lc=I((aw,ac)=>{"use strict";var Sg=nc(),Ft=Symbol("max"),at=Symbol("length"),cr=Symbol("lengthCalculator"),Kr=Symbol("allowStale"),qt=Symbol("maxAge"),ot=Symbol("dispose"),sc=Symbol("noDisposeOnSet"),_e=Symbol("lruList"),Qe=Symbol("cache"),oc=Symbol("updateAgeOnGet"),Li=()=>1,Ni=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 r=this[Ft]=e.max||1/0,n=e.length||Li;if(this[cr]=typeof n!="function"?Li:n,this[Kr]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[qt]=e.maxAge||0,this[ot]=e.dispose,this[sc]=e.noDisposeOnSet||!1,this[oc]=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[Ft]=e||1/0,Qr(this)}get max(){return this[Ft]}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[qt]=e,Qr(this)}get maxAge(){return this[qt]}set lengthCalculator(e){typeof e!="function"&&(e=Li),e!==this[cr]&&(this[cr]=e,this[at]=0,this[_e].forEach(r=>{r.length=this[cr](r.value,r.key),this[at]+=r.length})),Qr(this)}get lengthCalculator(){return this[cr]}get length(){return this[at]}get itemCount(){return this[_e].length}rforEach(e,r){r=r||this;for(let n=this[_e].tail;n!==null;){let i=n.prev;ic(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[_e].head;n!==null;){let i=n.next;ic(this,e,n,r),n=i}}keys(){return this[_e].toArray().map(e=>e.key)}values(){return this[_e].toArray().map(e=>e.value)}reset(){this[ot]&&this[_e]&&this[_e].length&&this[_e].forEach(e=>this[ot](e.key,e.value)),this[Qe]=new Map,this[_e]=new Sg,this[at]=0}dump(){return this[_e].map(e=>us(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[_e]}set(e,r,n){if(n=n||this[qt],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let i=n?Date.now():0,a=this[cr](r,e);if(this[Qe].has(e)){if(a>this[Ft])return fr(this,this[Qe].get(e)),!1;let c=this[Qe].get(e).value;return this[ot]&&(this[sc]||this[ot](e,c.value)),c.now=i,c.maxAge=n,c.value=r,this[at]+=a-c.length,c.length=a,this.get(e),Qr(this),!0}let l=new Hi(e,r,a,i,n);return l.length>this[Ft]?(this[ot]&&this[ot](e,r),!1):(this[at]+=l.length,this[_e].unshift(l),this[Qe].set(e,this[_e].head),Qr(this),!0)}has(e){if(!this[Qe].has(e))return!1;let r=this[Qe].get(e).value;return!us(this,r)}get(e){return Pi(this,e,!0)}peek(e){return Pi(this,e,!1)}pop(){let e=this[_e].tail;return e?(fr(this,e),e.value):null}del(e){fr(this,this[Qe].get(e))}load(e){this.reset();let r=Date.now();for(let n=e.length-1;n>=0;n--){let i=e[n],a=i.e||0;if(a===0)this.set(i.k,i.v);else{let l=a-r;l>0&&this.set(i.k,i.v,l)}}}prune(){this[Qe].forEach((e,r)=>Pi(this,r,!1))}},Pi=(t,e,r)=>{let n=t[Qe].get(e);if(n){let i=n.value;if(us(t,i)){if(fr(t,n),!t[Kr])return}else r&&(t[oc]&&(n.value.now=Date.now()),t[_e].unshiftNode(n));return i.value}},us=(t,e)=>{if(!e||!e.maxAge&&!t[qt])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[qt]&&r>t[qt]},Qr=t=>{if(t[at]>t[Ft])for(let e=t[_e].tail;t[at]>t[Ft]&&e!==null;){let r=e.prev;fr(t,e),e=r}},fr=(t,e)=>{if(e){let r=e.value;t[ot]&&t[ot](r.key,r.value),t[at]-=r.length,t[Qe].delete(r.key),t[_e].removeNode(e)}},Hi=class{constructor(e,r,n,i,a){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=a||0}},ic=(t,e,r,n)=>{let i=r.value;us(t,i)&&(fr(t,r),t[Kr]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};ac.exports=Ni});var We=I((lw,hc)=>{var Di=class t{constructor(e,r){if(r=Eg(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof Bi)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e,this.set=e.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!cc(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&vg(i[0])){this.set=[i];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 n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=uc.get(n);if(i)return i;let a=this.options.loose,l=a?Le[xe.HYPHENRANGELOOSE]:Le[xe.HYPHENRANGE];e=e.replace(l,Fg(this.options.includePrerelease)),ce("hyphen replace",e),e=e.replace(Le[xe.COMPARATORTRIM],Tg),ce("comparator trim",e),e=e.replace(Le[xe.TILDETRIM],Cg),e=e.replace(Le[xe.CARETTRIM],xg),e=e.split(/\s+/).join(" ");let f=e.split(" ").map(g=>Og(g,this.options)).join(" ").split(/\s+/).map(g=>Bg(g,this.options));a&&(f=f.filter(g=>(ce("loose invalid filter",g,this.options),!!g.match(Le[xe.COMPARATORLOOSE])))),ce("range list",f);let c=new Map,h=f.map(g=>new Bi(g,this.options));for(let g of h){if(cc(g))return[g];c.set(g.value,g)}c.size>1&&c.has("")&&c.delete("");let b=[...c.values()];return uc.set(n,b),b}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>fc(n,r)&&e.set.some(i=>fc(i,r)&&n.every(a=>i.every(l=>a.intersects(l,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Ag(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(qg(this.set[r],e,this.options))return!0;return!1}};hc.exports=Di;var wg=lc(),uc=new wg({max:1e3}),Eg=Vr(),Bi=Xr(),ce=Gr(),Ag=Te(),{re:Le,t:xe,comparatorTrimReplace:Tg,tildeTrimReplace:Cg,caretTrimReplace:xg}=Ht(),cc=t=>t.value==="<0.0.0-0",vg=t=>t.value==="",fc=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(a=>i.intersects(a,e)),i=n.pop();return r},Og=(t,e)=>(ce("comp",t,e),t=Lg(t,e),ce("caret",t),t=$g(t,e),ce("tildes",t),t=Ng(t,e),ce("xrange",t),t=Dg(t,e),ce("stars",t),t),ve=t=>!t||t.toLowerCase()==="x"||t==="*",$g=(t,e)=>t.trim().split(/\s+/).map(r=>Ig(r,e)).join(" "),Ig=(t,e)=>{let r=e.loose?Le[xe.TILDELOOSE]:Le[xe.TILDE];return t.replace(r,(n,i,a,l,f)=>{ce("tilde",t,n,i,a,l,f);let c;return ve(i)?c="":ve(a)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:ve(l)?c=`>=${i}.${a}.0 <${i}.${+a+1}.0-0`:f?(ce("replaceTilde pr",f),c=`>=${i}.${a}.${l}-${f} <${i}.${+a+1}.0-0`):c=`>=${i}.${a}.${l} <${i}.${+a+1}.0-0`,ce("tilde return",c),c})},Lg=(t,e)=>t.trim().split(/\s+/).map(r=>Pg(r,e)).join(" "),Pg=(t,e)=>{ce("caret",t,e);let r=e.loose?Le[xe.CARETLOOSE]:Le[xe.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,a,l,f,c)=>{ce("caret",t,i,a,l,f,c);let h;return ve(a)?h="":ve(l)?h=`>=${a}.0.0${n} <${+a+1}.0.0-0`:ve(f)?a==="0"?h=`>=${a}.${l}.0${n} <${a}.${+l+1}.0-0`:h=`>=${a}.${l}.0${n} <${+a+1}.0.0-0`:c?(ce("replaceCaret pr",c),a==="0"?l==="0"?h=`>=${a}.${l}.${f}-${c} <${a}.${l}.${+f+1}-0`:h=`>=${a}.${l}.${f}-${c} <${a}.${+l+1}.0-0`:h=`>=${a}.${l}.${f}-${c} <${+a+1}.0.0-0`):(ce("no pr"),a==="0"?l==="0"?h=`>=${a}.${l}.${f}${n} <${a}.${l}.${+f+1}-0`:h=`>=${a}.${l}.${f}${n} <${a}.${+l+1}.0-0`:h=`>=${a}.${l}.${f} <${+a+1}.0.0-0`),ce("caret return",h),h})},Ng=(t,e)=>(ce("replaceXRanges",t,e),t.split(/\s+/).map(r=>Hg(r,e)).join(" ")),Hg=(t,e)=>{t=t.trim();let r=e.loose?Le[xe.XRANGELOOSE]:Le[xe.XRANGE];return t.replace(r,(n,i,a,l,f,c)=>{ce("xRange",t,n,i,a,l,f,c);let h=ve(a),b=h||ve(l),g=b||ve(f),m=g;return i==="="&&m&&(i=""),c=e.includePrerelease?"-0":"",h?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&m?(b&&(l=0),f=0,i===">"?(i=">=",b?(a=+a+1,l=0,f=0):(l=+l+1,f=0)):i==="<="&&(i="<",b?a=+a+1:l=+l+1),i==="<"&&(c="-0"),n=`${i+a}.${l}.${f}${c}`):b?n=`>=${a}.0.0${c} <${+a+1}.0.0-0`:g&&(n=`>=${a}.${l}.0${c} <${a}.${+l+1}.0-0`),ce("xRange return",n),n})},Dg=(t,e)=>(ce("replaceStars",t,e),t.trim().replace(Le[xe.STAR],"")),Bg=(t,e)=>(ce("replaceGTE0",t,e),t.trim().replace(Le[e.includePrerelease?xe.GTE0PRE:xe.GTE0],"")),Fg=t=>(e,r,n,i,a,l,f,c,h,b,g,m,d)=>(ve(n)?r="":ve(i)?r=`>=${n}.0.0${t?"-0":""}`:ve(a)?r=`>=${n}.${i}.0${t?"-0":""}`:l?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,ve(h)?c="":ve(b)?c=`<${+h+1}.0.0-0`:ve(g)?c=`<${h}.${+b+1}.0-0`:m?c=`<=${h}.${b}.${g}-${m}`:t?c=`<${h}.${b}.${+g+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),qg=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(ce(t[n].semver),t[n].semver!==Bi.ANY&&t[n].semver.prerelease.length>0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Xr=I((uw,bc)=>{var Zr=Symbol("SemVer ANY"),Ui=class t{static get ANY(){return Zr}constructor(e,r){if(r=Ug(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}qi("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Zr?this.value="":this.value=this.operator+this.semver.version,qi("comp",this)}parse(e){let r=this.options.loose?dc[pc.COMPARATORLOOSE]:dc[pc.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new mc(n[2],this.options.loose):this.semver=Zr}toString(){return this.value}test(e){if(qi("Comparator.test",e,this.options.loose),this.semver===Zr||e===Zr)return!0;if(typeof e=="string")try{e=new mc(e,this.options)}catch{return!1}return Fi(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new gc(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new gc(this.value,r).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),a=this.semver.version===e.semver.version,l=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),f=Fi(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=Fi(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||a&&l||f||c}};bc.exports=Ui;var Ug=Vr(),{re:dc,t:pc}=Ht(),Fi=Ii(),qi=Gr(),mc=Te(),gc=We()});var Jr=I((cw,yc)=>{var Mg=We(),Wg=(t,e,r)=>{try{e=new Mg(e,r)}catch{return!1}return e.test(t)};yc.exports=Wg});var Rc=I((fw,_c)=>{var kg=We(),zg=(t,e)=>new kg(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));_c.exports=zg});var wc=I((hw,Sc)=>{var jg=Te(),Gg=We(),Vg=(t,e,r)=>{let n=null,i=null,a=null;try{a=new Gg(e,r)}catch{return null}return t.forEach(l=>{a.test(l)&&(!n||i.compare(l)===-1)&&(n=l,i=new jg(n,r))}),n};Sc.exports=Vg});var Ac=I((dw,Ec)=>{var Yg=Te(),Qg=We(),Kg=(t,e,r)=>{let n=null,i=null,a=null;try{a=new Qg(e,r)}catch{return null}return t.forEach(l=>{a.test(l)&&(!n||i.compare(l)===1)&&(n=l,i=new Yg(n,r))}),n};Ec.exports=Kg});var xc=I((pw,Cc)=>{var Mi=Te(),Xg=We(),Tc=Yr(),Zg=(t,e)=>{t=new Xg(t,e);let r=new Mi("0.0.0");if(t.test(r)||(r=new Mi("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){let i=t.set[n],a=null;i.forEach(l=>{let f=new Mi(l.semver.version);switch(l.operator){case">":f.prerelease.length===0?f.patch++:f.prerelease.push(0),f.raw=f.format();case"":case">=":(!a||Tc(f,a))&&(a=f);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),a&&(!r||Tc(r,a))&&(r=a)}return r&&t.test(r)?r:null};Cc.exports=Zg});var Oc=I((mw,vc)=>{var Jg=We(),eb=(t,e)=>{try{return new Jg(t,e).range||"*"}catch{return null}};vc.exports=eb});var cs=I((gw,Pc)=>{var tb=Te(),Lc=Xr(),{ANY:rb}=Lc,nb=We(),sb=Jr(),$c=Yr(),Ic=ss(),ib=os(),ob=is(),ab=(t,e,r,n)=>{t=new tb(t,n),e=new nb(e,n);let i,a,l,f,c;switch(r){case">":i=$c,a=ib,l=Ic,f=">",c=">=";break;case"<":i=Ic,a=ob,l=$c,f="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sb(t,e,n))return!1;for(let h=0;h<e.set.length;++h){let b=e.set[h],g=null,m=null;if(b.forEach(d=>{d.semver===rb&&(d=new Lc(">=0.0.0")),g=g||d,m=m||d,i(d.semver,g.semver,n)?g=d:l(d.semver,m.semver,n)&&(m=d)}),g.operator===f||g.operator===c||(!m.operator||m.operator===f)&&a(t,m.semver))return!1;if(m.operator===c&&l(t,m.semver))return!1}return!0};Pc.exports=ab});var Hc=I((bw,Nc)=>{var lb=cs(),ub=(t,e,r)=>lb(t,e,">",r);Nc.exports=ub});var Bc=I((yw,Dc)=>{var cb=cs(),fb=(t,e,r)=>cb(t,e,"<",r);Dc.exports=fb});var Uc=I((_w,qc)=>{var Fc=We(),hb=(t,e,r)=>(t=new Fc(t,r),e=new Fc(e,r),t.intersects(e));qc.exports=hb});var Wc=I((Rw,Mc)=>{var db=Jr(),pb=Me();Mc.exports=(t,e,r)=>{let n=[],i=null,a=null,l=t.sort((b,g)=>pb(b,g,r));for(let b of l)db(b,e,r)?(a=b,i||(i=b)):(a&&n.push([i,a]),a=null,i=null);i&&n.push([i,null]);let f=[];for(let[b,g]of n)b===g?f.push(b):!g&&b===l[0]?f.push("*"):g?b===l[0]?f.push(`<=${g}`):f.push(`${b} - ${g}`):f.push(`>=${b}`);let c=f.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return c.length<h.length?c:e}});var Vc=I((Sw,Gc)=>{var kc=We(),fs=Xr(),{ANY:Wi}=fs,en=Jr(),ki=Me(),mb=(t,e,r={})=>{if(t===e)return!0;t=new kc(t,r),e=new kc(e,r);let n=!1;e:for(let i of t.set){for(let a of e.set){let l=gb(i,a,r);if(n=n||l!==null,l)continue e}if(n)return!1}return!0},gb=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Wi){if(e.length===1&&e[0].semver===Wi)return!0;r.includePrerelease?t=[new fs(">=0.0.0-0")]:t=[new fs(">=0.0.0")]}if(e.length===1&&e[0].semver===Wi){if(r.includePrerelease)return!0;e=[new fs(">=0.0.0")]}let n=new Set,i,a;for(let d of t)d.operator===">"||d.operator===">="?i=zc(i,d,r):d.operator==="<"||d.operator==="<="?a=jc(a,d,r):n.add(d.semver);if(n.size>1)return null;let l;if(i&&a){if(l=ki(i.semver,a.semver,r),l>0)return null;if(l===0&&(i.operator!==">="||a.operator!=="<="))return null}for(let d of n){if(i&&!en(d,String(i),r)||a&&!en(d,String(a),r))return null;for(let _ of e)if(!en(d,String(_),r))return!1;return!0}let f,c,h,b,g=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1,m=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;g&&g.prerelease.length===1&&a.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let d of e){if(b=b||d.operator===">"||d.operator===">=",h=h||d.operator==="<"||d.operator==="<=",i){if(m&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===m.major&&d.semver.minor===m.minor&&d.semver.patch===m.patch&&(m=!1),d.operator===">"||d.operator===">="){if(f=zc(i,d,r),f===d&&f!==i)return!1}else if(i.operator===">="&&!en(i.semver,String(d),r))return!1}if(a){if(g&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===g.major&&d.semver.minor===g.minor&&d.semver.patch===g.patch&&(g=!1),d.operator==="<"||d.operator==="<="){if(c=jc(a,d,r),c===d&&c!==a)return!1}else if(a.operator==="<="&&!en(a.semver,String(d),r))return!1}if(!d.operator&&(a||i)&&l!==0)return!1}return!(i&&h&&!a&&l!==0||a&&b&&!i&&l!==0||m||g)},zc=(t,e,r)=>{if(!t)return e;let n=ki(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},jc=(t,e,r)=>{if(!t)return e;let n=ki(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};Gc.exports=mb});var Kc=I((ww,Qc)=>{var zi=Ht(),bb=jr(),yb=Te(),Yc=vi(),_b=Dt(),Rb=gu(),Sb=yu(),wb=Su(),Eb=xu(),Ab=Ou(),Tb=Iu(),Cb=Pu(),xb=Hu(),vb=Me(),Ob=Bu(),$b=qu(),Ib=ns(),Lb=ku(),Pb=ju(),Nb=Yr(),Hb=ss(),Db=rs(),Bb=$i(),Fb=is(),qb=os(),Ub=Ii(),Mb=Ju(),Wb=Xr(),kb=We(),zb=Jr(),jb=Rc(),Gb=wc(),Vb=Ac(),Yb=xc(),Qb=Oc(),Kb=cs(),Xb=Hc(),Zb=Bc(),Jb=Uc(),ey=Wc(),ty=Vc();Qc.exports={parse:_b,valid:Rb,clean:Sb,inc:wb,diff:Eb,major:Ab,minor:Tb,patch:Cb,prerelease:xb,compare:vb,rcompare:Ob,compareLoose:$b,compareBuild:Ib,sort:Lb,rsort:Pb,gt:Nb,lt:Hb,eq:Db,neq:Bb,gte:Fb,lte:qb,cmp:Ub,coerce:Mb,Comparator:Wb,Range:kb,satisfies:zb,toComparators:jb,maxSatisfying:Gb,minSatisfying:Vb,minVersion:Yb,validRange:Qb,outside:Kb,gtr:Xb,ltr:Zb,intersects:Jb,simplifyRange:ey,subset:ty,SemVer:yb,re:zi.re,src:zi.src,tokens:zi.t,SEMVER_SPEC_VERSION:bb.SEMVER_SPEC_VERSION,compareIdentifiers:Yc.compareIdentifiers,rcompareIdentifiers:Yc.rcompareIdentifiers}});var tf=I((Ew,ef)=>{ef.exports=function(t,e){e||(e={});var r=e.hsep===void 0?" ":e.hsep,n=e.align||[],i=e.stringLength||function(c){return String(c).length},a=Zc(t,function(c,h){return Jc(h,function(b,g){var m=Xc(b);(!c[g]||m>c[g])&&(c[g]=m)}),c},[]),l=hs(t,function(c){return hs(c,function(h,b){var g=String(h);if(n[b]==="."){var m=Xc(g),d=a[b]+(/\./.test(g)?1:2)-(i(g)-m);return g+Array(d).join(" ")}else return g})}),f=Zc(l,function(c,h){return Jc(h,function(b,g){var m=i(b);(!c[g]||m>c[g])&&(c[g]=m)}),c},[]);return hs(l,function(c){return hs(c,function(h,b){var g=f[b]-i(h)||0,m=Array(Math.max(g+1,1)).join(" ");return n[b]==="r"||n[b]==="."?m+h:n[b]==="c"?Array(Math.ceil(g/2+1)).join(" ")+h+Array(Math.floor(g/2+1)).join(" "):h+m}).join(r).replace(/\s+$/,"")}).join(`
|
|
20
|
-
`)};function Xc(t){var e=/\.[^.]*$/.exec(t);return e?e.index+1:t.length}function Zc(t,e,r){if(t.reduce)return t.reduce(e,r);for(var n=0,i=arguments.length>=3?r:t[n++];n<t.length;n++)e(i,t[n],n);return i}function Jc(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e.call(t,t[r],r)}function hs(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e.call(t,t[n],n));return r}});var af=I(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});ps.LRUCache=void 0;var tn=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,nf=new Set,ji=typeof process=="object"&&process?process:{},sf=(t,e,r,n)=>{typeof ji.emitWarning=="function"?ji.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)},ds=globalThis.AbortController,rf=globalThis.AbortSignal;if(typeof ds>"u"){rf=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,i){this._onabort.push(i)}},ds=class{constructor(){e()}signal=new rf;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let i of this.signal._onabort)i(n);this.signal.onabort?.(n)}}};let t=ji.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,sf("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var ry=t=>!nf.has(t),Cw=Symbol("type"),St=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),of=t=>St(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?hr:null:null,hr=class extends Array{constructor(e){super(e),this.fill(0)}},Gi=class t{heap;length;static#e=!1;static create(e){let r=of(e);if(!r)return[];t.#e=!0;let n=new t(e,r);return t.#e=!1,n}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Vi=class t{#e;#r;#t;#u;#w;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#m;#s;#i;#n;#c;#d;#f;#l;#b;#h;#E;#A;#y;#_;#C;#p;static unsafeExposeInternals(e){return{starts:e.#A,ttls:e.#y,sizes:e.#E,keyMap:e.#s,keyList:e.#i,valList:e.#n,next:e.#c,prev:e.#d,get head(){return e.#f},get tail(){return e.#l},free:e.#b,isBackgroundFetch:r=>e.#o(r),backgroundFetch:(r,n,i,a)=>e.#L(r,n,i,a),moveToTail:r=>e.#O(r),indexes:r=>e.#R(r),rindexes:r=>e.#S(r),isStale:r=>e.#g(r)}}get max(){return this.#e}get maxSize(){return this.#r}get calculatedSize(){return this.#m}get size(){return this.#a}get fetchMethod(){return this.#w}get dispose(){return this.#t}get disposeAfter(){return this.#u}constructor(e){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:l,updateAgeOnHas:f,allowStale:c,dispose:h,disposeAfter:b,noDisposeOnSet:g,noUpdateTTL:m,maxSize:d=0,maxEntrySize:_=0,sizeCalculation:R,fetchMethod:O,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:T,ignoreFetchAbort:v}=e;if(r!==0&&!St(r))throw new TypeError("max option must be a nonnegative integer");let F=r?of(r):Array;if(!F)throw new Error("invalid max value: "+r);if(this.#e=r,this.#r=d,this.maxEntrySize=_||this.#r,this.sizeCalculation=R,this.sizeCalculation){if(!this.#r&&!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(O!==void 0&&typeof O!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#w=O,this.#C=!!O,this.#s=new Map,this.#i=new Array(r).fill(void 0),this.#n=new Array(r).fill(void 0),this.#c=new F(r),this.#d=new F(r),this.#f=0,this.#l=0,this.#b=Gi.create(r),this.#a=0,this.#m=0,typeof h=="function"&&(this.#t=h),typeof b=="function"?(this.#u=b,this.#h=[]):(this.#u=void 0,this.#h=void 0),this.#_=!!this.#t,this.#p=!!this.#u,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!L,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!v,this.maxEntrySize!==0){if(this.#r!==0&&!St(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!St(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#F()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!l,this.updateAgeOnHas=!!f,this.ttlResolution=St(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=n||0,this.ttl){if(!St(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#e===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#r){let B="LRU_CACHE_UNBOUNDED";ry(B)&&(nf.add(B),sf("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",B,t))}}getRemainingTTL(e){return this.#s.has(e)?1/0:0}#P(){let e=new hr(this.#e),r=new hr(this.#e);this.#y=e,this.#A=r,this.#N=(a,l,f=tn.now())=>{if(r[a]=l!==0?f:0,e[a]=l,l!==0&&this.ttlAutopurge){let c=setTimeout(()=>{this.#g(a)&&this.delete(this.#i[a])},l+1);c.unref&&c.unref()}},this.#x=a=>{r[a]=e[a]!==0?tn.now():0},this.#T=(a,l)=>{if(e[l]){let f=e[l],c=r[l];a.ttl=f,a.start=c,a.now=n||i();let h=a.now-c;a.remainingTTL=f-h}};let n=0,i=()=>{let a=tn.now();if(this.ttlResolution>0){n=a;let l=setTimeout(()=>n=0,this.ttlResolution);l.unref&&l.unref()}return a};this.getRemainingTTL=a=>{let l=this.#s.get(a);if(l===void 0)return 0;let f=e[l],c=r[l];if(f===0||c===0)return 1/0;let h=(n||i())-c;return f-h},this.#g=a=>e[a]!==0&&r[a]!==0&&(n||i())-r[a]>e[a]}#x=()=>{};#T=()=>{};#N=()=>{};#g=()=>!1;#F(){let e=new hr(this.#e);this.#m=0,this.#E=e,this.#v=r=>{this.#m-=e[r],e[r]=0},this.#H=(r,n,i,a)=>{if(this.#o(n))return 0;if(!St(i))if(a){if(typeof a!="function")throw new TypeError("sizeCalculation must be a function");if(i=a(n,r),!St(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.#$=(r,n,i)=>{if(e[r]=n,this.#r){let a=this.#r-e[r];for(;this.#m>a;)this.#I(!0)}this.#m+=e[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#m)}}#v=e=>{};#$=(e,r,n)=>{};#H=(e,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#l;!(!this.#D(r)||((e||!this.#g(r))&&(yield r),r===this.#f));)r=this.#d[r]}*#S({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#f;!(!this.#D(r)||((e||!this.#g(r))&&(yield r),r===this.#l));)r=this.#c[r]}#D(e){return e!==void 0&&this.#s.get(this.#i[e])===e}*entries(){for(let e of this.#R())this.#n[e]!==void 0&&this.#i[e]!==void 0&&!this.#o(this.#n[e])&&(yield[this.#i[e],this.#n[e]])}*rentries(){for(let e of this.#S())this.#n[e]!==void 0&&this.#i[e]!==void 0&&!this.#o(this.#n[e])&&(yield[this.#i[e],this.#n[e]])}*keys(){for(let e of this.#R()){let r=this.#i[e];r!==void 0&&!this.#o(this.#n[e])&&(yield r)}}*rkeys(){for(let e of this.#S()){let r=this.#i[e];r!==void 0&&!this.#o(this.#n[e])&&(yield r)}}*values(){for(let e of this.#R())this.#n[e]!==void 0&&!this.#o(this.#n[e])&&(yield this.#n[e])}*rvalues(){for(let e of this.#S())this.#n[e]!==void 0&&!this.#o(this.#n[e])&&(yield this.#n[e])}[Symbol.iterator](){return this.entries()}find(e,r={}){for(let n of this.#R()){let i=this.#n[n],a=this.#o(i)?i.__staleWhileFetching:i;if(a!==void 0&&e(a,this.#i[n],this))return this.get(this.#i[n],r)}}forEach(e,r=this){for(let n of this.#R()){let i=this.#n[n],a=this.#o(i)?i.__staleWhileFetching:i;a!==void 0&&e.call(r,a,this.#i[n],this)}}rforEach(e,r=this){for(let n of this.#S()){let i=this.#n[n],a=this.#o(i)?i.__staleWhileFetching:i;a!==void 0&&e.call(r,a,this.#i[n],this)}}purgeStale(){let e=!1;for(let r of this.#S({allowStale:!0}))this.#g(r)&&(this.delete(this.#i[r]),e=!0);return e}dump(){let e=[];for(let r of this.#R({allowStale:!0})){let n=this.#i[r],i=this.#n[r],a=this.#o(i)?i.__staleWhileFetching:i;if(a===void 0||n===void 0)continue;let l={value:a};if(this.#y&&this.#A){l.ttl=this.#y[r];let f=tn.now()-this.#A[r];l.start=Math.floor(Date.now()-f)}this.#E&&(l.size=this.#E[r]),e.unshift([n,l])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let i=Date.now()-n.start;n.start=tn.now()-i}this.set(r,n.value,n)}}set(e,r,n={}){if(r===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:a,noDisposeOnSet:l=this.noDisposeOnSet,sizeCalculation:f=this.sizeCalculation,status:c}=n,{noUpdateTTL:h=this.noUpdateTTL}=n,b=this.#H(e,r,n.size||0,f);if(this.maxEntrySize&&b>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.delete(e),this;let g=this.#a===0?void 0:this.#s.get(e);if(g===void 0)g=this.#a===0?this.#l:this.#b.length!==0?this.#b.pop():this.#a===this.#e?this.#I(!1):this.#a,this.#i[g]=e,this.#n[g]=r,this.#s.set(e,g),this.#c[this.#l]=g,this.#d[g]=this.#l,this.#l=g,this.#a++,this.#$(g,b,c),c&&(c.set="add"),h=!1;else{this.#O(g);let m=this.#n[g];if(r!==m){if(this.#C&&this.#o(m)){m.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:d}=m;d!==void 0&&!l&&(this.#_&&this.#t?.(d,e,"set"),this.#p&&this.#h?.push([d,e,"set"]))}else l||(this.#_&&this.#t?.(m,e,"set"),this.#p&&this.#h?.push([m,e,"set"]));if(this.#v(g),this.#$(g,b,c),this.#n[g]=r,c){c.set="replace";let d=m&&this.#o(m)?m.__staleWhileFetching:m;d!==void 0&&(c.oldValue=d)}}else c&&(c.set="update")}if(i!==0&&!this.#y&&this.#P(),this.#y&&(h||this.#N(g,i,a),c&&this.#T(c,g)),!l&&this.#p&&this.#h){let m=this.#h,d;for(;d=m?.shift();)this.#u?.(...d)}return this}pop(){try{for(;this.#a;){let e=this.#n[this.#f];if(this.#I(!0),this.#o(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#h){let e=this.#h,r;for(;r=e?.shift();)this.#u?.(...r)}}}#I(e){let r=this.#f,n=this.#i[r],i=this.#n[r];return this.#C&&this.#o(i)?i.__abortController.abort(new Error("evicted")):(this.#_||this.#p)&&(this.#_&&this.#t?.(i,n,"evict"),this.#p&&this.#h?.push([i,n,"evict"])),this.#v(r),e&&(this.#i[r]=void 0,this.#n[r]=void 0,this.#b.push(r)),this.#a===1?(this.#f=this.#l=0,this.#b.length=0):this.#f=this.#c[r],this.#s.delete(n),this.#a--,r}has(e,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,a=this.#s.get(e);if(a!==void 0){let l=this.#n[a];if(this.#o(l)&&l.__staleWhileFetching===void 0)return!1;if(this.#g(a))i&&(i.has="stale",this.#T(i,a));else return n&&this.#x(a),i&&(i.has="hit",this.#T(i,a)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){let{allowStale:n=this.allowStale}=r,i=this.#s.get(e);if(i!==void 0&&(n||!this.#g(i))){let a=this.#n[i];return this.#o(a)?a.__staleWhileFetching:a}}#L(e,r,n,i){let a=r===void 0?void 0:this.#n[r];if(this.#o(a))return a;let l=new ds,{signal:f}=n;f?.addEventListener("abort",()=>l.abort(f.reason),{signal:l.signal});let c={signal:l.signal,options:n,context:i},h=(R,O=!1)=>{let{aborted:x}=l.signal,D=n.ignoreFetchAbort&&R!==void 0;if(n.status&&(x&&!O?(n.status.fetchAborted=!0,n.status.fetchError=l.signal.reason,D&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),x&&!D&&!O)return g(l.signal.reason);let L=d;return this.#n[r]===d&&(R===void 0?L.__staleWhileFetching?this.#n[r]=L.__staleWhileFetching:this.delete(e):(n.status&&(n.status.fetchUpdated=!0),this.set(e,R,c.options))),R},b=R=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=R),g(R)),g=R=>{let{aborted:O}=l.signal,x=O&&n.allowStaleOnFetchAbort,D=x||n.allowStaleOnFetchRejection,L=D||n.noDeleteOnFetchRejection,T=d;if(this.#n[r]===d&&(!L||T.__staleWhileFetching===void 0?this.delete(e):x||(this.#n[r]=T.__staleWhileFetching)),D)return n.status&&T.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw R},m=(R,O)=>{let x=this.#w?.(e,a,c);x&&x instanceof Promise&&x.then(D=>R(D===void 0?void 0:D),O),l.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(R(void 0),n.allowStaleOnFetchAbort&&(R=D=>h(D,!0)))})};n.status&&(n.status.fetchDispatched=!0);let d=new Promise(m).then(h,b),_=Object.assign(d,{__abortController:l,__staleWhileFetching:a,__returned:void 0});return r===void 0?(this.set(e,_,{...c.options,status:void 0}),r=this.#s.get(e)):this.#n[r]=_,_}#o(e){if(!this.#C)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof ds}async fetch(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,ttl:l=this.ttl,noDisposeOnSet:f=this.noDisposeOnSet,size:c=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:b=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:R,forceRefresh:O=!1,status:x,signal:D}=r;if(!this.#C)return x&&(x.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:a,status:x});let L={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:a,ttl:l,noDisposeOnSet:f,size:c,sizeCalculation:h,noUpdateTTL:b,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:_,ignoreFetchAbort:d,status:x,signal:D},T=this.#s.get(e);if(T===void 0){x&&(x.fetch="miss");let v=this.#L(e,T,L,R);return v.__returned=v}else{let v=this.#n[T];if(this.#o(v)){let N=n&&v.__staleWhileFetching!==void 0;return x&&(x.fetch="inflight",N&&(x.returnedStale=!0)),N?v.__staleWhileFetching:v.__returned=v}let F=this.#g(T);if(!O&&!F)return x&&(x.fetch="hit"),this.#O(T),i&&this.#x(T),x&&this.#T(x,T),v;let B=this.#L(e,T,L,R),k=B.__staleWhileFetching!==void 0&&n;return x&&(x.fetch=F?"stale":"refresh",k&&F&&(x.returnedStale=!0)),k?B.__staleWhileFetching:B.__returned=B}}get(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,status:l}=r,f=this.#s.get(e);if(f!==void 0){let c=this.#n[f],h=this.#o(c);return l&&this.#T(l,f),this.#g(f)?(l&&(l.get="stale"),h?(l&&n&&c.__staleWhileFetching!==void 0&&(l.returnedStale=!0),n?c.__staleWhileFetching:void 0):(a||this.delete(e),l&&n&&(l.returnedStale=!0),n?c:void 0)):(l&&(l.get="hit"),h?c.__staleWhileFetching:(this.#O(f),i&&this.#x(f),c))}else l&&(l.get="miss")}#B(e,r){this.#d[r]=e,this.#c[e]=r}#O(e){e!==this.#l&&(e===this.#f?this.#f=this.#c[e]:this.#B(this.#d[e],this.#c[e]),this.#B(this.#l,e),this.#l=e)}delete(e){let r=!1;if(this.#a!==0){let n=this.#s.get(e);if(n!==void 0)if(r=!0,this.#a===1)this.clear();else{this.#v(n);let i=this.#n[n];this.#o(i)?i.__abortController.abort(new Error("deleted")):(this.#_||this.#p)&&(this.#_&&this.#t?.(i,e,"delete"),this.#p&&this.#h?.push([i,e,"delete"])),this.#s.delete(e),this.#i[n]=void 0,this.#n[n]=void 0,n===this.#l?this.#l=this.#d[n]:n===this.#f?this.#f=this.#c[n]:(this.#c[this.#d[n]]=this.#c[n],this.#d[this.#c[n]]=this.#d[n]),this.#a--,this.#b.push(n)}}if(this.#p&&this.#h?.length){let n=this.#h,i;for(;i=n?.shift();)this.#u?.(...i)}return r}clear(){for(let e of this.#S({allowStale:!0})){let r=this.#n[e];if(this.#o(r))r.__abortController.abort(new Error("deleted"));else{let n=this.#i[e];this.#_&&this.#t?.(r,n,"delete"),this.#p&&this.#h?.push([r,n,"delete"])}}if(this.#s.clear(),this.#n.fill(void 0),this.#i.fill(void 0),this.#y&&this.#A&&(this.#y.fill(0),this.#A.fill(0)),this.#E&&this.#E.fill(0),this.#f=0,this.#l=0,this.#b.length=0,this.#m=0,this.#a=0,this.#p&&this.#h){let e=this.#h,r;for(;r=e?.shift();)this.#u?.(...r)}}};ps.LRUCache=Vi});var cf=I((vw,uf)=>{"use strict";var se=(...t)=>t.every(e=>e)?t.join(""):"",be=t=>t?encodeURIComponent(t):"",lf=t=>t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),ny={sshtemplate:({domain:t,user:e,project:r,committish:n})=>`git@${t}:${e}/${r}.git${se("#",n)}`,sshurltemplate:({domain:t,user:e,project:r,committish:n})=>`git+ssh://git@${t}/${e}/${r}.git${se("#",n)}`,edittemplate:({domain:t,user:e,project:r,committish:n,editpath:i,path:a})=>`https://${t}/${e}/${r}${se("/",i,"/",be(n||"HEAD"),"/",a)}`,browsetemplate:({domain:t,user:e,project:r,committish:n,treepath:i})=>`https://${t}/${e}/${r}${se("/",i,"/",be(n))}`,browsetreetemplate:({domain:t,user:e,project:r,committish:n,treepath:i,path:a,fragment:l,hashformat:f})=>`https://${t}/${e}/${r}/${i}/${be(n||"HEAD")}/${a}${se("#",f(l||""))}`,browseblobtemplate:({domain:t,user:e,project:r,committish:n,blobpath:i,path:a,fragment:l,hashformat:f})=>`https://${t}/${e}/${r}/${i}/${be(n||"HEAD")}/${a}${se("#",f(l||""))}`,docstemplate:({domain:t,user:e,project:r,treepath:n,committish:i})=>`https://${t}/${e}/${r}${se("/",n,"/",be(i))}#readme`,httpstemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git+https://${se(t,"@")}${e}/${r}/${n}.git${se("#",i)}`,filetemplate:({domain:t,user:e,project:r,committish:n,path:i})=>`https://${t}/${e}/${r}/raw/${be(n||"HEAD")}/${i}`,shortcuttemplate:({type:t,user:e,project:r,committish:n})=>`${t}:${e}/${r}${se("#",n)}`,pathtemplate:({user:t,project:e,committish:r})=>`${t}/${e}${se("#",r)}`,bugstemplate:({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,hashformat:lf},wt={};wt.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:t,user:e,project:r,committish:n,path:i})=>`https://${se(t,"@")}raw.githubusercontent.com/${e}/${r}/${be(n||"HEAD")}/${i}`,gittemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git://${se(t,"@")}${e}/${r}/${n}.git${se("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://codeload.${t}/${e}/${r}/tar.gz/${be(n||"HEAD")}`,extract:t=>{let[,e,r,n,i]=t.pathname.split("/",5);if(!(n&&n!=="tree")&&(n||(i=t.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:i}}};wt.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:t,user:e,project:r,committish:n,treepath:i,path:a,editpath:l})=>`https://${t}/${e}/${r}${se("/",i,"/",be(n||"HEAD"),"/",a,l)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/get/${be(n||"HEAD")}.tar.gz`,extract:t=>{let[,e,r,n]=t.pathname.split("/",4);if(!["get"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};wt.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git+https://${se(t,"@")}${e}/${r}/${n}.git${se("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${be(n||"HEAD")}`,extract:t=>{let e=t.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let r=e.split("/"),n=r.pop();n.endsWith(".git")&&(n=n.slice(0,-4));let i=r.join("/");if(!(!i||!n))return{user:i,project:n,committish:t.hash.slice(1)}}};wt.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:t,project:e,committish:r})=>`git@${t}:${e}.git${se("#",r)}`,sshurltemplate:({domain:t,project:e,committish:r})=>`git+ssh://git@${t}/${e}.git${se("#",r)}`,edittemplate:({domain:t,user:e,project:r,committish:n,editpath:i})=>`https://${t}/${e}/${r}${se("/",be(n))}/${i}`,browsetemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${se("/",be(r))}`,browsetreetemplate:({domain:t,project:e,committish:r,path:n,hashformat:i})=>`https://${t}/${e}${se("/",be(r))}${se("#",i(n))}`,browseblobtemplate:({domain:t,project:e,committish:r,path:n,hashformat:i})=>`https://${t}/${e}${se("/",be(r))}${se("#",i(n))}`,docstemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${se("/",be(r))}`,httpstemplate:({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${se("#",r)}`,filetemplate:({user:t,project:e,committish:r,path:n})=>`https://gist.githubusercontent.com/${t}/${e}/raw${se("/",be(r))}/${n}`,shortcuttemplate:({type:t,project:e,committish:r})=>`${t}:${e}${se("#",r)}`,pathtemplate:({project:t,committish:e})=>`${t}${se("#",e)}`,bugstemplate:({domain:t,project:e})=>`https://${t}/${e}`,gittemplate:({domain:t,project:e,committish:r})=>`git://${t}/${e}.git${se("#",r)}`,tarballtemplate:({project:t,committish:e})=>`https://codeload.github.com/gist/${t}/tar.gz/${be(e||"HEAD")}`,extract:t=>{let[,e,r,n]=t.pathname.split("/",4);if(n!=="raw"){if(!r){if(!e)return;r=e,e=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:e,project:r,committish:t.hash.slice(1)}}},hashformat:function(t){return t&&"file-"+lf(t)}};wt.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:t,user:e,project:r,committish:n,path:i})=>`https://${t}/${e}/${r}/blob/${be(n)||"HEAD"}/${i}`,httpstemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}.git${se("#",n)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/archive/${be(n)||"HEAD"}.tar.gz`,bugstemplate:({user:t,project:e})=>null,extract:t=>{let[,e,r,n]=t.pathname.split("/",4);if(!["archive"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};for(let[t,e]of Object.entries(wt))wt[t]=Object.assign({},ny,e);uf.exports=wt});var Qi=I((Ow,hf)=>{var sy=Ae("url"),Yi=(t,e,r)=>{let n=t.indexOf(r);return t.lastIndexOf(e,n>-1?n:1/0)},ff=t=>{try{return new sy.URL(t)}catch{}},iy=(t,e)=>{let r=t.indexOf(":"),n=t.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(e,n))return t;let i=t.indexOf("@");return i>-1?i>r?`git+ssh://${t}`:t:t.indexOf("//")===r+1?t:`${t.slice(0,r+1)}//${t.slice(r+1)}`},oy=t=>{let e=Yi(t,"@","#"),r=Yi(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),Yi(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t};hf.exports=(t,e)=>{let r=e?iy(t,e):t;return ff(r)||ff(oy(r))}});var pf=I(($w,df)=>{"use strict";var ay=Qi(),ly=t=>{let e=t.indexOf("#"),r=t.indexOf("/"),n=t.indexOf("/",r+1),i=t.indexOf(":"),a=/\s/.exec(t),l=t.indexOf("@"),f=!a||e>-1&&a.index>e,c=l===-1||e>-1&&l>e,h=i===-1||e>-1&&i>e,b=n===-1||e>-1&&n>e,g=r>0,m=e>-1?t[e-1]!=="/":!t.endsWith("/"),d=!t.startsWith(".");return f&&g&&m&&d&&c&&h&&b};df.exports=(t,e,{gitHosts:r,protocols:n})=>{if(!t)return;let i=ly(t)?`github:${t}`:t,a=ay(i,n);if(!a)return;let l=r.byShortcut[a.protocol],f=r.byDomain[a.hostname.startsWith("www.")?a.hostname.slice(4):a.hostname],c=l||f;if(!c)return;let h=r[l||f],b=null;n[a.protocol]?.auth&&(a.username||a.password)&&(b=`${a.username}${a.password?":"+a.password:""}`);let g=null,m=null,d=null,_=null;try{if(l){let R=a.pathname.startsWith("/")?a.pathname.slice(1):a.pathname,O=R.indexOf("@");O>-1&&(R=R.slice(O+1));let x=R.lastIndexOf("/");x>-1?(m=decodeURIComponent(R.slice(0,x)),m||(m=null),d=decodeURIComponent(R.slice(x+1))):d=decodeURIComponent(R),d.endsWith(".git")&&(d=d.slice(0,-4)),a.hash&&(g=decodeURIComponent(a.hash.slice(1))),_="shortcut"}else{if(!h.protocols.includes(a.protocol))return;let R=h.extract(a);if(!R)return;m=R.user&&decodeURIComponent(R.user),d=decodeURIComponent(R.project),g=decodeURIComponent(R.committish),_=n[a.protocol]?.name||a.protocol.slice(0,-1)}}catch(R){if(R instanceof URIError)return;throw R}return[c,m,b,d,g,_,e]}});var gf=I((Iw,mf)=>{"use strict";var{LRUCache:uy}=af(),cy=cf(),fy=pf(),hy=Qi(),Ki=new uy({max:1e3}),ms=class t{constructor(e,r,n,i,a,l,f={}){Object.assign(this,t.#e[e],{type:e,user:r,auth:n,project:i,committish:a,default:l,opts:f})}static#e={byShortcut:{},byDomain:{}};static#r={"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}};static addHost(e,r){t.#e[e]=r,t.#e.byDomain[r.domain]=e,t.#e.byShortcut[`${e}:`]=e,t.#r[`${e}:`]={name:e}}static fromUrl(e,r){if(typeof e!="string")return;let n=e+JSON.stringify(r||{});if(!Ki.has(n)){let i=fy(e,r,{gitHosts:t.#e,protocols:t.#r});Ki.set(n,i?new t(...i):void 0)}return Ki.get(n)}static parseUrl(e){return hy(e)}#t(e,r){if(typeof e!="function")return null;let n={...this,...this.opts,...r};n.path||(n.path=""),n.path.startsWith("/")&&(n.path=n.path.slice(1)),n.noCommittish&&(n.committish=null);let i=e(n);return n.noGitPlus&&i.startsWith("git+")?i.slice(4):i}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#t(this.sshtemplate,e)}sshurl(e){return this.#t(this.sshurltemplate,e)}browse(e,...r){return typeof e!="string"?this.#t(this.browsetemplate,e):typeof r[0]!="string"?this.#t(this.browsetreetemplate,{...r[0],path:e}):this.#t(this.browsetreetemplate,{...r[1],fragment:r[0],path:e})}browseFile(e,...r){return typeof r[0]!="string"?this.#t(this.browseblobtemplate,{...r[0],path:e}):this.#t(this.browseblobtemplate,{...r[1],fragment:r[0],path:e})}docs(e){return this.#t(this.docstemplate,e)}bugs(e){return this.#t(this.bugstemplate,e)}https(e){return this.#t(this.httpstemplate,e)}git(e){return this.#t(this.gittemplate,e)}shortcut(e){return this.#t(this.shortcuttemplate,e)}path(e){return this.#t(this.pathtemplate,e)}tarball(e){return this.#t(this.tarballtemplate,{...e,noCommittish:!1})}file(e,r){return this.#t(this.filetemplate,{...r,path:e})}edit(e,r){return this.#t(this.edittemplate,{...r,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[t,e]of Object.entries(cy))ms.addHost(t,e);mf.exports=ms});var rn=I((kw,$f)=>{"use strict";var Ay=Ae("path"),Je="\\\\/",Cf=`[^${Je}]`,lt="\\.",Ty="\\+",Cy="\\?",_s="\\/",xy="(?=.)",xf="[^/]",so=`(?:${_s}|$)`,vf=`(?:^|${_s})`,io=`${lt}{1,2}${so}`,vy=`(?!${lt})`,Oy=`(?!${vf}${io})`,$y=`(?!${lt}{0,1}${so})`,Iy=`(?!${io})`,Ly=`[^.${_s}]`,Py=`${xf}*?`,Of={DOT_LITERAL:lt,PLUS_LITERAL:Ty,QMARK_LITERAL:Cy,SLASH_LITERAL:_s,ONE_CHAR:xy,QMARK:xf,END_ANCHOR:so,DOTS_SLASH:io,NO_DOT:vy,NO_DOTS:Oy,NO_DOT_SLASH:$y,NO_DOTS_SLASH:Iy,QMARK_NO_DOT:Ly,STAR:Py,START_ANCHOR:vf},Ny={...Of,SLASH_LITERAL:`[${Je}]`,QMARK:Cf,STAR:`${Cf}*?`,DOTS_SLASH:`${lt}{1,2}(?:[${Je}]|$)`,NO_DOT:`(?!${lt})`,NO_DOTS:`(?!(?:^|[${Je}])${lt}{1,2}(?:[${Je}]|$))`,NO_DOT_SLASH:`(?!${lt}{0,1}(?:[${Je}]|$))`,NO_DOTS_SLASH:`(?!${lt}{1,2}(?:[${Je}]|$))`,QMARK_NO_DOT:`[^.${Je}]`,START_ANCHOR:`(?:^|[${Je}])`,END_ANCHOR:`(?:[${Je}]|$)`},Hy={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};$f.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Hy,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Ay.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?Ny:Of}}});var Rs=I(Pe=>{"use strict";var Dy=Ae("path"),By=process.platform==="win32",{REGEX_BACKSLASH:Fy,REGEX_REMOVE_BACKSLASH:qy,REGEX_SPECIAL_CHARS:Uy,REGEX_SPECIAL_CHARS_GLOBAL:My}=rn();Pe.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);Pe.hasRegexChars=t=>Uy.test(t);Pe.isRegexChar=t=>t.length===1&&Pe.hasRegexChars(t);Pe.escapeRegex=t=>t.replace(My,"\\$1");Pe.toPosixSlashes=t=>t.replace(Fy,"/");Pe.removeBackslashes=t=>t.replace(qy,e=>e==="\\"?"":e);Pe.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};Pe.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:By===!0||Dy.sep==="\\";Pe.escapeLast=(t,e,r)=>{let n=t.lastIndexOf(e,r);return n===-1?t:t[n-1]==="\\"?Pe.escapeLast(t,e,n-1):`${t.slice(0,n)}\\${t.slice(n)}`};Pe.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};Pe.wrapOutput=(t,e={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",a=`${n}(?:${t})${i}`;return e.negated===!0&&(a=`(?:^(?!${a}).*$)`),a}});var Ff=I((jw,Bf)=>{"use strict";var If=Rs(),{CHAR_ASTERISK:oo,CHAR_AT:Wy,CHAR_BACKWARD_SLASH:nn,CHAR_COMMA:ky,CHAR_DOT:ao,CHAR_EXCLAMATION_MARK:lo,CHAR_FORWARD_SLASH:Df,CHAR_LEFT_CURLY_BRACE:uo,CHAR_LEFT_PARENTHESES:co,CHAR_LEFT_SQUARE_BRACKET:zy,CHAR_PLUS:jy,CHAR_QUESTION_MARK:Lf,CHAR_RIGHT_CURLY_BRACE:Gy,CHAR_RIGHT_PARENTHESES:Pf,CHAR_RIGHT_SQUARE_BRACKET:Vy}=rn(),Nf=t=>t===Df||t===nn,Hf=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Yy=(t,e)=>{let r=e||{},n=t.length-1,i=r.parts===!0||r.scanToEnd===!0,a=[],l=[],f=[],c=t,h=-1,b=0,g=0,m=!1,d=!1,_=!1,R=!1,O=!1,x=!1,D=!1,L=!1,T=!1,v=!1,F=0,B,H,k={value:"",depth:0,isGlob:!1},N=()=>h>=n,S=()=>c.charCodeAt(h+1),z=()=>(B=H,c.charCodeAt(++h));for(;h<n;){H=z();let oe;if(H===nn){D=k.backslashes=!0,H=z(),H===uo&&(x=!0);continue}if(x===!0||H===uo){for(F++;N()!==!0&&(H=z());){if(H===nn){D=k.backslashes=!0,z();continue}if(H===uo){F++;continue}if(x!==!0&&H===ao&&(H=z())===ao){if(m=k.isBrace=!0,_=k.isGlob=!0,v=!0,i===!0)continue;break}if(x!==!0&&H===ky){if(m=k.isBrace=!0,_=k.isGlob=!0,v=!0,i===!0)continue;break}if(H===Gy&&(F--,F===0)){x=!1,m=k.isBrace=!0,v=!0;break}}if(i===!0)continue;break}if(H===Df){if(a.push(h),l.push(k),k={value:"",depth:0,isGlob:!1},v===!0)continue;if(B===ao&&h===b+1){b+=2;continue}g=h+1;continue}if(r.noext!==!0&&(H===jy||H===Wy||H===oo||H===Lf||H===lo)===!0&&S()===co){if(_=k.isGlob=!0,R=k.isExtglob=!0,v=!0,H===lo&&h===b&&(T=!0),i===!0){for(;N()!==!0&&(H=z());){if(H===nn){D=k.backslashes=!0,H=z();continue}if(H===Pf){_=k.isGlob=!0,v=!0;break}}continue}break}if(H===oo){if(B===oo&&(O=k.isGlobstar=!0),_=k.isGlob=!0,v=!0,i===!0)continue;break}if(H===Lf){if(_=k.isGlob=!0,v=!0,i===!0)continue;break}if(H===zy){for(;N()!==!0&&(oe=z());){if(oe===nn){D=k.backslashes=!0,z();continue}if(oe===Vy){d=k.isBracket=!0,_=k.isGlob=!0,v=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&H===lo&&h===b){L=k.negated=!0,b++;continue}if(r.noparen!==!0&&H===co){if(_=k.isGlob=!0,i===!0){for(;N()!==!0&&(H=z());){if(H===co){D=k.backslashes=!0,H=z();continue}if(H===Pf){v=!0;break}}continue}break}if(_===!0){if(v=!0,i===!0)continue;break}}r.noext===!0&&(R=!1,_=!1);let Y=c,Re="",E="";b>0&&(Re=c.slice(0,b),c=c.slice(b),g-=b),Y&&_===!0&&g>0?(Y=c.slice(0,g),E=c.slice(g)):_===!0?(Y="",E=c):Y=c,Y&&Y!==""&&Y!=="/"&&Y!==c&&Nf(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),r.unescape===!0&&(E&&(E=If.removeBackslashes(E)),Y&&D===!0&&(Y=If.removeBackslashes(Y)));let w={prefix:Re,input:t,start:b,base:Y,glob:E,isBrace:m,isBracket:d,isGlob:_,isExtglob:R,isGlobstar:O,negated:L,negatedExtglob:T};if(r.tokens===!0&&(w.maxDepth=0,Nf(H)||l.push(k),w.tokens=l),r.parts===!0||r.tokens===!0){let oe;for(let j=0;j<a.length;j++){let Se=oe?oe+1:b,de=a[j],me=t.slice(Se,de);r.tokens&&(j===0&&b!==0?(l[j].isPrefix=!0,l[j].value=Re):l[j].value=me,Hf(l[j]),w.maxDepth+=l[j].depth),(j!==0||me!=="")&&f.push(me),oe=de}if(oe&&oe+1<t.length){let j=t.slice(oe+1);f.push(j),r.tokens&&(l[l.length-1].value=j,Hf(l[l.length-1]),w.maxDepth+=l[l.length-1].depth)}w.slashes=a,w.parts=f}return w};Bf.exports=Yy});var Mf=I((Gw,Uf)=>{"use strict";var Ss=rn(),De=Rs(),{MAX_LENGTH:ws,POSIX_REGEX_SOURCE:Qy,REGEX_NON_SPECIAL_CHARS:Ky,REGEX_SPECIAL_CHARS_BACKREF:Xy,REPLACEMENTS:qf}=Ss,Zy=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>De.escapeRegex(i)).join("..")}return r},mr=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,fo=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=qf[t]||t;let r={...e},n=typeof r.maxLength=="number"?Math.min(ws,r.maxLength):ws,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let a={type:"bos",value:"",output:r.prepend||""},l=[a],f=r.capture?"":"?:",c=De.isWindows(e),h=Ss.globChars(c),b=Ss.extglobChars(h),{DOT_LITERAL:g,PLUS_LITERAL:m,SLASH_LITERAL:d,ONE_CHAR:_,DOTS_SLASH:R,NO_DOT:O,NO_DOT_SLASH:x,NO_DOTS_SLASH:D,QMARK:L,QMARK_NO_DOT:T,STAR:v,START_ANCHOR:F}=h,B=P=>`(${f}(?:(?!${F}${P.dot?R:g}).)*?)`,H=r.dot?"":O,k=r.dot?L:T,N=r.bash===!0?B(r):v;r.capture&&(N=`(${N})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let S={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:l};t=De.removePrefix(t,S),i=t.length;let z=[],Y=[],Re=[],E=a,w,oe=()=>S.index===i-1,j=S.peek=(P=1)=>t[S.index+P],Se=S.advance=()=>t[++S.index]||"",de=()=>t.slice(S.index+1),me=(P="",J=0)=>{S.consumed+=P,S.index+=J},ct=P=>{S.output+=P.output!=null?P.output:P.value,me(P.value)},an=()=>{let P=1;for(;j()==="!"&&(j(2)!=="("||j(3)==="?");)Se(),S.start++,P++;return P%2===0?!1:(S.negated=!0,S.start++,!0)},kt=P=>{S[P]++,Re.push(P)},tt=P=>{S[P]--,Re.pop()},G=P=>{if(E.type==="globstar"){let J=S.braces>0&&(P.type==="comma"||P.type==="brace"),$=P.extglob===!0||z.length&&(P.type==="pipe"||P.type==="paren");P.type!=="slash"&&P.type!=="paren"&&!J&&!$&&(S.output=S.output.slice(0,-E.output.length),E.type="star",E.value="*",E.output=N,S.output+=E.output)}if(z.length&&P.type!=="paren"&&(z[z.length-1].inner+=P.value),(P.value||P.output)&&ct(P),E&&E.type==="text"&&P.type==="text"){E.value+=P.value,E.output=(E.output||"")+P.value;return}P.prev=E,l.push(P),E=P},Ee=(P,J)=>{let $={...b[J],conditions:1,inner:""};$.prev=E,$.parens=S.parens,$.output=S.output;let V=(r.capture?"(":"")+$.open;kt("parens"),G({type:P,value:J,output:S.output?"":_}),G({type:"paren",extglob:!0,value:Se(),output:V}),z.push($)},Is=P=>{let J=P.close+(r.capture?")":""),$;if(P.type==="negate"){let V=N;if(P.inner&&P.inner.length>1&&P.inner.includes("/")&&(V=B(r)),(V!==N||oe()||/^\)+$/.test(de()))&&(J=P.close=`)$))${V}`),P.inner.includes("*")&&($=de())&&/^\.[^\\/.]+$/.test($)){let ae=fo($,{...e,fastpaths:!1}).output;J=P.close=`)${ae})${V})`}P.prev.type==="bos"&&(S.negatedExtglob=!0)}G({type:"paren",extglob:!0,value:w,output:J}),tt("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let P=!1,J=t.replace(Xy,($,V,ae,we,he,Et)=>we==="\\"?(P=!0,$):we==="?"?V?V+we+(he?L.repeat(he.length):""):Et===0?k+(he?L.repeat(he.length):""):L.repeat(ae.length):we==="."?g.repeat(ae.length):we==="*"?V?V+we+(he?N:""):N:V?$:`\\${$}`);return P===!0&&(r.unescape===!0?J=J.replace(/\\/g,""):J=J.replace(/\\+/g,$=>$.length%2===0?"\\\\":$?"\\":"")),J===t&&r.contains===!0?(S.output=t,S):(S.output=De.wrapOutput(J,S,e),S)}for(;!oe();){if(w=Se(),w==="\0")continue;if(w==="\\"){let $=j();if($==="/"&&r.bash!==!0||$==="."||$===";")continue;if(!$){w+="\\",G({type:"text",value:w});continue}let V=/^\\+/.exec(de()),ae=0;if(V&&V[0].length>2&&(ae=V[0].length,S.index+=ae,ae%2!==0&&(w+="\\")),r.unescape===!0?w=Se():w+=Se(),S.brackets===0){G({type:"text",value:w});continue}}if(S.brackets>0&&(w!=="]"||E.value==="["||E.value==="[^")){if(r.posix!==!1&&w===":"){let $=E.value.slice(1);if($.includes("[")&&(E.posix=!0,$.includes(":"))){let V=E.value.lastIndexOf("["),ae=E.value.slice(0,V),we=E.value.slice(V+2),he=Qy[we];if(he){E.value=ae+he,S.backtrack=!0,Se(),!a.output&&l.indexOf(E)===1&&(a.output=_);continue}}}(w==="["&&j()!==":"||w==="-"&&j()==="]")&&(w=`\\${w}`),w==="]"&&(E.value==="["||E.value==="[^")&&(w=`\\${w}`),r.posix===!0&&w==="!"&&E.value==="["&&(w="^"),E.value+=w,ct({value:w});continue}if(S.quotes===1&&w!=='"'){w=De.escapeRegex(w),E.value+=w,ct({value:w});continue}if(w==='"'){S.quotes=S.quotes===1?0:1,r.keepQuotes===!0&&G({type:"text",value:w});continue}if(w==="("){kt("parens"),G({type:"paren",value:w});continue}if(w===")"){if(S.parens===0&&r.strictBrackets===!0)throw new SyntaxError(mr("opening","("));let $=z[z.length-1];if($&&S.parens===$.parens+1){Is(z.pop());continue}G({type:"paren",value:w,output:S.parens?")":"\\)"}),tt("parens");continue}if(w==="["){if(r.nobracket===!0||!de().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(mr("closing","]"));w=`\\${w}`}else kt("brackets");G({type:"bracket",value:w});continue}if(w==="]"){if(r.nobracket===!0||E&&E.type==="bracket"&&E.value.length===1){G({type:"text",value:w,output:`\\${w}`});continue}if(S.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(mr("opening","["));G({type:"text",value:w,output:`\\${w}`});continue}tt("brackets");let $=E.value.slice(1);if(E.posix!==!0&&$[0]==="^"&&!$.includes("/")&&(w=`/${w}`),E.value+=w,ct({value:w}),r.literalBrackets===!1||De.hasRegexChars($))continue;let V=De.escapeRegex(E.value);if(S.output=S.output.slice(0,-E.value.length),r.literalBrackets===!0){S.output+=V,E.value=V;continue}E.value=`(${f}${V}|${E.value})`,S.output+=E.value;continue}if(w==="{"&&r.nobrace!==!0){kt("braces");let $={type:"brace",value:w,output:"(",outputIndex:S.output.length,tokensIndex:S.tokens.length};Y.push($),G($);continue}if(w==="}"){let $=Y[Y.length-1];if(r.nobrace===!0||!$){G({type:"text",value:w,output:w});continue}let V=")";if($.dots===!0){let ae=l.slice(),we=[];for(let he=ae.length-1;he>=0&&(l.pop(),ae[he].type!=="brace");he--)ae[he].type!=="dots"&&we.unshift(ae[he].value);V=Zy(we,r),S.backtrack=!0}if($.comma!==!0&&$.dots!==!0){let ae=S.output.slice(0,$.outputIndex),we=S.tokens.slice($.tokensIndex);$.value=$.output="\\{",w=V="\\}",S.output=ae;for(let he of we)S.output+=he.output||he.value}G({type:"brace",value:w,output:V}),tt("braces"),Y.pop();continue}if(w==="|"){z.length>0&&z[z.length-1].conditions++,G({type:"text",value:w});continue}if(w===","){let $=w,V=Y[Y.length-1];V&&Re[Re.length-1]==="braces"&&(V.comma=!0,$="|"),G({type:"comma",value:w,output:$});continue}if(w==="/"){if(E.type==="dot"&&S.index===S.start+1){S.start=S.index+1,S.consumed="",S.output="",l.pop(),E=a;continue}G({type:"slash",value:w,output:d});continue}if(w==="."){if(S.braces>0&&E.type==="dot"){E.value==="."&&(E.output=g);let $=Y[Y.length-1];E.type="dots",E.output+=w,E.value+=w,$.dots=!0;continue}if(S.braces+S.parens===0&&E.type!=="bos"&&E.type!=="slash"){G({type:"text",value:w,output:g});continue}G({type:"dot",value:w,output:g});continue}if(w==="?"){if(!(E&&E.value==="(")&&r.noextglob!==!0&&j()==="("&&j(2)!=="?"){Ee("qmark",w);continue}if(E&&E.type==="paren"){let V=j(),ae=w;if(V==="<"&&!De.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(E.value==="("&&!/[!=<:]/.test(V)||V==="<"&&!/<([!=]|\w+>)/.test(de()))&&(ae=`\\${w}`),G({type:"text",value:w,output:ae});continue}if(r.dot!==!0&&(E.type==="slash"||E.type==="bos")){G({type:"qmark",value:w,output:T});continue}G({type:"qmark",value:w,output:L});continue}if(w==="!"){if(r.noextglob!==!0&&j()==="("&&(j(2)!=="?"||!/[!=<:]/.test(j(3)))){Ee("negate",w);continue}if(r.nonegate!==!0&&S.index===0){an();continue}}if(w==="+"){if(r.noextglob!==!0&&j()==="("&&j(2)!=="?"){Ee("plus",w);continue}if(E&&E.value==="("||r.regex===!1){G({type:"plus",value:w,output:m});continue}if(E&&(E.type==="bracket"||E.type==="paren"||E.type==="brace")||S.parens>0){G({type:"plus",value:w});continue}G({type:"plus",value:m});continue}if(w==="@"){if(r.noextglob!==!0&&j()==="("&&j(2)!=="?"){G({type:"at",extglob:!0,value:w,output:""});continue}G({type:"text",value:w});continue}if(w!=="*"){(w==="$"||w==="^")&&(w=`\\${w}`);let $=Ky.exec(de());$&&(w+=$[0],S.index+=$[0].length),G({type:"text",value:w});continue}if(E&&(E.type==="globstar"||E.star===!0)){E.type="star",E.star=!0,E.value+=w,E.output=N,S.backtrack=!0,S.globstar=!0,me(w);continue}let P=de();if(r.noextglob!==!0&&/^\([^?]/.test(P)){Ee("star",w);continue}if(E.type==="star"){if(r.noglobstar===!0){me(w);continue}let $=E.prev,V=$.prev,ae=$.type==="slash"||$.type==="bos",we=V&&(V.type==="star"||V.type==="globstar");if(r.bash===!0&&(!ae||P[0]&&P[0]!=="/")){G({type:"star",value:w,output:""});continue}let he=S.braces>0&&($.type==="comma"||$.type==="brace"),Et=z.length&&($.type==="pipe"||$.type==="paren");if(!ae&&$.type!=="paren"&&!he&&!Et){G({type:"star",value:w,output:""});continue}for(;P.slice(0,3)==="/**";){let ze=t[S.index+4];if(ze&&ze!=="/")break;P=P.slice(3),me("/**",3)}if($.type==="bos"&&oe()){E.type="globstar",E.value+=w,E.output=B(r),S.output=E.output,S.globstar=!0,me(w);continue}if($.type==="slash"&&$.prev.type!=="bos"&&!we&&oe()){S.output=S.output.slice(0,-($.output+E.output).length),$.output=`(?:${$.output}`,E.type="globstar",E.output=B(r)+(r.strictSlashes?")":"|$)"),E.value+=w,S.globstar=!0,S.output+=$.output+E.output,me(w);continue}if($.type==="slash"&&$.prev.type!=="bos"&&P[0]==="/"){let ze=P[1]!==void 0?"|$":"";S.output=S.output.slice(0,-($.output+E.output).length),$.output=`(?:${$.output}`,E.type="globstar",E.output=`${B(r)}${d}|${d}${ze})`,E.value+=w,S.output+=$.output+E.output,S.globstar=!0,me(w+Se()),G({type:"slash",value:"/",output:""});continue}if($.type==="bos"&&P[0]==="/"){E.type="globstar",E.value+=w,E.output=`(?:^|${d}|${B(r)}${d})`,S.output=E.output,S.globstar=!0,me(w+Se()),G({type:"slash",value:"/",output:""});continue}S.output=S.output.slice(0,-E.output.length),E.type="globstar",E.output=B(r),E.value+=w,S.output+=E.output,S.globstar=!0,me(w);continue}let J={type:"star",value:w,output:N};if(r.bash===!0){J.output=".*?",(E.type==="bos"||E.type==="slash")&&(J.output=H+J.output),G(J);continue}if(E&&(E.type==="bracket"||E.type==="paren")&&r.regex===!0){J.output=w,G(J);continue}(S.index===S.start||E.type==="slash"||E.type==="dot")&&(E.type==="dot"?(S.output+=x,E.output+=x):r.dot===!0?(S.output+=D,E.output+=D):(S.output+=H,E.output+=H),j()!=="*"&&(S.output+=_,E.output+=_)),G(J)}for(;S.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(mr("closing","]"));S.output=De.escapeLast(S.output,"["),tt("brackets")}for(;S.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(mr("closing",")"));S.output=De.escapeLast(S.output,"("),tt("parens")}for(;S.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(mr("closing","}"));S.output=De.escapeLast(S.output,"{"),tt("braces")}if(r.strictSlashes!==!0&&(E.type==="star"||E.type==="bracket")&&G({type:"maybe_slash",value:"",output:`${d}?`}),S.backtrack===!0){S.output="";for(let P of S.tokens)S.output+=P.output!=null?P.output:P.value,P.suffix&&(S.output+=P.suffix)}return S};fo.fastpaths=(t,e)=>{let r={...e},n=typeof r.maxLength=="number"?Math.min(ws,r.maxLength):ws,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);t=qf[t]||t;let a=De.isWindows(e),{DOT_LITERAL:l,SLASH_LITERAL:f,ONE_CHAR:c,DOTS_SLASH:h,NO_DOT:b,NO_DOTS:g,NO_DOTS_SLASH:m,STAR:d,START_ANCHOR:_}=Ss.globChars(a),R=r.dot?g:b,O=r.dot?m:b,x=r.capture?"":"?:",D={negated:!1,prefix:""},L=r.bash===!0?".*?":d;r.capture&&(L=`(${L})`);let T=H=>H.noglobstar===!0?L:`(${x}(?:(?!${_}${H.dot?h:l}).)*?)`,v=H=>{switch(H){case"*":return`${R}${c}${L}`;case".*":return`${l}${c}${L}`;case"*.*":return`${R}${L}${l}${c}${L}`;case"*/*":return`${R}${L}${f}${c}${O}${L}`;case"**":return R+T(r);case"**/*":return`(?:${R}${T(r)}${f})?${O}${c}${L}`;case"**/*.*":return`(?:${R}${T(r)}${f})?${O}${L}${l}${c}${L}`;case"**/.*":return`(?:${R}${T(r)}${f})?${l}${c}${L}`;default:{let k=/^(.*?)\.(\w+)$/.exec(H);if(!k)return;let N=v(k[1]);return N?N+l+k[2]:void 0}}},F=De.removePrefix(t,D),B=v(F);return B&&r.strictSlashes!==!0&&(B+=`${f}?`),B};Uf.exports=fo});var kf=I((Vw,Wf)=>{"use strict";var Jy=Ae("path"),e_=Ff(),ho=Mf(),po=Rs(),t_=rn(),r_=t=>t&&typeof t=="object"&&!Array.isArray(t),pe=(t,e,r=!1)=>{if(Array.isArray(t)){let b=t.map(m=>pe(m,e,r));return m=>{for(let d of b){let _=d(m);if(_)return _}return!1}}let n=r_(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},a=po.isWindows(e),l=n?pe.compileRe(t,e):pe.makeRe(t,e,!1,!0),f=l.state;delete l.state;let c=()=>!1;if(i.ignore){let b={...e,ignore:null,onMatch:null,onResult:null};c=pe(i.ignore,b,r)}let h=(b,g=!1)=>{let{isMatch:m,match:d,output:_}=pe.test(b,l,e,{glob:t,posix:a}),R={glob:t,state:f,regex:l,posix:a,input:b,output:_,match:d,isMatch:m};return typeof i.onResult=="function"&&i.onResult(R),m===!1?(R.isMatch=!1,g?R:!1):c(b)?(typeof i.onIgnore=="function"&&i.onIgnore(R),R.isMatch=!1,g?R:!1):(typeof i.onMatch=="function"&&i.onMatch(R),g?R:!0)};return r&&(h.state=f),h};pe.test=(t,e,r,{glob:n,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let a=r||{},l=a.format||(i?po.toPosixSlashes:null),f=t===n,c=f&&l?l(t):t;return f===!1&&(c=l?l(t):t,f=c===n),(f===!1||a.capture===!0)&&(a.matchBase===!0||a.basename===!0?f=pe.matchBase(t,e,r,i):f=e.exec(c)),{isMatch:!!f,match:f,output:c}};pe.matchBase=(t,e,r,n=po.isWindows(r))=>(e instanceof RegExp?e:pe.makeRe(e,r)).test(Jy.basename(t));pe.isMatch=(t,e,r)=>pe(e,r)(t);pe.parse=(t,e)=>Array.isArray(t)?t.map(r=>pe.parse(r,e)):ho(t,{...e,fastpaths:!1});pe.scan=(t,e)=>e_(t,e);pe.compileRe=(t,e,r=!1,n=!1)=>{if(r===!0)return t.output;let i=e||{},a=i.contains?"":"^",l=i.contains?"":"$",f=`${a}(?:${t.output})${l}`;t&&t.negated===!0&&(f=`^(?!${f}).*$`);let c=pe.toRegex(f,e);return n===!0&&(c.state=t),c};pe.makeRe=(t,e={},r=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=ho.fastpaths(t,e)),i.output||(i=ho(t,e)),pe.compileRe(i,e,r,n)};pe.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};pe.constants=t_;Wf.exports=pe});var jf=I((Yw,zf)=>{"use strict";zf.exports=kf()});var Vf=I((Qw,Gf)=>{"use strict";var Ut=class t extends Error{constructor(e,r,n){super("[ParserError] "+e,r,n),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}},Es=class{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},sn=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new Es(this.parseStart)}parse(e){if(e.length===0||e.length==null)return;this._buf=String(e),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let e;do e=this.state.parser,this.runOne();while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if(typeof e!="function")throw new Ut("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,r){r&&this.next(r),this.stack.push(this.state),this.state=new Es(e)}callNow(e,r){return this.call(e,r),this.runOne()}return(e){if(this.stack.length===0)throw this.error(new Ut("Stack underflow"));e===void 0&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===1114112)throw this.error(new Ut("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new Ut("Must declare a parseStart method")}};sn.END=1114112;sn.Error=Ut;Gf.exports=sn});var Qf=I((Kw,Yf)=>{"use strict";Yf.exports=t=>{let e=new Date(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var As=I((Xw,Kf)=>{"use strict";Kf.exports=(t,e)=>{for(e=String(e);e.length<t;)e="0"+e;return e}});var Zf=I((Zw,Xf)=>{"use strict";var gr=As(),mo=class extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){let e=`${this.getUTCFullYear()}-${gr(2,this.getUTCMonth()+1)}-${gr(2,this.getUTCDate())}`,r=`${gr(2,this.getUTCHours())}:${gr(2,this.getUTCMinutes())}:${gr(2,this.getUTCSeconds())}.${gr(3,this.getUTCMilliseconds())}`;return`${e}T${r}`}};Xf.exports=t=>{let e=new mo(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var th=I((Jw,eh)=>{"use strict";var Jf=As(),n_=global.Date,go=class extends n_{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${Jf(2,this.getUTCMonth()+1)}-${Jf(2,this.getUTCDate())}`}};eh.exports=t=>{let e=new go(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var nh=I((eE,rh)=>{"use strict";var Ts=As(),bo=class extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${Ts(2,this.getUTCHours())}:${Ts(2,this.getUTCMinutes())}:${Ts(2,this.getUTCSeconds())}.${Ts(3,this.getUTCMilliseconds())}`}};rh.exports=t=>{let e=new bo(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var sh=I((exports,module)=>{"use strict";module.exports=makeParserClass(Vf());module.exports.makeParserClass=makeParserClass;var TomlError=class t extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,t),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=t=>{let e=new TomlError(t.message);return e.code=t.code,e.wrapped=t,e};module.exports.TomlError=TomlError;var createDateTime=Qf(),createDateTimeFloat=Zf(),createDate=th(),createTime=nh(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
|
|
21
|
-
`,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}function isBit(t){return t===CHAR_1||t===CHAR_0}function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return hasOwnProperty.call(t,e)?!0:(e==="__proto__"&&defineProperty(t,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(t){return t===null||typeof t!="object"?!1:t[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}function isInlineList(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(t){return t===null||typeof t!="object"?!1:t[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(t){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e)?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}function isInteger(t){return t===null||typeof t!="object"?!1:t[_type]===INTEGER}var FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}function isFloat(t){return t===null||typeof t!="object"?!1:t[_type]===FLOAT}function tomlType(t){let e=typeof t;if(e==="object"){if(t===null)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}function makeParserClass(t){class e extends t{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(n){let i=this.ctx,a=n.key.pop();for(let l of n.key){if(hasKey(i,l)&&(!isTable(i[l])||i[l][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[l]=i[l]||Table()}if(hasKey(i,a))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(n.value)||isFloat(n.value)?i[a]=n.value.valueOf():i[a]=n.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(n){return this.state.resultTable?this.state.resultTable.push(n):this.state.resultTable=[n],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(n){return this.returnNow({key:this.state.resultTable,value:n})}parseComment(){do if(this.char===t.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(n){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,n)&&(!isTable(this.ctx[n])||this.ctx[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[n]=this.ctx[n]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,n))this.ctx=this.ctx[n]=Table();else if(isTable(this.ctx[n]))this.ctx=this.ctx[n];else if(isList(this.ctx[n]))this.ctx=this.ctx[n][this.ctx[n].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(n){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,n)||(this.ctx[n]=List()),isInlineList(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[n])){let i=Table();this.ctx[n].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,n))this.ctx=this.ctx[n]=Table();else{if(isInlineList(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[n]))this.ctx=this.ctx[n][this.ctx[n].length-1];else if(isTable(this.ctx[n]))this.ctx=this.ctx[n];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(n){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===t.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(n){return this.returnNow(n)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===t.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(n){return this.state.buf+=n,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let n="\\u00";return this.char<16&&(n+="0"),n+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${n} instead`))}recordMultiEscapeReplacement(n){return this.state.buf+=n,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(n){try{let i=parseInt(n,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===t.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(n){if(this.state.resultArr){let i=this.state.resultArr[_contentType],a=tomlType(n);if(i!==a)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${a}`))}else this.state.resultArr=InlineList(tomlType(n));return isFloat(n)||isInteger(n)?this.state.resultArr.push(n.valueOf()):this.state.resultArr.push(n),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(n){let i=this.state.resultTable,a=n.key.pop();for(let l of n.key){if(hasKey(i,l)&&(!isTable(i[l])||i[l][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[l]=i[l]||Table()}if(hasKey(i,a))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(n.value)||isFloat(n.value)?i[a]=n.value.valueOf():i[a]=n.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return e}});var oh=I((tE,ih)=>{"use strict";ih.exports=s_;function s_(t,e){if(t.pos==null||t.line==null)return t;let r=t.message;if(r+=` at row ${t.line+1}, col ${t.col+1}, pos ${t.pos}:
|
|
22
|
-
`,e&&e.split){let
|
|
23
|
-
`,r+=
|
|
24
|
-
`}else r+=
|
|
5
|
+
`;function $s(t,e){var r=[],s="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(n,o,a){var l=t[n];l&&Array.isArray(l)?l.forEach(function(h){s+=Fe(n+"[]")+i+Fe(h)+`
|
|
6
|
+
`}):l&&typeof l=="object"?r.push(n):s+=Fe(n)+i+Fe(l)+cr}),e.section&&s.length&&(s="["+Fe(e.section)+"]"+cr+s),r.forEach(function(n,o,a){var l=vs(n).join("\\."),h=(e.section?e.section+".":"")+l,p=$s(t[n],{section:h,whitespace:e.whitespace});s.length&&p.length&&(s+=cr),s+=p}),s}function vs(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function rl(t){var e={},r=e,s=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,n=t.split(/[\r\n]+/g);return n.forEach(function(o,a,l){if(!(!o||o.match(/^\s*[;#]/))){var h=o.match(i);if(h){if(h[1]!==void 0){if(s=yt(h[1]),s==="__proto__"){r={};return}r=e[s]=e[s]||{};return}var p=yt(h[2]);if(p!=="__proto__"){var u=h[3]?yt(h[4]):!0;switch(u){case"true":case"false":case"null":u=JSON.parse(u)}if(p.length>2&&p.slice(-2)==="[]"){if(p=p.substring(0,p.length-2),p==="__proto__")return;r[p]?Array.isArray(r[p])||(r[p]=[r[p]]):r[p]=[]}Array.isArray(r[p])?r[p].push(u):r[p]=u}}}}),Object.keys(e).filter(function(o,a,l){if(!e[o]||typeof e[o]!="object"||Array.isArray(e[o]))return!1;var h=vs(o),p=e,u=h.pop(),c=u.replace(/\\\./g,".");return h.forEach(function(f,A,g){f!=="__proto__"&&((!p[f]||typeof p[f]!="object")&&(p[f]={}),p=p[f])}),p===e&&c===u?!1:(p[c]=e[o],!0)}).forEach(function(o,a,l){delete e[o]}),e}function Os(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function Fe(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&Os(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function yt(t,e){if(t=(t||"").trim(),Os(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,s="",i=0,n=t.length;i<n;i++){var o=t.charAt(i);if(r)"\\;#".indexOf(o)!==-1?s+=o:s+="\\"+o,r=!1;else{if(";#".indexOf(o)!==-1)break;o==="\\"?r=!0:s+=o}}return r&&(s+="\\"),s.trim()}return t}});var Hs=x((lp,Ls)=>{"use strict";var ur=1,Ns=2;function sl(){return""}function il(t,e,r){return t.slice(e,r).replace(/\S/g," ")}Ls.exports=function(t,e){e=e||{};for(var r,s,i=!1,n=!1,o=0,a="",l=e.whitespace===!1?sl:il,h=0;h<t.length;h++){if(r=t[h],s=t[h+1],!n&&r==='"'){var p=t[h-1]==="\\"&&t[h-2]!=="\\";p||(i=!i)}if(!i){if(!n&&r+s==="//")a+=t.slice(o,h),o=h,n=ur,h++;else if(n===ur&&r+s===`\r
|
|
7
|
+
`){h++,n=!1,a+=l(t,o,h),o=h;continue}else if(n===ur&&r===`
|
|
8
|
+
`)n=!1,a+=l(t,o,h),o=h;else if(!n&&r+s==="/*"){a+=t.slice(o,h),o=h,n=Ns,h++;continue}else if(n===Ns&&r+s==="*/"){h++,n=!1,a+=l(t,o,h+1),o=h+1;continue}}}return a+(n?l(t.substr(o)):t.substr(o))}});var Ps=x(qe=>{"use strict";var Ds=me("fs"),nl=Is(),tt=me("path"),ol=Hs(),al=qe.parse=function(t){return/^\s*{/.test(t)?JSON.parse(ol(t)):nl.parse(t)},ll=qe.file=function(){var t=[].slice.call(arguments).filter(function(i){return i!=null});for(var e in t)if(typeof t[e]!="string")return;var r=tt.join.apply(null,t),s;try{return Ds.readFileSync(r,"utf-8")}catch{return}},hp=qe.json=function(){var t=ll.apply(null,arguments);return t?al(t):null},cp=qe.env=function(t,e){e=e||process.env;var r={},s=t.length;for(var i in e)if(i.toLowerCase().indexOf(t.toLowerCase())===0){for(var n=i.substring(s).split("__"),o;(o=n.indexOf(""))>-1;)n.splice(o,1);var a=r;n.forEach(function(h,p){!h||typeof a!="object"||(p===n.length-1&&(a[h]=e[i]),a[h]===void 0&&(a[h]={}),a=a[h])})}return r},up=qe.find=function(){var t=tt.join.apply(null,[].slice.call(arguments));function e(r,s){var i=tt.join(r,s);try{return Ds.statSync(i),i}catch{if(tt.dirname(r)!==r)return e(tt.dirname(r),s)}}return e(process.cwd(),t)}});var Gs=x((pp,Bs)=>{"use strict";function Ms(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function Fs(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function qs(t){var e=[];return t.forEach(function(r,s){typeof r=="object"&&r!==null?Array.isArray(r)?e[s]=qs(r):Ms(r)?e[s]=Fs(r):e[s]=fr({},r):e[s]=r}),e}function Us(t,e){return e==="__proto__"?void 0:t[e]}var fr=Bs.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,s,i;return e.forEach(function(n){typeof n!="object"||n===null||Array.isArray(n)||Object.keys(n).forEach(function(o){if(s=Us(t,o),r=Us(n,o),r!==t)if(typeof r!="object"||r===null){t[o]=r;return}else if(Array.isArray(r)){t[o]=qs(r);return}else if(Ms(r)){t[o]=Fs(r);return}else if(typeof s!="object"||s===null||Array.isArray(s)){t[o]=fr({},r);return}else{t[o]=fr(s,r);return}})}),t}});var pr=x((dp,Ws)=>{var rt=Ps(),Be=me("path").join,hl=Gs(),js="/etc",zs=process.platform==="win32",st=zs?process.env.USERPROFILE:process.env.HOME;Ws.exports=function(t,e,r,s){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=hr()(process.argv.slice(2))),e=(typeof e=="string"?rt.json(e):e)||{},s=s||rt.parse;var i=rt.env(t+"_"),n=[e],o=[];function a(l){if(!(o.indexOf(l)>=0)){var h=rt.file(l);h&&(n.push(s(h)),o.push(l))}}return zs||[Be(js,t,"config"),Be(js,t+"rc")].forEach(a),st&&[Be(st,".config",t,"config"),Be(st,".config",t),Be(st,"."+t,"config"),Be(st,"."+t+"rc")].forEach(a),a(rt.find("."+t+"rc")),i.config&&a(i.config),r.config&&a(r.config),hl.apply(null,n.concat([i,r,o.length?{configs:o,config:o[o.length-1]}:void 0]))}});var Js=x((mp,Zs)=>{var dr=me("url"),Ys=Ss(),cl=Ys.decodeBase64,ul=Ys.encodeBase64,ks=":_authToken",Vs=":_auth",Ks=":username",Xs=":_password";Zs.exports=function(){var t,e;return arguments.length>=2?(t=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?t=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||pr()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),t=t||e.npmrc.registry,Qs(t,e)||fl(e.npmrc)};function Qs(t,e){for(var r=dr.parse(t,!1,!0),s;s!=="/"&&r.pathname!==s;){s=r.pathname||"/";var i="//"+r.host+s.replace(/\/$/,""),n=dl(i,e.npmrc);if(n)return n;if(!e.recursive)return/\/$/.test(t)?void 0:Qs(dr.resolve(t,"."),e);r.pathname=dr.resolve(pl(s),"..")||"/"}}function fl(t){if(t._auth){var e=wt(t._auth);return{token:e,type:"Basic"}}}function pl(t){return t[t.length-1]==="/"?t:t+"/"}function dl(t,e){var r=ml(e[t+ks]||e[t+"/"+ks]);if(r)return r;var s=e[t+Ks]||e[t+"/"+Ks],i=e[t+Xs]||e[t+"/"+Xs],n=gl(s,i);if(n)return n;var o=El(e[t+Vs]||e[t+"/"+Vs]);if(o)return o}function wt(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function ml(t){if(t){var e=wt(t);return{token:e,type:"Bearer"}}}function gl(t,e){if(!(!t||!e)){var r=cl(wt(e)),s=ul(t+":"+r);return{token:s,type:"Basic",password:r,username:t}}}function El(t){if(t){var e=wt(t);return{token:e,type:"Basic"}}}});var it=x((gp,ei)=>{var Al="2.0.0",Rl=Number.MAX_SAFE_INTEGER||9007199254740991,xl=16;ei.exports={SEMVER_SPEC_VERSION:Al,MAX_LENGTH:256,MAX_SAFE_INTEGER:Rl,MAX_SAFE_COMPONENT_LENGTH:xl}});var nt=x((Ep,ti)=>{var yl=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};ti.exports=yl});var Oe=x((be,ri)=>{var{MAX_SAFE_COMPONENT_LENGTH:mr}=it(),wl=nt();be=ri.exports={};var _l=be.re=[],_=be.src=[],T=be.t={},Tl=0,H=(t,e,r)=>{let s=Tl++;wl(t,s,e),T[t]=s,_[s]=e,_l[s]=new RegExp(e,r?"g":void 0)};H("NUMERICIDENTIFIER","0|[1-9]\\d*");H("NUMERICIDENTIFIERLOOSE","[0-9]+");H("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");H("MAINVERSION",`(${_[T.NUMERICIDENTIFIER]})\\.(${_[T.NUMERICIDENTIFIER]})\\.(${_[T.NUMERICIDENTIFIER]})`);H("MAINVERSIONLOOSE",`(${_[T.NUMERICIDENTIFIERLOOSE]})\\.(${_[T.NUMERICIDENTIFIERLOOSE]})\\.(${_[T.NUMERICIDENTIFIERLOOSE]})`);H("PRERELEASEIDENTIFIER",`(?:${_[T.NUMERICIDENTIFIER]}|${_[T.NONNUMERICIDENTIFIER]})`);H("PRERELEASEIDENTIFIERLOOSE",`(?:${_[T.NUMERICIDENTIFIERLOOSE]}|${_[T.NONNUMERICIDENTIFIER]})`);H("PRERELEASE",`(?:-(${_[T.PRERELEASEIDENTIFIER]}(?:\\.${_[T.PRERELEASEIDENTIFIER]})*))`);H("PRERELEASELOOSE",`(?:-?(${_[T.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_[T.PRERELEASEIDENTIFIERLOOSE]})*))`);H("BUILDIDENTIFIER","[0-9A-Za-z-]+");H("BUILD",`(?:\\+(${_[T.BUILDIDENTIFIER]}(?:\\.${_[T.BUILDIDENTIFIER]})*))`);H("FULLPLAIN",`v?${_[T.MAINVERSION]}${_[T.PRERELEASE]}?${_[T.BUILD]}?`);H("FULL",`^${_[T.FULLPLAIN]}$`);H("LOOSEPLAIN",`[v=\\s]*${_[T.MAINVERSIONLOOSE]}${_[T.PRERELEASELOOSE]}?${_[T.BUILD]}?`);H("LOOSE",`^${_[T.LOOSEPLAIN]}$`);H("GTLT","((?:<|>)?=?)");H("XRANGEIDENTIFIERLOOSE",`${_[T.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);H("XRANGEIDENTIFIER",`${_[T.NUMERICIDENTIFIER]}|x|X|\\*`);H("XRANGEPLAIN",`[v=\\s]*(${_[T.XRANGEIDENTIFIER]})(?:\\.(${_[T.XRANGEIDENTIFIER]})(?:\\.(${_[T.XRANGEIDENTIFIER]})(?:${_[T.PRERELEASE]})?${_[T.BUILD]}?)?)?`);H("XRANGEPLAINLOOSE",`[v=\\s]*(${_[T.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[T.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[T.XRANGEIDENTIFIERLOOSE]})(?:${_[T.PRERELEASELOOSE]})?${_[T.BUILD]}?)?)?`);H("XRANGE",`^${_[T.GTLT]}\\s*${_[T.XRANGEPLAIN]}$`);H("XRANGELOOSE",`^${_[T.GTLT]}\\s*${_[T.XRANGEPLAINLOOSE]}$`);H("COERCE",`(^|[^\\d])(\\d{1,${mr}})(?:\\.(\\d{1,${mr}}))?(?:\\.(\\d{1,${mr}}))?(?:$|[^\\d])`);H("COERCERTL",_[T.COERCE],!0);H("LONETILDE","(?:~>?)");H("TILDETRIM",`(\\s*)${_[T.LONETILDE]}\\s+`,!0);be.tildeTrimReplace="$1~";H("TILDE",`^${_[T.LONETILDE]}${_[T.XRANGEPLAIN]}$`);H("TILDELOOSE",`^${_[T.LONETILDE]}${_[T.XRANGEPLAINLOOSE]}$`);H("LONECARET","(?:\\^)");H("CARETTRIM",`(\\s*)${_[T.LONECARET]}\\s+`,!0);be.caretTrimReplace="$1^";H("CARET",`^${_[T.LONECARET]}${_[T.XRANGEPLAIN]}$`);H("CARETLOOSE",`^${_[T.LONECARET]}${_[T.XRANGEPLAINLOOSE]}$`);H("COMPARATORLOOSE",`^${_[T.GTLT]}\\s*(${_[T.LOOSEPLAIN]})$|^$`);H("COMPARATOR",`^${_[T.GTLT]}\\s*(${_[T.FULLPLAIN]})$|^$`);H("COMPARATORTRIM",`(\\s*)${_[T.GTLT]}\\s*(${_[T.LOOSEPLAIN]}|${_[T.XRANGEPLAIN]})`,!0);be.comparatorTrimReplace="$1$2$3";H("HYPHENRANGE",`^\\s*(${_[T.XRANGEPLAIN]})\\s+-\\s+(${_[T.XRANGEPLAIN]})\\s*$`);H("HYPHENRANGELOOSE",`^\\s*(${_[T.XRANGEPLAINLOOSE]})\\s+-\\s+(${_[T.XRANGEPLAINLOOSE]})\\s*$`);H("STAR","(<|>)?=?\\s*\\*");H("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");H("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var ot=x((Ap,si)=>{var bl=["includePrerelease","loose","rtl"],Cl=t=>t?typeof t!="object"?{loose:!0}:bl.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};si.exports=Cl});var gr=x((Rp,oi)=>{var ii=/^[0-9]+$/,ni=(t,e)=>{let r=ii.test(t),s=ii.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Sl=(t,e)=>ni(e,t);oi.exports={compareIdentifiers:ni,rcompareIdentifiers:Sl}});var re=x((xp,ci)=>{var _t=nt(),{MAX_LENGTH:ai,MAX_SAFE_INTEGER:Tt}=it(),{re:li,t:hi}=Oe(),$l=ot(),{compareIdentifiers:Ge}=gr(),Er=class t{constructor(e,r){if(r=$l(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>ai)throw new TypeError(`version is longer than ${ai} characters`);_t("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?li[hi.LOOSE]:li[hi.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>Tt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Tt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Tt||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<Tt)return n}return i}):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(_t("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Ge(this.major,e.major)||Ge(this.minor,e.minor)||Ge(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(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 r=0;do{let s=this.prerelease[r],i=e.prerelease[r];if(_t("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return Ge(s,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],i=e.build[r];if(_t("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return Ge(s,i)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);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)}r&&(Ge(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};ci.exports=Er});var Ie=x((yp,di)=>{var{MAX_LENGTH:vl}=it(),{re:ui,t:fi}=Oe(),pi=re(),Ol=ot(),Il=(t,e)=>{if(e=Ol(e),t instanceof pi)return t;if(typeof t!="string"||t.length>vl||!(e.loose?ui[fi.LOOSE]:ui[fi.FULL]).test(t))return null;try{return new pi(t,e)}catch{return null}};di.exports=Il});var gi=x((wp,mi)=>{var Nl=Ie(),Ll=(t,e)=>{let r=Nl(t,e);return r?r.version:null};mi.exports=Ll});var Ai=x((_p,Ei)=>{var Hl=Ie(),Dl=(t,e)=>{let r=Hl(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Ei.exports=Dl});var yi=x((Tp,xi)=>{var Ri=re(),Pl=(t,e,r,s)=>{typeof r=="string"&&(s=r,r=void 0);try{return new Ri(t instanceof Ri?t.version:t,r).inc(e,s).version}catch{return null}};xi.exports=Pl});var he=x((bp,_i)=>{var wi=re(),Ul=(t,e,r)=>new wi(t,r).compare(new wi(e,r));_i.exports=Ul});var bt=x((Cp,Ti)=>{var Ml=he(),Fl=(t,e,r)=>Ml(t,e,r)===0;Ti.exports=Fl});var Si=x((Sp,Ci)=>{var bi=Ie(),ql=bt(),Bl=(t,e)=>{if(ql(t,e))return null;{let r=bi(t),s=bi(e),i=r.prerelease.length||s.prerelease.length,n=i?"pre":"",o=i?"prerelease":"";for(let a in r)if((a==="major"||a==="minor"||a==="patch")&&r[a]!==s[a])return n+a;return o}};Ci.exports=Bl});var vi=x(($p,$i)=>{var Gl=re(),jl=(t,e)=>new Gl(t,e).major;$i.exports=jl});var Ii=x((vp,Oi)=>{var zl=re(),Wl=(t,e)=>new zl(t,e).minor;Oi.exports=Wl});var Li=x((Op,Ni)=>{var kl=re(),Vl=(t,e)=>new kl(t,e).patch;Ni.exports=Vl});var Di=x((Ip,Hi)=>{var Kl=Ie(),Xl=(t,e)=>{let r=Kl(t,e);return r&&r.prerelease.length?r.prerelease:null};Hi.exports=Xl});var Ui=x((Np,Pi)=>{var Yl=he(),Ql=(t,e,r)=>Yl(e,t,r);Pi.exports=Ql});var Fi=x((Lp,Mi)=>{var Zl=he(),Jl=(t,e)=>Zl(t,e,!0);Mi.exports=Jl});var Ct=x((Hp,Bi)=>{var qi=re(),eh=(t,e,r)=>{let s=new qi(t,r),i=new qi(e,r);return s.compare(i)||s.compareBuild(i)};Bi.exports=eh});var ji=x((Dp,Gi)=>{var th=Ct(),rh=(t,e)=>t.sort((r,s)=>th(r,s,e));Gi.exports=rh});var Wi=x((Pp,zi)=>{var sh=Ct(),ih=(t,e)=>t.sort((r,s)=>sh(s,r,e));zi.exports=ih});var at=x((Up,ki)=>{var nh=he(),oh=(t,e,r)=>nh(t,e,r)>0;ki.exports=oh});var St=x((Mp,Vi)=>{var ah=he(),lh=(t,e,r)=>ah(t,e,r)<0;Vi.exports=lh});var Ar=x((Fp,Ki)=>{var hh=he(),ch=(t,e,r)=>hh(t,e,r)!==0;Ki.exports=ch});var $t=x((qp,Xi)=>{var uh=he(),fh=(t,e,r)=>uh(t,e,r)>=0;Xi.exports=fh});var vt=x((Bp,Yi)=>{var ph=he(),dh=(t,e,r)=>ph(t,e,r)<=0;Yi.exports=dh});var Rr=x((Gp,Qi)=>{var mh=bt(),gh=Ar(),Eh=at(),Ah=$t(),Rh=St(),xh=vt(),yh=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return mh(t,r,s);case"!=":return gh(t,r,s);case">":return Eh(t,r,s);case">=":return Ah(t,r,s);case"<":return Rh(t,r,s);case"<=":return xh(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};Qi.exports=yh});var Ji=x((jp,Zi)=>{var wh=re(),_h=Ie(),{re:Ot,t:It}=Oe(),Th=(t,e)=>{if(t instanceof wh)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(Ot[It.COERCE]);else{let s;for(;(s=Ot[It.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||s.index+s[0].length!==r.index+r[0].length)&&(r=s),Ot[It.COERCERTL].lastIndex=s.index+s[1].length+s[2].length;Ot[It.COERCERTL].lastIndex=-1}return r===null?null:_h(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};Zi.exports=Th});var tn=x((zp,en)=>{"use strict";en.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var sn=x((Wp,rn)=>{"use strict";rn.exports=G;G.Node=Ne;G.create=G;function G(t){var e=this;if(e instanceof G||(e=new G),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)e.push(arguments[r]);return e}G.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};G.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};G.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};G.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)Ch(this,arguments[t]);return this.length};G.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Sh(this,arguments[t]);return this.length};G.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};G.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};G.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,s=0;r!==null;s++)t.call(e,r.value,s,this),r=r.next};G.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,s=this.length-1;r!==null;s--)t.call(e,r.value,s,this),r=r.prev};G.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};G.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};G.prototype.map=function(t,e){e=e||this;for(var r=new G,s=this.head;s!==null;)r.push(t.call(e,s.value,this)),s=s.next;return r};G.prototype.mapReverse=function(t,e){e=e||this;for(var r=new G,s=this.tail;s!==null;)r.push(t.call(e,s.value,this)),s=s.prev;return r};G.prototype.reduce=function(t,e){var r,s=this.head;if(arguments.length>1)r=e;else if(this.head)s=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;s!==null;i++)r=t(r,s.value,i),s=s.next;return r};G.prototype.reduceReverse=function(t,e){var r,s=this.tail;if(arguments.length>1)r=e;else if(this.tail)s=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;s!==null;i--)r=t(r,s.value,i),s=s.prev;return r};G.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};G.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};G.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new G;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=0,i=this.head;i!==null&&s<t;s++)i=i.next;for(;i!==null&&s<e;s++,i=i.next)r.push(i.value);return r};G.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new G;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=this.length,i=this.tail;i!==null&&s>e;s--)i=i.prev;for(;i!==null&&s>t;s--,i=i.prev)r.push(i.value);return r};G.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,i=this.head;i!==null&&s<t;s++)i=i.next;for(var n=[],s=0;i&&s<e;s++)n.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var s=0;s<r.length;s++)i=bh(this,i,r[s]);return n};G.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=e,this.tail=t,this};function bh(t,e,r){var s=e===t.head?new Ne(r,null,e,t):new Ne(r,e,e.next,t);return s.next===null&&(t.tail=s),s.prev===null&&(t.head=s),t.length++,s}function Ch(t,e){t.tail=new Ne(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Sh(t,e){t.head=new Ne(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Ne(t,e,r,s){if(!(this instanceof Ne))return new Ne(t,e,r,s);this.list=s,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{tn()(G)}catch{}});var hn=x((kp,ln)=>{"use strict";var $h=sn(),Le=Symbol("max"),ye=Symbol("length"),je=Symbol("lengthCalculator"),ht=Symbol("allowStale"),He=Symbol("maxAge"),xe=Symbol("dispose"),nn=Symbol("noDisposeOnSet"),te=Symbol("lruList"),pe=Symbol("cache"),an=Symbol("updateAgeOnGet"),xr=()=>1,wr=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 r=this[Le]=e.max||1/0,s=e.length||xr;if(this[je]=typeof s!="function"?xr:s,this[ht]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[He]=e.maxAge||0,this[xe]=e.dispose,this[nn]=e.noDisposeOnSet||!1,this[an]=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[Le]=e||1/0,lt(this)}get max(){return this[Le]}set allowStale(e){this[ht]=!!e}get allowStale(){return this[ht]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[He]=e,lt(this)}get maxAge(){return this[He]}set lengthCalculator(e){typeof e!="function"&&(e=xr),e!==this[je]&&(this[je]=e,this[ye]=0,this[te].forEach(r=>{r.length=this[je](r.value,r.key),this[ye]+=r.length})),lt(this)}get lengthCalculator(){return this[je]}get length(){return this[ye]}get itemCount(){return this[te].length}rforEach(e,r){r=r||this;for(let s=this[te].tail;s!==null;){let i=s.prev;on(this,e,s,r),s=i}}forEach(e,r){r=r||this;for(let s=this[te].head;s!==null;){let i=s.next;on(this,e,s,r),s=i}}keys(){return this[te].toArray().map(e=>e.key)}values(){return this[te].toArray().map(e=>e.value)}reset(){this[xe]&&this[te]&&this[te].length&&this[te].forEach(e=>this[xe](e.key,e.value)),this[pe]=new Map,this[te]=new $h,this[ye]=0}dump(){return this[te].map(e=>Nt(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[te]}set(e,r,s){if(s=s||this[He],s&&typeof s!="number")throw new TypeError("maxAge must be a number");let i=s?Date.now():0,n=this[je](r,e);if(this[pe].has(e)){if(n>this[Le])return ze(this,this[pe].get(e)),!1;let l=this[pe].get(e).value;return this[xe]&&(this[nn]||this[xe](e,l.value)),l.now=i,l.maxAge=s,l.value=r,this[ye]+=n-l.length,l.length=n,this.get(e),lt(this),!0}let o=new _r(e,r,n,i,s);return o.length>this[Le]?(this[xe]&&this[xe](e,r),!1):(this[ye]+=o.length,this[te].unshift(o),this[pe].set(e,this[te].head),lt(this),!0)}has(e){if(!this[pe].has(e))return!1;let r=this[pe].get(e).value;return!Nt(this,r)}get(e){return yr(this,e,!0)}peek(e){return yr(this,e,!1)}pop(){let e=this[te].tail;return e?(ze(this,e),e.value):null}del(e){ze(this,this[pe].get(e))}load(e){this.reset();let r=Date.now();for(let s=e.length-1;s>=0;s--){let i=e[s],n=i.e||0;if(n===0)this.set(i.k,i.v);else{let o=n-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[pe].forEach((e,r)=>yr(this,r,!1))}},yr=(t,e,r)=>{let s=t[pe].get(e);if(s){let i=s.value;if(Nt(t,i)){if(ze(t,s),!t[ht])return}else r&&(t[an]&&(s.value.now=Date.now()),t[te].unshiftNode(s));return i.value}},Nt=(t,e)=>{if(!e||!e.maxAge&&!t[He])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[He]&&r>t[He]},lt=t=>{if(t[ye]>t[Le])for(let e=t[te].tail;t[ye]>t[Le]&&e!==null;){let r=e.prev;ze(t,e),e=r}},ze=(t,e)=>{if(e){let r=e.value;t[xe]&&t[xe](r.key,r.value),t[ye]-=r.length,t[pe].delete(r.key),t[te].removeNode(e)}},_r=class{constructor(e,r,s,i,n){this.key=e,this.value=r,this.length=s,this.now=i,this.maxAge=n||0}},on=(t,e,r,s)=>{let i=r.value;Nt(t,i)&&(ze(t,r),t[ht]||(i=void 0)),i&&e.call(s,i.value,i.key,t)};ln.exports=wr});var ce=x((Vp,pn)=>{var Tr=class t{constructor(e,r){if(r=Oh(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof br)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.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(i=>!un(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&Dh(i[0])){this.set=[i];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}`,i=cn.get(s);if(i)return i;let n=this.options.loose,o=n?oe[ie.HYPHENRANGELOOSE]:oe[ie.HYPHENRANGE];e=e.replace(o,Wh(this.options.includePrerelease)),K("hyphen replace",e),e=e.replace(oe[ie.COMPARATORTRIM],Nh),K("comparator trim",e),e=e.replace(oe[ie.TILDETRIM],Lh),e=e.replace(oe[ie.CARETTRIM],Hh),e=e.split(/\s+/).join(" ");let a=e.split(" ").map(u=>Ph(u,this.options)).join(" ").split(/\s+/).map(u=>zh(u,this.options));n&&(a=a.filter(u=>(K("loose invalid filter",u,this.options),!!u.match(oe[ie.COMPARATORLOOSE])))),K("range list",a);let l=new Map,h=a.map(u=>new br(u,this.options));for(let u of h){if(un(u))return[u];l.set(u.value,u)}l.size>1&&l.has("")&&l.delete("");let p=[...l.values()];return cn.set(s,p),p}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>fn(s,r)&&e.set.some(i=>fn(i,r)&&s.every(n=>i.every(o=>n.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Ih(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(kh(this.set[r],e,this.options))return!0;return!1}};pn.exports=Tr;var vh=hn(),cn=new vh({max:1e3}),Oh=ot(),br=ct(),K=nt(),Ih=re(),{re:oe,t:ie,comparatorTrimReplace:Nh,tildeTrimReplace:Lh,caretTrimReplace:Hh}=Oe(),un=t=>t.value==="<0.0.0-0",Dh=t=>t.value==="",fn=(t,e)=>{let r=!0,s=t.slice(),i=s.pop();for(;r&&s.length;)r=s.every(n=>i.intersects(n,e)),i=s.pop();return r},Ph=(t,e)=>(K("comp",t,e),t=Fh(t,e),K("caret",t),t=Uh(t,e),K("tildes",t),t=Bh(t,e),K("xrange",t),t=jh(t,e),K("stars",t),t),ne=t=>!t||t.toLowerCase()==="x"||t==="*",Uh=(t,e)=>t.trim().split(/\s+/).map(r=>Mh(r,e)).join(" "),Mh=(t,e)=>{let r=e.loose?oe[ie.TILDELOOSE]:oe[ie.TILDE];return t.replace(r,(s,i,n,o,a)=>{K("tilde",t,s,i,n,o,a);let l;return ne(i)?l="":ne(n)?l=`>=${i}.0.0 <${+i+1}.0.0-0`:ne(o)?l=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:a?(K("replaceTilde pr",a),l=`>=${i}.${n}.${o}-${a} <${i}.${+n+1}.0-0`):l=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,K("tilde return",l),l})},Fh=(t,e)=>t.trim().split(/\s+/).map(r=>qh(r,e)).join(" "),qh=(t,e)=>{K("caret",t,e);let r=e.loose?oe[ie.CARETLOOSE]:oe[ie.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(i,n,o,a,l)=>{K("caret",t,i,n,o,a,l);let h;return ne(n)?h="":ne(o)?h=`>=${n}.0.0${s} <${+n+1}.0.0-0`:ne(a)?n==="0"?h=`>=${n}.${o}.0${s} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.0${s} <${+n+1}.0.0-0`:l?(K("replaceCaret pr",l),n==="0"?o==="0"?h=`>=${n}.${o}.${a}-${l} <${n}.${o}.${+a+1}-0`:h=`>=${n}.${o}.${a}-${l} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.${a}-${l} <${+n+1}.0.0-0`):(K("no pr"),n==="0"?o==="0"?h=`>=${n}.${o}.${a}${s} <${n}.${o}.${+a+1}-0`:h=`>=${n}.${o}.${a}${s} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.${a} <${+n+1}.0.0-0`),K("caret return",h),h})},Bh=(t,e)=>(K("replaceXRanges",t,e),t.split(/\s+/).map(r=>Gh(r,e)).join(" ")),Gh=(t,e)=>{t=t.trim();let r=e.loose?oe[ie.XRANGELOOSE]:oe[ie.XRANGE];return t.replace(r,(s,i,n,o,a,l)=>{K("xRange",t,s,i,n,o,a,l);let h=ne(n),p=h||ne(o),u=p||ne(a),c=u;return i==="="&&c&&(i=""),l=e.includePrerelease?"-0":"",h?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&c?(p&&(o=0),a=0,i===">"?(i=">=",p?(n=+n+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",p?n=+n+1:o=+o+1),i==="<"&&(l="-0"),s=`${i+n}.${o}.${a}${l}`):p?s=`>=${n}.0.0${l} <${+n+1}.0.0-0`:u&&(s=`>=${n}.${o}.0${l} <${n}.${+o+1}.0-0`),K("xRange return",s),s})},jh=(t,e)=>(K("replaceStars",t,e),t.trim().replace(oe[ie.STAR],"")),zh=(t,e)=>(K("replaceGTE0",t,e),t.trim().replace(oe[e.includePrerelease?ie.GTE0PRE:ie.GTE0],"")),Wh=t=>(e,r,s,i,n,o,a,l,h,p,u,c,f)=>(ne(s)?r="":ne(i)?r=`>=${s}.0.0${t?"-0":""}`:ne(n)?r=`>=${s}.${i}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,ne(h)?l="":ne(p)?l=`<${+h+1}.0.0-0`:ne(u)?l=`<${h}.${+p+1}.0-0`:c?l=`<=${h}.${p}.${u}-${c}`:t?l=`<${h}.${p}.${+u+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),kh=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(K(t[s].semver),t[s].semver!==br.ANY&&t[s].semver.prerelease.length>0){let i=t[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var ct=x((Kp,An)=>{var ut=Symbol("SemVer ANY"),$r=class t{static get ANY(){return ut}constructor(e,r){if(r=Vh(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}Sr("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===ut?this.value="":this.value=this.operator+this.semver.version,Sr("comp",this)}parse(e){let r=this.options.loose?dn[mn.COMPARATORLOOSE]:dn[mn.COMPARATOR],s=e.match(r);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 gn(s[2],this.options.loose):this.semver=ut}toString(){return this.value}test(e){if(Sr("Comparator.test",e,this.options.loose),this.semver===ut||e===ut)return!0;if(typeof e=="string")try{e=new gn(e,this.options)}catch{return!1}return Cr(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new En(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new En(this.value,r).test(e.semver);let s=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),n=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=Cr(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=Cr(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return s||i||n&&o||a||l}};An.exports=$r;var Vh=ot(),{re:dn,t:mn}=Oe(),Cr=Rr(),Sr=nt(),gn=re(),En=ce()});var ft=x((Xp,Rn)=>{var Kh=ce(),Xh=(t,e,r)=>{try{e=new Kh(e,r)}catch{return!1}return e.test(t)};Rn.exports=Xh});var yn=x((Yp,xn)=>{var Yh=ce(),Qh=(t,e)=>new Yh(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));xn.exports=Qh});var _n=x((Qp,wn)=>{var Zh=re(),Jh=ce(),ec=(t,e,r)=>{let s=null,i=null,n=null;try{n=new Jh(e,r)}catch{return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===-1)&&(s=o,i=new Zh(s,r))}),s};wn.exports=ec});var bn=x((Zp,Tn)=>{var tc=re(),rc=ce(),sc=(t,e,r)=>{let s=null,i=null,n=null;try{n=new rc(e,r)}catch{return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===1)&&(s=o,i=new tc(s,r))}),s};Tn.exports=sc});var $n=x((Jp,Sn)=>{var vr=re(),ic=ce(),Cn=at(),nc=(t,e)=>{t=new ic(t,e);let r=new vr("0.0.0");if(t.test(r)||(r=new vr("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let i=t.set[s],n=null;i.forEach(o=>{let a=new vr(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!n||Cn(a,n))&&(n=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!r||Cn(r,n))&&(r=n)}return r&&t.test(r)?r:null};Sn.exports=nc});var On=x((ed,vn)=>{var oc=ce(),ac=(t,e)=>{try{return new oc(t,e).range||"*"}catch{return null}};vn.exports=ac});var Lt=x((td,Hn)=>{var lc=re(),Ln=ct(),{ANY:hc}=Ln,cc=ce(),uc=ft(),In=at(),Nn=St(),fc=vt(),pc=$t(),dc=(t,e,r,s)=>{t=new lc(t,s),e=new cc(e,s);let i,n,o,a,l;switch(r){case">":i=In,n=fc,o=Nn,a=">",l=">=";break;case"<":i=Nn,n=pc,o=In,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(uc(t,e,s))return!1;for(let h=0;h<e.set.length;++h){let p=e.set[h],u=null,c=null;if(p.forEach(f=>{f.semver===hc&&(f=new Ln(">=0.0.0")),u=u||f,c=c||f,i(f.semver,u.semver,s)?u=f:o(f.semver,c.semver,s)&&(c=f)}),u.operator===a||u.operator===l||(!c.operator||c.operator===a)&&n(t,c.semver))return!1;if(c.operator===l&&o(t,c.semver))return!1}return!0};Hn.exports=dc});var Pn=x((rd,Dn)=>{var mc=Lt(),gc=(t,e,r)=>mc(t,e,">",r);Dn.exports=gc});var Mn=x((sd,Un)=>{var Ec=Lt(),Ac=(t,e,r)=>Ec(t,e,"<",r);Un.exports=Ac});var Bn=x((id,qn)=>{var Fn=ce(),Rc=(t,e,r)=>(t=new Fn(t,r),e=new Fn(e,r),t.intersects(e));qn.exports=Rc});var jn=x((nd,Gn)=>{var xc=ft(),yc=he();Gn.exports=(t,e,r)=>{let s=[],i=null,n=null,o=t.sort((p,u)=>yc(p,u,r));for(let p of o)xc(p,e,r)?(n=p,i||(i=p)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[p,u]of s)p===u?a.push(p):!u&&p===o[0]?a.push("*"):u?p===o[0]?a.push(`<=${u}`):a.push(`${p} - ${u}`):a.push(`>=${p}`);let l=a.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return l.length<h.length?l:e}});var Kn=x((od,Vn)=>{var zn=ce(),Ht=ct(),{ANY:Or}=Ht,pt=ft(),Ir=he(),wc=(t,e,r={})=>{if(t===e)return!0;t=new zn(t,r),e=new zn(e,r);let s=!1;e:for(let i of t.set){for(let n of e.set){let o=_c(i,n,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},_c=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Or){if(e.length===1&&e[0].semver===Or)return!0;r.includePrerelease?t=[new Ht(">=0.0.0-0")]:t=[new Ht(">=0.0.0")]}if(e.length===1&&e[0].semver===Or){if(r.includePrerelease)return!0;e=[new Ht(">=0.0.0")]}let s=new Set,i,n;for(let f of t)f.operator===">"||f.operator===">="?i=Wn(i,f,r):f.operator==="<"||f.operator==="<="?n=kn(n,f,r):s.add(f.semver);if(s.size>1)return null;let o;if(i&&n){if(o=Ir(i.semver,n.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let f of s){if(i&&!pt(f,String(i),r)||n&&!pt(f,String(n),r))return null;for(let A of e)if(!pt(f,String(A),r))return!1;return!0}let a,l,h,p,u=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,c=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;u&&u.prerelease.length===1&&n.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(let f of e){if(p=p||f.operator===">"||f.operator===">=",h=h||f.operator==="<"||f.operator==="<=",i){if(c&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===c.major&&f.semver.minor===c.minor&&f.semver.patch===c.patch&&(c=!1),f.operator===">"||f.operator===">="){if(a=Wn(i,f,r),a===f&&a!==i)return!1}else if(i.operator===">="&&!pt(i.semver,String(f),r))return!1}if(n){if(u&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===u.major&&f.semver.minor===u.minor&&f.semver.patch===u.patch&&(u=!1),f.operator==="<"||f.operator==="<="){if(l=kn(n,f,r),l===f&&l!==n)return!1}else if(n.operator==="<="&&!pt(n.semver,String(f),r))return!1}if(!f.operator&&(n||i)&&o!==0)return!1}return!(i&&h&&!n&&o!==0||n&&p&&!i&&o!==0||c||u)},Wn=(t,e,r)=>{if(!t)return e;let s=Ir(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},kn=(t,e,r)=>{if(!t)return e;let s=Ir(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Vn.exports=wc});var Qn=x((ad,Yn)=>{var Nr=Oe(),Tc=it(),bc=re(),Xn=gr(),Cc=Ie(),Sc=gi(),$c=Ai(),vc=yi(),Oc=Si(),Ic=vi(),Nc=Ii(),Lc=Li(),Hc=Di(),Dc=he(),Pc=Ui(),Uc=Fi(),Mc=Ct(),Fc=ji(),qc=Wi(),Bc=at(),Gc=St(),jc=bt(),zc=Ar(),Wc=$t(),kc=vt(),Vc=Rr(),Kc=Ji(),Xc=ct(),Yc=ce(),Qc=ft(),Zc=yn(),Jc=_n(),eu=bn(),tu=$n(),ru=On(),su=Lt(),iu=Pn(),nu=Mn(),ou=Bn(),au=jn(),lu=Kn();Yn.exports={parse:Cc,valid:Sc,clean:$c,inc:vc,diff:Oc,major:Ic,minor:Nc,patch:Lc,prerelease:Hc,compare:Dc,rcompare:Pc,compareLoose:Uc,compareBuild:Mc,sort:Fc,rsort:qc,gt:Bc,lt:Gc,eq:jc,neq:zc,gte:Wc,lte:kc,cmp:Vc,coerce:Kc,Comparator:Xc,Range:Yc,satisfies:Qc,toComparators:Zc,maxSatisfying:Jc,minSatisfying:eu,minVersion:tu,validRange:ru,outside:su,gtr:iu,ltr:nu,intersects:ou,simplifyRange:au,subset:lu,SemVer:bc,re:Nr.re,src:Nr.src,tokens:Nr.t,SEMVER_SPEC_VERSION:Tc.SEMVER_SPEC_VERSION,compareIdentifiers:Xn.compareIdentifiers,rcompareIdentifiers:Xn.rcompareIdentifiers}});var ro=x((ld,to)=>{to.exports=function(t,e){e||(e={});var r=e.hsep===void 0?" ":e.hsep,s=e.align||[],i=e.stringLength||function(l){return String(l).length},n=Jn(t,function(l,h){return eo(h,function(p,u){var c=Zn(p);(!l[u]||c>l[u])&&(l[u]=c)}),l},[]),o=Dt(t,function(l){return Dt(l,function(h,p){var u=String(h);if(s[p]==="."){var c=Zn(u),f=n[p]+(/\./.test(u)?1:2)-(i(u)-c);return u+Array(f).join(" ")}else return u})}),a=Jn(o,function(l,h){return eo(h,function(p,u){var c=i(p);(!l[u]||c>l[u])&&(l[u]=c)}),l},[]);return Dt(o,function(l){return Dt(l,function(h,p){var u=a[p]-i(h)||0,c=Array(Math.max(u+1,1)).join(" ");return s[p]==="r"||s[p]==="."?c+h:s[p]==="c"?Array(Math.ceil(u/2+1)).join(" ")+h+Array(Math.floor(u/2+1)).join(" "):h+c}).join(r).replace(/\s+$/,"")}).join(`
|
|
9
|
+
`)};function Zn(t){var e=/\.[^.]*$/.exec(t);return e?e.index+1:t.length}function Jn(t,e,r){if(t.reduce)return t.reduce(e,r);for(var s=0,i=arguments.length>=3?r:t[s++];s<t.length;s++)e(i,t[s],s);return i}function eo(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e.call(t,t[r],r)}function Dt(t,e){if(t.map)return t.map(e);for(var r=[],s=0;s<t.length;s++)r.push(e.call(t,t[s],s));return r}});var ao=x(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.LRUCache=void 0;var We=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,io=new Set,Lr=typeof process=="object"&&process?process:{},no=(t,e,r,s)=>{typeof Lr.emitWarning=="function"?Lr.emitWarning(t,e,r,s):console.error(`[${r}] ${e}: ${t}`)},Pt=globalThis.AbortController,so=globalThis.AbortSignal;if(typeof Pt>"u"){so=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,i){this._onabort.push(i)}},Pt=class{constructor(){e()}signal=new so;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let i of this.signal._onabort)i(s);this.signal.onabort?.(s)}}};let t=Lr.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,no("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var hu=t=>!io.has(t),ud=Symbol("type"),Ce=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),oo=t=>Ce(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ke:null:null,ke=class extends Array{constructor(e){super(e),this.fill(0)}},Hr=class t{heap;length;static#s=!1;static create(e){let r=oo(e);if(!r)return[];t.#s=!0;let s=new t(e,r);return t.#s=!1,s}constructor(e,r){if(!t.#s)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Dr=class t{#s;#r;#e;#f;#T;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#m;#i;#n;#t;#h;#p;#c;#l;#A;#u;#R;#x;#g;#y;#C;#d;static unsafeExposeInternals(e){return{starts:e.#x,ttls:e.#g,sizes:e.#R,keyMap:e.#i,keyList:e.#n,valList:e.#t,next:e.#h,prev:e.#p,get head(){return e.#c},get tail(){return e.#l},free:e.#A,isBackgroundFetch:r=>e.#o(r),backgroundFetch:(r,s,i,n)=>e.#N(r,s,i,n),moveToTail:r=>e.#v(r),indexes:r=>e.#w(r),rindexes:r=>e.#_(r),isStale:r=>e.#E(r)}}get max(){return this.#s}get maxSize(){return this.#r}get calculatedSize(){return this.#m}get size(){return this.#a}get fetchMethod(){return this.#T}get dispose(){return this.#e}get disposeAfter(){return this.#f}constructor(e){let{max:r=0,ttl:s,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:h,disposeAfter:p,noDisposeOnSet:u,noUpdateTTL:c,maxSize:f=0,maxEntrySize:A=0,sizeCalculation:g,fetchMethod:I,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:N,allowStaleOnFetchAbort:y,ignoreFetchAbort:C}=e;if(r!==0&&!Ce(r))throw new TypeError("max option must be a nonnegative integer");let L=r?oo(r):Array;if(!L)throw new Error("invalid max value: "+r);if(this.#s=r,this.#r=f,this.maxEntrySize=A||this.#r,this.sizeCalculation=g,this.sizeCalculation){if(!this.#r&&!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(I!==void 0&&typeof I!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#T=I,this.#C=!!I,this.#i=new Map,this.#n=new Array(r).fill(void 0),this.#t=new Array(r).fill(void 0),this.#h=new L(r),this.#p=new L(r),this.#c=0,this.#l=0,this.#A=Hr.create(r),this.#a=0,this.#m=0,typeof h=="function"&&(this.#e=h),typeof p=="function"?(this.#f=p,this.#u=[]):(this.#f=void 0,this.#u=void 0),this.#y=!!this.#e,this.#d=!!this.#f,this.noDisposeOnSet=!!u,this.noUpdateTTL=!!c,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!N,this.allowStaleOnFetchAbort=!!y,this.ignoreFetchAbort=!!C,this.maxEntrySize!==0){if(this.#r!==0&&!Ce(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Ce(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#M()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=Ce(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!Ce(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#s===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#s&&!this.#r){let $="LRU_CACHE_UNBOUNDED";hu($)&&(io.add($),no("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",$,t))}}getRemainingTTL(e){return this.#i.has(e)?1/0:0}#L(){let e=new ke(this.#s),r=new ke(this.#s);this.#g=e,this.#x=r,this.#H=(n,o,a=We.now())=>{if(r[n]=o!==0?a:0,e[n]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#E(n)&&this.delete(this.#n[n])},o+1);l.unref&&l.unref()}},this.#S=n=>{r[n]=e[n]!==0?We.now():0},this.#b=(n,o)=>{if(e[o]){let a=e[o],l=r[o];if(!a||!l)return;n.ttl=a,n.start=l,n.now=s||i();let h=n.now-l;n.remainingTTL=a-h}};let s=0,i=()=>{let n=We.now();if(this.ttlResolution>0){s=n;let o=setTimeout(()=>s=0,this.ttlResolution);o.unref&&o.unref()}return n};this.getRemainingTTL=n=>{let o=this.#i.get(n);if(o===void 0)return 0;let a=e[o],l=r[o];if(!a||!l)return 1/0;let h=(s||i())-l;return a-h},this.#E=n=>{let o=r[n],a=e[n];return!!a&&!!o&&(s||i())-o>a}}#S=()=>{};#b=()=>{};#H=()=>{};#E=()=>!1;#M(){let e=new ke(this.#s);this.#m=0,this.#R=e,this.#$=r=>{this.#m-=e[r],e[r]=0},this.#D=(r,s,i,n)=>{if(this.#o(s))return 0;if(!Ce(i))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(i=n(s,r),!Ce(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.#O=(r,s,i)=>{if(e[r]=s,this.#r){let n=this.#r-e[r];for(;this.#m>n;)this.#I(!0)}this.#m+=e[r],i&&(i.entrySize=s,i.totalCalculatedSize=this.#m)}}#$=e=>{};#O=(e,r,s)=>{};#D=(e,r,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#w({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#l;!(!this.#P(r)||((e||!this.#E(r))&&(yield r),r===this.#c));)r=this.#p[r]}*#_({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#c;!(!this.#P(r)||((e||!this.#E(r))&&(yield r),r===this.#l));)r=this.#h[r]}#P(e){return e!==void 0&&this.#i.get(this.#n[e])===e}*entries(){for(let e of this.#w())this.#t[e]!==void 0&&this.#n[e]!==void 0&&!this.#o(this.#t[e])&&(yield[this.#n[e],this.#t[e]])}*rentries(){for(let e of this.#_())this.#t[e]!==void 0&&this.#n[e]!==void 0&&!this.#o(this.#t[e])&&(yield[this.#n[e],this.#t[e]])}*keys(){for(let e of this.#w()){let r=this.#n[e];r!==void 0&&!this.#o(this.#t[e])&&(yield r)}}*rkeys(){for(let e of this.#_()){let r=this.#n[e];r!==void 0&&!this.#o(this.#t[e])&&(yield r)}}*values(){for(let e of this.#w())this.#t[e]!==void 0&&!this.#o(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#_())this.#t[e]!==void 0&&!this.#o(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}find(e,r={}){for(let s of this.#w()){let i=this.#t[s],n=this.#o(i)?i.__staleWhileFetching:i;if(n!==void 0&&e(n,this.#n[s],this))return this.get(this.#n[s],r)}}forEach(e,r=this){for(let s of this.#w()){let i=this.#t[s],n=this.#o(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.#n[s],this)}}rforEach(e,r=this){for(let s of this.#_()){let i=this.#t[s],n=this.#o(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.#n[s],this)}}purgeStale(){let e=!1;for(let r of this.#_({allowStale:!0}))this.#E(r)&&(this.delete(this.#n[r]),e=!0);return e}info(e){let r=this.#i.get(e);if(r===void 0)return;let s=this.#t[r],i=this.#o(s)?s.__staleWhileFetching:s;if(i===void 0)return;let n={value:i};if(this.#g&&this.#x){let o=this.#g[r],a=this.#x[r];if(o&&a){let l=o-(We.now()-a);n.ttl=l,n.start=Date.now()}}return this.#R&&(n.size=this.#R[r]),n}dump(){let e=[];for(let r of this.#w({allowStale:!0})){let s=this.#n[r],i=this.#t[r],n=this.#o(i)?i.__staleWhileFetching:i;if(n===void 0||s===void 0)continue;let o={value:n};if(this.#g&&this.#x){o.ttl=this.#g[r];let a=We.now()-this.#x[r];o.start=Math.floor(Date.now()-a)}this.#R&&(o.size=this.#R[r]),e.unshift([s,o])}return e}load(e){this.clear();for(let[r,s]of e){if(s.start){let i=Date.now()-s.start;s.start=We.now()-i}this.set(r,s.value,s)}}set(e,r,s={}){if(r===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=s,{noUpdateTTL:h=this.noUpdateTTL}=s,p=this.#D(e,r,s.size||0,a);if(this.maxEntrySize&&p>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let u=this.#a===0?void 0:this.#i.get(e);if(u===void 0)u=this.#a===0?this.#l:this.#A.length!==0?this.#A.pop():this.#a===this.#s?this.#I(!1):this.#a,this.#n[u]=e,this.#t[u]=r,this.#i.set(e,u),this.#h[this.#l]=u,this.#p[u]=this.#l,this.#l=u,this.#a++,this.#O(u,p,l),l&&(l.set="add"),h=!1;else{this.#v(u);let c=this.#t[u];if(r!==c){if(this.#C&&this.#o(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=c;f!==void 0&&!o&&(this.#y&&this.#e?.(f,e,"set"),this.#d&&this.#u?.push([f,e,"set"]))}else o||(this.#y&&this.#e?.(c,e,"set"),this.#d&&this.#u?.push([c,e,"set"]));if(this.#$(u),this.#O(u,p,l),this.#t[u]=r,l){l.set="replace";let f=c&&this.#o(c)?c.__staleWhileFetching:c;f!==void 0&&(l.oldValue=f)}}else l&&(l.set="update")}if(i!==0&&!this.#g&&this.#L(),this.#g&&(h||this.#H(u,i,n),l&&this.#b(l,u)),!o&&this.#d&&this.#u){let c=this.#u,f;for(;f=c?.shift();)this.#f?.(...f)}return this}pop(){try{for(;this.#a;){let e=this.#t[this.#c];if(this.#I(!0),this.#o(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#d&&this.#u){let e=this.#u,r;for(;r=e?.shift();)this.#f?.(...r)}}}#I(e){let r=this.#c,s=this.#n[r],i=this.#t[r];return this.#C&&this.#o(i)?i.__abortController.abort(new Error("evicted")):(this.#y||this.#d)&&(this.#y&&this.#e?.(i,s,"evict"),this.#d&&this.#u?.push([i,s,"evict"])),this.#$(r),e&&(this.#n[r]=void 0,this.#t[r]=void 0,this.#A.push(r)),this.#a===1?(this.#c=this.#l=0,this.#A.length=0):this.#c=this.#h[r],this.#i.delete(s),this.#a--,r}has(e,r={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=r,n=this.#i.get(e);if(n!==void 0){let o=this.#t[n];if(this.#o(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#E(n))i&&(i.has="stale",this.#b(i,n));else return s&&this.#S(n),i&&(i.has="hit",this.#b(i,n)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){let{allowStale:s=this.allowStale}=r,i=this.#i.get(e);if(i===void 0||!s&&this.#E(i))return;let n=this.#t[i];return this.#o(n)?n.__staleWhileFetching:n}#N(e,r,s,i){let n=r===void 0?void 0:this.#t[r];if(this.#o(n))return n;let o=new Pt,{signal:a}=s;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:s,context:i},h=(g,I=!1)=>{let{aborted:b}=o.signal,S=s.ignoreFetchAbort&&g!==void 0;if(s.status&&(b&&!I?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,S&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),b&&!S&&!I)return u(o.signal.reason);let N=f;return this.#t[r]===f&&(g===void 0?N.__staleWhileFetching?this.#t[r]=N.__staleWhileFetching:this.delete(e):(s.status&&(s.status.fetchUpdated=!0),this.set(e,g,l.options))),g},p=g=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=g),u(g)),u=g=>{let{aborted:I}=o.signal,b=I&&s.allowStaleOnFetchAbort,S=b||s.allowStaleOnFetchRejection,N=S||s.noDeleteOnFetchRejection,y=f;if(this.#t[r]===f&&(!N||y.__staleWhileFetching===void 0?this.delete(e):b||(this.#t[r]=y.__staleWhileFetching)),S)return s.status&&y.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),y.__staleWhileFetching;if(y.__returned===y)throw g},c=(g,I)=>{let b=this.#T?.(e,n,l);b&&b instanceof Promise&&b.then(S=>g(S===void 0?void 0:S),I),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(g(void 0),s.allowStaleOnFetchAbort&&(g=S=>h(S,!0)))})};s.status&&(s.status.fetchDispatched=!0);let f=new Promise(c).then(h,p),A=Object.assign(f,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return r===void 0?(this.set(e,A,{...l.options,status:void 0}),r=this.#i.get(e)):this.#t[r]=A,A}#o(e){if(!this.#C)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Pt}async fetch(e,r={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:p=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:g,forceRefresh:I=!1,status:b,signal:S}=r;if(!this.#C)return b&&(b.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:b});let N={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:h,noUpdateTTL:p,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:A,ignoreFetchAbort:f,status:b,signal:S},y=this.#i.get(e);if(y===void 0){b&&(b.fetch="miss");let C=this.#N(e,y,N,g);return C.__returned=C}else{let C=this.#t[y];if(this.#o(C)){let d=s&&C.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",d&&(b.returnedStale=!0)),d?C.__staleWhileFetching:C.__returned=C}let L=this.#E(y);if(!I&&!L)return b&&(b.fetch="hit"),this.#v(y),i&&this.#S(y),b&&this.#b(b,y),C;let $=this.#N(e,y,N,g),v=$.__staleWhileFetching!==void 0&&s;return b&&(b.fetch=L?"stale":"refresh",v&&L&&(b.returnedStale=!0)),v?$.__staleWhileFetching:$.__returned=$}}get(e,r={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=r,a=this.#i.get(e);if(a!==void 0){let l=this.#t[a],h=this.#o(l);return o&&this.#b(o,a),this.#E(a)?(o&&(o.get="stale"),h?(o&&s&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?l.__staleWhileFetching:void 0):(n||this.delete(e),o&&s&&(o.returnedStale=!0),s?l:void 0)):(o&&(o.get="hit"),h?l.__staleWhileFetching:(this.#v(a),i&&this.#S(a),l))}else o&&(o.get="miss")}#U(e,r){this.#p[r]=e,this.#h[e]=r}#v(e){e!==this.#l&&(e===this.#c?this.#c=this.#h[e]:this.#U(this.#p[e],this.#h[e]),this.#U(this.#l,e),this.#l=e)}delete(e){let r=!1;if(this.#a!==0){let s=this.#i.get(e);if(s!==void 0)if(r=!0,this.#a===1)this.clear();else{this.#$(s);let i=this.#t[s];if(this.#o(i)?i.__abortController.abort(new Error("deleted")):(this.#y||this.#d)&&(this.#y&&this.#e?.(i,e,"delete"),this.#d&&this.#u?.push([i,e,"delete"])),this.#i.delete(e),this.#n[s]=void 0,this.#t[s]=void 0,s===this.#l)this.#l=this.#p[s];else if(s===this.#c)this.#c=this.#h[s];else{let n=this.#p[s];this.#h[n]=this.#h[s];let o=this.#h[s];this.#p[o]=this.#p[s]}this.#a--,this.#A.push(s)}}if(this.#d&&this.#u?.length){let s=this.#u,i;for(;i=s?.shift();)this.#f?.(...i)}return r}clear(){for(let e of this.#_({allowStale:!0})){let r=this.#t[e];if(this.#o(r))r.__abortController.abort(new Error("deleted"));else{let s=this.#n[e];this.#y&&this.#e?.(r,s,"delete"),this.#d&&this.#u?.push([r,s,"delete"])}}if(this.#i.clear(),this.#t.fill(void 0),this.#n.fill(void 0),this.#g&&this.#x&&(this.#g.fill(0),this.#x.fill(0)),this.#R&&this.#R.fill(0),this.#c=0,this.#l=0,this.#A.length=0,this.#m=0,this.#a=0,this.#d&&this.#u){let e=this.#u,r;for(;r=e?.shift();)this.#f?.(...r)}}};Ut.LRUCache=Dr});var co=x((pd,ho)=>{"use strict";var j=(...t)=>t.every(e=>e)?t.join(""):"",Z=t=>t?encodeURIComponent(t):"",lo=t=>t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),cu={sshtemplate:({domain:t,user:e,project:r,committish:s})=>`git@${t}:${e}/${r}.git${j("#",s)}`,sshurltemplate:({domain:t,user:e,project:r,committish:s})=>`git+ssh://git@${t}/${e}/${r}.git${j("#",s)}`,edittemplate:({domain:t,user:e,project:r,committish:s,editpath:i,path:n})=>`https://${t}/${e}/${r}${j("/",i,"/",Z(s||"HEAD"),"/",n)}`,browsetemplate:({domain:t,user:e,project:r,committish:s,treepath:i})=>`https://${t}/${e}/${r}${j("/",i,"/",Z(s))}`,browsetreetemplate:({domain:t,user:e,project:r,committish:s,treepath:i,path:n,fragment:o,hashformat:a})=>`https://${t}/${e}/${r}/${i}/${Z(s||"HEAD")}/${n}${j("#",a(o||""))}`,browseblobtemplate:({domain:t,user:e,project:r,committish:s,blobpath:i,path:n,fragment:o,hashformat:a})=>`https://${t}/${e}/${r}/${i}/${Z(s||"HEAD")}/${n}${j("#",a(o||""))}`,docstemplate:({domain:t,user:e,project:r,treepath:s,committish:i})=>`https://${t}/${e}/${r}${j("/",s,"/",Z(i))}#readme`,httpstemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git+https://${j(t,"@")}${e}/${r}/${s}.git${j("#",i)}`,filetemplate:({domain:t,user:e,project:r,committish:s,path:i})=>`https://${t}/${e}/${r}/raw/${Z(s||"HEAD")}/${i}`,shortcuttemplate:({type:t,user:e,project:r,committish:s})=>`${t}:${e}/${r}${j("#",s)}`,pathtemplate:({user:t,project:e,committish:r})=>`${t}/${e}${j("#",r)}`,bugstemplate:({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,hashformat:lo},Se={};Se.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:t,user:e,project:r,committish:s,path:i})=>`https://${j(t,"@")}raw.githubusercontent.com/${e}/${r}/${Z(s||"HEAD")}/${i}`,gittemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git://${j(t,"@")}${e}/${r}/${s}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://codeload.${t}/${e}/${r}/tar.gz/${Z(s||"HEAD")}`,extract:t=>{let[,e,r,s,i]=t.pathname.split("/",5);if(!(s&&s!=="tree")&&(s||(i=t.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:i}}};Se.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:t,user:e,project:r,committish:s,treepath:i,path:n,editpath:o})=>`https://${t}/${e}/${r}${j("/",i,"/",Z(s||"HEAD"),"/",n,o)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/get/${Z(s||"HEAD")}.tar.gz`,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(!["get"].includes(s)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};Se.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git+https://${j(t,"@")}${e}/${r}/${s}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${Z(s||"HEAD")}`,extract:t=>{let e=t.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let r=e.split("/"),s=r.pop();s.endsWith(".git")&&(s=s.slice(0,-4));let i=r.join("/");if(!(!i||!s))return{user:i,project:s,committish:t.hash.slice(1)}}};Se.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:t,project:e,committish:r})=>`git@${t}:${e}.git${j("#",r)}`,sshurltemplate:({domain:t,project:e,committish:r})=>`git+ssh://git@${t}/${e}.git${j("#",r)}`,edittemplate:({domain:t,user:e,project:r,committish:s,editpath:i})=>`https://${t}/${e}/${r}${j("/",Z(s))}/${i}`,browsetemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",Z(r))}`,browsetreetemplate:({domain:t,project:e,committish:r,path:s,hashformat:i})=>`https://${t}/${e}${j("/",Z(r))}${j("#",i(s))}`,browseblobtemplate:({domain:t,project:e,committish:r,path:s,hashformat:i})=>`https://${t}/${e}${j("/",Z(r))}${j("#",i(s))}`,docstemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",Z(r))}`,httpstemplate:({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${j("#",r)}`,filetemplate:({user:t,project:e,committish:r,path:s})=>`https://gist.githubusercontent.com/${t}/${e}/raw${j("/",Z(r))}/${s}`,shortcuttemplate:({type:t,project:e,committish:r})=>`${t}:${e}${j("#",r)}`,pathtemplate:({project:t,committish:e})=>`${t}${j("#",e)}`,bugstemplate:({domain:t,project:e})=>`https://${t}/${e}`,gittemplate:({domain:t,project:e,committish:r})=>`git://${t}/${e}.git${j("#",r)}`,tarballtemplate:({project:t,committish:e})=>`https://codeload.github.com/gist/${t}/tar.gz/${Z(e||"HEAD")}`,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(s!=="raw"){if(!r){if(!e)return;r=e,e=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:e,project:r,committish:t.hash.slice(1)}}},hashformat:function(t){return t&&"file-"+lo(t)}};Se.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:t,user:e,project:r,committish:s,path:i})=>`https://${t}/${e}/${r}/blob/${Z(s)||"HEAD"}/${i}`,httpstemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}.git${j("#",s)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/archive/${Z(s)||"HEAD"}.tar.gz`,bugstemplate:({user:t,project:e})=>null,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(!["archive"].includes(s)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};for(let[t,e]of Object.entries(Se))Se[t]=Object.assign({},cu,e);ho.exports=Se});var Ur=x((dd,fo)=>{var uu=me("url"),Pr=(t,e,r)=>{let s=t.indexOf(r);return t.lastIndexOf(e,s>-1?s:1/0)},uo=t=>{try{return new uu.URL(t)}catch{}},fu=(t,e)=>{let r=t.indexOf(":"),s=t.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(e,s))return t;let i=t.indexOf("@");return i>-1?i>r?`git+ssh://${t}`:t:t.indexOf("//")===r+1?t:`${t.slice(0,r+1)}//${t.slice(r+1)}`},pu=t=>{let e=Pr(t,"@","#"),r=Pr(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),Pr(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t};fo.exports=(t,e)=>{let r=e?fu(t,e):t;return uo(r)||uo(pu(r))}});var mo=x((md,po)=>{"use strict";var du=Ur(),mu=t=>{let e=t.indexOf("#"),r=t.indexOf("/"),s=t.indexOf("/",r+1),i=t.indexOf(":"),n=/\s/.exec(t),o=t.indexOf("@"),a=!n||e>-1&&n.index>e,l=o===-1||e>-1&&o>e,h=i===-1||e>-1&&i>e,p=s===-1||e>-1&&s>e,u=r>0,c=e>-1?t[e-1]!=="/":!t.endsWith("/"),f=!t.startsWith(".");return a&&u&&c&&f&&l&&h&&p};po.exports=(t,e,{gitHosts:r,protocols:s})=>{if(!t)return;let i=mu(t)?`github:${t}`:t,n=du(i,s);if(!n)return;let o=r.byShortcut[n.protocol],a=r.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],l=o||a;if(!l)return;let h=r[o||a],p=null;s[n.protocol]?.auth&&(n.username||n.password)&&(p=`${n.username}${n.password?":"+n.password:""}`);let u=null,c=null,f=null,A=null;try{if(o){let g=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname,I=g.indexOf("@");I>-1&&(g=g.slice(I+1));let b=g.lastIndexOf("/");b>-1?(c=decodeURIComponent(g.slice(0,b)),c||(c=null),f=decodeURIComponent(g.slice(b+1))):f=decodeURIComponent(g),f.endsWith(".git")&&(f=f.slice(0,-4)),n.hash&&(u=decodeURIComponent(n.hash.slice(1))),A="shortcut"}else{if(!h.protocols.includes(n.protocol))return;let g=h.extract(n);if(!g)return;c=g.user&&decodeURIComponent(g.user),f=decodeURIComponent(g.project),u=decodeURIComponent(g.committish),A=s[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(g){if(g instanceof URIError)return;throw g}return[l,c,p,f,u,A,e]}});var Eo=x((gd,go)=>{"use strict";var{LRUCache:gu}=ao(),Eu=co(),Au=mo(),Ru=Ur(),Mr=new gu({max:1e3}),Mt=class t{constructor(e,r,s,i,n,o,a={}){Object.assign(this,t.#s[e],{type:e,user:r,auth:s,project:i,committish:n,default:o,opts:a})}static#s={byShortcut:{},byDomain:{}};static#r={"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}};static addHost(e,r){t.#s[e]=r,t.#s.byDomain[r.domain]=e,t.#s.byShortcut[`${e}:`]=e,t.#r[`${e}:`]={name:e}}static fromUrl(e,r){if(typeof e!="string")return;let s=e+JSON.stringify(r||{});if(!Mr.has(s)){let i=Au(e,r,{gitHosts:t.#s,protocols:t.#r});Mr.set(s,i?new t(...i):void 0)}return Mr.get(s)}static parseUrl(e){return Ru(e)}#e(e,r){if(typeof e!="function")return null;let s={...this,...this.opts,...r};s.path||(s.path=""),s.path.startsWith("/")&&(s.path=s.path.slice(1)),s.noCommittish&&(s.committish=null);let i=e(s);return s.noGitPlus&&i.startsWith("git+")?i.slice(4):i}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#e(this.sshtemplate,e)}sshurl(e){return this.#e(this.sshurltemplate,e)}browse(e,...r){return typeof e!="string"?this.#e(this.browsetemplate,e):typeof r[0]!="string"?this.#e(this.browsetreetemplate,{...r[0],path:e}):this.#e(this.browsetreetemplate,{...r[1],fragment:r[0],path:e})}browseFile(e,...r){return typeof r[0]!="string"?this.#e(this.browseblobtemplate,{...r[0],path:e}):this.#e(this.browseblobtemplate,{...r[1],fragment:r[0],path:e})}docs(e){return this.#e(this.docstemplate,e)}bugs(e){return this.#e(this.bugstemplate,e)}https(e){return this.#e(this.httpstemplate,e)}git(e){return this.#e(this.gittemplate,e)}shortcut(e){return this.#e(this.shortcuttemplate,e)}path(e){return this.#e(this.pathtemplate,e)}tarball(e){return this.#e(this.tarballtemplate,{...e,noCommittish:!1})}file(e,r){return this.#e(this.filetemplate,{...r,path:e})}edit(e,r){return this.#e(this.edittemplate,{...r,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[t,e]of Object.entries(Eu))Mt.addHost(t,e);go.exports=Mt});var dt=x(($d,Io)=>{"use strict";var Ee="\\\\/",So=`[^${Ee}]`,we="\\.",Iu="\\+",Nu="\\?",Gt="\\/",Lu="(?=.)",$o="[^/]",kr=`(?:${Gt}|$)`,vo=`(?:^|${Gt})`,Vr=`${we}{1,2}${kr}`,Hu=`(?!${we})`,Du=`(?!${vo}${Vr})`,Pu=`(?!${we}{0,1}${kr})`,Uu=`(?!${Vr})`,Mu=`[^.${Gt}]`,Fu=`${$o}*?`,qu="/",Oo={DOT_LITERAL:we,PLUS_LITERAL:Iu,QMARK_LITERAL:Nu,SLASH_LITERAL:Gt,ONE_CHAR:Lu,QMARK:$o,END_ANCHOR:kr,DOTS_SLASH:Vr,NO_DOT:Hu,NO_DOTS:Du,NO_DOT_SLASH:Pu,NO_DOTS_SLASH:Uu,QMARK_NO_DOT:Mu,STAR:Fu,START_ANCHOR:vo,SEP:qu},Bu={...Oo,SLASH_LITERAL:`[${Ee}]`,QMARK:So,STAR:`${So}*?`,DOTS_SLASH:`${we}{1,2}(?:[${Ee}]|$)`,NO_DOT:`(?!${we})`,NO_DOTS:`(?!(?:^|[${Ee}])${we}{1,2}(?:[${Ee}]|$))`,NO_DOT_SLASH:`(?!${we}{0,1}(?:[${Ee}]|$))`,NO_DOTS_SLASH:`(?!${we}{1,2}(?:[${Ee}]|$))`,QMARK_NO_DOT:`[^.${Ee}]`,START_ANCHOR:`(?:^|[${Ee}])`,END_ANCHOR:`(?:[${Ee}]|$)`,SEP:"\\"},Gu={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Io.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Gu,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?Bu:Oo}}});var jt=x(ae=>{"use strict";var{REGEX_BACKSLASH:ju,REGEX_REMOVE_BACKSLASH:zu,REGEX_SPECIAL_CHARS:Wu,REGEX_SPECIAL_CHARS_GLOBAL:ku}=dt();ae.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);ae.hasRegexChars=t=>Wu.test(t);ae.isRegexChar=t=>t.length===1&&ae.hasRegexChars(t);ae.escapeRegex=t=>t.replace(ku,"\\$1");ae.toPosixSlashes=t=>t.replace(ju,"/");ae.removeBackslashes=t=>t.replace(zu,e=>e==="\\"?"":e);ae.supportsLookbehinds=()=>{if(typeof process<"u"){let t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10)return!0}return!1};ae.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]==="\\"?ae.escapeLast(t,e,s-1):`${t.slice(0,s)}\\${t.slice(s)}`};ae.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};ae.wrapOutput=(t,e={},r={})=>{let s=r.contains?"":"^",i=r.contains?"":"$",n=`${s}(?:${t})${i}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n};ae.basename=(t,{windows:e}={})=>{let r=t.split(e?/[\\/]/:"/"),s=r[r.length-1];return s===""?r[r.length-2]:s}});var Fo=x((Od,Mo)=>{"use strict";var No=jt(),{CHAR_ASTERISK:Kr,CHAR_AT:Vu,CHAR_BACKWARD_SLASH:mt,CHAR_COMMA:Ku,CHAR_DOT:Xr,CHAR_EXCLAMATION_MARK:Yr,CHAR_FORWARD_SLASH:Uo,CHAR_LEFT_CURLY_BRACE:Qr,CHAR_LEFT_PARENTHESES:Zr,CHAR_LEFT_SQUARE_BRACKET:Xu,CHAR_PLUS:Yu,CHAR_QUESTION_MARK:Lo,CHAR_RIGHT_CURLY_BRACE:Qu,CHAR_RIGHT_PARENTHESES:Ho,CHAR_RIGHT_SQUARE_BRACKET:Zu}=dt(),Do=t=>t===Uo||t===mt,Po=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Ju=(t,e)=>{let r=e||{},s=t.length-1,i=r.parts===!0||r.scanToEnd===!0,n=[],o=[],a=[],l=t,h=-1,p=0,u=0,c=!1,f=!1,A=!1,g=!1,I=!1,b=!1,S=!1,N=!1,y=!1,C=!1,L=0,$,O,v={value:"",depth:0,isGlob:!1},d=()=>h>=s,z=()=>l.charCodeAt(h+1),U=()=>($=O,l.charCodeAt(++h));for(;h<s;){O=U();let P;if(O===mt){S=v.backslashes=!0,O=U(),O===Qr&&(b=!0);continue}if(b===!0||O===Qr){for(L++;d()!==!0&&(O=U());){if(O===mt){S=v.backslashes=!0,U();continue}if(O===Qr){L++;continue}if(b!==!0&&O===Xr&&(O=U())===Xr){if(c=v.isBrace=!0,A=v.isGlob=!0,C=!0,i===!0)continue;break}if(b!==!0&&O===Ku){if(c=v.isBrace=!0,A=v.isGlob=!0,C=!0,i===!0)continue;break}if(O===Qu&&(L--,L===0)){b=!1,c=v.isBrace=!0,C=!0;break}}if(i===!0)continue;break}if(O===Uo){if(n.push(h),o.push(v),v={value:"",depth:0,isGlob:!1},C===!0)continue;if($===Xr&&h===p+1){p+=2;continue}u=h+1;continue}if(r.noext!==!0&&(O===Yu||O===Vu||O===Kr||O===Lo||O===Yr)===!0&&z()===Zr){if(A=v.isGlob=!0,g=v.isExtglob=!0,C=!0,O===Yr&&h===p&&(y=!0),i===!0){for(;d()!==!0&&(O=U());){if(O===mt){S=v.backslashes=!0,O=U();continue}if(O===Ho){A=v.isGlob=!0,C=!0;break}}continue}break}if(O===Kr){if($===Kr&&(I=v.isGlobstar=!0),A=v.isGlob=!0,C=!0,i===!0)continue;break}if(O===Lo){if(A=v.isGlob=!0,C=!0,i===!0)continue;break}if(O===Xu){for(;d()!==!0&&(P=U());){if(P===mt){S=v.backslashes=!0,U();continue}if(P===Zu){f=v.isBracket=!0,A=v.isGlob=!0,C=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&O===Yr&&h===p){N=v.negated=!0,p++;continue}if(r.noparen!==!0&&O===Zr){if(A=v.isGlob=!0,i===!0){for(;d()!==!0&&(O=U());){if(O===Zr){S=v.backslashes=!0,O=U();continue}if(O===Ho){C=!0;break}}continue}break}if(A===!0){if(C=!0,i===!0)continue;break}}r.noext===!0&&(g=!1,A=!1);let B=l,m="",E="";p>0&&(m=l.slice(0,p),l=l.slice(p),u-=p),B&&A===!0&&u>0?(B=l.slice(0,u),E=l.slice(u)):A===!0?(B="",E=l):B=l,B&&B!==""&&B!=="/"&&B!==l&&Do(B.charCodeAt(B.length-1))&&(B=B.slice(0,-1)),r.unescape===!0&&(E&&(E=No.removeBackslashes(E)),B&&S===!0&&(B=No.removeBackslashes(B)));let ee={prefix:m,input:t,start:p,base:B,glob:E,isBrace:c,isBracket:f,isGlob:A,isExtglob:g,isGlobstar:I,negated:N,negatedExtglob:y};if(r.tokens===!0&&(ee.maxDepth=0,Do(O)||o.push(v),ee.tokens=o),r.parts===!0||r.tokens===!0){let P;for(let q=0;q<n.length;q++){let le=P?P+1:p,Q=n[q],fe=t.slice(le,Q);r.tokens&&(q===0&&p!==0?(o[q].isPrefix=!0,o[q].value=m):o[q].value=fe,Po(o[q]),ee.maxDepth+=o[q].depth),(q!==0||fe!=="")&&a.push(fe),P=Q}if(P&&P+1<t.length){let q=t.slice(P+1);a.push(q),r.tokens&&(o[o.length-1].value=q,Po(o[o.length-1]),ee.maxDepth+=o[o.length-1].depth)}ee.slashes=n,ee.parts=a}return ee};Mo.exports=Ju});var Go=x((Id,Bo)=>{"use strict";var zt=dt(),de=jt(),{MAX_LENGTH:Wt,POSIX_REGEX_SOURCE:ef,REGEX_NON_SPECIAL_CHARS:tf,REGEX_SPECIAL_CHARS_BACKREF:rf,REPLACEMENTS:qo}=zt,sf=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>de.escapeRegex(i)).join("..")}return r},Xe=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Jr=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=qo[t]||t;let r={...e},s=typeof r.maxLength=="number"?Math.min(Wt,r.maxLength):Wt,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);let n={type:"bos",value:"",output:r.prepend||""},o=[n],a=r.capture?"":"?:",l=zt.globChars(r.windows),h=zt.extglobChars(l),{DOT_LITERAL:p,PLUS_LITERAL:u,SLASH_LITERAL:c,ONE_CHAR:f,DOTS_SLASH:A,NO_DOT:g,NO_DOT_SLASH:I,NO_DOTS_SLASH:b,QMARK:S,QMARK_NO_DOT:N,STAR:y,START_ANCHOR:C}=l,L=w=>`(${a}(?:(?!${C}${w.dot?A:p}).)*?)`,$=r.dot?"":g,O=r.dot?S:N,v=r.bash===!0?L(r):y;r.capture&&(v=`(${v})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let d={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=de.removePrefix(t,d),i=t.length;let z=[],U=[],B=[],m=n,E,ee=()=>d.index===i-1,P=d.peek=(w=1)=>t[d.index+w],q=d.advance=()=>t[++d.index]||"",le=()=>t.slice(d.index+1),Q=(w="",k=0)=>{d.consumed+=w,d.index+=k},fe=w=>{d.output+=w.output!=null?w.output:w.value,Q(w.value)},Ua=()=>{let w=1;for(;P()==="!"&&(P(2)!=="("||P(3)==="?");)q(),d.start++,w++;return w%2===0?!1:(d.negated=!0,d.start++,!0)},At=w=>{d[w]++,B.push(w)},$e=w=>{d[w]--,B.pop()},M=w=>{if(m.type==="globstar"){let k=d.braces>0&&(w.type==="comma"||w.type==="brace"),R=w.extglob===!0||z.length&&(w.type==="pipe"||w.type==="paren");w.type!=="slash"&&w.type!=="paren"&&!k&&!R&&(d.output=d.output.slice(0,-m.output.length),m.type="star",m.value="*",m.output=v,d.output+=m.output)}if(z.length&&w.type!=="paren"&&(z[z.length-1].inner+=w.value),(w.value||w.output)&&fe(w),m&&m.type==="text"&&w.type==="text"){m.value+=w.value,m.output=(m.output||"")+w.value;return}w.prev=m,o.push(w),m=w},Rt=(w,k)=>{let R={...h[k],conditions:1,inner:""};R.prev=m,R.parens=d.parens,R.output=d.output;let D=(r.capture?"(":"")+R.open;At("parens"),M({type:w,value:k,output:d.output?"":f}),M({type:"paren",extglob:!0,value:q(),output:D}),z.push(R)},Ma=w=>{let k=w.close+(r.capture?")":""),R;if(w.type==="negate"){let D=v;if(w.inner&&w.inner.length>1&&w.inner.includes("/")&&(D=L(r)),(D!==v||ee()||/^\)+$/.test(le()))&&(k=w.close=`)$))${D}`),w.inner.includes("*")&&(R=le())&&/^\.[^\\/.]+$/.test(R)){let V=Jr(R,{...e,fastpaths:!1}).output;k=w.close=`)${V})${D})`}w.prev.type==="bos"&&(d.negatedExtglob=!0)}M({type:"paren",extglob:!0,value:E,output:k}),$e("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let w=!1,k=t.replace(rf,(R,D,V,se,J,er)=>se==="\\"?(w=!0,R):se==="?"?D?D+se+(J?S.repeat(J.length):""):er===0?O+(J?S.repeat(J.length):""):S.repeat(V.length):se==="."?p.repeat(V.length):se==="*"?D?D+se+(J?v:""):v:D?R:`\\${R}`);return w===!0&&(r.unescape===!0?k=k.replace(/\\/g,""):k=k.replace(/\\+/g,R=>R.length%2===0?"\\\\":R?"\\":"")),k===t&&r.contains===!0?(d.output=t,d):(d.output=de.wrapOutput(k,d,e),d)}for(;!ee();){if(E=q(),E==="\0")continue;if(E==="\\"){let R=P();if(R==="/"&&r.bash!==!0||R==="."||R===";")continue;if(!R){E+="\\",M({type:"text",value:E});continue}let D=/^\\+/.exec(le()),V=0;if(D&&D[0].length>2&&(V=D[0].length,d.index+=V,V%2!==0&&(E+="\\")),r.unescape===!0?E=q():E+=q(),d.brackets===0){M({type:"text",value:E});continue}}if(d.brackets>0&&(E!=="]"||m.value==="["||m.value==="[^")){if(r.posix!==!1&&E===":"){let R=m.value.slice(1);if(R.includes("[")&&(m.posix=!0,R.includes(":"))){let D=m.value.lastIndexOf("["),V=m.value.slice(0,D),se=m.value.slice(D+2),J=ef[se];if(J){m.value=V+J,d.backtrack=!0,q(),!n.output&&o.indexOf(m)===1&&(n.output=f);continue}}}(E==="["&&P()!==":"||E==="-"&&P()==="]")&&(E=`\\${E}`),E==="]"&&(m.value==="["||m.value==="[^")&&(E=`\\${E}`),r.posix===!0&&E==="!"&&m.value==="["&&(E="^"),m.value+=E,fe({value:E});continue}if(d.quotes===1&&E!=='"'){E=de.escapeRegex(E),m.value+=E,fe({value:E});continue}if(E==='"'){d.quotes=d.quotes===1?0:1,r.keepQuotes===!0&&M({type:"text",value:E});continue}if(E==="("){At("parens"),M({type:"paren",value:E});continue}if(E===")"){if(d.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Xe("opening","("));let R=z[z.length-1];if(R&&d.parens===R.parens+1){Ma(z.pop());continue}M({type:"paren",value:E,output:d.parens?")":"\\)"}),$e("parens");continue}if(E==="["){if(r.nobracket===!0||!le().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Xe("closing","]"));E=`\\${E}`}else At("brackets");M({type:"bracket",value:E});continue}if(E==="]"){if(r.nobracket===!0||m&&m.type==="bracket"&&m.value.length===1){M({type:"text",value:E,output:`\\${E}`});continue}if(d.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Xe("opening","["));M({type:"text",value:E,output:`\\${E}`});continue}$e("brackets");let R=m.value.slice(1);if(m.posix!==!0&&R[0]==="^"&&!R.includes("/")&&(E=`/${E}`),m.value+=E,fe({value:E}),r.literalBrackets===!1||de.hasRegexChars(R))continue;let D=de.escapeRegex(m.value);if(d.output=d.output.slice(0,-m.value.length),r.literalBrackets===!0){d.output+=D,m.value=D;continue}m.value=`(${a}${D}|${m.value})`,d.output+=m.value;continue}if(E==="{"&&r.nobrace!==!0){At("braces");let R={type:"brace",value:E,output:"(",outputIndex:d.output.length,tokensIndex:d.tokens.length};U.push(R),M(R);continue}if(E==="}"){let R=U[U.length-1];if(r.nobrace===!0||!R){M({type:"text",value:E,output:E});continue}let D=")";if(R.dots===!0){let V=o.slice(),se=[];for(let J=V.length-1;J>=0&&(o.pop(),V[J].type!=="brace");J--)V[J].type!=="dots"&&se.unshift(V[J].value);D=sf(se,r),d.backtrack=!0}if(R.comma!==!0&&R.dots!==!0){let V=d.output.slice(0,R.outputIndex),se=d.tokens.slice(R.tokensIndex);R.value=R.output="\\{",E=D="\\}",d.output=V;for(let J of se)d.output+=J.output||J.value}M({type:"brace",value:E,output:D}),$e("braces"),U.pop();continue}if(E==="|"){z.length>0&&z[z.length-1].conditions++,M({type:"text",value:E});continue}if(E===","){let R=E,D=U[U.length-1];D&&B[B.length-1]==="braces"&&(D.comma=!0,R="|"),M({type:"comma",value:E,output:R});continue}if(E==="/"){if(m.type==="dot"&&d.index===d.start+1){d.start=d.index+1,d.consumed="",d.output="",o.pop(),m=n;continue}M({type:"slash",value:E,output:c});continue}if(E==="."){if(d.braces>0&&m.type==="dot"){m.value==="."&&(m.output=p);let R=U[U.length-1];m.type="dots",m.output+=E,m.value+=E,R.dots=!0;continue}if(d.braces+d.parens===0&&m.type!=="bos"&&m.type!=="slash"){M({type:"text",value:E,output:p});continue}M({type:"dot",value:E,output:p});continue}if(E==="?"){if(!(m&&m.value==="(")&&r.noextglob!==!0&&P()==="("&&P(2)!=="?"){Rt("qmark",E);continue}if(m&&m.type==="paren"){let D=P(),V=E;if(D==="<"&&!de.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(m.value==="("&&!/[!=<:]/.test(D)||D==="<"&&!/<([!=]|\w+>)/.test(le()))&&(V=`\\${E}`),M({type:"text",value:E,output:V});continue}if(r.dot!==!0&&(m.type==="slash"||m.type==="bos")){M({type:"qmark",value:E,output:N});continue}M({type:"qmark",value:E,output:S});continue}if(E==="!"){if(r.noextglob!==!0&&P()==="("&&(P(2)!=="?"||!/[!=<:]/.test(P(3)))){Rt("negate",E);continue}if(r.nonegate!==!0&&d.index===0){Ua();continue}}if(E==="+"){if(r.noextglob!==!0&&P()==="("&&P(2)!=="?"){Rt("plus",E);continue}if(m&&m.value==="("||r.regex===!1){M({type:"plus",value:E,output:u});continue}if(m&&(m.type==="bracket"||m.type==="paren"||m.type==="brace")||d.parens>0){M({type:"plus",value:E});continue}M({type:"plus",value:u});continue}if(E==="@"){if(r.noextglob!==!0&&P()==="("&&P(2)!=="?"){M({type:"at",extglob:!0,value:E,output:""});continue}M({type:"text",value:E});continue}if(E!=="*"){(E==="$"||E==="^")&&(E=`\\${E}`);let R=tf.exec(le());R&&(E+=R[0],d.index+=R[0].length),M({type:"text",value:E});continue}if(m&&(m.type==="globstar"||m.star===!0)){m.type="star",m.star=!0,m.value+=E,m.output=v,d.backtrack=!0,d.globstar=!0,Q(E);continue}let w=le();if(r.noextglob!==!0&&/^\([^?]/.test(w)){Rt("star",E);continue}if(m.type==="star"){if(r.noglobstar===!0){Q(E);continue}let R=m.prev,D=R.prev,V=R.type==="slash"||R.type==="bos",se=D&&(D.type==="star"||D.type==="globstar");if(r.bash===!0&&(!V||w[0]&&w[0]!=="/")){M({type:"star",value:E,output:""});continue}let J=d.braces>0&&(R.type==="comma"||R.type==="brace"),er=z.length&&(R.type==="pipe"||R.type==="paren");if(!V&&R.type!=="paren"&&!J&&!er){M({type:"star",value:E,output:""});continue}for(;w.slice(0,3)==="/**";){let xt=t[d.index+4];if(xt&&xt!=="/")break;w=w.slice(3),Q("/**",3)}if(R.type==="bos"&&ee()){m.type="globstar",m.value+=E,m.output=L(r),d.output=m.output,d.globstar=!0,Q(E);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&!se&&ee()){d.output=d.output.slice(0,-(R.output+m.output).length),R.output=`(?:${R.output}`,m.type="globstar",m.output=L(r)+(r.strictSlashes?")":"|$)"),m.value+=E,d.globstar=!0,d.output+=R.output+m.output,Q(E);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&w[0]==="/"){let xt=w[1]!==void 0?"|$":"";d.output=d.output.slice(0,-(R.output+m.output).length),R.output=`(?:${R.output}`,m.type="globstar",m.output=`${L(r)}${c}|${c}${xt})`,m.value+=E,d.output+=R.output+m.output,d.globstar=!0,Q(E+q()),M({type:"slash",value:"/",output:""});continue}if(R.type==="bos"&&w[0]==="/"){m.type="globstar",m.value+=E,m.output=`(?:^|${c}|${L(r)}${c})`,d.output=m.output,d.globstar=!0,Q(E+q()),M({type:"slash",value:"/",output:""});continue}d.output=d.output.slice(0,-m.output.length),m.type="globstar",m.output=L(r),m.value+=E,d.output+=m.output,d.globstar=!0,Q(E);continue}let k={type:"star",value:E,output:v};if(r.bash===!0){k.output=".*?",(m.type==="bos"||m.type==="slash")&&(k.output=$+k.output),M(k);continue}if(m&&(m.type==="bracket"||m.type==="paren")&&r.regex===!0){k.output=E,M(k);continue}(d.index===d.start||m.type==="slash"||m.type==="dot")&&(m.type==="dot"?(d.output+=I,m.output+=I):r.dot===!0?(d.output+=b,m.output+=b):(d.output+=$,m.output+=$),P()!=="*"&&(d.output+=f,m.output+=f)),M(k)}for(;d.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Xe("closing","]"));d.output=de.escapeLast(d.output,"["),$e("brackets")}for(;d.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Xe("closing",")"));d.output=de.escapeLast(d.output,"("),$e("parens")}for(;d.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Xe("closing","}"));d.output=de.escapeLast(d.output,"{"),$e("braces")}if(r.strictSlashes!==!0&&(m.type==="star"||m.type==="bracket")&&M({type:"maybe_slash",value:"",output:`${c}?`}),d.backtrack===!0){d.output="";for(let w of d.tokens)d.output+=w.output!=null?w.output:w.value,w.suffix&&(d.output+=w.suffix)}return d};Jr.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength=="number"?Math.min(Wt,r.maxLength):Wt,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);t=qo[t]||t;let{DOT_LITERAL:n,SLASH_LITERAL:o,ONE_CHAR:a,DOTS_SLASH:l,NO_DOT:h,NO_DOTS:p,NO_DOTS_SLASH:u,STAR:c,START_ANCHOR:f}=zt.globChars(r.windows),A=r.dot?p:h,g=r.dot?u:h,I=r.capture?"":"?:",b={negated:!1,prefix:""},S=r.bash===!0?".*?":c;r.capture&&(S=`(${S})`);let N=$=>$.noglobstar===!0?S:`(${I}(?:(?!${f}${$.dot?l:n}).)*?)`,y=$=>{switch($){case"*":return`${A}${a}${S}`;case".*":return`${n}${a}${S}`;case"*.*":return`${A}${S}${n}${a}${S}`;case"*/*":return`${A}${S}${o}${a}${g}${S}`;case"**":return A+N(r);case"**/*":return`(?:${A}${N(r)}${o})?${g}${a}${S}`;case"**/*.*":return`(?:${A}${N(r)}${o})?${g}${S}${n}${a}${S}`;case"**/.*":return`(?:${A}${N(r)}${o})?${n}${a}${S}`;default:{let O=/^(.*?)\.(\w+)$/.exec($);if(!O)return;let v=y(O[1]);return v?v+n+O[2]:void 0}}},C=de.removePrefix(t,b),L=y(C);return L&&r.strictSlashes!==!0&&(L+=`${o}?`),L};Bo.exports=Jr});var Wo=x((Nd,zo)=>{"use strict";var nf=Fo(),es=Go(),jo=jt(),of=dt(),af=t=>t&&typeof t=="object"&&!Array.isArray(t),Y=(t,e,r=!1)=>{if(Array.isArray(t)){let p=t.map(c=>Y(c,e,r));return c=>{for(let f of p){let A=f(c);if(A)return A}return!1}}let s=af(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},n=i.windows,o=s?Y.compileRe(t,e):Y.makeRe(t,e,!1,!0),a=o.state;delete o.state;let l=()=>!1;if(i.ignore){let p={...e,ignore:null,onMatch:null,onResult:null};l=Y(i.ignore,p,r)}let h=(p,u=!1)=>{let{isMatch:c,match:f,output:A}=Y.test(p,o,e,{glob:t,posix:n}),g={glob:t,state:a,regex:o,posix:n,input:p,output:A,match:f,isMatch:c};return typeof i.onResult=="function"&&i.onResult(g),c===!1?(g.isMatch=!1,u?g:!1):l(p)?(typeof i.onIgnore=="function"&&i.onIgnore(g),g.isMatch=!1,u?g:!1):(typeof i.onMatch=="function"&&i.onMatch(g),u?g:!0)};return r&&(h.state=a),h};Y.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let n=r||{},o=n.format||(i?jo.toPosixSlashes:null),a=t===s,l=a&&o?o(t):t;return a===!1&&(l=o?o(t):t,a=l===s),(a===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?a=Y.matchBase(t,e,r,i):a=e.exec(l)),{isMatch:!!a,match:a,output:l}};Y.matchBase=(t,e,r)=>(e instanceof RegExp?e:Y.makeRe(e,r)).test(jo.basename(t));Y.isMatch=(t,e,r)=>Y(e,r)(t);Y.parse=(t,e)=>Array.isArray(t)?t.map(r=>Y.parse(r,e)):es(t,{...e,fastpaths:!1});Y.scan=(t,e)=>nf(t,e);Y.compileRe=(t,e,r=!1,s=!1)=>{if(r===!0)return t.output;let i=e||{},n=i.contains?"":"^",o=i.contains?"":"$",a=`${n}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let l=Y.toRegex(a,e);return s===!0&&(l.state=t),l};Y.makeRe=(t,e={},r=!1,s=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=es.fastpaths(t,e)),i.output||(i=es(t,e)),Y.compileRe(i,e,r,s)};Y.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Y.constants=of;zo.exports=Y});var ko=x((Ld,Ae)=>{"use strict";var lf=me("os"),_e=Wo(),hf=lf.platform()==="win32";function cf(t,e,r=!1){return e&&(e.windows===null||e.windows===void 0)&&(e={...e,windows:hf}),_e(t,e,r)}Ae.exports=cf;Ae.exports.test=_e.test;Ae.exports.matchBase=_e.matchBase;Ae.exports.isMatch=_e.isMatch;Ae.exports.parse=_e.parse;Ae.exports.scan=_e.scan;Ae.exports.compileRe=_e.compileRe;Ae.exports.toRegex=_e.toRegex;Ae.exports.makeRe=_e.makeRe});var Ko=x((Hd,Vo)=>{"use strict";var De=class t extends Error{constructor(e,r,s){super("[ParserError] "+e,r,s),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}},kt=class{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},gt=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new kt(this.parseStart)}parse(e){if(e.length===0||e.length==null)return;this._buf=String(e),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let e;do e=this.state.parser,this.runOne();while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if(typeof e!="function")throw new De("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,r){r&&this.next(r),this.stack.push(this.state),this.state=new kt(e)}callNow(e,r){return this.call(e,r),this.runOne()}return(e){if(this.stack.length===0)throw this.error(new De("Stack underflow"));e===void 0&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===1114112)throw this.error(new De("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new De("Must declare a parseStart method")}};gt.END=1114112;gt.Error=De;Vo.exports=gt});var Yo=x((Dd,Xo)=>{"use strict";Xo.exports=t=>{let e=new Date(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var Vt=x((Pd,Qo)=>{"use strict";Qo.exports=(t,e)=>{for(e=String(e);e.length<t;)e="0"+e;return e}});var Jo=x((Ud,Zo)=>{"use strict";var Ye=Vt(),ts=class extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){let e=`${this.getUTCFullYear()}-${Ye(2,this.getUTCMonth()+1)}-${Ye(2,this.getUTCDate())}`,r=`${Ye(2,this.getUTCHours())}:${Ye(2,this.getUTCMinutes())}:${Ye(2,this.getUTCSeconds())}.${Ye(3,this.getUTCMilliseconds())}`;return`${e}T${r}`}};Zo.exports=t=>{let e=new ts(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var ra=x((Md,ta)=>{"use strict";var ea=Vt(),uf=global.Date,rs=class extends uf{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${ea(2,this.getUTCMonth()+1)}-${ea(2,this.getUTCDate())}`}};ta.exports=t=>{let e=new rs(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var ia=x((Fd,sa)=>{"use strict";var Kt=Vt(),ss=class extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${Kt(2,this.getUTCHours())}:${Kt(2,this.getUTCMinutes())}:${Kt(2,this.getUTCSeconds())}.${Kt(3,this.getUTCMilliseconds())}`}};sa.exports=t=>{let e=new ss(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var na=x((exports,module)=>{"use strict";module.exports=makeParserClass(Ko());module.exports.makeParserClass=makeParserClass;var TomlError=class t extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,t),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=t=>{let e=new TomlError(t.message);return e.code=t.code,e.wrapped=t,e};module.exports.TomlError=TomlError;var createDateTime=Yo(),createDateTimeFloat=Jo(),createDate=ra(),createTime=ia(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
|
|
10
|
+
`,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}function isBit(t){return t===CHAR_1||t===CHAR_0}function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return hasOwnProperty.call(t,e)?!0:(e==="__proto__"&&defineProperty(t,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(t){return t===null||typeof t!="object"?!1:t[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}function isInlineList(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(t){return t===null||typeof t!="object"?!1:t[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(t){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e)?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}function isInteger(t){return t===null||typeof t!="object"?!1:t[_type]===INTEGER}var FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}function isFloat(t){return t===null||typeof t!="object"?!1:t[_type]===FLOAT}function tomlType(t){let e=typeof t;if(e==="object"){if(t===null)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}function makeParserClass(t){class e extends t{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(s){let i=this.ctx,n=s.key.pop();for(let o of s.key){if(hasKey(i,o)&&(!isTable(i[o])||i[o][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[o]=i[o]||Table()}if(hasKey(i,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(s.value)||isFloat(s.value)?i[n]=s.value.valueOf():i[n]=s.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(s){return this.state.resultTable?this.state.resultTable.push(s):this.state.resultTable=[s],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(s){return this.returnNow({key:this.state.resultTable,value:s})}parseComment(){do if(this.char===t.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(s){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,s)&&(!isTable(this.ctx[s])||this.ctx[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[s]=this.ctx[s]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,s))this.ctx=this.ctx[s]=Table();else if(isTable(this.ctx[s]))this.ctx=this.ctx[s];else if(isList(this.ctx[s]))this.ctx=this.ctx[s][this.ctx[s].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(s){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,s)||(this.ctx[s]=List()),isInlineList(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[s])){let i=Table();this.ctx[s].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,s))this.ctx=this.ctx[s]=Table();else{if(isInlineList(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[s]))this.ctx=this.ctx[s][this.ctx[s].length-1];else if(isTable(this.ctx[s]))this.ctx=this.ctx[s];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(s){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===t.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(s){return this.returnNow(s)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===t.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(s){return this.state.buf+=s,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let s="\\u00";return this.char<16&&(s+="0"),s+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${s} instead`))}recordMultiEscapeReplacement(s){return this.state.buf+=s,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(s){try{let i=parseInt(s,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===t.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(s){if(this.state.resultArr){let i=this.state.resultArr[_contentType],n=tomlType(s);if(i!==n)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${n}`))}else this.state.resultArr=InlineList(tomlType(s));return isFloat(s)||isInteger(s)?this.state.resultArr.push(s.valueOf()):this.state.resultArr.push(s),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(s){let i=this.state.resultTable,n=s.key.pop();for(let o of s.key){if(hasKey(i,o)&&(!isTable(i[o])||i[o][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[o]=i[o]||Table()}if(hasKey(i,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(s.value)||isFloat(s.value)?i[n]=s.value.valueOf():i[n]=s.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return e}});var aa=x((qd,oa)=>{"use strict";oa.exports=ff;function ff(t,e){if(t.pos==null||t.line==null)return t;let r=t.message;if(r+=` at row ${t.line+1}, col ${t.col+1}, pos ${t.pos}:
|
|
11
|
+
`,e&&e.split){let s=e.split(/\n/),i=String(Math.min(s.length,t.line+3)).length,n=" ";for(;n.length<i;)n+=" ";for(let o=Math.max(0,t.line-1);o<Math.min(s.length,t.line+2);++o){let a=String(o+1);if(a.length<i&&(a=" "+a),t.line===o){r+=a+"> "+s[o]+`
|
|
12
|
+
`,r+=n+" ";for(let l=0;l<t.col;++l)r+=" ";r+=`^
|
|
13
|
+
`}else r+=a+": "+s[o]+`
|
|
25
14
|
`}}return t.message=r+`
|
|
26
|
-
`,t}});var lh=I((rE,ah)=>{"use strict";ah.exports=a_;var i_=sh(),o_=oh();function a_(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new i_;try{return e.parse(t),e.finish()}catch(r){throw o_(r,t)}}});function ni({onlyFirst:t=!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,t?void 0:"g")}var li=Fe(Ha(),1);var Da=li.default.HttpProxyAgent,Ba=li.default.HttpsProxyAgent;var Dr=class extends Map{#e=0;#r=new Map;#t=new Map;#u;#w;#a;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.#u=e.maxSize,this.#w=e.maxAge||Number.POSITIVE_INFINITY,this.#a=e.onEviction}get __oldCache(){return this.#t}#m(e){if(typeof this.#a=="function")for(let[r,n]of e)this.#a(r,n.value)}#s(e,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof this.#a=="function"&&this.#a(e,r.value),this.delete(e)):!1}#i(e,r){if(this.#s(e,r)===!1)return r.value}#n(e,r){return r.expiry?this.#i(e,r):r.value}#c(e,r){let n=r.get(e);return this.#n(e,n)}#d(e,r){this.#r.set(e,r),this.#e++,this.#e>=this.#u&&(this.#e=0,this.#m(this.#t),this.#t=this.#r,this.#r=new Map)}#f(e,r){this.#t.delete(e),this.#d(e,r)}*#l(){for(let e of this.#t){let[r,n]=e;this.#r.has(r)||this.#s(r,n)===!1&&(yield e)}for(let e of this.#r){let[r,n]=e;this.#s(r,n)===!1&&(yield e)}}get(e){if(this.#r.has(e)){let r=this.#r.get(e);return this.#n(e,r)}if(this.#t.has(e)){let r=this.#t.get(e);if(this.#s(e,r)===!1)return this.#f(e,r),r.value}}set(e,r,{maxAge:n=this.#w}={}){let i=typeof n=="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;return this.#r.has(e)?this.#r.set(e,{value:r,expiry:i}):this.#d(e,{value:r,expiry:i}),this}has(e){return this.#r.has(e)?!this.#s(e,this.#r.get(e)):this.#t.has(e)?!this.#s(e,this.#t.get(e)):!1}peek(e){if(this.#r.has(e))return this.#c(e,this.#r);if(this.#t.has(e))return this.#c(e,this.#t)}delete(e){let r=this.#r.delete(e);return r&&this.#e--,this.#t.delete(e)||r}clear(){this.#r.clear(),this.#t.clear(),this.#e=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let r=[...this.#l()],n=r.length-e;n<0?(this.#r=new Map(r),this.#t=new Map,this.#e=r.length):(n>0&&this.#m(r.slice(0,n)),this.#t=new Map(r.slice(n)),this.#r=new Map,this.#e=0),this.#u=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.#r){let[r,n]=e;this.#s(r,n)===!1&&(yield[r,n.value])}for(let e of this.#t){let[r,n]=e;this.#r.has(r)||this.#s(r,n)===!1&&(yield[r,n.value])}}*entriesDescending(){let e=[...this.#r];for(let r=e.length-1;r>=0;--r){let n=e[r],[i,a]=n;this.#s(i,a)===!1&&(yield[i,a.value])}e=[...this.#t];for(let r=e.length-1;r>=0;--r){let n=e[r],[i,a]=n;this.#r.has(i)||this.#s(i,a)===!1&&(yield[i,a.value])}}*entriesAscending(){for(let[e,r]of this.#l())yield[e,r.value]}get size(){if(!this.#e)return this.#t.size;let e=0;for(let r of this.#t.keys())this.#r.has(r)||e++;return Math.min(this.#e+e,this.#u)}get maxSize(){return this.#u}entries(){return this.entriesAscending()}forEach(e,r=this){for(let[n,i]of this.entriesAscending())e.call(r,i,n,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};var Ma=Fe(qa(),1);import{Agent as dp}from"node:http";import{Agent as pp}from"node:https";var mp={agentCacheSize:512},Ua={maxSockets:64,keepAlive:!1},ui=class t extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,t)}};function ci(t,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let r={...mp,...e},n=new Dr({maxSize:r.agentCacheSize});async function i(l,f={}){let{origin:c,protocol:h}=new URL(l),b=f?.noProxy?null:(0,Ma.getProxyForUrl)(l),g=JSON.stringify({proxyUrl:b,origin:c,...f});if(n.has(g))return n.get(g);let m;if("noProxy"in f&&delete f.noProxy,e.undici){let{ProxyAgent:d,Agent:_}=await import("undici"),R={...f};"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),b?m=new d({...R,uri:b}):m=new _(R)}else{let d=h==="https:";b?m=new(d?Ba:Da)({...f,proxy:b}):m=new(d?pp:dp)(f)}return n.set(g,m),m}let a=(l,{timeout:f=0,agentOpts:c={},...h}={})=>new Promise(async(b,g)=>{if(!e.undici&&!("agent"in h)){let _=await i(l,{...Ua,...c});_&&(h.agent=_)}else if(e.undici&&!("dispatcher"in h)){let _=await i(l,{...Ua,...c});_&&(h.dispatcher=_)}let m,d;f&&(!("signal"in h)&&globalThis.AbortController&&(d=new AbortController,h.signal=d.signal),m=setTimeout(()=>{d?.abort?.();let _=new ui(`${h.method||"GET"} ${l} timed out after ${f}ms`);g(_)},f),m?.unref?.()),t(l,h).then(_=>{m&&clearTimeout(m),b(_)}).catch(_=>{if(m&&clearTimeout(m),_.name==="AbortError")return b(null);g(_)})});return a.clearCache=()=>{for(let l of n.values())"destroy"in l&&l.destroy();n.clear()},a}var Ah=Fe(fi(),1);import kp from"node:http";import zp from"node:https";import sr from"node:zlib";import Al,{PassThrough as Tl,pipeline as ir}from"node:stream";import{Buffer as Kn}from"node:buffer";function bp(t){if(!/^data:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');t=t.replace(/\r?\n/g,"");let e=t.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let r=t.substring(5,e).split(";"),n="",i=!1,a=r[0]||"text/plain",l=a;for(let b=1;b<r.length;b++)r[b]==="base64"?i=!0:r[b]&&(l+=`;${r[b]}`,r[b].indexOf("charset=")===0&&(n=r[b].substring(8)));!r[0]&&!n.length&&(l+=";charset=US-ASCII",n="US-ASCII");let f=i?"base64":"ascii",c=unescape(t.substring(e+1)),h=Buffer.from(c,f);return h.type=a,h.typeFull=l,h.charset=n,h}var ja=bp;Br();Mn();import _t,{PassThrough as cl}from"node:stream";import{types as fl,deprecate as Ri,promisify as Np}from"node:util";import{Buffer as qe}from"node:buffer";var it=class extends Error{constructor(e,r){super(e),Error.captureStackTrace(this,this.constructor),this.type=r}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var $e=class extends it{constructor(e,r,n){super(e,r),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}};var Wn=Symbol.toStringTag,gi=t=>typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&typeof t.sort=="function"&&t[Wn]==="URLSearchParams",qr=t=>t&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&typeof t.constructor=="function"&&/^(Blob|File)$/.test(t[Wn]),el=t=>typeof t=="object"&&(t[Wn]==="AbortSignal"||t[Wn]==="EventTarget"),tl=(t,e)=>{let r=new URL(e).hostname,n=new URL(t).hostname;return r===n||r.endsWith(`.${n}`)},rl=(t,e)=>{let r=new URL(e).protocol,n=new URL(t).protocol;return r===n};var Hp=Np(_t.pipeline),Ie=Symbol("Body internals"),Ze=class{constructor(e,{size:r=0}={}){let n=null;e===null?e=null:gi(e)?e=qe.from(e.toString()):qr(e)||qe.isBuffer(e)||(fl.isAnyArrayBuffer(e)?e=qe.from(e):ArrayBuffer.isView(e)?e=qe.from(e.buffer,e.byteOffset,e.byteLength):e instanceof _t||(e instanceof It?(e=Ja(e),n=e.type.split("=")[1]):e=qe.from(String(e))));let i=e;qe.isBuffer(e)?i=_t.Readable.from(e):qr(e)&&(i=_t.Readable.from(e.stream())),this[Ie]={body:e,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,e instanceof _t&&e.on("error",a=>{let l=a instanceof it?a:new $e(`Invalid response body while trying to fetch ${this.url}: ${a.message}`,"system",a);this[Ie].error=l})}get body(){return this[Ie].stream}get bodyUsed(){return this[Ie].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:n}=await _i(this);return e.slice(r,r+n)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let n=new It,i=new URLSearchParams(await this.text());for(let[a,l]of i)n.append(a,l);return n}let{toFormData:r}=await Promise.resolve().then(()=>(ul(),ll));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[Ie].body&&this[Ie].body.type||"",r=await this.arrayBuffer();return new st([r],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await _i(this);return new TextDecoder().decode(e)}buffer(){return _i(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 _i(t){if(t[Ie].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[Ie].disturbed=!0,t[Ie].error)throw t[Ie].error;let{body:e}=t;if(e===null)return qe.alloc(0);if(!(e instanceof _t))return qe.alloc(0);let r=[],n=0;try{for await(let i of e){if(t.size>0&&n+i.length>t.size){let a=new $e(`content size at ${t.url} over limit: ${t.size}`,"max-size");throw e.destroy(a),a}n+=i.length,r.push(i)}}catch(i){throw i instanceof it?i:new $e(`Invalid response body while trying to fetch ${t.url}: ${i.message}`,"system",i)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return r.every(i=>typeof i=="string")?qe.from(r.join("")):qe.concat(r,n)}catch(i){throw new $e(`Could not create Buffer from response body for ${t.url}: ${i.message}`,"system",i)}else throw new $e(`Premature close of server response while trying to fetch ${t.url}`)}var rr=(t,e)=>{let r,n,{body:i}=t[Ie];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof _t&&typeof i.getBoundary!="function"&&(r=new cl({highWaterMark:e}),n=new cl({highWaterMark:e}),i.pipe(r),i.pipe(n),t[Ie].stream=r,i=n),i},Dp=Ri(t=>t.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),jn=(t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":gi(t)?"application/x-www-form-urlencoded;charset=UTF-8":qr(t)?t.type||null:qe.isBuffer(t)||fl.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof It?`multipart/form-data; boundary=${e[Ie].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${Dp(t)}`:t instanceof _t?null:"text/plain;charset=UTF-8",hl=t=>{let{body:e}=t[Ie];return e===null?0:qr(e)?e.size:qe.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},dl=async(t,{body:e})=>{e===null?t.end():await Hp(e,t)};import{types as pl}from"node:util";import Vn from"node:http";var Gn=typeof Vn.validateHeaderName=="function"?Vn.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){let e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},Si=typeof Vn.validateHeaderValue=="function"?Vn.validateHeaderValue:(t,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let r=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"}),r}},He=class t extends URLSearchParams{constructor(e){let r=[];if(e instanceof t){let n=e.raw();for(let[i,a]of Object.entries(n))r.push(...a.map(l=>[i,l]))}else if(e!=null)if(typeof e=="object"&&!pl.isBoxedPrimitive(e)){let n=e[Symbol.iterator];if(n==null)r.push(...Object.entries(e));else{if(typeof n!="function")throw new TypeError("Header pairs must be iterable");r=[...e].map(i=>{if(typeof i!="object"||pl.isBoxedPrimitive(i))throw new TypeError("Each header pair must be an iterable object");return[...i]}).map(i=>{if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...i]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return r=r.length>0?r.map(([n,i])=>(Gn(n),Si(n,String(i)),[String(n).toLowerCase(),String(i)])):void 0,super(r),new Proxy(this,{get(n,i,a){switch(i){case"append":case"set":return(l,f)=>(Gn(l),Si(l,String(f)),URLSearchParams.prototype[i].call(n,String(l).toLowerCase(),String(f)));case"delete":case"has":case"getAll":return l=>(Gn(l),URLSearchParams.prototype[i].call(n,String(l).toLowerCase()));case"keys":return()=>(n.sort(),new Set(URLSearchParams.prototype.keys.call(n)).keys());default:return Reflect.get(n,i,a)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let r=this.getAll(e);if(r.length===0)return null;let n=r.join(", ");return/^content-encoding$/i.test(e)&&(n=n.toLowerCase()),n}forEach(e,r=void 0){for(let n of this.keys())Reflect.apply(e,r,[this.get(n),n,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,r)=>(e[r]=this.getAll(r),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,r)=>{let n=this.getAll(r);return r==="host"?e[r]=n[0]:e[r]=n.length>1?n:n[0],e},{})}};Object.defineProperties(He.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));function ml(t=[]){return new He(t.reduce((e,r,n,i)=>(n%2===0&&e.push(i.slice(n,n+2)),e),[]).filter(([e,r])=>{try{return Gn(e),Si(e,String(r)),!0}catch{return!1}}))}var Bp=new Set([301,302,303,307,308]),Yn=t=>Bp.has(t);var Ye=Symbol("Response internals"),Ue=class t extends Ze{constructor(e=null,r={}){super(e,r);let n=r.status!=null?r.status:200,i=new He(r.headers);if(e!==null&&!i.has("Content-Type")){let a=jn(e,this);a&&i.append("Content-Type",a)}this[Ye]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[Ye].type}get url(){return this[Ye].url||""}get status(){return this[Ye].status}get ok(){return this[Ye].status>=200&&this[Ye].status<300}get redirected(){return this[Ye].counter>0}get statusText(){return this[Ye].statusText}get headers(){return this[Ye].headers}get highWaterMark(){return this[Ye].highWaterMark}clone(){return new t(rr(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,r=302){if(!Yn(r))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new t(null,{headers:{location:new URL(e).toString()},status:r})}static error(){let e=new t(null,{status:0,statusText:""});return e[Ye].type="error",e}static json(e=void 0,r={}){let n=JSON.stringify(e);if(n===void 0)throw new TypeError("data is not JSON serializable");let i=new He(r&&r.headers);return i.has("content-type")||i.set("content-type","application/json"),new t(n,{...r,headers:i})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(Ue.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 Up}from"node:url";import{deprecate as Mp}from"node:util";var gl=t=>{if(t.search)return t.search;let e=t.href.length-1,r=t.hash||(t.href[e]==="#"?"#":"");return t.href[e-r.length]==="?"?"?":""};import{isIP as Fp}from"node:net";function bl(t,e=!1){return t==null||(t=new URL(t),/^(about|blob|data):$/.test(t.protocol))?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}var yl=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),_l="strict-origin-when-cross-origin";function Rl(t){if(!yl.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function qp(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=Fp(e);return r===4&&/^127\./.test(e)||r===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:t.host==="localhost"||t.host.endsWith(".localhost")?!1:t.protocol==="file:"}function nr(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:qp(t)}function Sl(t,{referrerURLCallback:e,referrerOriginCallback:r}={}){if(t.referrer==="no-referrer"||t.referrerPolicy==="")return null;let n=t.referrerPolicy;if(t.referrer==="about:client")return"no-referrer";let i=t.referrer,a=bl(i),l=bl(i,!0);a.toString().length>4096&&(a=l),e&&(a=e(a)),r&&(l=r(l));let f=new URL(t.url);switch(n){case"no-referrer":return"no-referrer";case"origin":return l;case"unsafe-url":return a;case"strict-origin":return nr(a)&&!nr(f)?"no-referrer":l.toString();case"strict-origin-when-cross-origin":return a.origin===f.origin?a:nr(a)&&!nr(f)?"no-referrer":l;case"same-origin":return a.origin===f.origin?a:"no-referrer";case"origin-when-cross-origin":return a.origin===f.origin?a:l;case"no-referrer-when-downgrade":return nr(a)&&!nr(f)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function wl(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of e)n&&yl.has(n)&&(r=n);return r}var ye=Symbol("Request internals"),Mr=t=>typeof t=="object"&&typeof t[ye]=="object",Wp=Mp(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),Pt=class t extends Ze{constructor(e,r={}){let n;if(Mr(e)?n=new URL(e.url):(n=new URL(e),e={}),n.username!==""||n.password!=="")throw new TypeError(`${n} is an url with embedded credentials.`);let i=r.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(i)&&(i=i.toUpperCase()),!Mr(r)&&"data"in r&&Wp(),(r.body!=null||Mr(e)&&e.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let a=r.body?r.body:Mr(e)&&e.body!==null?rr(e):null;super(a,{size:r.size||e.size||0});let l=new He(r.headers||e.headers||{});if(a!==null&&!l.has("Content-Type")){let h=jn(a,this);h&&l.set("Content-Type",h)}let f=Mr(e)?e.signal:null;if("signal"in r&&(f=r.signal),f!=null&&!el(f))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let c=r.referrer==null?e.referrer:r.referrer;if(c==="")c="no-referrer";else if(c){let h=new URL(c);c=/^about:(\/\/)?client$/.test(h)?"client":h}else c=void 0;this[ye]={method:i,redirect:r.redirect||e.redirect||"follow",headers:l,parsedURL:n,signal:f,referrer:c},this.follow=r.follow===void 0?e.follow===void 0?20:e.follow:r.follow,this.compress=r.compress===void 0?e.compress===void 0?!0:e.compress:r.compress,this.counter=r.counter||e.counter||0,this.agent=r.agent||e.agent,this.highWaterMark=r.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=r.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=r.referrerPolicy||e.referrerPolicy||""}get method(){return this[ye].method}get url(){return Up(this[ye].parsedURL)}get headers(){return this[ye].headers}get redirect(){return this[ye].redirect}get signal(){return this[ye].signal}get referrer(){if(this[ye].referrer==="no-referrer")return"";if(this[ye].referrer==="client")return"about:client";if(this[ye].referrer)return this[ye].referrer.toString()}get referrerPolicy(){return this[ye].referrerPolicy}set referrerPolicy(e){this[ye].referrerPolicy=Rl(e)}clone(){return new t(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(Pt.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 El=t=>{let{parsedURL:e}=t[ye],r=new He(t[ye].headers);r.has("Accept")||r.set("Accept","*/*");let n=null;if(t.body===null&&/^(post|put)$/i.test(t.method)&&(n="0"),t.body!==null){let f=hl(t);typeof f=="number"&&!Number.isNaN(f)&&(n=String(f))}n&&r.set("Content-Length",n),t.referrerPolicy===""&&(t.referrerPolicy=_l),t.referrer&&t.referrer!=="no-referrer"?t[ye].referrer=Sl(t):t[ye].referrer="no-referrer",t[ye].referrer instanceof URL&&r.set("Referer",t.referrer),r.has("User-Agent")||r.set("User-Agent","node-fetch"),t.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip, deflate, br");let{agent:i}=t;typeof i=="function"&&(i=i(e));let a=gl(e),l={path:e.pathname+a,method:t.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:i};return{parsedURL:e,options:l}};var Qn=class extends it{constructor(e,r="aborted"){super(e,r)}};Mn();bi();var jp=new Set(["data:","http:","https:"]);async function Xn(t,e){return new Promise((r,n)=>{let i=new Pt(t,e),{parsedURL:a,options:l}=El(i);if(!jp.has(a.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${a.protocol.replace(/:$/,"")}" is not supported.`);if(a.protocol==="data:"){let _=ja(i.url),R=new Ue(_,{headers:{"Content-Type":_.typeFull}});r(R);return}let f=(a.protocol==="https:"?zp:kp).request,{signal:c}=i,h=null,b=()=>{let _=new Qn("The operation was aborted.");n(_),i.body&&i.body instanceof Al.Readable&&i.body.destroy(_),!(!h||!h.body)&&h.body.emit("error",_)};if(c&&c.aborted){b();return}let g=()=>{b(),d()},m=f(a.toString(),l);c&&c.addEventListener("abort",g);let d=()=>{m.abort(),c&&c.removeEventListener("abort",g)};m.on("error",_=>{n(new $e(`request to ${i.url} failed, reason: ${_.message}`,"system",_)),d()}),Gp(m,_=>{h&&h.body&&h.body.destroy(_)}),process.version<"v14"&&m.on("socket",_=>{let R;_.prependListener("end",()=>{R=_._eventsCount}),_.prependListener("close",O=>{if(h&&R<_._eventsCount&&!O){let x=new Error("Premature close");x.code="ERR_STREAM_PREMATURE_CLOSE",h.body.emit("error",x)}})}),m.on("response",_=>{m.setTimeout(0);let R=ml(_.rawHeaders);if(Yn(_.statusCode)){let T=R.get("Location"),v=null;try{v=T===null?null:new URL(T,i.url)}catch{if(i.redirect!=="manual"){n(new $e(`uri requested responds with an invalid redirect URL: ${T}`,"invalid-redirect")),d();return}}switch(i.redirect){case"error":n(new $e(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),d();return;case"manual":break;case"follow":{if(v===null)break;if(i.counter>=i.follow){n(new $e(`maximum redirect reached at: ${i.url}`,"max-redirect")),d();return}let F={headers:new He(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:rr(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!tl(i.url,v)||!rl(i.url,v))for(let H of["authorization","www-authenticate","cookie","cookie2"])F.headers.delete(H);if(_.statusCode!==303&&i.body&&e.body instanceof Al.Readable){n(new $e("Cannot follow redirect with body being a readable stream","unsupported-redirect")),d();return}(_.statusCode===303||(_.statusCode===301||_.statusCode===302)&&i.method==="POST")&&(F.method="GET",F.body=void 0,F.headers.delete("content-length"));let B=wl(R);B&&(F.referrerPolicy=B),r(Xn(new Pt(v,F))),d();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}c&&_.once("end",()=>{c.removeEventListener("abort",g)});let O=ir(_,new Tl,T=>{T&&n(T)});process.version<"v12.10"&&_.on("aborted",g);let x={url:i.url,status:_.statusCode,statusText:_.statusMessage,headers:R,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},D=R.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||D===null||_.statusCode===204||_.statusCode===304){h=new Ue(O,x),r(h);return}let L={flush:sr.Z_SYNC_FLUSH,finishFlush:sr.Z_SYNC_FLUSH};if(D==="gzip"||D==="x-gzip"){O=ir(O,sr.createGunzip(L),T=>{T&&n(T)}),h=new Ue(O,x),r(h);return}if(D==="deflate"||D==="x-deflate"){let T=ir(_,new Tl,v=>{v&&n(v)});T.once("data",v=>{(v[0]&15)===8?O=ir(O,sr.createInflate(),F=>{F&&n(F)}):O=ir(O,sr.createInflateRaw(),F=>{F&&n(F)}),h=new Ue(O,x),r(h)}),T.once("end",()=>{h||(h=new Ue(O,x),r(h))});return}if(D==="br"){O=ir(O,sr.createBrotliDecompress(),T=>{T&&n(T)}),h=new Ue(O,x),r(h);return}h=new Ue(O,x),r(h)}),dl(m,i).catch(n)})}function Gp(t,e){let r=Kn.from(`0\r
|
|
27
|
-
\r
|
|
28
|
-
`),n=!1,i=!1,a;t.on("response",l=>{let{headers:f}=l;n=f["transfer-encoding"]==="chunked"&&!f["content-length"]}),t.on("socket",l=>{let f=()=>{if(n&&!i){let h=new Error("Premature close");h.code="ERR_STREAM_PREMATURE_CLOSE",e(h)}},c=h=>{i=Kn.compare(h.slice(-5),r)===0,!i&&a&&(i=Kn.compare(a.slice(-3),r.slice(0,3))===0&&Kn.compare(h.slice(-2),r.slice(3))===0),a=h};l.prependListener("close",f),l.on("data",c),t.on("close",()=>{l.removeListener("close",f),l.removeListener("data",c)})})}var Th=Fe(Jl(),1),Ch=Fe(Ti(),1),ie=Fe(Kc(),1),xh=Fe(tf(),1),vh=Fe(gf(),1);import{cwd as l_,stdout as u_,argv as c_,env as Cs,exit as uh,versions as f_}from"node:process";import{join as vs,dirname as Oh,basename as yo,resolve as xs}from"node:path";import{lstatSync as ch,readFileSync as fh,truncateSync as h_,writeFileSync as d_,accessSync as p_}from"node:fs";var dy=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],py={"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 gs(t,{now:e,noAffix:r=!1,times:n=dy,nowThreshold:i=2e3,nowString:a="now",aliases:l=!1,aliasesMap:f=py}={}){if(t=typeof t=="number"?t:Date.parse(t),e=e?typeof e=="number"?e:Date.parse(e):new Date,Number.isNaN(t))return"unknown";let c=!1,h=e-t;if(h<0&&(c=!0,h=Math.abs(h)),h<i)return a;let b,g;for(let d=0,_=n.length;d<_;d++){let R=n[d];if(!(h>=R[1])){b=Math.floor(h/R[0]),g=R[2]+(b>1?"s":"");break}}let m=`${c&&!r?"in ":""}${b} ${g}${!c&&!r?" ago":""}`;return l?f[m]??m:m}import Xi from"node:process";import my from"node:os";import bf from"node:tty";function ke(t,e=globalThis.Deno?globalThis.Deno.args:Xi.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:fe}=Xi,bs;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?bs=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(bs=1);function gy(){if("FORCE_COLOR"in fe)return fe.FORCE_COLOR==="true"?1:fe.FORCE_COLOR==="false"?0:fe.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(fe.FORCE_COLOR,10),3)}function by(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function yy(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=gy();n!==void 0&&(bs=n);let i=r?bs:n;if(i===0)return 0;if(r){if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2}if("TF_BUILD"in fe&&"AGENT_NAME"in fe)return 1;if(t&&!e&&i===void 0)return 0;let a=i||0;if(fe.TERM==="dumb")return a;if(Xi.platform==="win32"){let l=my.release().split(".");return Number(l[0])>=10&&Number(l[2])>=10586?Number(l[2])>=14931?3:2:1}if("CI"in fe)return"GITHUB_ACTIONS"in fe||"GITEA_ACTIONS"in fe?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(l=>l in fe)||fe.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in fe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(fe.TEAMCITY_VERSION)?1:0;if(fe.COLORTERM==="truecolor"||fe.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in fe){let l=Number.parseInt((fe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(fe.TERM_PROGRAM){case"iTerm.app":return l>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(fe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(fe.TERM)||"COLORTERM"in fe?1:a}function yf(t,e={}){let r=yy(t,{streamIsTTY:t&&t.isTTY,...e});return by(r)}var _y={stdout:yf({isTTY:bf.isatty(1)}),stderr:yf({isTTY:bf.isatty(2)})},_f=_y;var Rf=!0;function Sf(){Rf=!1}function Zi(t,e,r){return Rf?`\x1B[${e}m${t.join(" ")}\x1B[${r}m`:t.join(" ")}var Ji=(...t)=>Zi(t,31,39),dr=(...t)=>Zi(t,32,39);var ys=(...t)=>Zi(t,35,39);var Ry=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var eo=new Set(["__proto__","prototype","constructor"]),Sy=new Set("0123456789");function wy(t){let e=[],r="",n="start",i=!1;for(let a of t)switch(a){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=a),n="property",i=!i;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(i){i=!1,r+=a;break}if(eo.has(r))return[];e.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(i){i=!1,r+=a;break}if(n==="property"){if(eo.has(r))return[];e.push(r),r=""}n="index";break}case"]":{if(n==="index"){e.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!Sy.has(a))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),i&&(i=!1,r+="\\"),r+=a}}switch(i&&(r+="\\"),n){case"property":{if(eo.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function Ey(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function wf(t,e,r){if(!Ry(t)||typeof e!="string")return r===void 0?t:r;let n=wy(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){let a=n[i];if(Ey(t,a)?t=i===n.length-1?void 0:null:t=t[a],t==null){if(i!==n.length-1)return r;break}}return t===void 0?r:t}var to=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},Ef=t=>globalThis.DOMException===void 0?new to(t):new DOMException(t),Af=t=>{let e=t.reason===void 0?Ef("This operation was aborted."):t.reason;return e instanceof Error?e:Ef(e)};async function ro(t,e,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:i}={}){return new Promise((a,l)=>{if(t[Symbol.iterator]===void 0&&t[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);let f=[],c=[],h=new Map,b=!1,g=!1,m=!1,d=0,_=0,R=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),O=D=>{b=!0,g=!0,l(D)};i&&(i.aborted&&O(Af(i)),i.addEventListener("abort",()=>{O(Af(i))}));let x=async()=>{if(g)return;let D=await R.next(),L=_;if(_++,D.done){if(m=!0,d===0&&!g){if(!n&&c.length>0){O(new AggregateError(c));return}if(g=!0,h.size===0){a(f);return}let T=[];for(let[v,F]of f.entries())h.get(v)!==Tf&&T.push(F);a(T)}return}d++,(async()=>{try{let T=await D.value;if(g)return;let v=await e(T,L);v===Tf&&h.set(L,v),f[L]=v,d--,await x()}catch(T){if(n)O(T);else{c.push(T),d--;try{await x()}catch(v){O(v)}}}})()};(async()=>{for(let D=0;D<r;D++){try{await x()}catch(L){O(L);break}if(m||b)break}})()})}var Tf=Symbol("skip");async function no(t,e){return ro(t,r=>r(),e)}function pr(t,e){var r=0,n,i;e=e||{};function a(){var l=n,f=arguments.length,c,h;e:for(;l;){if(l.args.length!==arguments.length){l=l.next;continue}for(h=0;h<f;h++)if(l.args[h]!==arguments[h]){l=l.next;continue e}return l!==n&&(l===i&&(i=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=n,l.prev=null,n.prev=l,n=l),l.val}for(c=new Array(f),h=0;h<f;h++)c[h]=arguments[h];return l={args:c,val:t.apply(null,c)},n?(n.prev=l,l.next=n):i=l,r===e.maxSize?(i=i.prev,i.next=null):r++,n=l,l.val}return a.clear=function(){n=null,i=null,r=0},a}var Ao=Fe(jf(),1),_r;globalThis.fetch&&!f_?.node?_r=globalThis.fetch:_r=ci(Xn,{undici:!1});var $h=96,ut="\0",m_=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,g_=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,To=/^[0-9a-f]{7,}$/i,hh=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Os=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),b_=pr(vh.default.fromUrl),_o=pr(Th.default),$s=pr(t=>t.endsWith("/")?t.substring(0,t.length-1):t),y_=new Set(["patch"]),__=new Set(["patch","minor"]),R_=new Set(["patch","minor","major"]),Ih="15.0.3",Z=(0,Ah.default)(c_.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","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types","githubapi","pypiapi"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",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"}});(Z["no-color"]||!_f.stdout)&&Sf();var br=on(Wt(Z.greatest)),Ro=on(Wt(Z.prerelease)),So=on(Wt(Z.release)),dh=on(Wt(Z.patch)),ph=on(Wt(Z.minor)),mh=Wt(Z["allow-downgrade"]),et=(0,Ch.default)("npm",{registry:"https://registry.npmjs.org"}),wo={npmrc:et,recursive:!0},gh=Z.githubapi?$s(Z.githubapi):"https://api.github.com",S_=Z.pypiapi?$s(Z.pypiapi):"https://pypi.org",Lh=typeof Z.sockets=="number"?parseInt(Z.sockets):$h;function Mt(t,e){for(let r of e instanceof Set?e:[])if(r.test(t))return!0;return!1}var w_=pr((t,e)=>{let r=e[`${t}:registry`]||e.registry;return r.endsWith("/")?r:`${r}/`});function Ph(t,e,r){let n=vs(e,t);try{return p_(n),n}catch{}let i=Oh(e);return r&&n===r||i===e?null:Ph(t,i,r)}function E_(t,e){if(t.startsWith("@")){let r=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],n=$s(w_(r,et));if(n!==e)try{let i=_o(n,wo);if(i?.token)return[i,n]}catch{}return[_o(e,wo),e]}else return[_o(e,wo),e]}var Nh=pr((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${Ih}`,...r&&{Authorization:`${e} ${r}`}}}));async function A_(t,e,r,n){let[i,a]=E_(t,r),f=(e==="resolutions"?D_(t):t).replace(/\//g,"%2f"),c=`${a}/${f}`;Z.verbose&&console.error(`${ys("fetch")} ${c}`);let h=await _r(c,Nh(n,i?.type,i?.token));if(h?.ok)return Z.verbose&&console.error(`${dr("done")} ${c}`),[await h.json(),e,a,t];throw h?.status&&h?.statusText?new Error(`Received ${h.status} ${h.statusText} for ${t} from ${a}`):new Error(`Unable to fetch ${t} from ${a}`)}async function T_(t,e,r){let n=`${S_}/pypi/${t}/json`;Z.verbose&&console.error(`${ys("fetch")} ${n}`);let i=await _r(n,Nh(r));if(i?.ok)return Z.verbose&&console.error(`${dr("done")} ${n}`),[await i.json(),e,null,t];throw i?.status&&i?.statusText?new Error(`Received ${i.status} ${i.statusText} for ${t} from PyPi`):new Error(`Unable to fetch ${t} from PyPi`)}function bh({repository:t,homepage:e,info:r},n,i){r&&(t=r.project_urls.repository||r.project_urls.Repository||r.project_urls.repo||r.project_urls.Repo||r.project_urls.source||r.project_urls.Source||r.project_urls["source code"]||r.project_urls["Source Code"]||r.project_urls.homepage||r.project_urls.Homepage||`https://pypi.org/project/${i}/`);let a;if(n==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(t){let l=typeof t=="string"?t:t.url,f=b_(l),c=f?.browse?.();c&&(a=c),a&&t.directory&&f.treepath&&(a=`${a}/${f.treepath}/HEAD/${t.directory}`),!a&&t?.url&&/^https?:/.test(t.url)&&(a=t.url),!a&&l&&(a=l)}return a||e||""}function yh(t){Z.json?console.info(JSON.stringify({message:t})):console.info(t),yr()}function yr(t){if(t){let e=t.stack||t.message;Z.json?console.info(JSON.stringify({error:e})):console.info(Ji(e))}process.exit(t?1:0)}function C_(t={}){for(let r of Object.keys(t))for(let n of Object.values(t[r]))"oldPrint"in n&&(n.old=n.oldPrint,delete n.oldPrint),"newPrint"in n&&(n.new=n.newPrint,delete n.newPrint),"oldOriginal"in n&&(n.old=n.oldOriginal,delete n.oldOriginal);let e=0;for(let r of Object.keys(t))e+=Object.keys(t[r]).length;if(Z.json){let r={results:{}};for(let n of Object.keys(t))for(let[i,a]of Object.entries(t[n])){let[l,f]=i.split(ut);r.results[n]||(r.results[n]={}),r.results[n][l]||(r.results[n][l]={}),r.results[n][l][f]=a}console.info(JSON.stringify(r))}else e&&console.info(v_(t));return Z["error-on-outdated"]?e?2:0:Z["error-on-unchanged"]?e?0:2:0}async function x_(t,e){let{platform:r}=await import("node:os"),n=r()==="win32";n&&h_(t,0),d_(t,e,n?{flag:"r+"}:void 0)}function _h(t,e,r){if(t===e)return t;let n=t.split(/\./),i=e.split(/\./),a=/^[0-9a-zA-Z-.]+$/,l="";for(let f=0;f<n.length;f++)if(n[f]!==i[f]){a.test(n[f])?l+=r(n.slice(f).join(".")):l+=n[f].split("").map(c=>a.test(c)?r(c):c).join("")+r(`.${n.slice(f+1).join(".")}`);break}else l+=`${n[f]}.`;return l}function v_(t){let e=[["NAME","OLD","NEW","AGE","INFO"]],r=new Set;for(let n of Object.keys(t))for(let[i,a]of Object.entries(t[n])){let l=i.split(ut)[1],f=`${n}|${l}`;r.has(f)||(r.add(f),e.push([l,_h(a.old,a.new,Ji),_h(a.new,a.old,dr),a.age||"",a.info]))}return(0,xh.default)(e,{hsep:" ",stringLength:n=>n.replace(ni(),"").length})}function O_(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(ut)[1],a=e[n].oldOriginal||e[n].old,l=new RegExp(`"${Os(i)}": *"${Os(a)}"`,"g");r=r.replace(l,`"${i}": "${e[n].new}"`)}return r}function $_(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(ut)[1],a=e[n].oldOriginal||e[n].old,l=new RegExp(`${Os(i)} *= *"${Os(a)}"`,"g");r=r.replace(l,`${i} = "${e[n].new}"`)}return r}function I_(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Eo(t){let e=(0,ie.parse)(t);return e?!!e.prerelease.length:!1}function Hh(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function L_(t){try{return(0,ie.coerce)(t).version}catch{return null}}function P_(t,e,{range:r,semvers:n,usePre:i,useRel:a,useGreatest:l}={}){let f=L_(r),c=0;n=new Set(n),i=Hh(r)||i,i&&(n.add("prerelease"),n.has("patch")&&n.add("prepatch"),n.has("minor")&&n.add("preminor"),n.has("major")&&n.add("premajor"));for(let h of e){let b=(0,ie.parse)(h);if(b.prerelease.length&&(!i||a))continue;let g=(0,ie.diff)(f,b.version);if(!(!g||!n.has(g)))if(l||!("time"in t))(0,ie.gte)((0,ie.coerce)(b.version).version,f)&&(f=b.version);else{let m=new Date(t.time[h]).getTime();m>=0&&m>c&&(f=b.version,c=m)}}return f||null}function N_(t,{mode:e,range:r,useGreatest:n,useRel:i,usePre:a,semvers:l}={}){if(r==="*"||r.includes("||"))return null;let f=Object.keys(e==="pypi"?t.releases:t.versions).filter(h=>(0,ie.valid)(h)),c=P_(t,f,{range:r,semvers:l,usePre:a,useRel:i,useGreatest:n});if(n)return c;{let h,b;e==="pypi"?(b=t.info.version,h=(0,ie.coerce)(t.info.version).version):h=t["dist-tags"].latest;let g=(0,ie.coerce)(r).version,m=Hh(r),d=Eo(c),_=Eo(h),R=(0,ie.gt)(c,g);if(!i&&a||m&&d||i&&!R&&m&&!d||m&&!d&&R)return c;if(m&&!d&&!R)return null;let O=(0,ie.diff)(g,h);return O&&O!=="prerelease"&&!l.has(O.replace(/^pre/,""))||i&&Eo(h)?c:(0,ie.lt)(h,g)&&!_?mh===!0||Mt(t.name,mh)?h:null:b??h}}async function H_([t,e],{useGreatest:r}={}){let n=e.old.replace(m_,""),[i,a,l,f]=g_.exec(n)||[];if(!(!a||!l||!f))if(To.test(f)){let c={maxSockets:Lh},h=Cs.UPDATES_GITHUB_API_TOKEN||Cs.GITHUB_API_TOKEN||Cs.GH_TOKEN||Cs.HOMEBREW_GITHUB_API_TOKEN;h&&(c.headers={Authorization:`Bearer ${h}`});let b=`${gh}/repos/${a}/${l}/commits`;Z.verbose&&console.error(`${ys("fetch")} ${b}`);let g=await _r(b,c);if(Z.verbose&&g?.ok&&console.error(`${dr("done")} ${b}`),!g||!g.ok)return;let m=await g.json(),{sha:d,commit:_}=m[0];if(!d||!d.length)return;let R=_?.committer?.date??_?.author?.date;if(d=d.substring(0,f.length),f!==d){let O=e.old.replace(f,d);return{key:t,newRange:O,user:a,repo:l,oldRef:f,newRef:d,newDate:R}}}else{let c=await _r(`${gh}/repos/${a}/${l}/git/refs/tags`);if(!c||!c.ok)return;let b=(await c.json()).map(m=>m.ref.replace(/^refs\/tags\//,"")),g=f.replace(/^v/,"");if(!(0,ie.valid)(g))return;if(r){let m=f,d=f.replace(/^v/,"");for(let _ of b){let R=_.replace(/^v/,"");(0,ie.valid)(R)&&(!m||(0,ie.gt)(R,d))&&(m=_,d=R)}if((0,ie.neq)(g,d))return{key:t,newRange:m,user:a,repo:l,oldRef:f,newRef:m}}else{let m=b[b.length-1],d=m.replace(/^v/,"");if(!(0,ie.valid)(d))return;if((0,ie.neq)(g,d))return{key:t,newRange:m,user:a,repo:l,oldRef:f,newRef:m}}}}function D_(t){let e=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function B_(t){let e=t.match(hh);return e?.length!==1?t:t.replace(hh,(0,ie.coerce)(e[0]))}function Wt(t){return t===void 0?!1:t===""?!0:typeof t=="string"?t.includes(",")?new Set(t.split(",")):new Set([t]):Array.isArray(t)?new Set(t):!1}function Rh(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}async function Sh(t=[]){return[...(await import("node:tls")).rootCertificates,...t]}function Co(t,e){return e?/\/.+\//.test(t)?new RegExp(t.slice(1,-1)):Ao.default.makeRe(t):t instanceof RegExp?t:Ao.default.makeRe(t)}function on(t){if(t instanceof Set){let e=new Set;for(let r of t)e.add(Co(r,!0));return e}return t}function wh(t,e){let r=new Set;for(let n of t||[])r.add(Co(n,!0));for(let n of e||[])r.add(Co(n,!1));return r}function Eh(t,e,{include:r,exclude:n}){if(e==="pypi"&&t==="python")return!1;if(!r.size&&!n.size)return!0;for(let i of n)if(i.test(t))return!1;for(let i of r)if(i.test(t))return!0;return!r.size}function F_(t){let e=new Set;if(t)for(let r of t){let n;try{n=ch(r)}catch(i){throw new Error(`Unable to open ${r}: ${i.message}`)}if(n?.isFile())e.add(xs(r));else if(n?.isDirectory())for(let i of["package.json","pyproject.toml"]){let a=vs(r,i),l;try{l=ch(a)}catch{}l?.isFile()&&e.add(xs(a))}else throw new Error(`${r} is neither a file nor directory`)}else for(let r of["package.json","pyproject.toml"]){let n=l_(),i=Ph(r,n);i&&e.add(xs(i))}return e}async function q_(){for(let m of[process.stdout,process.stderr])m?._handle?.setBlocking?.(!0);let{help:t,version:e,file:r,types:n,update:i}=Z;t&&(u_.write(`usage: updates [options]
|
|
15
|
+
`,t}});var ha=x((Bd,la)=>{"use strict";la.exports=mf;var pf=na(),df=aa();function mf(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new pf;try{return e.parse(t),e.finish()}catch(r){throw df(r,t)}}});function tr({onlyFirst:t=!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,t?void 0:"g")}var or=ge(gs(),1);var Es=or.default.HttpProxyAgent,As=or.default.HttpsProxyAgent;var et=class extends Map{#s=0;#r=new Map;#e=new Map;#f;#T;#a;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.#f=e.maxSize,this.#T=e.maxAge||Number.POSITIVE_INFINITY,this.#a=e.onEviction}get __oldCache(){return this.#e}#m(e){if(typeof this.#a=="function")for(let[r,s]of e)this.#a(r,s.value)}#i(e,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof this.#a=="function"&&this.#a(e,r.value),this.delete(e)):!1}#n(e,r){if(this.#i(e,r)===!1)return r.value}#t(e,r){return r.expiry?this.#n(e,r):r.value}#h(e,r){let s=r.get(e);return this.#t(e,s)}#p(e,r){this.#r.set(e,r),this.#s++,this.#s>=this.#f&&(this.#s=0,this.#m(this.#e),this.#e=this.#r,this.#r=new Map)}#c(e,r){this.#e.delete(e),this.#p(e,r)}*#l(){for(let e of this.#e){let[r,s]=e;this.#r.has(r)||this.#i(r,s)===!1&&(yield e)}for(let e of this.#r){let[r,s]=e;this.#i(r,s)===!1&&(yield e)}}get(e){if(this.#r.has(e)){let r=this.#r.get(e);return this.#t(e,r)}if(this.#e.has(e)){let r=this.#e.get(e);if(this.#i(e,r)===!1)return this.#c(e,r),r.value}}set(e,r,{maxAge:s=this.#T}={}){let i=typeof s=="number"&&s!==Number.POSITIVE_INFINITY?Date.now()+s:void 0;return this.#r.has(e)?this.#r.set(e,{value:r,expiry:i}):this.#p(e,{value:r,expiry:i}),this}has(e){return this.#r.has(e)?!this.#i(e,this.#r.get(e)):this.#e.has(e)?!this.#i(e,this.#e.get(e)):!1}peek(e){if(this.#r.has(e))return this.#h(e,this.#r);if(this.#e.has(e))return this.#h(e,this.#e)}delete(e){let r=this.#r.delete(e);return r&&this.#s--,this.#e.delete(e)||r}clear(){this.#r.clear(),this.#e.clear(),this.#s=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let r=[...this.#l()],s=r.length-e;s<0?(this.#r=new Map(r),this.#e=new Map,this.#s=r.length):(s>0&&this.#m(r.slice(0,s)),this.#e=new Map(r.slice(s)),this.#r=new Map,this.#s=0),this.#f=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.#r){let[r,s]=e;this.#i(r,s)===!1&&(yield[r,s.value])}for(let e of this.#e){let[r,s]=e;this.#r.has(r)||this.#i(r,s)===!1&&(yield[r,s.value])}}*entriesDescending(){let e=[...this.#r];for(let r=e.length-1;r>=0;--r){let s=e[r],[i,n]=s;this.#i(i,n)===!1&&(yield[i,n.value])}e=[...this.#e];for(let r=e.length-1;r>=0;--r){let s=e[r],[i,n]=s;this.#r.has(i)||this.#i(i,n)===!1&&(yield[i,n.value])}}*entriesAscending(){for(let[e,r]of this.#l())yield[e,r.value]}get size(){if(!this.#s)return this.#e.size;let e=0;for(let r of this.#e.keys())this.#r.has(r)||e++;return Math.min(this.#s+e,this.#f)}get maxSize(){return this.#f}entries(){return this.entriesAscending()}forEach(e,r=this){for(let[s,i]of this.entriesAscending())e.call(r,i,s,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};var ws=ge(xs(),1);import{Agent as Ya}from"node:http";import{Agent as Qa}from"node:https";var Za={agentCacheSize:512},ys={maxSockets:64,keepAlive:!1},ar=class t extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,t)}};function lr(t,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let r={...Za,...e},s=new et({maxSize:r.agentCacheSize});async function i(o,a={}){let{origin:l,protocol:h}=new URL(o),p=a?.noProxy?null:(0,ws.getProxyForUrl)(o),u=JSON.stringify({proxyUrl:p,origin:l,...a});if(s.has(u))return s.get(u);let c;if("noProxy"in a&&delete a.noProxy,e.undici){let{ProxyAgent:f,Agent:A}=await import("undici"),g={...a};"keepAlive"in g&&!("pipelining"in g)&&(g.pipelining=g.keepAlive?1:0),"keepAlive"in g&&delete g.keepAlive,"maxSockets"in g&&(g.connections=g.maxSockets,delete g.maxSockets),p?c=new f({...g,uri:p}):c=new A(g)}else{let f=h==="https:";p?c=new(f?As:Es)({...a,proxy:p}):c=new(f?Qa:Ya)(a)}return s.set(u,c),c}let n=(o,{timeout:a=0,agentOpts:l={},...h}={})=>new Promise(async(p,u)=>{if(!e.undici&&!("agent"in h)){let A=await i(o,{...ys,...l});A&&(h.agent=A)}else if(e.undici&&!("dispatcher"in h)){let A=await i(o,{...ys,...l});A&&(h.dispatcher=A)}let c,f;a&&(!("signal"in h)&&globalThis.AbortController&&(f=new AbortController,h.signal=f.signal),c=setTimeout(()=>{f?.abort?.();let A=new ar(`${h.method||"GET"} ${o} timed out after ${a}ms`);u(A)},a),c?.unref?.()),t(o,h).then(A=>{c&&clearTimeout(c),p(A)}).catch(A=>{if(c&&clearTimeout(c),A.name==="AbortError")return p(null);u(A)})});return n.clearCache=()=>{for(let o of s.values())"destroy"in o&&o.destroy();s.clear()},n}var ba=ge(hr(),1),Ca=ge(Js(),1),Sa=ge(pr(),1),W=ge(Qn(),1),$a=ge(ro(),1),va=ge(Eo(),1);import{cwd as gf,stdout as Ef,argv as Af,env as Xt,exit as ca,versions as Rf}from"node:process";import{join as Qt,dirname as Oa,basename as is,resolve as Yt}from"node:path";import{lstatSync as ua,readFileSync as fa,truncateSync as xf,writeFileSync as yf,accessSync as wf}from"node:fs";var xu=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],yu={"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 Ft(t,{now:e,noAffix:r=!1,times:s=xu,nowThreshold:i=2e3,nowString:n="now",aliases:o=!1,aliasesMap:a=yu}={}){if(t=typeof t=="number"?t:Date.parse(t),e=e?typeof e=="number"?e:Date.parse(e):new Date,Number.isNaN(t))return"unknown";let l=!1,h=e-t;if(h<0&&(l=!0,h=Math.abs(h)),h<i)return n;let p,u;for(let f=0,A=s.length;f<A;f++){let g=s[f];if(!(h>=g[1])){p=Math.floor(h/g[0]),u=g[2]+(p>1?"s":"");break}}let c=`${l&&!r?"in ":""}${p} ${u}${!l&&!r?" ago":""}`;return o?a[c]??c:c}import Fr from"node:process";import wu from"node:os";import Ao from"node:tty";function ue(t,e=globalThis.Deno?globalThis.Deno.args:Fr.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:X}=Fr,qt;ue("no-color")||ue("no-colors")||ue("color=false")||ue("color=never")?qt=0:(ue("color")||ue("colors")||ue("color=true")||ue("color=always"))&&(qt=1);function _u(){if("FORCE_COLOR"in X)return X.FORCE_COLOR==="true"?1:X.FORCE_COLOR==="false"?0:X.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(X.FORCE_COLOR,10),3)}function Tu(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function bu(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let s=_u();s!==void 0&&(qt=s);let i=r?qt:s;if(i===0)return 0;if(r){if(ue("color=16m")||ue("color=full")||ue("color=truecolor"))return 3;if(ue("color=256"))return 2}if("TF_BUILD"in X&&"AGENT_NAME"in X)return 1;if(t&&!e&&i===void 0)return 0;let n=i||0;if(X.TERM==="dumb")return n;if(Fr.platform==="win32"){let o=wu.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in X)return"GITHUB_ACTIONS"in X||"GITEA_ACTIONS"in X?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in X)||X.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor"||X.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in X){let o=Number.parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:n}function Ro(t,e={}){let r=bu(t,{streamIsTTY:t&&t.isTTY,...e});return Tu(r)}var Cu={stdout:Ro({isTTY:Ao.isatty(1)}),stderr:Ro({isTTY:Ao.isatty(2)})},xo=Cu;var yo=!0;function wo(){yo=!1}function qr(t,e,r){return yo?`\x1B[${e}m${t.join(" ")}\x1B[${r}m`:t.join(" ")}var Br=(...t)=>qr(t,31,39),Ve=(...t)=>qr(t,32,39);var Bt=(...t)=>qr(t,35,39);var Su=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var Gr=new Set(["__proto__","prototype","constructor"]),$u=new Set("0123456789");function vu(t){let e=[],r="",s="start",i=!1;for(let n of t)switch(n){case"\\":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=n),s="property",i=!i;break}case".":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="property";break}if(i){i=!1,r+=n;break}if(Gr.has(r))return[];e.push(r),r="",s="property";break}case"[":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="index";break}if(i){i=!1,r+=n;break}if(s==="property"){if(Gr.has(r))return[];e.push(r),r=""}s="index";break}case"]":{if(s==="index"){e.push(Number.parseInt(r,10)),r="",s="indexEnd";break}if(s==="indexEnd")throw new Error("Invalid character after an index")}default:{if(s==="index"&&!$u.has(n))throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");s==="start"&&(s="property"),i&&(i=!1,r+="\\"),r+=n}}switch(i&&(r+="\\"),s){case"property":{if(Gr.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function Ou(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function _o(t,e,r){if(!Su(t)||typeof e!="string")return r===void 0?t:r;let s=vu(e);if(s.length===0)return r;for(let i=0;i<s.length;i++){let n=s[i];if(Ou(t,n)?t=i===s.length-1?void 0:null:t=t[n],t==null){if(i!==s.length-1)return r;break}}return t===void 0?r:t}var jr=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},To=t=>globalThis.DOMException===void 0?new jr(t):new DOMException(t),bo=t=>{let e=t.reason===void 0?To("This operation was aborted."):t.reason;return e instanceof Error?e:To(e)};async function zr(t,e,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:s=!0,signal:i}={}){return new Promise((n,o)=>{if(t[Symbol.iterator]===void 0&&t[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);let a=[],l=[],h=new Map,p=!1,u=!1,c=!1,f=0,A=0,g=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),I=S=>{p=!0,u=!0,o(S)};i&&(i.aborted&&I(bo(i)),i.addEventListener("abort",()=>{I(bo(i))}));let b=async()=>{if(u)return;let S=await g.next(),N=A;if(A++,S.done){if(c=!0,f===0&&!u){if(!s&&l.length>0){I(new AggregateError(l));return}if(u=!0,h.size===0){n(a);return}let y=[];for(let[C,L]of a.entries())h.get(C)!==Co&&y.push(L);n(y)}return}f++,(async()=>{try{let y=await S.value;if(u)return;let C=await e(y,N);C===Co&&h.set(N,C),a[N]=C,f--,await b()}catch(y){if(s)I(y);else{l.push(y),f--;try{await b()}catch(C){I(C)}}}})()};(async()=>{for(let S=0;S<r;S++){try{await b()}catch(N){I(N);break}if(c||p)break}})()})}var Co=Symbol("skip");async function Wr(t,e){return zr(t,r=>r(),e)}function Ke(t,e){var r=0,s,i;e=e||{};function n(){var o=s,a=arguments.length,l,h;e:for(;o;){if(o.args.length!==arguments.length){o=o.next;continue}for(h=0;h<a;h++)if(o.args[h]!==arguments[h]){o=o.next;continue e}return o!==s&&(o===i&&(i=o.prev),o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=s,o.prev=null,s.prev=o,s=o),o.val}for(l=new Array(a),h=0;h<a;h++)l[h]=arguments[h];return o={args:l,val:t.apply(null,l)},s?(s.prev=o,o.next=s):i=o,r===e.maxSize?(i=i.prev,i.next=null):r++,s=o,o.val}return n.clear=function(){s=null,i=null,r=0},n}var cs=ge(ko(),1),Je;Rf?.bun?Je=globalThis.fetch:Je=lr(globalThis.fetch,{undici:!0});var Ia=96,Te="\0",_f=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,Tf=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,us=/^[0-9a-f]{7,}$/i,pa=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Zt=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),bf=Ke(va.default.fromUrl),ns=Ke(Ca.default),Jt=Ke(t=>t.endsWith("/")?t.substring(0,t.length-1):t),Cf=new Set(["patch"]),Sf=new Set(["patch","minor"]),$f=new Set(["patch","minor","major"]),Na="15.1.0",F=(0,ba.default)(Af.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","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types","githubapi","pypiapi"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",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"}});(F["no-color"]||!xo.stdout)&&wo();var Qe=Et(Ue(F.greatest)),os=Et(Ue(F.prerelease)),as=Et(Ue(F.release)),da=Et(Ue(F.patch)),ma=Et(Ue(F.minor)),ga=Ue(F["allow-downgrade"]),Re=(0,Sa.default)("npm",{registry:"https://registry.npmjs.org"}),ls={npmrc:Re,recursive:!0},Ea=F.githubapi?Jt(F.githubapi):"https://api.github.com",vf=F.pypiapi?Jt(F.pypiapi):"https://pypi.org",La=typeof F.sockets=="number"?parseInt(F.sockets):Ia;function Pe(t,e){for(let r of e instanceof Set?e:[])if(r.test(t))return!0;return!1}var Of=Ke((t,e)=>{let r=e[`${t}:registry`]||e.registry;return r.endsWith("/")?r:`${r}/`});function Ha(t,e,r){let s=Qt(e,t);try{return wf(s),s}catch{}let i=Oa(e);return r&&s===r||i===e?null:Ha(t,i,r)}function If(t,e){if(t.startsWith("@")){let r=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],s=Jt(Of(r,Re));if(s!==e)try{let i=ns(s,ls);if(i?.token)return[i,s]}catch{}return[ns(e,ls),e]}else return[ns(e,ls),e]}var Da=Ke((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${Na}`,...r&&{Authorization:`${e} ${r}`}}}));async function Nf(t,e,r,s){let[i,n]=If(t,r),a=(e==="resolutions"?zf(t):t).replace(/\//g,"%2f"),l=`${n}/${a}`;F.verbose&&console.error(`${Bt("fetch")} ${l}`);let h=await Je(l,Da(s,i?.type,i?.token));if(h?.ok)return F.verbose&&console.error(`${Ve("done")} ${l}`),[await h.json(),e,n,t];throw h?.status&&h?.statusText?new Error(`Received ${h.status} ${h.statusText} for ${t} from ${n}`):new Error(`Unable to fetch ${t} from ${n}`)}async function Lf(t,e,r){let s=`${vf}/pypi/${t}/json`;F.verbose&&console.error(`${Bt("fetch")} ${s}`);let i=await Je(s,Da(r));if(i?.ok)return F.verbose&&console.error(`${Ve("done")} ${s}`),[await i.json(),e,null,t];throw i?.status&&i?.statusText?new Error(`Received ${i.status} ${i.statusText} for ${t} from PyPi`):new Error(`Unable to fetch ${t} from PyPi`)}function Aa({repository:t,homepage:e,info:r},s,i){r&&(t=r.project_urls.repository||r.project_urls.Repository||r.project_urls.repo||r.project_urls.Repo||r.project_urls.source||r.project_urls.Source||r.project_urls["source code"]||r.project_urls["Source Code"]||r.project_urls.homepage||r.project_urls.Homepage||`https://pypi.org/project/${i}/`);let n;if(s==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(t){let o=typeof t=="string"?t:t.url,a=bf(o),l=a?.browse?.();l&&(n=l),n&&t.directory&&a.treepath&&(n=`${n}/${a.treepath}/HEAD/${t.directory}`),!n&&t?.url&&/^https?:/.test(t.url)&&(n=t.url),!n&&o&&(n=o)}return n||e||""}function Ra(t){F.json?console.info(JSON.stringify({message:t})):console.info(t),Ze()}function Ze(t){if(t){let e=t.stack||t.message;F.json?console.info(JSON.stringify({error:e})):console.info(Br(e))}process.exit(t?1:0)}function Hf(t={}){for(let r of Object.keys(t))for(let s of Object.values(t[r]))"oldPrint"in s&&(s.old=s.oldPrint,delete s.oldPrint),"newPrint"in s&&(s.new=s.newPrint,delete s.newPrint),"oldOriginal"in s&&(s.old=s.oldOriginal,delete s.oldOriginal);let e=0;for(let r of Object.keys(t))e+=Object.keys(t[r]).length;if(F.json){let r={results:{}};for(let s of Object.keys(t))for(let[i,n]of Object.entries(t[s])){let[o,a]=i.split(Te);r.results[s]||(r.results[s]={}),r.results[s][o]||(r.results[s][o]={}),r.results[s][o][a]=n}console.info(JSON.stringify(r))}else e&&console.info(Pf(t));return F["error-on-outdated"]?e?2:0:F["error-on-unchanged"]?e?0:2:0}async function Df(t,e){let{platform:r}=await import("node:os"),s=r()==="win32";s&&xf(t,0),yf(t,e,s?{flag:"r+"}:void 0)}function xa(t,e,r){if(t===e)return t;let s=t.split(/\./),i=e.split(/\./),n=/^[0-9a-zA-Z-.]+$/,o="";for(let a=0;a<s.length;a++)if(s[a]!==i[a]){n.test(s[a])?o+=r(s.slice(a).join(".")):o+=s[a].split("").map(l=>n.test(l)?r(l):l).join("")+r(`.${s.slice(a+1).join(".")}`);break}else o+=`${s[a]}.`;return o}function Pf(t){let e=[["NAME","OLD","NEW","AGE","INFO"]],r=new Set;for(let s of Object.keys(t))for(let[i,n]of Object.entries(t[s])){let o=i.split(Te)[1],a=`${s}|${o}`;r.has(a)||(r.add(a),e.push([o,xa(n.old,n.new,Br),xa(n.new,n.old,Ve),n.age||"",n.info]))}return(0,$a.default)(e,{hsep:" ",stringLength:s=>s.replace(tr(),"").length})}function Uf(t,e){let r=t;for(let s of Object.keys(e)){let i=s.split(Te)[1],n=e[s].oldOriginal||e[s].old,o=new RegExp(`"${Zt(i)}": *"${Zt(n)}"`,"g");r=r.replace(o,`"${i}": "${e[s].new}"`)}return r}function Mf(t,e){let r=t;for(let s of Object.keys(e)){let i=s.split(Te)[1],n=e[s].oldOriginal||e[s].old,o=new RegExp(`${Zt(i)} *= *"${Zt(n)}"`,"g");r=r.replace(o,`${i} = "${e[s].new}"`)}return r}function Ff(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function hs(t){let e=(0,W.parse)(t);return e?!!e.prerelease.length:!1}function Pa(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function qf(t){try{return(0,W.coerce)(t).version}catch{return null}}function Bf(t,e,{range:r,semvers:s,usePre:i,useRel:n,useGreatest:o}={}){let a=qf(r),l=0;s=new Set(s),i=Pa(r)||i,i&&(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 p=(0,W.parse)(h);if(p.prerelease.length&&(!i||n))continue;let u=(0,W.diff)(a,p.version);if(!(!u||!s.has(u)))if(o||!("time"in t))(0,W.gte)((0,W.coerce)(p.version).version,a)&&(a=p.version);else{let c=new Date(t.time[h]).getTime();c>=0&&c>l&&(a=p.version,l=c)}}return a||null}function Gf(t,{mode:e,range:r,useGreatest:s,useRel:i,usePre:n,semvers:o}={}){if(r==="*"||r.includes("||"))return null;let a=Object.keys(e==="pypi"?t.releases:t.versions).filter(h=>(0,W.valid)(h)),l=Bf(t,a,{range:r,semvers:o,usePre:n,useRel:i,useGreatest:s});if(s)return l;{let h,p;e==="pypi"?(p=t.info.version,h=(0,W.coerce)(t.info.version).version):h=t["dist-tags"].latest;let u=(0,W.coerce)(r).version,c=Pa(r),f=hs(l),A=hs(h),g=(0,W.gt)(l,u);if(!i&&n||c&&f||i&&!g&&c&&!f||c&&!f&&g)return l;if(c&&!f&&!g)return null;let I=(0,W.diff)(u,h);return I&&I!=="prerelease"&&!o.has(I.replace(/^pre/,""))||i&&hs(h)?l:(0,W.lt)(h,u)&&!A?ga===!0||Pe(t.name,ga)?h:null:p??h}}async function jf([t,e],{useGreatest:r}={}){let s=e.old.replace(_f,""),[i,n,o,a]=Tf.exec(s)||[];if(!(!n||!o||!a))if(us.test(a)){let l={maxSockets:La},h=Xt.UPDATES_GITHUB_API_TOKEN||Xt.GITHUB_API_TOKEN||Xt.GH_TOKEN||Xt.HOMEBREW_GITHUB_API_TOKEN;h&&(l.headers={Authorization:`Bearer ${h}`});let p=`${Ea}/repos/${n}/${o}/commits`;F.verbose&&console.error(`${Bt("fetch")} ${p}`);let u=await Je(p,l);if(F.verbose&&u?.ok&&console.error(`${Ve("done")} ${p}`),!u||!u.ok)return;let c=await u.json(),{sha:f,commit:A}=c[0];if(!f||!f.length)return;let g=A?.committer?.date??A?.author?.date;if(f=f.substring(0,a.length),a!==f){let I=e.old.replace(a,f);return{key:t,newRange:I,user:n,repo:o,oldRef:a,newRef:f,newDate:g}}}else{let l=await Je(`${Ea}/repos/${n}/${o}/git/refs/tags`);if(!l||!l.ok)return;let p=(await l.json()).map(c=>c.ref.replace(/^refs\/tags\//,"")),u=a.replace(/^v/,"");if(!(0,W.valid)(u))return;if(r){let c=a,f=a.replace(/^v/,"");for(let A of p){let g=A.replace(/^v/,"");(0,W.valid)(g)&&(!c||(0,W.gt)(g,f))&&(c=A,f=g)}if((0,W.neq)(u,f))return{key:t,newRange:c,user:n,repo:o,oldRef:a,newRef:c}}else{let c=p[p.length-1],f=c.replace(/^v/,"");if(!(0,W.valid)(f))return;if((0,W.neq)(u,f))return{key:t,newRange:c,user:n,repo:o,oldRef:a,newRef:c}}}}function zf(t){let e=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Wf(t){let e=t.match(pa);return e?.length!==1?t:t.replace(pa,(0,W.coerce)(e[0]))}function Ue(t){return t===void 0?!1:t===""?!0:typeof t=="string"?t.includes(",")?new Set(t.split(",")):new Set([t]):Array.isArray(t)?new Set(t):!1}function ya(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}async function wa(t=[]){return[...(await import("node:tls")).rootCertificates,...t]}function fs(t,e){return e?/\/.+\//.test(t)?new RegExp(t.slice(1,-1)):cs.default.makeRe(t):t instanceof RegExp?t:cs.default.makeRe(t)}function Et(t){if(t instanceof Set){let e=new Set;for(let r of t)e.add(fs(r,!0));return e}return t}function _a(t,e){let r=new Set;for(let s of t||[])r.add(fs(s,!0));for(let s of e||[])r.add(fs(s,!1));return r}function Ta(t,e,{include:r,exclude:s}){if(e==="pypi"&&t==="python")return!1;if(!r.size&&!s.size)return!0;for(let i of s)if(i.test(t))return!1;for(let i of r)if(i.test(t))return!0;return!r.size}function kf(t){let e=new Set;if(t)for(let r of t){let s;try{s=ua(r)}catch(i){throw new Error(`Unable to open ${r}: ${i.message}`)}if(s?.isFile())e.add(Yt(r));else if(s?.isDirectory())for(let i of["package.json","pyproject.toml"]){let n=Qt(r,i),o;try{o=ua(n)}catch{}o?.isFile()&&e.add(Yt(n))}else throw new Error(`${r} is neither a file nor directory`)}else for(let r of["package.json","pyproject.toml"]){let s=gf(),i=Ha(r,s);i&&e.add(Yt(i))}return e}async function Vf(){for(let c of[process.stdout,process.stderr])c?._handle?.setBlocking?.(!0);let{help:t,version:e,file:r,types:s,update:i}=F;t&&(Ef.write(`usage: updates [options]
|
|
29
16
|
|
|
30
17
|
Options:
|
|
31
18
|
-u, --update Update versions and write package file
|
|
@@ -42,7 +29,7 @@ Content-Type: ${a.type||"application/octet-stream"}\r
|
|
|
42
29
|
-E, --error-on-outdated Exit with code 2 when updates are available and 0 when not
|
|
43
30
|
-U, --error-on-unchanged Exit with code 0 when updates are available and 2 when not
|
|
44
31
|
-r, --registry <url> Override npm registry URL
|
|
45
|
-
-S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${
|
|
32
|
+
-S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${Ia}
|
|
46
33
|
-j, --json Output a JSON object
|
|
47
34
|
-n, --no-color Disable color output
|
|
48
35
|
-v, --version Print the version
|
|
@@ -56,4 +43,4 @@ Content-Type: ${a.type||"application/octet-stream"}\r
|
|
|
56
43
|
$ updates -e '/^react-(dom)?/'
|
|
57
44
|
$ updates -f package.json
|
|
58
45
|
$ updates -f pyproject.toml
|
|
59
|
-
`),
|
|
46
|
+
`),ca(0)),e&&(console.info(Na),ca(0));let n={},o={},a={},l={},h=0;for(let c of kf(Ue(r))){let f=Oa(Yt(c)),A=is(c),g;A==="pyproject.toml"?g="pypi":g="npm",l[g]=c,n[g]||(n[g]={});let I={};try{I=(await import(Qt(f,"updates.config.js"))).default}catch{try{I=(await import(Qt(f,"updates.config.mjs"))).default}catch{}}let b,S;F.include&&F.include!==!0&&(b=(Array.isArray(F.include)?F.include:[F.include]).flatMap(d=>d.split(","))),F.exclude&&F.exclude!==!0&&(S=(Array.isArray(F.exclude)?F.exclude:[F.exclude]).flatMap(d=>d.split(",")));let N=_a(b,I?.include),y=_a(S,I?.exclude),C={};if(g==="npm"&&(Re["strict-ssl"]===!1&&(C.rejectUnauthorized=!1),"cafile"in Re&&(C.ca=wa(ya(fa(Re.cafile,"utf8")))),"ca"in Re)){let d=Array.isArray(Re.ca)?Re.ca:[Re.ca];C.ca=wa(d.map(z=>ya(z)))}let L;s?L=Array.isArray(s)?s:s.split(","):"types"in I&&Array.isArray(I.types)?L=I.types:g==="npm"?L=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"]:L=["tool.poetry.dependencies","tool.poetry.dev-dependencies","tool.poetry.test-dependencies","tool.poetry.group.dev.dependencies","tool.poetry.group.test.dependencies"];let $;try{a[g]=fa(c,"utf8")}catch(d){throw new Error(`Unable to open ${c}: ${d.message}`)}try{g==="npm"?$=JSON.parse(a[g]):$=(await Promise.resolve().then(()=>ge(ha(),1))).default(a[g])}catch(d){throw new Error(`Error parsing ${c}: ${d.message}`)}for(let d of L){let z;g==="npm"?z=$[d]||{}:z=_o($,d)||{};for(let[U,B]of Object.entries(z))(0,W.validRange)(B)&&Ta(U,g,{include:N,exclude:y})?n[g][`${d}${Te}${U}`]={old:Wf(B),oldOriginal:B}:g==="npm"&&Ta(U,g,{include:N,exclude:y})&&(o[`${d}${Te}${U}`]={old:B})}if(h+=Object.keys(n[g]).length+Object.keys(o).length,!h)continue;let O;g==="npm"&&(O=Jt(F.registry||I.registry||Re.registry));let v=await Wr(Object.keys(n[g]).map(d=>()=>{let[z,U]=d.split(Te);return g==="npm"?Nf(U,z,O,C):Lf(U,z,C)}),{concurrency:La});for(let[d,z,U,B]of v){if(d?.error)throw new Error(d.error);let m=typeof Qe=="boolean"?Qe:Pe(d.name,Qe),E=typeof os=="boolean"?os:Pe(d.name,os),ee=typeof as=="boolean"?as:Pe(d.name,as),P;da===!0||Pe(d.name,da)?P=Cf:ma===!0||Pe(d.name,ma)?P=Sf:P=$f;let q=`${z}${Te}${B}`,le=n[g][q].old,Q=Gf(d,{usePre:E,useRel:ee,useGreatest:m,semvers:P,range:le,mode:g}),fe=Ff(le,Q);!Q||le===fe?delete n[g][q]:(n[g][q].new=fe,g==="npm"?n[g][q].info=Aa(d?.versions?.[Q],U,d.name):n[g][q].info=Aa(d,U,d.info.name),d.time?.[Q]?n[g][q].age=Ft(d.time[Q],{noAffix:!0}):d.releases?.[Q]?.[0]?.upload_time_iso_8601&&(n[g][q].age=Ft(d.releases[Q][0].upload_time_iso_8601,{noAffix:!0})))}if(Object.keys(o).length){let d=await Promise.all(Object.entries(o).map(([z,U])=>{let B=z.split(Te)[1],m=typeof Qe=="boolean"?Qe:Pe(B,Qe);return jf([z,U],{useGreatest:m})}));for(let z of(d||[]).filter(Boolean)){let{key:U,newRange:B,user:m,repo:E,oldRef:ee,newRef:P,newDate:q}=z;n[g][U]={old:o[U].old,new:B,oldPrint:us.test(ee)?ee.substring(0,7):ee,newPrint:us.test(P)?P.substring(0,7):P,info:`https://github.com/${m}/${E}`,...q?{age:Ft(q,{noAffix:!0})}:{}}}}}h===0&&(Ra("No dependencies found, nothing to do."),Ze());let p=0;for(let c of Object.keys(n))p+=Object.keys(n[c]).length;p||(Ra("All dependencies are up to date."),Ze());let u=Hf(n);if(i){for(let c of Object.keys(n))if(Object.keys(n[c]).length){try{let f;c==="npm"?f=Uf:f=Mf,await Df(l[c],f(a[c],n[c]))}catch(f){throw new Error(`Error writing ${is(l[c])}: ${f.message}`)}console.info(Ve(`\u2728 ${is(l[c])} updated`))}}Ze(u)}Vf().catch(Ze).then(Ze);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "updates",
|
|
3
|
-
"version": "15.0
|
|
3
|
+
"version": "15.1.0",
|
|
4
4
|
"description": "Flexible npm and poetry dependency update tool",
|
|
5
5
|
"author": "silverwind",
|
|
6
6
|
"repository": "silverwind/updates",
|
|
@@ -17,18 +17,17 @@
|
|
|
17
17
|
"@iarna/toml": "2.2.5",
|
|
18
18
|
"ansi-regex": "6.0.1",
|
|
19
19
|
"dot-prop": "8.0.2",
|
|
20
|
-
"esbuild": "0.19.
|
|
21
|
-
"eslint": "8.
|
|
22
|
-
"eslint-config-silverwind": "79.
|
|
20
|
+
"esbuild": "0.19.8",
|
|
21
|
+
"eslint": "8.55.0",
|
|
22
|
+
"eslint-config-silverwind": "79.3.6",
|
|
23
23
|
"execa": "8.0.1",
|
|
24
24
|
"fetch-enhanced": "12.0.0",
|
|
25
25
|
"glowie": "1.2.0",
|
|
26
26
|
"hosted-git-info": "7.0.1",
|
|
27
27
|
"memize": "2.1.0",
|
|
28
28
|
"minimist": "1.2.8",
|
|
29
|
-
"node-fetch": "3.3.2",
|
|
30
29
|
"p-all": "5.0.0",
|
|
31
|
-
"picomatch": "
|
|
30
|
+
"picomatch": "3.0.1",
|
|
32
31
|
"rc": "1.2.8",
|
|
33
32
|
"registry-auth-token": "4.2.2",
|
|
34
33
|
"restana": "4.9.7",
|
|
@@ -36,8 +35,9 @@
|
|
|
36
35
|
"supports-color": "9.4.0",
|
|
37
36
|
"text-table": "0.2.0",
|
|
38
37
|
"timerel": "5.4.3",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"vitest
|
|
38
|
+
"undici": "6.2.0",
|
|
39
|
+
"versions": "12.0.0",
|
|
40
|
+
"vitest": "1.0.1",
|
|
41
|
+
"vitest-config-silverwind": "5.0.0"
|
|
42
42
|
}
|
|
43
43
|
}
|