updates 14.2.9 → 14.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/updates.js +10 -10
  2. package/package.json +9 -9
package/bin/updates.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import {createRequire} from 'module';const require = createRequire(import.meta.url);
3
- var md=Object.create;var Ms=Object.defineProperty;var gd=Object.getOwnPropertyDescriptor;var bd=Object.getOwnPropertyNames;var yd=Object.getPrototypeOf,_d=Object.prototype.hasOwnProperty;var ye=(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 Ar=(t,e)=>()=>(t&&(e=t(t=0)),e);var C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),wd=(t,e)=>{for(var r in e)Ms(t,r,{get:e[r],enumerable:!0})},Sd=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bd(e))!_d.call(t,i)&&i!==r&&Ms(t,i,{get:()=>e[i],enumerable:!(n=gd(e,i))||n.enumerable});return t};var Se=(t,e,r)=>(r=t!=null?md(yd(t)):{},Sd(e||!t||!t.__esModule?Ms(r,"default",{value:t,enumerable:!0}):r,t));var fa=C((vy,ha)=>{"use strict";var Ws=ye("https"),js=ye("http"),{URL:ca}=ye("url"),Vs=class extends js.Agent{constructor(e){let{proxy:r,proxyRequestOptions:n,...i}=e;super(i),this.proxy=typeof r=="string"?new ca(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:"?js:Ws).request(n);i.once("connect",(a,u,h)=>{i.removeAllListeners(),u.removeAllListeners(),a.statusCode===200?r(null,u):(u.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()}},Gs=class extends Ws.Agent{constructor(e){let{proxy:r,proxyRequestOptions:n,...i}=e;super(i),this.proxy=typeof r=="string"?new ca(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:"?js:Ws).request(n);i.once("connect",(a,u,h)=>{if(i.removeAllListeners(),u.removeAllListeners(),a.statusCode===200){let f=super.createConnection({...e,socket:u});r(null,f)}else u.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()}};ha.exports={HttpProxyAgent:Vs,HttpsProxyAgent:Gs}});var ga=C(ma=>{"use strict";var Rd=ye("url").parse,Ed={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Td=String.prototype.endsWith||function(t){return t.length<=this.length&&this.indexOf(t,this.length-t.length)!==-1};function Ad(t){var e=typeof t=="string"?Rd(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)||Ed[r]||0,!Cd(n,i)))return"";var a=zt("npm_config_"+r+"_proxy")||zt(r+"_proxy")||zt("npm_config_proxy")||zt("all_proxy");return a&&a.indexOf("://")===-1&&(a=r+"://"+a),a}function Cd(t,e){var r=(zt("npm_config_no_proxy")||zt("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,u=i?parseInt(i[2]):0;return u&&u!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!Td.call(t,a)):t!==a}):!0}function zt(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}ma.getProxyForUrl=Ad});var Xs=C((Hy,Sa)=>{"use strict";function Id(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 _a(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function wa(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}Sa.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($){return r.bools[$]})}Object.keys(e.alias||{}).forEach(function(T){n[T]=[].concat(e.alias[T]),n[T].forEach(function($){n[$]=[T].concat(n[T].filter(function(D){return $!==D}))})}),[].concat(e.string).filter(Boolean).forEach(function(T){r.strings[T]=!0,n[T]&&[].concat(n[T]).forEach(function($){r.strings[$]=!0})});var a=e.default||{},u={_:[]};function h(T,$){return r.allBools&&/^--[^=]+$/.test($)||r.strings[T]||r.bools[T]||n[T]}function f(T,$,D){for(var H=T,V=0;V<$.length-1;V++){var X=$[V];if(wa(H,X))return;H[X]===void 0&&(H[X]={}),(H[X]===Object.prototype||H[X]===Number.prototype||H[X]===String.prototype)&&(H[X]={}),H[X]===Array.prototype&&(H[X]=[]),H=H[X]}var J=$[$.length-1];wa(H,J)||((H===Object.prototype||H===Number.prototype||H===String.prototype)&&(H={}),H===Array.prototype&&(H=[]),H[J]===void 0||r.bools[J]||typeof H[J]=="boolean"?H[J]=D:Array.isArray(H[J])?H[J].push(D):H[J]=[H[J],D])}function c(T,$,D){if(!(D&&r.unknownFn&&!h(T,D)&&r.unknownFn(D)===!1)){var H=!r.strings[T]&&_a($)?Number($):$;f(u,T.split("."),H),(n[T]||[]).forEach(function(V){f(u,V.split("."),H)})}}Object.keys(r.bools).forEach(function(T){c(T,a[T]===void 0?!1:a[T])});var g=[];t.indexOf("--")!==-1&&(g=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var b=0;b<t.length;b++){var m=t[b],p,_;if(/^--.+=/.test(m)){var E=m.match(/^--([^=]+)=([\s\S]*)$/);p=E[1];var R=E[2];r.bools[p]&&(R=R!=="false"),c(p,R,m)}else if(/^--no-.+/.test(m))p=m.match(/^--no-(.+)/)[1],c(p,!1,m);else if(/^--.+/.test(m))p=m.match(/^--(.+)/)[1],_=t[b+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!r.bools[p]&&!r.allBools&&(!n[p]||!i(p))?(c(p,_,m),b+=1):/^(true|false)$/.test(_)?(c(p,_==="true",m),b+=1):c(p,r.strings[p]?"":!0,m);else if(/^-[^-]+/.test(m)){for(var A=m.slice(1,-1).split(""),N=!1,L=0;L<A.length;L++){if(_=m.slice(L+2),_==="-"){c(A[L],_,m);continue}if(/[A-Za-z]/.test(A[L])&&_[0]==="="){c(A[L],_.slice(1),m),N=!0;break}if(/[A-Za-z]/.test(A[L])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){c(A[L],_,m),N=!0;break}if(A[L+1]&&A[L+1].match(/\W/)){c(A[L],m.slice(L+2),m),N=!0;break}else c(A[L],r.strings[A[L]]?"":!0,m)}p=m.slice(-1)[0],!N&&p!=="-"&&(t[b+1]&&!/^(-|--)[^-]/.test(t[b+1])&&!r.bools[p]&&(!n[p]||!i(p))?(c(p,t[b+1],m),b+=1):t[b+1]&&/^(true|false)$/.test(t[b+1])?(c(p,t[b+1]==="true",m),b+=1):c(p,r.strings[p]?"":!0,m))}else if((!r.unknownFn||r.unknownFn(m)!==!1)&&u._.push(r.strings._||!_a(m)?m:Number(m)),e.stopEarly){u._.push.apply(u._,t.slice(b+1));break}}return Object.keys(a).forEach(function(T){Id(u,T.split("."))||(f(u,T.split("."),a[T]),(n[T]||[]).forEach(function($){f(u,$.split("."),a[T])}))}),e["--"]?u["--"]=g.slice():g.forEach(function(T){u._.push(T)}),u}});var Ta=C((xn,Ea)=>{(function(t,e){typeof xn=="object"&&typeof Ea<"u"?e(xn):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(xn,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 u=r,h=Promise,f=Promise.prototype.then,c=Promise.resolve.bind(h),g=Promise.reject.bind(h);function b(s){return new h(s)}function m(s){return c(s)}function p(s){return g(s)}function _(s,o,l){return f.call(s,o,l)}function E(s,o,l){_(_(s,o,l),void 0,u)}function R(s,o){E(s,o)}function A(s,o){E(s,void 0,o)}function N(s,o,l){return _(s,o,l)}function L(s){_(s,void 0,u)}let T=(()=>{let s=i&&i.queueMicrotask;if(typeof s=="function")return s;let o=m(void 0);return l=>_(o,l)})();function $(s,o,l){if(typeof s!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(s,o,l)}function D(s,o,l){try{return m($(s,o,l))}catch(d){return p(d)}}let H=16384;class V{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 l=this._back,d=l;l._elements.length===H-1&&(d={_elements:[],_next:void 0}),l._elements.push(o),d!==l&&(this._back=d,l._next=d),++this._size}shift(){let o=this._front,l=o,d=this._cursor,y=d+1,w=o._elements,S=w[d];return y===H&&(l=o._next,y=0),--this._size,this._cursor=y,o!==l&&(this._front=l),w[d]=void 0,S}forEach(o){let l=this._cursor,d=this._front,y=d._elements;for(;(l!==y.length||d._next!==void 0)&&!(l===y.length&&(d=d._next,y=d._elements,l=0,y.length===0));)o(y[l]),++l}peek(){let o=this._front,l=this._cursor;return o._elements[l]}}function X(s,o){s._ownerReadableStream=o,o._reader=s,o._state==="readable"?v(s):o._state==="closed"?ee(s):Z(s,o._storedError)}function J(s,o){let l=s._ownerReadableStream;return Le(l,o)}function ae(s){s._ownerReadableStream._state==="readable"?oe(s,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):ct(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 He(s){return new TypeError("Cannot "+s+" a stream using a released reader")}function v(s){s._closedPromise=b((o,l)=>{s._closedPromise_resolve=o,s._closedPromise_reject=l})}function Z(s,o){v(s),oe(s,o)}function ee(s){v(s),Ot(s)}function oe(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 ct(s,o){Z(s,o)}function Ot(s){s._closedPromise_resolve!==void 0&&(s._closedPromise_resolve(void 0),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0)}let Xe=e("[[AbortSteps]]"),Oe=e("[[ErrorSteps]]"),fe=e("[[CancelSteps]]"),ht=e("[[PullSteps]]"),Be=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},Yr=Math.trunc||function(s){return s<0?Math.ceil(s):Math.floor(s)};function Vh(s){return typeof s=="object"||typeof s=="function"}function Me(s,o){if(s!==void 0&&!Vh(s))throw new TypeError(`${o} is not an object.`)}function Ie(s,o){if(typeof s!="function")throw new TypeError(`${o} is not a function.`)}function Gh(s){return typeof s=="object"&&s!==null||typeof s=="function"}function eo(s,o){if(!Gh(s))throw new TypeError(`${o} is not an object.`)}function ke(s,o,l){if(s===void 0)throw new TypeError(`Parameter ${o} is required in '${l}'.`)}function ms(s,o,l){if(s===void 0)throw new TypeError(`${o} is required in '${l}'.`)}function gs(s){return Number(s)}function to(s){return s===0?0:s}function Yh(s){return to(Yr(s))}function ro(s,o){let d=Number.MAX_SAFE_INTEGER,y=Number(s);if(y=to(y),!Be(y))throw new TypeError(`${o} is not a finite number`);if(y=Yh(y),y<0||y>d)throw new TypeError(`${o} is outside the accepted range of 0 to ${d}, inclusive`);return!Be(y)||y===0?0:y}function bs(s,o){if(!rt(s))throw new TypeError(`${o} is not a ReadableStream.`)}function It(s){return new cr(s)}function no(s,o){s._reader._readRequests.push(o)}function ys(s,o,l){let y=s._reader._readRequests.shift();l?y._closeSteps():y._chunkSteps(o)}function Qr(s){return s._reader._readRequests.length}function so(s){let o=s._reader;return!(o===void 0||!Ze(o))}class cr{constructor(o){if(ke(o,1,"ReadableStreamDefaultReader"),bs(o,"First parameter"),nt(o))throw new TypeError("This stream has already been locked for exclusive reading by another reader");X(this,o),this._readRequests=new V}get closed(){return Ze(this)?this._closedPromise:p(Kr("closed"))}cancel(o=void 0){return Ze(this)?this._ownerReadableStream===void 0?p(He("cancel")):J(this,o):p(Kr("cancel"))}read(){if(!Ze(this))return p(Kr("read"));if(this._ownerReadableStream===void 0)return p(He("read from"));let o,l,d=b((w,S)=>{o=w,l=S});return hr(this,{_chunkSteps:w=>o({value:w,done:!1}),_closeSteps:()=>o({value:void 0,done:!0}),_errorSteps:w=>l(w)}),d}releaseLock(){if(!Ze(this))throw Kr("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");ae(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:"ReadableStreamDefaultReader",configurable:!0});function Ze(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readRequests")?!1:s instanceof cr}function hr(s,o){let l=s._ownerReadableStream;l._disturbed=!0,l._state==="closed"?o._closeSteps():l._state==="errored"?o._errorSteps(l._storedError):l._readableStreamController[ht](o)}function Kr(s){return new TypeError(`ReadableStreamDefaultReader.prototype.${s} can only be used on a ReadableStreamDefaultReader`)}let io=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class oo{constructor(o,l){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=o,this._preventCancel=l}next(){let o=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?N(this._ongoingPromise,o,o):o(),this._ongoingPromise}return(o){let l=()=>this._returnSteps(o);return this._ongoingPromise?N(this._ongoingPromise,l,l):l()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let o=this._reader;if(o._ownerReadableStream===void 0)return p(He("iterate"));let l,d,y=b((S,x)=>{l=S,d=x});return hr(o,{_chunkSteps:S=>{this._ongoingPromise=void 0,T(()=>l({value:S,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,ae(o),l({value:void 0,done:!0})},_errorSteps:S=>{this._ongoingPromise=void 0,this._isFinished=!0,ae(o),d(S)}}),y}_returnSteps(o){if(this._isFinished)return Promise.resolve({value:o,done:!0});this._isFinished=!0;let l=this._reader;if(l._ownerReadableStream===void 0)return p(He("finish iterating"));if(!this._preventCancel){let d=J(l,o);return ae(l),N(d,()=>({value:o,done:!0}))}return ae(l),m({value:o,done:!0})}}let ao={next(){return lo(this)?this._asyncIteratorImpl.next():p(uo("next"))},return(s){return lo(this)?this._asyncIteratorImpl.return(s):p(uo("return"))}};io!==void 0&&Object.setPrototypeOf(ao,io);function Qh(s,o){let l=It(s),d=new oo(l,o),y=Object.create(ao);return y._asyncIteratorImpl=d,y}function lo(s){if(!a(s)||!Object.prototype.hasOwnProperty.call(s,"_asyncIteratorImpl"))return!1;try{return s._asyncIteratorImpl instanceof oo}catch{return!1}}function uo(s){return new TypeError(`ReadableStreamAsyncIterator.${s} can only be used on a ReadableSteamAsyncIterator`)}let co=Number.isNaN||function(s){return s!==s};function fr(s){return s.slice()}function ho(s,o,l,d,y){new Uint8Array(s).set(new Uint8Array(l,d,y),o)}function Ty(s){return s}function Xr(s){return!1}function fo(s,o,l){if(s.slice)return s.slice(o,l);let d=l-o,y=new ArrayBuffer(d);return ho(y,0,s,o,d),y}function Kh(s){return!(typeof s!="number"||co(s)||s<0)}function po(s){let o=fo(s.buffer,s.byteOffset,s.byteOffset+s.byteLength);return new Uint8Array(o)}function _s(s){let o=s._queue.shift();return s._queueTotalSize-=o.size,s._queueTotalSize<0&&(s._queueTotalSize=0),o.value}function ws(s,o,l){if(!Kh(l)||l===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");s._queue.push({value:o,size:l}),s._queueTotalSize+=l}function Xh(s){return s._queue.peek().value}function Je(s){s._queue=new V,s._queueTotalSize=0}class dr{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Ss(this))throw As("view");return this._view}respond(o){if(!Ss(this))throw As("respond");if(ke(o,1,"respond"),o=ro(o,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Xr(this._view.buffer),rn(this._associatedReadableByteStreamController,o)}respondWithNewView(o){if(!Ss(this))throw As("respondWithNewView");if(ke(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");Xr(o.buffer),nn(this._associatedReadableByteStreamController,o)}}Object.defineProperties(dr.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(dr.prototype,e.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class $t{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!ft(this))throw mr("byobRequest");return Ts(this)}get desiredSize(){if(!ft(this))throw mr("desiredSize");return Ro(this)}close(){if(!ft(this))throw mr("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`);pr(this)}enqueue(o){if(!ft(this))throw mr("enqueue");if(ke(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 l=this._controlledReadableByteStream._state;if(l!=="readable")throw new TypeError(`The stream (in ${l} state) is not in the readable state and cannot be enqueued to`);tn(this,o)}error(o=void 0){if(!ft(this))throw mr("error");$e(this,o)}[fe](o){mo(this),Je(this);let l=this._cancelAlgorithm(o);return en(this),l}[ht](o){let l=this._controlledReadableByteStream;if(this._queueTotalSize>0){let y=this._queue.shift();this._queueTotalSize-=y.byteLength,_o(this);let w=new Uint8Array(y.buffer,y.byteOffset,y.byteLength);o._chunkSteps(w);return}let d=this._autoAllocateChunkSize;if(d!==void 0){let y;try{y=new ArrayBuffer(d)}catch(S){o._errorSteps(S);return}let w={buffer:y,bufferByteLength:d,byteOffset:0,byteLength:d,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(w)}no(l,o),dt(this)}}Object.defineProperties($t.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty($t.prototype,e.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ft(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledReadableByteStream")?!1:s instanceof $t}function Ss(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_associatedReadableByteStreamController")?!1:s instanceof dr}function dt(s){if(!tf(s))return;if(s._pulling){s._pullAgain=!0;return}s._pulling=!0;let l=s._pullAlgorithm();E(l,()=>{s._pulling=!1,s._pullAgain&&(s._pullAgain=!1,dt(s))},d=>{$e(s,d)})}function mo(s){Es(s),s._pendingPullIntos=new V}function Rs(s,o){let l=!1;s._state==="closed"&&(l=!0);let d=go(o);o.readerType==="default"?ys(s,d,l):sf(s,d,l)}function go(s){let o=s.bytesFilled,l=s.elementSize;return new s.viewConstructor(s.buffer,s.byteOffset,o/l)}function Zr(s,o,l,d){s._queue.push({buffer:o,byteOffset:l,byteLength:d}),s._queueTotalSize+=d}function bo(s,o){let l=o.elementSize,d=o.bytesFilled-o.bytesFilled%l,y=Math.min(s._queueTotalSize,o.byteLength-o.bytesFilled),w=o.bytesFilled+y,S=w-w%l,x=y,B=!1;S>d&&(x=S-o.bytesFilled,B=!0);let U=s._queue;for(;x>0;){let M=U.peek(),k=Math.min(x,M.byteLength),te=o.byteOffset+o.bytesFilled;ho(o.buffer,te,M.buffer,M.byteOffset,k),M.byteLength===k?U.shift():(M.byteOffset+=k,M.byteLength-=k),s._queueTotalSize-=k,yo(s,k,o),x-=k}return B}function yo(s,o,l){l.bytesFilled+=o}function _o(s){s._queueTotalSize===0&&s._closeRequested?(en(s),Er(s._controlledReadableByteStream)):dt(s)}function Es(s){s._byobRequest!==null&&(s._byobRequest._associatedReadableByteStreamController=void 0,s._byobRequest._view=null,s._byobRequest=null)}function wo(s){for(;s._pendingPullIntos.length>0;){if(s._queueTotalSize===0)return;let o=s._pendingPullIntos.peek();bo(s,o)&&(Jr(s),Rs(s._controlledReadableByteStream,o))}}function Zh(s,o,l){let d=s._controlledReadableByteStream,y=1;o.constructor!==DataView&&(y=o.constructor.BYTES_PER_ELEMENT);let w=o.constructor,S=o.buffer,x={buffer:S,bufferByteLength:S.byteLength,byteOffset:o.byteOffset,byteLength:o.byteLength,bytesFilled:0,elementSize:y,viewConstructor:w,readerType:"byob"};if(s._pendingPullIntos.length>0){s._pendingPullIntos.push(x),Ao(d,l);return}if(d._state==="closed"){let B=new w(x.buffer,x.byteOffset,0);l._closeSteps(B);return}if(s._queueTotalSize>0){if(bo(s,x)){let B=go(x);_o(s),l._chunkSteps(B);return}if(s._closeRequested){let B=new TypeError("Insufficient bytes to fill elements in the given buffer");$e(s,B),l._errorSteps(B);return}}s._pendingPullIntos.push(x),Ao(d,l),dt(s)}function Jh(s,o){let l=s._controlledReadableByteStream;if(Cs(l))for(;Co(l)>0;){let d=Jr(s);Rs(l,d)}}function ef(s,o,l){if(yo(s,o,l),l.bytesFilled<l.elementSize)return;Jr(s);let d=l.bytesFilled%l.elementSize;if(d>0){let y=l.byteOffset+l.bytesFilled,w=fo(l.buffer,y-d,y);Zr(s,w,0,w.byteLength)}l.bytesFilled-=d,Rs(s._controlledReadableByteStream,l),wo(s)}function So(s,o){let l=s._pendingPullIntos.peek();Es(s),s._controlledReadableByteStream._state==="closed"?Jh(s):ef(s,o,l),dt(s)}function Jr(s){return s._pendingPullIntos.shift()}function tf(s){let o=s._controlledReadableByteStream;return o._state!=="readable"||s._closeRequested||!s._started?!1:!!(so(o)&&Qr(o)>0||Cs(o)&&Co(o)>0||Ro(s)>0)}function en(s){s._pullAlgorithm=void 0,s._cancelAlgorithm=void 0}function pr(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 d=new TypeError("Insufficient bytes to fill elements in the given buffer");throw $e(s,d),d}en(s),Er(o)}}function tn(s,o){let l=s._controlledReadableByteStream;if(s._closeRequested||l._state!=="readable")return;let d=o.buffer,y=o.byteOffset,w=o.byteLength,S=d;if(s._pendingPullIntos.length>0){let x=s._pendingPullIntos.peek();Xr(x.buffer),x.buffer=x.buffer}if(Es(s),so(l))if(Qr(l)===0)Zr(s,S,y,w);else{s._pendingPullIntos.length>0&&Jr(s);let x=new Uint8Array(S,y,w);ys(l,x,!1)}else Cs(l)?(Zr(s,S,y,w),wo(s)):Zr(s,S,y,w);dt(s)}function $e(s,o){let l=s._controlledReadableByteStream;l._state==="readable"&&(mo(s),Je(s),en(s),Ko(l,o))}function Ts(s){if(s._byobRequest===null&&s._pendingPullIntos.length>0){let o=s._pendingPullIntos.peek(),l=new Uint8Array(o.buffer,o.byteOffset+o.bytesFilled,o.byteLength-o.bytesFilled),d=Object.create(dr.prototype);nf(d,s,l),s._byobRequest=d}return s._byobRequest}function Ro(s){let o=s._controlledReadableByteStream._state;return o==="errored"?null:o==="closed"?0:s._strategyHWM-s._queueTotalSize}function rn(s,o){let l=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(l.bytesFilled+o>l.byteLength)throw new RangeError("bytesWritten out of range")}l.buffer=l.buffer,So(s,o)}function nn(s,o){let l=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(l.byteOffset+l.bytesFilled!==o.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(l.bufferByteLength!==o.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(l.bytesFilled+o.byteLength>l.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let y=o.byteLength;l.buffer=o.buffer,So(s,y)}function Eo(s,o,l,d,y,w,S){o._controlledReadableByteStream=s,o._pullAgain=!1,o._pulling=!1,o._byobRequest=null,o._queue=o._queueTotalSize=void 0,Je(o),o._closeRequested=!1,o._started=!1,o._strategyHWM=w,o._pullAlgorithm=d,o._cancelAlgorithm=y,o._autoAllocateChunkSize=S,o._pendingPullIntos=new V,s._readableStreamController=o;let x=l();E(m(x),()=>{o._started=!0,dt(o)},B=>{$e(o,B)})}function rf(s,o,l){let d=Object.create($t.prototype),y=()=>{},w=()=>m(void 0),S=()=>m(void 0);o.start!==void 0&&(y=()=>o.start(d)),o.pull!==void 0&&(w=()=>o.pull(d)),o.cancel!==void 0&&(S=B=>o.cancel(B));let x=o.autoAllocateChunkSize;if(x===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Eo(s,d,y,w,S,l,x)}function nf(s,o,l){s._associatedReadableByteStreamController=o,s._view=l}function As(s){return new TypeError(`ReadableStreamBYOBRequest.prototype.${s} can only be used on a ReadableStreamBYOBRequest`)}function mr(s){return new TypeError(`ReadableByteStreamController.prototype.${s} can only be used on a ReadableByteStreamController`)}function To(s){return new gr(s)}function Ao(s,o){s._reader._readIntoRequests.push(o)}function sf(s,o,l){let y=s._reader._readIntoRequests.shift();l?y._closeSteps(o):y._chunkSteps(o)}function Co(s){return s._reader._readIntoRequests.length}function Cs(s){let o=s._reader;return!(o===void 0||!pt(o))}class gr{constructor(o){if(ke(o,1,"ReadableStreamBYOBReader"),bs(o,"First parameter"),nt(o))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ft(o._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");X(this,o),this._readIntoRequests=new V}get closed(){return pt(this)?this._closedPromise:p(sn("closed"))}cancel(o=void 0){return pt(this)?this._ownerReadableStream===void 0?p(He("cancel")):J(this,o):p(sn("cancel"))}read(o){if(!pt(this))return p(sn("read"));if(!ArrayBuffer.isView(o))return p(new TypeError("view must be an array buffer view"));if(o.byteLength===0)return p(new TypeError("view must have non-zero byteLength"));if(o.buffer.byteLength===0)return p(new TypeError("view's buffer must have non-zero byteLength"));if(Xr(o.buffer),this._ownerReadableStream===void 0)return p(He("read from"));let l,d,y=b((S,x)=>{l=S,d=x});return vo(this,o,{_chunkSteps:S=>l({value:S,done:!1}),_closeSteps:S=>l({value:S,done:!0}),_errorSteps:S=>d(S)}),y}releaseLock(){if(!pt(this))throw sn("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");ae(this)}}}Object.defineProperties(gr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(gr.prototype,e.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function pt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readIntoRequests")?!1:s instanceof gr}function vo(s,o,l){let d=s._ownerReadableStream;d._disturbed=!0,d._state==="errored"?l._errorSteps(d._storedError):Zh(d._readableStreamController,o,l)}function sn(s){return new TypeError(`ReadableStreamBYOBReader.prototype.${s} can only be used on a ReadableStreamBYOBReader`)}function br(s,o){let{highWaterMark:l}=s;if(l===void 0)return o;if(co(l)||l<0)throw new RangeError("Invalid highWaterMark");return l}function on(s){let{size:o}=s;return o||(()=>1)}function an(s,o){Me(s,o);let l=s==null?void 0:s.highWaterMark,d=s==null?void 0:s.size;return{highWaterMark:l===void 0?void 0:gs(l),size:d===void 0?void 0:of(d,`${o} has member 'size' that`)}}function of(s,o){return Ie(s,o),l=>gs(s(l))}function af(s,o){Me(s,o);let l=s==null?void 0:s.abort,d=s==null?void 0:s.close,y=s==null?void 0:s.start,w=s==null?void 0:s.type,S=s==null?void 0:s.write;return{abort:l===void 0?void 0:lf(l,s,`${o} has member 'abort' that`),close:d===void 0?void 0:uf(d,s,`${o} has member 'close' that`),start:y===void 0?void 0:cf(y,s,`${o} has member 'start' that`),write:S===void 0?void 0:hf(S,s,`${o} has member 'write' that`),type:w}}function lf(s,o,l){return Ie(s,l),d=>D(s,o,[d])}function uf(s,o,l){return Ie(s,l),()=>D(s,o,[])}function cf(s,o,l){return Ie(s,l),d=>$(s,o,[d])}function hf(s,o,l){return Ie(s,l),(d,y)=>D(s,o,[d,y])}function xo(s,o){if(!Lt(s))throw new TypeError(`${o} is not a WritableStream.`)}function ff(s){if(typeof s!="object"||s===null)return!1;try{return typeof s.aborted=="boolean"}catch{return!1}}let df=typeof AbortController=="function";function pf(){if(df)return new AbortController}class yr{constructor(o={},l={}){o===void 0?o=null:eo(o,"First parameter");let d=an(l,"Second parameter"),y=af(o,"First parameter");if(Io(this),y.type!==void 0)throw new RangeError("Invalid type is specified");let S=on(d),x=br(d,1);xf(this,y,x,S)}get locked(){if(!Lt(this))throw fn("locked");return Pt(this)}abort(o=void 0){return Lt(this)?Pt(this)?p(new TypeError("Cannot abort a stream that already has a writer")):ln(this,o):p(fn("abort"))}close(){return Lt(this)?Pt(this)?p(new TypeError("Cannot close a stream that already has a writer")):Fe(this)?p(new TypeError("Cannot close an already-closing stream")):$o(this):p(fn("close"))}getWriter(){if(!Lt(this))throw fn("getWriter");return Oo(this)}}Object.defineProperties(yr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(yr.prototype,e.toStringTag,{value:"WritableStream",configurable:!0});function Oo(s){return new _r(s)}function mf(s,o,l,d,y=1,w=()=>1){let S=Object.create(yr.prototype);Io(S);let x=Object.create(Nt.prototype);return Bo(S,x,s,o,l,d,y,w),S}function Io(s){s._state="writable",s._storedError=void 0,s._writer=void 0,s._writableStreamController=void 0,s._writeRequests=new V,s._inFlightWriteRequest=void 0,s._closeRequest=void 0,s._inFlightCloseRequest=void 0,s._pendingAbortRequest=void 0,s._backpressure=!1}function Lt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_writableStreamController")?!1:s instanceof yr}function Pt(s){return s._writer!==void 0}function ln(s,o){var l;if(s._state==="closed"||s._state==="errored")return m(void 0);s._writableStreamController._abortReason=o,(l=s._writableStreamController._abortController)===null||l===void 0||l.abort();let d=s._state;if(d==="closed"||d==="errored")return m(void 0);if(s._pendingAbortRequest!==void 0)return s._pendingAbortRequest._promise;let y=!1;d==="erroring"&&(y=!0,o=void 0);let w=b((S,x)=>{s._pendingAbortRequest={_promise:void 0,_resolve:S,_reject:x,_reason:o,_wasAlreadyErroring:y}});return s._pendingAbortRequest._promise=w,y||xs(s,o),w}function $o(s){let o=s._state;if(o==="closed"||o==="errored")return p(new TypeError(`The stream (in ${o} state) is not in the writable state and cannot be closed`));let l=b((y,w)=>{let S={_resolve:y,_reject:w};s._closeRequest=S}),d=s._writer;return d!==void 0&&s._backpressure&&o==="writable"&&Bs(d),Of(s._writableStreamController),l}function gf(s){return b((l,d)=>{let y={_resolve:l,_reject:d};s._writeRequests.push(y)})}function vs(s,o){if(s._state==="writable"){xs(s,o);return}Os(s)}function xs(s,o){let l=s._writableStreamController;s._state="erroring",s._storedError=o;let d=s._writer;d!==void 0&&Po(d,o),!Sf(s)&&l._started&&Os(s)}function Os(s){s._state="errored",s._writableStreamController[Oe]();let o=s._storedError;if(s._writeRequests.forEach(y=>{y._reject(o)}),s._writeRequests=new V,s._pendingAbortRequest===void 0){un(s);return}let l=s._pendingAbortRequest;if(s._pendingAbortRequest=void 0,l._wasAlreadyErroring){l._reject(o),un(s);return}let d=s._writableStreamController[Xe](l._reason);E(d,()=>{l._resolve(),un(s)},y=>{l._reject(y),un(s)})}function bf(s){s._inFlightWriteRequest._resolve(void 0),s._inFlightWriteRequest=void 0}function yf(s,o){s._inFlightWriteRequest._reject(o),s._inFlightWriteRequest=void 0,vs(s,o)}function _f(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 l=s._writer;l!==void 0&&zo(l)}function wf(s,o){s._inFlightCloseRequest._reject(o),s._inFlightCloseRequest=void 0,s._pendingAbortRequest!==void 0&&(s._pendingAbortRequest._reject(o),s._pendingAbortRequest=void 0),vs(s,o)}function Fe(s){return!(s._closeRequest===void 0&&s._inFlightCloseRequest===void 0)}function Sf(s){return!(s._inFlightWriteRequest===void 0&&s._inFlightCloseRequest===void 0)}function Rf(s){s._inFlightCloseRequest=s._closeRequest,s._closeRequest=void 0}function Ef(s){s._inFlightWriteRequest=s._writeRequests.shift()}function un(s){s._closeRequest!==void 0&&(s._closeRequest._reject(s._storedError),s._closeRequest=void 0);let o=s._writer;o!==void 0&&Ds(o,s._storedError)}function Is(s,o){let l=s._writer;l!==void 0&&o!==s._backpressure&&(o?Hf(l):Bs(l)),s._backpressure=o}class _r{constructor(o){if(ke(o,1,"WritableStreamDefaultWriter"),xo(o,"First parameter"),Pt(o))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=o,o._writer=this;let l=o._state;if(l==="writable")!Fe(o)&&o._backpressure?pn(this):Mo(this),dn(this);else if(l==="erroring")Hs(this,o._storedError),dn(this);else if(l==="closed")Mo(this),Nf(this);else{let d=o._storedError;Hs(this,d),Uo(this,d)}}get closed(){return mt(this)?this._closedPromise:p(gt("closed"))}get desiredSize(){if(!mt(this))throw gt("desiredSize");if(this._ownerWritableStream===void 0)throw wr("desiredSize");return vf(this)}get ready(){return mt(this)?this._readyPromise:p(gt("ready"))}abort(o=void 0){return mt(this)?this._ownerWritableStream===void 0?p(wr("abort")):Tf(this,o):p(gt("abort"))}close(){if(!mt(this))return p(gt("close"));let o=this._ownerWritableStream;return o===void 0?p(wr("close")):Fe(o)?p(new TypeError("Cannot close an already-closing stream")):Lo(this)}releaseLock(){if(!mt(this))throw gt("releaseLock");this._ownerWritableStream!==void 0&&No(this)}write(o=void 0){return mt(this)?this._ownerWritableStream===void 0?p(wr("write to")):Do(this,o):p(gt("write"))}}Object.defineProperties(_r.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(_r.prototype,e.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function mt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_ownerWritableStream")?!1:s instanceof _r}function Tf(s,o){let l=s._ownerWritableStream;return ln(l,o)}function Lo(s){let o=s._ownerWritableStream;return $o(o)}function Af(s){let o=s._ownerWritableStream,l=o._state;return Fe(o)||l==="closed"?m(void 0):l==="errored"?p(o._storedError):Lo(s)}function Cf(s,o){s._closedPromiseState==="pending"?Ds(s,o):Df(s,o)}function Po(s,o){s._readyPromiseState==="pending"?ko(s,o):Bf(s,o)}function vf(s){let o=s._ownerWritableStream,l=o._state;return l==="errored"||l==="erroring"?null:l==="closed"?0:Fo(o._writableStreamController)}function No(s){let o=s._ownerWritableStream,l=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Po(s,l),Cf(s,l),o._writer=void 0,s._ownerWritableStream=void 0}function Do(s,o){let l=s._ownerWritableStream,d=l._writableStreamController,y=If(d,o);if(l!==s._ownerWritableStream)return p(wr("write to"));let w=l._state;if(w==="errored")return p(l._storedError);if(Fe(l)||w==="closed")return p(new TypeError("The stream is closing or closed and cannot be written to"));if(w==="erroring")return p(l._storedError);let S=gf(l);return $f(d,o,y),S}let Ho={};class Nt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!$s(this))throw Ns("abortReason");return this._abortReason}get signal(){if(!$s(this))throw Ns("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(o=void 0){if(!$s(this))throw Ns("error");this._controlledWritableStream._state==="writable"&&qo(this,o)}[Xe](o){let l=this._abortAlgorithm(o);return cn(this),l}[Oe](){Je(this)}}Object.defineProperties(Nt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Nt.prototype,e.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function $s(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledWritableStream")?!1:s instanceof Nt}function Bo(s,o,l,d,y,w,S,x){o._controlledWritableStream=s,s._writableStreamController=o,o._queue=void 0,o._queueTotalSize=void 0,Je(o),o._abortReason=void 0,o._abortController=pf(),o._started=!1,o._strategySizeAlgorithm=x,o._strategyHWM=S,o._writeAlgorithm=d,o._closeAlgorithm=y,o._abortAlgorithm=w;let B=Ps(o);Is(s,B);let U=l(),M=m(U);E(M,()=>{o._started=!0,hn(o)},k=>{o._started=!0,vs(s,k)})}function xf(s,o,l,d){let y=Object.create(Nt.prototype),w=()=>{},S=()=>m(void 0),x=()=>m(void 0),B=()=>m(void 0);o.start!==void 0&&(w=()=>o.start(y)),o.write!==void 0&&(S=U=>o.write(U,y)),o.close!==void 0&&(x=()=>o.close()),o.abort!==void 0&&(B=U=>o.abort(U)),Bo(s,y,w,S,x,B,l,d)}function cn(s){s._writeAlgorithm=void 0,s._closeAlgorithm=void 0,s._abortAlgorithm=void 0,s._strategySizeAlgorithm=void 0}function Of(s){ws(s,Ho,0),hn(s)}function If(s,o){try{return s._strategySizeAlgorithm(o)}catch(l){return Ls(s,l),1}}function Fo(s){return s._strategyHWM-s._queueTotalSize}function $f(s,o,l){try{ws(s,o,l)}catch(y){Ls(s,y);return}let d=s._controlledWritableStream;if(!Fe(d)&&d._state==="writable"){let y=Ps(s);Is(d,y)}hn(s)}function hn(s){let o=s._controlledWritableStream;if(!s._started||o._inFlightWriteRequest!==void 0)return;if(o._state==="erroring"){Os(o);return}if(s._queue.length===0)return;let d=Xh(s);d===Ho?Lf(s):Pf(s,d)}function Ls(s,o){s._controlledWritableStream._state==="writable"&&qo(s,o)}function Lf(s){let o=s._controlledWritableStream;Rf(o),_s(s);let l=s._closeAlgorithm();cn(s),E(l,()=>{_f(o)},d=>{wf(o,d)})}function Pf(s,o){let l=s._controlledWritableStream;Ef(l);let d=s._writeAlgorithm(o);E(d,()=>{bf(l);let y=l._state;if(_s(s),!Fe(l)&&y==="writable"){let w=Ps(s);Is(l,w)}hn(s)},y=>{l._state==="writable"&&cn(s),yf(l,y)})}function Ps(s){return Fo(s)<=0}function qo(s,o){let l=s._controlledWritableStream;cn(s),xs(l,o)}function fn(s){return new TypeError(`WritableStream.prototype.${s} can only be used on a WritableStream`)}function Ns(s){return new TypeError(`WritableStreamDefaultController.prototype.${s} can only be used on a WritableStreamDefaultController`)}function gt(s){return new TypeError(`WritableStreamDefaultWriter.prototype.${s} can only be used on a WritableStreamDefaultWriter`)}function wr(s){return new TypeError("Cannot "+s+" a stream using a released writer")}function dn(s){s._closedPromise=b((o,l)=>{s._closedPromise_resolve=o,s._closedPromise_reject=l,s._closedPromiseState="pending"})}function Uo(s,o){dn(s),Ds(s,o)}function Nf(s){dn(s),zo(s)}function Ds(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 Df(s,o){Uo(s,o)}function zo(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 pn(s){s._readyPromise=b((o,l)=>{s._readyPromise_resolve=o,s._readyPromise_reject=l}),s._readyPromiseState="pending"}function Hs(s,o){pn(s),ko(s,o)}function Mo(s){pn(s),Bs(s)}function ko(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 Hf(s){pn(s)}function Bf(s,o){Hs(s,o)}function Bs(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 Wo=typeof DOMException<"u"?DOMException:void 0;function Ff(s){if(!(typeof s=="function"||typeof s=="object"))return!1;try{return new s,!0}catch{return!1}}function qf(){let s=function(l,d){this.message=l||"",this.name=d||"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 Uf=Ff(Wo)?Wo:qf();function jo(s,o,l,d,y,w){let S=It(s),x=Oo(o);s._disturbed=!0;let B=!1,U=m(void 0);return b((M,k)=>{let te;if(w!==void 0){if(te=()=>{let P=new Uf("Aborted","AbortError"),q=[];d||q.push(()=>o._state==="writable"?ln(o,P):m(void 0)),y||q.push(()=>s._state==="readable"?Le(s,P):m(void 0)),de(()=>Promise.all(q.map(G=>G())),!0,P)},w.aborted){te();return}w.addEventListener("abort",te)}function Pe(){return b((P,q)=>{function G(be){be?P():_(Bt(),G,q)}G(!1)})}function Bt(){return B?m(!0):_(x._readyPromise,()=>b((P,q)=>{hr(S,{_chunkSteps:G=>{U=_(Do(x,G),void 0,r),P(!1)},_closeSteps:()=>P(!0),_errorSteps:q})}))}if(We(s,S._closedPromise,P=>{d?we(!0,P):de(()=>ln(o,P),!0,P)}),We(o,x._closedPromise,P=>{y?we(!0,P):de(()=>Le(s,P),!0,P)}),ue(s,S._closedPromise,()=>{l?we():de(()=>Af(x))}),Fe(o)||o._state==="closed"){let P=new TypeError("the destination writable stream closed before all data could be piped to it");y?we(!0,P):de(()=>Le(s,P),!0,P)}L(Pe());function st(){let P=U;return _(U,()=>P!==U?st():void 0)}function We(P,q,G){P._state==="errored"?G(P._storedError):A(q,G)}function ue(P,q,G){P._state==="closed"?G():R(q,G)}function de(P,q,G){if(B)return;B=!0,o._state==="writable"&&!Fe(o)?R(st(),be):be();function be(){E(P(),()=>je(q,G),Ft=>je(!0,Ft))}}function we(P,q){B||(B=!0,o._state==="writable"&&!Fe(o)?R(st(),()=>je(P,q)):je(P,q))}function je(P,q){No(x),ae(S),w!==void 0&&w.removeEventListener("abort",te),P?k(q):M(void 0)}})}class Dt{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!mn(this))throw yn("desiredSize");return Fs(this)}close(){if(!mn(this))throw yn("close");if(!Ht(this))throw new TypeError("The stream is not in a state that permits close");Rr(this)}enqueue(o=void 0){if(!mn(this))throw yn("enqueue");if(!Ht(this))throw new TypeError("The stream is not in a state that permits enqueue");return bn(this,o)}error(o=void 0){if(!mn(this))throw yn("error");et(this,o)}[fe](o){Je(this);let l=this._cancelAlgorithm(o);return gn(this),l}[ht](o){let l=this._controlledReadableStream;if(this._queue.length>0){let d=_s(this);this._closeRequested&&this._queue.length===0?(gn(this),Er(l)):Sr(this),o._chunkSteps(d)}else no(l,o),Sr(this)}}Object.defineProperties(Dt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Dt.prototype,e.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function mn(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledReadableStream")?!1:s instanceof Dt}function Sr(s){if(!Vo(s))return;if(s._pulling){s._pullAgain=!0;return}s._pulling=!0;let l=s._pullAlgorithm();E(l,()=>{s._pulling=!1,s._pullAgain&&(s._pullAgain=!1,Sr(s))},d=>{et(s,d)})}function Vo(s){let o=s._controlledReadableStream;return!Ht(s)||!s._started?!1:!!(nt(o)&&Qr(o)>0||Fs(s)>0)}function gn(s){s._pullAlgorithm=void 0,s._cancelAlgorithm=void 0,s._strategySizeAlgorithm=void 0}function Rr(s){if(!Ht(s))return;let o=s._controlledReadableStream;s._closeRequested=!0,s._queue.length===0&&(gn(s),Er(o))}function bn(s,o){if(!Ht(s))return;let l=s._controlledReadableStream;if(nt(l)&&Qr(l)>0)ys(l,o,!1);else{let d;try{d=s._strategySizeAlgorithm(o)}catch(y){throw et(s,y),y}try{ws(s,o,d)}catch(y){throw et(s,y),y}}Sr(s)}function et(s,o){let l=s._controlledReadableStream;l._state==="readable"&&(Je(s),gn(s),Ko(l,o))}function Fs(s){let o=s._controlledReadableStream._state;return o==="errored"?null:o==="closed"?0:s._strategyHWM-s._queueTotalSize}function zf(s){return!Vo(s)}function Ht(s){let o=s._controlledReadableStream._state;return!s._closeRequested&&o==="readable"}function Go(s,o,l,d,y,w,S){o._controlledReadableStream=s,o._queue=void 0,o._queueTotalSize=void 0,Je(o),o._started=!1,o._closeRequested=!1,o._pullAgain=!1,o._pulling=!1,o._strategySizeAlgorithm=S,o._strategyHWM=w,o._pullAlgorithm=d,o._cancelAlgorithm=y,s._readableStreamController=o;let x=l();E(m(x),()=>{o._started=!0,Sr(o)},B=>{et(o,B)})}function Mf(s,o,l,d){let y=Object.create(Dt.prototype),w=()=>{},S=()=>m(void 0),x=()=>m(void 0);o.start!==void 0&&(w=()=>o.start(y)),o.pull!==void 0&&(S=()=>o.pull(y)),o.cancel!==void 0&&(x=B=>o.cancel(B)),Go(s,y,w,S,x,l,d)}function yn(s){return new TypeError(`ReadableStreamDefaultController.prototype.${s} can only be used on a ReadableStreamDefaultController`)}function kf(s,o){return ft(s._readableStreamController)?jf(s):Wf(s)}function Wf(s,o){let l=It(s),d=!1,y=!1,w=!1,S=!1,x,B,U,M,k,te=b(ue=>{k=ue});function Pe(){return d?(y=!0,m(void 0)):(d=!0,hr(l,{_chunkSteps:de=>{T(()=>{y=!1;let we=de,je=de;w||bn(U._readableStreamController,we),S||bn(M._readableStreamController,je),d=!1,y&&Pe()})},_closeSteps:()=>{d=!1,w||Rr(U._readableStreamController),S||Rr(M._readableStreamController),(!w||!S)&&k(void 0)},_errorSteps:()=>{d=!1}}),m(void 0))}function Bt(ue){if(w=!0,x=ue,S){let de=fr([x,B]),we=Le(s,de);k(we)}return te}function st(ue){if(S=!0,B=ue,w){let de=fr([x,B]),we=Le(s,de);k(we)}return te}function We(){}return U=qs(We,Pe,Bt),M=qs(We,Pe,st),A(l._closedPromise,ue=>{et(U._readableStreamController,ue),et(M._readableStreamController,ue),(!w||!S)&&k(void 0)}),[U,M]}function jf(s){let o=It(s),l=!1,d=!1,y=!1,w=!1,S=!1,x,B,U,M,k,te=b(P=>{k=P});function Pe(P){A(P._closedPromise,q=>{P===o&&($e(U._readableStreamController,q),$e(M._readableStreamController,q),(!w||!S)&&k(void 0))})}function Bt(){pt(o)&&(ae(o),o=It(s),Pe(o)),hr(o,{_chunkSteps:q=>{T(()=>{d=!1,y=!1;let G=q,be=q;if(!w&&!S)try{be=po(q)}catch(Ft){$e(U._readableStreamController,Ft),$e(M._readableStreamController,Ft),k(Le(s,Ft));return}w||tn(U._readableStreamController,G),S||tn(M._readableStreamController,be),l=!1,d?We():y&&ue()})},_closeSteps:()=>{l=!1,w||pr(U._readableStreamController),S||pr(M._readableStreamController),U._readableStreamController._pendingPullIntos.length>0&&rn(U._readableStreamController,0),M._readableStreamController._pendingPullIntos.length>0&&rn(M._readableStreamController,0),(!w||!S)&&k(void 0)},_errorSteps:()=>{l=!1}})}function st(P,q){Ze(o)&&(ae(o),o=To(s),Pe(o));let G=q?M:U,be=q?U:M;vo(o,P,{_chunkSteps:qt=>{T(()=>{d=!1,y=!1;let Ut=q?S:w;if(q?w:S)Ut||nn(G._readableStreamController,qt);else{let ua;try{ua=po(qt)}catch(zs){$e(G._readableStreamController,zs),$e(be._readableStreamController,zs),k(Le(s,zs));return}Ut||nn(G._readableStreamController,qt),tn(be._readableStreamController,ua)}l=!1,d?We():y&&ue()})},_closeSteps:qt=>{l=!1;let Ut=q?S:w,vn=q?w:S;Ut||pr(G._readableStreamController),vn||pr(be._readableStreamController),qt!==void 0&&(Ut||nn(G._readableStreamController,qt),!vn&&be._readableStreamController._pendingPullIntos.length>0&&rn(be._readableStreamController,0)),(!Ut||!vn)&&k(void 0)},_errorSteps:()=>{l=!1}})}function We(){if(l)return d=!0,m(void 0);l=!0;let P=Ts(U._readableStreamController);return P===null?Bt():st(P._view,!1),m(void 0)}function ue(){if(l)return y=!0,m(void 0);l=!0;let P=Ts(M._readableStreamController);return P===null?Bt():st(P._view,!0),m(void 0)}function de(P){if(w=!0,x=P,S){let q=fr([x,B]),G=Le(s,q);k(G)}return te}function we(P){if(S=!0,B=P,w){let q=fr([x,B]),G=Le(s,q);k(G)}return te}function je(){}return U=Qo(je,We,de),M=Qo(je,ue,we),Pe(o),[U,M]}function Vf(s,o){Me(s,o);let l=s,d=l==null?void 0:l.autoAllocateChunkSize,y=l==null?void 0:l.cancel,w=l==null?void 0:l.pull,S=l==null?void 0:l.start,x=l==null?void 0:l.type;return{autoAllocateChunkSize:d===void 0?void 0:ro(d,`${o} has member 'autoAllocateChunkSize' that`),cancel:y===void 0?void 0:Gf(y,l,`${o} has member 'cancel' that`),pull:w===void 0?void 0:Yf(w,l,`${o} has member 'pull' that`),start:S===void 0?void 0:Qf(S,l,`${o} has member 'start' that`),type:x===void 0?void 0:Kf(x,`${o} has member 'type' that`)}}function Gf(s,o,l){return Ie(s,l),d=>D(s,o,[d])}function Yf(s,o,l){return Ie(s,l),d=>D(s,o,[d])}function Qf(s,o,l){return Ie(s,l),d=>$(s,o,[d])}function Kf(s,o){if(s=`${s}`,s!=="bytes")throw new TypeError(`${o} '${s}' is not a valid enumeration value for ReadableStreamType`);return s}function Xf(s,o){Me(s,o);let l=s==null?void 0:s.mode;return{mode:l===void 0?void 0:Zf(l,`${o} has member 'mode' that`)}}function Zf(s,o){if(s=`${s}`,s!=="byob")throw new TypeError(`${o} '${s}' is not a valid enumeration value for ReadableStreamReaderMode`);return s}function Jf(s,o){return Me(s,o),{preventCancel:!!(s==null?void 0:s.preventCancel)}}function Yo(s,o){Me(s,o);let l=s==null?void 0:s.preventAbort,d=s==null?void 0:s.preventCancel,y=s==null?void 0:s.preventClose,w=s==null?void 0:s.signal;return w!==void 0&&ed(w,`${o} has member 'signal' that`),{preventAbort:!!l,preventCancel:!!d,preventClose:!!y,signal:w}}function ed(s,o){if(!ff(s))throw new TypeError(`${o} is not an AbortSignal.`)}function td(s,o){Me(s,o);let l=s==null?void 0:s.readable;ms(l,"readable","ReadableWritablePair"),bs(l,`${o} has member 'readable' that`);let d=s==null?void 0:s.writable;return ms(d,"writable","ReadableWritablePair"),xo(d,`${o} has member 'writable' that`),{readable:l,writable:d}}class tt{constructor(o={},l={}){o===void 0?o=null:eo(o,"First parameter");let d=an(l,"Second parameter"),y=Vf(o,"First parameter");if(Us(this),y.type==="bytes"){if(d.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let w=br(d,0);rf(this,y,w)}else{let w=on(d),S=br(d,1);Mf(this,y,S,w)}}get locked(){if(!rt(this))throw bt("locked");return nt(this)}cancel(o=void 0){return rt(this)?nt(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Le(this,o):p(bt("cancel"))}getReader(o=void 0){if(!rt(this))throw bt("getReader");return Xf(o,"First parameter").mode===void 0?It(this):To(this)}pipeThrough(o,l={}){if(!rt(this))throw bt("pipeThrough");ke(o,1,"pipeThrough");let d=td(o,"First parameter"),y=Yo(l,"Second parameter");if(nt(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Pt(d.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let w=jo(this,d.writable,y.preventClose,y.preventAbort,y.preventCancel,y.signal);return L(w),d.readable}pipeTo(o,l={}){if(!rt(this))return p(bt("pipeTo"));if(o===void 0)return p("Parameter 1 is required in 'pipeTo'.");if(!Lt(o))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let d;try{d=Yo(l,"Second parameter")}catch(y){return p(y)}return nt(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Pt(o)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):jo(this,o,d.preventClose,d.preventAbort,d.preventCancel,d.signal)}tee(){if(!rt(this))throw bt("tee");let o=kf(this);return fr(o)}values(o=void 0){if(!rt(this))throw bt("values");let l=Jf(o,"First parameter");return Qh(this,l.preventCancel)}}Object.defineProperties(tt.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(tt.prototype,e.toStringTag,{value:"ReadableStream",configurable:!0}),typeof e.asyncIterator=="symbol"&&Object.defineProperty(tt.prototype,e.asyncIterator,{value:tt.prototype.values,writable:!0,configurable:!0});function qs(s,o,l,d=1,y=()=>1){let w=Object.create(tt.prototype);Us(w);let S=Object.create(Dt.prototype);return Go(w,S,s,o,l,d,y),w}function Qo(s,o,l){let d=Object.create(tt.prototype);Us(d);let y=Object.create($t.prototype);return Eo(d,y,s,o,l,0,void 0),d}function Us(s){s._state="readable",s._reader=void 0,s._storedError=void 0,s._disturbed=!1}function rt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readableStreamController")?!1:s instanceof tt}function nt(s){return s._reader!==void 0}function Le(s,o){if(s._disturbed=!0,s._state==="closed")return m(void 0);if(s._state==="errored")return p(s._storedError);Er(s);let l=s._reader;l!==void 0&&pt(l)&&(l._readIntoRequests.forEach(y=>{y._closeSteps(void 0)}),l._readIntoRequests=new V);let d=s._readableStreamController[fe](o);return N(d,r)}function Er(s){s._state="closed";let o=s._reader;o!==void 0&&(Ot(o),Ze(o)&&(o._readRequests.forEach(l=>{l._closeSteps()}),o._readRequests=new V))}function Ko(s,o){s._state="errored",s._storedError=o;let l=s._reader;l!==void 0&&(oe(l,o),Ze(l)?(l._readRequests.forEach(d=>{d._errorSteps(o)}),l._readRequests=new V):(l._readIntoRequests.forEach(d=>{d._errorSteps(o)}),l._readIntoRequests=new V))}function bt(s){return new TypeError(`ReadableStream.prototype.${s} can only be used on a ReadableStream`)}function Xo(s,o){Me(s,o);let l=s==null?void 0:s.highWaterMark;return ms(l,"highWaterMark","QueuingStrategyInit"),{highWaterMark:gs(l)}}let Zo=s=>s.byteLength;try{Object.defineProperty(Zo,"name",{value:"size",configurable:!0})}catch{}class _n{constructor(o){ke(o,1,"ByteLengthQueuingStrategy"),o=Xo(o,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=o.highWaterMark}get highWaterMark(){if(!ea(this))throw Jo("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!ea(this))throw Jo("size");return Zo}}Object.defineProperties(_n.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(_n.prototype,e.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Jo(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 _n}let ta=()=>1;try{Object.defineProperty(ta,"name",{value:"size",configurable:!0})}catch{}class wn{constructor(o){ke(o,1,"CountQueuingStrategy"),o=Xo(o,"First parameter"),this._countQueuingStrategyHighWaterMark=o.highWaterMark}get highWaterMark(){if(!na(this))throw ra("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!na(this))throw ra("size");return ta}}Object.defineProperties(wn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(wn.prototype,e.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function ra(s){return new TypeError(`CountQueuingStrategy.prototype.${s} can only be used on a CountQueuingStrategy`)}function na(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_countQueuingStrategyHighWaterMark")?!1:s instanceof wn}function rd(s,o){Me(s,o);let l=s==null?void 0:s.flush,d=s==null?void 0:s.readableType,y=s==null?void 0:s.start,w=s==null?void 0:s.transform,S=s==null?void 0:s.writableType;return{flush:l===void 0?void 0:nd(l,s,`${o} has member 'flush' that`),readableType:d,start:y===void 0?void 0:sd(y,s,`${o} has member 'start' that`),transform:w===void 0?void 0:id(w,s,`${o} has member 'transform' that`),writableType:S}}function nd(s,o,l){return Ie(s,l),d=>D(s,o,[d])}function sd(s,o,l){return Ie(s,l),d=>$(s,o,[d])}function id(s,o,l){return Ie(s,l),(d,y)=>D(s,o,[d,y])}class Sn{constructor(o={},l={},d={}){o===void 0&&(o=null);let y=an(l,"Second parameter"),w=an(d,"Third parameter"),S=rd(o,"First parameter");if(S.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(S.writableType!==void 0)throw new RangeError("Invalid writableType specified");let x=br(w,0),B=on(w),U=br(y,1),M=on(y),k,te=b(Pe=>{k=Pe});od(this,te,U,M,x,B),ld(this,S),S.start!==void 0?k(S.start(this._transformStreamController)):k(void 0)}get readable(){if(!sa(this))throw la("readable");return this._readable}get writable(){if(!sa(this))throw la("writable");return this._writable}}Object.defineProperties(Sn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Sn.prototype,e.toStringTag,{value:"TransformStream",configurable:!0});function od(s,o,l,d,y,w){function S(){return o}function x(te){return hd(s,te)}function B(te){return fd(s,te)}function U(){return dd(s)}s._writable=mf(S,x,U,B,l,d);function M(){return pd(s)}function k(te){return En(s,te),m(void 0)}s._readable=qs(S,M,k,y,w),s._backpressure=void 0,s._backpressureChangePromise=void 0,s._backpressureChangePromise_resolve=void 0,Tn(s,!0),s._transformStreamController=void 0}function sa(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_transformStreamController")?!1:s instanceof Sn}function Rn(s,o){et(s._readable._readableStreamController,o),En(s,o)}function En(s,o){ia(s._transformStreamController),Ls(s._writable._writableStreamController,o),s._backpressure&&Tn(s,!1)}function Tn(s,o){s._backpressureChangePromise!==void 0&&s._backpressureChangePromise_resolve(),s._backpressureChangePromise=b(l=>{s._backpressureChangePromise_resolve=l}),s._backpressure=o}class Tr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!An(this))throw Cn("desiredSize");let o=this._controlledTransformStream._readable._readableStreamController;return Fs(o)}enqueue(o=void 0){if(!An(this))throw Cn("enqueue");oa(this,o)}error(o=void 0){if(!An(this))throw Cn("error");ud(this,o)}terminate(){if(!An(this))throw Cn("terminate");cd(this)}}Object.defineProperties(Tr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Tr.prototype,e.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function An(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledTransformStream")?!1:s instanceof Tr}function ad(s,o,l,d){o._controlledTransformStream=s,s._transformStreamController=o,o._transformAlgorithm=l,o._flushAlgorithm=d}function ld(s,o){let l=Object.create(Tr.prototype),d=w=>{try{return oa(l,w),m(void 0)}catch(S){return p(S)}},y=()=>m(void 0);o.transform!==void 0&&(d=w=>o.transform(w,l)),o.flush!==void 0&&(y=()=>o.flush(l)),ad(s,l,d,y)}function ia(s){s._transformAlgorithm=void 0,s._flushAlgorithm=void 0}function oa(s,o){let l=s._controlledTransformStream,d=l._readable._readableStreamController;if(!Ht(d))throw new TypeError("Readable side is not in a state that permits enqueue");try{bn(d,o)}catch(w){throw En(l,w),l._readable._storedError}zf(d)!==l._backpressure&&Tn(l,!0)}function ud(s,o){Rn(s._controlledTransformStream,o)}function aa(s,o){let l=s._transformAlgorithm(o);return N(l,void 0,d=>{throw Rn(s._controlledTransformStream,d),d})}function cd(s){let o=s._controlledTransformStream,l=o._readable._readableStreamController;Rr(l);let d=new TypeError("TransformStream terminated");En(o,d)}function hd(s,o){let l=s._transformStreamController;if(s._backpressure){let d=s._backpressureChangePromise;return N(d,()=>{let y=s._writable;if(y._state==="erroring")throw y._storedError;return aa(l,o)})}return aa(l,o)}function fd(s,o){return Rn(s,o),m(void 0)}function dd(s){let o=s._readable,l=s._transformStreamController,d=l._flushAlgorithm();return ia(l),N(d,()=>{if(o._state==="errored")throw o._storedError;Rr(o._readableStreamController)},y=>{throw Rn(s,y),o._storedError})}function pd(s){return Tn(s,!1),s._backpressureChangePromise}function Cn(s){return new TypeError(`TransformStreamDefaultController.prototype.${s} can only be used on a TransformStreamDefaultController`)}function la(s){return new TypeError(`TransformStream.prototype.${s} can only be used on a TransformStream`)}t.ByteLengthQueuingStrategy=_n,t.CountQueuingStrategy=wn,t.ReadableByteStreamController=$t,t.ReadableStream=tt,t.ReadableStreamBYOBReader=gr,t.ReadableStreamBYOBRequest=dr,t.ReadableStreamDefaultController=Dt,t.ReadableStreamDefaultReader=cr,t.TransformStream=Sn,t.TransformStreamDefaultController=Tr,t.WritableStream=yr,t.WritableStreamDefaultController=Nt,t.WritableStreamDefaultWriter=_r,Object.defineProperty(t,"__esModule",{value:!0})})});var Aa=C(()=>{if(!globalThis.ReadableStream)try{let t=ye("node:process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,ye("node:stream/web")),t.emitWarning=e}catch(r){throw t.emitWarning=e,r}}catch{Object.assign(globalThis,Ta())}try{let{Blob:t}=ye("buffer");t&&!t.prototype.stream&&(t.prototype.stream=function(r){let n=0,i=this;return new ReadableStream({type:"bytes",async pull(a){let h=await i.slice(n,Math.min(i.size,n+65536)).arrayBuffer();n+=h.byteLength,a.enqueue(new Uint8Array(h)),n===i.size&&a.close()}})})}catch{}});async function*Zs(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,Ca),u=r.buffer.slice(n,n+a);n+=u.byteLength,yield new Uint8Array(u)}}else yield r;else{let n=0,i=r;for(;n!==i.size;){let u=await i.slice(n,Math.min(i.size,n+Ca)).arrayBuffer();n+=u.byteLength,yield new Uint8Array(u)}}}var Uy,Ca,va,Ld,Ve,vr=Ar(()=>{Uy=Se(Aa(),1);Ca=65536;va=class Js{#e=[];#r="";#t=0;#n="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 u;ArrayBuffer.isView(a)?u=new Uint8Array(a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength)):a instanceof ArrayBuffer?u=new Uint8Array(a.slice(0)):a instanceof Js?u=a:u=n.encode(`${a}`),this.#t+=ArrayBuffer.isView(u)?u.byteLength:u.size,this.#e.push(u)}this.#n=`${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 Zs(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 Zs(this.#e,!1))e.set(n,r),r+=n.length;return e.buffer}stream(){let e=Zs(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),u=r<0?Math.max(i+r,0):Math.min(r,i),h=Math.max(u-a,0),f=this.#e,c=[],g=0;for(let m of f){if(g>=h)break;let p=ArrayBuffer.isView(m)?m.byteLength:m.size;if(a&&p<=a)a-=p,u-=p;else{let _;ArrayBuffer.isView(m)?(_=m.subarray(a,Math.min(p,u)),g+=_.byteLength):(_=m.slice(a,Math.min(p,u)),g+=_.size),u-=p,c.push(_),a=0}}let b=new Js([],{type:String(n).toLowerCase()});return b.#t=h,b.#e=c,b}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(va.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});Ld=va,Ve=Ld});var Pd,Nd,Mt,ei=Ar(()=>{vr();Pd=class extends Ve{#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 Ve&&/^(File)$/.test(e[Symbol.toStringTag])}},Nd=Pd,Mt=Nd});function Ia(t,e=Ve){var r=`${xa()}${xa()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),n=[],i=`--${r}\r
3
+ var md=Object.create;var Ms=Object.defineProperty;var gd=Object.getOwnPropertyDescriptor;var bd=Object.getOwnPropertyNames;var yd=Object.getPrototypeOf,_d=Object.prototype.hasOwnProperty;var ye=(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 Ar=(t,e)=>()=>(t&&(e=t(t=0)),e);var C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),wd=(t,e)=>{for(var r in e)Ms(t,r,{get:e[r],enumerable:!0})},Sd=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bd(e))!_d.call(t,i)&&i!==r&&Ms(t,i,{get:()=>e[i],enumerable:!(n=gd(e,i))||n.enumerable});return t};var Se=(t,e,r)=>(r=t!=null?md(yd(t)):{},Sd(e||!t||!t.__esModule?Ms(r,"default",{value:t,enumerable:!0}):r,t));var fa=C((xy,ha)=>{"use strict";var Ws=ye("https"),js=ye("http"),{URL:ca}=ye("url"),Vs=class extends js.Agent{constructor(e){let{proxy:r,proxyRequestOptions:n,...i}=e;super(i),this.proxy=typeof r=="string"?new ca(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:"?js:Ws).request(n);i.once("connect",(a,u,h)=>{i.removeAllListeners(),u.removeAllListeners(),a.statusCode===200?r(null,u):(u.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()}},Gs=class extends Ws.Agent{constructor(e){let{proxy:r,proxyRequestOptions:n,...i}=e;super(i),this.proxy=typeof r=="string"?new ca(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:"?js:Ws).request(n);i.once("connect",(a,u,h)=>{if(i.removeAllListeners(),u.removeAllListeners(),a.statusCode===200){let f=super.createConnection({...e,socket:u});r(null,f)}else u.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()}};ha.exports={HttpProxyAgent:Vs,HttpsProxyAgent:Gs}});var ga=C(ma=>{"use strict";var Rd=ye("url").parse,Ed={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Td=String.prototype.endsWith||function(t){return t.length<=this.length&&this.indexOf(t,this.length-t.length)!==-1};function Ad(t){var e=typeof t=="string"?Rd(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)||Ed[r]||0,!Cd(n,i)))return"";var a=zt("npm_config_"+r+"_proxy")||zt(r+"_proxy")||zt("npm_config_proxy")||zt("all_proxy");return a&&a.indexOf("://")===-1&&(a=r+"://"+a),a}function Cd(t,e){var r=(zt("npm_config_no_proxy")||zt("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,u=i?parseInt(i[2]):0;return u&&u!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!Td.call(t,a)):t!==a}):!0}function zt(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}ma.getProxyForUrl=Ad});var Xs=C((By,Sa)=>{"use strict";function Id(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 _a(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function wa(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}Sa.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($){return r.bools[$]})}Object.keys(e.alias||{}).forEach(function(T){n[T]=[].concat(e.alias[T]),n[T].forEach(function($){n[$]=[T].concat(n[T].filter(function(D){return $!==D}))})}),[].concat(e.string).filter(Boolean).forEach(function(T){r.strings[T]=!0,n[T]&&[].concat(n[T]).forEach(function($){r.strings[$]=!0})});var a=e.default||{},u={_:[]};function h(T,$){return r.allBools&&/^--[^=]+$/.test($)||r.strings[T]||r.bools[T]||n[T]}function f(T,$,D){for(var H=T,V=0;V<$.length-1;V++){var X=$[V];if(wa(H,X))return;H[X]===void 0&&(H[X]={}),(H[X]===Object.prototype||H[X]===Number.prototype||H[X]===String.prototype)&&(H[X]={}),H[X]===Array.prototype&&(H[X]=[]),H=H[X]}var J=$[$.length-1];wa(H,J)||((H===Object.prototype||H===Number.prototype||H===String.prototype)&&(H={}),H===Array.prototype&&(H=[]),H[J]===void 0||r.bools[J]||typeof H[J]=="boolean"?H[J]=D:Array.isArray(H[J])?H[J].push(D):H[J]=[H[J],D])}function c(T,$,D){if(!(D&&r.unknownFn&&!h(T,D)&&r.unknownFn(D)===!1)){var H=!r.strings[T]&&_a($)?Number($):$;f(u,T.split("."),H),(n[T]||[]).forEach(function(V){f(u,V.split("."),H)})}}Object.keys(r.bools).forEach(function(T){c(T,a[T]===void 0?!1:a[T])});var g=[];t.indexOf("--")!==-1&&(g=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var b=0;b<t.length;b++){var m=t[b],p,_;if(/^--.+=/.test(m)){var E=m.match(/^--([^=]+)=([\s\S]*)$/);p=E[1];var R=E[2];r.bools[p]&&(R=R!=="false"),c(p,R,m)}else if(/^--no-.+/.test(m))p=m.match(/^--no-(.+)/)[1],c(p,!1,m);else if(/^--.+/.test(m))p=m.match(/^--(.+)/)[1],_=t[b+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!r.bools[p]&&!r.allBools&&(!n[p]||!i(p))?(c(p,_,m),b+=1):/^(true|false)$/.test(_)?(c(p,_==="true",m),b+=1):c(p,r.strings[p]?"":!0,m);else if(/^-[^-]+/.test(m)){for(var A=m.slice(1,-1).split(""),N=!1,L=0;L<A.length;L++){if(_=m.slice(L+2),_==="-"){c(A[L],_,m);continue}if(/[A-Za-z]/.test(A[L])&&_[0]==="="){c(A[L],_.slice(1),m),N=!0;break}if(/[A-Za-z]/.test(A[L])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){c(A[L],_,m),N=!0;break}if(A[L+1]&&A[L+1].match(/\W/)){c(A[L],m.slice(L+2),m),N=!0;break}else c(A[L],r.strings[A[L]]?"":!0,m)}p=m.slice(-1)[0],!N&&p!=="-"&&(t[b+1]&&!/^(-|--)[^-]/.test(t[b+1])&&!r.bools[p]&&(!n[p]||!i(p))?(c(p,t[b+1],m),b+=1):t[b+1]&&/^(true|false)$/.test(t[b+1])?(c(p,t[b+1]==="true",m),b+=1):c(p,r.strings[p]?"":!0,m))}else if((!r.unknownFn||r.unknownFn(m)!==!1)&&u._.push(r.strings._||!_a(m)?m:Number(m)),e.stopEarly){u._.push.apply(u._,t.slice(b+1));break}}return Object.keys(a).forEach(function(T){Id(u,T.split("."))||(f(u,T.split("."),a[T]),(n[T]||[]).forEach(function($){f(u,$.split("."),a[T])}))}),e["--"]?u["--"]=g.slice():g.forEach(function(T){u._.push(T)}),u}});var Ta=C((xn,Ea)=>{(function(t,e){typeof xn=="object"&&typeof Ea<"u"?e(xn):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(xn,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 u=r,h=Promise,f=Promise.prototype.then,c=Promise.resolve.bind(h),g=Promise.reject.bind(h);function b(s){return new h(s)}function m(s){return c(s)}function p(s){return g(s)}function _(s,o,l){return f.call(s,o,l)}function E(s,o,l){_(_(s,o,l),void 0,u)}function R(s,o){E(s,o)}function A(s,o){E(s,void 0,o)}function N(s,o,l){return _(s,o,l)}function L(s){_(s,void 0,u)}let T=(()=>{let s=i&&i.queueMicrotask;if(typeof s=="function")return s;let o=m(void 0);return l=>_(o,l)})();function $(s,o,l){if(typeof s!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(s,o,l)}function D(s,o,l){try{return m($(s,o,l))}catch(d){return p(d)}}let H=16384;class V{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 l=this._back,d=l;l._elements.length===H-1&&(d={_elements:[],_next:void 0}),l._elements.push(o),d!==l&&(this._back=d,l._next=d),++this._size}shift(){let o=this._front,l=o,d=this._cursor,y=d+1,w=o._elements,S=w[d];return y===H&&(l=o._next,y=0),--this._size,this._cursor=y,o!==l&&(this._front=l),w[d]=void 0,S}forEach(o){let l=this._cursor,d=this._front,y=d._elements;for(;(l!==y.length||d._next!==void 0)&&!(l===y.length&&(d=d._next,y=d._elements,l=0,y.length===0));)o(y[l]),++l}peek(){let o=this._front,l=this._cursor;return o._elements[l]}}function X(s,o){s._ownerReadableStream=o,o._reader=s,o._state==="readable"?v(s):o._state==="closed"?ee(s):Z(s,o._storedError)}function J(s,o){let l=s._ownerReadableStream;return Le(l,o)}function ae(s){s._ownerReadableStream._state==="readable"?oe(s,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):ct(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 He(s){return new TypeError("Cannot "+s+" a stream using a released reader")}function v(s){s._closedPromise=b((o,l)=>{s._closedPromise_resolve=o,s._closedPromise_reject=l})}function Z(s,o){v(s),oe(s,o)}function ee(s){v(s),Ot(s)}function oe(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 ct(s,o){Z(s,o)}function Ot(s){s._closedPromise_resolve!==void 0&&(s._closedPromise_resolve(void 0),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0)}let Xe=e("[[AbortSteps]]"),Oe=e("[[ErrorSteps]]"),fe=e("[[CancelSteps]]"),ht=e("[[PullSteps]]"),Be=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},Yr=Math.trunc||function(s){return s<0?Math.ceil(s):Math.floor(s)};function Vh(s){return typeof s=="object"||typeof s=="function"}function Me(s,o){if(s!==void 0&&!Vh(s))throw new TypeError(`${o} is not an object.`)}function Ie(s,o){if(typeof s!="function")throw new TypeError(`${o} is not a function.`)}function Gh(s){return typeof s=="object"&&s!==null||typeof s=="function"}function eo(s,o){if(!Gh(s))throw new TypeError(`${o} is not an object.`)}function ke(s,o,l){if(s===void 0)throw new TypeError(`Parameter ${o} is required in '${l}'.`)}function ms(s,o,l){if(s===void 0)throw new TypeError(`${o} is required in '${l}'.`)}function gs(s){return Number(s)}function to(s){return s===0?0:s}function Yh(s){return to(Yr(s))}function ro(s,o){let d=Number.MAX_SAFE_INTEGER,y=Number(s);if(y=to(y),!Be(y))throw new TypeError(`${o} is not a finite number`);if(y=Yh(y),y<0||y>d)throw new TypeError(`${o} is outside the accepted range of 0 to ${d}, inclusive`);return!Be(y)||y===0?0:y}function bs(s,o){if(!rt(s))throw new TypeError(`${o} is not a ReadableStream.`)}function It(s){return new cr(s)}function no(s,o){s._reader._readRequests.push(o)}function ys(s,o,l){let y=s._reader._readRequests.shift();l?y._closeSteps():y._chunkSteps(o)}function Qr(s){return s._reader._readRequests.length}function so(s){let o=s._reader;return!(o===void 0||!Ze(o))}class cr{constructor(o){if(ke(o,1,"ReadableStreamDefaultReader"),bs(o,"First parameter"),nt(o))throw new TypeError("This stream has already been locked for exclusive reading by another reader");X(this,o),this._readRequests=new V}get closed(){return Ze(this)?this._closedPromise:p(Kr("closed"))}cancel(o=void 0){return Ze(this)?this._ownerReadableStream===void 0?p(He("cancel")):J(this,o):p(Kr("cancel"))}read(){if(!Ze(this))return p(Kr("read"));if(this._ownerReadableStream===void 0)return p(He("read from"));let o,l,d=b((w,S)=>{o=w,l=S});return hr(this,{_chunkSteps:w=>o({value:w,done:!1}),_closeSteps:()=>o({value:void 0,done:!0}),_errorSteps:w=>l(w)}),d}releaseLock(){if(!Ze(this))throw Kr("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");ae(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:"ReadableStreamDefaultReader",configurable:!0});function Ze(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readRequests")?!1:s instanceof cr}function hr(s,o){let l=s._ownerReadableStream;l._disturbed=!0,l._state==="closed"?o._closeSteps():l._state==="errored"?o._errorSteps(l._storedError):l._readableStreamController[ht](o)}function Kr(s){return new TypeError(`ReadableStreamDefaultReader.prototype.${s} can only be used on a ReadableStreamDefaultReader`)}let io=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class oo{constructor(o,l){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=o,this._preventCancel=l}next(){let o=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?N(this._ongoingPromise,o,o):o(),this._ongoingPromise}return(o){let l=()=>this._returnSteps(o);return this._ongoingPromise?N(this._ongoingPromise,l,l):l()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let o=this._reader;if(o._ownerReadableStream===void 0)return p(He("iterate"));let l,d,y=b((S,x)=>{l=S,d=x});return hr(o,{_chunkSteps:S=>{this._ongoingPromise=void 0,T(()=>l({value:S,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,ae(o),l({value:void 0,done:!0})},_errorSteps:S=>{this._ongoingPromise=void 0,this._isFinished=!0,ae(o),d(S)}}),y}_returnSteps(o){if(this._isFinished)return Promise.resolve({value:o,done:!0});this._isFinished=!0;let l=this._reader;if(l._ownerReadableStream===void 0)return p(He("finish iterating"));if(!this._preventCancel){let d=J(l,o);return ae(l),N(d,()=>({value:o,done:!0}))}return ae(l),m({value:o,done:!0})}}let ao={next(){return lo(this)?this._asyncIteratorImpl.next():p(uo("next"))},return(s){return lo(this)?this._asyncIteratorImpl.return(s):p(uo("return"))}};io!==void 0&&Object.setPrototypeOf(ao,io);function Qh(s,o){let l=It(s),d=new oo(l,o),y=Object.create(ao);return y._asyncIteratorImpl=d,y}function lo(s){if(!a(s)||!Object.prototype.hasOwnProperty.call(s,"_asyncIteratorImpl"))return!1;try{return s._asyncIteratorImpl instanceof oo}catch{return!1}}function uo(s){return new TypeError(`ReadableStreamAsyncIterator.${s} can only be used on a ReadableSteamAsyncIterator`)}let co=Number.isNaN||function(s){return s!==s};function fr(s){return s.slice()}function ho(s,o,l,d,y){new Uint8Array(s).set(new Uint8Array(l,d,y),o)}function Ay(s){return s}function Xr(s){return!1}function fo(s,o,l){if(s.slice)return s.slice(o,l);let d=l-o,y=new ArrayBuffer(d);return ho(y,0,s,o,d),y}function Kh(s){return!(typeof s!="number"||co(s)||s<0)}function po(s){let o=fo(s.buffer,s.byteOffset,s.byteOffset+s.byteLength);return new Uint8Array(o)}function _s(s){let o=s._queue.shift();return s._queueTotalSize-=o.size,s._queueTotalSize<0&&(s._queueTotalSize=0),o.value}function ws(s,o,l){if(!Kh(l)||l===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");s._queue.push({value:o,size:l}),s._queueTotalSize+=l}function Xh(s){return s._queue.peek().value}function Je(s){s._queue=new V,s._queueTotalSize=0}class dr{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Ss(this))throw As("view");return this._view}respond(o){if(!Ss(this))throw As("respond");if(ke(o,1,"respond"),o=ro(o,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Xr(this._view.buffer),rn(this._associatedReadableByteStreamController,o)}respondWithNewView(o){if(!Ss(this))throw As("respondWithNewView");if(ke(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");Xr(o.buffer),nn(this._associatedReadableByteStreamController,o)}}Object.defineProperties(dr.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(dr.prototype,e.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class $t{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!ft(this))throw mr("byobRequest");return Ts(this)}get desiredSize(){if(!ft(this))throw mr("desiredSize");return Ro(this)}close(){if(!ft(this))throw mr("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`);pr(this)}enqueue(o){if(!ft(this))throw mr("enqueue");if(ke(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 l=this._controlledReadableByteStream._state;if(l!=="readable")throw new TypeError(`The stream (in ${l} state) is not in the readable state and cannot be enqueued to`);tn(this,o)}error(o=void 0){if(!ft(this))throw mr("error");$e(this,o)}[fe](o){mo(this),Je(this);let l=this._cancelAlgorithm(o);return en(this),l}[ht](o){let l=this._controlledReadableByteStream;if(this._queueTotalSize>0){let y=this._queue.shift();this._queueTotalSize-=y.byteLength,_o(this);let w=new Uint8Array(y.buffer,y.byteOffset,y.byteLength);o._chunkSteps(w);return}let d=this._autoAllocateChunkSize;if(d!==void 0){let y;try{y=new ArrayBuffer(d)}catch(S){o._errorSteps(S);return}let w={buffer:y,bufferByteLength:d,byteOffset:0,byteLength:d,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(w)}no(l,o),dt(this)}}Object.defineProperties($t.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty($t.prototype,e.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ft(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledReadableByteStream")?!1:s instanceof $t}function Ss(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_associatedReadableByteStreamController")?!1:s instanceof dr}function dt(s){if(!tf(s))return;if(s._pulling){s._pullAgain=!0;return}s._pulling=!0;let l=s._pullAlgorithm();E(l,()=>{s._pulling=!1,s._pullAgain&&(s._pullAgain=!1,dt(s))},d=>{$e(s,d)})}function mo(s){Es(s),s._pendingPullIntos=new V}function Rs(s,o){let l=!1;s._state==="closed"&&(l=!0);let d=go(o);o.readerType==="default"?ys(s,d,l):sf(s,d,l)}function go(s){let o=s.bytesFilled,l=s.elementSize;return new s.viewConstructor(s.buffer,s.byteOffset,o/l)}function Zr(s,o,l,d){s._queue.push({buffer:o,byteOffset:l,byteLength:d}),s._queueTotalSize+=d}function bo(s,o){let l=o.elementSize,d=o.bytesFilled-o.bytesFilled%l,y=Math.min(s._queueTotalSize,o.byteLength-o.bytesFilled),w=o.bytesFilled+y,S=w-w%l,x=y,B=!1;S>d&&(x=S-o.bytesFilled,B=!0);let U=s._queue;for(;x>0;){let M=U.peek(),k=Math.min(x,M.byteLength),te=o.byteOffset+o.bytesFilled;ho(o.buffer,te,M.buffer,M.byteOffset,k),M.byteLength===k?U.shift():(M.byteOffset+=k,M.byteLength-=k),s._queueTotalSize-=k,yo(s,k,o),x-=k}return B}function yo(s,o,l){l.bytesFilled+=o}function _o(s){s._queueTotalSize===0&&s._closeRequested?(en(s),Er(s._controlledReadableByteStream)):dt(s)}function Es(s){s._byobRequest!==null&&(s._byobRequest._associatedReadableByteStreamController=void 0,s._byobRequest._view=null,s._byobRequest=null)}function wo(s){for(;s._pendingPullIntos.length>0;){if(s._queueTotalSize===0)return;let o=s._pendingPullIntos.peek();bo(s,o)&&(Jr(s),Rs(s._controlledReadableByteStream,o))}}function Zh(s,o,l){let d=s._controlledReadableByteStream,y=1;o.constructor!==DataView&&(y=o.constructor.BYTES_PER_ELEMENT);let w=o.constructor,S=o.buffer,x={buffer:S,bufferByteLength:S.byteLength,byteOffset:o.byteOffset,byteLength:o.byteLength,bytesFilled:0,elementSize:y,viewConstructor:w,readerType:"byob"};if(s._pendingPullIntos.length>0){s._pendingPullIntos.push(x),Ao(d,l);return}if(d._state==="closed"){let B=new w(x.buffer,x.byteOffset,0);l._closeSteps(B);return}if(s._queueTotalSize>0){if(bo(s,x)){let B=go(x);_o(s),l._chunkSteps(B);return}if(s._closeRequested){let B=new TypeError("Insufficient bytes to fill elements in the given buffer");$e(s,B),l._errorSteps(B);return}}s._pendingPullIntos.push(x),Ao(d,l),dt(s)}function Jh(s,o){let l=s._controlledReadableByteStream;if(Cs(l))for(;Co(l)>0;){let d=Jr(s);Rs(l,d)}}function ef(s,o,l){if(yo(s,o,l),l.bytesFilled<l.elementSize)return;Jr(s);let d=l.bytesFilled%l.elementSize;if(d>0){let y=l.byteOffset+l.bytesFilled,w=fo(l.buffer,y-d,y);Zr(s,w,0,w.byteLength)}l.bytesFilled-=d,Rs(s._controlledReadableByteStream,l),wo(s)}function So(s,o){let l=s._pendingPullIntos.peek();Es(s),s._controlledReadableByteStream._state==="closed"?Jh(s):ef(s,o,l),dt(s)}function Jr(s){return s._pendingPullIntos.shift()}function tf(s){let o=s._controlledReadableByteStream;return o._state!=="readable"||s._closeRequested||!s._started?!1:!!(so(o)&&Qr(o)>0||Cs(o)&&Co(o)>0||Ro(s)>0)}function en(s){s._pullAlgorithm=void 0,s._cancelAlgorithm=void 0}function pr(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 d=new TypeError("Insufficient bytes to fill elements in the given buffer");throw $e(s,d),d}en(s),Er(o)}}function tn(s,o){let l=s._controlledReadableByteStream;if(s._closeRequested||l._state!=="readable")return;let d=o.buffer,y=o.byteOffset,w=o.byteLength,S=d;if(s._pendingPullIntos.length>0){let x=s._pendingPullIntos.peek();Xr(x.buffer),x.buffer=x.buffer}if(Es(s),so(l))if(Qr(l)===0)Zr(s,S,y,w);else{s._pendingPullIntos.length>0&&Jr(s);let x=new Uint8Array(S,y,w);ys(l,x,!1)}else Cs(l)?(Zr(s,S,y,w),wo(s)):Zr(s,S,y,w);dt(s)}function $e(s,o){let l=s._controlledReadableByteStream;l._state==="readable"&&(mo(s),Je(s),en(s),Ko(l,o))}function Ts(s){if(s._byobRequest===null&&s._pendingPullIntos.length>0){let o=s._pendingPullIntos.peek(),l=new Uint8Array(o.buffer,o.byteOffset+o.bytesFilled,o.byteLength-o.bytesFilled),d=Object.create(dr.prototype);nf(d,s,l),s._byobRequest=d}return s._byobRequest}function Ro(s){let o=s._controlledReadableByteStream._state;return o==="errored"?null:o==="closed"?0:s._strategyHWM-s._queueTotalSize}function rn(s,o){let l=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(l.bytesFilled+o>l.byteLength)throw new RangeError("bytesWritten out of range")}l.buffer=l.buffer,So(s,o)}function nn(s,o){let l=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(l.byteOffset+l.bytesFilled!==o.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(l.bufferByteLength!==o.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(l.bytesFilled+o.byteLength>l.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let y=o.byteLength;l.buffer=o.buffer,So(s,y)}function Eo(s,o,l,d,y,w,S){o._controlledReadableByteStream=s,o._pullAgain=!1,o._pulling=!1,o._byobRequest=null,o._queue=o._queueTotalSize=void 0,Je(o),o._closeRequested=!1,o._started=!1,o._strategyHWM=w,o._pullAlgorithm=d,o._cancelAlgorithm=y,o._autoAllocateChunkSize=S,o._pendingPullIntos=new V,s._readableStreamController=o;let x=l();E(m(x),()=>{o._started=!0,dt(o)},B=>{$e(o,B)})}function rf(s,o,l){let d=Object.create($t.prototype),y=()=>{},w=()=>m(void 0),S=()=>m(void 0);o.start!==void 0&&(y=()=>o.start(d)),o.pull!==void 0&&(w=()=>o.pull(d)),o.cancel!==void 0&&(S=B=>o.cancel(B));let x=o.autoAllocateChunkSize;if(x===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Eo(s,d,y,w,S,l,x)}function nf(s,o,l){s._associatedReadableByteStreamController=o,s._view=l}function As(s){return new TypeError(`ReadableStreamBYOBRequest.prototype.${s} can only be used on a ReadableStreamBYOBRequest`)}function mr(s){return new TypeError(`ReadableByteStreamController.prototype.${s} can only be used on a ReadableByteStreamController`)}function To(s){return new gr(s)}function Ao(s,o){s._reader._readIntoRequests.push(o)}function sf(s,o,l){let y=s._reader._readIntoRequests.shift();l?y._closeSteps(o):y._chunkSteps(o)}function Co(s){return s._reader._readIntoRequests.length}function Cs(s){let o=s._reader;return!(o===void 0||!pt(o))}class gr{constructor(o){if(ke(o,1,"ReadableStreamBYOBReader"),bs(o,"First parameter"),nt(o))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ft(o._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");X(this,o),this._readIntoRequests=new V}get closed(){return pt(this)?this._closedPromise:p(sn("closed"))}cancel(o=void 0){return pt(this)?this._ownerReadableStream===void 0?p(He("cancel")):J(this,o):p(sn("cancel"))}read(o){if(!pt(this))return p(sn("read"));if(!ArrayBuffer.isView(o))return p(new TypeError("view must be an array buffer view"));if(o.byteLength===0)return p(new TypeError("view must have non-zero byteLength"));if(o.buffer.byteLength===0)return p(new TypeError("view's buffer must have non-zero byteLength"));if(Xr(o.buffer),this._ownerReadableStream===void 0)return p(He("read from"));let l,d,y=b((S,x)=>{l=S,d=x});return vo(this,o,{_chunkSteps:S=>l({value:S,done:!1}),_closeSteps:S=>l({value:S,done:!0}),_errorSteps:S=>d(S)}),y}releaseLock(){if(!pt(this))throw sn("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");ae(this)}}}Object.defineProperties(gr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(gr.prototype,e.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function pt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readIntoRequests")?!1:s instanceof gr}function vo(s,o,l){let d=s._ownerReadableStream;d._disturbed=!0,d._state==="errored"?l._errorSteps(d._storedError):Zh(d._readableStreamController,o,l)}function sn(s){return new TypeError(`ReadableStreamBYOBReader.prototype.${s} can only be used on a ReadableStreamBYOBReader`)}function br(s,o){let{highWaterMark:l}=s;if(l===void 0)return o;if(co(l)||l<0)throw new RangeError("Invalid highWaterMark");return l}function on(s){let{size:o}=s;return o||(()=>1)}function an(s,o){Me(s,o);let l=s==null?void 0:s.highWaterMark,d=s==null?void 0:s.size;return{highWaterMark:l===void 0?void 0:gs(l),size:d===void 0?void 0:of(d,`${o} has member 'size' that`)}}function of(s,o){return Ie(s,o),l=>gs(s(l))}function af(s,o){Me(s,o);let l=s==null?void 0:s.abort,d=s==null?void 0:s.close,y=s==null?void 0:s.start,w=s==null?void 0:s.type,S=s==null?void 0:s.write;return{abort:l===void 0?void 0:lf(l,s,`${o} has member 'abort' that`),close:d===void 0?void 0:uf(d,s,`${o} has member 'close' that`),start:y===void 0?void 0:cf(y,s,`${o} has member 'start' that`),write:S===void 0?void 0:hf(S,s,`${o} has member 'write' that`),type:w}}function lf(s,o,l){return Ie(s,l),d=>D(s,o,[d])}function uf(s,o,l){return Ie(s,l),()=>D(s,o,[])}function cf(s,o,l){return Ie(s,l),d=>$(s,o,[d])}function hf(s,o,l){return Ie(s,l),(d,y)=>D(s,o,[d,y])}function xo(s,o){if(!Lt(s))throw new TypeError(`${o} is not a WritableStream.`)}function ff(s){if(typeof s!="object"||s===null)return!1;try{return typeof s.aborted=="boolean"}catch{return!1}}let df=typeof AbortController=="function";function pf(){if(df)return new AbortController}class yr{constructor(o={},l={}){o===void 0?o=null:eo(o,"First parameter");let d=an(l,"Second parameter"),y=af(o,"First parameter");if(Io(this),y.type!==void 0)throw new RangeError("Invalid type is specified");let S=on(d),x=br(d,1);xf(this,y,x,S)}get locked(){if(!Lt(this))throw fn("locked");return Pt(this)}abort(o=void 0){return Lt(this)?Pt(this)?p(new TypeError("Cannot abort a stream that already has a writer")):ln(this,o):p(fn("abort"))}close(){return Lt(this)?Pt(this)?p(new TypeError("Cannot close a stream that already has a writer")):Fe(this)?p(new TypeError("Cannot close an already-closing stream")):$o(this):p(fn("close"))}getWriter(){if(!Lt(this))throw fn("getWriter");return Oo(this)}}Object.defineProperties(yr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(yr.prototype,e.toStringTag,{value:"WritableStream",configurable:!0});function Oo(s){return new _r(s)}function mf(s,o,l,d,y=1,w=()=>1){let S=Object.create(yr.prototype);Io(S);let x=Object.create(Nt.prototype);return Bo(S,x,s,o,l,d,y,w),S}function Io(s){s._state="writable",s._storedError=void 0,s._writer=void 0,s._writableStreamController=void 0,s._writeRequests=new V,s._inFlightWriteRequest=void 0,s._closeRequest=void 0,s._inFlightCloseRequest=void 0,s._pendingAbortRequest=void 0,s._backpressure=!1}function Lt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_writableStreamController")?!1:s instanceof yr}function Pt(s){return s._writer!==void 0}function ln(s,o){var l;if(s._state==="closed"||s._state==="errored")return m(void 0);s._writableStreamController._abortReason=o,(l=s._writableStreamController._abortController)===null||l===void 0||l.abort();let d=s._state;if(d==="closed"||d==="errored")return m(void 0);if(s._pendingAbortRequest!==void 0)return s._pendingAbortRequest._promise;let y=!1;d==="erroring"&&(y=!0,o=void 0);let w=b((S,x)=>{s._pendingAbortRequest={_promise:void 0,_resolve:S,_reject:x,_reason:o,_wasAlreadyErroring:y}});return s._pendingAbortRequest._promise=w,y||xs(s,o),w}function $o(s){let o=s._state;if(o==="closed"||o==="errored")return p(new TypeError(`The stream (in ${o} state) is not in the writable state and cannot be closed`));let l=b((y,w)=>{let S={_resolve:y,_reject:w};s._closeRequest=S}),d=s._writer;return d!==void 0&&s._backpressure&&o==="writable"&&Bs(d),Of(s._writableStreamController),l}function gf(s){return b((l,d)=>{let y={_resolve:l,_reject:d};s._writeRequests.push(y)})}function vs(s,o){if(s._state==="writable"){xs(s,o);return}Os(s)}function xs(s,o){let l=s._writableStreamController;s._state="erroring",s._storedError=o;let d=s._writer;d!==void 0&&Po(d,o),!Sf(s)&&l._started&&Os(s)}function Os(s){s._state="errored",s._writableStreamController[Oe]();let o=s._storedError;if(s._writeRequests.forEach(y=>{y._reject(o)}),s._writeRequests=new V,s._pendingAbortRequest===void 0){un(s);return}let l=s._pendingAbortRequest;if(s._pendingAbortRequest=void 0,l._wasAlreadyErroring){l._reject(o),un(s);return}let d=s._writableStreamController[Xe](l._reason);E(d,()=>{l._resolve(),un(s)},y=>{l._reject(y),un(s)})}function bf(s){s._inFlightWriteRequest._resolve(void 0),s._inFlightWriteRequest=void 0}function yf(s,o){s._inFlightWriteRequest._reject(o),s._inFlightWriteRequest=void 0,vs(s,o)}function _f(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 l=s._writer;l!==void 0&&zo(l)}function wf(s,o){s._inFlightCloseRequest._reject(o),s._inFlightCloseRequest=void 0,s._pendingAbortRequest!==void 0&&(s._pendingAbortRequest._reject(o),s._pendingAbortRequest=void 0),vs(s,o)}function Fe(s){return!(s._closeRequest===void 0&&s._inFlightCloseRequest===void 0)}function Sf(s){return!(s._inFlightWriteRequest===void 0&&s._inFlightCloseRequest===void 0)}function Rf(s){s._inFlightCloseRequest=s._closeRequest,s._closeRequest=void 0}function Ef(s){s._inFlightWriteRequest=s._writeRequests.shift()}function un(s){s._closeRequest!==void 0&&(s._closeRequest._reject(s._storedError),s._closeRequest=void 0);let o=s._writer;o!==void 0&&Ds(o,s._storedError)}function Is(s,o){let l=s._writer;l!==void 0&&o!==s._backpressure&&(o?Hf(l):Bs(l)),s._backpressure=o}class _r{constructor(o){if(ke(o,1,"WritableStreamDefaultWriter"),xo(o,"First parameter"),Pt(o))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=o,o._writer=this;let l=o._state;if(l==="writable")!Fe(o)&&o._backpressure?pn(this):Mo(this),dn(this);else if(l==="erroring")Hs(this,o._storedError),dn(this);else if(l==="closed")Mo(this),Nf(this);else{let d=o._storedError;Hs(this,d),Uo(this,d)}}get closed(){return mt(this)?this._closedPromise:p(gt("closed"))}get desiredSize(){if(!mt(this))throw gt("desiredSize");if(this._ownerWritableStream===void 0)throw wr("desiredSize");return vf(this)}get ready(){return mt(this)?this._readyPromise:p(gt("ready"))}abort(o=void 0){return mt(this)?this._ownerWritableStream===void 0?p(wr("abort")):Tf(this,o):p(gt("abort"))}close(){if(!mt(this))return p(gt("close"));let o=this._ownerWritableStream;return o===void 0?p(wr("close")):Fe(o)?p(new TypeError("Cannot close an already-closing stream")):Lo(this)}releaseLock(){if(!mt(this))throw gt("releaseLock");this._ownerWritableStream!==void 0&&No(this)}write(o=void 0){return mt(this)?this._ownerWritableStream===void 0?p(wr("write to")):Do(this,o):p(gt("write"))}}Object.defineProperties(_r.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(_r.prototype,e.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function mt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_ownerWritableStream")?!1:s instanceof _r}function Tf(s,o){let l=s._ownerWritableStream;return ln(l,o)}function Lo(s){let o=s._ownerWritableStream;return $o(o)}function Af(s){let o=s._ownerWritableStream,l=o._state;return Fe(o)||l==="closed"?m(void 0):l==="errored"?p(o._storedError):Lo(s)}function Cf(s,o){s._closedPromiseState==="pending"?Ds(s,o):Df(s,o)}function Po(s,o){s._readyPromiseState==="pending"?ko(s,o):Bf(s,o)}function vf(s){let o=s._ownerWritableStream,l=o._state;return l==="errored"||l==="erroring"?null:l==="closed"?0:Fo(o._writableStreamController)}function No(s){let o=s._ownerWritableStream,l=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Po(s,l),Cf(s,l),o._writer=void 0,s._ownerWritableStream=void 0}function Do(s,o){let l=s._ownerWritableStream,d=l._writableStreamController,y=If(d,o);if(l!==s._ownerWritableStream)return p(wr("write to"));let w=l._state;if(w==="errored")return p(l._storedError);if(Fe(l)||w==="closed")return p(new TypeError("The stream is closing or closed and cannot be written to"));if(w==="erroring")return p(l._storedError);let S=gf(l);return $f(d,o,y),S}let Ho={};class Nt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!$s(this))throw Ns("abortReason");return this._abortReason}get signal(){if(!$s(this))throw Ns("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(o=void 0){if(!$s(this))throw Ns("error");this._controlledWritableStream._state==="writable"&&qo(this,o)}[Xe](o){let l=this._abortAlgorithm(o);return cn(this),l}[Oe](){Je(this)}}Object.defineProperties(Nt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Nt.prototype,e.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function $s(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledWritableStream")?!1:s instanceof Nt}function Bo(s,o,l,d,y,w,S,x){o._controlledWritableStream=s,s._writableStreamController=o,o._queue=void 0,o._queueTotalSize=void 0,Je(o),o._abortReason=void 0,o._abortController=pf(),o._started=!1,o._strategySizeAlgorithm=x,o._strategyHWM=S,o._writeAlgorithm=d,o._closeAlgorithm=y,o._abortAlgorithm=w;let B=Ps(o);Is(s,B);let U=l(),M=m(U);E(M,()=>{o._started=!0,hn(o)},k=>{o._started=!0,vs(s,k)})}function xf(s,o,l,d){let y=Object.create(Nt.prototype),w=()=>{},S=()=>m(void 0),x=()=>m(void 0),B=()=>m(void 0);o.start!==void 0&&(w=()=>o.start(y)),o.write!==void 0&&(S=U=>o.write(U,y)),o.close!==void 0&&(x=()=>o.close()),o.abort!==void 0&&(B=U=>o.abort(U)),Bo(s,y,w,S,x,B,l,d)}function cn(s){s._writeAlgorithm=void 0,s._closeAlgorithm=void 0,s._abortAlgorithm=void 0,s._strategySizeAlgorithm=void 0}function Of(s){ws(s,Ho,0),hn(s)}function If(s,o){try{return s._strategySizeAlgorithm(o)}catch(l){return Ls(s,l),1}}function Fo(s){return s._strategyHWM-s._queueTotalSize}function $f(s,o,l){try{ws(s,o,l)}catch(y){Ls(s,y);return}let d=s._controlledWritableStream;if(!Fe(d)&&d._state==="writable"){let y=Ps(s);Is(d,y)}hn(s)}function hn(s){let o=s._controlledWritableStream;if(!s._started||o._inFlightWriteRequest!==void 0)return;if(o._state==="erroring"){Os(o);return}if(s._queue.length===0)return;let d=Xh(s);d===Ho?Lf(s):Pf(s,d)}function Ls(s,o){s._controlledWritableStream._state==="writable"&&qo(s,o)}function Lf(s){let o=s._controlledWritableStream;Rf(o),_s(s);let l=s._closeAlgorithm();cn(s),E(l,()=>{_f(o)},d=>{wf(o,d)})}function Pf(s,o){let l=s._controlledWritableStream;Ef(l);let d=s._writeAlgorithm(o);E(d,()=>{bf(l);let y=l._state;if(_s(s),!Fe(l)&&y==="writable"){let w=Ps(s);Is(l,w)}hn(s)},y=>{l._state==="writable"&&cn(s),yf(l,y)})}function Ps(s){return Fo(s)<=0}function qo(s,o){let l=s._controlledWritableStream;cn(s),xs(l,o)}function fn(s){return new TypeError(`WritableStream.prototype.${s} can only be used on a WritableStream`)}function Ns(s){return new TypeError(`WritableStreamDefaultController.prototype.${s} can only be used on a WritableStreamDefaultController`)}function gt(s){return new TypeError(`WritableStreamDefaultWriter.prototype.${s} can only be used on a WritableStreamDefaultWriter`)}function wr(s){return new TypeError("Cannot "+s+" a stream using a released writer")}function dn(s){s._closedPromise=b((o,l)=>{s._closedPromise_resolve=o,s._closedPromise_reject=l,s._closedPromiseState="pending"})}function Uo(s,o){dn(s),Ds(s,o)}function Nf(s){dn(s),zo(s)}function Ds(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 Df(s,o){Uo(s,o)}function zo(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 pn(s){s._readyPromise=b((o,l)=>{s._readyPromise_resolve=o,s._readyPromise_reject=l}),s._readyPromiseState="pending"}function Hs(s,o){pn(s),ko(s,o)}function Mo(s){pn(s),Bs(s)}function ko(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 Hf(s){pn(s)}function Bf(s,o){Hs(s,o)}function Bs(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 Wo=typeof DOMException<"u"?DOMException:void 0;function Ff(s){if(!(typeof s=="function"||typeof s=="object"))return!1;try{return new s,!0}catch{return!1}}function qf(){let s=function(l,d){this.message=l||"",this.name=d||"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 Uf=Ff(Wo)?Wo:qf();function jo(s,o,l,d,y,w){let S=It(s),x=Oo(o);s._disturbed=!0;let B=!1,U=m(void 0);return b((M,k)=>{let te;if(w!==void 0){if(te=()=>{let P=new Uf("Aborted","AbortError"),q=[];d||q.push(()=>o._state==="writable"?ln(o,P):m(void 0)),y||q.push(()=>s._state==="readable"?Le(s,P):m(void 0)),de(()=>Promise.all(q.map(G=>G())),!0,P)},w.aborted){te();return}w.addEventListener("abort",te)}function Pe(){return b((P,q)=>{function G(be){be?P():_(Bt(),G,q)}G(!1)})}function Bt(){return B?m(!0):_(x._readyPromise,()=>b((P,q)=>{hr(S,{_chunkSteps:G=>{U=_(Do(x,G),void 0,r),P(!1)},_closeSteps:()=>P(!0),_errorSteps:q})}))}if(We(s,S._closedPromise,P=>{d?we(!0,P):de(()=>ln(o,P),!0,P)}),We(o,x._closedPromise,P=>{y?we(!0,P):de(()=>Le(s,P),!0,P)}),ue(s,S._closedPromise,()=>{l?we():de(()=>Af(x))}),Fe(o)||o._state==="closed"){let P=new TypeError("the destination writable stream closed before all data could be piped to it");y?we(!0,P):de(()=>Le(s,P),!0,P)}L(Pe());function st(){let P=U;return _(U,()=>P!==U?st():void 0)}function We(P,q,G){P._state==="errored"?G(P._storedError):A(q,G)}function ue(P,q,G){P._state==="closed"?G():R(q,G)}function de(P,q,G){if(B)return;B=!0,o._state==="writable"&&!Fe(o)?R(st(),be):be();function be(){E(P(),()=>je(q,G),Ft=>je(!0,Ft))}}function we(P,q){B||(B=!0,o._state==="writable"&&!Fe(o)?R(st(),()=>je(P,q)):je(P,q))}function je(P,q){No(x),ae(S),w!==void 0&&w.removeEventListener("abort",te),P?k(q):M(void 0)}})}class Dt{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!mn(this))throw yn("desiredSize");return Fs(this)}close(){if(!mn(this))throw yn("close");if(!Ht(this))throw new TypeError("The stream is not in a state that permits close");Rr(this)}enqueue(o=void 0){if(!mn(this))throw yn("enqueue");if(!Ht(this))throw new TypeError("The stream is not in a state that permits enqueue");return bn(this,o)}error(o=void 0){if(!mn(this))throw yn("error");et(this,o)}[fe](o){Je(this);let l=this._cancelAlgorithm(o);return gn(this),l}[ht](o){let l=this._controlledReadableStream;if(this._queue.length>0){let d=_s(this);this._closeRequested&&this._queue.length===0?(gn(this),Er(l)):Sr(this),o._chunkSteps(d)}else no(l,o),Sr(this)}}Object.defineProperties(Dt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Dt.prototype,e.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function mn(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledReadableStream")?!1:s instanceof Dt}function Sr(s){if(!Vo(s))return;if(s._pulling){s._pullAgain=!0;return}s._pulling=!0;let l=s._pullAlgorithm();E(l,()=>{s._pulling=!1,s._pullAgain&&(s._pullAgain=!1,Sr(s))},d=>{et(s,d)})}function Vo(s){let o=s._controlledReadableStream;return!Ht(s)||!s._started?!1:!!(nt(o)&&Qr(o)>0||Fs(s)>0)}function gn(s){s._pullAlgorithm=void 0,s._cancelAlgorithm=void 0,s._strategySizeAlgorithm=void 0}function Rr(s){if(!Ht(s))return;let o=s._controlledReadableStream;s._closeRequested=!0,s._queue.length===0&&(gn(s),Er(o))}function bn(s,o){if(!Ht(s))return;let l=s._controlledReadableStream;if(nt(l)&&Qr(l)>0)ys(l,o,!1);else{let d;try{d=s._strategySizeAlgorithm(o)}catch(y){throw et(s,y),y}try{ws(s,o,d)}catch(y){throw et(s,y),y}}Sr(s)}function et(s,o){let l=s._controlledReadableStream;l._state==="readable"&&(Je(s),gn(s),Ko(l,o))}function Fs(s){let o=s._controlledReadableStream._state;return o==="errored"?null:o==="closed"?0:s._strategyHWM-s._queueTotalSize}function zf(s){return!Vo(s)}function Ht(s){let o=s._controlledReadableStream._state;return!s._closeRequested&&o==="readable"}function Go(s,o,l,d,y,w,S){o._controlledReadableStream=s,o._queue=void 0,o._queueTotalSize=void 0,Je(o),o._started=!1,o._closeRequested=!1,o._pullAgain=!1,o._pulling=!1,o._strategySizeAlgorithm=S,o._strategyHWM=w,o._pullAlgorithm=d,o._cancelAlgorithm=y,s._readableStreamController=o;let x=l();E(m(x),()=>{o._started=!0,Sr(o)},B=>{et(o,B)})}function Mf(s,o,l,d){let y=Object.create(Dt.prototype),w=()=>{},S=()=>m(void 0),x=()=>m(void 0);o.start!==void 0&&(w=()=>o.start(y)),o.pull!==void 0&&(S=()=>o.pull(y)),o.cancel!==void 0&&(x=B=>o.cancel(B)),Go(s,y,w,S,x,l,d)}function yn(s){return new TypeError(`ReadableStreamDefaultController.prototype.${s} can only be used on a ReadableStreamDefaultController`)}function kf(s,o){return ft(s._readableStreamController)?jf(s):Wf(s)}function Wf(s,o){let l=It(s),d=!1,y=!1,w=!1,S=!1,x,B,U,M,k,te=b(ue=>{k=ue});function Pe(){return d?(y=!0,m(void 0)):(d=!0,hr(l,{_chunkSteps:de=>{T(()=>{y=!1;let we=de,je=de;w||bn(U._readableStreamController,we),S||bn(M._readableStreamController,je),d=!1,y&&Pe()})},_closeSteps:()=>{d=!1,w||Rr(U._readableStreamController),S||Rr(M._readableStreamController),(!w||!S)&&k(void 0)},_errorSteps:()=>{d=!1}}),m(void 0))}function Bt(ue){if(w=!0,x=ue,S){let de=fr([x,B]),we=Le(s,de);k(we)}return te}function st(ue){if(S=!0,B=ue,w){let de=fr([x,B]),we=Le(s,de);k(we)}return te}function We(){}return U=qs(We,Pe,Bt),M=qs(We,Pe,st),A(l._closedPromise,ue=>{et(U._readableStreamController,ue),et(M._readableStreamController,ue),(!w||!S)&&k(void 0)}),[U,M]}function jf(s){let o=It(s),l=!1,d=!1,y=!1,w=!1,S=!1,x,B,U,M,k,te=b(P=>{k=P});function Pe(P){A(P._closedPromise,q=>{P===o&&($e(U._readableStreamController,q),$e(M._readableStreamController,q),(!w||!S)&&k(void 0))})}function Bt(){pt(o)&&(ae(o),o=It(s),Pe(o)),hr(o,{_chunkSteps:q=>{T(()=>{d=!1,y=!1;let G=q,be=q;if(!w&&!S)try{be=po(q)}catch(Ft){$e(U._readableStreamController,Ft),$e(M._readableStreamController,Ft),k(Le(s,Ft));return}w||tn(U._readableStreamController,G),S||tn(M._readableStreamController,be),l=!1,d?We():y&&ue()})},_closeSteps:()=>{l=!1,w||pr(U._readableStreamController),S||pr(M._readableStreamController),U._readableStreamController._pendingPullIntos.length>0&&rn(U._readableStreamController,0),M._readableStreamController._pendingPullIntos.length>0&&rn(M._readableStreamController,0),(!w||!S)&&k(void 0)},_errorSteps:()=>{l=!1}})}function st(P,q){Ze(o)&&(ae(o),o=To(s),Pe(o));let G=q?M:U,be=q?U:M;vo(o,P,{_chunkSteps:qt=>{T(()=>{d=!1,y=!1;let Ut=q?S:w;if(q?w:S)Ut||nn(G._readableStreamController,qt);else{let ua;try{ua=po(qt)}catch(zs){$e(G._readableStreamController,zs),$e(be._readableStreamController,zs),k(Le(s,zs));return}Ut||nn(G._readableStreamController,qt),tn(be._readableStreamController,ua)}l=!1,d?We():y&&ue()})},_closeSteps:qt=>{l=!1;let Ut=q?S:w,vn=q?w:S;Ut||pr(G._readableStreamController),vn||pr(be._readableStreamController),qt!==void 0&&(Ut||nn(G._readableStreamController,qt),!vn&&be._readableStreamController._pendingPullIntos.length>0&&rn(be._readableStreamController,0)),(!Ut||!vn)&&k(void 0)},_errorSteps:()=>{l=!1}})}function We(){if(l)return d=!0,m(void 0);l=!0;let P=Ts(U._readableStreamController);return P===null?Bt():st(P._view,!1),m(void 0)}function ue(){if(l)return y=!0,m(void 0);l=!0;let P=Ts(M._readableStreamController);return P===null?Bt():st(P._view,!0),m(void 0)}function de(P){if(w=!0,x=P,S){let q=fr([x,B]),G=Le(s,q);k(G)}return te}function we(P){if(S=!0,B=P,w){let q=fr([x,B]),G=Le(s,q);k(G)}return te}function je(){}return U=Qo(je,We,de),M=Qo(je,ue,we),Pe(o),[U,M]}function Vf(s,o){Me(s,o);let l=s,d=l==null?void 0:l.autoAllocateChunkSize,y=l==null?void 0:l.cancel,w=l==null?void 0:l.pull,S=l==null?void 0:l.start,x=l==null?void 0:l.type;return{autoAllocateChunkSize:d===void 0?void 0:ro(d,`${o} has member 'autoAllocateChunkSize' that`),cancel:y===void 0?void 0:Gf(y,l,`${o} has member 'cancel' that`),pull:w===void 0?void 0:Yf(w,l,`${o} has member 'pull' that`),start:S===void 0?void 0:Qf(S,l,`${o} has member 'start' that`),type:x===void 0?void 0:Kf(x,`${o} has member 'type' that`)}}function Gf(s,o,l){return Ie(s,l),d=>D(s,o,[d])}function Yf(s,o,l){return Ie(s,l),d=>D(s,o,[d])}function Qf(s,o,l){return Ie(s,l),d=>$(s,o,[d])}function Kf(s,o){if(s=`${s}`,s!=="bytes")throw new TypeError(`${o} '${s}' is not a valid enumeration value for ReadableStreamType`);return s}function Xf(s,o){Me(s,o);let l=s==null?void 0:s.mode;return{mode:l===void 0?void 0:Zf(l,`${o} has member 'mode' that`)}}function Zf(s,o){if(s=`${s}`,s!=="byob")throw new TypeError(`${o} '${s}' is not a valid enumeration value for ReadableStreamReaderMode`);return s}function Jf(s,o){return Me(s,o),{preventCancel:!!(s==null?void 0:s.preventCancel)}}function Yo(s,o){Me(s,o);let l=s==null?void 0:s.preventAbort,d=s==null?void 0:s.preventCancel,y=s==null?void 0:s.preventClose,w=s==null?void 0:s.signal;return w!==void 0&&ed(w,`${o} has member 'signal' that`),{preventAbort:!!l,preventCancel:!!d,preventClose:!!y,signal:w}}function ed(s,o){if(!ff(s))throw new TypeError(`${o} is not an AbortSignal.`)}function td(s,o){Me(s,o);let l=s==null?void 0:s.readable;ms(l,"readable","ReadableWritablePair"),bs(l,`${o} has member 'readable' that`);let d=s==null?void 0:s.writable;return ms(d,"writable","ReadableWritablePair"),xo(d,`${o} has member 'writable' that`),{readable:l,writable:d}}class tt{constructor(o={},l={}){o===void 0?o=null:eo(o,"First parameter");let d=an(l,"Second parameter"),y=Vf(o,"First parameter");if(Us(this),y.type==="bytes"){if(d.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let w=br(d,0);rf(this,y,w)}else{let w=on(d),S=br(d,1);Mf(this,y,S,w)}}get locked(){if(!rt(this))throw bt("locked");return nt(this)}cancel(o=void 0){return rt(this)?nt(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Le(this,o):p(bt("cancel"))}getReader(o=void 0){if(!rt(this))throw bt("getReader");return Xf(o,"First parameter").mode===void 0?It(this):To(this)}pipeThrough(o,l={}){if(!rt(this))throw bt("pipeThrough");ke(o,1,"pipeThrough");let d=td(o,"First parameter"),y=Yo(l,"Second parameter");if(nt(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Pt(d.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let w=jo(this,d.writable,y.preventClose,y.preventAbort,y.preventCancel,y.signal);return L(w),d.readable}pipeTo(o,l={}){if(!rt(this))return p(bt("pipeTo"));if(o===void 0)return p("Parameter 1 is required in 'pipeTo'.");if(!Lt(o))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let d;try{d=Yo(l,"Second parameter")}catch(y){return p(y)}return nt(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Pt(o)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):jo(this,o,d.preventClose,d.preventAbort,d.preventCancel,d.signal)}tee(){if(!rt(this))throw bt("tee");let o=kf(this);return fr(o)}values(o=void 0){if(!rt(this))throw bt("values");let l=Jf(o,"First parameter");return Qh(this,l.preventCancel)}}Object.defineProperties(tt.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(tt.prototype,e.toStringTag,{value:"ReadableStream",configurable:!0}),typeof e.asyncIterator=="symbol"&&Object.defineProperty(tt.prototype,e.asyncIterator,{value:tt.prototype.values,writable:!0,configurable:!0});function qs(s,o,l,d=1,y=()=>1){let w=Object.create(tt.prototype);Us(w);let S=Object.create(Dt.prototype);return Go(w,S,s,o,l,d,y),w}function Qo(s,o,l){let d=Object.create(tt.prototype);Us(d);let y=Object.create($t.prototype);return Eo(d,y,s,o,l,0,void 0),d}function Us(s){s._state="readable",s._reader=void 0,s._storedError=void 0,s._disturbed=!1}function rt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readableStreamController")?!1:s instanceof tt}function nt(s){return s._reader!==void 0}function Le(s,o){if(s._disturbed=!0,s._state==="closed")return m(void 0);if(s._state==="errored")return p(s._storedError);Er(s);let l=s._reader;l!==void 0&&pt(l)&&(l._readIntoRequests.forEach(y=>{y._closeSteps(void 0)}),l._readIntoRequests=new V);let d=s._readableStreamController[fe](o);return N(d,r)}function Er(s){s._state="closed";let o=s._reader;o!==void 0&&(Ot(o),Ze(o)&&(o._readRequests.forEach(l=>{l._closeSteps()}),o._readRequests=new V))}function Ko(s,o){s._state="errored",s._storedError=o;let l=s._reader;l!==void 0&&(oe(l,o),Ze(l)?(l._readRequests.forEach(d=>{d._errorSteps(o)}),l._readRequests=new V):(l._readIntoRequests.forEach(d=>{d._errorSteps(o)}),l._readIntoRequests=new V))}function bt(s){return new TypeError(`ReadableStream.prototype.${s} can only be used on a ReadableStream`)}function Xo(s,o){Me(s,o);let l=s==null?void 0:s.highWaterMark;return ms(l,"highWaterMark","QueuingStrategyInit"),{highWaterMark:gs(l)}}let Zo=s=>s.byteLength;try{Object.defineProperty(Zo,"name",{value:"size",configurable:!0})}catch{}class _n{constructor(o){ke(o,1,"ByteLengthQueuingStrategy"),o=Xo(o,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=o.highWaterMark}get highWaterMark(){if(!ea(this))throw Jo("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!ea(this))throw Jo("size");return Zo}}Object.defineProperties(_n.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(_n.prototype,e.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Jo(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 _n}let ta=()=>1;try{Object.defineProperty(ta,"name",{value:"size",configurable:!0})}catch{}class wn{constructor(o){ke(o,1,"CountQueuingStrategy"),o=Xo(o,"First parameter"),this._countQueuingStrategyHighWaterMark=o.highWaterMark}get highWaterMark(){if(!na(this))throw ra("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!na(this))throw ra("size");return ta}}Object.defineProperties(wn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(wn.prototype,e.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function ra(s){return new TypeError(`CountQueuingStrategy.prototype.${s} can only be used on a CountQueuingStrategy`)}function na(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_countQueuingStrategyHighWaterMark")?!1:s instanceof wn}function rd(s,o){Me(s,o);let l=s==null?void 0:s.flush,d=s==null?void 0:s.readableType,y=s==null?void 0:s.start,w=s==null?void 0:s.transform,S=s==null?void 0:s.writableType;return{flush:l===void 0?void 0:nd(l,s,`${o} has member 'flush' that`),readableType:d,start:y===void 0?void 0:sd(y,s,`${o} has member 'start' that`),transform:w===void 0?void 0:id(w,s,`${o} has member 'transform' that`),writableType:S}}function nd(s,o,l){return Ie(s,l),d=>D(s,o,[d])}function sd(s,o,l){return Ie(s,l),d=>$(s,o,[d])}function id(s,o,l){return Ie(s,l),(d,y)=>D(s,o,[d,y])}class Sn{constructor(o={},l={},d={}){o===void 0&&(o=null);let y=an(l,"Second parameter"),w=an(d,"Third parameter"),S=rd(o,"First parameter");if(S.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(S.writableType!==void 0)throw new RangeError("Invalid writableType specified");let x=br(w,0),B=on(w),U=br(y,1),M=on(y),k,te=b(Pe=>{k=Pe});od(this,te,U,M,x,B),ld(this,S),S.start!==void 0?k(S.start(this._transformStreamController)):k(void 0)}get readable(){if(!sa(this))throw la("readable");return this._readable}get writable(){if(!sa(this))throw la("writable");return this._writable}}Object.defineProperties(Sn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Sn.prototype,e.toStringTag,{value:"TransformStream",configurable:!0});function od(s,o,l,d,y,w){function S(){return o}function x(te){return hd(s,te)}function B(te){return fd(s,te)}function U(){return dd(s)}s._writable=mf(S,x,U,B,l,d);function M(){return pd(s)}function k(te){return En(s,te),m(void 0)}s._readable=qs(S,M,k,y,w),s._backpressure=void 0,s._backpressureChangePromise=void 0,s._backpressureChangePromise_resolve=void 0,Tn(s,!0),s._transformStreamController=void 0}function sa(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_transformStreamController")?!1:s instanceof Sn}function Rn(s,o){et(s._readable._readableStreamController,o),En(s,o)}function En(s,o){ia(s._transformStreamController),Ls(s._writable._writableStreamController,o),s._backpressure&&Tn(s,!1)}function Tn(s,o){s._backpressureChangePromise!==void 0&&s._backpressureChangePromise_resolve(),s._backpressureChangePromise=b(l=>{s._backpressureChangePromise_resolve=l}),s._backpressure=o}class Tr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!An(this))throw Cn("desiredSize");let o=this._controlledTransformStream._readable._readableStreamController;return Fs(o)}enqueue(o=void 0){if(!An(this))throw Cn("enqueue");oa(this,o)}error(o=void 0){if(!An(this))throw Cn("error");ud(this,o)}terminate(){if(!An(this))throw Cn("terminate");cd(this)}}Object.defineProperties(Tr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Tr.prototype,e.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function An(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledTransformStream")?!1:s instanceof Tr}function ad(s,o,l,d){o._controlledTransformStream=s,s._transformStreamController=o,o._transformAlgorithm=l,o._flushAlgorithm=d}function ld(s,o){let l=Object.create(Tr.prototype),d=w=>{try{return oa(l,w),m(void 0)}catch(S){return p(S)}},y=()=>m(void 0);o.transform!==void 0&&(d=w=>o.transform(w,l)),o.flush!==void 0&&(y=()=>o.flush(l)),ad(s,l,d,y)}function ia(s){s._transformAlgorithm=void 0,s._flushAlgorithm=void 0}function oa(s,o){let l=s._controlledTransformStream,d=l._readable._readableStreamController;if(!Ht(d))throw new TypeError("Readable side is not in a state that permits enqueue");try{bn(d,o)}catch(w){throw En(l,w),l._readable._storedError}zf(d)!==l._backpressure&&Tn(l,!0)}function ud(s,o){Rn(s._controlledTransformStream,o)}function aa(s,o){let l=s._transformAlgorithm(o);return N(l,void 0,d=>{throw Rn(s._controlledTransformStream,d),d})}function cd(s){let o=s._controlledTransformStream,l=o._readable._readableStreamController;Rr(l);let d=new TypeError("TransformStream terminated");En(o,d)}function hd(s,o){let l=s._transformStreamController;if(s._backpressure){let d=s._backpressureChangePromise;return N(d,()=>{let y=s._writable;if(y._state==="erroring")throw y._storedError;return aa(l,o)})}return aa(l,o)}function fd(s,o){return Rn(s,o),m(void 0)}function dd(s){let o=s._readable,l=s._transformStreamController,d=l._flushAlgorithm();return ia(l),N(d,()=>{if(o._state==="errored")throw o._storedError;Rr(o._readableStreamController)},y=>{throw Rn(s,y),o._storedError})}function pd(s){return Tn(s,!1),s._backpressureChangePromise}function Cn(s){return new TypeError(`TransformStreamDefaultController.prototype.${s} can only be used on a TransformStreamDefaultController`)}function la(s){return new TypeError(`TransformStream.prototype.${s} can only be used on a TransformStream`)}t.ByteLengthQueuingStrategy=_n,t.CountQueuingStrategy=wn,t.ReadableByteStreamController=$t,t.ReadableStream=tt,t.ReadableStreamBYOBReader=gr,t.ReadableStreamBYOBRequest=dr,t.ReadableStreamDefaultController=Dt,t.ReadableStreamDefaultReader=cr,t.TransformStream=Sn,t.TransformStreamDefaultController=Tr,t.WritableStream=yr,t.WritableStreamDefaultController=Nt,t.WritableStreamDefaultWriter=_r,Object.defineProperty(t,"__esModule",{value:!0})})});var Aa=C(()=>{if(!globalThis.ReadableStream)try{let t=ye("node:process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,ye("node:stream/web")),t.emitWarning=e}catch(r){throw t.emitWarning=e,r}}catch{Object.assign(globalThis,Ta())}try{let{Blob:t}=ye("buffer");t&&!t.prototype.stream&&(t.prototype.stream=function(r){let n=0,i=this;return new ReadableStream({type:"bytes",async pull(a){let h=await i.slice(n,Math.min(i.size,n+65536)).arrayBuffer();n+=h.byteLength,a.enqueue(new Uint8Array(h)),n===i.size&&a.close()}})})}catch{}});async function*Zs(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,Ca),u=r.buffer.slice(n,n+a);n+=u.byteLength,yield new Uint8Array(u)}}else yield r;else{let n=0,i=r;for(;n!==i.size;){let u=await i.slice(n,Math.min(i.size,n+Ca)).arrayBuffer();n+=u.byteLength,yield new Uint8Array(u)}}}var zy,Ca,va,Ld,Ve,vr=Ar(()=>{zy=Se(Aa(),1);Ca=65536;va=class Js{#e=[];#r="";#t=0;#n="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 u;ArrayBuffer.isView(a)?u=new Uint8Array(a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength)):a instanceof ArrayBuffer?u=new Uint8Array(a.slice(0)):a instanceof Js?u=a:u=n.encode(`${a}`),this.#t+=ArrayBuffer.isView(u)?u.byteLength:u.size,this.#e.push(u)}this.#n=`${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 Zs(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 Zs(this.#e,!1))e.set(n,r),r+=n.length;return e.buffer}stream(){let e=Zs(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),u=r<0?Math.max(i+r,0):Math.min(r,i),h=Math.max(u-a,0),f=this.#e,c=[],g=0;for(let m of f){if(g>=h)break;let p=ArrayBuffer.isView(m)?m.byteLength:m.size;if(a&&p<=a)a-=p,u-=p;else{let _;ArrayBuffer.isView(m)?(_=m.subarray(a,Math.min(p,u)),g+=_.byteLength):(_=m.slice(a,Math.min(p,u)),g+=_.size),u-=p,c.push(_),a=0}}let b=new Js([],{type:String(n).toLowerCase()});return b.#t=h,b.#e=c,b}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(va.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});Ld=va,Ve=Ld});var Pd,Nd,Mt,ei=Ar(()=>{vr();Pd=class extends Ve{#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 Ve&&/^(File)$/.test(e[Symbol.toStringTag])}},Nd=Pd,Mt=Nd});function Ia(t,e=Ve){var r=`${xa()}${xa()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),n=[],i=`--${r}\r
4
4
  Content-Disposition: form-data; name="`;return t.forEach((a,u)=>typeof a=="string"?n.push(i+ti(u)+`"\r
5
5
  \r
6
6
  ${a.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
@@ -10,22 +10,22 @@ Content-Type: ${a.type||"application/octet-stream"}\r
10
10
  \r
11
11
  `,a,`\r
12
12
  `)),n.push(`--${r}--`),new e(n,{type:"multipart/form-data; boundary="+r})}var xr,Dd,Hd,xa,Bd,Oa,ti,yt,_t,On=Ar(()=>{vr();ei();({toStringTag:xr,iterator:Dd,hasInstance:Hd}=Symbol),xa=Math.random,Bd="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),Oa=(t,e,r)=>(t+="",/^(Blob|File)$/.test(e&&e[xr])?[(r=r!==void 0?r+"":e[xr]=="File"?e.name:"blob",t),e.name!==r||e[xr]=="blob"?new Mt([e],r,e):e]:[t,e+""]),ti=(t,e)=>(e?t:t.replace(/\r?\n|\r/g,`\r
13
- `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),yt=(t,e,r)=>{if(e.length<r)throw new TypeError(`Failed to execute '${t}' on 'FormData': ${r} arguments required, but only ${e.length} present.`)},_t=class{#e=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[xr](){return"FormData"}[Dd](){return this.entries()}static[Hd](e){return e&&typeof e=="object"&&e[xr]==="FormData"&&!Bd.some(r=>typeof e[r]!="function")}append(...e){yt("append",arguments,2),this.#e.push(Oa(...e))}delete(e){yt("delete",arguments,1),e+="",this.#e=this.#e.filter(([r])=>r!==e)}get(e){yt("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 yt("getAll",arguments,1),r=[],e+="",this.#e.forEach(n=>n[0]===e&&r.push(n[1])),r}has(e){return yt("has",arguments,1),e+="",this.#e.some(r=>r[0]===e)}forEach(e,r){yt("forEach",arguments,1);for(var[n,i]of this)e.call(r,i,n,this)}set(...e){yt("set",arguments,2);var r=[],n=!0;e=Oa(...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 Da=C((Jy,Na)=>{if(!globalThis.DOMException)try{let{MessageChannel:t}=ye("worker_threads"),e=new t().port1,r=new ArrayBuffer;e.postMessage(r,[r,r])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}Na.exports=globalThis.DOMException});import{statSync as t_,createReadStream as Fd,promises as qd}from"node:fs";var Ba,Ud,Ha,ni=Ar(()=>{Ba=Se(Da(),1);ei();vr();({stat:Ud}=qd),Ha=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 Ud(this.#e);if(e>this.lastModified)throw new Ba.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*Fd(this.#e,{start:this.#r,end:this.#r+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var qa={};wd(qa,{toFormData:()=>Gd});function Vd(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 Gd(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 si(r[1]||r[2]),i,a,u,h,f,c,g=[],b=new _t,m=A=>{u+=R.decode(A,{stream:!0})},p=A=>{g.push(A)},_=()=>{let A=new Mt(g,c,{type:f});b.append(h,A)},E=()=>{b.append(h,u)},R=new TextDecoder("utf-8");R.decode(),n.onPartBegin=function(){n.onPartData=m,n.onPartEnd=E,i="",a="",u="",h="",f="",c=null,g.length=0},n.onHeaderField=function(A){i+=R.decode(A,{stream:!0})},n.onHeaderValue=function(A){a+=R.decode(A,{stream:!0})},n.onHeaderEnd=function(){if(a+=R.decode(),i=i.toLowerCase(),i==="content-disposition"){let A=a.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);A&&(h=A[2]||A[3]||""),c=Vd(a),c&&(n.onPartData=p,n.onPartEnd=_)}else i==="content-type"&&(f=a);a="",i=""};for await(let A of t)n.write(A);return n.end(),b}var qe,Y,Fa,it,$n,Ln,zd,Ir,Md,kd,Wd,jd,wt,si,Ua=Ar(()=>{ni();On();qe=0,Y={START_BOUNDARY:qe++,HEADER_FIELD_START:qe++,HEADER_FIELD:qe++,HEADER_VALUE_START:qe++,HEADER_VALUE:qe++,HEADER_VALUE_ALMOST_DONE:qe++,HEADERS_ALMOST_DONE:qe++,PART_DATA_START:qe++,PART_DATA:qe++,END:qe++},Fa=1,it={PART_BOUNDARY:Fa,LAST_BOUNDARY:Fa*=2},$n=10,Ln=13,zd=32,Ir=45,Md=58,kd=97,Wd=122,jd=t=>t|32,wt=()=>{},si=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=wt,this.onHeaderField=wt,this.onHeadersEnd=wt,this.onHeaderValue=wt,this.onPartBegin=wt,this.onPartData=wt,this.onPartEnd=wt,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=Y.START_BOUNDARY}write(e){let r=0,n=e.length,i=this.index,{lookbehind:a,boundary:u,boundaryChars:h,index:f,state:c,flags:g}=this,b=this.boundary.length,m=b-1,p=e.length,_,E,R=T=>{this[T+"Mark"]=r},A=T=>{delete this[T+"Mark"]},N=(T,$,D,H)=>{($===void 0||$!==D)&&this[T](H&&H.subarray($,D))},L=(T,$)=>{let D=T+"Mark";D in this&&($?(N(T,this[D],r,e),delete this[D]):(N(T,this[D],e.length,e),this[D]=0))};for(r=0;r<n;r++)switch(_=e[r],c){case Y.START_BOUNDARY:if(f===u.length-2){if(_===Ir)g|=it.LAST_BOUNDARY;else if(_!==Ln)return;f++;break}else if(f-1===u.length-2){if(g&it.LAST_BOUNDARY&&_===Ir)c=Y.END,g=0;else if(!(g&it.LAST_BOUNDARY)&&_===$n)f=0,N("onPartBegin"),c=Y.HEADER_FIELD_START;else return;break}_!==u[f+2]&&(f=-2),_===u[f+2]&&f++;break;case Y.HEADER_FIELD_START:c=Y.HEADER_FIELD,R("onHeaderField"),f=0;case Y.HEADER_FIELD:if(_===Ln){A("onHeaderField"),c=Y.HEADERS_ALMOST_DONE;break}if(f++,_===Ir)break;if(_===Md){if(f===1)return;L("onHeaderField",!0),c=Y.HEADER_VALUE_START;break}if(E=jd(_),E<kd||E>Wd)return;break;case Y.HEADER_VALUE_START:if(_===zd)break;R("onHeaderValue"),c=Y.HEADER_VALUE;case Y.HEADER_VALUE:_===Ln&&(L("onHeaderValue",!0),N("onHeaderEnd"),c=Y.HEADER_VALUE_ALMOST_DONE);break;case Y.HEADER_VALUE_ALMOST_DONE:if(_!==$n)return;c=Y.HEADER_FIELD_START;break;case Y.HEADERS_ALMOST_DONE:if(_!==$n)return;N("onHeadersEnd"),c=Y.PART_DATA_START;break;case Y.PART_DATA_START:c=Y.PART_DATA,R("onPartData");case Y.PART_DATA:if(i=f,f===0){for(r+=m;r<p&&!(e[r]in h);)r+=b;r-=m,_=e[r]}if(f<u.length)u[f]===_?(f===0&&L("onPartData",!0),f++):f=0;else if(f===u.length)f++,_===Ln?g|=it.PART_BOUNDARY:_===Ir?g|=it.LAST_BOUNDARY:f=0;else if(f-1===u.length)if(g&it.PART_BOUNDARY){if(f=0,_===$n){g&=~it.PART_BOUNDARY,N("onPartEnd"),N("onPartBegin"),c=Y.HEADER_FIELD_START;break}}else g&it.LAST_BOUNDARY&&_===Ir?(N("onPartEnd"),c=Y.END,g=0):f=0;if(f>0)a[f-1]=_;else if(i>0){let T=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);N("onPartData",0,i,T),i=0,R("onPartData"),r--}break;case Y.END:break;default:throw new Error(`Unexpected state entered: ${c}`)}L("onHeaderField"),L("onHeaderValue"),L("onPartData"),this.index=f,this.state=c,this.flags=g}end(){if(this.state===Y.HEADER_FIELD_START&&this.index===0||this.state===Y.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==Y.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var sl=C((iw,nl)=>{function ap(t){return Buffer.from(t,"base64").toString("utf8")}function lp(t){return Buffer.from(t,"utf8").toString("base64")}nl.exports={decodeBase64:ap,encodeBase64:lp}});var ll=C(Rt=>{Rt.parse=Rt.decode=up;Rt.stringify=Rt.encode=il;Rt.safe=Gt;Rt.unsafe=Un;var li=typeof process<"u"&&process.platform==="win32"?`\r
13
+ `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),yt=(t,e,r)=>{if(e.length<r)throw new TypeError(`Failed to execute '${t}' on 'FormData': ${r} arguments required, but only ${e.length} present.`)},_t=class{#e=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[xr](){return"FormData"}[Dd](){return this.entries()}static[Hd](e){return e&&typeof e=="object"&&e[xr]==="FormData"&&!Bd.some(r=>typeof e[r]!="function")}append(...e){yt("append",arguments,2),this.#e.push(Oa(...e))}delete(e){yt("delete",arguments,1),e+="",this.#e=this.#e.filter(([r])=>r!==e)}get(e){yt("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 yt("getAll",arguments,1),r=[],e+="",this.#e.forEach(n=>n[0]===e&&r.push(n[1])),r}has(e){return yt("has",arguments,1),e+="",this.#e.some(r=>r[0]===e)}forEach(e,r){yt("forEach",arguments,1);for(var[n,i]of this)e.call(r,i,n,this)}set(...e){yt("set",arguments,2);var r=[],n=!0;e=Oa(...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 Da=C((e_,Na)=>{if(!globalThis.DOMException)try{let{MessageChannel:t}=ye("worker_threads"),e=new t().port1,r=new ArrayBuffer;e.postMessage(r,[r,r])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}Na.exports=globalThis.DOMException});import{statSync as r_,createReadStream as Fd,promises as qd}from"node:fs";var Ba,Ud,Ha,ni=Ar(()=>{Ba=Se(Da(),1);ei();vr();({stat:Ud}=qd),Ha=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 Ud(this.#e);if(e>this.lastModified)throw new Ba.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*Fd(this.#e,{start:this.#r,end:this.#r+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var qa={};wd(qa,{toFormData:()=>Gd});function Vd(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 Gd(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 si(r[1]||r[2]),i,a,u,h,f,c,g=[],b=new _t,m=A=>{u+=R.decode(A,{stream:!0})},p=A=>{g.push(A)},_=()=>{let A=new Mt(g,c,{type:f});b.append(h,A)},E=()=>{b.append(h,u)},R=new TextDecoder("utf-8");R.decode(),n.onPartBegin=function(){n.onPartData=m,n.onPartEnd=E,i="",a="",u="",h="",f="",c=null,g.length=0},n.onHeaderField=function(A){i+=R.decode(A,{stream:!0})},n.onHeaderValue=function(A){a+=R.decode(A,{stream:!0})},n.onHeaderEnd=function(){if(a+=R.decode(),i=i.toLowerCase(),i==="content-disposition"){let A=a.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);A&&(h=A[2]||A[3]||""),c=Vd(a),c&&(n.onPartData=p,n.onPartEnd=_)}else i==="content-type"&&(f=a);a="",i=""};for await(let A of t)n.write(A);return n.end(),b}var qe,Y,Fa,it,$n,Ln,zd,Ir,Md,kd,Wd,jd,wt,si,Ua=Ar(()=>{ni();On();qe=0,Y={START_BOUNDARY:qe++,HEADER_FIELD_START:qe++,HEADER_FIELD:qe++,HEADER_VALUE_START:qe++,HEADER_VALUE:qe++,HEADER_VALUE_ALMOST_DONE:qe++,HEADERS_ALMOST_DONE:qe++,PART_DATA_START:qe++,PART_DATA:qe++,END:qe++},Fa=1,it={PART_BOUNDARY:Fa,LAST_BOUNDARY:Fa*=2},$n=10,Ln=13,zd=32,Ir=45,Md=58,kd=97,Wd=122,jd=t=>t|32,wt=()=>{},si=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=wt,this.onHeaderField=wt,this.onHeadersEnd=wt,this.onHeaderValue=wt,this.onPartBegin=wt,this.onPartData=wt,this.onPartEnd=wt,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=Y.START_BOUNDARY}write(e){let r=0,n=e.length,i=this.index,{lookbehind:a,boundary:u,boundaryChars:h,index:f,state:c,flags:g}=this,b=this.boundary.length,m=b-1,p=e.length,_,E,R=T=>{this[T+"Mark"]=r},A=T=>{delete this[T+"Mark"]},N=(T,$,D,H)=>{($===void 0||$!==D)&&this[T](H&&H.subarray($,D))},L=(T,$)=>{let D=T+"Mark";D in this&&($?(N(T,this[D],r,e),delete this[D]):(N(T,this[D],e.length,e),this[D]=0))};for(r=0;r<n;r++)switch(_=e[r],c){case Y.START_BOUNDARY:if(f===u.length-2){if(_===Ir)g|=it.LAST_BOUNDARY;else if(_!==Ln)return;f++;break}else if(f-1===u.length-2){if(g&it.LAST_BOUNDARY&&_===Ir)c=Y.END,g=0;else if(!(g&it.LAST_BOUNDARY)&&_===$n)f=0,N("onPartBegin"),c=Y.HEADER_FIELD_START;else return;break}_!==u[f+2]&&(f=-2),_===u[f+2]&&f++;break;case Y.HEADER_FIELD_START:c=Y.HEADER_FIELD,R("onHeaderField"),f=0;case Y.HEADER_FIELD:if(_===Ln){A("onHeaderField"),c=Y.HEADERS_ALMOST_DONE;break}if(f++,_===Ir)break;if(_===Md){if(f===1)return;L("onHeaderField",!0),c=Y.HEADER_VALUE_START;break}if(E=jd(_),E<kd||E>Wd)return;break;case Y.HEADER_VALUE_START:if(_===zd)break;R("onHeaderValue"),c=Y.HEADER_VALUE;case Y.HEADER_VALUE:_===Ln&&(L("onHeaderValue",!0),N("onHeaderEnd"),c=Y.HEADER_VALUE_ALMOST_DONE);break;case Y.HEADER_VALUE_ALMOST_DONE:if(_!==$n)return;c=Y.HEADER_FIELD_START;break;case Y.HEADERS_ALMOST_DONE:if(_!==$n)return;N("onHeadersEnd"),c=Y.PART_DATA_START;break;case Y.PART_DATA_START:c=Y.PART_DATA,R("onPartData");case Y.PART_DATA:if(i=f,f===0){for(r+=m;r<p&&!(e[r]in h);)r+=b;r-=m,_=e[r]}if(f<u.length)u[f]===_?(f===0&&L("onPartData",!0),f++):f=0;else if(f===u.length)f++,_===Ln?g|=it.PART_BOUNDARY:_===Ir?g|=it.LAST_BOUNDARY:f=0;else if(f-1===u.length)if(g&it.PART_BOUNDARY){if(f=0,_===$n){g&=~it.PART_BOUNDARY,N("onPartEnd"),N("onPartBegin"),c=Y.HEADER_FIELD_START;break}}else g&it.LAST_BOUNDARY&&_===Ir?(N("onPartEnd"),c=Y.END,g=0):f=0;if(f>0)a[f-1]=_;else if(i>0){let T=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);N("onPartData",0,i,T),i=0,R("onPartData"),r--}break;case Y.END:break;default:throw new Error(`Unexpected state entered: ${c}`)}L("onHeaderField"),L("onHeaderValue"),L("onPartData"),this.index=f,this.state=c,this.flags=g}end(){if(this.state===Y.HEADER_FIELD_START&&this.index===0||this.state===Y.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==Y.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var sl=C((ow,nl)=>{function ap(t){return Buffer.from(t,"base64").toString("utf8")}function lp(t){return Buffer.from(t,"utf8").toString("base64")}nl.exports={decodeBase64:ap,encodeBase64:lp}});var ll=C(Rt=>{Rt.parse=Rt.decode=up;Rt.stringify=Rt.encode=il;Rt.safe=Gt;Rt.unsafe=Un;var li=typeof process<"u"&&process.platform==="win32"?`\r
15
15
  `:`
16
16
  `;function il(t,e){var r=[],n="";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(a,u,h){var f=t[a];f&&Array.isArray(f)?f.forEach(function(c){n+=Gt(a+"[]")+i+Gt(c)+`
17
- `}):f&&typeof f=="object"?r.push(a):n+=Gt(a)+i+Gt(f)+li}),e.section&&n.length&&(n="["+Gt(e.section)+"]"+li+n),r.forEach(function(a,u,h){var f=ol(a).join("\\."),c=(e.section?e.section+".":"")+f,g=il(t[a],{section:c,whitespace:e.whitespace});n.length&&g.length&&(n+=li),n+=g}),n}function ol(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 up(t){var e={},r=e,n=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,a=t.split(/[\r\n]+/g);return a.forEach(function(u,h,f){if(!(!u||u.match(/^\s*[;#]/))){var c=u.match(i);if(c){if(c[1]!==void 0){if(n=Un(c[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var g=Un(c[2]);if(g!=="__proto__"){var b=c[3]?Un(c[4]):!0;switch(b){case"true":case"false":case"null":b=JSON.parse(b)}if(g.length>2&&g.slice(-2)==="[]"){if(g=g.substring(0,g.length-2),g==="__proto__")return;r[g]?Array.isArray(r[g])||(r[g]=[r[g]]):r[g]=[]}Array.isArray(r[g])?r[g].push(b):r[g]=b}}}}),Object.keys(e).filter(function(u,h,f){if(!e[u]||typeof e[u]!="object"||Array.isArray(e[u]))return!1;var c=ol(u),g=e,b=c.pop(),m=b.replace(/\\\./g,".");return c.forEach(function(p,_,E){p!=="__proto__"&&((!g[p]||typeof g[p]!="object")&&(g[p]={}),g=g[p])}),g===e&&m===b?!1:(g[m]=e[u],!0)}).forEach(function(u,h,f){delete e[u]}),e}function al(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function Gt(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&al(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Un(t,e){if(t=(t||"").trim(),al(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,n="",i=0,a=t.length;i<a;i++){var u=t.charAt(i);if(r)"\\;#".indexOf(u)!==-1?n+=u:n+="\\"+u,r=!1;else{if(";#".indexOf(u)!==-1)break;u==="\\"?r=!0:n+=u}}return r&&(n+="\\"),n.trim()}return t}});var hl=C((aw,cl)=>{"use strict";var ui=1,ul=2;function cp(){return""}function hp(t,e,r){return t.slice(e,r).replace(/\S/g," ")}cl.exports=function(t,e){e=e||{};for(var r,n,i=!1,a=!1,u=0,h="",f=e.whitespace===!1?cp:hp,c=0;c<t.length;c++){if(r=t[c],n=t[c+1],!a&&r==='"'){var g=t[c-1]==="\\"&&t[c-2]!=="\\";g||(i=!i)}if(!i){if(!a&&r+n==="//")h+=t.slice(u,c),u=c,a=ui,c++;else if(a===ui&&r+n===`\r
17
+ `}):f&&typeof f=="object"?r.push(a):n+=Gt(a)+i+Gt(f)+li}),e.section&&n.length&&(n="["+Gt(e.section)+"]"+li+n),r.forEach(function(a,u,h){var f=ol(a).join("\\."),c=(e.section?e.section+".":"")+f,g=il(t[a],{section:c,whitespace:e.whitespace});n.length&&g.length&&(n+=li),n+=g}),n}function ol(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 up(t){var e={},r=e,n=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,a=t.split(/[\r\n]+/g);return a.forEach(function(u,h,f){if(!(!u||u.match(/^\s*[;#]/))){var c=u.match(i);if(c){if(c[1]!==void 0){if(n=Un(c[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var g=Un(c[2]);if(g!=="__proto__"){var b=c[3]?Un(c[4]):!0;switch(b){case"true":case"false":case"null":b=JSON.parse(b)}if(g.length>2&&g.slice(-2)==="[]"){if(g=g.substring(0,g.length-2),g==="__proto__")return;r[g]?Array.isArray(r[g])||(r[g]=[r[g]]):r[g]=[]}Array.isArray(r[g])?r[g].push(b):r[g]=b}}}}),Object.keys(e).filter(function(u,h,f){if(!e[u]||typeof e[u]!="object"||Array.isArray(e[u]))return!1;var c=ol(u),g=e,b=c.pop(),m=b.replace(/\\\./g,".");return c.forEach(function(p,_,E){p!=="__proto__"&&((!g[p]||typeof g[p]!="object")&&(g[p]={}),g=g[p])}),g===e&&m===b?!1:(g[m]=e[u],!0)}).forEach(function(u,h,f){delete e[u]}),e}function al(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function Gt(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&al(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Un(t,e){if(t=(t||"").trim(),al(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,n="",i=0,a=t.length;i<a;i++){var u=t.charAt(i);if(r)"\\;#".indexOf(u)!==-1?n+=u:n+="\\"+u,r=!1;else{if(";#".indexOf(u)!==-1)break;u==="\\"?r=!0:n+=u}}return r&&(n+="\\"),n.trim()}return t}});var hl=C((lw,cl)=>{"use strict";var ui=1,ul=2;function cp(){return""}function hp(t,e,r){return t.slice(e,r).replace(/\S/g," ")}cl.exports=function(t,e){e=e||{};for(var r,n,i=!1,a=!1,u=0,h="",f=e.whitespace===!1?cp:hp,c=0;c<t.length;c++){if(r=t[c],n=t[c+1],!a&&r==='"'){var g=t[c-1]==="\\"&&t[c-2]!=="\\";g||(i=!i)}if(!i){if(!a&&r+n==="//")h+=t.slice(u,c),u=c,a=ui,c++;else if(a===ui&&r+n===`\r
18
18
  `){c++,a=!1,h+=f(t,u,c),u=c;continue}else if(a===ui&&r===`
19
- `)a=!1,h+=f(t,u,c),u=c;else if(!a&&r+n==="/*"){h+=t.slice(u,c),u=c,a=ul,c++;continue}else if(a===ul&&r+n==="*/"){c++,a=!1,h+=f(t,u,c+1),u=c+1;continue}}}return h+(a?f(t.substr(u)):t.substr(u))}});var dl=C(Yt=>{"use strict";var fl=ye("fs"),fp=ll(),Lr=ye("path"),dp=hl(),pp=Yt.parse=function(t){return/^\s*{/.test(t)?JSON.parse(dp(t)):fp.parse(t)},mp=Yt.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=Lr.join.apply(null,t),n;try{return fl.readFileSync(r,"utf-8")}catch{return}},lw=Yt.json=function(){var t=mp.apply(null,arguments);return t?pp(t):null},uw=Yt.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("__"),u;(u=a.indexOf(""))>-1;)a.splice(u,1);var h=r;a.forEach(function(c,g){!c||typeof h!="object"||(g===a.length-1&&(h[c]=e[i]),h[c]===void 0&&(h[c]={}),h=h[c])})}return r},cw=Yt.find=function(){var t=Lr.join.apply(null,[].slice.call(arguments));function e(r,n){var i=Lr.join(r,n);try{return fl.statSync(i),i}catch{if(Lr.dirname(r)!==r)return e(Lr.dirname(r),n)}}return e(process.cwd(),t)}});var _l=C((fw,yl)=>{"use strict";function ml(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function gl(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 bl(t){var e=[];return t.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?e[n]=bl(r):ml(r)?e[n]=gl(r):e[n]=ci({},r):e[n]=r}),e}function pl(t,e){return e==="__proto__"?void 0:t[e]}var ci=yl.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(u){if(n=pl(t,u),r=pl(a,u),r!==t)if(typeof r!="object"||r===null){t[u]=r;return}else if(Array.isArray(r)){t[u]=bl(r);return}else if(ml(r)){t[u]=gl(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[u]=ci({},r);return}else{t[u]=ci(n,r);return}})}),t}});var zn=C((dw,Rl)=>{var Pr=dl(),Qt=ye("path").join,gp=_l(),wl="/etc",Sl=process.platform==="win32",Nr=Sl?process.env.USERPROFILE:process.env.HOME;Rl.exports=function(t,e,r,n){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=Xs()(process.argv.slice(2))),e=(typeof e=="string"?Pr.json(e):e)||{},n=n||Pr.parse;var i=Pr.env(t+"_"),a=[e],u=[];function h(f){if(!(u.indexOf(f)>=0)){var c=Pr.file(f);c&&(a.push(n(c)),u.push(f))}}return Sl||[Qt(wl,t,"config"),Qt(wl,t+"rc")].forEach(h),Nr&&[Qt(Nr,".config",t,"config"),Qt(Nr,".config",t),Qt(Nr,"."+t,"config"),Qt(Nr,"."+t+"rc")].forEach(h),h(Pr.find("."+t+"rc")),i.config&&h(i.config),r.config&&h(r.config),gp.apply(null,a.concat([i,r,u.length?{configs:u,config:u[u.length-1]}:void 0]))}});var Il=C((pw,Ol)=>{var hi=ye("url"),vl=sl(),bp=vl.decodeBase64,yp=vl.encodeBase64,El=":_authToken",Tl=":_auth",Al=":username",Cl=":_password";Ol.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||zn()("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)||_p(e.npmrc)};function xl(t,e){for(var r=hi.parse(t,!1,!0),n;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";var i="//"+r.host+n.replace(/\/$/,""),a=Sp(i,e.npmrc);if(a)return a;if(!e.recursive)return/\/$/.test(t)?void 0:xl(hi.resolve(t,"."),e);r.pathname=hi.resolve(wp(n),"..")||"/"}}function _p(t){if(t._auth){var e=Mn(t._auth);return{token:e,type:"Basic"}}}function wp(t){return t[t.length-1]==="/"?t:t+"/"}function Sp(t,e){var r=Rp(e[t+El]||e[t+"/"+El]);if(r)return r;var n=e[t+Al]||e[t+"/"+Al],i=e[t+Cl]||e[t+"/"+Cl],a=Ep(n,i);if(a)return a;var u=Tp(e[t+Tl]||e[t+"/"+Tl]);if(u)return u}function Mn(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function Rp(t){if(t){var e=Mn(t);return{token:e,type:"Bearer"}}}function Ep(t,e){if(!(!t||!e)){var r=bp(Mn(e)),n=yp(t+":"+r);return{token:n,type:"Basic",password:r,username:t}}}function Tp(t){if(t){var e=Mn(t);return{token:e,type:"Basic"}}}});var Ll=C((mw,$l)=>{$l.exports=function(t,e){var r=e||zn()("npm",{registry:"https://registry.npmjs.org/"}),n=r[t+":registry"]||r.registry;return n.slice(-1)==="/"?n:n+"/"}});var Dr=C((gw,Pl)=>{var Ap="2.0.0",Cp=Number.MAX_SAFE_INTEGER||9007199254740991,vp=16;Pl.exports={SEMVER_SPEC_VERSION:Ap,MAX_LENGTH:256,MAX_SAFE_INTEGER:Cp,MAX_SAFE_COMPONENT_LENGTH:vp}});var Hr=C((bw,Nl)=>{var xp=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Nl.exports=xp});var Et=C((at,Dl)=>{var{MAX_SAFE_COMPONENT_LENGTH:fi}=Dr(),Op=Hr();at=Dl.exports={};var Ip=at.re=[],O=at.src=[],I=at.t={},$p=0,F=(t,e,r)=>{let n=$p++;Op(t,n,e),I[t]=n,O[n]=e,Ip[n]=new RegExp(e,r?"g":void 0)};F("NUMERICIDENTIFIER","0|[1-9]\\d*");F("NUMERICIDENTIFIERLOOSE","[0-9]+");F("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");F("MAINVERSION",`(${O[I.NUMERICIDENTIFIER]})\\.(${O[I.NUMERICIDENTIFIER]})\\.(${O[I.NUMERICIDENTIFIER]})`);F("MAINVERSIONLOOSE",`(${O[I.NUMERICIDENTIFIERLOOSE]})\\.(${O[I.NUMERICIDENTIFIERLOOSE]})\\.(${O[I.NUMERICIDENTIFIERLOOSE]})`);F("PRERELEASEIDENTIFIER",`(?:${O[I.NUMERICIDENTIFIER]}|${O[I.NONNUMERICIDENTIFIER]})`);F("PRERELEASEIDENTIFIERLOOSE",`(?:${O[I.NUMERICIDENTIFIERLOOSE]}|${O[I.NONNUMERICIDENTIFIER]})`);F("PRERELEASE",`(?:-(${O[I.PRERELEASEIDENTIFIER]}(?:\\.${O[I.PRERELEASEIDENTIFIER]})*))`);F("PRERELEASELOOSE",`(?:-?(${O[I.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${O[I.PRERELEASEIDENTIFIERLOOSE]})*))`);F("BUILDIDENTIFIER","[0-9A-Za-z-]+");F("BUILD",`(?:\\+(${O[I.BUILDIDENTIFIER]}(?:\\.${O[I.BUILDIDENTIFIER]})*))`);F("FULLPLAIN",`v?${O[I.MAINVERSION]}${O[I.PRERELEASE]}?${O[I.BUILD]}?`);F("FULL",`^${O[I.FULLPLAIN]}$`);F("LOOSEPLAIN",`[v=\\s]*${O[I.MAINVERSIONLOOSE]}${O[I.PRERELEASELOOSE]}?${O[I.BUILD]}?`);F("LOOSE",`^${O[I.LOOSEPLAIN]}$`);F("GTLT","((?:<|>)?=?)");F("XRANGEIDENTIFIERLOOSE",`${O[I.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);F("XRANGEIDENTIFIER",`${O[I.NUMERICIDENTIFIER]}|x|X|\\*`);F("XRANGEPLAIN",`[v=\\s]*(${O[I.XRANGEIDENTIFIER]})(?:\\.(${O[I.XRANGEIDENTIFIER]})(?:\\.(${O[I.XRANGEIDENTIFIER]})(?:${O[I.PRERELEASE]})?${O[I.BUILD]}?)?)?`);F("XRANGEPLAINLOOSE",`[v=\\s]*(${O[I.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[I.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[I.XRANGEIDENTIFIERLOOSE]})(?:${O[I.PRERELEASELOOSE]})?${O[I.BUILD]}?)?)?`);F("XRANGE",`^${O[I.GTLT]}\\s*${O[I.XRANGEPLAIN]}$`);F("XRANGELOOSE",`^${O[I.GTLT]}\\s*${O[I.XRANGEPLAINLOOSE]}$`);F("COERCE",`(^|[^\\d])(\\d{1,${fi}})(?:\\.(\\d{1,${fi}}))?(?:\\.(\\d{1,${fi}}))?(?:$|[^\\d])`);F("COERCERTL",O[I.COERCE],!0);F("LONETILDE","(?:~>?)");F("TILDETRIM",`(\\s*)${O[I.LONETILDE]}\\s+`,!0);at.tildeTrimReplace="$1~";F("TILDE",`^${O[I.LONETILDE]}${O[I.XRANGEPLAIN]}$`);F("TILDELOOSE",`^${O[I.LONETILDE]}${O[I.XRANGEPLAINLOOSE]}$`);F("LONECARET","(?:\\^)");F("CARETTRIM",`(\\s*)${O[I.LONECARET]}\\s+`,!0);at.caretTrimReplace="$1^";F("CARET",`^${O[I.LONECARET]}${O[I.XRANGEPLAIN]}$`);F("CARETLOOSE",`^${O[I.LONECARET]}${O[I.XRANGEPLAINLOOSE]}$`);F("COMPARATORLOOSE",`^${O[I.GTLT]}\\s*(${O[I.LOOSEPLAIN]})$|^$`);F("COMPARATOR",`^${O[I.GTLT]}\\s*(${O[I.FULLPLAIN]})$|^$`);F("COMPARATORTRIM",`(\\s*)${O[I.GTLT]}\\s*(${O[I.LOOSEPLAIN]}|${O[I.XRANGEPLAIN]})`,!0);at.comparatorTrimReplace="$1$2$3";F("HYPHENRANGE",`^\\s*(${O[I.XRANGEPLAIN]})\\s+-\\s+(${O[I.XRANGEPLAIN]})\\s*$`);F("HYPHENRANGELOOSE",`^\\s*(${O[I.XRANGEPLAINLOOSE]})\\s+-\\s+(${O[I.XRANGEPLAINLOOSE]})\\s*$`);F("STAR","(<|>)?=?\\s*\\*");F("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");F("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Br=C((yw,Hl)=>{var Lp=["includePrerelease","loose","rtl"],Pp=t=>t?typeof t!="object"?{loose:!0}:Lp.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};Hl.exports=Pp});var di=C((_w,ql)=>{var Bl=/^[0-9]+$/,Fl=(t,e)=>{let r=Bl.test(t),n=Bl.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},Np=(t,e)=>Fl(e,t);ql.exports={compareIdentifiers:Fl,rcompareIdentifiers:Np}});var le=C((ww,kl)=>{var kn=Hr(),{MAX_LENGTH:Ul,MAX_SAFE_INTEGER:Wn}=Dr(),{re:zl,t:Ml}=Et(),Dp=Br(),{compareIdentifiers:Kt}=di(),pi=class t{constructor(e,r){if(r=Dp(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>Ul)throw new TypeError(`version is longer than ${Ul} characters`);kn("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?zl[Ml.LOOSE]:zl[Ml.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>Wn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Wn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Wn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let a=+i;if(a>=0&&a<Wn)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(kn("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)),Kt(this.major,e.major)||Kt(this.minor,e.minor)||Kt(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(kn("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 Kt(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(kn("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 Kt(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&&(Kt(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}};kl.exports=pi});var Tt=C((Sw,Gl)=>{var{MAX_LENGTH:Hp}=Dr(),{re:Wl,t:jl}=Et(),Vl=le(),Bp=Br(),Fp=(t,e)=>{if(e=Bp(e),t instanceof Vl)return t;if(typeof t!="string"||t.length>Hp||!(e.loose?Wl[jl.LOOSE]:Wl[jl.FULL]).test(t))return null;try{return new Vl(t,e)}catch{return null}};Gl.exports=Fp});var Ql=C((Rw,Yl)=>{var qp=Tt(),Up=(t,e)=>{let r=qp(t,e);return r?r.version:null};Yl.exports=Up});var Xl=C((Ew,Kl)=>{var zp=Tt(),Mp=(t,e)=>{let r=zp(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Kl.exports=Mp});var eu=C((Tw,Jl)=>{var Zl=le(),kp=(t,e,r,n)=>{typeof r=="string"&&(n=r,r=void 0);try{return new Zl(t instanceof Zl?t.version:t,r).inc(e,n).version}catch{return null}};Jl.exports=kp});var Te=C((Aw,ru)=>{var tu=le(),Wp=(t,e,r)=>new tu(t,r).compare(new tu(e,r));ru.exports=Wp});var jn=C((Cw,nu)=>{var jp=Te(),Vp=(t,e,r)=>jp(t,e,r)===0;nu.exports=Vp});var ou=C((vw,iu)=>{var su=Tt(),Gp=jn(),Yp=(t,e)=>{if(Gp(t,e))return null;{let r=su(t),n=su(e),i=r.prerelease.length||n.prerelease.length,a=i?"pre":"",u=i?"prerelease":"";for(let h in r)if((h==="major"||h==="minor"||h==="patch")&&r[h]!==n[h])return a+h;return u}};iu.exports=Yp});var lu=C((xw,au)=>{var Qp=le(),Kp=(t,e)=>new Qp(t,e).major;au.exports=Kp});var cu=C((Ow,uu)=>{var Xp=le(),Zp=(t,e)=>new Xp(t,e).minor;uu.exports=Zp});var fu=C((Iw,hu)=>{var Jp=le(),em=(t,e)=>new Jp(t,e).patch;hu.exports=em});var pu=C(($w,du)=>{var tm=Tt(),rm=(t,e)=>{let r=tm(t,e);return r&&r.prerelease.length?r.prerelease:null};du.exports=rm});var gu=C((Lw,mu)=>{var nm=Te(),sm=(t,e,r)=>nm(e,t,r);mu.exports=sm});var yu=C((Pw,bu)=>{var im=Te(),om=(t,e)=>im(t,e,!0);bu.exports=om});var Vn=C((Nw,wu)=>{var _u=le(),am=(t,e,r)=>{let n=new _u(t,r),i=new _u(e,r);return n.compare(i)||n.compareBuild(i)};wu.exports=am});var Ru=C((Dw,Su)=>{var lm=Vn(),um=(t,e)=>t.sort((r,n)=>lm(r,n,e));Su.exports=um});var Tu=C((Hw,Eu)=>{var cm=Vn(),hm=(t,e)=>t.sort((r,n)=>cm(n,r,e));Eu.exports=hm});var Fr=C((Bw,Au)=>{var fm=Te(),dm=(t,e,r)=>fm(t,e,r)>0;Au.exports=dm});var Gn=C((Fw,Cu)=>{var pm=Te(),mm=(t,e,r)=>pm(t,e,r)<0;Cu.exports=mm});var mi=C((qw,vu)=>{var gm=Te(),bm=(t,e,r)=>gm(t,e,r)!==0;vu.exports=bm});var Yn=C((Uw,xu)=>{var ym=Te(),_m=(t,e,r)=>ym(t,e,r)>=0;xu.exports=_m});var Qn=C((zw,Ou)=>{var wm=Te(),Sm=(t,e,r)=>wm(t,e,r)<=0;Ou.exports=Sm});var gi=C((Mw,Iu)=>{var Rm=jn(),Em=mi(),Tm=Fr(),Am=Yn(),Cm=Gn(),vm=Qn(),xm=(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 Rm(t,r,n);case"!=":return Em(t,r,n);case">":return Tm(t,r,n);case">=":return Am(t,r,n);case"<":return Cm(t,r,n);case"<=":return vm(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Iu.exports=xm});var Lu=C((kw,$u)=>{var Om=le(),Im=Tt(),{re:Kn,t:Xn}=Et(),$m=(t,e)=>{if(t instanceof Om)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(Kn[Xn.COERCE]);else{let n;for(;(n=Kn[Xn.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),Kn[Xn.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Kn[Xn.COERCERTL].lastIndex=-1}return r===null?null:Im(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};$u.exports=$m});var Nu=C((Ww,Pu)=>{"use strict";Pu.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Hu=C((jw,Du)=>{"use strict";Du.exports=W;W.Node=At;W.create=W;function W(t){var e=this;if(e instanceof W||(e=new W),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}W.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};W.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++}};W.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++}};W.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)Pm(this,arguments[t]);return this.length};W.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Nm(this,arguments[t]);return this.length};W.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}};W.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}};W.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};W.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};W.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};W.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};W.prototype.map=function(t,e){e=e||this;for(var r=new W,n=this.head;n!==null;)r.push(t.call(e,n.value,this)),n=n.next;return r};W.prototype.mapReverse=function(t,e){e=e||this;for(var r=new W,n=this.tail;n!==null;)r.push(t.call(e,n.value,this)),n=n.prev;return r};W.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};W.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};W.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};W.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};W.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 W;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};W.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 W;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};W.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=Lm(this,i,r[n]);return a};W.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 Lm(t,e,r){var n=e===t.head?new At(r,null,e,t):new At(r,e,e.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function Pm(t,e){t.tail=new At(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Nm(t,e){t.head=new At(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function At(t,e,r,n){if(!(this instanceof At))return new At(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{Nu()(W)}catch{}});var zu=C((Vw,Uu)=>{"use strict";var Dm=Hu(),Ct=Symbol("max"),Qe=Symbol("length"),Xt=Symbol("lengthCalculator"),Ur=Symbol("allowStale"),vt=Symbol("maxAge"),Ye=Symbol("dispose"),Bu=Symbol("noDisposeOnSet"),ie=Symbol("lruList"),De=Symbol("cache"),qu=Symbol("updateAgeOnGet"),bi=()=>1,_i=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[Ct]=e.max||1/0,n=e.length||bi;if(this[Xt]=typeof n!="function"?bi:n,this[Ur]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[vt]=e.maxAge||0,this[Ye]=e.dispose,this[Bu]=e.noDisposeOnSet||!1,this[qu]=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[Ct]=e||1/0,qr(this)}get max(){return this[Ct]}set allowStale(e){this[Ur]=!!e}get allowStale(){return this[Ur]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[vt]=e,qr(this)}get maxAge(){return this[vt]}set lengthCalculator(e){typeof e!="function"&&(e=bi),e!==this[Xt]&&(this[Xt]=e,this[Qe]=0,this[ie].forEach(r=>{r.length=this[Xt](r.value,r.key),this[Qe]+=r.length})),qr(this)}get lengthCalculator(){return this[Xt]}get length(){return this[Qe]}get itemCount(){return this[ie].length}rforEach(e,r){r=r||this;for(let n=this[ie].tail;n!==null;){let i=n.prev;Fu(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[ie].head;n!==null;){let i=n.next;Fu(this,e,n,r),n=i}}keys(){return this[ie].toArray().map(e=>e.key)}values(){return this[ie].toArray().map(e=>e.value)}reset(){this[Ye]&&this[ie]&&this[ie].length&&this[ie].forEach(e=>this[Ye](e.key,e.value)),this[De]=new Map,this[ie]=new Dm,this[Qe]=0}dump(){return this[ie].map(e=>Zn(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[ie]}set(e,r,n){if(n=n||this[vt],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let i=n?Date.now():0,a=this[Xt](r,e);if(this[De].has(e)){if(a>this[Ct])return Zt(this,this[De].get(e)),!1;let f=this[De].get(e).value;return this[Ye]&&(this[Bu]||this[Ye](e,f.value)),f.now=i,f.maxAge=n,f.value=r,this[Qe]+=a-f.length,f.length=a,this.get(e),qr(this),!0}let u=new wi(e,r,a,i,n);return u.length>this[Ct]?(this[Ye]&&this[Ye](e,r),!1):(this[Qe]+=u.length,this[ie].unshift(u),this[De].set(e,this[ie].head),qr(this),!0)}has(e){if(!this[De].has(e))return!1;let r=this[De].get(e).value;return!Zn(this,r)}get(e){return yi(this,e,!0)}peek(e){return yi(this,e,!1)}pop(){let e=this[ie].tail;return e?(Zt(this,e),e.value):null}del(e){Zt(this,this[De].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 u=a-r;u>0&&this.set(i.k,i.v,u)}}}prune(){this[De].forEach((e,r)=>yi(this,r,!1))}},yi=(t,e,r)=>{let n=t[De].get(e);if(n){let i=n.value;if(Zn(t,i)){if(Zt(t,n),!t[Ur])return}else r&&(t[qu]&&(n.value.now=Date.now()),t[ie].unshiftNode(n));return i.value}},Zn=(t,e)=>{if(!e||!e.maxAge&&!t[vt])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[vt]&&r>t[vt]},qr=t=>{if(t[Qe]>t[Ct])for(let e=t[ie].tail;t[Qe]>t[Ct]&&e!==null;){let r=e.prev;Zt(t,e),e=r}},Zt=(t,e)=>{if(e){let r=e.value;t[Ye]&&t[Ye](r.key,r.value),t[Qe]-=r.length,t[De].delete(r.key),t[ie].removeNode(e)}},wi=class{constructor(e,r,n,i,a){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=a||0}},Fu=(t,e,r,n)=>{let i=r.value;Zn(t,i)&&(Zt(t,r),t[Ur]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};Uu.exports=_i});var Ae=C((Gw,ju)=>{var Si=class t{constructor(e,r){if(r=Bm(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof Ri)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=>!ku(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&&Mm(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=Mu.get(n);if(i)return i;let a=this.options.loose,u=a?ge[ce.HYPHENRANGELOOSE]:ge[ce.HYPHENRANGE];e=e.replace(u,Zm(this.options.includePrerelease)),Q("hyphen replace",e),e=e.replace(ge[ce.COMPARATORTRIM],qm),Q("comparator trim",e),e=e.replace(ge[ce.TILDETRIM],Um),e=e.replace(ge[ce.CARETTRIM],zm),e=e.split(/\s+/).join(" ");let h=e.split(" ").map(b=>km(b,this.options)).join(" ").split(/\s+/).map(b=>Xm(b,this.options));a&&(h=h.filter(b=>(Q("loose invalid filter",b,this.options),!!b.match(ge[ce.COMPARATORLOOSE])))),Q("range list",h);let f=new Map,c=h.map(b=>new Ri(b,this.options));for(let b of c){if(ku(b))return[b];f.set(b.value,b)}f.size>1&&f.has("")&&f.delete("");let g=[...f.values()];return Mu.set(n,g),g}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>Wu(n,r)&&e.set.some(i=>Wu(i,r)&&n.every(a=>i.every(u=>a.intersects(u,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Fm(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Jm(this.set[r],e,this.options))return!0;return!1}};ju.exports=Si;var Hm=zu(),Mu=new Hm({max:1e3}),Bm=Br(),Ri=zr(),Q=Hr(),Fm=le(),{re:ge,t:ce,comparatorTrimReplace:qm,tildeTrimReplace:Um,caretTrimReplace:zm}=Et(),ku=t=>t.value==="<0.0.0-0",Mm=t=>t.value==="",Wu=(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},km=(t,e)=>(Q("comp",t,e),t=Vm(t,e),Q("caret",t),t=Wm(t,e),Q("tildes",t),t=Ym(t,e),Q("xrange",t),t=Km(t,e),Q("stars",t),t),he=t=>!t||t.toLowerCase()==="x"||t==="*",Wm=(t,e)=>t.trim().split(/\s+/).map(r=>jm(r,e)).join(" "),jm=(t,e)=>{let r=e.loose?ge[ce.TILDELOOSE]:ge[ce.TILDE];return t.replace(r,(n,i,a,u,h)=>{Q("tilde",t,n,i,a,u,h);let f;return he(i)?f="":he(a)?f=`>=${i}.0.0 <${+i+1}.0.0-0`:he(u)?f=`>=${i}.${a}.0 <${i}.${+a+1}.0-0`:h?(Q("replaceTilde pr",h),f=`>=${i}.${a}.${u}-${h} <${i}.${+a+1}.0-0`):f=`>=${i}.${a}.${u} <${i}.${+a+1}.0-0`,Q("tilde return",f),f})},Vm=(t,e)=>t.trim().split(/\s+/).map(r=>Gm(r,e)).join(" "),Gm=(t,e)=>{Q("caret",t,e);let r=e.loose?ge[ce.CARETLOOSE]:ge[ce.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,a,u,h,f)=>{Q("caret",t,i,a,u,h,f);let c;return he(a)?c="":he(u)?c=`>=${a}.0.0${n} <${+a+1}.0.0-0`:he(h)?a==="0"?c=`>=${a}.${u}.0${n} <${a}.${+u+1}.0-0`:c=`>=${a}.${u}.0${n} <${+a+1}.0.0-0`:f?(Q("replaceCaret pr",f),a==="0"?u==="0"?c=`>=${a}.${u}.${h}-${f} <${a}.${u}.${+h+1}-0`:c=`>=${a}.${u}.${h}-${f} <${a}.${+u+1}.0-0`:c=`>=${a}.${u}.${h}-${f} <${+a+1}.0.0-0`):(Q("no pr"),a==="0"?u==="0"?c=`>=${a}.${u}.${h}${n} <${a}.${u}.${+h+1}-0`:c=`>=${a}.${u}.${h}${n} <${a}.${+u+1}.0-0`:c=`>=${a}.${u}.${h} <${+a+1}.0.0-0`),Q("caret return",c),c})},Ym=(t,e)=>(Q("replaceXRanges",t,e),t.split(/\s+/).map(r=>Qm(r,e)).join(" ")),Qm=(t,e)=>{t=t.trim();let r=e.loose?ge[ce.XRANGELOOSE]:ge[ce.XRANGE];return t.replace(r,(n,i,a,u,h,f)=>{Q("xRange",t,n,i,a,u,h,f);let c=he(a),g=c||he(u),b=g||he(h),m=b;return i==="="&&m&&(i=""),f=e.includePrerelease?"-0":"",c?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&m?(g&&(u=0),h=0,i===">"?(i=">=",g?(a=+a+1,u=0,h=0):(u=+u+1,h=0)):i==="<="&&(i="<",g?a=+a+1:u=+u+1),i==="<"&&(f="-0"),n=`${i+a}.${u}.${h}${f}`):g?n=`>=${a}.0.0${f} <${+a+1}.0.0-0`:b&&(n=`>=${a}.${u}.0${f} <${a}.${+u+1}.0-0`),Q("xRange return",n),n})},Km=(t,e)=>(Q("replaceStars",t,e),t.trim().replace(ge[ce.STAR],"")),Xm=(t,e)=>(Q("replaceGTE0",t,e),t.trim().replace(ge[e.includePrerelease?ce.GTE0PRE:ce.GTE0],"")),Zm=t=>(e,r,n,i,a,u,h,f,c,g,b,m,p)=>(he(n)?r="":he(i)?r=`>=${n}.0.0${t?"-0":""}`:he(a)?r=`>=${n}.${i}.0${t?"-0":""}`:u?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,he(c)?f="":he(g)?f=`<${+c+1}.0.0-0`:he(b)?f=`<${c}.${+g+1}.0-0`:m?f=`<=${c}.${g}.${b}-${m}`:t?f=`<${c}.${g}.${+b+1}-0`:f=`<=${f}`,`${r} ${f}`.trim()),Jm=(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(Q(t[n].semver),t[n].semver!==Ri.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 zr=C((Yw,Ku)=>{var Mr=Symbol("SemVer ANY"),Ai=class t{static get ANY(){return Mr}constructor(e,r){if(r=eg(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}Ti("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Mr?this.value="":this.value=this.operator+this.semver.version,Ti("comp",this)}parse(e){let r=this.options.loose?Vu[Gu.COMPARATORLOOSE]:Vu[Gu.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 Yu(n[2],this.options.loose):this.semver=Mr}toString(){return this.value}test(e){if(Ti("Comparator.test",e,this.options.loose),this.semver===Mr||e===Mr)return!0;if(typeof e=="string")try{e=new Yu(e,this.options)}catch{return!1}return Ei(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 Qu(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new Qu(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,u=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),h=Ei(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),f=Ei(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||a&&u||h||f}};Ku.exports=Ai;var eg=Br(),{re:Vu,t:Gu}=Et(),Ei=gi(),Ti=Hr(),Yu=le(),Qu=Ae()});var kr=C((Qw,Xu)=>{var tg=Ae(),rg=(t,e,r)=>{try{e=new tg(e,r)}catch{return!1}return e.test(t)};Xu.exports=rg});var Ju=C((Kw,Zu)=>{var ng=Ae(),sg=(t,e)=>new ng(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Zu.exports=sg});var tc=C((Xw,ec)=>{var ig=le(),og=Ae(),ag=(t,e,r)=>{let n=null,i=null,a=null;try{a=new og(e,r)}catch{return null}return t.forEach(u=>{a.test(u)&&(!n||i.compare(u)===-1)&&(n=u,i=new ig(n,r))}),n};ec.exports=ag});var nc=C((Zw,rc)=>{var lg=le(),ug=Ae(),cg=(t,e,r)=>{let n=null,i=null,a=null;try{a=new ug(e,r)}catch{return null}return t.forEach(u=>{a.test(u)&&(!n||i.compare(u)===1)&&(n=u,i=new lg(n,r))}),n};rc.exports=cg});var oc=C((Jw,ic)=>{var Ci=le(),hg=Ae(),sc=Fr(),fg=(t,e)=>{t=new hg(t,e);let r=new Ci("0.0.0");if(t.test(r)||(r=new Ci("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(u=>{let h=new Ci(u.semver.version);switch(u.operator){case">":h.prerelease.length===0?h.patch++:h.prerelease.push(0),h.raw=h.format();case"":case">=":(!a||sc(h,a))&&(a=h);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),a&&(!r||sc(r,a))&&(r=a)}return r&&t.test(r)?r:null};ic.exports=fg});var lc=C((eS,ac)=>{var dg=Ae(),pg=(t,e)=>{try{return new dg(t,e).range||"*"}catch{return null}};ac.exports=pg});var Jn=C((tS,fc)=>{var mg=le(),hc=zr(),{ANY:gg}=hc,bg=Ae(),yg=kr(),uc=Fr(),cc=Gn(),_g=Qn(),wg=Yn(),Sg=(t,e,r,n)=>{t=new mg(t,n),e=new bg(e,n);let i,a,u,h,f;switch(r){case">":i=uc,a=_g,u=cc,h=">",f=">=";break;case"<":i=cc,a=wg,u=uc,h="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(yg(t,e,n))return!1;for(let c=0;c<e.set.length;++c){let g=e.set[c],b=null,m=null;if(g.forEach(p=>{p.semver===gg&&(p=new hc(">=0.0.0")),b=b||p,m=m||p,i(p.semver,b.semver,n)?b=p:u(p.semver,m.semver,n)&&(m=p)}),b.operator===h||b.operator===f||(!m.operator||m.operator===h)&&a(t,m.semver))return!1;if(m.operator===f&&u(t,m.semver))return!1}return!0};fc.exports=Sg});var pc=C((rS,dc)=>{var Rg=Jn(),Eg=(t,e,r)=>Rg(t,e,">",r);dc.exports=Eg});var gc=C((nS,mc)=>{var Tg=Jn(),Ag=(t,e,r)=>Tg(t,e,"<",r);mc.exports=Ag});var _c=C((sS,yc)=>{var bc=Ae(),Cg=(t,e,r)=>(t=new bc(t,r),e=new bc(e,r),t.intersects(e));yc.exports=Cg});var Sc=C((iS,wc)=>{var vg=kr(),xg=Te();wc.exports=(t,e,r)=>{let n=[],i=null,a=null,u=t.sort((g,b)=>xg(g,b,r));for(let g of u)vg(g,e,r)?(a=g,i||(i=g)):(a&&n.push([i,a]),a=null,i=null);i&&n.push([i,null]);let h=[];for(let[g,b]of n)g===b?h.push(g):!b&&g===u[0]?h.push("*"):b?g===u[0]?h.push(`<=${b}`):h.push(`${g} - ${b}`):h.push(`>=${g}`);let f=h.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return f.length<c.length?f:e}});var Cc=C((oS,Ac)=>{var Rc=Ae(),es=zr(),{ANY:vi}=es,Wr=kr(),xi=Te(),Og=(t,e,r={})=>{if(t===e)return!0;t=new Rc(t,r),e=new Rc(e,r);let n=!1;e:for(let i of t.set){for(let a of e.set){let u=Ig(i,a,r);if(n=n||u!==null,u)continue e}if(n)return!1}return!0},Ig=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===vi){if(e.length===1&&e[0].semver===vi)return!0;r.includePrerelease?t=[new es(">=0.0.0-0")]:t=[new es(">=0.0.0")]}if(e.length===1&&e[0].semver===vi){if(r.includePrerelease)return!0;e=[new es(">=0.0.0")]}let n=new Set,i,a;for(let p of t)p.operator===">"||p.operator===">="?i=Ec(i,p,r):p.operator==="<"||p.operator==="<="?a=Tc(a,p,r):n.add(p.semver);if(n.size>1)return null;let u;if(i&&a){if(u=xi(i.semver,a.semver,r),u>0)return null;if(u===0&&(i.operator!==">="||a.operator!=="<="))return null}for(let p of n){if(i&&!Wr(p,String(i),r)||a&&!Wr(p,String(a),r))return null;for(let _ of e)if(!Wr(p,String(_),r))return!1;return!0}let h,f,c,g,b=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1,m=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;b&&b.prerelease.length===1&&a.operator==="<"&&b.prerelease[0]===0&&(b=!1);for(let p of e){if(g=g||p.operator===">"||p.operator===">=",c=c||p.operator==="<"||p.operator==="<=",i){if(m&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===m.major&&p.semver.minor===m.minor&&p.semver.patch===m.patch&&(m=!1),p.operator===">"||p.operator===">="){if(h=Ec(i,p,r),h===p&&h!==i)return!1}else if(i.operator===">="&&!Wr(i.semver,String(p),r))return!1}if(a){if(b&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===b.major&&p.semver.minor===b.minor&&p.semver.patch===b.patch&&(b=!1),p.operator==="<"||p.operator==="<="){if(f=Tc(a,p,r),f===p&&f!==a)return!1}else if(a.operator==="<="&&!Wr(a.semver,String(p),r))return!1}if(!p.operator&&(a||i)&&u!==0)return!1}return!(i&&c&&!a&&u!==0||a&&g&&!i&&u!==0||m||b)},Ec=(t,e,r)=>{if(!t)return e;let n=xi(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},Tc=(t,e,r)=>{if(!t)return e;let n=xi(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};Ac.exports=Og});var Oc=C((aS,xc)=>{var Oi=Et(),$g=Dr(),Lg=le(),vc=di(),Pg=Tt(),Ng=Ql(),Dg=Xl(),Hg=eu(),Bg=ou(),Fg=lu(),qg=cu(),Ug=fu(),zg=pu(),Mg=Te(),kg=gu(),Wg=yu(),jg=Vn(),Vg=Ru(),Gg=Tu(),Yg=Fr(),Qg=Gn(),Kg=jn(),Xg=mi(),Zg=Yn(),Jg=Qn(),eb=gi(),tb=Lu(),rb=zr(),nb=Ae(),sb=kr(),ib=Ju(),ob=tc(),ab=nc(),lb=oc(),ub=lc(),cb=Jn(),hb=pc(),fb=gc(),db=_c(),pb=Sc(),mb=Cc();xc.exports={parse:Pg,valid:Ng,clean:Dg,inc:Hg,diff:Bg,major:Fg,minor:qg,patch:Ug,prerelease:zg,compare:Mg,rcompare:kg,compareLoose:Wg,compareBuild:jg,sort:Vg,rsort:Gg,gt:Yg,lt:Qg,eq:Kg,neq:Xg,gte:Zg,lte:Jg,cmp:eb,coerce:tb,Comparator:rb,Range:nb,satisfies:sb,toComparators:ib,maxSatisfying:ob,minSatisfying:ab,minVersion:lb,validRange:ub,outside:cb,gtr:hb,ltr:fb,intersects:db,simplifyRange:pb,subset:mb,SemVer:Lg,re:Oi.re,src:Oi.src,tokens:Oi.t,SEMVER_SPEC_VERSION:$g.SEMVER_SPEC_VERSION,compareIdentifiers:vc.compareIdentifiers,rcompareIdentifiers:vc.rcompareIdentifiers}});var Nc=C((lS,Pc)=>{Pc.exports=function(t,e){e||(e={});var r=e.hsep===void 0?" ":e.hsep,n=e.align||[],i=e.stringLength||function(f){return String(f).length},a=$c(t,function(f,c){return Lc(c,function(g,b){var m=Ic(g);(!f[b]||m>f[b])&&(f[b]=m)}),f},[]),u=ts(t,function(f){return ts(f,function(c,g){var b=String(c);if(n[g]==="."){var m=Ic(b),p=a[g]+(/\./.test(b)?1:2)-(i(b)-m);return b+Array(p).join(" ")}else return b})}),h=$c(u,function(f,c){return Lc(c,function(g,b){var m=i(g);(!f[b]||m>f[b])&&(f[b]=m)}),f},[]);return ts(u,function(f){return ts(f,function(c,g){var b=h[g]-i(c)||0,m=Array(Math.max(b+1,1)).join(" ");return n[g]==="r"||n[g]==="."?m+c:n[g]==="c"?Array(Math.ceil(b/2+1)).join(" ")+c+Array(Math.floor(b/2+1)).join(" "):c+m}).join(r).replace(/\s+$/,"")}).join(`
20
- `)};function Ic(t){var e=/\.[^.]*$/.exec(t);return e?e.index+1:t.length}function $c(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 Lc(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e.call(t,t[r],r)}function ts(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 qc=C((hS,Fc)=>{var jr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,gb=typeof AbortController=="function",rs=gb?AbortController:class{constructor(){this.signal=new Dc}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},bb=typeof AbortSignal=="function",yb=typeof rs.AbortSignal=="function",Dc=bb?AbortSignal:yb?rs.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(r=>r(e),this))}onabort(){}addEventListener(e,r){e==="abort"&&this._listeners.push(r)}removeEventListener(e,r){e==="abort"&&(this._listeners=this._listeners.filter(n=>n!==r))}},Pi=new Set,Ii=(t,e)=>{let r=`LRU_CACHE_OPTION_${t}`;ns(r)&&Ni(r,`${t} option`,`options.${e}`,er)},$i=(t,e)=>{let r=`LRU_CACHE_METHOD_${t}`;if(ns(r)){let{prototype:n}=er,{get:i}=Object.getOwnPropertyDescriptor(n,t);Ni(r,`${t} method`,`cache.${e}()`,i)}},_b=(t,e)=>{let r=`LRU_CACHE_PROPERTY_${t}`;if(ns(r)){let{prototype:n}=er,{get:i}=Object.getOwnPropertyDescriptor(n,t);Ni(r,`${t} property`,`cache.${e}`,i)}},Hc=(...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},ns=t=>!Pi.has(t),Ni=(t,e,r,n)=>{Pi.add(t);let i=`The ${e} is deprecated. Please use ${r} instead.`;Hc(i,"DeprecationWarning",t,n)},lt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Bc=t=>lt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Jt:null:null,Jt=class extends Array{constructor(e){super(e),this.fill(0)}},Li=class{constructor(e){if(e===0)return[];let r=Bc(e);this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},er=class t{constructor(e={}){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:u,updateAgeOnHas:h,allowStale:f,dispose:c,disposeAfter:g,noDisposeOnSet:b,noUpdateTTL:m,maxSize:p=0,maxEntrySize:_=0,sizeCalculation:E,fetchMethod:R,fetchContext:A,noDeleteOnFetchRejection:N,noDeleteOnStaleGet:L,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:$,ignoreFetchAbort:D}=e,{length:H,maxAge:V,stale:X}=e instanceof t?{}:e;if(r!==0&&!lt(r))throw new TypeError("max option must be a nonnegative integer");let J=r?Bc(r):Array;if(!J)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=p,this.maxEntrySize=_||this.maxSize,this.sizeCalculation=E||H,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=R||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=A,!this.fetchMethod&&A!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new J(r),this.prev=new J(r),this.head=0,this.tail=0,this.free=new Li(r),this.initialFill=1,this.size=0,typeof c=="function"&&(this.dispose=c),typeof g=="function"?(this.disposeAfter=g,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!b,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!N,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!$,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.maxSize!==0&&!lt(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!lt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!f||!!X,this.noDeleteOnStaleGet=!!L,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!h,this.ttlResolution=lt(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=n||V||0,this.ttl){if(!lt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let ae="LRU_CACHE_UNBOUNDED";ns(ae)&&(Pi.add(ae),Hc("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ae,t))}X&&Ii("stale","allowStale"),V&&Ii("maxAge","ttl"),H&&Ii("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Jt(this.max),this.starts=new Jt(this.max),this.setItemTTL=(n,i,a=jr.now())=>{if(this.starts[n]=i!==0?a:0,this.ttls[n]=i,i!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.isStale(n)&&this.delete(this.keyList[n])},i+1);u.unref&&u.unref()}},this.updateItemAge=n=>{this.starts[n]=this.ttls[n]!==0?jr.now():0},this.statusTTL=(n,i)=>{n&&(n.ttl=this.ttls[i],n.start=this.starts[i],n.now=e||r(),n.remainingTTL=n.now+n.ttl-n.start)};let e=0,r=()=>{let n=jr.now();if(this.ttlResolution>0){e=n;let i=setTimeout(()=>e=0,this.ttlResolution);i.unref&&i.unref()}return n};this.getRemainingTTL=n=>{let i=this.keyMap.get(n);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(e||r())},this.isStale=n=>this.ttls[n]!==0&&this.starts[n]!==0&&(e||r())-this.starts[n]>this.ttls[n]}updateItemAge(e){}statusTTL(e,r){}setItemTTL(e,r,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Jt(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,r,n,i)=>{if(this.isBackgroundFetch(r))return 0;if(!lt(n))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(n=i(r,e),!lt(n))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 n},this.addItemSize=(e,r,n)=>{if(this.sizes[e]=r,this.maxSize){let i=this.maxSize-this.sizes[e];for(;this.calculatedSize>i;)this.evict(!0)}this.calculatedSize+=this.sizes[e],n&&(n.entrySize=r,n.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,r){}requireSize(e,r,n,i){if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,r){for(let n of this.indexes()){let i=this.valList[n],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(a!==void 0&&e(a,this.keyList[n],this))return this.get(this.keyList[n],r)}}forEach(e,r=this){for(let n of this.indexes()){let i=this.valList[n],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;a!==void 0&&e.call(r,a,this.keyList[n],this)}}rforEach(e,r=this){for(let n of this.rindexes()){let i=this.valList[n],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;a!==void 0&&e.call(r,a,this.keyList[n],this)}}get prune(){return $i("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),e=!0);return e}dump(){let e=[];for(let r of this.indexes({allowStale:!0})){let n=this.keyList[r],i=this.valList[r],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(a===void 0)continue;let u={value:a};if(this.ttls){u.ttl=this.ttls[r];let h=jr.now()-this.starts[r];u.start=Math.floor(Date.now()-h)}this.sizes&&(u.size=this.sizes[r]),e.unshift([n,u])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let i=Date.now()-n.start;n.start=jr.now()-i}this.set(r,n.value,n)}}dispose(e,r,n){}set(e,r,{ttl:n=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,status:c}={}){if(u=this.requireSize(e,r,u,h),this.maxEntrySize&&u>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.delete(e),this;let g=this.size===0?void 0:this.keyMap.get(e);if(g===void 0)g=this.newIndex(),this.keyList[g]=e,this.valList[g]=r,this.keyMap.set(e,g),this.next[this.tail]=g,this.prev[g]=this.tail,this.tail=g,this.size++,this.addItemSize(g,u,c),c&&(c.set="add"),f=!1;else{this.moveToTail(g);let b=this.valList[g];if(r!==b){if(this.isBackgroundFetch(b)?b.__abortController.abort(new Error("replaced")):a||(this.dispose(b,e,"set"),this.disposeAfter&&this.disposed.push([b,e,"set"])),this.removeItemSize(g),this.valList[g]=r,this.addItemSize(g,u,c),c){c.set="replace";let m=b&&this.isBackgroundFetch(b)?b.__staleWhileFetching:b;m!==void 0&&(c.oldValue=m)}}else c&&(c.set="update")}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),f||this.setItemTTL(g,n,i),this.statusTTL(c,g),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let r=this.head,n=this.keyList[r],i=this.valList[r];return this.isBackgroundFetch(i)?i.__abortController.abort(new Error("evicted")):(this.dispose(i,n,"evict"),this.disposeAfter&&this.disposed.push([i,n,"evict"])),this.removeItemSize(r),e&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(n),this.size--,r}has(e,{updateAgeOnHas:r=this.updateAgeOnHas,status:n}={}){let i=this.keyMap.get(e);if(i!==void 0)if(this.isStale(i))n&&(n.has="stale",this.statusTTL(n,i));else return r&&this.updateItemAge(i),n&&(n.has="hit"),this.statusTTL(n,i),!0;else n&&(n.has="miss");return!1}peek(e,{allowStale:r=this.allowStale}={}){let n=this.keyMap.get(e);if(n!==void 0&&(r||!this.isStale(n))){let i=this.valList[n];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(e,r,n,i){let a=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(a))return a;let u=new rs;n.signal&&n.signal.addEventListener("abort",()=>u.abort(n.signal.reason));let h={signal:u.signal,options:n,context:i},f=(p,_=!1)=>{let{aborted:E}=u.signal,R=n.ignoreFetchAbort&&p!==void 0;return n.status&&(E&&!_?(n.status.fetchAborted=!0,n.status.fetchError=u.signal.reason,R&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),E&&!R&&!_?g(u.signal.reason):(this.valList[r]===m&&(p===void 0?m.__staleWhileFetching?this.valList[r]=m.__staleWhileFetching:this.delete(e):(n.status&&(n.status.fetchUpdated=!0),this.set(e,p,h.options))),p)},c=p=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=p),g(p)),g=p=>{let{aborted:_}=u.signal,E=_&&n.allowStaleOnFetchAbort,R=E||n.allowStaleOnFetchRejection,A=R||n.noDeleteOnFetchRejection;if(this.valList[r]===m&&(!A||m.__staleWhileFetching===void 0?this.delete(e):E||(this.valList[r]=m.__staleWhileFetching)),R)return n.status&&m.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),m.__staleWhileFetching;if(m.__returned===m)throw p},b=(p,_)=>{this.fetchMethod(e,a,h).then(E=>p(E),_),u.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(p(),n.allowStaleOnFetchAbort&&(p=E=>f(E,!0)))})};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(b).then(f,c);return m.__abortController=u,m.__staleWhileFetching=a,m.__returned=null,r===void 0?(this.set(e,m,{...h.options,status:void 0}),r=this.keyMap.get(e)):this.valList[r]=m,m}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:b=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,fetchContext:_=this.fetchContext,forceRefresh:E=!1,status:R,signal:A}={}){if(!this.fetchMethod)return R&&(R.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,status:R});let N={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:u,size:h,sizeCalculation:f,noUpdateTTL:c,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:p,ignoreFetchAbort:m,status:R,signal:A},L=this.keyMap.get(e);if(L===void 0){R&&(R.fetch="miss");let T=this.backgroundFetch(e,L,N,_);return T.__returned=T}else{let T=this.valList[L];if(this.isBackgroundFetch(T)){let X=r&&T.__staleWhileFetching!==void 0;return R&&(R.fetch="inflight",X&&(R.returnedStale=!0)),X?T.__staleWhileFetching:T.__returned=T}let $=this.isStale(L);if(!E&&!$)return R&&(R.fetch="hit"),this.moveToTail(L),n&&this.updateItemAge(L),this.statusTTL(R,L),T;let D=this.backgroundFetch(e,L,N,_),H=D.__staleWhileFetching!==void 0,V=H&&r;return R&&(R.fetch=H&&$?"stale":"refresh",V&&$&&(R.returnedStale=!0)),V?D.__staleWhileFetching:D.__returned=D}}get(e,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}={}){let u=this.keyMap.get(e);if(u!==void 0){let h=this.valList[u],f=this.isBackgroundFetch(h);return this.statusTTL(a,u),this.isStale(u)?(a&&(a.get="stale"),f?(a&&(a.returnedStale=r&&h.__staleWhileFetching!==void 0),r?h.__staleWhileFetching:void 0):(i||this.delete(e),a&&(a.returnedStale=r),r?h:void 0)):(a&&(a.get="hit"),f?h.__staleWhileFetching:(this.moveToTail(u),n&&this.updateItemAge(u),h))}else a&&(a.get="miss")}connect(e,r){this.prev[r]=e,this.next[e]=r}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return $i("del","delete"),this.delete}delete(e){let r=!1;if(this.size!==0){let n=this.keyMap.get(e);if(n!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(n);let i=this.valList[n];this.isBackgroundFetch(i)?i.__abortController.abort(new Error("deleted")):(this.dispose(i,e,"delete"),this.disposeAfter&&this.disposed.push([i,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(let e of this.rindexes({allowStale:!0})){let r=this.valList[e];if(this.isBackgroundFetch(r))r.__abortController.abort(new Error("deleted"));else{let n=this.keyList[e];this.dispose(r,n,"delete"),this.disposeAfter&&this.disposed.push([r,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return $i("reset","clear"),this.clear}get length(){return _b("length","size"),this.size}static get AbortController(){return rs}static get AbortSignal(){return Dc}};Fc.exports=er});var Mc=C((fS,zc)=>{"use strict";var j=(...t)=>t.every(e=>e)?t.join(""):"",re=t=>t?encodeURIComponent(t):"",Uc=t=>t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),wb={sshtemplate:({domain:t,user:e,project:r,committish:n})=>`git@${t}:${e}/${r}.git${j("#",n)}`,sshurltemplate:({domain:t,user:e,project:r,committish:n})=>`git+ssh://git@${t}/${e}/${r}.git${j("#",n)}`,edittemplate:({domain:t,user:e,project:r,committish:n,editpath:i,path:a})=>`https://${t}/${e}/${r}${j("/",i,"/",re(n||"HEAD"),"/",a)}`,browsetemplate:({domain:t,user:e,project:r,committish:n,treepath:i})=>`https://${t}/${e}/${r}${j("/",i,"/",re(n))}`,browsetreetemplate:({domain:t,user:e,project:r,committish:n,treepath:i,path:a,fragment:u,hashformat:h})=>`https://${t}/${e}/${r}/${i}/${re(n||"HEAD")}/${a}${j("#",h(u||""))}`,browseblobtemplate:({domain:t,user:e,project:r,committish:n,blobpath:i,path:a,fragment:u,hashformat:h})=>`https://${t}/${e}/${r}/${i}/${re(n||"HEAD")}/${a}${j("#",h(u||""))}`,docstemplate:({domain:t,user:e,project:r,treepath:n,committish:i})=>`https://${t}/${e}/${r}${j("/",n,"/",re(i))}#readme`,httpstemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git+https://${j(t,"@")}${e}/${r}/${n}.git${j("#",i)}`,filetemplate:({domain:t,user:e,project:r,committish:n,path:i})=>`https://${t}/${e}/${r}/raw/${re(n||"HEAD")}/${i}`,shortcuttemplate:({type:t,user:e,project:r,committish:n})=>`${t}:${e}/${r}${j("#",n)}`,pathtemplate:({user:t,project:e,committish:r})=>`${t}/${e}${j("#",r)}`,bugstemplate:({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,hashformat:Uc},ut={};ut.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://${j(t,"@")}raw.githubusercontent.com/${e}/${r}/${re(n||"HEAD")}/${i}`,gittemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git://${j(t,"@")}${e}/${r}/${n}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://codeload.${t}/${e}/${r}/tar.gz/${re(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}}};ut.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:u})=>`https://${t}/${e}/${r}${j("/",i,"/",re(n||"HEAD"),"/",a,u)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/get/${re(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)}}};ut.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://${j(t,"@")}${e}/${r}/${n}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${re(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)}}};ut.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:n,editpath:i})=>`https://${t}/${e}/${r}${j("/",re(n))}/${i}`,browsetemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",re(r))}`,browsetreetemplate:({domain:t,project:e,committish:r,path:n,hashformat:i})=>`https://${t}/${e}${j("/",re(r))}${j("#",i(n))}`,browseblobtemplate:({domain:t,project:e,committish:r,path:n,hashformat:i})=>`https://${t}/${e}${j("/",re(r))}${j("#",i(n))}`,docstemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",re(r))}`,httpstemplate:({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${j("#",r)}`,filetemplate:({user:t,project:e,committish:r,path:n})=>`https://gist.githubusercontent.com/${t}/${e}/raw${j("/",re(r))}/${n}`,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/${re(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-"+Uc(t)}};ut.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/${re(n)||"HEAD"}/${i}`,httpstemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}.git${j("#",n)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/archive/${re(n)||"HEAD"}.tar.gz`,bugstemplate:({user:t,project:e})=>`https://todo.sr.ht/${t}/${e}`,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(ut))ut[t]=Object.assign({},wb,e);zc.exports=ut});var Hi=C((dS,Wc)=>{var Sb=ye("url"),Di=(t,e,r)=>{let n=t.indexOf(r);return t.lastIndexOf(e,n>-1?n:1/0)},kc=t=>{try{return new Sb.URL(t)}catch{}},Rb=(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)}`},Eb=t=>{let e=Di(t,"@","#"),r=Di(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),Di(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t};Wc.exports=(t,e)=>{let r=e?Rb(t,e):t;return kc(r)||kc(Eb(r))}});var Vc=C((pS,jc)=>{"use strict";var Tb=Hi(),Ab=t=>{let e=t.indexOf("#"),r=t.indexOf("/"),n=t.indexOf("/",r+1),i=t.indexOf(":"),a=/\s/.exec(t),u=t.indexOf("@"),h=!a||e>-1&&a.index>e,f=u===-1||e>-1&&u>e,c=i===-1||e>-1&&i>e,g=n===-1||e>-1&&n>e,b=r>0,m=e>-1?t[e-1]!=="/":!t.endsWith("/"),p=!t.startsWith(".");return h&&b&&m&&p&&f&&c&&g};jc.exports=(t,e,{gitHosts:r,protocols:n})=>{var E,R;if(!t)return;let i=Ab(t)?`github:${t}`:t,a=Tb(i,n);if(!a)return;let u=r.byShortcut[a.protocol],h=r.byDomain[a.hostname.startsWith("www.")?a.hostname.slice(4):a.hostname],f=u||h;if(!f)return;let c=r[u||h],g=null;(E=n[a.protocol])!=null&&E.auth&&(a.username||a.password)&&(g=`${a.username}${a.password?":"+a.password:""}`);let b=null,m=null,p=null,_=null;try{if(u){let A=a.pathname.startsWith("/")?a.pathname.slice(1):a.pathname,N=A.indexOf("@");N>-1&&(A=A.slice(N+1));let L=A.lastIndexOf("/");L>-1?(m=decodeURIComponent(A.slice(0,L)),m||(m=null),p=decodeURIComponent(A.slice(L+1))):p=decodeURIComponent(A),p.endsWith(".git")&&(p=p.slice(0,-4)),a.hash&&(b=decodeURIComponent(a.hash.slice(1))),_="shortcut"}else{if(!c.protocols.includes(a.protocol))return;let A=c.extract(a);if(!A)return;m=A.user&&decodeURIComponent(A.user),p=decodeURIComponent(A.project),b=decodeURIComponent(A.committish),_=((R=n[a.protocol])==null?void 0:R.name)||a.protocol.slice(0,-1)}}catch(A){if(A instanceof URIError)return;throw A}return[f,m,g,p,b,_,e]}});var Yc=C((mS,Gc)=>{"use strict";var Cb=qc(),vb=Mc(),xb=Vc(),Ob=Hi(),Bi=new Cb({max:1e3}),ss=class t{constructor(e,r,n,i,a,u,h={}){Object.assign(this,t.#e[e],{type:e,user:r,auth:n,project:i,committish:a,default:u,opts:h})}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(!Bi.has(n)){let i=xb(e,r,{gitHosts:t.#e,protocols:t.#r});Bi.set(n,i?new t(...i):void 0)}return Bi.get(n)}static parseUrl(e){return Ob(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(vb))ss.addHost(t,e);Gc.exports=ss});var th=C((RS,eh)=>{"use strict";var xt=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)}},ls=class{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},Vr=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 ls(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 xt("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 ls(e)}callNow(e,r){return this.call(e,r),this.runOne()}return(e){if(this.stack.length===0)throw this.error(new xt("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 xt("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 xt("Must declare a parseStart method")}};Vr.END=1114112;Vr.Error=xt;eh.exports=Vr});var nh=C((ES,rh)=>{"use strict";rh.exports=t=>{let e=new Date(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var us=C((TS,sh)=>{"use strict";sh.exports=(t,e)=>{for(e=String(e);e.length<t;)e="0"+e;return e}});var oh=C((AS,ih)=>{"use strict";var rr=us(),zi=class extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){let e=`${this.getUTCFullYear()}-${rr(2,this.getUTCMonth()+1)}-${rr(2,this.getUTCDate())}`,r=`${rr(2,this.getUTCHours())}:${rr(2,this.getUTCMinutes())}:${rr(2,this.getUTCSeconds())}.${rr(3,this.getUTCMilliseconds())}`;return`${e}T${r}`}};ih.exports=t=>{let e=new zi(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var uh=C((CS,lh)=>{"use strict";var ah=us(),Bb=global.Date,Mi=class extends Bb{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${ah(2,this.getUTCMonth()+1)}-${ah(2,this.getUTCDate())}`}};lh.exports=t=>{let e=new Mi(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var hh=C((vS,ch)=>{"use strict";var cs=us(),ki=class extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${cs(2,this.getUTCHours())}:${cs(2,this.getUTCMinutes())}:${cs(2,this.getUTCSeconds())}.${cs(3,this.getUTCMilliseconds())}`}};ch.exports=t=>{let e=new ki(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var fh=C((exports,module)=>{"use strict";module.exports=makeParserClass(th());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=nh(),createDateTimeFloat=oh(),createDate=uh(),createTime=hh(),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 u of n.key){if(hasKey(i,u)&&(!isTable(i[u])||i[u][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[u]=i[u]||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 u of n.key){if(hasKey(i,u)&&(!isTable(i[u])||i[u][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[u]=i[u]||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 ph=C((xS,dh)=>{"use strict";dh.exports=Fb;function Fb(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}:
19
+ `)a=!1,h+=f(t,u,c),u=c;else if(!a&&r+n==="/*"){h+=t.slice(u,c),u=c,a=ul,c++;continue}else if(a===ul&&r+n==="*/"){c++,a=!1,h+=f(t,u,c+1),u=c+1;continue}}}return h+(a?f(t.substr(u)):t.substr(u))}});var dl=C(Yt=>{"use strict";var fl=ye("fs"),fp=ll(),Lr=ye("path"),dp=hl(),pp=Yt.parse=function(t){return/^\s*{/.test(t)?JSON.parse(dp(t)):fp.parse(t)},mp=Yt.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=Lr.join.apply(null,t),n;try{return fl.readFileSync(r,"utf-8")}catch{return}},uw=Yt.json=function(){var t=mp.apply(null,arguments);return t?pp(t):null},cw=Yt.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("__"),u;(u=a.indexOf(""))>-1;)a.splice(u,1);var h=r;a.forEach(function(c,g){!c||typeof h!="object"||(g===a.length-1&&(h[c]=e[i]),h[c]===void 0&&(h[c]={}),h=h[c])})}return r},hw=Yt.find=function(){var t=Lr.join.apply(null,[].slice.call(arguments));function e(r,n){var i=Lr.join(r,n);try{return fl.statSync(i),i}catch{if(Lr.dirname(r)!==r)return e(Lr.dirname(r),n)}}return e(process.cwd(),t)}});var _l=C((dw,yl)=>{"use strict";function ml(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function gl(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 bl(t){var e=[];return t.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?e[n]=bl(r):ml(r)?e[n]=gl(r):e[n]=ci({},r):e[n]=r}),e}function pl(t,e){return e==="__proto__"?void 0:t[e]}var ci=yl.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(u){if(n=pl(t,u),r=pl(a,u),r!==t)if(typeof r!="object"||r===null){t[u]=r;return}else if(Array.isArray(r)){t[u]=bl(r);return}else if(ml(r)){t[u]=gl(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[u]=ci({},r);return}else{t[u]=ci(n,r);return}})}),t}});var zn=C((pw,Rl)=>{var Pr=dl(),Qt=ye("path").join,gp=_l(),wl="/etc",Sl=process.platform==="win32",Nr=Sl?process.env.USERPROFILE:process.env.HOME;Rl.exports=function(t,e,r,n){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=Xs()(process.argv.slice(2))),e=(typeof e=="string"?Pr.json(e):e)||{},n=n||Pr.parse;var i=Pr.env(t+"_"),a=[e],u=[];function h(f){if(!(u.indexOf(f)>=0)){var c=Pr.file(f);c&&(a.push(n(c)),u.push(f))}}return Sl||[Qt(wl,t,"config"),Qt(wl,t+"rc")].forEach(h),Nr&&[Qt(Nr,".config",t,"config"),Qt(Nr,".config",t),Qt(Nr,"."+t,"config"),Qt(Nr,"."+t+"rc")].forEach(h),h(Pr.find("."+t+"rc")),i.config&&h(i.config),r.config&&h(r.config),gp.apply(null,a.concat([i,r,u.length?{configs:u,config:u[u.length-1]}:void 0]))}});var Il=C((mw,Ol)=>{var hi=ye("url"),vl=sl(),bp=vl.decodeBase64,yp=vl.encodeBase64,El=":_authToken",Tl=":_auth",Al=":username",Cl=":_password";Ol.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||zn()("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)||_p(e.npmrc)};function xl(t,e){for(var r=hi.parse(t,!1,!0),n;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";var i="//"+r.host+n.replace(/\/$/,""),a=Sp(i,e.npmrc);if(a)return a;if(!e.recursive)return/\/$/.test(t)?void 0:xl(hi.resolve(t,"."),e);r.pathname=hi.resolve(wp(n),"..")||"/"}}function _p(t){if(t._auth){var e=Mn(t._auth);return{token:e,type:"Basic"}}}function wp(t){return t[t.length-1]==="/"?t:t+"/"}function Sp(t,e){var r=Rp(e[t+El]||e[t+"/"+El]);if(r)return r;var n=e[t+Al]||e[t+"/"+Al],i=e[t+Cl]||e[t+"/"+Cl],a=Ep(n,i);if(a)return a;var u=Tp(e[t+Tl]||e[t+"/"+Tl]);if(u)return u}function Mn(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function Rp(t){if(t){var e=Mn(t);return{token:e,type:"Bearer"}}}function Ep(t,e){if(!(!t||!e)){var r=bp(Mn(e)),n=yp(t+":"+r);return{token:n,type:"Basic",password:r,username:t}}}function Tp(t){if(t){var e=Mn(t);return{token:e,type:"Basic"}}}});var Ll=C((gw,$l)=>{$l.exports=function(t,e){var r=e||zn()("npm",{registry:"https://registry.npmjs.org/"}),n=r[t+":registry"]||r.registry;return n.slice(-1)==="/"?n:n+"/"}});var Dr=C((bw,Pl)=>{var Ap="2.0.0",Cp=Number.MAX_SAFE_INTEGER||9007199254740991,vp=16;Pl.exports={SEMVER_SPEC_VERSION:Ap,MAX_LENGTH:256,MAX_SAFE_INTEGER:Cp,MAX_SAFE_COMPONENT_LENGTH:vp}});var Hr=C((yw,Nl)=>{var xp=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Nl.exports=xp});var Et=C((at,Dl)=>{var{MAX_SAFE_COMPONENT_LENGTH:fi}=Dr(),Op=Hr();at=Dl.exports={};var Ip=at.re=[],O=at.src=[],I=at.t={},$p=0,F=(t,e,r)=>{let n=$p++;Op(t,n,e),I[t]=n,O[n]=e,Ip[n]=new RegExp(e,r?"g":void 0)};F("NUMERICIDENTIFIER","0|[1-9]\\d*");F("NUMERICIDENTIFIERLOOSE","[0-9]+");F("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");F("MAINVERSION",`(${O[I.NUMERICIDENTIFIER]})\\.(${O[I.NUMERICIDENTIFIER]})\\.(${O[I.NUMERICIDENTIFIER]})`);F("MAINVERSIONLOOSE",`(${O[I.NUMERICIDENTIFIERLOOSE]})\\.(${O[I.NUMERICIDENTIFIERLOOSE]})\\.(${O[I.NUMERICIDENTIFIERLOOSE]})`);F("PRERELEASEIDENTIFIER",`(?:${O[I.NUMERICIDENTIFIER]}|${O[I.NONNUMERICIDENTIFIER]})`);F("PRERELEASEIDENTIFIERLOOSE",`(?:${O[I.NUMERICIDENTIFIERLOOSE]}|${O[I.NONNUMERICIDENTIFIER]})`);F("PRERELEASE",`(?:-(${O[I.PRERELEASEIDENTIFIER]}(?:\\.${O[I.PRERELEASEIDENTIFIER]})*))`);F("PRERELEASELOOSE",`(?:-?(${O[I.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${O[I.PRERELEASEIDENTIFIERLOOSE]})*))`);F("BUILDIDENTIFIER","[0-9A-Za-z-]+");F("BUILD",`(?:\\+(${O[I.BUILDIDENTIFIER]}(?:\\.${O[I.BUILDIDENTIFIER]})*))`);F("FULLPLAIN",`v?${O[I.MAINVERSION]}${O[I.PRERELEASE]}?${O[I.BUILD]}?`);F("FULL",`^${O[I.FULLPLAIN]}$`);F("LOOSEPLAIN",`[v=\\s]*${O[I.MAINVERSIONLOOSE]}${O[I.PRERELEASELOOSE]}?${O[I.BUILD]}?`);F("LOOSE",`^${O[I.LOOSEPLAIN]}$`);F("GTLT","((?:<|>)?=?)");F("XRANGEIDENTIFIERLOOSE",`${O[I.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);F("XRANGEIDENTIFIER",`${O[I.NUMERICIDENTIFIER]}|x|X|\\*`);F("XRANGEPLAIN",`[v=\\s]*(${O[I.XRANGEIDENTIFIER]})(?:\\.(${O[I.XRANGEIDENTIFIER]})(?:\\.(${O[I.XRANGEIDENTIFIER]})(?:${O[I.PRERELEASE]})?${O[I.BUILD]}?)?)?`);F("XRANGEPLAINLOOSE",`[v=\\s]*(${O[I.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[I.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[I.XRANGEIDENTIFIERLOOSE]})(?:${O[I.PRERELEASELOOSE]})?${O[I.BUILD]}?)?)?`);F("XRANGE",`^${O[I.GTLT]}\\s*${O[I.XRANGEPLAIN]}$`);F("XRANGELOOSE",`^${O[I.GTLT]}\\s*${O[I.XRANGEPLAINLOOSE]}$`);F("COERCE",`(^|[^\\d])(\\d{1,${fi}})(?:\\.(\\d{1,${fi}}))?(?:\\.(\\d{1,${fi}}))?(?:$|[^\\d])`);F("COERCERTL",O[I.COERCE],!0);F("LONETILDE","(?:~>?)");F("TILDETRIM",`(\\s*)${O[I.LONETILDE]}\\s+`,!0);at.tildeTrimReplace="$1~";F("TILDE",`^${O[I.LONETILDE]}${O[I.XRANGEPLAIN]}$`);F("TILDELOOSE",`^${O[I.LONETILDE]}${O[I.XRANGEPLAINLOOSE]}$`);F("LONECARET","(?:\\^)");F("CARETTRIM",`(\\s*)${O[I.LONECARET]}\\s+`,!0);at.caretTrimReplace="$1^";F("CARET",`^${O[I.LONECARET]}${O[I.XRANGEPLAIN]}$`);F("CARETLOOSE",`^${O[I.LONECARET]}${O[I.XRANGEPLAINLOOSE]}$`);F("COMPARATORLOOSE",`^${O[I.GTLT]}\\s*(${O[I.LOOSEPLAIN]})$|^$`);F("COMPARATOR",`^${O[I.GTLT]}\\s*(${O[I.FULLPLAIN]})$|^$`);F("COMPARATORTRIM",`(\\s*)${O[I.GTLT]}\\s*(${O[I.LOOSEPLAIN]}|${O[I.XRANGEPLAIN]})`,!0);at.comparatorTrimReplace="$1$2$3";F("HYPHENRANGE",`^\\s*(${O[I.XRANGEPLAIN]})\\s+-\\s+(${O[I.XRANGEPLAIN]})\\s*$`);F("HYPHENRANGELOOSE",`^\\s*(${O[I.XRANGEPLAINLOOSE]})\\s+-\\s+(${O[I.XRANGEPLAINLOOSE]})\\s*$`);F("STAR","(<|>)?=?\\s*\\*");F("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");F("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Br=C((_w,Hl)=>{var Lp=["includePrerelease","loose","rtl"],Pp=t=>t?typeof t!="object"?{loose:!0}:Lp.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};Hl.exports=Pp});var di=C((ww,ql)=>{var Bl=/^[0-9]+$/,Fl=(t,e)=>{let r=Bl.test(t),n=Bl.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},Np=(t,e)=>Fl(e,t);ql.exports={compareIdentifiers:Fl,rcompareIdentifiers:Np}});var le=C((Sw,kl)=>{var kn=Hr(),{MAX_LENGTH:Ul,MAX_SAFE_INTEGER:Wn}=Dr(),{re:zl,t:Ml}=Et(),Dp=Br(),{compareIdentifiers:Kt}=di(),pi=class t{constructor(e,r){if(r=Dp(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>Ul)throw new TypeError(`version is longer than ${Ul} characters`);kn("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?zl[Ml.LOOSE]:zl[Ml.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>Wn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Wn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Wn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let a=+i;if(a>=0&&a<Wn)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(kn("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)),Kt(this.major,e.major)||Kt(this.minor,e.minor)||Kt(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(kn("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 Kt(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(kn("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 Kt(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&&(Kt(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}};kl.exports=pi});var Tt=C((Rw,Gl)=>{var{MAX_LENGTH:Hp}=Dr(),{re:Wl,t:jl}=Et(),Vl=le(),Bp=Br(),Fp=(t,e)=>{if(e=Bp(e),t instanceof Vl)return t;if(typeof t!="string"||t.length>Hp||!(e.loose?Wl[jl.LOOSE]:Wl[jl.FULL]).test(t))return null;try{return new Vl(t,e)}catch{return null}};Gl.exports=Fp});var Ql=C((Ew,Yl)=>{var qp=Tt(),Up=(t,e)=>{let r=qp(t,e);return r?r.version:null};Yl.exports=Up});var Xl=C((Tw,Kl)=>{var zp=Tt(),Mp=(t,e)=>{let r=zp(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Kl.exports=Mp});var eu=C((Aw,Jl)=>{var Zl=le(),kp=(t,e,r,n)=>{typeof r=="string"&&(n=r,r=void 0);try{return new Zl(t instanceof Zl?t.version:t,r).inc(e,n).version}catch{return null}};Jl.exports=kp});var Te=C((Cw,ru)=>{var tu=le(),Wp=(t,e,r)=>new tu(t,r).compare(new tu(e,r));ru.exports=Wp});var jn=C((vw,nu)=>{var jp=Te(),Vp=(t,e,r)=>jp(t,e,r)===0;nu.exports=Vp});var ou=C((xw,iu)=>{var su=Tt(),Gp=jn(),Yp=(t,e)=>{if(Gp(t,e))return null;{let r=su(t),n=su(e),i=r.prerelease.length||n.prerelease.length,a=i?"pre":"",u=i?"prerelease":"";for(let h in r)if((h==="major"||h==="minor"||h==="patch")&&r[h]!==n[h])return a+h;return u}};iu.exports=Yp});var lu=C((Ow,au)=>{var Qp=le(),Kp=(t,e)=>new Qp(t,e).major;au.exports=Kp});var cu=C((Iw,uu)=>{var Xp=le(),Zp=(t,e)=>new Xp(t,e).minor;uu.exports=Zp});var fu=C(($w,hu)=>{var Jp=le(),em=(t,e)=>new Jp(t,e).patch;hu.exports=em});var pu=C((Lw,du)=>{var tm=Tt(),rm=(t,e)=>{let r=tm(t,e);return r&&r.prerelease.length?r.prerelease:null};du.exports=rm});var gu=C((Pw,mu)=>{var nm=Te(),sm=(t,e,r)=>nm(e,t,r);mu.exports=sm});var yu=C((Nw,bu)=>{var im=Te(),om=(t,e)=>im(t,e,!0);bu.exports=om});var Vn=C((Dw,wu)=>{var _u=le(),am=(t,e,r)=>{let n=new _u(t,r),i=new _u(e,r);return n.compare(i)||n.compareBuild(i)};wu.exports=am});var Ru=C((Hw,Su)=>{var lm=Vn(),um=(t,e)=>t.sort((r,n)=>lm(r,n,e));Su.exports=um});var Tu=C((Bw,Eu)=>{var cm=Vn(),hm=(t,e)=>t.sort((r,n)=>cm(n,r,e));Eu.exports=hm});var Fr=C((Fw,Au)=>{var fm=Te(),dm=(t,e,r)=>fm(t,e,r)>0;Au.exports=dm});var Gn=C((qw,Cu)=>{var pm=Te(),mm=(t,e,r)=>pm(t,e,r)<0;Cu.exports=mm});var mi=C((Uw,vu)=>{var gm=Te(),bm=(t,e,r)=>gm(t,e,r)!==0;vu.exports=bm});var Yn=C((zw,xu)=>{var ym=Te(),_m=(t,e,r)=>ym(t,e,r)>=0;xu.exports=_m});var Qn=C((Mw,Ou)=>{var wm=Te(),Sm=(t,e,r)=>wm(t,e,r)<=0;Ou.exports=Sm});var gi=C((kw,Iu)=>{var Rm=jn(),Em=mi(),Tm=Fr(),Am=Yn(),Cm=Gn(),vm=Qn(),xm=(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 Rm(t,r,n);case"!=":return Em(t,r,n);case">":return Tm(t,r,n);case">=":return Am(t,r,n);case"<":return Cm(t,r,n);case"<=":return vm(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Iu.exports=xm});var Lu=C((Ww,$u)=>{var Om=le(),Im=Tt(),{re:Kn,t:Xn}=Et(),$m=(t,e)=>{if(t instanceof Om)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(Kn[Xn.COERCE]);else{let n;for(;(n=Kn[Xn.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),Kn[Xn.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Kn[Xn.COERCERTL].lastIndex=-1}return r===null?null:Im(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};$u.exports=$m});var Nu=C((jw,Pu)=>{"use strict";Pu.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Hu=C((Vw,Du)=>{"use strict";Du.exports=W;W.Node=At;W.create=W;function W(t){var e=this;if(e instanceof W||(e=new W),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}W.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};W.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++}};W.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++}};W.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)Pm(this,arguments[t]);return this.length};W.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Nm(this,arguments[t]);return this.length};W.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}};W.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}};W.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};W.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};W.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};W.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};W.prototype.map=function(t,e){e=e||this;for(var r=new W,n=this.head;n!==null;)r.push(t.call(e,n.value,this)),n=n.next;return r};W.prototype.mapReverse=function(t,e){e=e||this;for(var r=new W,n=this.tail;n!==null;)r.push(t.call(e,n.value,this)),n=n.prev;return r};W.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};W.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};W.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};W.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};W.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 W;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};W.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 W;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};W.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=Lm(this,i,r[n]);return a};W.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 Lm(t,e,r){var n=e===t.head?new At(r,null,e,t):new At(r,e,e.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function Pm(t,e){t.tail=new At(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Nm(t,e){t.head=new At(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function At(t,e,r,n){if(!(this instanceof At))return new At(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{Nu()(W)}catch{}});var zu=C((Gw,Uu)=>{"use strict";var Dm=Hu(),Ct=Symbol("max"),Qe=Symbol("length"),Xt=Symbol("lengthCalculator"),Ur=Symbol("allowStale"),vt=Symbol("maxAge"),Ye=Symbol("dispose"),Bu=Symbol("noDisposeOnSet"),ie=Symbol("lruList"),De=Symbol("cache"),qu=Symbol("updateAgeOnGet"),bi=()=>1,_i=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[Ct]=e.max||1/0,n=e.length||bi;if(this[Xt]=typeof n!="function"?bi:n,this[Ur]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[vt]=e.maxAge||0,this[Ye]=e.dispose,this[Bu]=e.noDisposeOnSet||!1,this[qu]=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[Ct]=e||1/0,qr(this)}get max(){return this[Ct]}set allowStale(e){this[Ur]=!!e}get allowStale(){return this[Ur]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[vt]=e,qr(this)}get maxAge(){return this[vt]}set lengthCalculator(e){typeof e!="function"&&(e=bi),e!==this[Xt]&&(this[Xt]=e,this[Qe]=0,this[ie].forEach(r=>{r.length=this[Xt](r.value,r.key),this[Qe]+=r.length})),qr(this)}get lengthCalculator(){return this[Xt]}get length(){return this[Qe]}get itemCount(){return this[ie].length}rforEach(e,r){r=r||this;for(let n=this[ie].tail;n!==null;){let i=n.prev;Fu(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[ie].head;n!==null;){let i=n.next;Fu(this,e,n,r),n=i}}keys(){return this[ie].toArray().map(e=>e.key)}values(){return this[ie].toArray().map(e=>e.value)}reset(){this[Ye]&&this[ie]&&this[ie].length&&this[ie].forEach(e=>this[Ye](e.key,e.value)),this[De]=new Map,this[ie]=new Dm,this[Qe]=0}dump(){return this[ie].map(e=>Zn(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[ie]}set(e,r,n){if(n=n||this[vt],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let i=n?Date.now():0,a=this[Xt](r,e);if(this[De].has(e)){if(a>this[Ct])return Zt(this,this[De].get(e)),!1;let f=this[De].get(e).value;return this[Ye]&&(this[Bu]||this[Ye](e,f.value)),f.now=i,f.maxAge=n,f.value=r,this[Qe]+=a-f.length,f.length=a,this.get(e),qr(this),!0}let u=new wi(e,r,a,i,n);return u.length>this[Ct]?(this[Ye]&&this[Ye](e,r),!1):(this[Qe]+=u.length,this[ie].unshift(u),this[De].set(e,this[ie].head),qr(this),!0)}has(e){if(!this[De].has(e))return!1;let r=this[De].get(e).value;return!Zn(this,r)}get(e){return yi(this,e,!0)}peek(e){return yi(this,e,!1)}pop(){let e=this[ie].tail;return e?(Zt(this,e),e.value):null}del(e){Zt(this,this[De].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 u=a-r;u>0&&this.set(i.k,i.v,u)}}}prune(){this[De].forEach((e,r)=>yi(this,r,!1))}},yi=(t,e,r)=>{let n=t[De].get(e);if(n){let i=n.value;if(Zn(t,i)){if(Zt(t,n),!t[Ur])return}else r&&(t[qu]&&(n.value.now=Date.now()),t[ie].unshiftNode(n));return i.value}},Zn=(t,e)=>{if(!e||!e.maxAge&&!t[vt])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[vt]&&r>t[vt]},qr=t=>{if(t[Qe]>t[Ct])for(let e=t[ie].tail;t[Qe]>t[Ct]&&e!==null;){let r=e.prev;Zt(t,e),e=r}},Zt=(t,e)=>{if(e){let r=e.value;t[Ye]&&t[Ye](r.key,r.value),t[Qe]-=r.length,t[De].delete(r.key),t[ie].removeNode(e)}},wi=class{constructor(e,r,n,i,a){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=a||0}},Fu=(t,e,r,n)=>{let i=r.value;Zn(t,i)&&(Zt(t,r),t[Ur]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};Uu.exports=_i});var Ae=C((Yw,ju)=>{var Si=class t{constructor(e,r){if(r=Bm(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof Ri)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=>!ku(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&&Mm(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=Mu.get(n);if(i)return i;let a=this.options.loose,u=a?ge[ce.HYPHENRANGELOOSE]:ge[ce.HYPHENRANGE];e=e.replace(u,Zm(this.options.includePrerelease)),Q("hyphen replace",e),e=e.replace(ge[ce.COMPARATORTRIM],qm),Q("comparator trim",e),e=e.replace(ge[ce.TILDETRIM],Um),e=e.replace(ge[ce.CARETTRIM],zm),e=e.split(/\s+/).join(" ");let h=e.split(" ").map(b=>km(b,this.options)).join(" ").split(/\s+/).map(b=>Xm(b,this.options));a&&(h=h.filter(b=>(Q("loose invalid filter",b,this.options),!!b.match(ge[ce.COMPARATORLOOSE])))),Q("range list",h);let f=new Map,c=h.map(b=>new Ri(b,this.options));for(let b of c){if(ku(b))return[b];f.set(b.value,b)}f.size>1&&f.has("")&&f.delete("");let g=[...f.values()];return Mu.set(n,g),g}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>Wu(n,r)&&e.set.some(i=>Wu(i,r)&&n.every(a=>i.every(u=>a.intersects(u,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Fm(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Jm(this.set[r],e,this.options))return!0;return!1}};ju.exports=Si;var Hm=zu(),Mu=new Hm({max:1e3}),Bm=Br(),Ri=zr(),Q=Hr(),Fm=le(),{re:ge,t:ce,comparatorTrimReplace:qm,tildeTrimReplace:Um,caretTrimReplace:zm}=Et(),ku=t=>t.value==="<0.0.0-0",Mm=t=>t.value==="",Wu=(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},km=(t,e)=>(Q("comp",t,e),t=Vm(t,e),Q("caret",t),t=Wm(t,e),Q("tildes",t),t=Ym(t,e),Q("xrange",t),t=Km(t,e),Q("stars",t),t),he=t=>!t||t.toLowerCase()==="x"||t==="*",Wm=(t,e)=>t.trim().split(/\s+/).map(r=>jm(r,e)).join(" "),jm=(t,e)=>{let r=e.loose?ge[ce.TILDELOOSE]:ge[ce.TILDE];return t.replace(r,(n,i,a,u,h)=>{Q("tilde",t,n,i,a,u,h);let f;return he(i)?f="":he(a)?f=`>=${i}.0.0 <${+i+1}.0.0-0`:he(u)?f=`>=${i}.${a}.0 <${i}.${+a+1}.0-0`:h?(Q("replaceTilde pr",h),f=`>=${i}.${a}.${u}-${h} <${i}.${+a+1}.0-0`):f=`>=${i}.${a}.${u} <${i}.${+a+1}.0-0`,Q("tilde return",f),f})},Vm=(t,e)=>t.trim().split(/\s+/).map(r=>Gm(r,e)).join(" "),Gm=(t,e)=>{Q("caret",t,e);let r=e.loose?ge[ce.CARETLOOSE]:ge[ce.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,a,u,h,f)=>{Q("caret",t,i,a,u,h,f);let c;return he(a)?c="":he(u)?c=`>=${a}.0.0${n} <${+a+1}.0.0-0`:he(h)?a==="0"?c=`>=${a}.${u}.0${n} <${a}.${+u+1}.0-0`:c=`>=${a}.${u}.0${n} <${+a+1}.0.0-0`:f?(Q("replaceCaret pr",f),a==="0"?u==="0"?c=`>=${a}.${u}.${h}-${f} <${a}.${u}.${+h+1}-0`:c=`>=${a}.${u}.${h}-${f} <${a}.${+u+1}.0-0`:c=`>=${a}.${u}.${h}-${f} <${+a+1}.0.0-0`):(Q("no pr"),a==="0"?u==="0"?c=`>=${a}.${u}.${h}${n} <${a}.${u}.${+h+1}-0`:c=`>=${a}.${u}.${h}${n} <${a}.${+u+1}.0-0`:c=`>=${a}.${u}.${h} <${+a+1}.0.0-0`),Q("caret return",c),c})},Ym=(t,e)=>(Q("replaceXRanges",t,e),t.split(/\s+/).map(r=>Qm(r,e)).join(" ")),Qm=(t,e)=>{t=t.trim();let r=e.loose?ge[ce.XRANGELOOSE]:ge[ce.XRANGE];return t.replace(r,(n,i,a,u,h,f)=>{Q("xRange",t,n,i,a,u,h,f);let c=he(a),g=c||he(u),b=g||he(h),m=b;return i==="="&&m&&(i=""),f=e.includePrerelease?"-0":"",c?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&m?(g&&(u=0),h=0,i===">"?(i=">=",g?(a=+a+1,u=0,h=0):(u=+u+1,h=0)):i==="<="&&(i="<",g?a=+a+1:u=+u+1),i==="<"&&(f="-0"),n=`${i+a}.${u}.${h}${f}`):g?n=`>=${a}.0.0${f} <${+a+1}.0.0-0`:b&&(n=`>=${a}.${u}.0${f} <${a}.${+u+1}.0-0`),Q("xRange return",n),n})},Km=(t,e)=>(Q("replaceStars",t,e),t.trim().replace(ge[ce.STAR],"")),Xm=(t,e)=>(Q("replaceGTE0",t,e),t.trim().replace(ge[e.includePrerelease?ce.GTE0PRE:ce.GTE0],"")),Zm=t=>(e,r,n,i,a,u,h,f,c,g,b,m,p)=>(he(n)?r="":he(i)?r=`>=${n}.0.0${t?"-0":""}`:he(a)?r=`>=${n}.${i}.0${t?"-0":""}`:u?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,he(c)?f="":he(g)?f=`<${+c+1}.0.0-0`:he(b)?f=`<${c}.${+g+1}.0-0`:m?f=`<=${c}.${g}.${b}-${m}`:t?f=`<${c}.${g}.${+b+1}-0`:f=`<=${f}`,`${r} ${f}`.trim()),Jm=(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(Q(t[n].semver),t[n].semver!==Ri.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 zr=C((Qw,Ku)=>{var Mr=Symbol("SemVer ANY"),Ai=class t{static get ANY(){return Mr}constructor(e,r){if(r=eg(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}Ti("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Mr?this.value="":this.value=this.operator+this.semver.version,Ti("comp",this)}parse(e){let r=this.options.loose?Vu[Gu.COMPARATORLOOSE]:Vu[Gu.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 Yu(n[2],this.options.loose):this.semver=Mr}toString(){return this.value}test(e){if(Ti("Comparator.test",e,this.options.loose),this.semver===Mr||e===Mr)return!0;if(typeof e=="string")try{e=new Yu(e,this.options)}catch{return!1}return Ei(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 Qu(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new Qu(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,u=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),h=Ei(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),f=Ei(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||a&&u||h||f}};Ku.exports=Ai;var eg=Br(),{re:Vu,t:Gu}=Et(),Ei=gi(),Ti=Hr(),Yu=le(),Qu=Ae()});var kr=C((Kw,Xu)=>{var tg=Ae(),rg=(t,e,r)=>{try{e=new tg(e,r)}catch{return!1}return e.test(t)};Xu.exports=rg});var Ju=C((Xw,Zu)=>{var ng=Ae(),sg=(t,e)=>new ng(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Zu.exports=sg});var tc=C((Zw,ec)=>{var ig=le(),og=Ae(),ag=(t,e,r)=>{let n=null,i=null,a=null;try{a=new og(e,r)}catch{return null}return t.forEach(u=>{a.test(u)&&(!n||i.compare(u)===-1)&&(n=u,i=new ig(n,r))}),n};ec.exports=ag});var nc=C((Jw,rc)=>{var lg=le(),ug=Ae(),cg=(t,e,r)=>{let n=null,i=null,a=null;try{a=new ug(e,r)}catch{return null}return t.forEach(u=>{a.test(u)&&(!n||i.compare(u)===1)&&(n=u,i=new lg(n,r))}),n};rc.exports=cg});var oc=C((eS,ic)=>{var Ci=le(),hg=Ae(),sc=Fr(),fg=(t,e)=>{t=new hg(t,e);let r=new Ci("0.0.0");if(t.test(r)||(r=new Ci("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(u=>{let h=new Ci(u.semver.version);switch(u.operator){case">":h.prerelease.length===0?h.patch++:h.prerelease.push(0),h.raw=h.format();case"":case">=":(!a||sc(h,a))&&(a=h);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),a&&(!r||sc(r,a))&&(r=a)}return r&&t.test(r)?r:null};ic.exports=fg});var lc=C((tS,ac)=>{var dg=Ae(),pg=(t,e)=>{try{return new dg(t,e).range||"*"}catch{return null}};ac.exports=pg});var Jn=C((rS,fc)=>{var mg=le(),hc=zr(),{ANY:gg}=hc,bg=Ae(),yg=kr(),uc=Fr(),cc=Gn(),_g=Qn(),wg=Yn(),Sg=(t,e,r,n)=>{t=new mg(t,n),e=new bg(e,n);let i,a,u,h,f;switch(r){case">":i=uc,a=_g,u=cc,h=">",f=">=";break;case"<":i=cc,a=wg,u=uc,h="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(yg(t,e,n))return!1;for(let c=0;c<e.set.length;++c){let g=e.set[c],b=null,m=null;if(g.forEach(p=>{p.semver===gg&&(p=new hc(">=0.0.0")),b=b||p,m=m||p,i(p.semver,b.semver,n)?b=p:u(p.semver,m.semver,n)&&(m=p)}),b.operator===h||b.operator===f||(!m.operator||m.operator===h)&&a(t,m.semver))return!1;if(m.operator===f&&u(t,m.semver))return!1}return!0};fc.exports=Sg});var pc=C((nS,dc)=>{var Rg=Jn(),Eg=(t,e,r)=>Rg(t,e,">",r);dc.exports=Eg});var gc=C((sS,mc)=>{var Tg=Jn(),Ag=(t,e,r)=>Tg(t,e,"<",r);mc.exports=Ag});var _c=C((iS,yc)=>{var bc=Ae(),Cg=(t,e,r)=>(t=new bc(t,r),e=new bc(e,r),t.intersects(e));yc.exports=Cg});var Sc=C((oS,wc)=>{var vg=kr(),xg=Te();wc.exports=(t,e,r)=>{let n=[],i=null,a=null,u=t.sort((g,b)=>xg(g,b,r));for(let g of u)vg(g,e,r)?(a=g,i||(i=g)):(a&&n.push([i,a]),a=null,i=null);i&&n.push([i,null]);let h=[];for(let[g,b]of n)g===b?h.push(g):!b&&g===u[0]?h.push("*"):b?g===u[0]?h.push(`<=${b}`):h.push(`${g} - ${b}`):h.push(`>=${g}`);let f=h.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return f.length<c.length?f:e}});var Cc=C((aS,Ac)=>{var Rc=Ae(),es=zr(),{ANY:vi}=es,Wr=kr(),xi=Te(),Og=(t,e,r={})=>{if(t===e)return!0;t=new Rc(t,r),e=new Rc(e,r);let n=!1;e:for(let i of t.set){for(let a of e.set){let u=Ig(i,a,r);if(n=n||u!==null,u)continue e}if(n)return!1}return!0},Ig=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===vi){if(e.length===1&&e[0].semver===vi)return!0;r.includePrerelease?t=[new es(">=0.0.0-0")]:t=[new es(">=0.0.0")]}if(e.length===1&&e[0].semver===vi){if(r.includePrerelease)return!0;e=[new es(">=0.0.0")]}let n=new Set,i,a;for(let p of t)p.operator===">"||p.operator===">="?i=Ec(i,p,r):p.operator==="<"||p.operator==="<="?a=Tc(a,p,r):n.add(p.semver);if(n.size>1)return null;let u;if(i&&a){if(u=xi(i.semver,a.semver,r),u>0)return null;if(u===0&&(i.operator!==">="||a.operator!=="<="))return null}for(let p of n){if(i&&!Wr(p,String(i),r)||a&&!Wr(p,String(a),r))return null;for(let _ of e)if(!Wr(p,String(_),r))return!1;return!0}let h,f,c,g,b=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1,m=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;b&&b.prerelease.length===1&&a.operator==="<"&&b.prerelease[0]===0&&(b=!1);for(let p of e){if(g=g||p.operator===">"||p.operator===">=",c=c||p.operator==="<"||p.operator==="<=",i){if(m&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===m.major&&p.semver.minor===m.minor&&p.semver.patch===m.patch&&(m=!1),p.operator===">"||p.operator===">="){if(h=Ec(i,p,r),h===p&&h!==i)return!1}else if(i.operator===">="&&!Wr(i.semver,String(p),r))return!1}if(a){if(b&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===b.major&&p.semver.minor===b.minor&&p.semver.patch===b.patch&&(b=!1),p.operator==="<"||p.operator==="<="){if(f=Tc(a,p,r),f===p&&f!==a)return!1}else if(a.operator==="<="&&!Wr(a.semver,String(p),r))return!1}if(!p.operator&&(a||i)&&u!==0)return!1}return!(i&&c&&!a&&u!==0||a&&g&&!i&&u!==0||m||b)},Ec=(t,e,r)=>{if(!t)return e;let n=xi(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},Tc=(t,e,r)=>{if(!t)return e;let n=xi(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};Ac.exports=Og});var Oc=C((lS,xc)=>{var Oi=Et(),$g=Dr(),Lg=le(),vc=di(),Pg=Tt(),Ng=Ql(),Dg=Xl(),Hg=eu(),Bg=ou(),Fg=lu(),qg=cu(),Ug=fu(),zg=pu(),Mg=Te(),kg=gu(),Wg=yu(),jg=Vn(),Vg=Ru(),Gg=Tu(),Yg=Fr(),Qg=Gn(),Kg=jn(),Xg=mi(),Zg=Yn(),Jg=Qn(),eb=gi(),tb=Lu(),rb=zr(),nb=Ae(),sb=kr(),ib=Ju(),ob=tc(),ab=nc(),lb=oc(),ub=lc(),cb=Jn(),hb=pc(),fb=gc(),db=_c(),pb=Sc(),mb=Cc();xc.exports={parse:Pg,valid:Ng,clean:Dg,inc:Hg,diff:Bg,major:Fg,minor:qg,patch:Ug,prerelease:zg,compare:Mg,rcompare:kg,compareLoose:Wg,compareBuild:jg,sort:Vg,rsort:Gg,gt:Yg,lt:Qg,eq:Kg,neq:Xg,gte:Zg,lte:Jg,cmp:eb,coerce:tb,Comparator:rb,Range:nb,satisfies:sb,toComparators:ib,maxSatisfying:ob,minSatisfying:ab,minVersion:lb,validRange:ub,outside:cb,gtr:hb,ltr:fb,intersects:db,simplifyRange:pb,subset:mb,SemVer:Lg,re:Oi.re,src:Oi.src,tokens:Oi.t,SEMVER_SPEC_VERSION:$g.SEMVER_SPEC_VERSION,compareIdentifiers:vc.compareIdentifiers,rcompareIdentifiers:vc.rcompareIdentifiers}});var Nc=C((uS,Pc)=>{Pc.exports=function(t,e){e||(e={});var r=e.hsep===void 0?" ":e.hsep,n=e.align||[],i=e.stringLength||function(f){return String(f).length},a=$c(t,function(f,c){return Lc(c,function(g,b){var m=Ic(g);(!f[b]||m>f[b])&&(f[b]=m)}),f},[]),u=ts(t,function(f){return ts(f,function(c,g){var b=String(c);if(n[g]==="."){var m=Ic(b),p=a[g]+(/\./.test(b)?1:2)-(i(b)-m);return b+Array(p).join(" ")}else return b})}),h=$c(u,function(f,c){return Lc(c,function(g,b){var m=i(g);(!f[b]||m>f[b])&&(f[b]=m)}),f},[]);return ts(u,function(f){return ts(f,function(c,g){var b=h[g]-i(c)||0,m=Array(Math.max(b+1,1)).join(" ");return n[g]==="r"||n[g]==="."?m+c:n[g]==="c"?Array(Math.ceil(b/2+1)).join(" ")+c+Array(Math.floor(b/2+1)).join(" "):c+m}).join(r).replace(/\s+$/,"")}).join(`
20
+ `)};function Ic(t){var e=/\.[^.]*$/.exec(t);return e?e.index+1:t.length}function $c(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 Lc(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e.call(t,t[r],r)}function ts(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 qc=C((fS,Fc)=>{var jr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,gb=typeof AbortController=="function",rs=gb?AbortController:class{constructor(){this.signal=new Dc}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},bb=typeof AbortSignal=="function",yb=typeof rs.AbortSignal=="function",Dc=bb?AbortSignal:yb?rs.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(r=>r(e),this))}onabort(){}addEventListener(e,r){e==="abort"&&this._listeners.push(r)}removeEventListener(e,r){e==="abort"&&(this._listeners=this._listeners.filter(n=>n!==r))}},Pi=new Set,Ii=(t,e)=>{let r=`LRU_CACHE_OPTION_${t}`;ns(r)&&Ni(r,`${t} option`,`options.${e}`,er)},$i=(t,e)=>{let r=`LRU_CACHE_METHOD_${t}`;if(ns(r)){let{prototype:n}=er,{get:i}=Object.getOwnPropertyDescriptor(n,t);Ni(r,`${t} method`,`cache.${e}()`,i)}},_b=(t,e)=>{let r=`LRU_CACHE_PROPERTY_${t}`;if(ns(r)){let{prototype:n}=er,{get:i}=Object.getOwnPropertyDescriptor(n,t);Ni(r,`${t} property`,`cache.${e}`,i)}},Hc=(...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},ns=t=>!Pi.has(t),Ni=(t,e,r,n)=>{Pi.add(t);let i=`The ${e} is deprecated. Please use ${r} instead.`;Hc(i,"DeprecationWarning",t,n)},lt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Bc=t=>lt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Jt:null:null,Jt=class extends Array{constructor(e){super(e),this.fill(0)}},Li=class{constructor(e){if(e===0)return[];let r=Bc(e);this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},er=class t{constructor(e={}){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:u,updateAgeOnHas:h,allowStale:f,dispose:c,disposeAfter:g,noDisposeOnSet:b,noUpdateTTL:m,maxSize:p=0,maxEntrySize:_=0,sizeCalculation:E,fetchMethod:R,fetchContext:A,noDeleteOnFetchRejection:N,noDeleteOnStaleGet:L,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:$,ignoreFetchAbort:D}=e,{length:H,maxAge:V,stale:X}=e instanceof t?{}:e;if(r!==0&&!lt(r))throw new TypeError("max option must be a nonnegative integer");let J=r?Bc(r):Array;if(!J)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=p,this.maxEntrySize=_||this.maxSize,this.sizeCalculation=E||H,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=R||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=A,!this.fetchMethod&&A!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new J(r),this.prev=new J(r),this.head=0,this.tail=0,this.free=new Li(r),this.initialFill=1,this.size=0,typeof c=="function"&&(this.dispose=c),typeof g=="function"?(this.disposeAfter=g,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!b,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!N,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!$,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.maxSize!==0&&!lt(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!lt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!f||!!X,this.noDeleteOnStaleGet=!!L,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!h,this.ttlResolution=lt(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=n||V||0,this.ttl){if(!lt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let ae="LRU_CACHE_UNBOUNDED";ns(ae)&&(Pi.add(ae),Hc("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ae,t))}X&&Ii("stale","allowStale"),V&&Ii("maxAge","ttl"),H&&Ii("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Jt(this.max),this.starts=new Jt(this.max),this.setItemTTL=(n,i,a=jr.now())=>{if(this.starts[n]=i!==0?a:0,this.ttls[n]=i,i!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.isStale(n)&&this.delete(this.keyList[n])},i+1);u.unref&&u.unref()}},this.updateItemAge=n=>{this.starts[n]=this.ttls[n]!==0?jr.now():0},this.statusTTL=(n,i)=>{n&&(n.ttl=this.ttls[i],n.start=this.starts[i],n.now=e||r(),n.remainingTTL=n.now+n.ttl-n.start)};let e=0,r=()=>{let n=jr.now();if(this.ttlResolution>0){e=n;let i=setTimeout(()=>e=0,this.ttlResolution);i.unref&&i.unref()}return n};this.getRemainingTTL=n=>{let i=this.keyMap.get(n);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(e||r())},this.isStale=n=>this.ttls[n]!==0&&this.starts[n]!==0&&(e||r())-this.starts[n]>this.ttls[n]}updateItemAge(e){}statusTTL(e,r){}setItemTTL(e,r,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Jt(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,r,n,i)=>{if(this.isBackgroundFetch(r))return 0;if(!lt(n))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(n=i(r,e),!lt(n))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 n},this.addItemSize=(e,r,n)=>{if(this.sizes[e]=r,this.maxSize){let i=this.maxSize-this.sizes[e];for(;this.calculatedSize>i;)this.evict(!0)}this.calculatedSize+=this.sizes[e],n&&(n.entrySize=r,n.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,r){}requireSize(e,r,n,i){if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,r){for(let n of this.indexes()){let i=this.valList[n],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(a!==void 0&&e(a,this.keyList[n],this))return this.get(this.keyList[n],r)}}forEach(e,r=this){for(let n of this.indexes()){let i=this.valList[n],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;a!==void 0&&e.call(r,a,this.keyList[n],this)}}rforEach(e,r=this){for(let n of this.rindexes()){let i=this.valList[n],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;a!==void 0&&e.call(r,a,this.keyList[n],this)}}get prune(){return $i("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),e=!0);return e}dump(){let e=[];for(let r of this.indexes({allowStale:!0})){let n=this.keyList[r],i=this.valList[r],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(a===void 0)continue;let u={value:a};if(this.ttls){u.ttl=this.ttls[r];let h=jr.now()-this.starts[r];u.start=Math.floor(Date.now()-h)}this.sizes&&(u.size=this.sizes[r]),e.unshift([n,u])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let i=Date.now()-n.start;n.start=jr.now()-i}this.set(r,n.value,n)}}dispose(e,r,n){}set(e,r,{ttl:n=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,status:c}={}){if(u=this.requireSize(e,r,u,h),this.maxEntrySize&&u>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.delete(e),this;let g=this.size===0?void 0:this.keyMap.get(e);if(g===void 0)g=this.newIndex(),this.keyList[g]=e,this.valList[g]=r,this.keyMap.set(e,g),this.next[this.tail]=g,this.prev[g]=this.tail,this.tail=g,this.size++,this.addItemSize(g,u,c),c&&(c.set="add"),f=!1;else{this.moveToTail(g);let b=this.valList[g];if(r!==b){if(this.isBackgroundFetch(b)?b.__abortController.abort(new Error("replaced")):a||(this.dispose(b,e,"set"),this.disposeAfter&&this.disposed.push([b,e,"set"])),this.removeItemSize(g),this.valList[g]=r,this.addItemSize(g,u,c),c){c.set="replace";let m=b&&this.isBackgroundFetch(b)?b.__staleWhileFetching:b;m!==void 0&&(c.oldValue=m)}}else c&&(c.set="update")}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),f||this.setItemTTL(g,n,i),this.statusTTL(c,g),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let r=this.head,n=this.keyList[r],i=this.valList[r];return this.isBackgroundFetch(i)?i.__abortController.abort(new Error("evicted")):(this.dispose(i,n,"evict"),this.disposeAfter&&this.disposed.push([i,n,"evict"])),this.removeItemSize(r),e&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(n),this.size--,r}has(e,{updateAgeOnHas:r=this.updateAgeOnHas,status:n}={}){let i=this.keyMap.get(e);if(i!==void 0)if(this.isStale(i))n&&(n.has="stale",this.statusTTL(n,i));else return r&&this.updateItemAge(i),n&&(n.has="hit"),this.statusTTL(n,i),!0;else n&&(n.has="miss");return!1}peek(e,{allowStale:r=this.allowStale}={}){let n=this.keyMap.get(e);if(n!==void 0&&(r||!this.isStale(n))){let i=this.valList[n];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(e,r,n,i){let a=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(a))return a;let u=new rs;n.signal&&n.signal.addEventListener("abort",()=>u.abort(n.signal.reason));let h={signal:u.signal,options:n,context:i},f=(p,_=!1)=>{let{aborted:E}=u.signal,R=n.ignoreFetchAbort&&p!==void 0;return n.status&&(E&&!_?(n.status.fetchAborted=!0,n.status.fetchError=u.signal.reason,R&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),E&&!R&&!_?g(u.signal.reason):(this.valList[r]===m&&(p===void 0?m.__staleWhileFetching?this.valList[r]=m.__staleWhileFetching:this.delete(e):(n.status&&(n.status.fetchUpdated=!0),this.set(e,p,h.options))),p)},c=p=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=p),g(p)),g=p=>{let{aborted:_}=u.signal,E=_&&n.allowStaleOnFetchAbort,R=E||n.allowStaleOnFetchRejection,A=R||n.noDeleteOnFetchRejection;if(this.valList[r]===m&&(!A||m.__staleWhileFetching===void 0?this.delete(e):E||(this.valList[r]=m.__staleWhileFetching)),R)return n.status&&m.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),m.__staleWhileFetching;if(m.__returned===m)throw p},b=(p,_)=>{this.fetchMethod(e,a,h).then(E=>p(E),_),u.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(p(),n.allowStaleOnFetchAbort&&(p=E=>f(E,!0)))})};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(b).then(f,c);return m.__abortController=u,m.__staleWhileFetching=a,m.__returned=null,r===void 0?(this.set(e,m,{...h.options,status:void 0}),r=this.keyMap.get(e)):this.valList[r]=m,m}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:b=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,fetchContext:_=this.fetchContext,forceRefresh:E=!1,status:R,signal:A}={}){if(!this.fetchMethod)return R&&(R.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,status:R});let N={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:u,size:h,sizeCalculation:f,noUpdateTTL:c,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:p,ignoreFetchAbort:m,status:R,signal:A},L=this.keyMap.get(e);if(L===void 0){R&&(R.fetch="miss");let T=this.backgroundFetch(e,L,N,_);return T.__returned=T}else{let T=this.valList[L];if(this.isBackgroundFetch(T)){let X=r&&T.__staleWhileFetching!==void 0;return R&&(R.fetch="inflight",X&&(R.returnedStale=!0)),X?T.__staleWhileFetching:T.__returned=T}let $=this.isStale(L);if(!E&&!$)return R&&(R.fetch="hit"),this.moveToTail(L),n&&this.updateItemAge(L),this.statusTTL(R,L),T;let D=this.backgroundFetch(e,L,N,_),H=D.__staleWhileFetching!==void 0,V=H&&r;return R&&(R.fetch=H&&$?"stale":"refresh",V&&$&&(R.returnedStale=!0)),V?D.__staleWhileFetching:D.__returned=D}}get(e,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}={}){let u=this.keyMap.get(e);if(u!==void 0){let h=this.valList[u],f=this.isBackgroundFetch(h);return this.statusTTL(a,u),this.isStale(u)?(a&&(a.get="stale"),f?(a&&(a.returnedStale=r&&h.__staleWhileFetching!==void 0),r?h.__staleWhileFetching:void 0):(i||this.delete(e),a&&(a.returnedStale=r),r?h:void 0)):(a&&(a.get="hit"),f?h.__staleWhileFetching:(this.moveToTail(u),n&&this.updateItemAge(u),h))}else a&&(a.get="miss")}connect(e,r){this.prev[r]=e,this.next[e]=r}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return $i("del","delete"),this.delete}delete(e){let r=!1;if(this.size!==0){let n=this.keyMap.get(e);if(n!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(n);let i=this.valList[n];this.isBackgroundFetch(i)?i.__abortController.abort(new Error("deleted")):(this.dispose(i,e,"delete"),this.disposeAfter&&this.disposed.push([i,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(let e of this.rindexes({allowStale:!0})){let r=this.valList[e];if(this.isBackgroundFetch(r))r.__abortController.abort(new Error("deleted"));else{let n=this.keyList[e];this.dispose(r,n,"delete"),this.disposeAfter&&this.disposed.push([r,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return $i("reset","clear"),this.clear}get length(){return _b("length","size"),this.size}static get AbortController(){return rs}static get AbortSignal(){return Dc}};Fc.exports=er});var Mc=C((dS,zc)=>{"use strict";var j=(...t)=>t.every(e=>e)?t.join(""):"",re=t=>t?encodeURIComponent(t):"",Uc=t=>t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),wb={sshtemplate:({domain:t,user:e,project:r,committish:n})=>`git@${t}:${e}/${r}.git${j("#",n)}`,sshurltemplate:({domain:t,user:e,project:r,committish:n})=>`git+ssh://git@${t}/${e}/${r}.git${j("#",n)}`,edittemplate:({domain:t,user:e,project:r,committish:n,editpath:i,path:a})=>`https://${t}/${e}/${r}${j("/",i,"/",re(n||"HEAD"),"/",a)}`,browsetemplate:({domain:t,user:e,project:r,committish:n,treepath:i})=>`https://${t}/${e}/${r}${j("/",i,"/",re(n))}`,browsetreetemplate:({domain:t,user:e,project:r,committish:n,treepath:i,path:a,fragment:u,hashformat:h})=>`https://${t}/${e}/${r}/${i}/${re(n||"HEAD")}/${a}${j("#",h(u||""))}`,browseblobtemplate:({domain:t,user:e,project:r,committish:n,blobpath:i,path:a,fragment:u,hashformat:h})=>`https://${t}/${e}/${r}/${i}/${re(n||"HEAD")}/${a}${j("#",h(u||""))}`,docstemplate:({domain:t,user:e,project:r,treepath:n,committish:i})=>`https://${t}/${e}/${r}${j("/",n,"/",re(i))}#readme`,httpstemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git+https://${j(t,"@")}${e}/${r}/${n}.git${j("#",i)}`,filetemplate:({domain:t,user:e,project:r,committish:n,path:i})=>`https://${t}/${e}/${r}/raw/${re(n||"HEAD")}/${i}`,shortcuttemplate:({type:t,user:e,project:r,committish:n})=>`${t}:${e}/${r}${j("#",n)}`,pathtemplate:({user:t,project:e,committish:r})=>`${t}/${e}${j("#",r)}`,bugstemplate:({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,hashformat:Uc},ut={};ut.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://${j(t,"@")}raw.githubusercontent.com/${e}/${r}/${re(n||"HEAD")}/${i}`,gittemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git://${j(t,"@")}${e}/${r}/${n}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://codeload.${t}/${e}/${r}/tar.gz/${re(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}}};ut.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:u})=>`https://${t}/${e}/${r}${j("/",i,"/",re(n||"HEAD"),"/",a,u)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/get/${re(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)}}};ut.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://${j(t,"@")}${e}/${r}/${n}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${re(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)}}};ut.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:n,editpath:i})=>`https://${t}/${e}/${r}${j("/",re(n))}/${i}`,browsetemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",re(r))}`,browsetreetemplate:({domain:t,project:e,committish:r,path:n,hashformat:i})=>`https://${t}/${e}${j("/",re(r))}${j("#",i(n))}`,browseblobtemplate:({domain:t,project:e,committish:r,path:n,hashformat:i})=>`https://${t}/${e}${j("/",re(r))}${j("#",i(n))}`,docstemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",re(r))}`,httpstemplate:({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${j("#",r)}`,filetemplate:({user:t,project:e,committish:r,path:n})=>`https://gist.githubusercontent.com/${t}/${e}/raw${j("/",re(r))}/${n}`,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/${re(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-"+Uc(t)}};ut.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/${re(n)||"HEAD"}/${i}`,httpstemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}.git${j("#",n)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/archive/${re(n)||"HEAD"}.tar.gz`,bugstemplate:({user:t,project:e})=>`https://todo.sr.ht/${t}/${e}`,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(ut))ut[t]=Object.assign({},wb,e);zc.exports=ut});var Hi=C((pS,Wc)=>{var Sb=ye("url"),Di=(t,e,r)=>{let n=t.indexOf(r);return t.lastIndexOf(e,n>-1?n:1/0)},kc=t=>{try{return new Sb.URL(t)}catch{}},Rb=(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)}`},Eb=t=>{let e=Di(t,"@","#"),r=Di(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),Di(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t};Wc.exports=(t,e)=>{let r=e?Rb(t,e):t;return kc(r)||kc(Eb(r))}});var Vc=C((mS,jc)=>{"use strict";var Tb=Hi(),Ab=t=>{let e=t.indexOf("#"),r=t.indexOf("/"),n=t.indexOf("/",r+1),i=t.indexOf(":"),a=/\s/.exec(t),u=t.indexOf("@"),h=!a||e>-1&&a.index>e,f=u===-1||e>-1&&u>e,c=i===-1||e>-1&&i>e,g=n===-1||e>-1&&n>e,b=r>0,m=e>-1?t[e-1]!=="/":!t.endsWith("/"),p=!t.startsWith(".");return h&&b&&m&&p&&f&&c&&g};jc.exports=(t,e,{gitHosts:r,protocols:n})=>{var E,R;if(!t)return;let i=Ab(t)?`github:${t}`:t,a=Tb(i,n);if(!a)return;let u=r.byShortcut[a.protocol],h=r.byDomain[a.hostname.startsWith("www.")?a.hostname.slice(4):a.hostname],f=u||h;if(!f)return;let c=r[u||h],g=null;(E=n[a.protocol])!=null&&E.auth&&(a.username||a.password)&&(g=`${a.username}${a.password?":"+a.password:""}`);let b=null,m=null,p=null,_=null;try{if(u){let A=a.pathname.startsWith("/")?a.pathname.slice(1):a.pathname,N=A.indexOf("@");N>-1&&(A=A.slice(N+1));let L=A.lastIndexOf("/");L>-1?(m=decodeURIComponent(A.slice(0,L)),m||(m=null),p=decodeURIComponent(A.slice(L+1))):p=decodeURIComponent(A),p.endsWith(".git")&&(p=p.slice(0,-4)),a.hash&&(b=decodeURIComponent(a.hash.slice(1))),_="shortcut"}else{if(!c.protocols.includes(a.protocol))return;let A=c.extract(a);if(!A)return;m=A.user&&decodeURIComponent(A.user),p=decodeURIComponent(A.project),b=decodeURIComponent(A.committish),_=((R=n[a.protocol])==null?void 0:R.name)||a.protocol.slice(0,-1)}}catch(A){if(A instanceof URIError)return;throw A}return[f,m,g,p,b,_,e]}});var Yc=C((gS,Gc)=>{"use strict";var Cb=qc(),vb=Mc(),xb=Vc(),Ob=Hi(),Bi=new Cb({max:1e3}),ss=class t{constructor(e,r,n,i,a,u,h={}){Object.assign(this,t.#e[e],{type:e,user:r,auth:n,project:i,committish:a,default:u,opts:h})}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(!Bi.has(n)){let i=xb(e,r,{gitHosts:t.#e,protocols:t.#r});Bi.set(n,i?new t(...i):void 0)}return Bi.get(n)}static parseUrl(e){return Ob(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(vb))ss.addHost(t,e);Gc.exports=ss});var th=C((ES,eh)=>{"use strict";var xt=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)}},ls=class{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},Vr=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 ls(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 xt("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 ls(e)}callNow(e,r){return this.call(e,r),this.runOne()}return(e){if(this.stack.length===0)throw this.error(new xt("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 xt("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 xt("Must declare a parseStart method")}};Vr.END=1114112;Vr.Error=xt;eh.exports=Vr});var nh=C((TS,rh)=>{"use strict";rh.exports=t=>{let e=new Date(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var us=C((AS,sh)=>{"use strict";sh.exports=(t,e)=>{for(e=String(e);e.length<t;)e="0"+e;return e}});var oh=C((CS,ih)=>{"use strict";var rr=us(),zi=class extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){let e=`${this.getUTCFullYear()}-${rr(2,this.getUTCMonth()+1)}-${rr(2,this.getUTCDate())}`,r=`${rr(2,this.getUTCHours())}:${rr(2,this.getUTCMinutes())}:${rr(2,this.getUTCSeconds())}.${rr(3,this.getUTCMilliseconds())}`;return`${e}T${r}`}};ih.exports=t=>{let e=new zi(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var uh=C((vS,lh)=>{"use strict";var ah=us(),Bb=global.Date,Mi=class extends Bb{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${ah(2,this.getUTCMonth()+1)}-${ah(2,this.getUTCDate())}`}};lh.exports=t=>{let e=new Mi(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var hh=C((xS,ch)=>{"use strict";var cs=us(),ki=class extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${cs(2,this.getUTCHours())}:${cs(2,this.getUTCMinutes())}:${cs(2,this.getUTCSeconds())}.${cs(3,this.getUTCMilliseconds())}`}};ch.exports=t=>{let e=new ki(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var fh=C((exports,module)=>{"use strict";module.exports=makeParserClass(th());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=nh(),createDateTimeFloat=oh(),createDate=uh(),createTime=hh(),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 u of n.key){if(hasKey(i,u)&&(!isTable(i[u])||i[u][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[u]=i[u]||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 u of n.key){if(hasKey(i,u)&&(!isTable(i[u])||i[u][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[u]=i[u]||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 ph=C((OS,dh)=>{"use strict";dh.exports=Fb;function Fb(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
22
  `,e&&e.split){let n=e.split(/\n/),i=String(Math.min(n.length,t.line+3)).length,a=" ";for(;a.length<i;)a+=" ";for(let u=Math.max(0,t.line-1);u<Math.min(n.length,t.line+2);++u){let h=String(u+1);if(h.length<i&&(h=" "+h),t.line===u){r+=h+"> "+n[u]+`
23
23
  `,r+=a+" ";for(let f=0;f<t.col;++f)r+=" ";r+=`^
24
24
  `}else r+=h+": "+n[u]+`
25
25
  `}}return t.message=r+`
26
- `,t}});var gh=C((OS,mh)=>{"use strict";mh.exports=zb;var qb=fh(),Ub=ph();function zb(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new qb;try{return e.parse(t),e.finish()}catch(r){throw Ub(r,t)}}});function ks({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 Ys=Se(fa(),1);var da=Ys.default.HttpProxyAgent,pa=Ys.default.HttpsProxyAgent;var Cr=class extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if(typeof this.onEviction=="function")for(let[r,n]of e)this.onEviction(r,n.value)}_deleteIfExpired(e,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(e,r.value),this.delete(e)):!1}_getOrDeleteIfExpired(e,r){if(this._deleteIfExpired(e,r)===!1)return r.value}_getItemValue(e,r){return r.expiry?this._getOrDeleteIfExpired(e,r):r.value}_peek(e,r){let n=r.get(e);return this._getItemValue(e,n)}_set(e,r){this.cache.set(e,r),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,r){this.oldCache.delete(e),this._set(e,r)}*_entriesAscending(){for(let e of this.oldCache){let[r,n]=e;this.cache.has(r)||this._deleteIfExpired(r,n)===!1&&(yield e)}for(let e of this.cache){let[r,n]=e;this._deleteIfExpired(r,n)===!1&&(yield e)}}get(e){if(this.cache.has(e)){let r=this.cache.get(e);return this._getItemValue(e,r)}if(this.oldCache.has(e)){let r=this.oldCache.get(e);if(this._deleteIfExpired(e,r)===!1)return this._moveToRecent(e,r),r.value}}set(e,r,{maxAge:n=this.maxAge}={}){let i=typeof n=="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(e)?this.cache.set(e,{value:r,expiry:i}):this._set(e,{value:r,expiry:i})}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):this.oldCache.has(e)?!this._deleteIfExpired(e,this.oldCache.get(e)):!1}peek(e){if(this.cache.has(e))return this._peek(e,this.cache);if(this.oldCache.has(e))return this._peek(e,this.oldCache)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let r=[...this._entriesAscending()],n=r.length-e;n<0?(this.cache=new Map(r),this.oldCache=new Map,this._size=r.length):(n>0&&this._emitEvictions(r.slice(0,n)),this.oldCache=new Map(r.slice(n)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache){let[r,n]=e;this._deleteIfExpired(r,n)===!1&&(yield[r,n.value])}for(let e of this.oldCache){let[r,n]=e;this.cache.has(r)||this._deleteIfExpired(r,n)===!1&&(yield[r,n.value])}}*entriesDescending(){let e=[...this.cache];for(let r=e.length-1;r>=0;--r){let n=e[r],[i,a]=n;this._deleteIfExpired(i,a)===!1&&(yield[i,a.value])}e=[...this.oldCache];for(let r=e.length-1;r>=0;--r){let n=e[r],[i,a]=n;this.cache.has(i)||this._deleteIfExpired(i,a)===!1&&(yield[i,a.value])}}*entriesAscending(){for(let[e,r]of this._entriesAscending())yield[e,r.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}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 ya=Se(ga(),1);import{Agent as vd}from"node:http";import{Agent as xd}from"node:https";var Od={agentCacheSize:512},ba={maxSockets:64,keepAlive:!1},Qs=class t extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,t)}};function Ks(t,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let r={...Od,...e},n=new Cr({maxSize:r.agentCacheSize});async function i(u,h={}){let{origin:f,protocol:c}=new URL(u),g=h!=null&&h.noProxy?null:(0,ya.getProxyForUrl)(u),b=JSON.stringify({proxyUrl:g,origin:f,...h});if(n.has(b))return n.get(b);let m;if("noProxy"in h&&delete h.noProxy,e.undici){let{ProxyAgent:p,Agent:_}=await import("undici"),E={...h};"keepAlive"in E&&!("pipelining"in E)&&(E.pipelining=E.keepAlive?1:0),"keepAlive"in E&&delete E.keepAlive,"maxSockets"in E&&(E.connections=E.maxSockets,delete E.maxSockets),g?m=new p({...E,uri:g}):m=new _(E)}else{let p=c==="https:";g?m=new(p?pa:da)({...h,proxy:g}):m=new(p?xd:vd)(h)}return n.set(b,m),m}let a=(u,{timeout:h=0,agentOpts:f={},...c}={})=>new Promise(async(g,b)=>{var _;if(!e.undici&&!("agent"in c)){let E=await i(u,{...ba,...f});E&&(c.agent=E)}else if(e.undici&&!("dispatcher"in c)){let E=await i(u,{...ba,...f});E&&(c.dispatcher=E)}let m,p;h&&(!("signal"in c)&&globalThis.AbortController&&(p=new AbortController,c.signal=p.signal),m=setTimeout(()=>{var R;(R=p==null?void 0:p.abort)==null||R.call(p);let E=new Qs(`${c.method||"GET"} ${u} timed out after ${h}ms`);b(E)},h),(_=m==null?void 0:m.unref)==null||_.call(m)),t(u,c).then(E=>{m&&clearTimeout(m),g(E)}).catch(E=>{if(m&&clearTimeout(m),E.name==="AbortError")return g(null);b(E)})});return a.clearCache=()=>{for(let u of n.values())"destroy"in u&&u.destroy();n.clear()},a}var Lh=Se(Xs(),1);import np from"node:http";import sp from"node:https";import jt from"node:zlib";import tl,{PassThrough as rl,pipeline as Vt}from"node:stream";import{Buffer as Fn}from"node:buffer";function $d(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",u=a;for(let g=1;g<r.length;g++)r[g]==="base64"?i=!0:r[g]&&(u+=`;${r[g]}`,r[g].indexOf("charset=")===0&&(n=r[g].substring(8)));!r[0]&&!n.length&&(u+=";charset=US-ASCII",n="US-ASCII");let h=i?"base64":"ascii",f=unescape(t.substring(e+1)),c=Buffer.from(f,h);return c.type=a,c.typeFull=u,c.charset=n,c}var Ra=$d;vr();On();import ot,{PassThrough as za}from"node:stream";import{types as Ma,deprecate as oi,promisify as Yd}from"node:util";import{Buffer as Re}from"node:buffer";var Ge=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 pe=class extends Ge{constructor(e,r,n){super(e,r),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}};var In=Symbol.toStringTag,ri=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[In]==="URLSearchParams",Or=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[In]),$a=t=>typeof t=="object"&&(t[In]==="AbortSignal"||t[In]==="EventTarget"),La=(t,e)=>{let r=new URL(e).hostname,n=new URL(t).hostname;return r===n||r.endsWith(`.${n}`)},Pa=(t,e)=>{let r=new URL(e).protocol,n=new URL(t).protocol;return r===n};var Qd=Yd(ot.pipeline),me=Symbol("Body internals"),Ue=class{constructor(e,{size:r=0}={}){let n=null;e===null?e=null:ri(e)?e=Re.from(e.toString()):Or(e)||Re.isBuffer(e)||(Ma.isAnyArrayBuffer(e)?e=Re.from(e):ArrayBuffer.isView(e)?e=Re.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ot||(e instanceof _t?(e=Ia(e),n=e.type.split("=")[1]):e=Re.from(String(e))));let i=e;Re.isBuffer(e)?i=ot.Readable.from(e):Or(e)&&(i=ot.Readable.from(e.stream())),this[me]={body:e,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,e instanceof ot&&e.on("error",a=>{let u=a instanceof Ge?a:new pe(`Invalid response body while trying to fetch ${this.url}: ${a.message}`,"system",a);this[me].error=u})}get body(){return this[me].stream}get bodyUsed(){return this[me].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:n}=await ii(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 _t,i=new URLSearchParams(await this.text());for(let[a,u]of i)n.append(a,u);return n}let{toFormData:r}=await Promise.resolve().then(()=>(Ua(),qa));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[me].body&&this[me].body.type||"",r=await this.arrayBuffer();return new Ve([r],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await ii(this);return new TextDecoder().decode(e)}buffer(){return ii(this)}};Ue.prototype.buffer=oi(Ue.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Ue.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:oi(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function ii(t){if(t[me].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[me].disturbed=!0,t[me].error)throw t[me].error;let{body:e}=t;if(e===null)return Re.alloc(0);if(!(e instanceof ot))return Re.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 pe(`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 Ge?i:new pe(`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")?Re.from(r.join("")):Re.concat(r,n)}catch(i){throw new pe(`Could not create Buffer from response body for ${t.url}: ${i.message}`,"system",i)}else throw new pe(`Premature close of server response while trying to fetch ${t.url}`)}var kt=(t,e)=>{let r,n,{body:i}=t[me];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof ot&&typeof i.getBoundary!="function"&&(r=new za({highWaterMark:e}),n=new za({highWaterMark:e}),i.pipe(r),i.pipe(n),t[me].stream=r,i=n),i},Kd=oi(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"),Pn=(t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":ri(t)?"application/x-www-form-urlencoded;charset=UTF-8":Or(t)?t.type||null:Re.isBuffer(t)||Ma.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof _t?`multipart/form-data; boundary=${e[me].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${Kd(t)}`:t instanceof ot?null:"text/plain;charset=UTF-8",ka=t=>{let{body:e}=t[me];return e===null?0:Or(e)?e.size:Re.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},Wa=async(t,{body:e})=>{e===null?t.end():await Qd(e,t)};import{types as ja}from"node:util";import Dn from"node:http";var Nn=typeof Dn.validateHeaderName=="function"?Dn.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}},ai=typeof Dn.validateHeaderValue=="function"?Dn.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}},_e=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(u=>[i,u]))}else if(e!=null)if(typeof e=="object"&&!ja.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"||ja.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])=>(Nn(n),ai(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(u,h)=>(Nn(u),ai(u,String(h)),URLSearchParams.prototype[i].call(n,String(u).toLowerCase(),String(h)));case"delete":case"has":case"getAll":return u=>(Nn(u),URLSearchParams.prototype[i].call(n,String(u).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(_e.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));function Va(t=[]){return new _e(t.reduce((e,r,n,i)=>(n%2===0&&e.push(i.slice(n,n+2)),e),[]).filter(([e,r])=>{try{return Nn(e),ai(e,String(r)),!0}catch{return!1}}))}var Xd=new Set([301,302,303,307,308]),Hn=t=>Xd.has(t);var Ne=Symbol("Response internals"),Ee=class t extends Ue{constructor(e=null,r={}){super(e,r);let n=r.status!=null?r.status:200,i=new _e(r.headers);if(e!==null&&!i.has("Content-Type")){let a=Pn(e,this);a&&i.append("Content-Type",a)}this[Ne]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[Ne].type}get url(){return this[Ne].url||""}get status(){return this[Ne].status}get ok(){return this[Ne].status>=200&&this[Ne].status<300}get redirected(){return this[Ne].counter>0}get statusText(){return this[Ne].statusText}get headers(){return this[Ne].headers}get highWaterMark(){return this[Ne].highWaterMark}clone(){return new t(kt(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(!Hn(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[Ne].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 _e(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(Ee.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 ep}from"node:url";import{deprecate as tp}from"node:util";var Ga=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 Zd}from"node:net";function Ya(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 Qa=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Ka="strict-origin-when-cross-origin";function Xa(t){if(!Qa.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function Jd(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=Zd(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 Wt(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:Jd(t)}function Za(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=Ya(i),u=Ya(i,!0);a.toString().length>4096&&(a=u),e&&(a=e(a)),r&&(u=r(u));let h=new URL(t.url);switch(n){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return a;case"strict-origin":return Wt(a)&&!Wt(h)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return a.origin===h.origin?a:Wt(a)&&!Wt(h)?"no-referrer":u;case"same-origin":return a.origin===h.origin?a:"no-referrer";case"origin-when-cross-origin":return a.origin===h.origin?a:u;case"no-referrer-when-downgrade":return Wt(a)&&!Wt(h)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function Ja(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of e)n&&Qa.has(n)&&(r=n);return r}var se=Symbol("Request internals"),$r=t=>typeof t=="object"&&typeof t[se]=="object",rp=tp(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),St=class t extends Ue{constructor(e,r={}){let n;if($r(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()),!$r(r)&&"data"in r&&rp(),(r.body!=null||$r(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:$r(e)&&e.body!==null?kt(e):null;super(a,{size:r.size||e.size||0});let u=new _e(r.headers||e.headers||{});if(a!==null&&!u.has("Content-Type")){let c=Pn(a,this);c&&u.set("Content-Type",c)}let h=$r(e)?e.signal:null;if("signal"in r&&(h=r.signal),h!=null&&!$a(h))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let f=r.referrer==null?e.referrer:r.referrer;if(f==="")f="no-referrer";else if(f){let c=new URL(f);f=/^about:(\/\/)?client$/.test(c)?"client":c}else f=void 0;this[se]={method:i,redirect:r.redirect||e.redirect||"follow",headers:u,parsedURL:n,signal:h,referrer:f},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[se].method}get url(){return ep(this[se].parsedURL)}get headers(){return this[se].headers}get redirect(){return this[se].redirect}get signal(){return this[se].signal}get referrer(){if(this[se].referrer==="no-referrer")return"";if(this[se].referrer==="client")return"about:client";if(this[se].referrer)return this[se].referrer.toString()}get referrerPolicy(){return this[se].referrerPolicy}set referrerPolicy(e){this[se].referrerPolicy=Xa(e)}clone(){return new t(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(St.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[se],r=new _e(t[se].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 h=ka(t);typeof h=="number"&&!Number.isNaN(h)&&(n=String(h))}n&&r.set("Content-Length",n),t.referrerPolicy===""&&(t.referrerPolicy=Ka),t.referrer&&t.referrer!=="no-referrer"?t[se].referrer=Za(t):t[se].referrer="no-referrer",t[se].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)),!r.has("Connection")&&!i&&r.set("Connection","close");let a=Ga(e),u={path:e.pathname+a,method:t.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:i};return{parsedURL:e,options:u}};var Bn=class extends Ge{constructor(e,r="aborted"){super(e,r)}};On();ni();var ip=new Set(["data:","http:","https:"]);async function qn(t,e){return new Promise((r,n)=>{let i=new St(t,e),{parsedURL:a,options:u}=el(i);if(!ip.has(a.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${a.protocol.replace(/:$/,"")}" is not supported.`);if(a.protocol==="data:"){let _=Ra(i.url),E=new Ee(_,{headers:{"Content-Type":_.typeFull}});r(E);return}let h=(a.protocol==="https:"?sp:np).request,{signal:f}=i,c=null,g=()=>{let _=new Bn("The operation was aborted.");n(_),i.body&&i.body instanceof tl.Readable&&i.body.destroy(_),!(!c||!c.body)&&c.body.emit("error",_)};if(f&&f.aborted){g();return}let b=()=>{g(),p()},m=h(a.toString(),u);f&&f.addEventListener("abort",b);let p=()=>{m.abort(),f&&f.removeEventListener("abort",b)};m.on("error",_=>{n(new pe(`request to ${i.url} failed, reason: ${_.message}`,"system",_)),p()}),op(m,_=>{c&&c.body&&c.body.destroy(_)}),process.version<"v14"&&m.on("socket",_=>{let E;_.prependListener("end",()=>{E=_._eventsCount}),_.prependListener("close",R=>{if(c&&E<_._eventsCount&&!R){let A=new Error("Premature close");A.code="ERR_STREAM_PREMATURE_CLOSE",c.body.emit("error",A)}})}),m.on("response",_=>{m.setTimeout(0);let E=Va(_.rawHeaders);if(Hn(_.statusCode)){let T=E.get("Location"),$=null;try{$=T===null?null:new URL(T,i.url)}catch{if(i.redirect!=="manual"){n(new pe(`uri requested responds with an invalid redirect URL: ${T}`,"invalid-redirect")),p();return}}switch(i.redirect){case"error":n(new pe(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),p();return;case"manual":break;case"follow":{if($===null)break;if(i.counter>=i.follow){n(new pe(`maximum redirect reached at: ${i.url}`,"max-redirect")),p();return}let D={headers:new _e(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:kt(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!La(i.url,$)||!Pa(i.url,$))for(let V of["authorization","www-authenticate","cookie","cookie2"])D.headers.delete(V);if(_.statusCode!==303&&i.body&&e.body instanceof tl.Readable){n(new pe("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(_.statusCode===303||(_.statusCode===301||_.statusCode===302)&&i.method==="POST")&&(D.method="GET",D.body=void 0,D.headers.delete("content-length"));let H=Ja(E);H&&(D.referrerPolicy=H),r(qn(new St($,D))),p();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}f&&_.once("end",()=>{f.removeEventListener("abort",b)});let R=Vt(_,new rl,T=>{T&&n(T)});process.version<"v12.10"&&_.on("aborted",b);let A={url:i.url,status:_.statusCode,statusText:_.statusMessage,headers:E,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},N=E.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||N===null||_.statusCode===204||_.statusCode===304){c=new Ee(R,A),r(c);return}let L={flush:jt.Z_SYNC_FLUSH,finishFlush:jt.Z_SYNC_FLUSH};if(N==="gzip"||N==="x-gzip"){R=Vt(R,jt.createGunzip(L),T=>{T&&n(T)}),c=new Ee(R,A),r(c);return}if(N==="deflate"||N==="x-deflate"){let T=Vt(_,new rl,$=>{$&&n($)});T.once("data",$=>{($[0]&15)===8?R=Vt(R,jt.createInflate(),D=>{D&&n(D)}):R=Vt(R,jt.createInflateRaw(),D=>{D&&n(D)}),c=new Ee(R,A),r(c)}),T.once("end",()=>{c||(c=new Ee(R,A),r(c))});return}if(N==="br"){R=Vt(R,jt.createBrotliDecompress(),T=>{T&&n(T)}),c=new Ee(R,A),r(c);return}c=new Ee(R,A),r(c)}),Wa(m,i).catch(n)})}function op(t,e){let r=Fn.from(`0\r
26
+ `,t}});var gh=C((IS,mh)=>{"use strict";mh.exports=zb;var qb=fh(),Ub=ph();function zb(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new qb;try{return e.parse(t),e.finish()}catch(r){throw Ub(r,t)}}});function ks({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 Ys=Se(fa(),1);var da=Ys.default.HttpProxyAgent,pa=Ys.default.HttpsProxyAgent;var Cr=class extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if(typeof this.onEviction=="function")for(let[r,n]of e)this.onEviction(r,n.value)}_deleteIfExpired(e,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(e,r.value),this.delete(e)):!1}_getOrDeleteIfExpired(e,r){if(this._deleteIfExpired(e,r)===!1)return r.value}_getItemValue(e,r){return r.expiry?this._getOrDeleteIfExpired(e,r):r.value}_peek(e,r){let n=r.get(e);return this._getItemValue(e,n)}_set(e,r){this.cache.set(e,r),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,r){this.oldCache.delete(e),this._set(e,r)}*_entriesAscending(){for(let e of this.oldCache){let[r,n]=e;this.cache.has(r)||this._deleteIfExpired(r,n)===!1&&(yield e)}for(let e of this.cache){let[r,n]=e;this._deleteIfExpired(r,n)===!1&&(yield e)}}get(e){if(this.cache.has(e)){let r=this.cache.get(e);return this._getItemValue(e,r)}if(this.oldCache.has(e)){let r=this.oldCache.get(e);if(this._deleteIfExpired(e,r)===!1)return this._moveToRecent(e,r),r.value}}set(e,r,{maxAge:n=this.maxAge}={}){let i=typeof n=="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(e)?this.cache.set(e,{value:r,expiry:i}):this._set(e,{value:r,expiry:i})}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):this.oldCache.has(e)?!this._deleteIfExpired(e,this.oldCache.get(e)):!1}peek(e){if(this.cache.has(e))return this._peek(e,this.cache);if(this.oldCache.has(e))return this._peek(e,this.oldCache)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let r=[...this._entriesAscending()],n=r.length-e;n<0?(this.cache=new Map(r),this.oldCache=new Map,this._size=r.length):(n>0&&this._emitEvictions(r.slice(0,n)),this.oldCache=new Map(r.slice(n)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache){let[r,n]=e;this._deleteIfExpired(r,n)===!1&&(yield[r,n.value])}for(let e of this.oldCache){let[r,n]=e;this.cache.has(r)||this._deleteIfExpired(r,n)===!1&&(yield[r,n.value])}}*entriesDescending(){let e=[...this.cache];for(let r=e.length-1;r>=0;--r){let n=e[r],[i,a]=n;this._deleteIfExpired(i,a)===!1&&(yield[i,a.value])}e=[...this.oldCache];for(let r=e.length-1;r>=0;--r){let n=e[r],[i,a]=n;this.cache.has(i)||this._deleteIfExpired(i,a)===!1&&(yield[i,a.value])}}*entriesAscending(){for(let[e,r]of this._entriesAscending())yield[e,r.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}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 ya=Se(ga(),1);import{Agent as vd}from"node:http";import{Agent as xd}from"node:https";var Od={agentCacheSize:512},ba={maxSockets:64,keepAlive:!1},Qs=class t extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,t)}};function Ks(t,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let r={...Od,...e},n=new Cr({maxSize:r.agentCacheSize});async function i(u,h={}){let{origin:f,protocol:c}=new URL(u),g=h!=null&&h.noProxy?null:(0,ya.getProxyForUrl)(u),b=JSON.stringify({proxyUrl:g,origin:f,...h});if(n.has(b))return n.get(b);let m;if("noProxy"in h&&delete h.noProxy,e.undici){let{ProxyAgent:p,Agent:_}=await import("undici"),E={...h};"keepAlive"in E&&!("pipelining"in E)&&(E.pipelining=E.keepAlive?1:0),"keepAlive"in E&&delete E.keepAlive,"maxSockets"in E&&(E.connections=E.maxSockets,delete E.maxSockets),g?m=new p({...E,uri:g}):m=new _(E)}else{let p=c==="https:";g?m=new(p?pa:da)({...h,proxy:g}):m=new(p?xd:vd)(h)}return n.set(b,m),m}let a=(u,{timeout:h=0,agentOpts:f={},...c}={})=>new Promise(async(g,b)=>{var _;if(!e.undici&&!("agent"in c)){let E=await i(u,{...ba,...f});E&&(c.agent=E)}else if(e.undici&&!("dispatcher"in c)){let E=await i(u,{...ba,...f});E&&(c.dispatcher=E)}let m,p;h&&(!("signal"in c)&&globalThis.AbortController&&(p=new AbortController,c.signal=p.signal),m=setTimeout(()=>{var R;(R=p==null?void 0:p.abort)==null||R.call(p);let E=new Qs(`${c.method||"GET"} ${u} timed out after ${h}ms`);b(E)},h),(_=m==null?void 0:m.unref)==null||_.call(m)),t(u,c).then(E=>{m&&clearTimeout(m),g(E)}).catch(E=>{if(m&&clearTimeout(m),E.name==="AbortError")return g(null);b(E)})});return a.clearCache=()=>{for(let u of n.values())"destroy"in u&&u.destroy();n.clear()},a}var Lh=Se(Xs(),1);import np from"node:http";import sp from"node:https";import jt from"node:zlib";import tl,{PassThrough as rl,pipeline as Vt}from"node:stream";import{Buffer as Fn}from"node:buffer";function $d(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",u=a;for(let g=1;g<r.length;g++)r[g]==="base64"?i=!0:r[g]&&(u+=`;${r[g]}`,r[g].indexOf("charset=")===0&&(n=r[g].substring(8)));!r[0]&&!n.length&&(u+=";charset=US-ASCII",n="US-ASCII");let h=i?"base64":"ascii",f=unescape(t.substring(e+1)),c=Buffer.from(f,h);return c.type=a,c.typeFull=u,c.charset=n,c}var Ra=$d;vr();On();import ot,{PassThrough as za}from"node:stream";import{types as Ma,deprecate as oi,promisify as Yd}from"node:util";import{Buffer as Re}from"node:buffer";var Ge=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 pe=class extends Ge{constructor(e,r,n){super(e,r),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}};var In=Symbol.toStringTag,ri=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[In]==="URLSearchParams",Or=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[In]),$a=t=>typeof t=="object"&&(t[In]==="AbortSignal"||t[In]==="EventTarget"),La=(t,e)=>{let r=new URL(e).hostname,n=new URL(t).hostname;return r===n||r.endsWith(`.${n}`)},Pa=(t,e)=>{let r=new URL(e).protocol,n=new URL(t).protocol;return r===n};var Qd=Yd(ot.pipeline),me=Symbol("Body internals"),Ue=class{constructor(e,{size:r=0}={}){let n=null;e===null?e=null:ri(e)?e=Re.from(e.toString()):Or(e)||Re.isBuffer(e)||(Ma.isAnyArrayBuffer(e)?e=Re.from(e):ArrayBuffer.isView(e)?e=Re.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ot||(e instanceof _t?(e=Ia(e),n=e.type.split("=")[1]):e=Re.from(String(e))));let i=e;Re.isBuffer(e)?i=ot.Readable.from(e):Or(e)&&(i=ot.Readable.from(e.stream())),this[me]={body:e,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,e instanceof ot&&e.on("error",a=>{let u=a instanceof Ge?a:new pe(`Invalid response body while trying to fetch ${this.url}: ${a.message}`,"system",a);this[me].error=u})}get body(){return this[me].stream}get bodyUsed(){return this[me].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:n}=await ii(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 _t,i=new URLSearchParams(await this.text());for(let[a,u]of i)n.append(a,u);return n}let{toFormData:r}=await Promise.resolve().then(()=>(Ua(),qa));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[me].body&&this[me].body.type||"",r=await this.arrayBuffer();return new Ve([r],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await ii(this);return new TextDecoder().decode(e)}buffer(){return ii(this)}};Ue.prototype.buffer=oi(Ue.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Ue.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:oi(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function ii(t){if(t[me].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[me].disturbed=!0,t[me].error)throw t[me].error;let{body:e}=t;if(e===null)return Re.alloc(0);if(!(e instanceof ot))return Re.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 pe(`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 Ge?i:new pe(`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")?Re.from(r.join("")):Re.concat(r,n)}catch(i){throw new pe(`Could not create Buffer from response body for ${t.url}: ${i.message}`,"system",i)}else throw new pe(`Premature close of server response while trying to fetch ${t.url}`)}var kt=(t,e)=>{let r,n,{body:i}=t[me];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof ot&&typeof i.getBoundary!="function"&&(r=new za({highWaterMark:e}),n=new za({highWaterMark:e}),i.pipe(r),i.pipe(n),t[me].stream=r,i=n),i},Kd=oi(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"),Pn=(t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":ri(t)?"application/x-www-form-urlencoded;charset=UTF-8":Or(t)?t.type||null:Re.isBuffer(t)||Ma.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof _t?`multipart/form-data; boundary=${e[me].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${Kd(t)}`:t instanceof ot?null:"text/plain;charset=UTF-8",ka=t=>{let{body:e}=t[me];return e===null?0:Or(e)?e.size:Re.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},Wa=async(t,{body:e})=>{e===null?t.end():await Qd(e,t)};import{types as ja}from"node:util";import Dn from"node:http";var Nn=typeof Dn.validateHeaderName=="function"?Dn.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}},ai=typeof Dn.validateHeaderValue=="function"?Dn.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}},_e=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(u=>[i,u]))}else if(e!=null)if(typeof e=="object"&&!ja.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"||ja.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])=>(Nn(n),ai(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(u,h)=>(Nn(u),ai(u,String(h)),URLSearchParams.prototype[i].call(n,String(u).toLowerCase(),String(h)));case"delete":case"has":case"getAll":return u=>(Nn(u),URLSearchParams.prototype[i].call(n,String(u).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(_e.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));function Va(t=[]){return new _e(t.reduce((e,r,n,i)=>(n%2===0&&e.push(i.slice(n,n+2)),e),[]).filter(([e,r])=>{try{return Nn(e),ai(e,String(r)),!0}catch{return!1}}))}var Xd=new Set([301,302,303,307,308]),Hn=t=>Xd.has(t);var Ne=Symbol("Response internals"),Ee=class t extends Ue{constructor(e=null,r={}){super(e,r);let n=r.status!=null?r.status:200,i=new _e(r.headers);if(e!==null&&!i.has("Content-Type")){let a=Pn(e,this);a&&i.append("Content-Type",a)}this[Ne]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[Ne].type}get url(){return this[Ne].url||""}get status(){return this[Ne].status}get ok(){return this[Ne].status>=200&&this[Ne].status<300}get redirected(){return this[Ne].counter>0}get statusText(){return this[Ne].statusText}get headers(){return this[Ne].headers}get highWaterMark(){return this[Ne].highWaterMark}clone(){return new t(kt(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(!Hn(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[Ne].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 _e(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(Ee.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 ep}from"node:url";import{deprecate as tp}from"node:util";var Ga=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 Zd}from"node:net";function Ya(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 Qa=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Ka="strict-origin-when-cross-origin";function Xa(t){if(!Qa.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function Jd(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=Zd(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 Wt(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:Jd(t)}function Za(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=Ya(i),u=Ya(i,!0);a.toString().length>4096&&(a=u),e&&(a=e(a)),r&&(u=r(u));let h=new URL(t.url);switch(n){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return a;case"strict-origin":return Wt(a)&&!Wt(h)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return a.origin===h.origin?a:Wt(a)&&!Wt(h)?"no-referrer":u;case"same-origin":return a.origin===h.origin?a:"no-referrer";case"origin-when-cross-origin":return a.origin===h.origin?a:u;case"no-referrer-when-downgrade":return Wt(a)&&!Wt(h)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function Ja(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of e)n&&Qa.has(n)&&(r=n);return r}var se=Symbol("Request internals"),$r=t=>typeof t=="object"&&typeof t[se]=="object",rp=tp(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),St=class t extends Ue{constructor(e,r={}){let n;if($r(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()),!$r(r)&&"data"in r&&rp(),(r.body!=null||$r(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:$r(e)&&e.body!==null?kt(e):null;super(a,{size:r.size||e.size||0});let u=new _e(r.headers||e.headers||{});if(a!==null&&!u.has("Content-Type")){let c=Pn(a,this);c&&u.set("Content-Type",c)}let h=$r(e)?e.signal:null;if("signal"in r&&(h=r.signal),h!=null&&!$a(h))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let f=r.referrer==null?e.referrer:r.referrer;if(f==="")f="no-referrer";else if(f){let c=new URL(f);f=/^about:(\/\/)?client$/.test(c)?"client":c}else f=void 0;this[se]={method:i,redirect:r.redirect||e.redirect||"follow",headers:u,parsedURL:n,signal:h,referrer:f},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[se].method}get url(){return ep(this[se].parsedURL)}get headers(){return this[se].headers}get redirect(){return this[se].redirect}get signal(){return this[se].signal}get referrer(){if(this[se].referrer==="no-referrer")return"";if(this[se].referrer==="client")return"about:client";if(this[se].referrer)return this[se].referrer.toString()}get referrerPolicy(){return this[se].referrerPolicy}set referrerPolicy(e){this[se].referrerPolicy=Xa(e)}clone(){return new t(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(St.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[se],r=new _e(t[se].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 h=ka(t);typeof h=="number"&&!Number.isNaN(h)&&(n=String(h))}n&&r.set("Content-Length",n),t.referrerPolicy===""&&(t.referrerPolicy=Ka),t.referrer&&t.referrer!=="no-referrer"?t[se].referrer=Za(t):t[se].referrer="no-referrer",t[se].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)),!r.has("Connection")&&!i&&r.set("Connection","close");let a=Ga(e),u={path:e.pathname+a,method:t.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:i};return{parsedURL:e,options:u}};var Bn=class extends Ge{constructor(e,r="aborted"){super(e,r)}};On();ni();var ip=new Set(["data:","http:","https:"]);async function qn(t,e){return new Promise((r,n)=>{let i=new St(t,e),{parsedURL:a,options:u}=el(i);if(!ip.has(a.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${a.protocol.replace(/:$/,"")}" is not supported.`);if(a.protocol==="data:"){let _=Ra(i.url),E=new Ee(_,{headers:{"Content-Type":_.typeFull}});r(E);return}let h=(a.protocol==="https:"?sp:np).request,{signal:f}=i,c=null,g=()=>{let _=new Bn("The operation was aborted.");n(_),i.body&&i.body instanceof tl.Readable&&i.body.destroy(_),!(!c||!c.body)&&c.body.emit("error",_)};if(f&&f.aborted){g();return}let b=()=>{g(),p()},m=h(a.toString(),u);f&&f.addEventListener("abort",b);let p=()=>{m.abort(),f&&f.removeEventListener("abort",b)};m.on("error",_=>{n(new pe(`request to ${i.url} failed, reason: ${_.message}`,"system",_)),p()}),op(m,_=>{c&&c.body&&c.body.destroy(_)}),process.version<"v14"&&m.on("socket",_=>{let E;_.prependListener("end",()=>{E=_._eventsCount}),_.prependListener("close",R=>{if(c&&E<_._eventsCount&&!R){let A=new Error("Premature close");A.code="ERR_STREAM_PREMATURE_CLOSE",c.body.emit("error",A)}})}),m.on("response",_=>{m.setTimeout(0);let E=Va(_.rawHeaders);if(Hn(_.statusCode)){let T=E.get("Location"),$=null;try{$=T===null?null:new URL(T,i.url)}catch{if(i.redirect!=="manual"){n(new pe(`uri requested responds with an invalid redirect URL: ${T}`,"invalid-redirect")),p();return}}switch(i.redirect){case"error":n(new pe(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),p();return;case"manual":break;case"follow":{if($===null)break;if(i.counter>=i.follow){n(new pe(`maximum redirect reached at: ${i.url}`,"max-redirect")),p();return}let D={headers:new _e(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:kt(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!La(i.url,$)||!Pa(i.url,$))for(let V of["authorization","www-authenticate","cookie","cookie2"])D.headers.delete(V);if(_.statusCode!==303&&i.body&&e.body instanceof tl.Readable){n(new pe("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(_.statusCode===303||(_.statusCode===301||_.statusCode===302)&&i.method==="POST")&&(D.method="GET",D.body=void 0,D.headers.delete("content-length"));let H=Ja(E);H&&(D.referrerPolicy=H),r(qn(new St($,D))),p();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}f&&_.once("end",()=>{f.removeEventListener("abort",b)});let R=Vt(_,new rl,T=>{T&&n(T)});process.version<"v12.10"&&_.on("aborted",b);let A={url:i.url,status:_.statusCode,statusText:_.statusMessage,headers:E,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},N=E.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||N===null||_.statusCode===204||_.statusCode===304){c=new Ee(R,A),r(c);return}let L={flush:jt.Z_SYNC_FLUSH,finishFlush:jt.Z_SYNC_FLUSH};if(N==="gzip"||N==="x-gzip"){R=Vt(R,jt.createGunzip(L),T=>{T&&n(T)}),c=new Ee(R,A),r(c);return}if(N==="deflate"||N==="x-deflate"){let T=Vt(_,new rl,$=>{$&&n($)});T.once("data",$=>{($[0]&15)===8?R=Vt(R,jt.createInflate(),D=>{D&&n(D)}):R=Vt(R,jt.createInflateRaw(),D=>{D&&n(D)}),c=new Ee(R,A),r(c)}),T.once("end",()=>{c||(c=new Ee(R,A),r(c))});return}if(N==="br"){R=Vt(R,jt.createBrotliDecompress(),T=>{T&&n(T)}),c=new Ee(R,A),r(c);return}c=new Ee(R,A),r(c)}),Wa(m,i).catch(n)})}function op(t,e){let r=Fn.from(`0\r
27
27
  \r
28
- `),n=!1,i=!1,a;t.on("response",u=>{let{headers:h}=u;n=h["transfer-encoding"]==="chunked"&&!h["content-length"]}),t.on("socket",u=>{let h=()=>{if(n&&!i){let c=new Error("Premature close");c.code="ERR_STREAM_PREMATURE_CLOSE",e(c)}},f=c=>{i=Fn.compare(c.slice(-5),r)===0,!i&&a&&(i=Fn.compare(a.slice(-3),r.slice(0,3))===0&&Fn.compare(c.slice(-2),r.slice(3))===0),a=c};u.prependListener("close",h),u.on("data",f),t.on("close",()=>{u.removeListener("close",h),u.removeListener("data",f)})})}var Ph=Se(Il(),1),Nh=Se(zn(),1),Dh=Se(Ll(),1),ne=Se(Oc(),1),Hh=Se(Nc(),1),Bh=Se(Yc(),1);import{cwd as Vb,stdout as Gb,argv as Yb,env as hs,exit as Gr,versions as Qb}from"node:process";import{join as fs,dirname as Fh,basename as Sh}from"node:path";import{lstatSync as Kb,readFileSync as Rh,truncateSync as Xb,writeFileSync as Zb,accessSync as Jb}from"node:fs";import{platform as ey}from"node:os";import{rootCertificates as Eh}from"node:tls";var Ib=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],$b={"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 is(t,{noAffix:e=!1,times:r=Ib,nowThreshold:n=1e4,nowString:i="now",aliases:a=!1,aliasesMap:u=$b}={}){let h=Date.now();if(t=typeof t=="number"?t:Date.parse(t),Number.isNaN(t))return"unknown";let f=!1,c=h-t;if(c<0&&(f=!0,c=Math.abs(c)),c<n)return i;let g,b;for(let p=0,_=r.length;p<_;p++){let E=r[p];if(!(c>=E[1])){g=Math.floor(c/E[0]),b=E[2]+(g>1?"s":"");break}}let m=`${f&&!e?"in ":""}${g} ${b}${!f&&!e?" ago":""}`;return a?u[m]??m:m}import Fi from"node:process";import Lb from"node:os";import Qc from"node:tty";function Ce(t,e=globalThis.Deno?globalThis.Deno.args:Fi.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:K}=Fi,os;Ce("no-color")||Ce("no-colors")||Ce("color=false")||Ce("color=never")?os=0:(Ce("color")||Ce("colors")||Ce("color=true")||Ce("color=always"))&&(os=1);function Pb(){if("FORCE_COLOR"in K)return K.FORCE_COLOR==="true"?1:K.FORCE_COLOR==="false"?0:K.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(K.FORCE_COLOR,10),3)}function Nb(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Db(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=Pb();n!==void 0&&(os=n);let i=r?os:n;if(i===0)return 0;if(r){if(Ce("color=16m")||Ce("color=full")||Ce("color=truecolor"))return 3;if(Ce("color=256"))return 2}if("TF_BUILD"in K&&"AGENT_NAME"in K)return 1;if(t&&!e&&i===void 0)return 0;let a=i||0;if(K.TERM==="dumb")return a;if(Fi.platform==="win32"){let u=Lb.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in K)return"GITHUB_ACTIONS"in K||"GITEA_ACTIONS"in K?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in K)||K.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in K)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(K.TEAMCITY_VERSION)?1:0;if(K.COLORTERM==="truecolor"||K.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in K){let u=Number.parseInt((K.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(K.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(K.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(K.TERM)||"COLORTERM"in K?1:a}function Kc(t,e={}){let r=Db(t,{streamIsTTY:t&&t.isTTY,...e});return Nb(r)}var Hb={stdout:Kc({isTTY:Qc.isatty(1)}),stderr:Kc({isTTY:Qc.isatty(2)})},Xc=Hb;var Zc=!0;function Jc(){Zc=!1}function qi(t,e,r){return Zc?`\x1B[${e}m${t.join(" ")}\x1B[${r}m`:t.join(" ")}var Ui=(...t)=>qi(t,31,39),tr=(...t)=>qi(t,32,39);var as=(...t)=>qi(t,35,39);var qh=Se(gh(),1);var Mb=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var Wi=new Set(["__proto__","prototype","constructor"]),kb=new Set("0123456789");function Wb(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(Wi.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(Wi.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"&&!kb.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(Wi.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function jb(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 bh(t,e,r){if(!Mb(t)||typeof e!="string")return r===void 0?t:r;let n=Wb(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){let a=n[i];if(jb(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 ji=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},yh=t=>globalThis.DOMException===void 0?new ji(t):new DOMException(t),_h=t=>{let e=t.reason===void 0?yh("This operation was aborted."):t.reason;return e instanceof Error?e:yh(e)};async function Vi(t,e,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:i}={}){return new Promise((a,u)=>{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 h=[],f=[],c=new Map,g=!1,b=!1,m=!1,p=0,_=0,E=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),R=N=>{g=!0,b=!0,u(N)};i&&(i.aborted&&R(_h(i)),i.addEventListener("abort",()=>{R(_h(i))}));let A=async()=>{if(b)return;let N=await E.next(),L=_;if(_++,N.done){if(m=!0,p===0&&!b){if(!n&&f.length>0){R(new AggregateError(f));return}if(b=!0,c.size===0){a(h);return}let T=[];for(let[$,D]of h.entries())c.get($)!==wh&&T.push(D);a(T)}return}p++,(async()=>{try{let T=await N.value;if(b)return;let $=await e(T,L);$===wh&&c.set(L,$),h[L]=$,p--,await A()}catch(T){if(n)R(T);else{f.push(T),p--;try{await A()}catch($){R($)}}}})()};(async()=>{for(let N=0;N<r;N++){try{await A()}catch(L){R(L);break}if(m||g)break}})()})}var wh=Symbol("skip");async function Gi(t,e){return Vi(t,r=>r(),e)}function nr(t,e){var r=0,n,i;e=e||{};function a(){var u=n,h=arguments.length,f,c;e:for(;u;){if(u.args.length!==arguments.length){u=u.next;continue}for(c=0;c<h;c++)if(u.args[c]!==arguments[c]){u=u.next;continue e}return u!==n&&(u===i&&(i=u.prev),u.prev.next=u.next,u.next&&(u.next.prev=u.prev),u.next=n,u.prev=null,n.prev=u,n=u),u.val}for(f=new Array(h),c=0;c<h;c++)f[c]=arguments[c];return u={args:f,val:t.apply(null,f)},n?(n.prev=u,u.next=n):i=u,r===e.maxSize?(i=i.prev,i.next=null):r++,n=u,u.val}return a.clear=function(){n=null,i=null,r=0},a}var{fromUrl:ty}=Bh.default,lr,$h;globalThis.fetch&&!(($h=Qb)!=null&&$h.node)?lr=globalThis.fetch:lr=Ks(qn,{undici:!1});var Uh=96,Ke="\0",ry=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,ny=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Ji=/^[0-9a-f]{7,}$/i,Th=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,ds=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),sy=nr(ty),Yi=nr(Ph.default),iy=nr(Dh.default),ps=nr(t=>t.endsWith("/")?t.substring(0,t.length-1):t),oy=new Set(["patch"]),ay=new Set(["patch","minor"]),ly=new Set(["patch","minor","major"]),zh="14.2.9",ve={},z=(0,Lh.default)(Yb.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","l","language","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",l:"language",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"]||!Xc.stdout)&&Jc();var sr=ur(z.greatest),Qi=ur(z.prerelease),Ki=ur(z.release),ir=ur(z.patch),or=ur(z.minor),ar=ur(z["allow-downgrade"]),ze=(0,Nh.default)("npm",{registry:"https://registry.npmjs.org"}),Xi={npmrc:ze,recursive:!0},Ah=z.githubapi?ps(z.githubapi):"https://api.github.com",uy=z.pypiapi?ps(z.pypiapi):"https://pypi.org",Mh=typeof z.sockets=="number"?parseInt(z.sockets):Uh;function Ch(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}function kh(t,e,r){let n=fs(e,t);try{return Jb(n),n}catch{}let i=Fh(e);return r&&n===r||i===e?null:kh(t,i,r)}function cy(t,e){if(t.startsWith("@")){let r=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],n=ps(iy(r,ze));if(n!==e)try{let i=Yi(n,Xi);if(i!=null&&i.token)return[i,n]}catch{}return[Yi(e,Xi),e]}else return[Yi(e,Xi),e]}var Wh=nr((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${zh}`,...r&&{Authorization:`${e} ${r}`}}}));async function hy(t,e,r,n){let[i,a]=cy(t,r),h=(e==="resolutions"?Sy(t):t).replace(/\//g,"%2f"),f=`${a}/${h}`;z.verbose&&console.error(`${as("fetch")} ${f}`);let c=await lr(f,Wh(n,i==null?void 0:i.type,i==null?void 0:i.token));if(c!=null&&c.ok)return z.verbose&&console.error(`${tr("done")} ${f}`),[await c.json(),e,a,t];throw c!=null&&c.status&&(c!=null&&c.statusText)?new Error(`Received ${c.status} ${c.statusText} for ${t} from ${a}`):new Error(`Unable to fetch ${t} from ${a}`)}async function fy(t,e,r){let n=`${uy}/pypi/${t}/json`;z.verbose&&console.error(`${as("fetch")} ${n}`);let i=await lr(n,Wh(r));if(i!=null&&i.ok)return z.verbose&&console.error(`${tr("done")} ${n}`),[await i.json(),e,null,t];throw i!=null&&i.status&&(i!=null&&i.statusText)?new Error(`Received ${i.status} ${i.statusText} for ${t} from PyPi`):new Error(`Unable to fetch ${t} from PyPi`)}function vh({repository:t,homepage:e,info:r},n,i){var h;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 f=typeof t=="string"?t:t.url,c=sy(f),g=(h=c==null?void 0:c.browse)==null?void 0:h.call(c);g&&(a=g),a&&t.directory&&c.treepath&&(a=`${a}/${c.treepath}/HEAD/${t.directory}`),!a&&(t!=null&&t.url)&&/^https?:/.test(t.url)&&(a=t.url),!a&&f&&(a=f)}let u=a||e||"";if(u){let f=new URL(u);f.protocol==="http:"&&f.hostname==="github.com"&&(f.protocol="https:",u=String(f))}return u}function xe(t,e={}){let r={},n=t instanceof Error;typeof t=="string"?r.message=t:n&&(r.error=t.stack||t.message);for(let i of Object.values(e))"oldPrint"in i&&(i.old=i.oldPrint,delete i.oldPrint),"newPrint"in i&&(i.new=i.newPrint,delete i.newPrint),"oldOriginal"in i&&(i.old=i.oldOriginal,delete i.oldOriginal);if(z.json){if(!n){r.results={};for(let[i,a]of Object.entries(e)){let[u,h]=i.split(Ke);r.results[u]||(r.results[u]={}),r.results[u][h]=a}}console.info(JSON.stringify(r))}else Object.keys(e).length&&!n&&console.info(dy(e)),(r.message||r.error)&&(r.message?console.info(r.message):r.error&&console.info(Ui(r.error)));z["error-on-outdated"]?Gr(Object.keys(e).length?2:0):z["error-on-unchanged"]?Gr(Object.keys(e).length?0:2):Gr(r.error?1:0)}function xh(t,e){let r=ey()==="win32";r&&Xb(t,0),Zb(t,e,r?{flag:"r+"}:void 0)}function Oh(t,e,r){if(t===e)return t;let n=t.split(/\./),i=e.split(/\./),a=r?tr:Ui,u=/^[0-9a-zA-Z-.]+$/,h="";for(let f=0;f<n.length;f++)if(n[f]!==i[f]){u.test(n[f])?h+=a(n.slice(f).join(".")):h+=n[f].split("").map(c=>u.test(c)?a(c):c).join("")+a(`.${n.slice(f+1).join(".")}`);break}else h+=`${n[f]}.`;return h}function dy(t){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[r,n]of Object.entries(t))e.push([r.split(Ke)[1],Oh(n.old,n.new,!1),Oh(n.new,n.old,!0),n.age||"",n.info]);return(0,Hh.default)(e,{hsep:" ",stringLength:r=>r.replace(ks(),"").length})}function py(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(Ke)[1],a=e[n].oldOriginal||e[n].old,u=new RegExp(`"${ds(i)}": *"${ds(a)}"`,"g");r=r.replace(u,`"${i}": "${e[n].new}"`)}return r}function my(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(Ke)[1],a=e[n].oldOriginal||e[n].old,u=new RegExp(`${ds(i)} *= *"${ds(a)}"`,"g");r=r.replace(u,`${i} = "${e[n].new}"`)}return r}function gy(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Zi(t){let e=ne.default.parse(t);return e?!!e.prerelease.length:!1}function jh(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function by(t){try{return ne.default.coerce(t).version}catch{return null}}function yy(t,e,{range:r,semvers:n,usePre:i,useRel:a,useGreatest:u}={}){let h=by(r),f=0;n=new Set(n),i=jh(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 c of e){let g=ne.default.parse(c);if(g.prerelease.length&&(!i||a))continue;let b=ne.default.diff(h,g.version);if(!(!b||!n.has(b)))if(u||!("time"in t))ne.default.gte(ne.default.coerce(g.version).version,h)&&(h=g.version);else{let m=new Date(t.time[c]).getTime();m>=0&&m>f&&(h=g.version,f=m)}}return h||null}function Ih(t){return ne.default.coerce(t).version}function _y(t,{language:e,range:r,useGreatest:n,useRel:i,usePre:a,semvers:u}={}){var c;if(r==="*"||r.includes("||"))return null;let h=Object.keys(e==="py"?t.releases:t.versions).filter(g=>ne.default.valid(g)),f=yy(t,h,{range:r,semvers:u,usePre:a,useRel:i,useGreatest:n});if(n)return f;{let g,b;e==="py"?(b=t.info.version,g=Ih(t.info.version)):g=t["dist-tags"].latest;let m=Ih(r),p=jh(r),_=Zi(f),E=Zi(g),R=ne.default.gt(f,m);if(!i&&a||p&&_||i&&!R&&p&&!_||p&&!_&&R)return f;if(p&&!_&&!R)return null;let A=ne.default.diff(m,g);return A&&A!=="prerelease"&&!u.has(A.replace(/^pre/,""))||i&&Zi(g)?f:ne.default.lt(g,m)&&!E?ar===!0||(c=ar==null?void 0:ar.has)!=null&&c.call(ar,t.name)?g:null:b??g}}async function wy([t,e],{useGreatest:r}={}){var f,c;let n=e.old.replace(ry,""),[i,a,u,h]=ny.exec(n)||[];if(!(!a||!u||!h))if(Ji.test(h)){let g={maxSockets:Mh},b=hs.UPDATES_GITHUB_API_TOKEN||hs.GITHUB_API_TOKEN||hs.GH_TOKEN||hs.HOMEBREW_GITHUB_API_TOKEN;b&&(g.headers={Authorization:`Bearer ${b}`});let m=`${Ah}/repos/${a}/${u}/commits`;z.verbose&&console.error(`${as("fetch")} ${m}`);let p=await lr(m,g);if(z.verbose&&(p!=null&&p.ok)&&console.error(`${tr("done")} ${m}`),!p||!p.ok)return;let _=await p.json(),{sha:E,commit:R}=_[0];if(!E||!E.length)return;let A=((f=R==null?void 0:R.committer)==null?void 0:f.date)??((c=R==null?void 0:R.author)==null?void 0:c.date);if(E=E.substring(0,h.length),h!==E){let N=e.old.replace(h,E);return{key:t,newRange:N,user:a,repo:u,oldRef:h,newRef:E,newDate:A}}}else{let g=await lr(`${Ah}/repos/${a}/${u}/git/refs/tags`);if(!g||!g.ok)return;let m=(await g.json()).map(_=>_.ref.replace(/^refs\/tags\//,"")),p=h.replace(/^v/,"");if(!ne.default.valid(p))return;if(r){let _=h,E=h.replace(/^v/,"");for(let R of m){let A=R.replace(/^v/,"");ne.default.valid(A)&&(!_||ne.default.gt(A,E))&&(_=R,E=A)}if(ne.default.neq(p,E))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}else{let _=m[m.length-1],E=_.replace(/^v/,"");if(!ne.default.valid(E))return;if(ne.default.neq(p,E))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}}}function Sy(t){let e=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Ry(t){let e=t.match(Th);return(e==null?void 0:e.length)!==1?t:t.replace(Th,ne.default.coerce(e[0]))}function ur(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}async function Ey(){var T,$,D,H,V,X,J,ae,He;for(let v of[process.stdout,process.stderr])($=(T=v==null?void 0:v._handle)==null?void 0:T.setBlocking)==null||$.call(T,!0);let{help:t,version:e,language:r,file:n,types:i,update:a}=z;if(t&&(Gb.write(`usage: updates [options]
28
+ `),n=!1,i=!1,a;t.on("response",u=>{let{headers:h}=u;n=h["transfer-encoding"]==="chunked"&&!h["content-length"]}),t.on("socket",u=>{let h=()=>{if(n&&!i){let c=new Error("Premature close");c.code="ERR_STREAM_PREMATURE_CLOSE",e(c)}},f=c=>{i=Fn.compare(c.slice(-5),r)===0,!i&&a&&(i=Fn.compare(a.slice(-3),r.slice(0,3))===0&&Fn.compare(c.slice(-2),r.slice(3))===0),a=c};u.prependListener("close",h),u.on("data",f),t.on("close",()=>{u.removeListener("close",h),u.removeListener("data",f)})})}var Ph=Se(Il(),1),Nh=Se(zn(),1),Dh=Se(Ll(),1),ne=Se(Oc(),1),Hh=Se(Nc(),1),Bh=Se(Yc(),1);import{cwd as Vb,stdout as Gb,argv as Yb,env as hs,exit as Gr,versions as Qb}from"node:process";import{join as fs,dirname as Fh,basename as Sh,resolve as Kb}from"node:path";import{lstatSync as Xb,readFileSync as Rh,truncateSync as Zb,writeFileSync as Jb,accessSync as ey}from"node:fs";import{platform as ty}from"node:os";import{rootCertificates as Eh}from"node:tls";var Ib=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],$b={"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 is(t,{now:e,noAffix:r=!1,times:n=Ib,nowThreshold:i=1e4,nowString:a="now",aliases:u=!1,aliasesMap:h=$b}={}){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 f=!1,c=e-t;if(c<0&&(f=!0,c=Math.abs(c)),c<i)return a;let g,b;for(let p=0,_=n.length;p<_;p++){let E=n[p];if(!(c>=E[1])){g=Math.floor(c/E[0]),b=E[2]+(g>1?"s":"");break}}let m=`${f&&!r?"in ":""}${g} ${b}${!f&&!r?" ago":""}`;return u?h[m]??m:m}import Fi from"node:process";import Lb from"node:os";import Qc from"node:tty";function Ce(t,e=globalThis.Deno?globalThis.Deno.args:Fi.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:K}=Fi,os;Ce("no-color")||Ce("no-colors")||Ce("color=false")||Ce("color=never")?os=0:(Ce("color")||Ce("colors")||Ce("color=true")||Ce("color=always"))&&(os=1);function Pb(){if("FORCE_COLOR"in K)return K.FORCE_COLOR==="true"?1:K.FORCE_COLOR==="false"?0:K.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(K.FORCE_COLOR,10),3)}function Nb(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Db(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=Pb();n!==void 0&&(os=n);let i=r?os:n;if(i===0)return 0;if(r){if(Ce("color=16m")||Ce("color=full")||Ce("color=truecolor"))return 3;if(Ce("color=256"))return 2}if("TF_BUILD"in K&&"AGENT_NAME"in K)return 1;if(t&&!e&&i===void 0)return 0;let a=i||0;if(K.TERM==="dumb")return a;if(Fi.platform==="win32"){let u=Lb.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in K)return"GITHUB_ACTIONS"in K||"GITEA_ACTIONS"in K?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in K)||K.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in K)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(K.TEAMCITY_VERSION)?1:0;if(K.COLORTERM==="truecolor"||K.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in K){let u=Number.parseInt((K.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(K.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(K.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(K.TERM)||"COLORTERM"in K?1:a}function Kc(t,e={}){let r=Db(t,{streamIsTTY:t&&t.isTTY,...e});return Nb(r)}var Hb={stdout:Kc({isTTY:Qc.isatty(1)}),stderr:Kc({isTTY:Qc.isatty(2)})},Xc=Hb;var Zc=!0;function Jc(){Zc=!1}function qi(t,e,r){return Zc?`\x1B[${e}m${t.join(" ")}\x1B[${r}m`:t.join(" ")}var Ui=(...t)=>qi(t,31,39),tr=(...t)=>qi(t,32,39);var as=(...t)=>qi(t,35,39);var qh=Se(gh(),1);var Mb=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var Wi=new Set(["__proto__","prototype","constructor"]),kb=new Set("0123456789");function Wb(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(Wi.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(Wi.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"&&!kb.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(Wi.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function jb(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 bh(t,e,r){if(!Mb(t)||typeof e!="string")return r===void 0?t:r;let n=Wb(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){let a=n[i];if(jb(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 ji=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},yh=t=>globalThis.DOMException===void 0?new ji(t):new DOMException(t),_h=t=>{let e=t.reason===void 0?yh("This operation was aborted."):t.reason;return e instanceof Error?e:yh(e)};async function Vi(t,e,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:i}={}){return new Promise((a,u)=>{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 h=[],f=[],c=new Map,g=!1,b=!1,m=!1,p=0,_=0,E=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),R=N=>{g=!0,b=!0,u(N)};i&&(i.aborted&&R(_h(i)),i.addEventListener("abort",()=>{R(_h(i))}));let A=async()=>{if(b)return;let N=await E.next(),L=_;if(_++,N.done){if(m=!0,p===0&&!b){if(!n&&f.length>0){R(new AggregateError(f));return}if(b=!0,c.size===0){a(h);return}let T=[];for(let[$,D]of h.entries())c.get($)!==wh&&T.push(D);a(T)}return}p++,(async()=>{try{let T=await N.value;if(b)return;let $=await e(T,L);$===wh&&c.set(L,$),h[L]=$,p--,await A()}catch(T){if(n)R(T);else{f.push(T),p--;try{await A()}catch($){R($)}}}})()};(async()=>{for(let N=0;N<r;N++){try{await A()}catch(L){R(L);break}if(m||g)break}})()})}var wh=Symbol("skip");async function Gi(t,e){return Vi(t,r=>r(),e)}function nr(t,e){var r=0,n,i;e=e||{};function a(){var u=n,h=arguments.length,f,c;e:for(;u;){if(u.args.length!==arguments.length){u=u.next;continue}for(c=0;c<h;c++)if(u.args[c]!==arguments[c]){u=u.next;continue e}return u!==n&&(u===i&&(i=u.prev),u.prev.next=u.next,u.next&&(u.next.prev=u.prev),u.next=n,u.prev=null,n.prev=u,n=u),u.val}for(f=new Array(h),c=0;c<h;c++)f[c]=arguments[c];return u={args:f,val:t.apply(null,f)},n?(n.prev=u,u.next=n):i=u,r===e.maxSize?(i=i.prev,i.next=null):r++,n=u,u.val}return a.clear=function(){n=null,i=null,r=0},a}var{fromUrl:ry}=Bh.default,lr,$h;globalThis.fetch&&!(($h=Qb)!=null&&$h.node)?lr=globalThis.fetch:lr=Ks(qn,{undici:!1});var Uh=96,Ke="\0",ny=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,sy=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Ji=/^[0-9a-f]{7,}$/i,Th=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,ds=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),iy=nr(ry),Yi=nr(Ph.default),oy=nr(Dh.default),ps=nr(t=>t.endsWith("/")?t.substring(0,t.length-1):t),ay=new Set(["patch"]),ly=new Set(["patch","minor"]),uy=new Set(["patch","minor","major"]),zh="14.3.1",ve={},z=(0,Lh.default)(Yb.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","l","language","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",l:"language",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"]||!Xc.stdout)&&Jc();var sr=ur(z.greatest),Qi=ur(z.prerelease),Ki=ur(z.release),ir=ur(z.patch),or=ur(z.minor),ar=ur(z["allow-downgrade"]),ze=(0,Nh.default)("npm",{registry:"https://registry.npmjs.org"}),Xi={npmrc:ze,recursive:!0},Ah=z.githubapi?ps(z.githubapi):"https://api.github.com",cy=z.pypiapi?ps(z.pypiapi):"https://pypi.org",Mh=typeof z.sockets=="number"?parseInt(z.sockets):Uh;function Ch(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}function kh(t,e,r){let n=fs(e,t);try{return ey(n),n}catch{}let i=Fh(e);return r&&n===r||i===e?null:kh(t,i,r)}function hy(t,e){if(t.startsWith("@")){let r=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],n=ps(oy(r,ze));if(n!==e)try{let i=Yi(n,Xi);if(i!=null&&i.token)return[i,n]}catch{}return[Yi(e,Xi),e]}else return[Yi(e,Xi),e]}var Wh=nr((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${zh}`,...r&&{Authorization:`${e} ${r}`}}}));async function fy(t,e,r,n){let[i,a]=hy(t,r),h=(e==="resolutions"?Ry(t):t).replace(/\//g,"%2f"),f=`${a}/${h}`;z.verbose&&console.error(`${as("fetch")} ${f}`);let c=await lr(f,Wh(n,i==null?void 0:i.type,i==null?void 0:i.token));if(c!=null&&c.ok)return z.verbose&&console.error(`${tr("done")} ${f}`),[await c.json(),e,a,t];throw c!=null&&c.status&&(c!=null&&c.statusText)?new Error(`Received ${c.status} ${c.statusText} for ${t} from ${a}`):new Error(`Unable to fetch ${t} from ${a}`)}async function dy(t,e,r){let n=`${cy}/pypi/${t}/json`;z.verbose&&console.error(`${as("fetch")} ${n}`);let i=await lr(n,Wh(r));if(i!=null&&i.ok)return z.verbose&&console.error(`${tr("done")} ${n}`),[await i.json(),e,null,t];throw i!=null&&i.status&&(i!=null&&i.statusText)?new Error(`Received ${i.status} ${i.statusText} for ${t} from PyPi`):new Error(`Unable to fetch ${t} from PyPi`)}function vh({repository:t,homepage:e,info:r},n,i){var h;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 f=typeof t=="string"?t:t.url,c=iy(f),g=(h=c==null?void 0:c.browse)==null?void 0:h.call(c);g&&(a=g),a&&t.directory&&c.treepath&&(a=`${a}/${c.treepath}/HEAD/${t.directory}`),!a&&(t!=null&&t.url)&&/^https?:/.test(t.url)&&(a=t.url),!a&&f&&(a=f)}let u=a||e||"";if(u){let f=new URL(u);f.protocol==="http:"&&f.hostname==="github.com"&&(f.protocol="https:",u=String(f))}return u}function xe(t,e={}){let r={},n=t instanceof Error;typeof t=="string"?r.message=t:n&&(r.error=t.stack||t.message);for(let i of Object.values(e))"oldPrint"in i&&(i.old=i.oldPrint,delete i.oldPrint),"newPrint"in i&&(i.new=i.newPrint,delete i.newPrint),"oldOriginal"in i&&(i.old=i.oldOriginal,delete i.oldOriginal);if(z.json){if(!n){r.results={};for(let[i,a]of Object.entries(e)){let[u,h]=i.split(Ke);r.results[u]||(r.results[u]={}),r.results[u][h]=a}}console.info(JSON.stringify(r))}else Object.keys(e).length&&!n&&console.info(py(e)),(r.message||r.error)&&(r.message?console.info(r.message):r.error&&console.info(Ui(r.error)));z["error-on-outdated"]?Gr(Object.keys(e).length?2:0):z["error-on-unchanged"]?Gr(Object.keys(e).length?0:2):Gr(r.error?1:0)}function xh(t,e){let r=ty()==="win32";r&&Zb(t,0),Jb(t,e,r?{flag:"r+"}:void 0)}function Oh(t,e,r){if(t===e)return t;let n=t.split(/\./),i=e.split(/\./),a=r?tr:Ui,u=/^[0-9a-zA-Z-.]+$/,h="";for(let f=0;f<n.length;f++)if(n[f]!==i[f]){u.test(n[f])?h+=a(n.slice(f).join(".")):h+=n[f].split("").map(c=>u.test(c)?a(c):c).join("")+a(`.${n.slice(f+1).join(".")}`);break}else h+=`${n[f]}.`;return h}function py(t){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[r,n]of Object.entries(t))e.push([r.split(Ke)[1],Oh(n.old,n.new,!1),Oh(n.new,n.old,!0),n.age||"",n.info]);return(0,Hh.default)(e,{hsep:" ",stringLength:r=>r.replace(ks(),"").length})}function my(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(Ke)[1],a=e[n].oldOriginal||e[n].old,u=new RegExp(`"${ds(i)}": *"${ds(a)}"`,"g");r=r.replace(u,`"${i}": "${e[n].new}"`)}return r}function gy(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(Ke)[1],a=e[n].oldOriginal||e[n].old,u=new RegExp(`${ds(i)} *= *"${ds(a)}"`,"g");r=r.replace(u,`${i} = "${e[n].new}"`)}return r}function by(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Zi(t){let e=ne.default.parse(t);return e?!!e.prerelease.length:!1}function jh(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function yy(t){try{return ne.default.coerce(t).version}catch{return null}}function _y(t,e,{range:r,semvers:n,usePre:i,useRel:a,useGreatest:u}={}){let h=yy(r),f=0;n=new Set(n),i=jh(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 c of e){let g=ne.default.parse(c);if(g.prerelease.length&&(!i||a))continue;let b=ne.default.diff(h,g.version);if(!(!b||!n.has(b)))if(u||!("time"in t))ne.default.gte(ne.default.coerce(g.version).version,h)&&(h=g.version);else{let m=new Date(t.time[c]).getTime();m>=0&&m>f&&(h=g.version,f=m)}}return h||null}function Ih(t){return ne.default.coerce(t).version}function wy(t,{language:e,range:r,useGreatest:n,useRel:i,usePre:a,semvers:u}={}){var c;if(r==="*"||r.includes("||"))return null;let h=Object.keys(e==="py"?t.releases:t.versions).filter(g=>ne.default.valid(g)),f=_y(t,h,{range:r,semvers:u,usePre:a,useRel:i,useGreatest:n});if(n)return f;{let g,b;e==="py"?(b=t.info.version,g=Ih(t.info.version)):g=t["dist-tags"].latest;let m=Ih(r),p=jh(r),_=Zi(f),E=Zi(g),R=ne.default.gt(f,m);if(!i&&a||p&&_||i&&!R&&p&&!_||p&&!_&&R)return f;if(p&&!_&&!R)return null;let A=ne.default.diff(m,g);return A&&A!=="prerelease"&&!u.has(A.replace(/^pre/,""))||i&&Zi(g)?f:ne.default.lt(g,m)&&!E?ar===!0||(c=ar==null?void 0:ar.has)!=null&&c.call(ar,t.name)?g:null:b??g}}async function Sy([t,e],{useGreatest:r}={}){var f,c;let n=e.old.replace(ny,""),[i,a,u,h]=sy.exec(n)||[];if(!(!a||!u||!h))if(Ji.test(h)){let g={maxSockets:Mh},b=hs.UPDATES_GITHUB_API_TOKEN||hs.GITHUB_API_TOKEN||hs.GH_TOKEN||hs.HOMEBREW_GITHUB_API_TOKEN;b&&(g.headers={Authorization:`Bearer ${b}`});let m=`${Ah}/repos/${a}/${u}/commits`;z.verbose&&console.error(`${as("fetch")} ${m}`);let p=await lr(m,g);if(z.verbose&&(p!=null&&p.ok)&&console.error(`${tr("done")} ${m}`),!p||!p.ok)return;let _=await p.json(),{sha:E,commit:R}=_[0];if(!E||!E.length)return;let A=((f=R==null?void 0:R.committer)==null?void 0:f.date)??((c=R==null?void 0:R.author)==null?void 0:c.date);if(E=E.substring(0,h.length),h!==E){let N=e.old.replace(h,E);return{key:t,newRange:N,user:a,repo:u,oldRef:h,newRef:E,newDate:A}}}else{let g=await lr(`${Ah}/repos/${a}/${u}/git/refs/tags`);if(!g||!g.ok)return;let m=(await g.json()).map(_=>_.ref.replace(/^refs\/tags\//,"")),p=h.replace(/^v/,"");if(!ne.default.valid(p))return;if(r){let _=h,E=h.replace(/^v/,"");for(let R of m){let A=R.replace(/^v/,"");ne.default.valid(A)&&(!_||ne.default.gt(A,E))&&(_=R,E=A)}if(ne.default.neq(p,E))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}else{let _=m[m.length-1],E=_.replace(/^v/,"");if(!ne.default.valid(E))return;if(ne.default.neq(p,E))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}}}function Ry(t){let e=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Ey(t){let e=t.match(Th);return(e==null?void 0:e.length)!==1?t:t.replace(Th,ne.default.coerce(e[0]))}function ur(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}async function Ty(){var T,$,D,H,V,X,J,ae,He;for(let v of[process.stdout,process.stderr])($=(T=v==null?void 0:v._handle)==null?void 0:T.setBlocking)==null||$.call(T,!0);let{help:t,version:e,language:r,file:n,types:i,update:a}=z;if(t&&(Gb.write(`usage: updates [options]
29
29
 
30
30
  Options:
31
31
  -l, --language <lang> Language to check, either 'js' or 'py'
@@ -53,4 +53,4 @@ Content-Type: ${a.type||"application/octet-stream"}\r
53
53
  Examples:
54
54
  $ updates
55
55
  $ updates -u && npm i
56
- `),Gr(0)),e&&(console.info(zh),Gr(0)),r&&!["js","py"].includes(r))throw new Error(`Invalid language: ${r}`);if(n){let v=Sh(n);v==="package.json"?r="js":v==="pyproject.toml"&&(r="py")}r||(r="js");let u;r==="py"?u="pyproject.toml":r==="js"&&(u="package.json");let h;if(n){let v;try{v=Kb(n)}catch(Z){xe(new Error(`Unable to open ${n}: ${Z.message}`))}v!=null&&v.isFile()?h=n:v!=null&&v.isDirectory()?h=fs(n,u):xe(new Error(`${n} is neither a file nor directory`))}else{let v=Vb();if(h=kh(u,v),!h)return xe(new Error(`Unable to find ${u} in ${v} or any of its parent directories`))}let f=Fh(h);try{ve=(await import(fs(f,"updates.config.js"))).default}catch{try{ve=(await import(fs(f,"updates.config.mjs"))).default}catch{}}let c={};if(r==="js"&&(ze["strict-ssl"]===!1&&(c.rejectUnauthorized=!1),"cafile"in ze&&(c.ca=Eh.concat(Ch(Rh(ze.cafile,"utf8")))),"ca"in ze)){let v=Array.isArray(ze.ca)?ze.ca:[ze.ca];c.ca=Eh.concat(v.map(Z=>Ch(Z)))}let g;i?g=Array.isArray(i)?i:i.split(","):"types"in ve&&Array.isArray(ve.types)?g=ve.types:r==="js"?g=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"]:g=["tool.poetry.dependencies","tool.poetry.group.dev.dependencies"];let b,m;try{m=Rh(h,"utf8")}catch(v){xe(new Error(`Unable to open ${h}: ${v.message}`))}try{r==="js"?b=JSON.parse(m):b=(0,qh.default)(m)}catch(v){xe(new Error(`Error parsing ${h}: ${v.message}`))}let p,_;z.include&&z.include!==!0?p=new Set((Array.isArray(z.include)?z.include:[z.include]).flatMap(v=>v.split(","))):"include"in ve&&Array.isArray(ve.include)&&(p=new Set(ve.include)),z.exclude&&z.exclude!==!0?_=new Set((Array.isArray(z.exclude)?z.exclude:[z.exclude]).flatMap(v=>v.split(","))):"exclude"in ve&&Array.isArray(ve.exclude)&&(_=new Set(ve.exclude));function E(v,Z){var ee,oe;return!(Z==="py"&&v==="python"||((ee=_==null?void 0:_.has)==null?void 0:ee.call(_,v))===!0||((oe=p==null?void 0:p.has)==null?void 0:oe.call(p,v))===!1)}let R={},A={};for(let v of g){let Z;r==="js"?Z=b[v]||{}:Z=bh(b,v)||{};for(let[ee,oe]of Object.entries(Z))ne.default.validRange(oe)&&E(ee,r)?R[`${v}${Ke}${ee}`]={old:Ry(oe),oldOriginal:oe}:r==="js"&&E(ee,r)&&(A[`${v}${Ke}${ee}`]={old:oe})}!Object.keys(R).length&&!Object.keys(A).length&&xe(p||_?new Error("No dependencies match the given include/exclude filters"):"No dependencies present, nothing to do");let N;r==="js"&&(N=ps(z.registry||ve.registry||ze.registry));let L=await Gi(Object.keys(R).map(v=>()=>{let[Z,ee]=v.split(Ke);return r==="js"?hy(ee,Z,N,c):fy(ee,Z,c)}),{concurrency:Mh});for(let[v,Z,ee,oe]of L){if(v!=null&&v.error)throw new Error(v.error);let ct=typeof sr=="boolean"?sr:sr.has(v.name),Ot=typeof Qi=="boolean"?Qi:Qi.has(v.name),Xe=typeof Ki=="boolean"?Ki:Ki.has(v.name),Oe;ir===!0||(D=ir==null?void 0:ir.has)!=null&&D.call(ir,v.name)?Oe=oy:or===!0||(H=or==null?void 0:or.has)!=null&&H.call(or,v.name)?Oe=ay:Oe=ly;let fe=`${Z}${Ke}${oe}`,ht=R[fe].old,Be=_y(v,{usePre:Ot,useRel:Xe,useGreatest:ct,semvers:Oe,range:ht,language:r}),Yr=gy(ht,Be);!Be||ht===Yr?delete R[fe]:(R[fe].new=Yr,r==="js"?R[fe].info=vh((V=v==null?void 0:v.versions)==null?void 0:V[Be],ee,v.name):R[fe].info=vh(v,ee,v.info.name),(X=v.time)!=null&&X[Be]?R[fe].age=is(v.time[Be],{noAffix:!0}):(He=(ae=(J=v.releases)==null?void 0:J[Be])==null?void 0:ae[0])!=null&&He.upload_time_iso_8601&&(R[fe].age=is(v.releases[Be][0].upload_time_iso_8601,{noAffix:!0})))}if(Object.keys(A).length){let v=await Promise.all(Object.entries(A).map(([Z,ee])=>{let oe=Z.split(Ke)[1],ct=typeof sr=="boolean"?sr:sr.has(oe);return wy([Z,ee],{useGreatest:ct})}));for(let Z of(v||[]).filter(Boolean)){let{key:ee,newRange:oe,user:ct,repo:Ot,oldRef:Xe,newRef:Oe,newDate:fe}=Z;R[ee]={old:A[ee].old,new:oe,oldPrint:Ji.test(Xe)?Xe.substring(0,7):Xe,newPrint:Ji.test(Oe)?Oe.substring(0,7):Oe,info:`https://github.com/${ct}/${Ot}`,...fe?{age:is(fe,{noAffix:!0})}:{}}}}Object.keys(R).length||xe("All dependencies are up to date."),a||xe(void 0,R);try{r==="js"?xh(h,py(m,R)):xh(h,my(m,R))}catch(v){xe(new Error(`Error writing ${h}: ${v.message}`))}xe(tr(`\u2728 ${Sh(h)} updated`),R)}Ey().catch(xe);
56
+ `),Gr(0)),e&&(console.info(zh),Gr(0)),r&&!["js","py"].includes(r))throw new Error(`Invalid language: ${r}`);if(n){let v=Sh(n);v==="package.json"?r="js":v==="pyproject.toml"&&(r="py")}r||(r="js");let u;r==="py"?u="pyproject.toml":r==="js"&&(u="package.json");let h;if(n){let v;try{v=Xb(n)}catch(Z){xe(new Error(`Unable to open ${n}: ${Z.message}`))}v!=null&&v.isFile()?h=n:v!=null&&v.isDirectory()?h=fs(n,u):xe(new Error(`${n} is neither a file nor directory`))}else{let v=Vb();if(h=kh(u,v),!h)return xe(new Error(`Unable to find ${u} in ${v} or any of its parent directories`))}let f=Fh(Kb(h));try{ve=(await import(fs(f,"updates.config.js"))).default}catch{try{ve=(await import(fs(f,"updates.config.mjs"))).default}catch{}}let c={};if(r==="js"&&(ze["strict-ssl"]===!1&&(c.rejectUnauthorized=!1),"cafile"in ze&&(c.ca=Eh.concat(Ch(Rh(ze.cafile,"utf8")))),"ca"in ze)){let v=Array.isArray(ze.ca)?ze.ca:[ze.ca];c.ca=Eh.concat(v.map(Z=>Ch(Z)))}let g;i?g=Array.isArray(i)?i:i.split(","):"types"in ve&&Array.isArray(ve.types)?g=ve.types:r==="js"?g=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"]:g=["tool.poetry.dependencies","tool.poetry.group.dev.dependencies"];let b,m;try{m=Rh(h,"utf8")}catch(v){xe(new Error(`Unable to open ${h}: ${v.message}`))}try{r==="js"?b=JSON.parse(m):b=(0,qh.default)(m)}catch(v){xe(new Error(`Error parsing ${h}: ${v.message}`))}let p,_;z.include&&z.include!==!0?p=new Set((Array.isArray(z.include)?z.include:[z.include]).flatMap(v=>v.split(","))):"include"in ve&&Array.isArray(ve.include)&&(p=new Set(ve.include)),z.exclude&&z.exclude!==!0?_=new Set((Array.isArray(z.exclude)?z.exclude:[z.exclude]).flatMap(v=>v.split(","))):"exclude"in ve&&Array.isArray(ve.exclude)&&(_=new Set(ve.exclude));function E(v,Z){var ee,oe;return!(Z==="py"&&v==="python"||((ee=_==null?void 0:_.has)==null?void 0:ee.call(_,v))===!0||((oe=p==null?void 0:p.has)==null?void 0:oe.call(p,v))===!1)}let R={},A={};for(let v of g){let Z;r==="js"?Z=b[v]||{}:Z=bh(b,v)||{};for(let[ee,oe]of Object.entries(Z))ne.default.validRange(oe)&&E(ee,r)?R[`${v}${Ke}${ee}`]={old:Ey(oe),oldOriginal:oe}:r==="js"&&E(ee,r)&&(A[`${v}${Ke}${ee}`]={old:oe})}!Object.keys(R).length&&!Object.keys(A).length&&xe(p||_?new Error("No dependencies match the given include/exclude filters"):"No dependencies present, nothing to do");let N;r==="js"&&(N=ps(z.registry||ve.registry||ze.registry));let L=await Gi(Object.keys(R).map(v=>()=>{let[Z,ee]=v.split(Ke);return r==="js"?fy(ee,Z,N,c):dy(ee,Z,c)}),{concurrency:Mh});for(let[v,Z,ee,oe]of L){if(v!=null&&v.error)throw new Error(v.error);let ct=typeof sr=="boolean"?sr:sr.has(v.name),Ot=typeof Qi=="boolean"?Qi:Qi.has(v.name),Xe=typeof Ki=="boolean"?Ki:Ki.has(v.name),Oe;ir===!0||(D=ir==null?void 0:ir.has)!=null&&D.call(ir,v.name)?Oe=ay:or===!0||(H=or==null?void 0:or.has)!=null&&H.call(or,v.name)?Oe=ly:Oe=uy;let fe=`${Z}${Ke}${oe}`,ht=R[fe].old,Be=wy(v,{usePre:Ot,useRel:Xe,useGreatest:ct,semvers:Oe,range:ht,language:r}),Yr=by(ht,Be);!Be||ht===Yr?delete R[fe]:(R[fe].new=Yr,r==="js"?R[fe].info=vh((V=v==null?void 0:v.versions)==null?void 0:V[Be],ee,v.name):R[fe].info=vh(v,ee,v.info.name),(X=v.time)!=null&&X[Be]?R[fe].age=is(v.time[Be],{noAffix:!0}):(He=(ae=(J=v.releases)==null?void 0:J[Be])==null?void 0:ae[0])!=null&&He.upload_time_iso_8601&&(R[fe].age=is(v.releases[Be][0].upload_time_iso_8601,{noAffix:!0})))}if(Object.keys(A).length){let v=await Promise.all(Object.entries(A).map(([Z,ee])=>{let oe=Z.split(Ke)[1],ct=typeof sr=="boolean"?sr:sr.has(oe);return Sy([Z,ee],{useGreatest:ct})}));for(let Z of(v||[]).filter(Boolean)){let{key:ee,newRange:oe,user:ct,repo:Ot,oldRef:Xe,newRef:Oe,newDate:fe}=Z;R[ee]={old:A[ee].old,new:oe,oldPrint:Ji.test(Xe)?Xe.substring(0,7):Xe,newPrint:Ji.test(Oe)?Oe.substring(0,7):Oe,info:`https://github.com/${ct}/${Ot}`,...fe?{age:is(fe,{noAffix:!0})}:{}}}}Object.keys(R).length||xe("All dependencies are up to date."),a||xe(void 0,R);try{r==="js"?xh(h,my(m,R)):xh(h,gy(m,R))}catch(v){xe(new Error(`Error writing ${h}: ${v.message}`))}xe(tr(`\u2728 ${Sh(h)} updated`),R)}Ty().catch(xe);